@lotte-innovate/ui-component-test 0.2.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (494) hide show
  1. package/_virtual/icons.mjs +2 -0
  2. package/_virtual/icons.mjs.map +1 -0
  3. package/_virtual/index.mjs +2 -0
  4. package/_virtual/index.mjs.map +1 -0
  5. package/_virtual/index10.mjs +2 -0
  6. package/_virtual/index10.mjs.map +1 -0
  7. package/_virtual/index11.mjs +2 -0
  8. package/_virtual/index11.mjs.map +1 -0
  9. package/_virtual/index12.mjs +2 -0
  10. package/_virtual/index12.mjs.map +1 -0
  11. package/_virtual/index13.mjs +2 -0
  12. package/_virtual/index13.mjs.map +1 -0
  13. package/_virtual/index14.mjs +2 -0
  14. package/_virtual/index14.mjs.map +1 -0
  15. package/_virtual/index15.mjs +2 -0
  16. package/_virtual/index15.mjs.map +1 -0
  17. package/_virtual/index16.mjs +2 -0
  18. package/_virtual/index16.mjs.map +1 -0
  19. package/_virtual/index17.mjs +2 -0
  20. package/_virtual/index17.mjs.map +1 -0
  21. package/_virtual/index18.mjs +2 -0
  22. package/_virtual/index18.mjs.map +1 -0
  23. package/_virtual/index19.mjs +2 -0
  24. package/_virtual/index19.mjs.map +1 -0
  25. package/_virtual/index2.mjs +2 -0
  26. package/_virtual/index2.mjs.map +1 -0
  27. package/_virtual/index20.mjs +2 -0
  28. package/_virtual/index20.mjs.map +1 -0
  29. package/_virtual/index21.mjs +2 -0
  30. package/_virtual/index21.mjs.map +1 -0
  31. package/_virtual/index22.mjs +2 -0
  32. package/_virtual/index22.mjs.map +1 -0
  33. package/_virtual/index3.mjs +2 -0
  34. package/_virtual/index3.mjs.map +1 -0
  35. package/_virtual/index4.mjs +2 -0
  36. package/_virtual/index4.mjs.map +1 -0
  37. package/_virtual/index5.mjs +2 -0
  38. package/_virtual/index5.mjs.map +1 -0
  39. package/_virtual/index6.mjs +2 -0
  40. package/_virtual/index6.mjs.map +1 -0
  41. package/_virtual/index7.mjs +2 -0
  42. package/_virtual/index7.mjs.map +1 -0
  43. package/_virtual/index8.mjs +2 -0
  44. package/_virtual/index8.mjs.map +1 -0
  45. package/_virtual/index9.mjs +2 -0
  46. package/_virtual/index9.mjs.map +1 -0
  47. package/_virtual/jsx-runtime.mjs +2 -0
  48. package/_virtual/jsx-runtime.mjs.map +1 -0
  49. package/_virtual/jsx-runtime2.mjs +2 -0
  50. package/_virtual/jsx-runtime2.mjs.map +1 -0
  51. package/_virtual/model.mjs +2 -0
  52. package/_virtual/model.mjs.map +1 -0
  53. package/_virtual/plugin.mjs +2 -0
  54. package/_virtual/plugin.mjs.map +1 -0
  55. package/_virtual/plugin2.mjs +2 -0
  56. package/_virtual/plugin2.mjs.map +1 -0
  57. package/_virtual/plugin3.mjs +2 -0
  58. package/_virtual/plugin3.mjs.map +1 -0
  59. package/_virtual/plugin4.mjs +2 -0
  60. package/_virtual/plugin4.mjs.map +1 -0
  61. package/_virtual/plugin5.mjs +2 -0
  62. package/_virtual/plugin5.mjs.map +1 -0
  63. package/_virtual/plugin6.mjs +2 -0
  64. package/_virtual/plugin6.mjs.map +1 -0
  65. package/_virtual/plugin7.mjs +2 -0
  66. package/_virtual/plugin7.mjs.map +1 -0
  67. package/_virtual/react-jsx-runtime.development.mjs +2 -0
  68. package/_virtual/react-jsx-runtime.development.mjs.map +1 -0
  69. package/_virtual/react-jsx-runtime.production.min.mjs +2 -0
  70. package/_virtual/react-jsx-runtime.production.min.mjs.map +1 -0
  71. package/_virtual/react.development.mjs +2 -0
  72. package/_virtual/react.development.mjs.map +1 -0
  73. package/_virtual/react.production.min.mjs +2 -0
  74. package/_virtual/react.production.min.mjs.map +1 -0
  75. package/_virtual/theme.mjs +2 -0
  76. package/_virtual/theme.mjs.map +1 -0
  77. package/_virtual/tinymce.mjs +2 -0
  78. package/_virtual/tinymce.mjs.map +1 -0
  79. package/_virtual/tinymce2.mjs +2 -0
  80. package/_virtual/tinymce2.mjs.map +1 -0
  81. package/dist/lib/color/constants.d.ts +9 -14
  82. package/dist/lib/color/constants.js +79 -14
  83. package/dist/lib/color/dark.js +1 -1
  84. package/dist/lib/color/light.js +3 -3
  85. package/dist/lib/components/Editor/index.d.ts +25 -0
  86. package/dist/lib/components/Editor/index.js +95 -0
  87. package/dist/lib/components/Editor/index.mjs +3 -0
  88. package/dist/lib/components/Editor/index.mjs.map +1 -0
  89. package/dist/lib/components/index.d.ts +1 -46
  90. package/dist/lib/components/index.js +1 -48
  91. package/dist/lib/constants.d.ts +475 -6
  92. package/dist/lib/constants.js +368 -35
  93. package/dist/lib/constants.mjs +2 -0
  94. package/dist/lib/constants.mjs.map +1 -0
  95. package/dist/lib/index.d.ts +1 -1
  96. package/dist/lib/index.js +1 -1
  97. package/dist/lib/index.mjs +2 -0
  98. package/dist/lib/index.mjs.map +1 -0
  99. package/dist/lib/theme/ThemeProvider.d.ts +16 -0
  100. package/dist/lib/theme/ThemeProvider.js +29 -0
  101. package/dist/lib/theme/ThemeProvider.mjs +3 -0
  102. package/dist/lib/theme/ThemeProvider.mjs.map +1 -0
  103. package/dist/lib/theme/index.d.ts +2 -0
  104. package/dist/lib/theme/index.js +2 -0
  105. package/dist/lib/types.d.ts +79 -0
  106. package/dist/lib/utils/utils.d.ts +0 -1
  107. package/dist/lib/utils/utils.js +0 -17
  108. package/dist/lib/utils/utils.mjs +2 -0
  109. package/dist/lib/utils/utils.mjs.map +1 -0
  110. package/dist/tsconfig.tsbuildinfo +1 -0
  111. package/package.json +105 -134
  112. package/public/tinymce/CHANGELOG.md +3453 -0
  113. package/public/tinymce/README.md +73 -0
  114. package/public/tinymce/bower.json +27 -0
  115. package/public/tinymce/composer.json +52 -0
  116. package/public/tinymce/icons/default/icons.js +194 -0
  117. package/public/tinymce/icons/default/icons.min.js +1 -0
  118. package/public/tinymce/icons/default/icons.mjs +2 -0
  119. package/public/tinymce/icons/default/icons.mjs.map +1 -0
  120. package/public/tinymce/icons/default/index.d.ts +1 -0
  121. package/public/tinymce/icons/default/index.js +7 -0
  122. package/public/tinymce/icons/default/index.mjs +2 -0
  123. package/public/tinymce/icons/default/index.mjs.map +1 -0
  124. package/public/tinymce/license.txt +21 -0
  125. package/public/tinymce/models/dom/index.d.ts +1 -0
  126. package/public/tinymce/models/dom/index.js +7 -0
  127. package/public/tinymce/models/dom/index.mjs +2 -0
  128. package/public/tinymce/models/dom/index.mjs.map +1 -0
  129. package/public/tinymce/models/dom/model.js +8040 -0
  130. package/public/tinymce/models/dom/model.min.js +4 -0
  131. package/public/tinymce/models/dom/model.mjs +2 -0
  132. package/public/tinymce/models/dom/model.mjs.map +1 -0
  133. package/public/tinymce/package.json +32 -0
  134. package/public/tinymce/plugins/advlist/index.d.ts +1 -0
  135. package/public/tinymce/plugins/advlist/index.js +7 -0
  136. package/public/tinymce/plugins/advlist/index.mjs +2 -0
  137. package/public/tinymce/plugins/advlist/index.mjs.map +1 -0
  138. package/public/tinymce/plugins/advlist/plugin.js +259 -0
  139. package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
  140. package/public/tinymce/plugins/advlist/plugin.mjs +2 -0
  141. package/public/tinymce/plugins/advlist/plugin.mjs.map +1 -0
  142. package/public/tinymce/plugins/autolink/index.js +7 -0
  143. package/public/tinymce/plugins/autolink/plugin.js +228 -0
  144. package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
  145. package/public/tinymce/plugins/code/index.d.ts +1 -0
  146. package/public/tinymce/plugins/code/index.js +7 -0
  147. package/public/tinymce/plugins/code/index.mjs +2 -0
  148. package/public/tinymce/plugins/code/index.mjs.map +1 -0
  149. package/public/tinymce/plugins/code/plugin.js +85 -0
  150. package/public/tinymce/plugins/code/plugin.min.js +4 -0
  151. package/public/tinymce/plugins/code/plugin.mjs +2 -0
  152. package/public/tinymce/plugins/code/plugin.mjs.map +1 -0
  153. package/public/tinymce/plugins/codesample/index.d.ts +1 -0
  154. package/public/tinymce/plugins/codesample/index.js +7 -0
  155. package/public/tinymce/plugins/codesample/index.mjs +2 -0
  156. package/public/tinymce/plugins/codesample/index.mjs.map +1 -0
  157. package/public/tinymce/plugins/codesample/plugin.d.ts +45 -0
  158. package/public/tinymce/plugins/codesample/plugin.js +2463 -0
  159. package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
  160. package/public/tinymce/plugins/codesample/plugin.mjs +2 -0
  161. package/public/tinymce/plugins/codesample/plugin.mjs.map +1 -0
  162. package/public/tinymce/plugins/image/index.d.ts +1 -0
  163. package/public/tinymce/plugins/image/index.js +7 -0
  164. package/public/tinymce/plugins/image/index.mjs +2 -0
  165. package/public/tinymce/plugins/image/index.mjs.map +1 -0
  166. package/public/tinymce/plugins/image/plugin.js +1505 -0
  167. package/public/tinymce/plugins/image/plugin.min.js +4 -0
  168. package/public/tinymce/plugins/image/plugin.mjs +2 -0
  169. package/public/tinymce/plugins/image/plugin.mjs.map +1 -0
  170. package/public/tinymce/plugins/link/index.d.ts +1 -0
  171. package/public/tinymce/plugins/link/index.js +7 -0
  172. package/public/tinymce/plugins/link/index.mjs +2 -0
  173. package/public/tinymce/plugins/link/index.mjs.map +1 -0
  174. package/public/tinymce/plugins/link/plugin.js +1242 -0
  175. package/public/tinymce/plugins/link/plugin.min.js +4 -0
  176. package/public/tinymce/plugins/link/plugin.mjs +2 -0
  177. package/public/tinymce/plugins/link/plugin.mjs.map +1 -0
  178. package/public/tinymce/plugins/lists/index.d.ts +1 -0
  179. package/public/tinymce/plugins/lists/index.js +7 -0
  180. package/public/tinymce/plugins/lists/index.mjs +2 -0
  181. package/public/tinymce/plugins/lists/index.mjs.map +1 -0
  182. package/public/tinymce/plugins/lists/plugin.js +2172 -0
  183. package/public/tinymce/plugins/lists/plugin.min.js +4 -0
  184. package/public/tinymce/plugins/lists/plugin.mjs +2 -0
  185. package/public/tinymce/plugins/lists/plugin.mjs.map +1 -0
  186. package/public/tinymce/plugins/table/index.d.ts +1 -0
  187. package/public/tinymce/plugins/table/index.js +7 -0
  188. package/public/tinymce/plugins/table/index.mjs +2 -0
  189. package/public/tinymce/plugins/table/index.mjs.map +1 -0
  190. package/public/tinymce/plugins/table/plugin.js +3462 -0
  191. package/public/tinymce/plugins/table/plugin.min.js +4 -0
  192. package/public/tinymce/plugins/table/plugin.mjs +2 -0
  193. package/public/tinymce/plugins/table/plugin.mjs.map +1 -0
  194. package/public/tinymce/skins/content/default/content.css +61 -0
  195. package/public/tinymce/skins/content/default/content.js +2 -0
  196. package/public/tinymce/skins/content/default/content.min.css +1 -0
  197. package/public/tinymce/skins/content/default/content.mjs +2 -0
  198. package/public/tinymce/skins/content/default/content.mjs.map +1 -0
  199. package/public/tinymce/skins/ui/oxide/content.css +785 -0
  200. package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
  201. package/public/tinymce/skins/ui/oxide/content.inline.js +2 -0
  202. package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
  203. package/public/tinymce/skins/ui/oxide/content.js +2 -0
  204. package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
  205. package/public/tinymce/skins/ui/oxide/content.mjs +2 -0
  206. package/public/tinymce/skins/ui/oxide/content.mjs.map +1 -0
  207. package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
  208. package/public/tinymce/skins/ui/oxide/skin.js +2 -0
  209. package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
  210. package/public/tinymce/skins/ui/oxide/skin.mjs +2 -0
  211. package/public/tinymce/skins/ui/oxide/skin.mjs.map +1 -0
  212. package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
  213. package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  214. package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  215. package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
  216. package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
  217. package/public/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  218. package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
  219. package/public/tinymce/skins/ui/oxide-dark/content.js +2 -0
  220. package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
  221. package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
  222. package/public/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  223. package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
  224. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
  225. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  226. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  227. package/public/tinymce/themes/silver/index.d.ts +1 -0
  228. package/public/tinymce/themes/silver/index.js +7 -0
  229. package/public/tinymce/themes/silver/index.mjs +2 -0
  230. package/public/tinymce/themes/silver/index.mjs.map +1 -0
  231. package/public/tinymce/themes/silver/theme.js +30775 -0
  232. package/public/tinymce/themes/silver/theme.min.js +384 -0
  233. package/public/tinymce/themes/silver/theme.mjs +2 -0
  234. package/public/tinymce/themes/silver/theme.mjs.map +1 -0
  235. package/public/tinymce/tinymce.d.ts +3238 -0
  236. package/public/tinymce/tinymce.js +31779 -0
  237. package/public/tinymce/tinymce.min.js +384 -0
  238. package/public/tinymce/tinymce.mjs +2 -0
  239. package/public/tinymce/tinymce.mjs.map +1 -0
  240. package/README.md +0 -163
  241. package/dist/globals.css +0 -261089
  242. package/dist/lib/Typography/Header/index.d.ts +0 -13
  243. package/dist/lib/Typography/Header/index.js +0 -55
  244. package/dist/lib/Typography/Text/index.d.ts +0 -15
  245. package/dist/lib/Typography/Text/index.js +0 -44
  246. package/dist/lib/Typography/index.d.ts +0 -2
  247. package/dist/lib/Typography/index.js +0 -2
  248. package/dist/lib/components/Accordion/index.d.ts +0 -16
  249. package/dist/lib/components/Accordion/index.js +0 -58
  250. package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +0 -14
  251. package/dist/lib/components/AlertDialog/AlertDialogAction.js +0 -59
  252. package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +0 -13
  253. package/dist/lib/components/AlertDialog/AlertDialogCancel.js +0 -56
  254. package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +0 -11
  255. package/dist/lib/components/AlertDialog/AlertDialogContent.js +0 -49
  256. package/dist/lib/components/AlertDialog/AlertDialogDescription.d.ts +0 -10
  257. package/dist/lib/components/AlertDialog/AlertDialogDescription.js +0 -45
  258. package/dist/lib/components/AlertDialog/AlertDialogTitle.d.ts +0 -10
  259. package/dist/lib/components/AlertDialog/AlertDialogTitle.js +0 -45
  260. package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +0 -17
  261. package/dist/lib/components/AlertDialog/AlertDialogTrigger.js +0 -55
  262. package/dist/lib/components/AlertDialog/index.d.ts +0 -20
  263. package/dist/lib/components/AlertDialog/index.js +0 -37
  264. package/dist/lib/components/AspectRatio/index.d.ts +0 -10
  265. package/dist/lib/components/AspectRatio/index.js +0 -42
  266. package/dist/lib/components/Avatar/index.d.ts +0 -17
  267. package/dist/lib/components/Avatar/index.js +0 -57
  268. package/dist/lib/components/Badge/index.d.ts +0 -18
  269. package/dist/lib/components/Badge/index.js +0 -54
  270. package/dist/lib/components/BubbleChart/index.d.ts +0 -31
  271. package/dist/lib/components/BubbleChart/index.js +0 -43
  272. package/dist/lib/components/Button/index.d.ts +0 -16
  273. package/dist/lib/components/Button/index.js +0 -56
  274. package/dist/lib/components/Callout/CalloutIcon.d.ts +0 -12
  275. package/dist/lib/components/Callout/CalloutIcon.js +0 -57
  276. package/dist/lib/components/Callout/CalloutText.d.ts +0 -10
  277. package/dist/lib/components/Callout/CalloutText.js +0 -52
  278. package/dist/lib/components/Callout/index.d.ts +0 -20
  279. package/dist/lib/components/Callout/index.js +0 -75
  280. package/dist/lib/components/Card/index.d.ts +0 -14
  281. package/dist/lib/components/Card/index.js +0 -64
  282. package/dist/lib/components/Checkbox/index.d.ts +0 -17
  283. package/dist/lib/components/Checkbox/index.js +0 -89
  284. package/dist/lib/components/CheckboxCard/index.d.ts +0 -20
  285. package/dist/lib/components/CheckboxCard/index.js +0 -58
  286. package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.d.ts +0 -5
  287. package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.js +0 -33
  288. package/dist/lib/components/CheckboxGroup/index.d.ts +0 -17
  289. package/dist/lib/components/CheckboxGroup/index.js +0 -35
  290. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.d.ts +0 -4
  291. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.js +0 -40
  292. package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +0 -11
  293. package/dist/lib/components/ContextMenu/ContextMenuContent.js +0 -56
  294. package/dist/lib/components/ContextMenu/ContextMenuGroup.d.ts +0 -4
  295. package/dist/lib/components/ContextMenu/ContextMenuGroup.js +0 -30
  296. package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +0 -13
  297. package/dist/lib/components/ContextMenu/ContextMenuItem.js +0 -59
  298. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +0 -10
  299. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.js +0 -50
  300. package/dist/lib/components/ContextMenu/ContextMenuLabel.d.ts +0 -11
  301. package/dist/lib/components/ContextMenu/ContextMenuLabel.js +0 -48
  302. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.d.ts +0 -8
  303. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +0 -31
  304. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.d.ts +0 -4
  305. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.js +0 -41
  306. package/dist/lib/components/ContextMenu/ContextMenuSeparator.d.ts +0 -3
  307. package/dist/lib/components/ContextMenu/ContextMenuSeparator.js +0 -31
  308. package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +0 -11
  309. package/dist/lib/components/ContextMenu/ContextMenuSubContent.js +0 -53
  310. package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.d.ts +0 -4
  311. package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.js +0 -40
  312. package/dist/lib/components/ContextMenu/ContextMenuTrigger.d.ts +0 -4
  313. package/dist/lib/components/ContextMenu/ContextMenuTrigger.js +0 -31
  314. package/dist/lib/components/ContextMenu/index.d.ts +0 -25
  315. package/dist/lib/components/ContextMenu/index.js +0 -54
  316. package/dist/lib/components/DataList/DataListItem.d.ts +0 -9
  317. package/dist/lib/components/DataList/DataListItem.js +0 -43
  318. package/dist/lib/components/DataList/DataListLabel.d.ts +0 -10
  319. package/dist/lib/components/DataList/DataListLabel.js +0 -49
  320. package/dist/lib/components/DataList/DataListValue.d.ts +0 -11
  321. package/dist/lib/components/DataList/DataListValue.js +0 -51
  322. package/dist/lib/components/DataList/index.d.ts +0 -17
  323. package/dist/lib/components/DataList/index.js +0 -57
  324. package/dist/lib/components/Dialog/DialogAction.d.ts +0 -15
  325. package/dist/lib/components/Dialog/DialogAction.js +0 -57
  326. package/dist/lib/components/Dialog/DialogCancel.d.ts +0 -11
  327. package/dist/lib/components/Dialog/DialogCancel.js +0 -53
  328. package/dist/lib/components/Dialog/DialogContent.d.ts +0 -11
  329. package/dist/lib/components/Dialog/DialogContent.js +0 -55
  330. package/dist/lib/components/Dialog/DialogDescription.d.ts +0 -9
  331. package/dist/lib/components/Dialog/DialogDescription.js +0 -45
  332. package/dist/lib/components/Dialog/DialogSlot.d.ts +0 -9
  333. package/dist/lib/components/Dialog/DialogSlot.js +0 -44
  334. package/dist/lib/components/Dialog/DialogTitle.d.ts +0 -11
  335. package/dist/lib/components/Dialog/DialogTitle.js +0 -45
  336. package/dist/lib/components/Dialog/DialogTrigger.d.ts +0 -3
  337. package/dist/lib/components/Dialog/DialogTrigger.js +0 -30
  338. package/dist/lib/components/Dialog/index.d.ts +0 -18
  339. package/dist/lib/components/Dialog/index.js +0 -38
  340. package/dist/lib/components/DoughnutChart/index.d.ts +0 -23
  341. package/dist/lib/components/DoughnutChart/index.js +0 -46
  342. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.d.ts +0 -8
  343. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +0 -31
  344. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +0 -11
  345. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.js +0 -58
  346. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +0 -7
  347. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.js +0 -38
  348. package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +0 -11
  349. package/dist/lib/components/DropdownMenu/DropdownMenuContent.js +0 -54
  350. package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +0 -13
  351. package/dist/lib/components/DropdownMenu/DropdownMenuItem.js +0 -56
  352. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +0 -10
  353. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.js +0 -46
  354. package/dist/lib/components/DropdownMenu/DropdownMenuLable.d.ts +0 -11
  355. package/dist/lib/components/DropdownMenu/DropdownMenuLable.js +0 -46
  356. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.d.ts +0 -4
  357. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.js +0 -39
  358. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.d.ts +0 -3
  359. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +0 -31
  360. package/dist/lib/components/DropdownMenu/DropdownMenuSub.d.ts +0 -3
  361. package/dist/lib/components/DropdownMenu/DropdownMenuSub.js +0 -30
  362. package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +0 -4
  363. package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.js +0 -38
  364. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +0 -13
  365. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +0 -51
  366. package/dist/lib/components/DropdownMenu/index.d.ts +0 -23
  367. package/dist/lib/components/DropdownMenu/index.js +0 -43
  368. package/dist/lib/components/HoverCard/HoverCardContent.d.ts +0 -14
  369. package/dist/lib/components/HoverCard/HoverCardContent.js +0 -59
  370. package/dist/lib/components/HoverCard/HoverCardTrigger.d.ts +0 -3
  371. package/dist/lib/components/HoverCard/HoverCardTrigger.js +0 -30
  372. package/dist/lib/components/HoverCard/index.d.ts +0 -10
  373. package/dist/lib/components/HoverCard/index.js +0 -33
  374. package/dist/lib/components/IconButton/index.d.ts +0 -15
  375. package/dist/lib/components/IconButton/index.js +0 -63
  376. package/dist/lib/components/Inset/index.d.ts +0 -10
  377. package/dist/lib/components/Inset/index.js +0 -50
  378. package/dist/lib/components/Label/index.d.ts +0 -17
  379. package/dist/lib/components/Label/index.js +0 -53
  380. package/dist/lib/components/Menubar/MenubarCheckboxItem.d.ts +0 -4
  381. package/dist/lib/components/Menubar/MenubarCheckboxItem.js +0 -38
  382. package/dist/lib/components/Menubar/MenubarContent.d.ts +0 -11
  383. package/dist/lib/components/Menubar/MenubarContent.js +0 -60
  384. package/dist/lib/components/Menubar/MenubarItem.d.ts +0 -13
  385. package/dist/lib/components/Menubar/MenubarItem.js +0 -54
  386. package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +0 -10
  387. package/dist/lib/components/Menubar/MenubarItemIndicator.js +0 -49
  388. package/dist/lib/components/Menubar/MenubarMenu.d.ts +0 -2
  389. package/dist/lib/components/Menubar/MenubarMenu.js +0 -30
  390. package/dist/lib/components/Menubar/MenubarRadioGroup.d.ts +0 -8
  391. package/dist/lib/components/Menubar/MenubarRadioGroup.js +0 -31
  392. package/dist/lib/components/Menubar/MenubarRadioItem.d.ts +0 -4
  393. package/dist/lib/components/Menubar/MenubarRadioItem.js +0 -40
  394. package/dist/lib/components/Menubar/MenubarSeparator.d.ts +0 -3
  395. package/dist/lib/components/Menubar/MenubarSeparator.js +0 -31
  396. package/dist/lib/components/Menubar/MenubarSub.d.ts +0 -3
  397. package/dist/lib/components/Menubar/MenubarSub.js +0 -30
  398. package/dist/lib/components/Menubar/MenubarSubContent.d.ts +0 -10
  399. package/dist/lib/components/Menubar/MenubarSubContent.js +0 -51
  400. package/dist/lib/components/Menubar/MenubarSubTrigger.d.ts +0 -4
  401. package/dist/lib/components/Menubar/MenubarSubTrigger.js +0 -41
  402. package/dist/lib/components/Menubar/MenubarTrigger.d.ts +0 -12
  403. package/dist/lib/components/Menubar/MenubarTrigger.js +0 -57
  404. package/dist/lib/components/Menubar/index.d.ts +0 -31
  405. package/dist/lib/components/Menubar/index.js +0 -73
  406. package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +0 -11
  407. package/dist/lib/components/NavigationMenu/NavigationMenuContent.js +0 -48
  408. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.d.ts +0 -3
  409. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +0 -31
  410. package/dist/lib/components/NavigationMenu/NavigationMenuItem.d.ts +0 -3
  411. package/dist/lib/components/NavigationMenu/NavigationMenuItem.js +0 -30
  412. package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +0 -13
  413. package/dist/lib/components/NavigationMenu/NavigationMenuLink.js +0 -51
  414. package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +0 -12
  415. package/dist/lib/components/NavigationMenu/NavigationMenuList.js +0 -47
  416. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +0 -13
  417. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.js +0 -58
  418. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +0 -12
  419. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.js +0 -53
  420. package/dist/lib/components/NavigationMenu/index.d.ts +0 -21
  421. package/dist/lib/components/NavigationMenu/index.js +0 -50
  422. package/dist/lib/components/PieChart/index.d.ts +0 -23
  423. package/dist/lib/components/PieChart/index.js +0 -46
  424. package/dist/lib/components/Popover/PopoverClose.d.ts +0 -9
  425. package/dist/lib/components/Popover/PopoverClose.js +0 -46
  426. package/dist/lib/components/Popover/PopoverContent.d.ts +0 -11
  427. package/dist/lib/components/Popover/PopoverContent.js +0 -63
  428. package/dist/lib/components/Popover/PopoverTrigger.d.ts +0 -3
  429. package/dist/lib/components/Popover/PopoverTrigger.js +0 -30
  430. package/dist/lib/components/Popover/index.d.ts +0 -12
  431. package/dist/lib/components/Popover/index.js +0 -34
  432. package/dist/lib/components/Progress/index.d.ts +0 -16
  433. package/dist/lib/components/Progress/index.js +0 -57
  434. package/dist/lib/components/RadarChart/index.d.ts +0 -34
  435. package/dist/lib/components/RadarChart/index.js +0 -43
  436. package/dist/lib/components/Radio/index.d.ts +0 -14
  437. package/dist/lib/components/Radio/index.js +0 -51
  438. package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +0 -10
  439. package/dist/lib/components/RadioCards/RadioCardsItem.js +0 -52
  440. package/dist/lib/components/RadioCards/index.d.ts +0 -14
  441. package/dist/lib/components/RadioCards/index.js +0 -43
  442. package/dist/lib/components/RadioGroup/RadioGroupItem.d.ts +0 -13
  443. package/dist/lib/components/RadioGroup/RadioGroupItem.js +0 -44
  444. package/dist/lib/components/RadioGroup/index.d.ts +0 -16
  445. package/dist/lib/components/RadioGroup/index.js +0 -51
  446. package/dist/lib/components/ScrollArea/index.d.ts +0 -9
  447. package/dist/lib/components/ScrollArea/index.js +0 -36
  448. package/dist/lib/components/SegmentedControl/SegmentedControlItem.d.ts +0 -6
  449. package/dist/lib/components/SegmentedControl/SegmentedControlItem.js +0 -35
  450. package/dist/lib/components/SegmentedControl/index.d.ts +0 -15
  451. package/dist/lib/components/SegmentedControl/index.js +0 -48
  452. package/dist/lib/components/Select/index.d.ts +0 -25
  453. package/dist/lib/components/Select/index.js +0 -83
  454. package/dist/lib/components/Separator/index.d.ts +0 -11
  455. package/dist/lib/components/Separator/index.js +0 -47
  456. package/dist/lib/components/Skeleton/index.d.ts +0 -15
  457. package/dist/lib/components/Skeleton/index.js +0 -43
  458. package/dist/lib/components/Slider/index.d.ts +0 -15
  459. package/dist/lib/components/Slider/index.js +0 -50
  460. package/dist/lib/components/Spinner/index.d.ts +0 -15
  461. package/dist/lib/components/Spinner/index.js +0 -47
  462. package/dist/lib/components/TabNav/index.d.ts +0 -11
  463. package/dist/lib/components/TabNav/index.js +0 -46
  464. package/dist/lib/components/Table/index.d.ts +0 -21
  465. package/dist/lib/components/Table/index.js +0 -89
  466. package/dist/lib/components/Tabs/index.d.ts +0 -16
  467. package/dist/lib/components/Tabs/index.js +0 -59
  468. package/dist/lib/components/TextArea/index.d.ts +0 -16
  469. package/dist/lib/components/TextArea/index.js +0 -58
  470. package/dist/lib/components/TextField/index.d.ts +0 -18
  471. package/dist/lib/components/TextField/index.js +0 -53
  472. package/dist/lib/components/Toast/ToastActionButton.d.ts +0 -14
  473. package/dist/lib/components/Toast/ToastActionButton.js +0 -67
  474. package/dist/lib/components/Toast/ToastDescription.d.ts +0 -13
  475. package/dist/lib/components/Toast/ToastDescription.js +0 -53
  476. package/dist/lib/components/Toast/ToastTitle.d.ts +0 -13
  477. package/dist/lib/components/Toast/ToastTitle.js +0 -53
  478. package/dist/lib/components/Toast/index.d.ts +0 -30
  479. package/dist/lib/components/Toast/index.js +0 -94
  480. package/dist/lib/components/Toggle/ToggleWithText.d.ts +0 -21
  481. package/dist/lib/components/Toggle/ToggleWithText.js +0 -57
  482. package/dist/lib/components/Toggle/index.d.ts +0 -21
  483. package/dist/lib/components/Toggle/index.js +0 -58
  484. package/dist/lib/components/ToggleGroup/index.d.ts +0 -20
  485. package/dist/lib/components/ToggleGroup/index.js +0 -43
  486. package/dist/lib/components/ToggleGroup/toggleGroupItem.d.ts +0 -17
  487. package/dist/lib/components/ToggleGroup/toggleGroupItem.js +0 -52
  488. package/dist/lib/components/ToggleSwitch/index.d.ts +0 -13
  489. package/dist/lib/components/ToggleSwitch/index.js +0 -71
  490. package/dist/lib/components/Tooltip/index.d.ts +0 -20
  491. package/dist/lib/components/Tooltip/index.js +0 -49
  492. package/dist/styles.css +0 -32751
  493. package/dist/tailwind.config.d.ts +0 -3
  494. package/dist/tailwind.config.js +0 -144
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.mjs","sources":["../../../../../../public/tinymce/themes/silver/theme.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n const getPrototypeOf$2 = Object.getPrototypeOf;\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$1 = t => a => t === a;\n const is$2 = (value, constructor) => isObject(value) && hasProto(value, constructor, (o, proto) => getPrototypeOf$2(o) === proto);\n const isString = isType$1('string');\n const isObject = isType$1('object');\n const isPlainObject = value => is$2(value, Object);\n const isArray = isType$1('array');\n const isNull = eq$1(null);\n const isBoolean = isSimpleType('boolean');\n const isUndefined = eq$1(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 const isArrayOf = (value, pred) => {\n if (isArray(value)) {\n for (let i = 0, len = value.length; i < len; ++i) {\n if (!pred(value[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n };\n\n const noop = () => {\n };\n const noarg = f => () => f();\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$1 = 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$1 = f => {\n return f();\n };\n const never = constant$1(false);\n const always = constant$1(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 indexOf = (xs, x) => {\n const r = rawIndexOf(xs, x);\n return r === -1 ? Optional.none() : Optional.some(r);\n };\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$2 = (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 chunk$1 = (array, size) => {\n const r = [];\n for (let i = 0; i < array.length; i += size) {\n const s = nativeSlice.call(array, i, i + size);\n r.push(s);\n }\n return r;\n };\n const map$2 = (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$1 = (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$3 = (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$1(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$5 = (xs, pred) => {\n return findUntil(xs, pred, never);\n };\n const findIndex$1 = (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$3 = (xs, f) => flatten(map$2(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 difference = (a1, a2) => filter$2(a1, x => !contains$2(a2, x));\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 pure$2 = x => [x];\n const sort = (xs, comparator) => {\n const copy = nativeSlice.call(xs, 0);\n copy.sort(comparator);\n return copy;\n };\n const get$h = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n const head = xs => get$h(xs, 0);\n const last$1 = xs => get$h(xs, xs.length - 1);\n const from = isFunction(Array.from) ? Array.from : x => nativeSlice.call(x);\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 = (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$1 = (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(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(obj, (x, i) => {\n (pred(x, i) ? onTrue : onFalse)(x, i);\n });\n };\n const bifilter = (obj, pred) => {\n const t = {};\n const f = {};\n internalFilter(obj, pred, objAcc(t), objAcc(f));\n return {\n t,\n f\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(obj, (value, name) => {\n r.push(f(value, name));\n });\n return r;\n };\n const find$4 = (obj, pred) => {\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 if (pred(x, i, obj)) {\n return Optional.some(x);\n }\n }\n return Optional.none();\n };\n const values = obj => {\n return mapToArray(obj, identity);\n };\n const get$g = (obj, key) => {\n return has$2(obj, key) ? Optional.from(obj[key]) : Optional.none();\n };\n const has$2 = (obj, key) => hasOwnProperty.call(obj, key);\n const hasNonNullableKey = (obj, key) => has$2(obj, key) && obj[key] !== undefined && obj[key] !== null;\n\n const is$1 = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs));\n const equals = (lhs, rhs, comparator = tripleEquals) => lift2(lhs, rhs, comparator).getOr(lhs.isNone() && rhs.isNone());\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 sequence = arr => {\n const r = [];\n for (let i = 0; i < arr.length; i++) {\n const x = arr[i];\n if (x.isSome()) {\n r.push(x.getOrDie());\n } else {\n return Optional.none();\n }\n }\n return Optional.some(r);\n };\n const lift2 = (oa, ob, f) => oa.isSome() && ob.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie())) : Optional.none();\n const lift3 = (oa, ob, oc, f) => oa.isSome() && ob.isSome() && oc.isSome() ? Optional.some(f(oa.getOrDie(), ob.getOrDie(), oc.getOrDie())) : Optional.none();\n const mapFrom = (a, f) => a !== undefined && a !== null ? Optional.some(f(a)) : Optional.none();\n const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n const addToEnd = (str, suffix) => {\n return str + suffix;\n };\n const removeFromStart = (str, numChars) => {\n return str.substring(numChars);\n };\n\n const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n const removeLeading = (str, prefix) => {\n return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;\n };\n const ensureTrailing = (str, suffix) => {\n return endsWith(str, suffix) ? str : addToEnd(str, suffix);\n };\n const contains$1 = (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$1 = blank(/^\\s+|\\s+$/g);\n const isNotEmpty = s => s.length > 0;\n const isEmpty = s => !isNotEmpty(s);\n\n const isSupported$1 = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n const fromHtml$2 = (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(div.childNodes[0]);\n };\n const fromTag = (tag, scope) => {\n const doc = scope || document;\n const node = doc.createElement(tag);\n return fromDom(node);\n };\n const fromText = (text, scope) => {\n const doc = scope || document;\n const node = doc.createTextNode(text);\n return fromDom(node);\n };\n const fromDom = 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 = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);\n const SugarElement = {\n fromHtml: fromHtml$2,\n fromTag,\n fromText,\n fromDom,\n fromPoint\n };\n\n const Global = typeof window !== 'undefined' ? window : Function('return this;')();\n\n const path$1 = (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 = (p, scope) => {\n const parts = p.split('.');\n return path$1(parts, scope);\n };\n\n const unsafe = (name, scope) => {\n return resolve(name, scope);\n };\n const getOrDie$1 = (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$1 = Object.getPrototypeOf;\n const sandHTMLElement = scope => {\n return getOrDie$1('HTMLElement', scope);\n };\n const isPrototypeOf = x => {\n const scope = resolve('ownerDocument.defaultView', x);\n return isObject(x) && (sandHTMLElement(scope).prototype.isPrototypeOf(x) || /^HTML\\w*Element$/.test(getPrototypeOf$1(x).constructor.name));\n };\n\n const DOCUMENT = 9;\n const DOCUMENT_FRAGMENT = 11;\n const ELEMENT = 1;\n const TEXT = 3;\n\n const name$3 = element => {\n const r = element.dom.nodeName;\n return r.toLowerCase();\n };\n const type$1 = element => element.dom.nodeType;\n const isType = t => element => type$1(element) === t;\n const isHTMLElement = element => isElement$1(element) && isPrototypeOf(element.dom);\n const isElement$1 = isType(ELEMENT);\n const isText = isType(TEXT);\n const isDocument = isType(DOCUMENT);\n const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n const isTag = tag => e => isElement$1(e) && name$3(e) === tag;\n\n const is = (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$3 = (selector, scope) => {\n const base = scope === undefined ? document : scope.dom;\n return bypassSelector(base) ? [] : map$2(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 = (e1, e2) => e1.dom === e2.dom;\n const contains = (e1, e2) => {\n const d1 = e1.dom;\n const d2 = e2.dom;\n return d1 === d2 ? false : d1.contains(d2);\n };\n\n const owner$4 = element => SugarElement.fromDom(element.dom.ownerDocument);\n const documentOrOwner = dos => isDocument(dos) ? dos : owner$4(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 parentNode = element => parent(element);\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 offsetParent = element => Optional.from(element.dom.offsetParent).map(SugarElement.fromDom);\n const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n const children = element => map$2(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 const spot = (element, offset) => ({\n element,\n offset\n });\n const leaf = (element, offset) => {\n const cs = children(element);\n return cs.length > 0 && offset < cs.length ? spot(cs[offset], 0) : spot(element, offset);\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 = constant$1(supported);\n const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;\n const getContentContainer = dos => isShadowRoot(dos) ? dos : SugarElement.fromDom(documentOrOwner(dos).dom.body);\n const isInShadowRoot = e => getShadowRoot(e).isSome();\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() && isNonNullable(event.target)) {\n const el = SugarElement.fromDom(event.target);\n if (isElement$1(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 = () => getBody(SugarElement.fromDom(document));\n const getBody = 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 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$9 = (element, key, value) => {\n rawSet(element.dom, key, value);\n };\n const setAll$1 = (element, attrs) => {\n const dom = element.dom;\n each(attrs, (v, k) => {\n rawSet(dom, k, v);\n });\n };\n const get$f = (element, key) => {\n const v = element.dom.getAttribute(key);\n return v === null ? undefined : v;\n };\n const getOpt = (element, key) => Optional.from(get$f(element, key));\n const has$1 = (element, key) => {\n const dom = element.dom;\n return dom && dom.hasAttribute ? dom.hasAttribute(key) : false;\n };\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 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$1(dom)) {\n dom.style.setProperty(property, value);\n }\n };\n const internalRemove = (dom, property) => {\n if (isSupported$1(dom)) {\n dom.style.removeProperty(property);\n }\n };\n const set$8 = (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(css, (v, k) => {\n internalSet(dom, k, v);\n });\n };\n const setOptions = (element, css) => {\n const dom = element.dom;\n each(css, (v, k) => {\n v.fold(() => {\n internalRemove(dom, k);\n }, value => {\n internalSet(dom, k, value);\n });\n });\n };\n const get$e = (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$1(dom) ? dom.style.getPropertyValue(property) : '';\n const getRaw = (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 getAllRaw = element => {\n const css = {};\n const dom = element.dom;\n if (isSupported$1(dom)) {\n for (let i = 0; i < dom.style.length; i++) {\n const ruleName = dom.style.item(i);\n css[ruleName] = dom.style[ruleName];\n }\n }\n return css;\n };\n const isValidValue$1 = (tag, property, value) => {\n const element = SugarElement.fromTag(tag);\n set$8(element, property, value);\n const style = getRaw(element, property);\n return style.isSome();\n };\n const remove$6 = (element, property) => {\n const dom = element.dom;\n internalRemove(dom, property);\n if (is$1(getOpt(element, 'style').map(trim$1), '')) {\n remove$7(element, 'style');\n }\n };\n const reflow = e => e.dom.offsetWidth;\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$1(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$e(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$e(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 api$2 = Dimension('height', element => {\n const dom = element.dom;\n return inBody(element) ? dom.getBoundingClientRect().height : dom.offsetHeight;\n });\n const get$d = element => api$2.get(element);\n const getOuter$2 = element => api$2.getOuter(element);\n const setMax$1 = (element, value) => {\n const inclusions = [\n 'margin-top',\n 'border-top-width',\n 'padding-top',\n 'padding-bottom',\n 'border-bottom-width',\n 'margin-bottom'\n ];\n const absMax = api$2.max(element, value, inclusions);\n set$8(element, 'max-height', absMax + 'px');\n };\n\n const r$1 = (left, top) => {\n const translate = (x, y) => r$1(left + x, top + y);\n return {\n left,\n top,\n translate\n };\n };\n const SugarPosition = r$1;\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$3 = 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$1(element).translate(scrollLeft - clientLeft, scrollTop - clientTop);\n };\n const viewport$1 = 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 api$1 = Dimension('width', element => element.dom.offsetWidth);\n const set$7 = (element, h) => api$1.set(element, h);\n const get$c = element => api$1.get(element);\n const getOuter$1 = element => api$1.getOuter(element);\n const setMax = (element, value) => {\n const inclusions = [\n 'margin-left',\n 'border-left-width',\n 'padding-left',\n 'padding-right',\n 'border-right-width',\n 'margin-right'\n ];\n const absMax = api$1.max(element, value, inclusions);\n set$8(element, 'max-width', absMax + 'px');\n };\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$1(isiPad),\n isiPhone: constant$1(isiPhone),\n isTablet: constant$1(isTablet),\n isPhone: constant$1(isPhone),\n isTouch: constant$1(isTouch),\n isAndroid: os.isAndroid,\n isiOS: os.isiOS,\n isWebView: constant$1(iOSwebview),\n isDesktop: constant$1(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$3 = (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$d(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$3();\n }\n return find$3(versionRegexes, cleanedAgent);\n };\n const unknown$3 = () => {\n return nu$d(0, 0);\n };\n const nu$d = (major, minor) => {\n return {\n major,\n minor\n };\n };\n const Version = {\n nu: nu$d,\n detect: detect$5,\n unknown: unknown$3\n };\n\n const detectBrowser$1 = (browsers, userAgentData) => {\n return findMap(userAgentData.brands, uaBrand => {\n const lcBrand = uaBrand.brand.toLowerCase();\n return find$5(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$5(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$1(uastring, target);\n };\n };\n const browsers = [\n {\n name: 'Edge',\n versionRegexes: [/.*?edge\\/ ?([0-9]+)\\.([0-9]+)$/],\n search: uastring => {\n return contains$1(uastring, 'edge/') && contains$1(uastring, 'chrome') && contains$1(uastring, 'safari') && contains$1(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$1(uastring, 'chrome') && !contains$1(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$1(uastring, 'msie') || contains$1(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$1(uastring, 'safari') || contains$1(uastring, 'mobile/')) && contains$1(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$1(uastring, 'iphone') || contains$1(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$1(browsers),\n oses: constant$1(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$2 = () => {\n return nu$c({\n current: undefined,\n version: Version.unknown()\n });\n };\n const nu$c = 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$2,\n nu: nu$c,\n edge: constant$1(edge),\n chromium: constant$1(chromium),\n ie: constant$1(ie),\n opera: constant$1(opera),\n firefox: constant$1(firefox),\n safari: constant$1(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$1 = () => {\n return nu$b({\n current: undefined,\n version: Version.unknown()\n });\n };\n const nu$b = 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: unknown$1,\n nu: nu$b,\n windows: constant$1(windows),\n ios: constant$1(ios),\n android: constant$1(android),\n linux: constant$1(linux),\n macos: constant$1(macos),\n solaris: constant$1(solaris),\n freebsd: constant$1(freebsd),\n chromeos: constant$1(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 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$2 = (element, event, filter, handler) => binder(element, event, filter, handler, false);\n const capture$1 = (element, event, filter, handler) => binder(element, event, filter, handler, true);\n const unbind = (element, event, handler, useCapture) => {\n element.dom.removeEventListener(event, handler, useCapture);\n };\n\n const before$1 = (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$2 = (marker, element) => {\n const sibling = nextSibling(marker);\n sibling.fold(() => {\n const parent$1 = parent(marker);\n parent$1.each(v => {\n append$2(v, element);\n });\n }, v => {\n before$1(v, element);\n });\n };\n const prepend$1 = (parent, element) => {\n const firstChild$1 = firstChild(parent);\n firstChild$1.fold(() => {\n append$2(parent, element);\n }, v => {\n parent.dom.insertBefore(element.dom, v.dom);\n });\n };\n const append$2 = (parent, element) => {\n parent.dom.appendChild(element.dom);\n };\n const appendAt = (parent, element, index) => {\n child$2(parent, index).fold(() => {\n append$2(parent, element);\n }, v => {\n before$1(v, element);\n });\n };\n\n const append$1 = (parent, elements) => {\n each$1(elements, x => {\n append$2(parent, x);\n });\n };\n\n const empty = element => {\n element.dom.textContent = '';\n each$1(children(element), rogue => {\n remove$5(rogue);\n });\n };\n const remove$5 = element => {\n const dom = element.dom;\n if (dom.parentNode !== null) {\n dom.parentNode.removeChild(dom);\n }\n };\n\n const get$b = _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 to = (x, y, _DOC) => {\n const doc = _DOC !== undefined ? _DOC.dom : document;\n const win = doc.defaultView;\n if (win) {\n win.scrollTo(x, y);\n }\n };\n\n const get$a = _win => {\n const win = _win === undefined ? window : _win;\n if (detect$2().browser.isFirefox()) {\n return Optional.none();\n } else {\n return Optional.from(win.visualViewport);\n }\n };\n const bounds$1 = (x, y, width, height) => ({\n x,\n y,\n width,\n height,\n right: x + width,\n bottom: y + height\n });\n const getBounds$3 = _win => {\n const win = _win === undefined ? window : _win;\n const doc = win.document;\n const scroll = get$b(SugarElement.fromDom(doc));\n return get$a(win).fold(() => {\n const html = win.document.documentElement;\n const width = html.clientWidth;\n const height = html.clientHeight;\n return bounds$1(scroll.left, scroll.top, width, height);\n }, visualViewport => bounds$1(Math.max(visualViewport.pageLeft, scroll.left), Math.max(visualViewport.pageTop, scroll.top), visualViewport.width, visualViewport.height));\n };\n\n const getDocument = () => SugarElement.fromDom(document);\n\n const walkUp = (navigation, doc) => {\n const frame = navigation.view(doc);\n return frame.fold(constant$1([]), f => {\n const parent = navigation.owner(f);\n const rest = walkUp(navigation, parent);\n return [f].concat(rest);\n });\n };\n const pathTo = (element, navigation) => {\n const d = navigation.owner(element);\n const paths = walkUp(navigation, d);\n return Optional.some(paths);\n };\n\n const view = doc => {\n var _a;\n const element = doc.dom === document ? Optional.none() : Optional.from((_a = doc.dom.defaultView) === null || _a === void 0 ? void 0 : _a.frameElement);\n return element.map(SugarElement.fromDom);\n };\n const owner$3 = element => owner$4(element);\n\n var Navigation = /*#__PURE__*/Object.freeze({\n __proto__: null,\n view: view,\n owner: owner$3\n });\n\n const find$2 = element => {\n const doc = getDocument();\n const scroll = get$b(doc);\n const path = pathTo(element, Navigation);\n return path.fold(curry(absolute$3, element), frames => {\n const offset = viewport$1(element);\n const r = foldr(frames, (b, a) => {\n const loc = viewport$1(a);\n return {\n left: b.left + loc.left,\n top: b.top + loc.top\n };\n }, {\n left: 0,\n top: 0\n });\n return SugarPosition(r.left + offset.left + scroll.left, r.top + offset.top + scroll.top);\n });\n };\n\n const pointed = (point, width, height) => ({\n point,\n width,\n height\n });\n const rect = (x, y, width, height) => ({\n x,\n y,\n width,\n height\n });\n const bounds = (x, y, width, height) => ({\n x,\n y,\n width,\n height,\n right: x + width,\n bottom: y + height\n });\n const box$1 = element => {\n const xy = absolute$3(element);\n const w = getOuter$1(element);\n const h = getOuter$2(element);\n return bounds(xy.left, xy.top, w, h);\n };\n const absolute$2 = element => {\n const position = find$2(element);\n const width = getOuter$1(element);\n const height = getOuter$2(element);\n return bounds(position.left, position.top, width, height);\n };\n const constrain = (original, constraint) => {\n const left = Math.max(original.x, constraint.x);\n const top = Math.max(original.y, constraint.y);\n const right = Math.min(original.right, constraint.right);\n const bottom = Math.min(original.bottom, constraint.bottom);\n const width = right - left;\n const height = bottom - top;\n return bounds(left, top, width, height);\n };\n const constrainByMany = (original, constraints) => {\n return foldl(constraints, (acc, c) => constrain(acc, c), original);\n };\n const win = () => getBounds$3(window);\n\n var global$a = tinymce.util.Tools.resolve('tinymce.ThemeManager');\n\n const value$4 = value => {\n const applyHelper = fn => fn(value);\n const constHelper = constant$1(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$1 = 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$1,\n orThunk: apply$1,\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$1(err), value$4);\n const Result = {\n value: value$4,\n error: error$1,\n fromOption\n };\n\n var SimpleResultType;\n (function (SimpleResultType) {\n SimpleResultType[SimpleResultType['Error'] = 0] = 'Error';\n SimpleResultType[SimpleResultType['Value'] = 1] = 'Value';\n }(SimpleResultType || (SimpleResultType = {})));\n const fold$1 = (res, onError, onValue) => res.stype === SimpleResultType.Error ? onError(res.serror) : onValue(res.svalue);\n const partition$2 = results => {\n const values = [];\n const errors = [];\n each$1(results, obj => {\n fold$1(obj, err => errors.push(err), val => values.push(val));\n });\n return {\n values,\n errors\n };\n };\n const mapError = (res, f) => {\n if (res.stype === SimpleResultType.Error) {\n return {\n stype: SimpleResultType.Error,\n serror: f(res.serror)\n };\n } else {\n return res;\n }\n };\n const map = (res, f) => {\n if (res.stype === SimpleResultType.Value) {\n return {\n stype: SimpleResultType.Value,\n svalue: f(res.svalue)\n };\n } else {\n return res;\n }\n };\n const bind$1 = (res, f) => {\n if (res.stype === SimpleResultType.Value) {\n return f(res.svalue);\n } else {\n return res;\n }\n };\n const bindError = (res, f) => {\n if (res.stype === SimpleResultType.Error) {\n return f(res.serror);\n } else {\n return res;\n }\n };\n const svalue = v => ({\n stype: SimpleResultType.Value,\n svalue: v\n });\n const serror = e => ({\n stype: SimpleResultType.Error,\n serror: e\n });\n const toResult$1 = res => fold$1(res, Result.error, Result.value);\n const fromResult$1 = res => res.fold(serror, svalue);\n const SimpleResult = {\n fromResult: fromResult$1,\n toResult: toResult$1,\n svalue,\n partition: partition$2,\n serror,\n bind: bind$1,\n bindError,\n map,\n mapError,\n fold: fold$1\n };\n\n const field$2 = (key, newKey, presence, prop) => ({\n tag: 'field',\n key,\n newKey,\n presence,\n prop\n });\n const customField$1 = (newKey, instantiator) => ({\n tag: 'custom',\n newKey,\n instantiator\n });\n const fold = (value, ifField, ifCustom) => {\n switch (value.tag) {\n case 'field':\n return ifField(value.key, value.newKey, value.presence, value.prop);\n case 'custom':\n return ifCustom(value.newKey, value.instantiator);\n }\n };\n\n const shallow$1 = (old, nu) => {\n return nu;\n };\n const deep$1 = (old, nu) => {\n const bothObjects = isPlainObject(old) && isPlainObject(nu);\n return bothObjects ? deepMerge(old, nu) : nu;\n };\n const baseMerge = merger => {\n return (...objects) => {\n if (objects.length === 0) {\n throw new Error(`Can't merge zero objects`);\n }\n const ret = {};\n for (let j = 0; j < objects.length; j++) {\n const curObject = objects[j];\n for (const key in curObject) {\n if (has$2(curObject, key)) {\n ret[key] = merger(ret[key], curObject[key]);\n }\n }\n }\n return ret;\n };\n };\n const deepMerge = baseMerge(deep$1);\n const merge$1 = baseMerge(shallow$1);\n\n const required$2 = () => ({\n tag: 'required',\n process: {}\n });\n const defaultedThunk = fallbackThunk => ({\n tag: 'defaultedThunk',\n process: fallbackThunk\n });\n const defaulted$1 = fallback => defaultedThunk(constant$1(fallback));\n const asOption = () => ({\n tag: 'option',\n process: {}\n });\n const mergeWithThunk = baseThunk => ({\n tag: 'mergeWithThunk',\n process: baseThunk\n });\n const mergeWith = base => mergeWithThunk(constant$1(base));\n\n const mergeValues$1 = (values, base) => values.length > 0 ? SimpleResult.svalue(deepMerge(base, merge$1.apply(undefined, values))) : SimpleResult.svalue(base);\n const mergeErrors$1 = errors => compose(SimpleResult.serror, flatten)(errors);\n const consolidateObj = (objects, base) => {\n const partition = SimpleResult.partition(objects);\n return partition.errors.length > 0 ? mergeErrors$1(partition.errors) : mergeValues$1(partition.values, base);\n };\n const consolidateArr = objects => {\n const partitions = SimpleResult.partition(objects);\n return partitions.errors.length > 0 ? mergeErrors$1(partitions.errors) : SimpleResult.svalue(partitions.values);\n };\n const ResultCombine = {\n consolidateObj,\n consolidateArr\n };\n\n const formatObj = input => {\n return isObject(input) && keys(input).length > 100 ? ' removed due to size' : JSON.stringify(input, null, 2);\n };\n const formatErrors = errors => {\n const es = errors.length > 10 ? errors.slice(0, 10).concat([{\n path: [],\n getErrorInfo: constant$1('... (only showing first ten failures)')\n }]) : errors;\n return map$2(es, e => {\n return 'Failed path: (' + e.path.join(' > ') + ')\\n' + e.getErrorInfo();\n });\n };\n\n const nu$a = (path, getErrorInfo) => {\n return SimpleResult.serror([{\n path,\n getErrorInfo\n }]);\n };\n const missingRequired = (path, key, obj) => nu$a(path, () => 'Could not find valid *required* value for \"' + key + '\" in ' + formatObj(obj));\n const missingKey = (path, key) => nu$a(path, () => 'Choice schema did not contain choice key: \"' + key + '\"');\n const missingBranch = (path, branches, branch) => nu$a(path, () => 'The chosen schema: \"' + branch + '\" did not exist in branches: ' + formatObj(branches));\n const unsupportedFields = (path, unsupported) => nu$a(path, () => 'There are unsupported fields: [' + unsupported.join(', ') + '] specified');\n const custom = (path, err) => nu$a(path, constant$1(err));\n\n const value$3 = validator => {\n const extract = (path, val) => {\n return SimpleResult.bindError(validator(val), err => custom(path, err));\n };\n const toString = constant$1('val');\n return {\n extract,\n toString\n };\n };\n const anyValue$1 = value$3(SimpleResult.svalue);\n\n const requiredAccess = (path, obj, key, bundle) => get$g(obj, key).fold(() => missingRequired(path, key, obj), bundle);\n const fallbackAccess = (obj, key, fallback, bundle) => {\n const v = get$g(obj, key).getOrThunk(() => fallback(obj));\n return bundle(v);\n };\n const optionAccess = (obj, key, bundle) => bundle(get$g(obj, key));\n const optionDefaultedAccess = (obj, key, fallback, bundle) => {\n const opt = get$g(obj, key).map(val => val === true ? fallback(obj) : val);\n return bundle(opt);\n };\n const extractField = (field, path, obj, key, prop) => {\n const bundle = av => prop.extract(path.concat([key]), av);\n const bundleAsOption = optValue => optValue.fold(() => SimpleResult.svalue(Optional.none()), ov => {\n const result = prop.extract(path.concat([key]), ov);\n return SimpleResult.map(result, Optional.some);\n });\n switch (field.tag) {\n case 'required':\n return requiredAccess(path, obj, key, bundle);\n case 'defaultedThunk':\n return fallbackAccess(obj, key, field.process, bundle);\n case 'option':\n return optionAccess(obj, key, bundleAsOption);\n case 'defaultedOptionThunk':\n return optionDefaultedAccess(obj, key, field.process, bundleAsOption);\n case 'mergeWithThunk': {\n return fallbackAccess(obj, key, constant$1({}), v => {\n const result = deepMerge(field.process(obj), v);\n return bundle(result);\n });\n }\n }\n };\n const extractFields = (path, obj, fields) => {\n const success = {};\n const errors = [];\n for (const field of fields) {\n fold(field, (key, newKey, presence, prop) => {\n const result = extractField(presence, path, obj, key, prop);\n SimpleResult.fold(result, err => {\n errors.push(...err);\n }, res => {\n success[newKey] = res;\n });\n }, (newKey, instantiator) => {\n success[newKey] = instantiator(obj);\n });\n }\n return errors.length > 0 ? SimpleResult.serror(errors) : SimpleResult.svalue(success);\n };\n const valueThunk = getDelegate => {\n const extract = (path, val) => getDelegate().extract(path, val);\n const toString = () => getDelegate().toString();\n return {\n extract,\n toString\n };\n };\n const getSetKeys = obj => keys(filter$1(obj, isNonNullable));\n const objOfOnly = fields => {\n const delegate = objOf(fields);\n const fieldNames = foldr(fields, (acc, value) => {\n return fold(value, key => deepMerge(acc, { [key]: true }), constant$1(acc));\n }, {});\n const extract = (path, o) => {\n const keys = isBoolean(o) ? [] : getSetKeys(o);\n const extra = filter$2(keys, k => !hasNonNullableKey(fieldNames, k));\n return extra.length === 0 ? delegate.extract(path, o) : unsupportedFields(path, extra);\n };\n return {\n extract,\n toString: delegate.toString\n };\n };\n const objOf = values => {\n const extract = (path, o) => extractFields(path, o, values);\n const toString = () => {\n const fieldStrings = map$2(values, value => fold(value, (key, _okey, _presence, prop) => key + ' -> ' + prop.toString(), (newKey, _instantiator) => 'state(' + newKey + ')'));\n return 'obj{\\n' + fieldStrings.join('\\n') + '}';\n };\n return {\n extract,\n toString\n };\n };\n const arrOf = prop => {\n const extract = (path, array) => {\n const results = map$2(array, (a, i) => prop.extract(path.concat(['[' + i + ']']), a));\n return ResultCombine.consolidateArr(results);\n };\n const toString = () => 'array(' + prop.toString() + ')';\n return {\n extract,\n toString\n };\n };\n const oneOf = (props, rawF) => {\n const f = rawF !== undefined ? rawF : identity;\n const extract = (path, val) => {\n const errors = [];\n for (const prop of props) {\n const res = prop.extract(path, val);\n if (res.stype === SimpleResultType.Value) {\n return {\n stype: SimpleResultType.Value,\n svalue: f(res.svalue)\n };\n }\n errors.push(res);\n }\n return ResultCombine.consolidateArr(errors);\n };\n const toString = () => 'oneOf(' + map$2(props, prop => prop.toString()).join(', ') + ')';\n return {\n extract,\n toString\n };\n };\n const setOf$1 = (validator, prop) => {\n const validateKeys = (path, keys) => arrOf(value$3(validator)).extract(path, keys);\n const extract = (path, o) => {\n const keys$1 = keys(o);\n const validatedKeys = validateKeys(path, keys$1);\n return SimpleResult.bind(validatedKeys, validKeys => {\n const schema = map$2(validKeys, vk => {\n return field$2(vk, vk, required$2(), prop);\n });\n return objOf(schema).extract(path, o);\n });\n };\n const toString = () => 'setOf(' + prop.toString() + ')';\n return {\n extract,\n toString\n };\n };\n const thunk = (_desc, processor) => {\n const getP = cached(processor);\n const extract = (path, val) => getP().extract(path, val);\n const toString = () => getP().toString();\n return {\n extract,\n toString\n };\n };\n const arrOfObj = compose(arrOf, objOf);\n\n const anyValue = constant$1(anyValue$1);\n const typedValue = (validator, expectedType) => value$3(a => {\n const actualType = typeof a;\n return validator(a) ? SimpleResult.svalue(a) : SimpleResult.serror(`Expected type: ${ expectedType } but got: ${ actualType }`);\n });\n const number = typedValue(isNumber, 'number');\n const string = typedValue(isString, 'string');\n const boolean = typedValue(isBoolean, 'boolean');\n const functionProcessor = typedValue(isFunction, 'function');\n const isPostMessageable = val => {\n if (Object(val) !== val) {\n return true;\n }\n switch ({}.toString.call(val).slice(8, -1)) {\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'RegExp':\n case 'Blob':\n case 'FileList':\n case 'ImageData':\n case 'ImageBitmap':\n case 'ArrayBuffer':\n return true;\n case 'Array':\n case 'Object':\n return Object.keys(val).every(prop => isPostMessageable(val[prop]));\n default:\n return false;\n }\n };\n const postMessageable = value$3(a => {\n if (isPostMessageable(a)) {\n return SimpleResult.svalue(a);\n } else {\n return SimpleResult.serror('Expected value to be acceptable for sending via postMessage');\n }\n });\n\n const chooseFrom = (path, input, branches, ch) => {\n const fields = get$g(branches, ch);\n return fields.fold(() => missingBranch(path, branches, ch), vp => vp.extract(path.concat(['branch: ' + ch]), input));\n };\n const choose$2 = (key, branches) => {\n const extract = (path, input) => {\n const choice = get$g(input, key);\n return choice.fold(() => missingKey(path, key), chosen => chooseFrom(path, input, branches, chosen));\n };\n const toString = () => 'chooseOn(' + key + '). Possible values: ' + keys(branches);\n return {\n extract,\n toString\n };\n };\n\n const arrOfVal = () => arrOf(anyValue$1);\n const valueOf = validator => value$3(v => validator(v).fold(SimpleResult.serror, SimpleResult.svalue));\n const setOf = (validator, prop) => setOf$1(v => SimpleResult.fromResult(validator(v)), prop);\n const extractValue = (label, prop, obj) => {\n const res = prop.extract([label], obj);\n return SimpleResult.mapError(res, errs => ({\n input: obj,\n errors: errs\n }));\n };\n const asRaw = (label, prop, obj) => SimpleResult.toResult(extractValue(label, prop, obj));\n const getOrDie = extraction => {\n return extraction.fold(errInfo => {\n throw new Error(formatError(errInfo));\n }, identity);\n };\n const asRawOrDie$1 = (label, prop, obj) => getOrDie(asRaw(label, prop, obj));\n const formatError = errInfo => {\n return 'Errors: \\n' + formatErrors(errInfo.errors).join('\\n') + '\\n\\nInput object: ' + formatObj(errInfo.input);\n };\n const choose$1 = (key, branches) => choose$2(key, map$1(branches, objOf));\n const thunkOf = (desc, schema) => thunk(desc, schema);\n\n const field$1 = field$2;\n const customField = customField$1;\n const validateEnum = values => valueOf(value => contains$2(values, value) ? Result.value(value) : Result.error(`Unsupported value: \"${ value }\", choose one of \"${ values.join(', ') }\".`));\n const required$1 = key => field$1(key, key, required$2(), anyValue());\n const requiredOf = (key, schema) => field$1(key, key, required$2(), schema);\n const requiredNumber = key => requiredOf(key, number);\n const requiredString = key => requiredOf(key, string);\n const requiredStringEnum = (key, values) => field$1(key, key, required$2(), validateEnum(values));\n const requiredBoolean = key => requiredOf(key, boolean);\n const requiredFunction = key => requiredOf(key, functionProcessor);\n const forbid = (key, message) => field$1(key, key, asOption(), value$3(_v => SimpleResult.serror('The field: ' + key + ' is forbidden. ' + message)));\n const requiredObjOf = (key, objSchema) => field$1(key, key, required$2(), objOf(objSchema));\n const requiredArrayOfObj = (key, objFields) => field$1(key, key, required$2(), arrOfObj(objFields));\n const requiredArrayOf = (key, schema) => field$1(key, key, required$2(), arrOf(schema));\n const option$3 = key => field$1(key, key, asOption(), anyValue());\n const optionOf = (key, schema) => field$1(key, key, asOption(), schema);\n const optionNumber = key => optionOf(key, number);\n const optionString = key => optionOf(key, string);\n const optionStringEnum = (key, values) => optionOf(key, validateEnum(values));\n const optionFunction = key => optionOf(key, functionProcessor);\n const optionArrayOf = (key, schema) => optionOf(key, arrOf(schema));\n const optionObjOf = (key, objSchema) => optionOf(key, objOf(objSchema));\n const optionObjOfOnly = (key, objSchema) => optionOf(key, objOfOnly(objSchema));\n const defaulted = (key, fallback) => field$1(key, key, defaulted$1(fallback), anyValue());\n const defaultedOf = (key, fallback, schema) => field$1(key, key, defaulted$1(fallback), schema);\n const defaultedNumber = (key, fallback) => defaultedOf(key, fallback, number);\n const defaultedString = (key, fallback) => defaultedOf(key, fallback, string);\n const defaultedStringEnum = (key, fallback, values) => defaultedOf(key, fallback, validateEnum(values));\n const defaultedBoolean = (key, fallback) => defaultedOf(key, fallback, boolean);\n const defaultedFunction = (key, fallback) => defaultedOf(key, fallback, functionProcessor);\n const defaultedPostMsg = (key, fallback) => defaultedOf(key, fallback, postMessageable);\n const defaultedArrayOf = (key, fallback, schema) => defaultedOf(key, fallback, arrOf(schema));\n const defaultedObjOf = (key, fallback, objSchema) => defaultedOf(key, fallback, objOf(objSchema));\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 generate$7 = 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$1(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: generate$7 };\n\n Adt.generate([\n {\n bothErrors: [\n 'error1',\n 'error2'\n ]\n },\n {\n firstError: [\n 'error1',\n 'value2'\n ]\n },\n {\n secondError: [\n 'value1',\n 'error2'\n ]\n },\n {\n bothValues: [\n 'value1',\n 'value2'\n ]\n }\n ]);\n const partition$1 = results => {\n const errors = [];\n const values = [];\n each$1(results, result => {\n result.fold(err => {\n errors.push(err);\n }, value => {\n values.push(value);\n });\n });\n return {\n errors,\n values\n };\n };\n\n const exclude$1 = (obj, fields) => {\n const r = {};\n each(obj, (v, k) => {\n if (!contains$2(fields, k)) {\n r[k] = v;\n }\n });\n return r;\n };\n\n const wrap$2 = (key, value) => ({ [key]: value });\n const wrapAll$1 = keyvalues => {\n const r = {};\n each$1(keyvalues, kv => {\n r[kv.key] = kv.value;\n });\n return r;\n };\n\n const exclude = (obj, fields) => exclude$1(obj, fields);\n const wrap$1 = (key, value) => wrap$2(key, value);\n const wrapAll = keyvalues => wrapAll$1(keyvalues);\n const mergeValues = (values, base) => {\n return values.length === 0 ? Result.value(base) : Result.value(deepMerge(base, merge$1.apply(undefined, values)));\n };\n const mergeErrors = errors => Result.error(flatten(errors));\n const consolidate = (objs, base) => {\n const partitions = partition$1(objs);\n return partitions.errors.length > 0 ? mergeErrors(partitions.errors) : mergeValues(partitions.values, base);\n };\n\n const ensureIsRoot = isRoot => isFunction(isRoot) ? isRoot : never;\n const ancestor$2 = (scope, transform, isRoot) => {\n let element = scope.dom;\n const stop = ensureIsRoot(isRoot);\n while (element.parentNode) {\n element = element.parentNode;\n const el = SugarElement.fromDom(element);\n const transformed = transform(el);\n if (transformed.isSome()) {\n return transformed;\n } else if (stop(el)) {\n break;\n }\n }\n return Optional.none();\n };\n const closest$4 = (scope, transform, isRoot) => {\n const current = transform(scope);\n const stop = ensureIsRoot(isRoot);\n return current.orThunk(() => stop(scope) ? Optional.none() : ancestor$2(scope, transform, stop));\n };\n\n const isSource = (component, simulatedEvent) => eq(component.element, simulatedEvent.event.target);\n\n const defaultEventHandler = {\n can: always,\n abort: never,\n run: noop\n };\n const nu$9 = parts => {\n if (!hasNonNullableKey(parts, 'can') && !hasNonNullableKey(parts, 'abort') && !hasNonNullableKey(parts, 'run')) {\n throw new Error('EventHandler defined by: ' + JSON.stringify(parts, null, 2) + ' does not have can, abort, or run!');\n }\n return {\n ...defaultEventHandler,\n ...parts\n };\n };\n const all$2 = (handlers, f) => (...args) => foldl(handlers, (acc, handler) => acc && f(handler).apply(undefined, args), true);\n const any = (handlers, f) => (...args) => foldl(handlers, (acc, handler) => acc || f(handler).apply(undefined, args), false);\n const read$2 = handler => isFunction(handler) ? {\n can: always,\n abort: never,\n run: handler\n } : handler;\n const fuse$1 = handlers => {\n const can = all$2(handlers, handler => handler.can);\n const abort = any(handlers, handler => handler.abort);\n const run = (...args) => {\n each$1(handlers, handler => {\n handler.run.apply(undefined, args);\n });\n };\n return {\n can,\n abort,\n run\n };\n };\n\n const constant = constant$1;\n const touchstart = constant('touchstart');\n const touchmove = constant('touchmove');\n const touchend = constant('touchend');\n const touchcancel = constant('touchcancel');\n const mousedown = constant('mousedown');\n const mousemove = constant('mousemove');\n const mouseout = constant('mouseout');\n const mouseup = constant('mouseup');\n const mouseover = constant('mouseover');\n const focusin = constant('focusin');\n const focusout = constant('focusout');\n const keydown = constant('keydown');\n const keyup = constant('keyup');\n const input = constant('input');\n const change = constant('change');\n const click = constant('click');\n const transitioncancel = constant('transitioncancel');\n const transitionend = constant('transitionend');\n const transitionstart = constant('transitionstart');\n const selectstart = constant('selectstart');\n\n const prefixName = name => constant$1('alloy.' + name);\n const alloy = { tap: prefixName('tap') };\n const focus$4 = prefixName('focus');\n const postBlur = prefixName('blur.post');\n const postPaste = prefixName('paste.post');\n const receive = prefixName('receive');\n const execute$5 = prefixName('execute');\n const focusItem = prefixName('focus.item');\n const tap = alloy.tap;\n const longpress = prefixName('longpress');\n const sandboxClose = prefixName('sandbox.close');\n const typeaheadCancel = prefixName('typeahead.cancel');\n const systemInit = prefixName('system.init');\n const documentTouchmove = prefixName('system.touchmove');\n const documentTouchend = prefixName('system.touchend');\n const windowScroll = prefixName('system.scroll');\n const windowResize = prefixName('system.resize');\n const attachedToDom = prefixName('system.attached');\n const detachedFromDom = prefixName('system.detached');\n const dismissRequested = prefixName('system.dismissRequested');\n const repositionRequested = prefixName('system.repositionRequested');\n const focusShifted = prefixName('focusmanager.shifted');\n const slotVisibility = prefixName('slotcontainer.visibility');\n const externalElementScroll = prefixName('system.external.element.scroll');\n const changeTab = prefixName('change.tab');\n const dismissTab = prefixName('dismiss.tab');\n const highlight$1 = prefixName('highlight');\n const dehighlight$1 = prefixName('dehighlight');\n\n const emit = (component, event) => {\n dispatchWith(component, component.element, event, {});\n };\n const emitWith = (component, event, properties) => {\n dispatchWith(component, component.element, event, properties);\n };\n const emitExecute = component => {\n emit(component, execute$5());\n };\n const dispatch = (component, target, event) => {\n dispatchWith(component, target, event, {});\n };\n const dispatchWith = (component, target, event, properties) => {\n const data = {\n target,\n ...properties\n };\n component.getSystem().triggerEvent(event, target, data);\n };\n const retargetAndDispatchWith = (component, target, eventName, properties) => {\n const data = {\n ...properties,\n target\n };\n component.getSystem().triggerEvent(eventName, target, data);\n };\n const dispatchEvent = (component, target, event, simulatedEvent) => {\n component.getSystem().triggerEvent(event, target, simulatedEvent.event);\n };\n\n const derive$2 = configs => wrapAll(configs);\n const abort = (name, predicate) => {\n return {\n key: name,\n value: nu$9({ abort: predicate })\n };\n };\n const can = (name, predicate) => {\n return {\n key: name,\n value: nu$9({ can: predicate })\n };\n };\n const preventDefault = name => {\n return {\n key: name,\n value: nu$9({\n run: (component, simulatedEvent) => {\n simulatedEvent.event.prevent();\n }\n })\n };\n };\n const run$1 = (name, handler) => {\n return {\n key: name,\n value: nu$9({ run: handler })\n };\n };\n const runActionExtra = (name, action, extra) => {\n return {\n key: name,\n value: nu$9({\n run: (component, simulatedEvent) => {\n action.apply(undefined, [\n component,\n simulatedEvent\n ].concat(extra));\n }\n })\n };\n };\n const runOnName = name => {\n return handler => run$1(name, handler);\n };\n const runOnSourceName = name => {\n return handler => ({\n key: name,\n value: nu$9({\n run: (component, simulatedEvent) => {\n if (isSource(component, simulatedEvent)) {\n handler(component, simulatedEvent);\n }\n }\n })\n });\n };\n const redirectToUid = (name, uid) => {\n return run$1(name, (component, simulatedEvent) => {\n component.getSystem().getByUid(uid).each(redirectee => {\n dispatchEvent(redirectee, redirectee.element, name, simulatedEvent);\n });\n });\n };\n const redirectToPart = (name, detail, partName) => {\n const uid = detail.partUids[partName];\n return redirectToUid(name, uid);\n };\n const runWithTarget = (name, f) => {\n return run$1(name, (component, simulatedEvent) => {\n const ev = simulatedEvent.event;\n const target = component.getSystem().getByDom(ev.target).getOrThunk(() => {\n const closest = closest$4(ev.target, el => component.getSystem().getByDom(el).toOptional(), never);\n return closest.getOr(component);\n });\n f(component, target, simulatedEvent);\n });\n };\n const cutter = name => {\n return run$1(name, (component, simulatedEvent) => {\n simulatedEvent.cut();\n });\n };\n const stopper = name => {\n return run$1(name, (component, simulatedEvent) => {\n simulatedEvent.stop();\n });\n };\n const runOnSource = (name, f) => {\n return runOnSourceName(name)(f);\n };\n const runOnAttached = runOnSourceName(attachedToDom());\n const runOnDetached = runOnSourceName(detachedFromDom());\n const runOnInit = runOnSourceName(systemInit());\n const runOnExecute$1 = runOnName(execute$5());\n\n const fromHtml$1 = (html, scope) => {\n const doc = scope || document;\n const div = doc.createElement('div');\n div.innerHTML = html;\n return children(SugarElement.fromDom(div));\n };\n\n const get$9 = element => element.dom.innerHTML;\n const set$6 = (element, content) => {\n const owner = owner$4(element);\n const docDom = owner.dom;\n const fragment = SugarElement.fromDom(docDom.createDocumentFragment());\n const contentElements = fromHtml$1(content, docDom);\n append$1(fragment, contentElements);\n empty(element);\n append$2(element, fragment);\n };\n const getOuter = element => {\n const container = SugarElement.fromTag('div');\n const clone = SugarElement.fromDom(element.dom.cloneNode(true));\n append$2(container, clone);\n return get$9(container);\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\n const getHtml = element => {\n if (isShadowRoot(element)) {\n return '#shadow-root';\n } else {\n const clone = shallow(element);\n return getOuter(clone);\n }\n };\n\n const element = elem => getHtml(elem);\n\n const isRecursive = (component, originator, target) => eq(originator, component.element) && !eq(originator, target);\n const events$i = derive$2([can(focus$4(), (component, simulatedEvent) => {\n const event = simulatedEvent.event;\n const originator = event.originator;\n const target = event.target;\n if (isRecursive(component, originator, target)) {\n console.warn(focus$4() + ' did not get interpreted by the desired target. ' + '\\nOriginator: ' + element(originator) + '\\nTarget: ' + element(target) + '\\nCheck the ' + focus$4() + ' event handlers');\n return false;\n } else {\n return true;\n }\n })]);\n\n var DefaultEvents = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$i\n });\n\n let unique = 0;\n const generate$6 = prefix => {\n const date = new Date();\n const time = date.getTime();\n const random = Math.floor(Math.random() * 1000000000);\n unique++;\n return prefix + '_' + random + unique + String(time);\n };\n\n const prefix$1 = constant$1('alloy-id-');\n const idAttr$1 = constant$1('data-alloy-id');\n\n const prefix = prefix$1();\n const idAttr = idAttr$1();\n const write = (label, elem) => {\n const id = generate$6(prefix + label);\n writeOnly(elem, id);\n return id;\n };\n const writeOnly = (elem, uid) => {\n Object.defineProperty(elem.dom, idAttr, {\n value: uid,\n writable: true\n });\n };\n const read$1 = elem => {\n const id = isElement$1(elem) ? elem.dom[idAttr] : null;\n return Optional.from(id);\n };\n const generate$5 = prefix => generate$6(prefix);\n\n const make$8 = identity;\n\n const NoContextApi = getComp => {\n const getMessage = event => `The component must be in a context to execute: ${ event }` + (getComp ? '\\n' + element(getComp().element) + ' is not in context.' : '');\n const fail = event => () => {\n throw new Error(getMessage(event));\n };\n const warn = event => () => {\n console.warn(getMessage(event));\n };\n return {\n debugInfo: constant$1('fake'),\n triggerEvent: warn('triggerEvent'),\n triggerFocus: warn('triggerFocus'),\n triggerEscape: warn('triggerEscape'),\n broadcast: warn('broadcast'),\n broadcastOn: warn('broadcastOn'),\n broadcastEvent: warn('broadcastEvent'),\n build: fail('build'),\n buildOrPatch: fail('buildOrPatch'),\n addToWorld: fail('addToWorld'),\n removeFromWorld: fail('removeFromWorld'),\n addToGui: fail('addToGui'),\n removeFromGui: fail('removeFromGui'),\n getByUid: fail('getByUid'),\n getByDom: fail('getByDom'),\n isConnected: never\n };\n };\n const singleton$1 = NoContextApi();\n\n const markAsBehaviourApi = (f, apiName, apiFunction) => {\n const delegate = apiFunction.toString();\n const endIndex = delegate.indexOf(')') + 1;\n const openBracketIndex = delegate.indexOf('(');\n const parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\\s*/);\n f.toFunctionAnnotation = () => ({\n name: apiName,\n parameters: cleanParameters(parameters.slice(0, 1).concat(parameters.slice(3)))\n });\n return f;\n };\n const cleanParameters = parameters => map$2(parameters, p => endsWith(p, '/*') ? p.substring(0, p.length - '/*'.length) : p);\n const markAsExtraApi = (f, extraName) => {\n const delegate = f.toString();\n const endIndex = delegate.indexOf(')') + 1;\n const openBracketIndex = delegate.indexOf('(');\n const parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\\s*/);\n f.toFunctionAnnotation = () => ({\n name: extraName,\n parameters: cleanParameters(parameters)\n });\n return f;\n };\n const markAsSketchApi = (f, apiFunction) => {\n const delegate = apiFunction.toString();\n const endIndex = delegate.indexOf(')') + 1;\n const openBracketIndex = delegate.indexOf('(');\n const parameters = delegate.substring(openBracketIndex + 1, endIndex - 1).split(/,\\s*/);\n f.toFunctionAnnotation = () => ({\n name: 'OVERRIDE',\n parameters: cleanParameters(parameters.slice(1))\n });\n return f;\n };\n\n const premadeTag = generate$6('alloy-premade');\n const premade$1 = comp => {\n Object.defineProperty(comp.element.dom, premadeTag, {\n value: comp.uid,\n writable: true\n });\n return wrap$1(premadeTag, comp);\n };\n const isPremade = element => has$2(element.dom, premadeTag);\n const getPremade = spec => get$g(spec, premadeTag);\n const makeApi = f => markAsSketchApi((component, ...rest) => f(component.getApis(), component, ...rest), f);\n\n const NoState = { init: () => nu$8({ readState: constant$1('No State required') }) };\n const nu$8 = spec => spec;\n\n const generateFrom$1 = (spec, all) => {\n const schema = map$2(all, a => optionObjOf(a.name(), [\n required$1('config'),\n defaulted('state', NoState)\n ]));\n const validated = asRaw('component.behaviours', objOf(schema), spec.behaviours).fold(errInfo => {\n throw new Error(formatError(errInfo) + '\\nComplete spec:\\n' + JSON.stringify(spec, null, 2));\n }, identity);\n return {\n list: all,\n data: map$1(validated, optBlobThunk => {\n const output = optBlobThunk.map(blob => ({\n config: blob.config,\n state: blob.state.init(blob.config)\n }));\n return constant$1(output);\n })\n };\n };\n const getBehaviours$3 = bData => bData.list;\n const getData$2 = bData => bData.data;\n\n const byInnerKey = (data, tuple) => {\n const r = {};\n each(data, (detail, key) => {\n each(detail, (value, indexKey) => {\n const chain = get$g(r, indexKey).getOr([]);\n r[indexKey] = chain.concat([tuple(key, value)]);\n });\n });\n return r;\n };\n\n const nu$7 = s => ({\n classes: isUndefined(s.classes) ? [] : s.classes,\n attributes: isUndefined(s.attributes) ? {} : s.attributes,\n styles: isUndefined(s.styles) ? {} : s.styles\n });\n const merge = (defnA, mod) => ({\n ...defnA,\n attributes: {\n ...defnA.attributes,\n ...mod.attributes\n },\n styles: {\n ...defnA.styles,\n ...mod.styles\n },\n classes: defnA.classes.concat(mod.classes)\n });\n\n const combine$2 = (info, baseMod, behaviours, base) => {\n const modsByBehaviour = { ...baseMod };\n each$1(behaviours, behaviour => {\n modsByBehaviour[behaviour.name()] = behaviour.exhibit(info, base);\n });\n const byAspect = byInnerKey(modsByBehaviour, (name, modification) => ({\n name,\n modification\n }));\n const combineObjects = objects => foldr(objects, (b, a) => ({\n ...a.modification,\n ...b\n }), {});\n const combinedClasses = foldr(byAspect.classes, (b, a) => a.modification.concat(b), []);\n const combinedAttributes = combineObjects(byAspect.attributes);\n const combinedStyles = combineObjects(byAspect.styles);\n return nu$7({\n classes: combinedClasses,\n attributes: combinedAttributes,\n styles: combinedStyles\n });\n };\n\n const sortKeys = (label, keyName, array, order) => {\n try {\n const sorted = sort(array, (a, b) => {\n const aKey = a[keyName];\n const bKey = b[keyName];\n const aIndex = order.indexOf(aKey);\n const bIndex = order.indexOf(bKey);\n if (aIndex === -1) {\n throw new Error('The ordering for ' + label + ' does not have an entry for ' + aKey + '.\\nOrder specified: ' + JSON.stringify(order, null, 2));\n }\n if (bIndex === -1) {\n throw new Error('The ordering for ' + label + ' does not have an entry for ' + bKey + '.\\nOrder specified: ' + JSON.stringify(order, null, 2));\n }\n if (aIndex < bIndex) {\n return -1;\n } else if (bIndex < aIndex) {\n return 1;\n } else {\n return 0;\n }\n });\n return Result.value(sorted);\n } catch (err) {\n return Result.error([err]);\n }\n };\n\n const uncurried = (handler, purpose) => ({\n handler,\n purpose\n });\n const curried = (handler, purpose) => ({\n cHandler: handler,\n purpose\n });\n const curryArgs = (descHandler, extraArgs) => curried(curry.apply(undefined, [descHandler.handler].concat(extraArgs)), descHandler.purpose);\n const getCurried = descHandler => descHandler.cHandler;\n\n const behaviourTuple = (name, handler) => ({\n name,\n handler\n });\n const nameToHandlers = (behaviours, info) => {\n const r = {};\n each$1(behaviours, behaviour => {\n r[behaviour.name()] = behaviour.handlers(info);\n });\n return r;\n };\n const groupByEvents = (info, behaviours, base) => {\n const behaviourEvents = {\n ...base,\n ...nameToHandlers(behaviours, info)\n };\n return byInnerKey(behaviourEvents, behaviourTuple);\n };\n const combine$1 = (info, eventOrder, behaviours, base) => {\n const byEventName = groupByEvents(info, behaviours, base);\n return combineGroups(byEventName, eventOrder);\n };\n const assemble = rawHandler => {\n const handler = read$2(rawHandler);\n return (component, simulatedEvent, ...rest) => {\n const args = [\n component,\n simulatedEvent\n ].concat(rest);\n if (handler.abort.apply(undefined, args)) {\n simulatedEvent.stop();\n } else if (handler.can.apply(undefined, args)) {\n handler.run.apply(undefined, args);\n }\n };\n };\n const missingOrderError = (eventName, tuples) => Result.error(['The event (' + eventName + ') has more than one behaviour that listens to it.\\nWhen this occurs, you must ' + 'specify an event ordering for the behaviours in your spec (e.g. [ \"listing\", \"toggling\" ]).\\nThe behaviours that ' + 'can trigger it are: ' + JSON.stringify(map$2(tuples, c => c.name), null, 2)]);\n const fuse = (tuples, eventOrder, eventName) => {\n const order = eventOrder[eventName];\n if (!order) {\n return missingOrderError(eventName, tuples);\n } else {\n return sortKeys('Event: ' + eventName, 'name', tuples, order).map(sortedTuples => {\n const handlers = map$2(sortedTuples, tuple => tuple.handler);\n return fuse$1(handlers);\n });\n }\n };\n const combineGroups = (byEventName, eventOrder) => {\n const r = mapToArray(byEventName, (tuples, eventName) => {\n const combined = tuples.length === 1 ? Result.value(tuples[0].handler) : fuse(tuples, eventOrder, eventName);\n return combined.map(handler => {\n const assembled = assemble(handler);\n const purpose = tuples.length > 1 ? filter$2(eventOrder[eventName], o => exists(tuples, t => t.name === o)).join(' > ') : tuples[0].name;\n return wrap$1(eventName, uncurried(assembled, purpose));\n });\n });\n return consolidate(r, {});\n };\n\n const baseBehaviour = 'alloy.base.behaviour';\n const schema$z = objOf([\n field$1('dom', 'dom', required$2(), objOf([\n required$1('tag'),\n defaulted('styles', {}),\n defaulted('classes', []),\n defaulted('attributes', {}),\n option$3('value'),\n option$3('innerHtml')\n ])),\n required$1('components'),\n required$1('uid'),\n defaulted('events', {}),\n defaulted('apis', {}),\n field$1('eventOrder', 'eventOrder', mergeWith({\n [execute$5()]: [\n 'disabling',\n baseBehaviour,\n 'toggling',\n 'typeaheadevents'\n ],\n [focus$4()]: [\n baseBehaviour,\n 'focusing',\n 'keying'\n ],\n [systemInit()]: [\n baseBehaviour,\n 'disabling',\n 'toggling',\n 'representing'\n ],\n [input()]: [\n baseBehaviour,\n 'representing',\n 'streaming',\n 'invalidating'\n ],\n [detachedFromDom()]: [\n baseBehaviour,\n 'representing',\n 'item-events',\n 'tooltipping'\n ],\n [mousedown()]: [\n 'focusing',\n baseBehaviour,\n 'item-type-events'\n ],\n [touchstart()]: [\n 'focusing',\n baseBehaviour,\n 'item-type-events'\n ],\n [mouseover()]: [\n 'item-type-events',\n 'tooltipping'\n ],\n [receive()]: [\n 'receiving',\n 'reflecting',\n 'tooltipping'\n ]\n }), anyValue()),\n option$3('domModification')\n ]);\n const toInfo = spec => asRaw('custom.definition', schema$z, spec);\n const toDefinition = detail => ({\n ...detail.dom,\n uid: detail.uid,\n domChildren: map$2(detail.components, comp => comp.element)\n });\n const toModification = detail => detail.domModification.fold(() => nu$7({}), nu$7);\n const toEvents = info => info.events;\n\n const read = (element, attr) => {\n const value = get$f(element, attr);\n return value === undefined || value === '' ? [] : value.split(' ');\n };\n const add$4 = (element, attr, id) => {\n const old = read(element, attr);\n const nu = old.concat([id]);\n set$9(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$9(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$8 = element => read(element, 'class');\n const add$3 = (element, clazz) => add$4(element, 'class', clazz);\n const remove$3 = (element, clazz) => remove$4(element, 'class', clazz);\n const toggle$5 = (element, clazz) => {\n if (contains$2(get$8(element), clazz)) {\n return remove$3(element, clazz);\n } else {\n return add$3(element, clazz);\n }\n };\n\n const add$2 = (element, clazz) => {\n if (supports(element)) {\n element.dom.classList.add(clazz);\n } else {\n add$3(element, clazz);\n }\n };\n const cleanClass = element => {\n const classList = supports(element) ? element.dom.classList : get$8(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 toggle$4 = (element, clazz) => {\n const result = supports(element) ? element.dom.classList.toggle(clazz) : toggle$5(element, clazz);\n cleanClass(element);\n return result;\n };\n const has = (element, clazz) => supports(element) && element.dom.classList.contains(clazz);\n\n const add$1 = (element, classes) => {\n each$1(classes, x => {\n add$2(element, x);\n });\n };\n const remove$1 = (element, classes) => {\n each$1(classes, x => {\n remove$2(element, x);\n });\n };\n const toggle$3 = (element, classes) => {\n each$1(classes, x => {\n toggle$4(element, x);\n });\n };\n const hasAll = (element, classes) => forall(classes, clazz => has(element, clazz));\n const getNative = element => {\n const classList = element.dom.classList;\n const r = new Array(classList.length);\n for (let i = 0; i < classList.length; i++) {\n const item = classList.item(i);\n if (item !== null) {\n r[i] = item;\n }\n }\n return r;\n };\n const get$7 = element => supports(element) ? getNative(element) : get$8(element);\n\n const get$6 = element => element.dom.value;\n const set$5 = (element, value) => {\n if (value === undefined) {\n throw new Error('Value.set was undefined');\n }\n element.dom.value = value;\n };\n\n const determineObsoleted = (parent, index, oldObsoleted) => {\n const newObsoleted = child$2(parent, index);\n return newObsoleted.map(newObs => {\n const elemChanged = oldObsoleted.exists(o => !eq(o, newObs));\n if (elemChanged) {\n const oldTag = oldObsoleted.map(name$3).getOr('span');\n const marker = SugarElement.fromTag(oldTag);\n before$1(newObs, marker);\n return marker;\n } else {\n return newObs;\n }\n });\n };\n const ensureInDom = (parent, child, obsoleted) => {\n obsoleted.fold(() => append$2(parent, child), obs => {\n if (!eq(obs, child)) {\n before$1(obs, child);\n remove$5(obs);\n }\n });\n };\n const patchChildrenWith = (parent, nu, f) => {\n const builtChildren = map$2(nu, f);\n const currentChildren = children(parent);\n each$1(currentChildren.slice(builtChildren.length), remove$5);\n return builtChildren;\n };\n const patchSpecChild = (parent, index, spec, build) => {\n const oldObsoleted = child$2(parent, index);\n const childComp = build(spec, oldObsoleted);\n const obsoleted = determineObsoleted(parent, index, oldObsoleted);\n ensureInDom(parent, childComp.element, obsoleted);\n return childComp;\n };\n const patchSpecChildren = (parent, specs, build) => patchChildrenWith(parent, specs, (spec, index) => patchSpecChild(parent, index, spec, build));\n const patchDomChildren = (parent, nodes) => patchChildrenWith(parent, nodes, (node, index) => {\n const optObsoleted = child$2(parent, index);\n ensureInDom(parent, node, optObsoleted);\n return node;\n });\n\n const diffKeyValueSet = (newObj, oldObj) => {\n const newKeys = keys(newObj);\n const oldKeys = keys(oldObj);\n const toRemove = difference(oldKeys, newKeys);\n const toSet = bifilter(newObj, (v, k) => {\n return !has$2(oldObj, k) || v !== oldObj[k];\n }).t;\n return {\n toRemove,\n toSet\n };\n };\n const reconcileToDom = (definition, obsoleted) => {\n const {\n class: clazz,\n style,\n ...existingAttributes\n } = clone$2(obsoleted);\n const {\n toSet: attrsToSet,\n toRemove: attrsToRemove\n } = diffKeyValueSet(definition.attributes, existingAttributes);\n const updateAttrs = () => {\n each$1(attrsToRemove, a => remove$7(obsoleted, a));\n setAll$1(obsoleted, attrsToSet);\n };\n const existingStyles = getAllRaw(obsoleted);\n const {\n toSet: stylesToSet,\n toRemove: stylesToRemove\n } = diffKeyValueSet(definition.styles, existingStyles);\n const updateStyles = () => {\n each$1(stylesToRemove, s => remove$6(obsoleted, s));\n setAll(obsoleted, stylesToSet);\n };\n const existingClasses = get$7(obsoleted);\n const classesToRemove = difference(existingClasses, definition.classes);\n const classesToAdd = difference(definition.classes, existingClasses);\n const updateClasses = () => {\n add$1(obsoleted, classesToAdd);\n remove$1(obsoleted, classesToRemove);\n };\n const updateHtml = html => {\n set$6(obsoleted, html);\n };\n const updateChildren = () => {\n const children = definition.domChildren;\n patchDomChildren(obsoleted, children);\n };\n const updateValue = () => {\n const valueElement = obsoleted;\n const value = definition.value.getOrUndefined();\n if (value !== get$6(valueElement)) {\n set$5(valueElement, value !== null && value !== void 0 ? value : '');\n }\n };\n updateAttrs();\n updateClasses();\n updateStyles();\n definition.innerHtml.fold(updateChildren, updateHtml);\n updateValue();\n return obsoleted;\n };\n\n const introduceToDom = definition => {\n const subject = SugarElement.fromTag(definition.tag);\n setAll$1(subject, definition.attributes);\n add$1(subject, definition.classes);\n setAll(subject, definition.styles);\n definition.innerHtml.each(html => set$6(subject, html));\n const children = definition.domChildren;\n append$1(subject, children);\n definition.value.each(value => {\n set$5(subject, value);\n });\n return subject;\n };\n const attemptPatch = (definition, obsoleted) => {\n try {\n const e = reconcileToDom(definition, obsoleted);\n return Optional.some(e);\n } catch (err) {\n return Optional.none();\n }\n };\n const hasMixedChildren = definition => definition.innerHtml.isSome() && definition.domChildren.length > 0;\n const renderToDom = (definition, optObsoleted) => {\n const canBePatched = candidate => name$3(candidate) === definition.tag && !hasMixedChildren(definition) && !isPremade(candidate);\n const elem = optObsoleted.filter(canBePatched).bind(obsoleted => attemptPatch(definition, obsoleted)).getOrThunk(() => introduceToDom(definition));\n writeOnly(elem, definition.uid);\n return elem;\n };\n\n const getBehaviours$2 = spec => {\n const behaviours = get$g(spec, 'behaviours').getOr({});\n return bind$3(keys(behaviours), name => {\n const behaviour = behaviours[name];\n return isNonNullable(behaviour) ? [behaviour.me] : [];\n });\n };\n const generateFrom = (spec, all) => generateFrom$1(spec, all);\n const generate$4 = spec => {\n const all = getBehaviours$2(spec);\n return generateFrom(spec, all);\n };\n\n const getDomDefinition = (info, bList, bData) => {\n const definition = toDefinition(info);\n const infoModification = toModification(info);\n const baseModification = { 'alloy.base.modification': infoModification };\n const modification = bList.length > 0 ? combine$2(bData, baseModification, bList, definition) : infoModification;\n return merge(definition, modification);\n };\n const getEvents = (info, bList, bData) => {\n const baseEvents = { 'alloy.base.behaviour': toEvents(info) };\n return combine$1(bData, info.eventOrder, bList, baseEvents).getOrDie();\n };\n const build$2 = (spec, obsoleted) => {\n const getMe = () => me;\n const systemApi = Cell(singleton$1);\n const info = getOrDie(toInfo(spec));\n const bBlob = generate$4(spec);\n const bList = getBehaviours$3(bBlob);\n const bData = getData$2(bBlob);\n const modDefinition = getDomDefinition(info, bList, bData);\n const item = renderToDom(modDefinition, obsoleted);\n const events = getEvents(info, bList, bData);\n const subcomponents = Cell(info.components);\n const connect = newApi => {\n systemApi.set(newApi);\n };\n const disconnect = () => {\n systemApi.set(NoContextApi(getMe));\n };\n const syncComponents = () => {\n const children$1 = children(item);\n const subs = bind$3(children$1, child => systemApi.get().getByDom(child).fold(() => [], pure$2));\n subcomponents.set(subs);\n };\n const config = behaviour => {\n const b = bData;\n const f = isFunction(b[behaviour.name()]) ? b[behaviour.name()] : () => {\n throw new Error('Could not find ' + behaviour.name() + ' in ' + JSON.stringify(spec, null, 2));\n };\n return f();\n };\n const hasConfigured = behaviour => isFunction(bData[behaviour.name()]);\n const getApis = () => info.apis;\n const readState = behaviourName => bData[behaviourName]().map(b => b.state.readState()).getOr('not enabled');\n const me = {\n uid: spec.uid,\n getSystem: systemApi.get,\n config,\n hasConfigured,\n spec,\n readState,\n getApis,\n connect,\n disconnect,\n element: item,\n syncComponents,\n components: subcomponents.get,\n events\n };\n return me;\n };\n\n const buildSubcomponents = (spec, obsoleted) => {\n const components = get$g(spec, 'components').getOr([]);\n return obsoleted.fold(() => map$2(components, build$1), obs => map$2(components, (c, i) => {\n return buildOrPatch(c, child$2(obs, i));\n }));\n };\n const buildFromSpec = (userSpec, obsoleted) => {\n const {\n events: specEvents,\n ...spec\n } = make$8(userSpec);\n const components = buildSubcomponents(spec, obsoleted);\n const completeSpec = {\n ...spec,\n events: {\n ...DefaultEvents,\n ...specEvents\n },\n components\n };\n return Result.value(build$2(completeSpec, obsoleted));\n };\n const text$2 = textContent => {\n const element = SugarElement.fromText(textContent);\n return external$1({ element });\n };\n const external$1 = spec => {\n const extSpec = asRawOrDie$1('external.component', objOfOnly([\n required$1('element'),\n option$3('uid')\n ]), spec);\n const systemApi = Cell(NoContextApi());\n const connect = newApi => {\n systemApi.set(newApi);\n };\n const disconnect = () => {\n systemApi.set(NoContextApi(() => me));\n };\n const uid = extSpec.uid.getOrThunk(() => generate$5('external'));\n writeOnly(extSpec.element, uid);\n const me = {\n uid,\n getSystem: systemApi.get,\n config: Optional.none,\n hasConfigured: never,\n connect,\n disconnect,\n getApis: () => ({}),\n element: extSpec.element,\n spec,\n readState: constant$1('No state'),\n syncComponents: noop,\n components: constant$1([]),\n events: {}\n };\n return premade$1(me);\n };\n const uids = generate$5;\n const isSketchSpec$1 = spec => has$2(spec, 'uid');\n const buildOrPatch = (spec, obsoleted) => getPremade(spec).getOrThunk(() => {\n const userSpecWithUid = isSketchSpec$1(spec) ? spec : {\n uid: uids(''),\n ...spec\n };\n return buildFromSpec(userSpecWithUid, obsoleted).getOrDie();\n });\n const build$1 = spec => buildOrPatch(spec, Optional.none());\n const premade = premade$1;\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$1 = (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$3 = (scope, predicate, isRoot) => {\n const is = (s, test) => test(s);\n return ClosestOrAncestor(is, ancestor$1, scope, predicate, isRoot);\n };\n const child$1 = (scope, predicate) => {\n const pred = node => predicate(SugarElement.fromDom(node));\n const result = find$5(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 closest$2 = (scope, predicate, isRoot) => closest$3(scope, predicate, isRoot).isSome();\n\n const ancestor = (scope, selector, isRoot) => ancestor$1(scope, e => is(e, selector), isRoot);\n const child = (scope, selector) => child$1(scope, e => is(e, selector));\n const descendant = (scope, selector) => one(selector, scope);\n const closest$1 = (scope, selector, isRoot) => {\n const is$1 = (element, selector) => is(element, selector);\n return ClosestOrAncestor(is$1, ancestor, scope, selector, isRoot);\n };\n\n const attribute = 'aria-controls';\n const find$1 = queryElem => {\n const dependent = closest$3(queryElem, elem => {\n if (!isElement$1(elem)) {\n return false;\n }\n const id = get$f(elem, 'id');\n return id !== undefined && id.indexOf(attribute) > -1;\n });\n return dependent.bind(dep => {\n const id = get$f(dep, 'id');\n const dos = getRootNode(dep);\n return descendant(dos, `[${ attribute }=\"${ id }\"]`);\n });\n };\n const manager = () => {\n const ariaId = generate$6(attribute);\n const link = elem => {\n set$9(elem, attribute, ariaId);\n };\n const unlink = elem => {\n remove$7(elem, attribute);\n };\n return {\n id: ariaId,\n link,\n unlink\n };\n };\n\n const isAriaPartOf = (component, queryElem) => find$1(queryElem).exists(owner => isPartOf$1(component, owner));\n const isPartOf$1 = (component, queryElem) => closest$2(queryElem, el => eq(el, component.element), never) || isAriaPartOf(component, queryElem);\n\n const unknown = 'unknown';\n var EventConfiguration;\n (function (EventConfiguration) {\n EventConfiguration[EventConfiguration['STOP'] = 0] = 'STOP';\n EventConfiguration[EventConfiguration['NORMAL'] = 1] = 'NORMAL';\n EventConfiguration[EventConfiguration['LOGGING'] = 2] = 'LOGGING';\n }(EventConfiguration || (EventConfiguration = {})));\n const eventConfig = Cell({});\n const makeEventLogger = (eventName, initialTarget) => {\n const sequence = [];\n const startTime = new Date().getTime();\n return {\n logEventCut: (_name, target, purpose) => {\n sequence.push({\n outcome: 'cut',\n target,\n purpose\n });\n },\n logEventStopped: (_name, target, purpose) => {\n sequence.push({\n outcome: 'stopped',\n target,\n purpose\n });\n },\n logNoParent: (_name, target, purpose) => {\n sequence.push({\n outcome: 'no-parent',\n target,\n purpose\n });\n },\n logEventNoHandlers: (_name, target) => {\n sequence.push({\n outcome: 'no-handlers-left',\n target\n });\n },\n logEventResponse: (_name, target, purpose) => {\n sequence.push({\n outcome: 'response',\n purpose,\n target\n });\n },\n write: () => {\n const finishTime = new Date().getTime();\n if (contains$2([\n 'mousemove',\n 'mouseover',\n 'mouseout',\n systemInit()\n ], eventName)) {\n return;\n }\n console.log(eventName, {\n event: eventName,\n time: finishTime - startTime,\n target: initialTarget.dom,\n sequence: map$2(sequence, s => {\n if (!contains$2([\n 'cut',\n 'stopped',\n 'response'\n ], s.outcome)) {\n return s.outcome;\n } else {\n return '{' + s.purpose + '} ' + s.outcome + ' at (' + element(s.target) + ')';\n }\n })\n });\n }\n };\n };\n const processEvent = (eventName, initialTarget, f) => {\n const status = get$g(eventConfig.get(), eventName).orThunk(() => {\n const patterns = keys(eventConfig.get());\n return findMap(patterns, p => eventName.indexOf(p) > -1 ? Optional.some(eventConfig.get()[p]) : Optional.none());\n }).getOr(EventConfiguration.NORMAL);\n switch (status) {\n case EventConfiguration.NORMAL:\n return f(noLogger());\n case EventConfiguration.LOGGING: {\n const logger = makeEventLogger(eventName, initialTarget);\n const output = f(logger);\n logger.write();\n return output;\n }\n case EventConfiguration.STOP:\n return true;\n }\n };\n const path = [\n 'alloy/data/Fields',\n 'alloy/debugging/Debugging'\n ];\n const getTrace = () => {\n const err = new Error();\n if (err.stack !== undefined) {\n const lines = err.stack.split('\\n');\n return find$5(lines, line => line.indexOf('alloy') > 0 && !exists(path, p => line.indexOf(p) > -1)).getOr(unknown);\n } else {\n return unknown;\n }\n };\n const ignoreEvent = {\n logEventCut: noop,\n logEventStopped: noop,\n logNoParent: noop,\n logEventNoHandlers: noop,\n logEventResponse: noop,\n write: noop\n };\n const monitorEvent = (eventName, initialTarget, f) => processEvent(eventName, initialTarget, f);\n const noLogger = constant$1(ignoreEvent);\n\n const menuFields = constant$1([\n required$1('menu'),\n required$1('selectedMenu')\n ]);\n const itemFields = constant$1([\n required$1('item'),\n required$1('selectedItem')\n ]);\n constant$1(objOf(itemFields().concat(menuFields())));\n const itemSchema$3 = constant$1(objOf(itemFields()));\n\n const _initSize = requiredObjOf('initSize', [\n required$1('numColumns'),\n required$1('numRows')\n ]);\n const itemMarkers = () => requiredOf('markers', itemSchema$3());\n const tieredMenuMarkers = () => requiredObjOf('markers', [required$1('backgroundMenu')].concat(menuFields()).concat(itemFields()));\n const markers$1 = required => requiredObjOf('markers', map$2(required, required$1));\n const onPresenceHandler = (label, fieldName, presence) => {\n getTrace();\n return field$1(fieldName, fieldName, presence, valueOf(f => Result.value((...args) => {\n return f.apply(undefined, args);\n })));\n };\n const onHandler = fieldName => onPresenceHandler('onHandler', fieldName, defaulted$1(noop));\n const onKeyboardHandler = fieldName => onPresenceHandler('onKeyboardHandler', fieldName, defaulted$1(Optional.none));\n const onStrictHandler = fieldName => onPresenceHandler('onHandler', fieldName, required$2());\n const onStrictKeyboardHandler = fieldName => onPresenceHandler('onKeyboardHandler', fieldName, required$2());\n const output$1 = (name, value) => customField(name, constant$1(value));\n const snapshot = name => customField(name, identity);\n const initSize = constant$1(_initSize);\n\n const nu$6 = (x, y, bubble, direction, placement, boundsRestriction, labelPrefix, alwaysFit = false) => ({\n x,\n y,\n bubble,\n direction,\n placement,\n restriction: boundsRestriction,\n label: `${ labelPrefix }-${ placement }`,\n alwaysFit\n });\n\n const adt$a = Adt.generate([\n { southeast: [] },\n { southwest: [] },\n { northeast: [] },\n { northwest: [] },\n { south: [] },\n { north: [] },\n { east: [] },\n { west: [] }\n ]);\n const cata$2 = (subject, southeast, southwest, northeast, northwest, south, north, east, west) => subject.fold(southeast, southwest, northeast, northwest, south, north, east, west);\n const cataVertical = (subject, south, middle, north) => subject.fold(south, south, north, north, south, north, middle, middle);\n const cataHorizontal = (subject, east, middle, west) => subject.fold(east, west, east, west, middle, middle, east, west);\n const southeast$3 = adt$a.southeast;\n const southwest$3 = adt$a.southwest;\n const northeast$3 = adt$a.northeast;\n const northwest$3 = adt$a.northwest;\n const south$3 = adt$a.south;\n const north$3 = adt$a.north;\n const east$3 = adt$a.east;\n const west$3 = adt$a.west;\n\n const cycleBy = (value, delta, min, max) => {\n const r = value + delta;\n if (r > max) {\n return min;\n } else if (r < min) {\n return max;\n } else {\n return r;\n }\n };\n const clamp = (value, min, max) => Math.min(Math.max(value, min), max);\n\n const getRestriction = (anchor, restriction) => {\n switch (restriction) {\n case 1:\n return anchor.x;\n case 0:\n return anchor.x + anchor.width;\n case 2:\n return anchor.y;\n case 3:\n return anchor.y + anchor.height;\n }\n };\n const boundsRestriction = (anchor, restrictions) => mapToObject([\n 'left',\n 'right',\n 'top',\n 'bottom'\n ], dir => get$g(restrictions, dir).map(restriction => getRestriction(anchor, restriction)));\n const adjustBounds = (bounds$1, restriction, bubbleOffset) => {\n const applyRestriction = (dir, current) => restriction[dir].map(pos => {\n const isVerticalAxis = dir === 'top' || dir === 'bottom';\n const offset = isVerticalAxis ? bubbleOffset.top : bubbleOffset.left;\n const comparator = dir === 'left' || dir === 'top' ? Math.max : Math.min;\n const newPos = comparator(pos, current) + offset;\n return isVerticalAxis ? clamp(newPos, bounds$1.y, bounds$1.bottom) : clamp(newPos, bounds$1.x, bounds$1.right);\n }).getOr(current);\n const adjustedLeft = applyRestriction('left', bounds$1.x);\n const adjustedTop = applyRestriction('top', bounds$1.y);\n const adjustedRight = applyRestriction('right', bounds$1.right);\n const adjustedBottom = applyRestriction('bottom', bounds$1.bottom);\n return bounds(adjustedLeft, adjustedTop, adjustedRight - adjustedLeft, adjustedBottom - adjustedTop);\n };\n\n const labelPrefix$2 = 'layout';\n const eastX$1 = anchor => anchor.x;\n const middleX$1 = (anchor, element) => anchor.x + anchor.width / 2 - element.width / 2;\n const westX$1 = (anchor, element) => anchor.x + anchor.width - element.width;\n const northY$2 = (anchor, element) => anchor.y - element.height;\n const southY$2 = anchor => anchor.y + anchor.height;\n const centreY$1 = (anchor, element) => anchor.y + anchor.height / 2 - element.height / 2;\n const eastEdgeX$1 = anchor => anchor.x + anchor.width;\n const westEdgeX$1 = (anchor, element) => anchor.x - element.width;\n const southeast$2 = (anchor, element, bubbles) => nu$6(eastX$1(anchor), southY$2(anchor), bubbles.southeast(), southeast$3(), 'southeast', boundsRestriction(anchor, {\n left: 1,\n top: 3\n }), labelPrefix$2);\n const southwest$2 = (anchor, element, bubbles) => nu$6(westX$1(anchor, element), southY$2(anchor), bubbles.southwest(), southwest$3(), 'southwest', boundsRestriction(anchor, {\n right: 0,\n top: 3\n }), labelPrefix$2);\n const northeast$2 = (anchor, element, bubbles) => nu$6(eastX$1(anchor), northY$2(anchor, element), bubbles.northeast(), northeast$3(), 'northeast', boundsRestriction(anchor, {\n left: 1,\n bottom: 2\n }), labelPrefix$2);\n const northwest$2 = (anchor, element, bubbles) => nu$6(westX$1(anchor, element), northY$2(anchor, element), bubbles.northwest(), northwest$3(), 'northwest', boundsRestriction(anchor, {\n right: 0,\n bottom: 2\n }), labelPrefix$2);\n const north$2 = (anchor, element, bubbles) => nu$6(middleX$1(anchor, element), northY$2(anchor, element), bubbles.north(), north$3(), 'north', boundsRestriction(anchor, { bottom: 2 }), labelPrefix$2);\n const south$2 = (anchor, element, bubbles) => nu$6(middleX$1(anchor, element), southY$2(anchor), bubbles.south(), south$3(), 'south', boundsRestriction(anchor, { top: 3 }), labelPrefix$2);\n const east$2 = (anchor, element, bubbles) => nu$6(eastEdgeX$1(anchor), centreY$1(anchor, element), bubbles.east(), east$3(), 'east', boundsRestriction(anchor, { left: 0 }), labelPrefix$2);\n const west$2 = (anchor, element, bubbles) => nu$6(westEdgeX$1(anchor, element), centreY$1(anchor, element), bubbles.west(), west$3(), 'west', boundsRestriction(anchor, { right: 1 }), labelPrefix$2);\n const all$1 = () => [\n southeast$2,\n southwest$2,\n northeast$2,\n northwest$2,\n south$2,\n north$2,\n east$2,\n west$2\n ];\n const allRtl$1 = () => [\n southwest$2,\n southeast$2,\n northwest$2,\n northeast$2,\n south$2,\n north$2,\n east$2,\n west$2\n ];\n const aboveOrBelow = () => [\n northeast$2,\n northwest$2,\n southeast$2,\n southwest$2,\n north$2,\n south$2\n ];\n const aboveOrBelowRtl = () => [\n northwest$2,\n northeast$2,\n southwest$2,\n southeast$2,\n north$2,\n south$2\n ];\n const belowOrAbove = () => [\n southeast$2,\n southwest$2,\n northeast$2,\n northwest$2,\n south$2,\n north$2\n ];\n const belowOrAboveRtl = () => [\n southwest$2,\n southeast$2,\n northwest$2,\n northeast$2,\n south$2,\n north$2\n ];\n\n const chooseChannels = (channels, message) => message.universal ? channels : filter$2(channels, ch => contains$2(message.channels, ch));\n const events$h = receiveConfig => derive$2([run$1(receive(), (component, message) => {\n const channelMap = receiveConfig.channels;\n const channels = keys(channelMap);\n const receivingData = message;\n const targetChannels = chooseChannels(channels, receivingData);\n each$1(targetChannels, ch => {\n const channelInfo = channelMap[ch];\n const channelSchema = channelInfo.schema;\n const data = asRawOrDie$1('channel[' + ch + '] data\\nReceiver: ' + element(component.element), channelSchema, receivingData.data);\n channelInfo.onReceive(component, data);\n });\n })]);\n\n var ActiveReceiving = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$h\n });\n\n var ReceivingSchema = [requiredOf('channels', setOf(Result.value, objOfOnly([\n onStrictHandler('onReceive'),\n defaulted('schema', anyValue())\n ])))];\n\n const executeEvent = (bConfig, bState, executor) => runOnExecute$1(component => {\n executor(component, bConfig, bState);\n });\n const loadEvent = (bConfig, bState, f) => runOnInit((component, _simulatedEvent) => {\n f(component, bConfig, bState);\n });\n const create$5 = (schema, name, active, apis, extra, state) => {\n const configSchema = objOfOnly(schema);\n const schemaSchema = optionObjOf(name, [optionObjOfOnly('config', schema)]);\n return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);\n };\n const createModes$1 = (modes, name, active, apis, extra, state) => {\n const configSchema = modes;\n const schemaSchema = optionObjOf(name, [optionOf('config', modes)]);\n return doCreate(configSchema, schemaSchema, name, active, apis, extra, state);\n };\n const wrapApi = (bName, apiFunction, apiName) => {\n const f = (component, ...rest) => {\n const args = [component].concat(rest);\n return component.config({ name: constant$1(bName) }).fold(() => {\n throw new Error('We could not find any behaviour configuration for: ' + bName + '. Using API: ' + apiName);\n }, info => {\n const rest = Array.prototype.slice.call(args, 1);\n return apiFunction.apply(undefined, [\n component,\n info.config,\n info.state\n ].concat(rest));\n });\n };\n return markAsBehaviourApi(f, apiName, apiFunction);\n };\n const revokeBehaviour = name => ({\n key: name,\n value: undefined\n });\n const doCreate = (configSchema, schemaSchema, name, active, apis, extra, state) => {\n const getConfig = info => hasNonNullableKey(info, name) ? info[name]() : Optional.none();\n const wrappedApis = map$1(apis, (apiF, apiName) => wrapApi(name, apiF, apiName));\n const wrappedExtra = map$1(extra, (extraF, extraName) => markAsExtraApi(extraF, extraName));\n const me = {\n ...wrappedExtra,\n ...wrappedApis,\n revoke: curry(revokeBehaviour, name),\n config: spec => {\n const prepared = asRawOrDie$1(name + '-config', configSchema, spec);\n return {\n key: name,\n value: {\n config: prepared,\n me,\n configAsRaw: cached(() => asRawOrDie$1(name + '-config', configSchema, spec)),\n initialConfig: spec,\n state\n }\n };\n },\n schema: constant$1(schemaSchema),\n exhibit: (info, base) => {\n return lift2(getConfig(info), get$g(active, 'exhibit'), (behaviourInfo, exhibitor) => {\n return exhibitor(base, behaviourInfo.config, behaviourInfo.state);\n }).getOrThunk(() => nu$7({}));\n },\n name: constant$1(name),\n handlers: info => {\n return getConfig(info).map(behaviourInfo => {\n const getEvents = get$g(active, 'events').getOr(() => ({}));\n return getEvents(behaviourInfo.config, behaviourInfo.state);\n }).getOr({});\n }\n };\n return me;\n };\n\n const derive$1 = capabilities => wrapAll(capabilities);\n const simpleSchema = objOfOnly([\n required$1('fields'),\n required$1('name'),\n defaulted('active', {}),\n defaulted('apis', {}),\n defaulted('state', NoState),\n defaulted('extra', {})\n ]);\n const create$4 = data => {\n const value = asRawOrDie$1('Creating behaviour: ' + data.name, simpleSchema, data);\n return create$5(value.fields, value.name, value.active, value.apis, value.extra, value.state);\n };\n const modeSchema = objOfOnly([\n required$1('branchKey'),\n required$1('branches'),\n required$1('name'),\n defaulted('active', {}),\n defaulted('apis', {}),\n defaulted('state', NoState),\n defaulted('extra', {})\n ]);\n const createModes = data => {\n const value = asRawOrDie$1('Creating behaviour: ' + data.name, modeSchema, data);\n return createModes$1(choose$1(value.branchKey, value.branches), value.name, value.active, value.apis, value.extra, value.state);\n };\n const revoke = constant$1(undefined);\n\n const Receiving = create$4({\n fields: ReceivingSchema,\n name: 'receiving',\n active: ActiveReceiving\n });\n\n const exhibit$6 = (base, posConfig) => nu$7({\n classes: [],\n styles: posConfig.useFixed() ? {} : { position: 'relative' }\n });\n\n var ActivePosition = /*#__PURE__*/Object.freeze({\n __proto__: null,\n exhibit: exhibit$6\n });\n\n const focus$3 = (element, preventScroll = false) => element.dom.focus({ preventScroll });\n const blur$1 = element => element.dom.blur();\n const hasFocus = element => {\n const root = getRootNode(element).dom;\n return element.dom === root.activeElement;\n };\n const active$1 = (root = getDocument()) => Optional.from(root.dom.activeElement).map(SugarElement.fromDom);\n const search = element => active$1(getRootNode(element)).filter(e => element.dom.contains(e.dom));\n\n const preserve$1 = (f, container) => {\n const dos = getRootNode(container);\n const refocus = active$1(dos).bind(focused => {\n const hasFocus = elem => eq(focused, elem);\n return hasFocus(container) ? Optional.some(container) : descendant$1(container, hasFocus);\n });\n const result = f(container);\n refocus.each(oldFocus => {\n active$1(dos).filter(newFocus => eq(newFocus, oldFocus)).fold(() => {\n focus$3(oldFocus);\n }, noop);\n });\n return result;\n };\n\n const NuPositionCss = (position, left, top, right, bottom) => {\n const toPx = num => num + 'px';\n return {\n position,\n left: left.map(toPx),\n top: top.map(toPx),\n right: right.map(toPx),\n bottom: bottom.map(toPx)\n };\n };\n const toOptions = position => ({\n ...position,\n position: Optional.some(position.position)\n });\n const applyPositionCss = (element, position) => {\n setOptions(element, toOptions(position));\n };\n\n const adt$9 = Adt.generate([\n { none: [] },\n {\n relative: [\n 'x',\n 'y',\n 'width',\n 'height'\n ]\n },\n {\n fixed: [\n 'x',\n 'y',\n 'width',\n 'height'\n ]\n }\n ]);\n const positionWithDirection = (posName, decision, x, y, width, height) => {\n const decisionRect = decision.rect;\n const decisionX = decisionRect.x - x;\n const decisionY = decisionRect.y - y;\n const decisionWidth = decisionRect.width;\n const decisionHeight = decisionRect.height;\n const decisionRight = width - (decisionX + decisionWidth);\n const decisionBottom = height - (decisionY + decisionHeight);\n const left = Optional.some(decisionX);\n const top = Optional.some(decisionY);\n const right = Optional.some(decisionRight);\n const bottom = Optional.some(decisionBottom);\n const none = Optional.none();\n return cata$2(decision.direction, () => NuPositionCss(posName, left, top, none, none), () => NuPositionCss(posName, none, top, right, none), () => NuPositionCss(posName, left, none, none, bottom), () => NuPositionCss(posName, none, none, right, bottom), () => NuPositionCss(posName, left, top, none, none), () => NuPositionCss(posName, left, none, none, bottom), () => NuPositionCss(posName, left, top, none, none), () => NuPositionCss(posName, none, top, right, none));\n };\n const reposition = (origin, decision) => origin.fold(() => {\n const decisionRect = decision.rect;\n return NuPositionCss('absolute', Optional.some(decisionRect.x), Optional.some(decisionRect.y), Optional.none(), Optional.none());\n }, (x, y, width, height) => {\n return positionWithDirection('absolute', decision, x, y, width, height);\n }, (x, y, width, height) => {\n return positionWithDirection('fixed', decision, x, y, width, height);\n });\n const toBox = (origin, element) => {\n const rel = curry(find$2, element);\n const position = origin.fold(rel, rel, () => {\n const scroll = get$b();\n return find$2(element).translate(-scroll.left, -scroll.top);\n });\n const width = getOuter$1(element);\n const height = getOuter$2(element);\n return bounds(position.left, position.top, width, height);\n };\n const viewport = (origin, optBounds) => optBounds.fold(() => origin.fold(win, win, bounds), bounds$1 => origin.fold(constant$1(bounds$1), constant$1(bounds$1), () => {\n const pos = translate$2(origin, bounds$1.x, bounds$1.y);\n return bounds(pos.left, pos.top, bounds$1.width, bounds$1.height);\n }));\n const translate$2 = (origin, x, y) => {\n const pos = SugarPosition(x, y);\n const removeScroll = () => {\n const outerScroll = get$b();\n return pos.translate(-outerScroll.left, -outerScroll.top);\n };\n return origin.fold(constant$1(pos), constant$1(pos), removeScroll);\n };\n const cata$1 = (subject, onNone, onRelative, onFixed) => subject.fold(onNone, onRelative, onFixed);\n adt$9.none;\n const relative$1 = adt$9.relative;\n const fixed$1 = adt$9.fixed;\n\n const anchor = (anchorBox, origin) => ({\n anchorBox,\n origin\n });\n const box = (anchorBox, origin) => anchor(anchorBox, origin);\n\n const placementAttribute = 'data-alloy-placement';\n const setPlacement$1 = (element, placement) => {\n set$9(element, placementAttribute, placement);\n };\n const getPlacement = element => getOpt(element, placementAttribute);\n const reset$2 = element => remove$7(element, placementAttribute);\n\n const adt$8 = Adt.generate([\n { fit: ['reposition'] },\n {\n nofit: [\n 'reposition',\n 'visibleW',\n 'visibleH',\n 'isVisible'\n ]\n }\n ]);\n const determinePosition = (box, bounds) => {\n const {\n x: boundsX,\n y: boundsY,\n right: boundsRight,\n bottom: boundsBottom\n } = bounds;\n const {x, y, right, bottom, width, height} = box;\n const xInBounds = x >= boundsX && x <= boundsRight;\n const yInBounds = y >= boundsY && y <= boundsBottom;\n const originInBounds = xInBounds && yInBounds;\n const rightInBounds = right <= boundsRight && right >= boundsX;\n const bottomInBounds = bottom <= boundsBottom && bottom >= boundsY;\n const sizeInBounds = rightInBounds && bottomInBounds;\n const visibleW = Math.min(width, x >= boundsX ? boundsRight - x : right - boundsX);\n const visibleH = Math.min(height, y >= boundsY ? boundsBottom - y : bottom - boundsY);\n return {\n originInBounds,\n sizeInBounds,\n visibleW,\n visibleH\n };\n };\n const calcReposition = (box, bounds$1) => {\n const {\n x: boundsX,\n y: boundsY,\n right: boundsRight,\n bottom: boundsBottom\n } = bounds$1;\n const {x, y, width, height} = box;\n const maxX = Math.max(boundsX, boundsRight - width);\n const maxY = Math.max(boundsY, boundsBottom - height);\n const restrictedX = clamp(x, boundsX, maxX);\n const restrictedY = clamp(y, boundsY, maxY);\n const restrictedWidth = Math.min(restrictedX + width, boundsRight) - restrictedX;\n const restrictedHeight = Math.min(restrictedY + height, boundsBottom) - restrictedY;\n return bounds(restrictedX, restrictedY, restrictedWidth, restrictedHeight);\n };\n const calcMaxSizes = (direction, box, bounds) => {\n const upAvailable = constant$1(box.bottom - bounds.y);\n const downAvailable = constant$1(bounds.bottom - box.y);\n const maxHeight = cataVertical(direction, downAvailable, downAvailable, upAvailable);\n const westAvailable = constant$1(box.right - bounds.x);\n const eastAvailable = constant$1(bounds.right - box.x);\n const maxWidth = cataHorizontal(direction, eastAvailable, eastAvailable, westAvailable);\n return {\n maxWidth,\n maxHeight\n };\n };\n const attempt = (candidate, width, height, bounds$1) => {\n const bubble = candidate.bubble;\n const bubbleOffset = bubble.offset;\n const adjustedBounds = adjustBounds(bounds$1, candidate.restriction, bubbleOffset);\n const newX = candidate.x + bubbleOffset.left;\n const newY = candidate.y + bubbleOffset.top;\n const box = bounds(newX, newY, width, height);\n const {originInBounds, sizeInBounds, visibleW, visibleH} = determinePosition(box, adjustedBounds);\n const fits = originInBounds && sizeInBounds;\n const fittedBox = fits ? box : calcReposition(box, adjustedBounds);\n const isPartlyVisible = fittedBox.width > 0 && fittedBox.height > 0;\n const {maxWidth, maxHeight} = calcMaxSizes(candidate.direction, fittedBox, bounds$1);\n const reposition = {\n rect: fittedBox,\n maxHeight,\n maxWidth,\n direction: candidate.direction,\n placement: candidate.placement,\n classes: {\n on: bubble.classesOn,\n off: bubble.classesOff\n },\n layout: candidate.label,\n testY: newY\n };\n return fits || candidate.alwaysFit ? adt$8.fit(reposition) : adt$8.nofit(reposition, visibleW, visibleH, isPartlyVisible);\n };\n const attempts = (element, candidates, anchorBox, elementBox, bubbles, bounds) => {\n const panelWidth = elementBox.width;\n const panelHeight = elementBox.height;\n const attemptBestFit = (layout, reposition, visibleW, visibleH, isVisible) => {\n const next = layout(anchorBox, elementBox, bubbles, element, bounds);\n const attemptLayout = attempt(next, panelWidth, panelHeight, bounds);\n return attemptLayout.fold(constant$1(attemptLayout), (newReposition, newVisibleW, newVisibleH, newIsVisible) => {\n const improved = isVisible === newIsVisible ? newVisibleH > visibleH || newVisibleW > visibleW : !isVisible && newIsVisible;\n return improved ? attemptLayout : adt$8.nofit(reposition, visibleW, visibleH, isVisible);\n });\n };\n const abc = foldl(candidates, (b, a) => {\n const bestNext = curry(attemptBestFit, a);\n return b.fold(constant$1(b), bestNext);\n }, adt$8.nofit({\n rect: anchorBox,\n maxHeight: elementBox.height,\n maxWidth: elementBox.width,\n direction: southeast$3(),\n placement: 'southeast',\n classes: {\n on: [],\n off: []\n },\n layout: 'none',\n testY: anchorBox.y\n }, -1, -1, false));\n return abc.fold(identity, identity);\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 destroyable = () => singleton(s => s.destroy());\n const unbindable = () => singleton(s => s.unbind());\n const value$2 = () => {\n const subject = singleton(noop);\n const on = f => subject.get().each(f);\n return {\n ...subject,\n on\n };\n };\n\n const filter = always;\n const bind = (element, event, handler) => bind$2(element, event, filter, handler);\n const capture = (element, event, handler) => capture$1(element, event, filter, handler);\n const fromRawEvent = fromRawEvent$1;\n\n const properties = [\n 'top',\n 'bottom',\n 'right',\n 'left'\n ];\n const timerAttr = 'data-alloy-transition-timer';\n const isTransitioning$1 = (element, transition) => hasAll(element, transition.classes);\n const shouldApplyTransitionCss = (transition, decision, lastPlacement) => {\n return lastPlacement.exists(placer => {\n const mode = transition.mode;\n return mode === 'all' ? true : placer[mode] !== decision[mode];\n });\n };\n const hasChanges = (position, intermediate) => {\n const round = value => parseFloat(value).toFixed(3);\n return find$4(intermediate, (value, key) => {\n const newValue = position[key].map(round);\n const val = value.map(round);\n return !equals(newValue, val);\n }).isSome();\n };\n const getTransitionDuration = element => {\n const get = name => {\n const style = get$e(element, name);\n const times = style.split(/\\s*,\\s*/);\n return filter$2(times, isNotEmpty);\n };\n const parse = value => {\n if (isString(value) && /^[\\d.]+/.test(value)) {\n const num = parseFloat(value);\n return endsWith(value, 'ms') ? num : num * 1000;\n } else {\n return 0;\n }\n };\n const delay = get('transition-delay');\n const duration = get('transition-duration');\n return foldl(duration, (acc, dur, i) => {\n const time = parse(delay[i]) + parse(dur);\n return Math.max(acc, time);\n }, 0);\n };\n const setupTransitionListeners = (element, transition) => {\n const transitionEnd = unbindable();\n const transitionCancel = unbindable();\n let timer;\n const isSourceTransition = e => {\n var _a;\n const pseudoElement = (_a = e.raw.pseudoElement) !== null && _a !== void 0 ? _a : '';\n return eq(e.target, element) && isEmpty(pseudoElement) && contains$2(properties, e.raw.propertyName);\n };\n const transitionDone = e => {\n if (isNullable(e) || isSourceTransition(e)) {\n transitionEnd.clear();\n transitionCancel.clear();\n const type = e === null || e === void 0 ? void 0 : e.raw.type;\n if (isNullable(type) || type === transitionend()) {\n clearTimeout(timer);\n remove$7(element, timerAttr);\n remove$1(element, transition.classes);\n }\n }\n };\n const transitionStart = bind(element, transitionstart(), e => {\n if (isSourceTransition(e)) {\n transitionStart.unbind();\n transitionEnd.set(bind(element, transitionend(), transitionDone));\n transitionCancel.set(bind(element, transitioncancel(), transitionDone));\n }\n });\n const duration = getTransitionDuration(element);\n requestAnimationFrame(() => {\n timer = setTimeout(transitionDone, duration + 17);\n set$9(element, timerAttr, timer);\n });\n };\n const startTransitioning = (element, transition) => {\n add$1(element, transition.classes);\n getOpt(element, timerAttr).each(timerId => {\n clearTimeout(parseInt(timerId, 10));\n remove$7(element, timerAttr);\n });\n setupTransitionListeners(element, transition);\n };\n const applyTransitionCss = (element, origin, position, transition, decision, lastPlacement) => {\n const shouldTransition = shouldApplyTransitionCss(transition, decision, lastPlacement);\n if (shouldTransition || isTransitioning$1(element, transition)) {\n set$8(element, 'position', position.position);\n const rect = toBox(origin, element);\n const intermediatePosition = reposition(origin, {\n ...decision,\n rect\n });\n const intermediateCssOptions = mapToObject(properties, prop => intermediatePosition[prop]);\n if (hasChanges(position, intermediateCssOptions)) {\n setOptions(element, intermediateCssOptions);\n if (shouldTransition) {\n startTransitioning(element, transition);\n }\n reflow(element);\n }\n } else {\n remove$1(element, transition.classes);\n }\n };\n\n const elementSize = p => ({\n width: getOuter$1(p),\n height: getOuter$2(p)\n });\n const layout = (anchorBox, element, bubbles, options) => {\n remove$6(element, 'max-height');\n remove$6(element, 'max-width');\n const elementBox = elementSize(element);\n return attempts(element, options.preference, anchorBox, elementBox, bubbles, options.bounds);\n };\n const setClasses = (element, decision) => {\n const classInfo = decision.classes;\n remove$1(element, classInfo.off);\n add$1(element, classInfo.on);\n };\n const setHeight = (element, decision, options) => {\n const maxHeightFunction = options.maxHeightFunction;\n maxHeightFunction(element, decision.maxHeight);\n };\n const setWidth = (element, decision, options) => {\n const maxWidthFunction = options.maxWidthFunction;\n maxWidthFunction(element, decision.maxWidth);\n };\n const position$2 = (element, decision, options) => {\n const positionCss = reposition(options.origin, decision);\n options.transition.each(transition => {\n applyTransitionCss(element, options.origin, positionCss, transition, decision, options.lastPlacement);\n });\n applyPositionCss(element, positionCss);\n };\n const setPlacement = (element, decision) => {\n setPlacement$1(element, decision.placement);\n };\n\n const setMaxHeight = (element, maxHeight) => {\n setMax$1(element, Math.floor(maxHeight));\n };\n const anchored = constant$1((element, available) => {\n setMaxHeight(element, available);\n setAll(element, {\n 'overflow-x': 'hidden',\n 'overflow-y': 'auto'\n });\n });\n const expandable$1 = constant$1((element, available) => {\n setMaxHeight(element, available);\n });\n\n const defaultOr = (options, key, dephault) => options[key] === undefined ? dephault : options[key];\n const simple = (anchor, element, bubble, layouts, lastPlacement, optBounds, overrideOptions, transition) => {\n const maxHeightFunction = defaultOr(overrideOptions, 'maxHeightFunction', anchored());\n const maxWidthFunction = defaultOr(overrideOptions, 'maxWidthFunction', noop);\n const anchorBox = anchor.anchorBox;\n const origin = anchor.origin;\n const options = {\n bounds: viewport(origin, optBounds),\n origin,\n preference: layouts,\n maxHeightFunction,\n maxWidthFunction,\n lastPlacement,\n transition\n };\n return go(anchorBox, element, bubble, options);\n };\n const go = (anchorBox, element, bubble, options) => {\n const decision = layout(anchorBox, element, bubble, options);\n position$2(element, decision, options);\n setPlacement(element, decision);\n setClasses(element, decision);\n setHeight(element, decision, options);\n setWidth(element, decision, options);\n return {\n layout: decision.layout,\n placement: decision.placement\n };\n };\n\n const allAlignments = [\n 'valignCentre',\n 'alignLeft',\n 'alignRight',\n 'alignCentre',\n 'top',\n 'bottom',\n 'left',\n 'right',\n 'inset'\n ];\n const nu$5 = (xOffset, yOffset, classes, insetModifier = 1) => {\n const insetXOffset = xOffset * insetModifier;\n const insetYOffset = yOffset * insetModifier;\n const getClasses = prop => get$g(classes, prop).getOr([]);\n const make = (xDelta, yDelta, alignmentsOn) => {\n const alignmentsOff = difference(allAlignments, alignmentsOn);\n return {\n offset: SugarPosition(xDelta, yDelta),\n classesOn: bind$3(alignmentsOn, getClasses),\n classesOff: bind$3(alignmentsOff, getClasses)\n };\n };\n return {\n southeast: () => make(-xOffset, yOffset, [\n 'top',\n 'alignLeft'\n ]),\n southwest: () => make(xOffset, yOffset, [\n 'top',\n 'alignRight'\n ]),\n south: () => make(-xOffset / 2, yOffset, [\n 'top',\n 'alignCentre'\n ]),\n northeast: () => make(-xOffset, -yOffset, [\n 'bottom',\n 'alignLeft'\n ]),\n northwest: () => make(xOffset, -yOffset, [\n 'bottom',\n 'alignRight'\n ]),\n north: () => make(-xOffset / 2, -yOffset, [\n 'bottom',\n 'alignCentre'\n ]),\n east: () => make(xOffset, -yOffset / 2, [\n 'valignCentre',\n 'left'\n ]),\n west: () => make(-xOffset, -yOffset / 2, [\n 'valignCentre',\n 'right'\n ]),\n insetNortheast: () => make(insetXOffset, insetYOffset, [\n 'top',\n 'alignLeft',\n 'inset'\n ]),\n insetNorthwest: () => make(-insetXOffset, insetYOffset, [\n 'top',\n 'alignRight',\n 'inset'\n ]),\n insetNorth: () => make(-insetXOffset / 2, insetYOffset, [\n 'top',\n 'alignCentre',\n 'inset'\n ]),\n insetSoutheast: () => make(insetXOffset, -insetYOffset, [\n 'bottom',\n 'alignLeft',\n 'inset'\n ]),\n insetSouthwest: () => make(-insetXOffset, -insetYOffset, [\n 'bottom',\n 'alignRight',\n 'inset'\n ]),\n insetSouth: () => make(-insetXOffset / 2, -insetYOffset, [\n 'bottom',\n 'alignCentre',\n 'inset'\n ]),\n insetEast: () => make(-insetXOffset, -insetYOffset / 2, [\n 'valignCentre',\n 'right',\n 'inset'\n ]),\n insetWest: () => make(insetXOffset, -insetYOffset / 2, [\n 'valignCentre',\n 'left',\n 'inset'\n ])\n };\n };\n const fallback = () => nu$5(0, 0, {});\n\n const nu$4 = identity;\n\n const onDirection = (isLtr, isRtl) => element => getDirection(element) === 'rtl' ? isRtl : isLtr;\n const getDirection = element => get$e(element, 'direction') === 'rtl' ? 'rtl' : 'ltr';\n\n var AttributeValue;\n (function (AttributeValue) {\n AttributeValue['TopToBottom'] = 'toptobottom';\n AttributeValue['BottomToTop'] = 'bottomtotop';\n }(AttributeValue || (AttributeValue = {})));\n const Attribute = 'data-alloy-vertical-dir';\n const isBottomToTopDir = el => closest$2(el, current => isElement$1(current) && get$f(current, 'data-alloy-vertical-dir') === AttributeValue.BottomToTop);\n\n const schema$y = () => optionObjOf('layouts', [\n required$1('onLtr'),\n required$1('onRtl'),\n option$3('onBottomLtr'),\n option$3('onBottomRtl')\n ]);\n const get$5 = (elem, info, defaultLtr, defaultRtl, defaultBottomLtr, defaultBottomRtl, dirElement) => {\n const isBottomToTop = dirElement.map(isBottomToTopDir).getOr(false);\n const customLtr = info.layouts.map(ls => ls.onLtr(elem));\n const customRtl = info.layouts.map(ls => ls.onRtl(elem));\n const ltr = isBottomToTop ? info.layouts.bind(ls => ls.onBottomLtr.map(f => f(elem))).or(customLtr).getOr(defaultBottomLtr) : customLtr.getOr(defaultLtr);\n const rtl = isBottomToTop ? info.layouts.bind(ls => ls.onBottomRtl.map(f => f(elem))).or(customRtl).getOr(defaultBottomRtl) : customRtl.getOr(defaultRtl);\n const f = onDirection(ltr, rtl);\n return f(elem);\n };\n\n const placement$4 = (component, anchorInfo, origin) => {\n const hotspot = anchorInfo.hotspot;\n const anchorBox = toBox(origin, hotspot.element);\n const layouts = get$5(component.element, anchorInfo, belowOrAbove(), belowOrAboveRtl(), aboveOrBelow(), aboveOrBelowRtl(), Optional.some(anchorInfo.hotspot.element));\n return Optional.some(nu$4({\n anchorBox,\n bubble: anchorInfo.bubble.getOr(fallback()),\n overrides: anchorInfo.overrides,\n layouts\n }));\n };\n var HotspotAnchor = [\n required$1('hotspot'),\n option$3('bubble'),\n defaulted('overrides', {}),\n schema$y(),\n output$1('placement', placement$4)\n ];\n\n const placement$3 = (component, anchorInfo, origin) => {\n const pos = translate$2(origin, anchorInfo.x, anchorInfo.y);\n const anchorBox = bounds(pos.left, pos.top, anchorInfo.width, anchorInfo.height);\n const layouts = get$5(component.element, anchorInfo, all$1(), allRtl$1(), all$1(), allRtl$1(), Optional.none());\n return Optional.some(nu$4({\n anchorBox,\n bubble: anchorInfo.bubble,\n overrides: anchorInfo.overrides,\n layouts\n }));\n };\n var MakeshiftAnchor = [\n required$1('x'),\n required$1('y'),\n defaulted('height', 0),\n defaulted('width', 0),\n defaulted('bubble', fallback()),\n defaulted('overrides', {}),\n schema$y(),\n output$1('placement', placement$3)\n ];\n\n const adt$7 = Adt.generate([\n { screen: ['point'] },\n {\n absolute: [\n 'point',\n 'scrollLeft',\n 'scrollTop'\n ]\n }\n ]);\n const toFixed = pos => pos.fold(identity, (point, scrollLeft, scrollTop) => point.translate(-scrollLeft, -scrollTop));\n const toAbsolute = pos => pos.fold(identity, identity);\n const sum = points => foldl(points, (b, a) => b.translate(a.left, a.top), SugarPosition(0, 0));\n const sumAsFixed = positions => {\n const points = map$2(positions, toFixed);\n return sum(points);\n };\n const sumAsAbsolute = positions => {\n const points = map$2(positions, toAbsolute);\n return sum(points);\n };\n const screen = adt$7.screen;\n const absolute$1 = adt$7.absolute;\n\n const getOffset = (component, origin, anchorInfo) => {\n const win = defaultView(anchorInfo.root).dom;\n const hasSameOwner = frame => {\n const frameOwner = owner$4(frame);\n const compOwner = owner$4(component.element);\n return eq(frameOwner, compOwner);\n };\n return Optional.from(win.frameElement).map(SugarElement.fromDom).filter(hasSameOwner).map(absolute$3);\n };\n const getRootPoint = (component, origin, anchorInfo) => {\n const doc = owner$4(component.element);\n const outerScroll = get$b(doc);\n const offset = getOffset(component, origin, anchorInfo).getOr(outerScroll);\n return absolute$1(offset, outerScroll.left, outerScroll.top);\n };\n\n const getBox = (left, top, width, height) => {\n const point = screen(SugarPosition(left, top));\n return Optional.some(pointed(point, width, height));\n };\n const calcNewAnchor = (optBox, rootPoint, anchorInfo, origin, elem) => optBox.map(box => {\n const points = [\n rootPoint,\n box.point\n ];\n const topLeft = cata$1(origin, () => sumAsAbsolute(points), () => sumAsAbsolute(points), () => sumAsFixed(points));\n const anchorBox = rect(topLeft.left, topLeft.top, box.width, box.height);\n const layoutsLtr = anchorInfo.showAbove ? aboveOrBelow() : belowOrAbove();\n const layoutsRtl = anchorInfo.showAbove ? aboveOrBelowRtl() : belowOrAboveRtl();\n const layouts = get$5(elem, anchorInfo, layoutsLtr, layoutsRtl, layoutsLtr, layoutsRtl, Optional.none());\n return nu$4({\n anchorBox,\n bubble: anchorInfo.bubble.getOr(fallback()),\n overrides: anchorInfo.overrides,\n layouts\n });\n });\n\n const placement$2 = (component, anchorInfo, origin) => {\n const rootPoint = getRootPoint(component, origin, anchorInfo);\n return anchorInfo.node.filter(inBody).bind(target => {\n const rect = target.dom.getBoundingClientRect();\n const nodeBox = getBox(rect.left, rect.top, rect.width, rect.height);\n const elem = anchorInfo.node.getOr(component.element);\n return calcNewAnchor(nodeBox, rootPoint, anchorInfo, origin, elem);\n });\n };\n var NodeAnchor = [\n required$1('node'),\n required$1('root'),\n option$3('bubble'),\n schema$y(),\n defaulted('overrides', {}),\n defaulted('showAbove', false),\n output$1('placement', placement$2)\n ];\n\n const zeroWidth = '\\uFEFF';\n const nbsp = '\\xA0';\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 adt$6 = Adt.generate([\n { before: ['element'] },\n {\n on: [\n 'element',\n 'offset'\n ]\n },\n { after: ['element'] }\n ]);\n const cata = (subject, onBefore, onOn, onAfter) => subject.fold(onBefore, onOn, onAfter);\n const getStart$1 = situ => situ.fold(identity, identity, identity);\n const before = adt$6.before;\n const on$1 = adt$6.on;\n const after$1 = adt$6.after;\n const Situ = {\n before,\n on: on$1,\n after: after$1,\n cata,\n getStart: getStart$1\n };\n\n const adt$5 = 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$5.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$5.domRange;\n const relative = adt$5.relative;\n const exact = adt$5.exact;\n const getWin = selection => {\n const start = getStart(selection);\n return defaultView(start);\n };\n const range$1 = SimRange.create;\n const SimSelection = {\n domRange,\n relative,\n exact,\n exactFromRange,\n getWin,\n range: range$1\n };\n\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 const getBounds$2 = rng => {\n const rect = rng.getBoundingClientRect();\n return rect.width > 0 || rect.height > 0 ? Optional.some(rect).map(toRect) : Optional.none();\n };\n\n const adt$4 = 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$1(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$4.rtl(SugarElement.fromDom(rev.endContainer), rev.endOffset, SugarElement.fromDom(rev.startContainer), rev.startOffset)).getOrThunk(() => fromRange(win, adt$4.ltr, rng));\n } else {\n return fromRange(win, adt$4.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$4.ltr;\n adt$4.rtl;\n\n const ancestors = (scope, predicate, isRoot) => filter$2(parents(scope, isRoot), predicate);\n\n const descendants = (scope, selector) => all$3(selector, scope);\n\n const makeRange = (start, soffset, finish, foffset) => {\n const doc = owner$4(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(start, finish) && soffset === foffset;\n return r.collapsed && !same;\n };\n\n const getNativeSelection = win => Optional.from(win.getSelection());\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 getExact = win => getNativeSelection(win).filter(sel => sel.rangeCount > 0).bind(doGetExact);\n const getFirstRect = (win, selection) => {\n const rng = asLtrRange(win, selection);\n return getFirstRect$1(rng);\n };\n const getBounds$1 = (win, selection) => {\n const rng = asLtrRange(win, selection);\n return getBounds$2(rng);\n };\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$4 = element => api.get(element);\n\n const point = (element, offset) => ({\n element,\n offset\n });\n const descendOnce$1 = (element, offset) => {\n const children$1 = children(element);\n if (children$1.length === 0) {\n return point(element, offset);\n } else if (offset < children$1.length) {\n return point(children$1[offset], 0);\n } else {\n const last = children$1[children$1.length - 1];\n const len = isText(last) ? get$4(last).length : children(last).length;\n return point(last, len);\n }\n };\n\n const descendOnce = (element, offset) => isText(element) ? point(element, offset) : descendOnce$1(element, offset);\n const isSimRange = detail => detail.foffset !== undefined;\n const getAnchorSelection = (win, anchorInfo) => {\n const getSelection = anchorInfo.getSelection.getOrThunk(() => () => getExact(win));\n return getSelection().map(sel => {\n if (isSimRange(sel)) {\n const modStart = descendOnce(sel.start, sel.soffset);\n const modFinish = descendOnce(sel.finish, sel.foffset);\n return SimSelection.range(modStart.element, modStart.offset, modFinish.element, modFinish.offset);\n } else {\n return sel;\n }\n });\n };\n const placement$1 = (component, anchorInfo, origin) => {\n const win = defaultView(anchorInfo.root).dom;\n const rootPoint = getRootPoint(component, origin, anchorInfo);\n const selectionBox = getAnchorSelection(win, anchorInfo).bind(sel => {\n if (isSimRange(sel)) {\n const optRect = getBounds$1(win, SimSelection.exactFromRange(sel)).orThunk(() => {\n const zeroWidth$1 = SugarElement.fromText(zeroWidth);\n before$1(sel.start, zeroWidth$1);\n const rect = getFirstRect(win, SimSelection.exact(zeroWidth$1, 0, zeroWidth$1, 1));\n remove$5(zeroWidth$1);\n return rect;\n });\n return optRect.bind(rawRect => {\n return getBox(rawRect.left, rawRect.top, rawRect.width, rawRect.height);\n });\n } else {\n const selectionRect = map$1(sel, cell => cell.dom.getBoundingClientRect());\n const bounds = {\n left: Math.min(selectionRect.firstCell.left, selectionRect.lastCell.left),\n right: Math.max(selectionRect.firstCell.right, selectionRect.lastCell.right),\n top: Math.min(selectionRect.firstCell.top, selectionRect.lastCell.top),\n bottom: Math.max(selectionRect.firstCell.bottom, selectionRect.lastCell.bottom)\n };\n return getBox(bounds.left, bounds.top, bounds.right - bounds.left, bounds.bottom - bounds.top);\n }\n });\n const targetElement = getAnchorSelection(win, anchorInfo).bind(sel => {\n if (isSimRange(sel)) {\n return isElement$1(sel.start) ? Optional.some(sel.start) : parentElement(sel.start);\n } else {\n return Optional.some(sel.firstCell);\n }\n });\n const elem = targetElement.getOr(component.element);\n return calcNewAnchor(selectionBox, rootPoint, anchorInfo, origin, elem);\n };\n var SelectionAnchor = [\n option$3('getSelection'),\n required$1('root'),\n option$3('bubble'),\n schema$y(),\n defaulted('overrides', {}),\n defaulted('showAbove', false),\n output$1('placement', placement$1)\n ];\n\n const labelPrefix$1 = 'link-layout';\n const eastX = anchor => anchor.x + anchor.width;\n const westX = (anchor, element) => anchor.x - element.width;\n const northY$1 = (anchor, element) => anchor.y - element.height + anchor.height;\n const southY$1 = anchor => anchor.y;\n const southeast$1 = (anchor, element, bubbles) => nu$6(eastX(anchor), southY$1(anchor), bubbles.southeast(), southeast$3(), 'southeast', boundsRestriction(anchor, {\n left: 0,\n top: 2\n }), labelPrefix$1);\n const southwest$1 = (anchor, element, bubbles) => nu$6(westX(anchor, element), southY$1(anchor), bubbles.southwest(), southwest$3(), 'southwest', boundsRestriction(anchor, {\n right: 1,\n top: 2\n }), labelPrefix$1);\n const northeast$1 = (anchor, element, bubbles) => nu$6(eastX(anchor), northY$1(anchor, element), bubbles.northeast(), northeast$3(), 'northeast', boundsRestriction(anchor, {\n left: 0,\n bottom: 3\n }), labelPrefix$1);\n const northwest$1 = (anchor, element, bubbles) => nu$6(westX(anchor, element), northY$1(anchor, element), bubbles.northwest(), northwest$3(), 'northwest', boundsRestriction(anchor, {\n right: 1,\n bottom: 3\n }), labelPrefix$1);\n const all = () => [\n southeast$1,\n southwest$1,\n northeast$1,\n northwest$1\n ];\n const allRtl = () => [\n southwest$1,\n southeast$1,\n northwest$1,\n northeast$1\n ];\n\n const placement = (component, submenuInfo, origin) => {\n const anchorBox = toBox(origin, submenuInfo.item.element);\n const layouts = get$5(component.element, submenuInfo, all(), allRtl(), all(), allRtl(), Optional.none());\n return Optional.some(nu$4({\n anchorBox,\n bubble: fallback(),\n overrides: submenuInfo.overrides,\n layouts\n }));\n };\n var SubmenuAnchor = [\n required$1('item'),\n schema$y(),\n defaulted('overrides', {}),\n output$1('placement', placement)\n ];\n\n var AnchorSchema = choose$1('type', {\n selection: SelectionAnchor,\n node: NodeAnchor,\n hotspot: HotspotAnchor,\n submenu: SubmenuAnchor,\n makeshift: MakeshiftAnchor\n });\n\n const TransitionSchema = [\n requiredArrayOf('classes', string),\n defaultedStringEnum('mode', 'all', [\n 'all',\n 'layout',\n 'placement'\n ])\n ];\n const PositionSchema = [\n defaulted('useFixed', never),\n option$3('getBounds')\n ];\n const PlacementSchema = [\n requiredOf('anchor', AnchorSchema),\n optionObjOf('transition', TransitionSchema)\n ];\n\n const getFixedOrigin = () => {\n const html = document.documentElement;\n return fixed$1(0, 0, html.clientWidth, html.clientHeight);\n };\n const getRelativeOrigin = component => {\n const position = absolute$3(component.element);\n const bounds = component.element.dom.getBoundingClientRect();\n return relative$1(position.left, position.top, bounds.width, bounds.height);\n };\n const place = (origin, anchoring, optBounds, placee, lastPlace, transition) => {\n const anchor = box(anchoring.anchorBox, origin);\n return simple(anchor, placee.element, anchoring.bubble, anchoring.layouts, lastPlace, optBounds, anchoring.overrides, transition);\n };\n const position$1 = (component, posConfig, posState, placee, placementSpec) => {\n const optWithinBounds = Optional.none();\n positionWithinBounds(component, posConfig, posState, placee, placementSpec, optWithinBounds);\n };\n const positionWithinBounds = (component, posConfig, posState, placee, placementSpec, optWithinBounds) => {\n const placeeDetail = asRawOrDie$1('placement.info', objOf(PlacementSchema), placementSpec);\n const anchorage = placeeDetail.anchor;\n const element = placee.element;\n const placeeState = posState.get(placee.uid);\n preserve$1(() => {\n set$8(element, 'position', 'fixed');\n const oldVisibility = getRaw(element, 'visibility');\n set$8(element, 'visibility', 'hidden');\n const origin = posConfig.useFixed() ? getFixedOrigin() : getRelativeOrigin(component);\n anchorage.placement(component, anchorage, origin).each(anchoring => {\n const optBounds = optWithinBounds.orThunk(() => posConfig.getBounds.map(apply$1));\n const newState = place(origin, anchoring, optBounds, placee, placeeState, placeeDetail.transition);\n posState.set(placee.uid, newState);\n });\n oldVisibility.fold(() => {\n remove$6(element, 'visibility');\n }, vis => {\n set$8(element, 'visibility', vis);\n });\n if (getRaw(element, 'left').isNone() && getRaw(element, 'top').isNone() && getRaw(element, 'right').isNone() && getRaw(element, 'bottom').isNone() && is$1(getRaw(element, 'position'), 'fixed')) {\n remove$6(element, 'position');\n }\n }, element);\n };\n const getMode = (component, pConfig, _pState) => pConfig.useFixed() ? 'fixed' : 'absolute';\n const reset$1 = (component, pConfig, posState, placee) => {\n const element = placee.element;\n each$1([\n 'position',\n 'left',\n 'right',\n 'top',\n 'bottom'\n ], prop => remove$6(element, prop));\n reset$2(element);\n posState.clear(placee.uid);\n };\n\n var PositionApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n position: position$1,\n positionWithinBounds: positionWithinBounds,\n getMode: getMode,\n reset: reset$1\n });\n\n const init$g = () => {\n let state = {};\n const set = (id, data) => {\n state[id] = data;\n };\n const get = id => get$g(state, id);\n const clear = id => {\n if (isNonNullable(id)) {\n delete state[id];\n } else {\n state = {};\n }\n };\n return nu$8({\n readState: () => state,\n clear,\n set,\n get\n });\n };\n\n var PositioningState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$g\n });\n\n const Positioning = create$4({\n fields: PositionSchema,\n name: 'positioning',\n active: ActivePosition,\n apis: PositionApis,\n state: PositioningState\n });\n\n const isConnected = comp => comp.getSystem().isConnected();\n const fireDetaching = component => {\n emit(component, detachedFromDom());\n const children = component.components();\n each$1(children, fireDetaching);\n };\n const fireAttaching = component => {\n const children = component.components();\n each$1(children, fireAttaching);\n emit(component, attachedToDom());\n };\n const virtualAttach = (parent, child) => {\n parent.getSystem().addToWorld(child);\n if (inBody(parent.element)) {\n fireAttaching(child);\n }\n };\n const virtualDetach = comp => {\n fireDetaching(comp);\n comp.getSystem().removeFromWorld(comp);\n };\n const attach$1 = (parent, child) => {\n append$2(parent.element, child.element);\n };\n const detachChildren$1 = component => {\n each$1(component.components(), childComp => remove$5(childComp.element));\n empty(component.element);\n component.syncComponents();\n };\n const replaceChildren = (component, newSpecs, buildNewChildren) => {\n const subs = component.components();\n detachChildren$1(component);\n const newChildren = buildNewChildren(newSpecs);\n const deleted = difference(subs, newChildren);\n each$1(deleted, comp => {\n fireDetaching(comp);\n component.getSystem().removeFromWorld(comp);\n });\n each$1(newChildren, childComp => {\n if (!isConnected(childComp)) {\n component.getSystem().addToWorld(childComp);\n attach$1(component, childComp);\n if (inBody(component.element)) {\n fireAttaching(childComp);\n }\n } else {\n attach$1(component, childComp);\n }\n });\n component.syncComponents();\n };\n const virtualReplaceChildren = (component, newSpecs, buildNewChildren) => {\n const subs = component.components();\n const existingComps = bind$3(newSpecs, spec => getPremade(spec).toArray());\n each$1(subs, childComp => {\n if (!contains$2(existingComps, childComp)) {\n virtualDetach(childComp);\n }\n });\n const newChildren = buildNewChildren(newSpecs);\n const deleted = difference(subs, newChildren);\n each$1(deleted, deletedComp => {\n if (isConnected(deletedComp)) {\n virtualDetach(deletedComp);\n }\n });\n each$1(newChildren, childComp => {\n if (!isConnected(childComp)) {\n virtualAttach(component, childComp);\n }\n });\n component.syncComponents();\n };\n\n const attach = (parent, child) => {\n attachWith(parent, child, append$2);\n };\n const attachWith = (parent, child, insertion) => {\n parent.getSystem().addToWorld(child);\n insertion(parent.element, child.element);\n if (inBody(parent.element)) {\n fireAttaching(child);\n }\n parent.syncComponents();\n };\n const doDetach = component => {\n fireDetaching(component);\n remove$5(component.element);\n component.getSystem().removeFromWorld(component);\n };\n const detach = component => {\n const parent$1 = parent(component.element).bind(p => component.getSystem().getByDom(p).toOptional());\n doDetach(component);\n parent$1.each(p => {\n p.syncComponents();\n });\n };\n const detachChildren = component => {\n const subs = component.components();\n each$1(subs, doDetach);\n empty(component.element);\n component.syncComponents();\n };\n const attachSystem = (element, guiSystem) => {\n attachSystemWith(element, guiSystem, append$2);\n };\n const attachSystemAfter = (element, guiSystem) => {\n attachSystemWith(element, guiSystem, after$2);\n };\n const attachSystemWith = (element, guiSystem, inserter) => {\n inserter(element, guiSystem.element);\n const children$1 = children(guiSystem.element);\n each$1(children$1, child => {\n guiSystem.getByDom(child).each(fireAttaching);\n });\n };\n const detachSystem = guiSystem => {\n const children$1 = children(guiSystem.element);\n each$1(children$1, child => {\n guiSystem.getByDom(child).each(fireDetaching);\n });\n remove$5(guiSystem.element);\n };\n\n const rebuild = (sandbox, sConfig, sState, data) => {\n sState.get().each(_data => {\n detachChildren(sandbox);\n });\n const point = sConfig.getAttachPoint(sandbox);\n attach(point, sandbox);\n const built = sandbox.getSystem().build(data);\n attach(sandbox, built);\n sState.set(built);\n return built;\n };\n const open$1 = (sandbox, sConfig, sState, data) => {\n const newState = rebuild(sandbox, sConfig, sState, data);\n sConfig.onOpen(sandbox, newState);\n return newState;\n };\n const setContent = (sandbox, sConfig, sState, data) => sState.get().map(() => rebuild(sandbox, sConfig, sState, data));\n const openWhileCloaked = (sandbox, sConfig, sState, data, transaction) => {\n cloak(sandbox, sConfig);\n open$1(sandbox, sConfig, sState, data);\n transaction();\n decloak(sandbox, sConfig);\n };\n const close$1 = (sandbox, sConfig, sState) => {\n sState.get().each(data => {\n detachChildren(sandbox);\n detach(sandbox);\n sConfig.onClose(sandbox, data);\n sState.clear();\n });\n };\n const isOpen$1 = (_sandbox, _sConfig, sState) => sState.isOpen();\n const isPartOf = (sandbox, sConfig, sState, queryElem) => isOpen$1(sandbox, sConfig, sState) && sState.get().exists(data => sConfig.isPartOf(sandbox, data, queryElem));\n const getState$2 = (_sandbox, _sConfig, sState) => sState.get();\n const store = (sandbox, cssKey, attr, newValue) => {\n getRaw(sandbox.element, cssKey).fold(() => {\n remove$7(sandbox.element, attr);\n }, v => {\n set$9(sandbox.element, attr, v);\n });\n set$8(sandbox.element, cssKey, newValue);\n };\n const restore = (sandbox, cssKey, attr) => {\n getOpt(sandbox.element, attr).fold(() => remove$6(sandbox.element, cssKey), oldValue => set$8(sandbox.element, cssKey, oldValue));\n };\n const cloak = (sandbox, sConfig, _sState) => {\n const sink = sConfig.getAttachPoint(sandbox);\n set$8(sandbox.element, 'position', Positioning.getMode(sink));\n store(sandbox, 'visibility', sConfig.cloakVisibilityAttr, 'hidden');\n };\n const hasPosition = element => exists([\n 'top',\n 'left',\n 'right',\n 'bottom'\n ], pos => getRaw(element, pos).isSome());\n const decloak = (sandbox, sConfig, _sState) => {\n if (!hasPosition(sandbox.element)) {\n remove$6(sandbox.element, 'position');\n }\n restore(sandbox, 'visibility', sConfig.cloakVisibilityAttr);\n };\n\n var SandboxApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n cloak: cloak,\n decloak: decloak,\n open: open$1,\n openWhileCloaked: openWhileCloaked,\n close: close$1,\n isOpen: isOpen$1,\n isPartOf: isPartOf,\n getState: getState$2,\n setContent: setContent\n });\n\n const events$g = (sandboxConfig, sandboxState) => derive$2([run$1(sandboxClose(), (sandbox, _simulatedEvent) => {\n close$1(sandbox, sandboxConfig, sandboxState);\n })]);\n\n var ActiveSandbox = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$g\n });\n\n var SandboxSchema = [\n onHandler('onOpen'),\n onHandler('onClose'),\n required$1('isPartOf'),\n required$1('getAttachPoint'),\n defaulted('cloakVisibilityAttr', 'data-precloak-visibility')\n ];\n\n const init$f = () => {\n const contents = value$2();\n const readState = constant$1('not-implemented');\n return nu$8({\n readState,\n isOpen: contents.isSet,\n clear: contents.clear,\n set: contents.set,\n get: contents.get\n });\n };\n\n var SandboxState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$f\n });\n\n const Sandboxing = create$4({\n fields: SandboxSchema,\n name: 'sandboxing',\n active: ActiveSandbox,\n apis: SandboxApis,\n state: SandboxState\n });\n\n const dismissPopups = constant$1('dismiss.popups');\n const repositionPopups = constant$1('reposition.popups');\n const mouseReleased = constant$1('mouse.released');\n\n const schema$x = objOfOnly([\n defaulted('isExtraPart', never),\n optionObjOf('fireEventInstead', [defaulted('event', dismissRequested())])\n ]);\n const receivingChannel$1 = rawSpec => {\n const detail = asRawOrDie$1('Dismissal', schema$x, rawSpec);\n return {\n [dismissPopups()]: {\n schema: objOfOnly([required$1('target')]),\n onReceive: (sandbox, data) => {\n if (Sandboxing.isOpen(sandbox)) {\n const isPart = Sandboxing.isPartOf(sandbox, data.target) || detail.isExtraPart(sandbox, data.target);\n if (!isPart) {\n detail.fireEventInstead.fold(() => Sandboxing.close(sandbox), fe => emit(sandbox, fe.event));\n }\n }\n }\n }\n };\n };\n\n const schema$w = objOfOnly([\n optionObjOf('fireEventInstead', [defaulted('event', repositionRequested())]),\n requiredFunction('doReposition')\n ]);\n const receivingChannel = rawSpec => {\n const detail = asRawOrDie$1('Reposition', schema$w, rawSpec);\n return {\n [repositionPopups()]: {\n onReceive: sandbox => {\n if (Sandboxing.isOpen(sandbox)) {\n detail.fireEventInstead.fold(() => detail.doReposition(sandbox), fe => emit(sandbox, fe.event));\n }\n }\n }\n };\n };\n\n const onLoad$5 = (component, repConfig, repState) => {\n repConfig.store.manager.onLoad(component, repConfig, repState);\n };\n const onUnload$2 = (component, repConfig, repState) => {\n repConfig.store.manager.onUnload(component, repConfig, repState);\n };\n const setValue$3 = (component, repConfig, repState, data) => {\n repConfig.store.manager.setValue(component, repConfig, repState, data);\n };\n const getValue$3 = (component, repConfig, repState) => repConfig.store.manager.getValue(component, repConfig, repState);\n const getState$1 = (component, repConfig, repState) => repState;\n\n var RepresentApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n onLoad: onLoad$5,\n onUnload: onUnload$2,\n setValue: setValue$3,\n getValue: getValue$3,\n getState: getState$1\n });\n\n const events$f = (repConfig, repState) => {\n const es = repConfig.resetOnDom ? [\n runOnAttached((comp, _se) => {\n onLoad$5(comp, repConfig, repState);\n }),\n runOnDetached((comp, _se) => {\n onUnload$2(comp, repConfig, repState);\n })\n ] : [loadEvent(repConfig, repState, onLoad$5)];\n return derive$2(es);\n };\n\n var ActiveRepresenting = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$f\n });\n\n const memory$1 = () => {\n const data = Cell(null);\n const readState = () => ({\n mode: 'memory',\n value: data.get()\n });\n const isNotSet = () => data.get() === null;\n const clear = () => {\n data.set(null);\n };\n return nu$8({\n set: data.set,\n get: data.get,\n isNotSet,\n clear,\n readState\n });\n };\n const manual = () => {\n const readState = noop;\n return nu$8({ readState });\n };\n const dataset = () => {\n const dataByValue = Cell({});\n const dataByText = Cell({});\n const readState = () => ({\n mode: 'dataset',\n dataByValue: dataByValue.get(),\n dataByText: dataByText.get()\n });\n const clear = () => {\n dataByValue.set({});\n dataByText.set({});\n };\n const lookup = itemString => get$g(dataByValue.get(), itemString).orThunk(() => get$g(dataByText.get(), itemString));\n const update = items => {\n const currentDataByValue = dataByValue.get();\n const currentDataByText = dataByText.get();\n const newDataByValue = {};\n const newDataByText = {};\n each$1(items, item => {\n newDataByValue[item.value] = item;\n get$g(item, 'meta').each(meta => {\n get$g(meta, 'text').each(text => {\n newDataByText[text] = item;\n });\n });\n });\n dataByValue.set({\n ...currentDataByValue,\n ...newDataByValue\n });\n dataByText.set({\n ...currentDataByText,\n ...newDataByText\n });\n };\n return nu$8({\n readState,\n lookup,\n update,\n clear\n });\n };\n const init$e = spec => spec.store.manager.state(spec);\n\n var RepresentState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n memory: memory$1,\n dataset: dataset,\n manual: manual,\n init: init$e\n });\n\n const setValue$2 = (component, repConfig, repState, data) => {\n const store = repConfig.store;\n repState.update([data]);\n store.setValue(component, data);\n repConfig.onSetValue(component, data);\n };\n const getValue$2 = (component, repConfig, repState) => {\n const store = repConfig.store;\n const key = store.getDataKey(component);\n return repState.lookup(key).getOrThunk(() => store.getFallbackEntry(key));\n };\n const onLoad$4 = (component, repConfig, repState) => {\n const store = repConfig.store;\n store.initialValue.each(data => {\n setValue$2(component, repConfig, repState, data);\n });\n };\n const onUnload$1 = (component, repConfig, repState) => {\n repState.clear();\n };\n var DatasetStore = [\n option$3('initialValue'),\n required$1('getFallbackEntry'),\n required$1('getDataKey'),\n required$1('setValue'),\n output$1('manager', {\n setValue: setValue$2,\n getValue: getValue$2,\n onLoad: onLoad$4,\n onUnload: onUnload$1,\n state: dataset\n })\n ];\n\n const getValue$1 = (component, repConfig, _repState) => repConfig.store.getValue(component);\n const setValue$1 = (component, repConfig, _repState, data) => {\n repConfig.store.setValue(component, data);\n repConfig.onSetValue(component, data);\n };\n const onLoad$3 = (component, repConfig, _repState) => {\n repConfig.store.initialValue.each(data => {\n repConfig.store.setValue(component, data);\n });\n };\n var ManualStore = [\n required$1('getValue'),\n defaulted('setValue', noop),\n option$3('initialValue'),\n output$1('manager', {\n setValue: setValue$1,\n getValue: getValue$1,\n onLoad: onLoad$3,\n onUnload: noop,\n state: NoState.init\n })\n ];\n\n const setValue = (component, repConfig, repState, data) => {\n repState.set(data);\n repConfig.onSetValue(component, data);\n };\n const getValue = (component, repConfig, repState) => repState.get();\n const onLoad$2 = (component, repConfig, repState) => {\n repConfig.store.initialValue.each(initVal => {\n if (repState.isNotSet()) {\n repState.set(initVal);\n }\n });\n };\n const onUnload = (component, repConfig, repState) => {\n repState.clear();\n };\n var MemoryStore = [\n option$3('initialValue'),\n output$1('manager', {\n setValue,\n getValue,\n onLoad: onLoad$2,\n onUnload,\n state: memory$1\n })\n ];\n\n var RepresentSchema = [\n defaultedOf('store', { mode: 'memory' }, choose$1('mode', {\n memory: MemoryStore,\n manual: ManualStore,\n dataset: DatasetStore\n })),\n onHandler('onSetValue'),\n defaulted('resetOnDom', false)\n ];\n\n const Representing = create$4({\n fields: RepresentSchema,\n name: 'representing',\n active: ActiveRepresenting,\n apis: RepresentApis,\n extra: {\n setValueFrom: (component, source) => {\n const value = Representing.getValue(source);\n Representing.setValue(component, value);\n }\n },\n state: RepresentState\n });\n\n const field = (name, forbidden) => defaultedObjOf(name, {}, map$2(forbidden, f => forbid(f.name(), 'Cannot configure ' + f.name() + ' for ' + name)).concat([customField('dump', identity)]));\n const get$3 = data => data.dump;\n const augment = (data, original) => ({\n ...derive$1(original),\n ...data.dump\n });\n const SketchBehaviours = {\n field,\n augment,\n get: get$3\n };\n\n const _placeholder = 'placeholder';\n const adt$3 = Adt.generate([\n {\n single: [\n 'required',\n 'valueThunk'\n ]\n },\n {\n multiple: [\n 'required',\n 'valueThunks'\n ]\n }\n ]);\n const isSubstituted = spec => has$2(spec, 'uiType');\n const subPlaceholder = (owner, detail, compSpec, placeholders) => {\n if (owner.exists(o => o !== compSpec.owner)) {\n return adt$3.single(true, constant$1(compSpec));\n }\n return get$g(placeholders, compSpec.name).fold(() => {\n throw new Error('Unknown placeholder component: ' + compSpec.name + '\\nKnown: [' + keys(placeholders) + ']\\nNamespace: ' + owner.getOr('none') + '\\nSpec: ' + JSON.stringify(compSpec, null, 2));\n }, newSpec => newSpec.replace());\n };\n const scan = (owner, detail, compSpec, placeholders) => {\n if (isSubstituted(compSpec) && compSpec.uiType === _placeholder) {\n return subPlaceholder(owner, detail, compSpec, placeholders);\n } else {\n return adt$3.single(false, constant$1(compSpec));\n }\n };\n const substitute = (owner, detail, compSpec, placeholders) => {\n const base = scan(owner, detail, compSpec, placeholders);\n return base.fold((req, valueThunk) => {\n const value = isSubstituted(compSpec) ? valueThunk(detail, compSpec.config, compSpec.validated) : valueThunk(detail);\n const childSpecs = get$g(value, 'components').getOr([]);\n const substituted = bind$3(childSpecs, c => substitute(owner, detail, c, placeholders));\n return [{\n ...value,\n components: substituted\n }];\n }, (req, valuesThunk) => {\n if (isSubstituted(compSpec)) {\n const values = valuesThunk(detail, compSpec.config, compSpec.validated);\n const preprocessor = compSpec.validated.preprocess.getOr(identity);\n return preprocessor(values);\n } else {\n return valuesThunk(detail);\n }\n });\n };\n const substituteAll = (owner, detail, components, placeholders) => bind$3(components, c => substitute(owner, detail, c, placeholders));\n const oneReplace = (label, replacements) => {\n let called = false;\n const used = () => called;\n const replace = () => {\n if (called) {\n throw new Error('Trying to use the same placeholder more than once: ' + label);\n }\n called = true;\n return replacements;\n };\n const required = () => replacements.fold((req, _) => req, (req, _) => req);\n return {\n name: constant$1(label),\n required,\n used,\n replace\n };\n };\n const substitutePlaces = (owner, detail, components, placeholders) => {\n const ps = map$1(placeholders, (ph, name) => oneReplace(name, ph));\n const outcome = substituteAll(owner, detail, components, ps);\n each(ps, p => {\n if (p.used() === false && p.required()) {\n throw new Error('Placeholder: ' + p.name() + ' was not found in components list\\nNamespace: ' + owner.getOr('none') + '\\nComponents: ' + JSON.stringify(detail.components, null, 2));\n }\n });\n return outcome;\n };\n const single$2 = adt$3.single;\n const multiple = adt$3.multiple;\n const placeholder = constant$1(_placeholder);\n\n const adt$2 = Adt.generate([\n { required: ['data'] },\n { external: ['data'] },\n { optional: ['data'] },\n { group: ['data'] }\n ]);\n const fFactory = defaulted('factory', { sketch: identity });\n const fSchema = defaulted('schema', []);\n const fName = required$1('name');\n const fPname = field$1('pname', 'pname', defaultedThunk(typeSpec => '<alloy.' + generate$6(typeSpec.name) + '>'), anyValue());\n const fGroupSchema = customField('schema', () => [option$3('preprocess')]);\n const fDefaults = defaulted('defaults', constant$1({}));\n const fOverrides = defaulted('overrides', constant$1({}));\n const requiredSpec = objOf([\n fFactory,\n fSchema,\n fName,\n fPname,\n fDefaults,\n fOverrides\n ]);\n const externalSpec = objOf([\n fFactory,\n fSchema,\n fName,\n fDefaults,\n fOverrides\n ]);\n const optionalSpec = objOf([\n fFactory,\n fSchema,\n fName,\n fPname,\n fDefaults,\n fOverrides\n ]);\n const groupSpec = objOf([\n fFactory,\n fGroupSchema,\n fName,\n required$1('unit'),\n fPname,\n fDefaults,\n fOverrides\n ]);\n const asNamedPart = part => {\n return part.fold(Optional.some, Optional.none, Optional.some, Optional.some);\n };\n const name$2 = part => {\n const get = data => data.name;\n return part.fold(get, get, get, get);\n };\n const asCommon = part => {\n return part.fold(identity, identity, identity, identity);\n };\n const convert = (adtConstructor, partSchema) => spec => {\n const data = asRawOrDie$1('Converting part type', partSchema, spec);\n return adtConstructor(data);\n };\n const required = convert(adt$2.required, requiredSpec);\n const external = convert(adt$2.external, externalSpec);\n const optional = convert(adt$2.optional, optionalSpec);\n const group = convert(adt$2.group, groupSpec);\n const original = constant$1('entirety');\n\n var PartType = /*#__PURE__*/Object.freeze({\n __proto__: null,\n required: required,\n external: external,\n optional: optional,\n group: group,\n asNamedPart: asNamedPart,\n name: name$2,\n asCommon: asCommon,\n original: original\n });\n\n const combine = (detail, data, partSpec, partValidated) => deepMerge(data.defaults(detail, partSpec, partValidated), partSpec, { uid: detail.partUids[data.name] }, data.overrides(detail, partSpec, partValidated));\n const subs = (owner, detail, parts) => {\n const internals = {};\n const externals = {};\n each$1(parts, part => {\n part.fold(data => {\n internals[data.pname] = single$2(true, (detail, partSpec, partValidated) => data.factory.sketch(combine(detail, data, partSpec, partValidated)));\n }, data => {\n const partSpec = detail.parts[data.name];\n externals[data.name] = constant$1(data.factory.sketch(combine(detail, data, partSpec[original()]), partSpec));\n }, data => {\n internals[data.pname] = single$2(false, (detail, partSpec, partValidated) => data.factory.sketch(combine(detail, data, partSpec, partValidated)));\n }, data => {\n internals[data.pname] = multiple(true, (detail, _partSpec, _partValidated) => {\n const units = detail[data.name];\n return map$2(units, u => data.factory.sketch(deepMerge(data.defaults(detail, u, _partValidated), u, data.overrides(detail, u))));\n });\n });\n });\n return {\n internals: constant$1(internals),\n externals: constant$1(externals)\n };\n };\n\n const generate$3 = (owner, parts) => {\n const r = {};\n each$1(parts, part => {\n asNamedPart(part).each(np => {\n const g = doGenerateOne(owner, np.pname);\n r[np.name] = config => {\n const validated = asRawOrDie$1('Part: ' + np.name + ' in ' + owner, objOf(np.schema), config);\n return {\n ...g,\n config,\n validated\n };\n };\n });\n });\n return r;\n };\n const doGenerateOne = (owner, pname) => ({\n uiType: placeholder(),\n owner,\n name: pname\n });\n const generateOne$1 = (owner, pname, config) => ({\n uiType: placeholder(),\n owner,\n name: pname,\n config,\n validated: {}\n });\n const schemas = parts => bind$3(parts, part => part.fold(Optional.none, Optional.some, Optional.none, Optional.none).map(data => requiredObjOf(data.name, data.schema.concat([snapshot(original())]))).toArray());\n const names = parts => map$2(parts, name$2);\n const substitutes = (owner, detail, parts) => subs(owner, detail, parts);\n const components$1 = (owner, detail, internals) => substitutePlaces(Optional.some(owner), detail, detail.components, internals);\n const getPart = (component, detail, partKey) => {\n const uid = detail.partUids[partKey];\n return component.getSystem().getByUid(uid).toOptional();\n };\n const getPartOrDie = (component, detail, partKey) => getPart(component, detail, partKey).getOrDie('Could not find part: ' + partKey);\n const getParts = (component, detail, partKeys) => {\n const r = {};\n const uids = detail.partUids;\n const system = component.getSystem();\n each$1(partKeys, pk => {\n r[pk] = constant$1(system.getByUid(uids[pk]));\n });\n return r;\n };\n const getAllParts = (component, detail) => {\n const system = component.getSystem();\n return map$1(detail.partUids, (pUid, _k) => constant$1(system.getByUid(pUid)));\n };\n const getAllPartNames = detail => keys(detail.partUids);\n const getPartsOrDie = (component, detail, partKeys) => {\n const r = {};\n const uids = detail.partUids;\n const system = component.getSystem();\n each$1(partKeys, pk => {\n r[pk] = constant$1(system.getByUid(uids[pk]).getOrDie());\n });\n return r;\n };\n const defaultUids = (baseUid, partTypes) => {\n const partNames = names(partTypes);\n return wrapAll(map$2(partNames, pn => ({\n key: pn,\n value: baseUid + '-' + pn\n })));\n };\n const defaultUidsSchema = partTypes => field$1('partUids', 'partUids', mergeWithThunk(spec => defaultUids(spec.uid, partTypes)), anyValue());\n\n var AlloyParts = /*#__PURE__*/Object.freeze({\n __proto__: null,\n generate: generate$3,\n generateOne: generateOne$1,\n schemas: schemas,\n names: names,\n substitutes: substitutes,\n components: components$1,\n defaultUids: defaultUids,\n defaultUidsSchema: defaultUidsSchema,\n getAllParts: getAllParts,\n getAllPartNames: getAllPartNames,\n getPart: getPart,\n getPartOrDie: getPartOrDie,\n getParts: getParts,\n getPartsOrDie: getPartsOrDie\n });\n\n const base = (partSchemas, partUidsSchemas) => {\n const ps = partSchemas.length > 0 ? [requiredObjOf('parts', partSchemas)] : [];\n return ps.concat([\n required$1('uid'),\n defaulted('dom', {}),\n defaulted('components', []),\n snapshot('originalSpec'),\n defaulted('debug.sketcher', {})\n ]).concat(partUidsSchemas);\n };\n const asRawOrDie = (label, schema, spec, partSchemas, partUidsSchemas) => {\n const baseS = base(partSchemas, partUidsSchemas);\n return asRawOrDie$1(label + ' [SpecSchema]', objOfOnly(baseS.concat(schema)), spec);\n };\n\n const single$1 = (owner, schema, factory, spec) => {\n const specWithUid = supplyUid(spec);\n const detail = asRawOrDie(owner, schema, specWithUid, [], []);\n return factory(detail, specWithUid);\n };\n const composite$1 = (owner, schema, partTypes, factory, spec) => {\n const specWithUid = supplyUid(spec);\n const partSchemas = schemas(partTypes);\n const partUidsSchema = defaultUidsSchema(partTypes);\n const detail = asRawOrDie(owner, schema, specWithUid, partSchemas, [partUidsSchema]);\n const subs = substitutes(owner, detail, partTypes);\n const components = components$1(owner, detail, subs.internals());\n return factory(detail, components, specWithUid, subs.externals());\n };\n const hasUid = spec => has$2(spec, 'uid');\n const supplyUid = spec => {\n return hasUid(spec) ? spec : {\n ...spec,\n uid: generate$5('uid')\n };\n };\n\n const isSketchSpec = spec => {\n return spec.uid !== undefined;\n };\n const singleSchema = objOfOnly([\n required$1('name'),\n required$1('factory'),\n required$1('configFields'),\n defaulted('apis', {}),\n defaulted('extraApis', {})\n ]);\n const compositeSchema = objOfOnly([\n required$1('name'),\n required$1('factory'),\n required$1('configFields'),\n required$1('partFields'),\n defaulted('apis', {}),\n defaulted('extraApis', {})\n ]);\n const single = rawConfig => {\n const config = asRawOrDie$1('Sketcher for ' + rawConfig.name, singleSchema, rawConfig);\n const sketch = spec => single$1(config.name, config.configFields, config.factory, spec);\n const apis = map$1(config.apis, makeApi);\n const extraApis = map$1(config.extraApis, (f, k) => markAsExtraApi(f, k));\n return {\n name: config.name,\n configFields: config.configFields,\n sketch,\n ...apis,\n ...extraApis\n };\n };\n const composite = rawConfig => {\n const config = asRawOrDie$1('Sketcher for ' + rawConfig.name, compositeSchema, rawConfig);\n const sketch = spec => composite$1(config.name, config.configFields, config.partFields, config.factory, spec);\n const parts = generate$3(config.name, config.partFields);\n const apis = map$1(config.apis, makeApi);\n const extraApis = map$1(config.extraApis, (f, k) => markAsExtraApi(f, k));\n return {\n name: config.name,\n partFields: config.partFields,\n configFields: config.configFields,\n sketch,\n parts,\n ...apis,\n ...extraApis\n };\n };\n\n const inside = target => isTag('input')(target) && get$f(target, 'type') !== 'radio' || isTag('textarea')(target);\n\n const getCurrent = (component, composeConfig, _composeState) => composeConfig.find(component);\n\n var ComposeApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getCurrent: getCurrent\n });\n\n const ComposeSchema = [required$1('find')];\n\n const Composing = create$4({\n fields: ComposeSchema,\n name: 'composing',\n apis: ComposeApis\n });\n\n const nativeDisabled = [\n 'input',\n 'button',\n 'textarea',\n 'select'\n ];\n const onLoad$1 = (component, disableConfig, disableState) => {\n const f = disableConfig.disabled() ? disable : enable;\n f(component, disableConfig);\n };\n const hasNative = (component, config) => config.useNative === true && contains$2(nativeDisabled, name$3(component.element));\n const nativeIsDisabled = component => has$1(component.element, 'disabled');\n const nativeDisable = component => {\n set$9(component.element, 'disabled', 'disabled');\n };\n const nativeEnable = component => {\n remove$7(component.element, 'disabled');\n };\n const ariaIsDisabled = component => get$f(component.element, 'aria-disabled') === 'true';\n const ariaDisable = component => {\n set$9(component.element, 'aria-disabled', 'true');\n };\n const ariaEnable = component => {\n set$9(component.element, 'aria-disabled', 'false');\n };\n const disable = (component, disableConfig, _disableState) => {\n disableConfig.disableClass.each(disableClass => {\n add$2(component.element, disableClass);\n });\n const f = hasNative(component, disableConfig) ? nativeDisable : ariaDisable;\n f(component);\n disableConfig.onDisabled(component);\n };\n const enable = (component, disableConfig, _disableState) => {\n disableConfig.disableClass.each(disableClass => {\n remove$2(component.element, disableClass);\n });\n const f = hasNative(component, disableConfig) ? nativeEnable : ariaEnable;\n f(component);\n disableConfig.onEnabled(component);\n };\n const isDisabled = (component, disableConfig) => hasNative(component, disableConfig) ? nativeIsDisabled(component) : ariaIsDisabled(component);\n const set$4 = (component, disableConfig, disableState, disabled) => {\n const f = disabled ? disable : enable;\n f(component, disableConfig);\n };\n\n var DisableApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n enable: enable,\n disable: disable,\n isDisabled: isDisabled,\n onLoad: onLoad$1,\n set: set$4\n });\n\n const exhibit$5 = (base, disableConfig) => nu$7({ classes: disableConfig.disabled() ? disableConfig.disableClass.toArray() : [] });\n const events$e = (disableConfig, disableState) => derive$2([\n abort(execute$5(), (component, _simulatedEvent) => isDisabled(component, disableConfig)),\n loadEvent(disableConfig, disableState, onLoad$1)\n ]);\n\n var ActiveDisable = /*#__PURE__*/Object.freeze({\n __proto__: null,\n exhibit: exhibit$5,\n events: events$e\n });\n\n var DisableSchema = [\n defaultedFunction('disabled', never),\n defaulted('useNative', true),\n option$3('disableClass'),\n onHandler('onDisabled'),\n onHandler('onEnabled')\n ];\n\n const Disabling = create$4({\n fields: DisableSchema,\n name: 'disabling',\n active: ActiveDisable,\n apis: DisableApis\n });\n\n const dehighlightAllExcept = (component, hConfig, hState, skip) => {\n const highlighted = descendants(component.element, '.' + hConfig.highlightClass);\n each$1(highlighted, h => {\n const shouldSkip = exists(skip, skipComp => eq(skipComp.element, h));\n if (!shouldSkip) {\n remove$2(h, hConfig.highlightClass);\n component.getSystem().getByDom(h).each(target => {\n hConfig.onDehighlight(component, target);\n emit(target, dehighlight$1());\n });\n }\n });\n };\n const dehighlightAll = (component, hConfig, hState) => dehighlightAllExcept(component, hConfig, hState, []);\n const dehighlight = (component, hConfig, hState, target) => {\n if (isHighlighted(component, hConfig, hState, target)) {\n remove$2(target.element, hConfig.highlightClass);\n hConfig.onDehighlight(component, target);\n emit(target, dehighlight$1());\n }\n };\n const highlight = (component, hConfig, hState, target) => {\n dehighlightAllExcept(component, hConfig, hState, [target]);\n if (!isHighlighted(component, hConfig, hState, target)) {\n add$2(target.element, hConfig.highlightClass);\n hConfig.onHighlight(component, target);\n emit(target, highlight$1());\n }\n };\n const highlightFirst = (component, hConfig, hState) => {\n getFirst(component, hConfig).each(firstComp => {\n highlight(component, hConfig, hState, firstComp);\n });\n };\n const highlightLast = (component, hConfig, hState) => {\n getLast(component, hConfig).each(lastComp => {\n highlight(component, hConfig, hState, lastComp);\n });\n };\n const highlightAt = (component, hConfig, hState, index) => {\n getByIndex(component, hConfig, hState, index).fold(err => {\n throw err;\n }, firstComp => {\n highlight(component, hConfig, hState, firstComp);\n });\n };\n const highlightBy = (component, hConfig, hState, predicate) => {\n const candidates = getCandidates(component, hConfig);\n const targetComp = find$5(candidates, predicate);\n targetComp.each(c => {\n highlight(component, hConfig, hState, c);\n });\n };\n const isHighlighted = (component, hConfig, hState, queryTarget) => has(queryTarget.element, hConfig.highlightClass);\n const getHighlighted = (component, hConfig, _hState) => descendant(component.element, '.' + hConfig.highlightClass).bind(e => component.getSystem().getByDom(e).toOptional());\n const getByIndex = (component, hConfig, hState, index) => {\n const items = descendants(component.element, '.' + hConfig.itemClass);\n return Optional.from(items[index]).fold(() => Result.error(new Error('No element found with index ' + index)), component.getSystem().getByDom);\n };\n const getFirst = (component, hConfig, _hState) => descendant(component.element, '.' + hConfig.itemClass).bind(e => component.getSystem().getByDom(e).toOptional());\n const getLast = (component, hConfig, _hState) => {\n const items = descendants(component.element, '.' + hConfig.itemClass);\n const last = items.length > 0 ? Optional.some(items[items.length - 1]) : Optional.none();\n return last.bind(c => component.getSystem().getByDom(c).toOptional());\n };\n const getDelta$2 = (component, hConfig, hState, delta) => {\n const items = descendants(component.element, '.' + hConfig.itemClass);\n const current = findIndex$1(items, item => has(item, hConfig.highlightClass));\n return current.bind(selected => {\n const dest = cycleBy(selected, delta, 0, items.length - 1);\n return component.getSystem().getByDom(items[dest]).toOptional();\n });\n };\n const getPrevious = (component, hConfig, hState) => getDelta$2(component, hConfig, hState, -1);\n const getNext = (component, hConfig, hState) => getDelta$2(component, hConfig, hState, +1);\n const getCandidates = (component, hConfig, _hState) => {\n const items = descendants(component.element, '.' + hConfig.itemClass);\n return cat(map$2(items, i => component.getSystem().getByDom(i).toOptional()));\n };\n\n var HighlightApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n dehighlightAll: dehighlightAll,\n dehighlight: dehighlight,\n highlight: highlight,\n highlightFirst: highlightFirst,\n highlightLast: highlightLast,\n highlightAt: highlightAt,\n highlightBy: highlightBy,\n isHighlighted: isHighlighted,\n getHighlighted: getHighlighted,\n getFirst: getFirst,\n getLast: getLast,\n getPrevious: getPrevious,\n getNext: getNext,\n getCandidates: getCandidates\n });\n\n var HighlightSchema = [\n required$1('highlightClass'),\n required$1('itemClass'),\n onHandler('onHighlight'),\n onHandler('onDehighlight')\n ];\n\n const Highlighting = create$4({\n fields: HighlightSchema,\n name: 'highlighting',\n apis: HighlightApis\n });\n\n const BACKSPACE = [8];\n const TAB = [9];\n const ENTER = [13];\n const ESCAPE = [27];\n const SPACE = [32];\n const LEFT = [37];\n const UP = [38];\n const RIGHT = [39];\n const DOWN = [40];\n\n const cyclePrev = (values, index, predicate) => {\n const before = reverse(values.slice(0, index));\n const after = reverse(values.slice(index + 1));\n return find$5(before.concat(after), predicate);\n };\n const tryPrev = (values, index, predicate) => {\n const before = reverse(values.slice(0, index));\n return find$5(before, predicate);\n };\n const cycleNext = (values, index, predicate) => {\n const before = values.slice(0, index);\n const after = values.slice(index + 1);\n return find$5(after.concat(before), predicate);\n };\n const tryNext = (values, index, predicate) => {\n const after = values.slice(index + 1);\n return find$5(after, predicate);\n };\n\n const inSet = keys => event => {\n const raw = event.raw;\n return contains$2(keys, raw.which);\n };\n const and = preds => event => forall(preds, pred => pred(event));\n const isShift$1 = event => {\n const raw = event.raw;\n return raw.shiftKey === true;\n };\n const isControl = event => {\n const raw = event.raw;\n return raw.ctrlKey === true;\n };\n const isNotShift = not(isShift$1);\n\n const rule = (matches, action) => ({\n matches,\n classification: action\n });\n const choose = (transitions, event) => {\n const transition = find$5(transitions, t => t.matches(event));\n return transition.map(t => t.classification);\n };\n\n const reportFocusShifting = (component, prevFocus, newFocus) => {\n const noChange = prevFocus.exists(p => newFocus.exists(n => eq(n, p)));\n if (!noChange) {\n emitWith(component, focusShifted(), {\n prevFocus,\n newFocus\n });\n }\n };\n const dom$2 = () => {\n const get = component => search(component.element);\n const set = (component, focusee) => {\n const prevFocus = get(component);\n component.getSystem().triggerFocus(focusee, component.element);\n const newFocus = get(component);\n reportFocusShifting(component, prevFocus, newFocus);\n };\n return {\n get,\n set\n };\n };\n const highlights = () => {\n const get = component => Highlighting.getHighlighted(component).map(item => item.element);\n const set = (component, element) => {\n const prevFocus = get(component);\n component.getSystem().getByDom(element).fold(noop, item => {\n Highlighting.highlight(component, item);\n });\n const newFocus = get(component);\n reportFocusShifting(component, prevFocus, newFocus);\n };\n return {\n get,\n set\n };\n };\n\n var FocusInsideModes;\n (function (FocusInsideModes) {\n FocusInsideModes['OnFocusMode'] = 'onFocus';\n FocusInsideModes['OnEnterOrSpaceMode'] = 'onEnterOrSpace';\n FocusInsideModes['OnApiMode'] = 'onApi';\n }(FocusInsideModes || (FocusInsideModes = {})));\n\n const typical = (infoSchema, stateInit, getKeydownRules, getKeyupRules, optFocusIn) => {\n const schema = () => infoSchema.concat([\n defaulted('focusManager', dom$2()),\n defaultedOf('focusInside', 'onFocus', valueOf(val => contains$2([\n 'onFocus',\n 'onEnterOrSpace',\n 'onApi'\n ], val) ? Result.value(val) : Result.error('Invalid value for focusInside'))),\n output$1('handler', me),\n output$1('state', stateInit),\n output$1('sendFocusIn', optFocusIn)\n ]);\n const processKey = (component, simulatedEvent, getRules, keyingConfig, keyingState) => {\n const rules = getRules(component, simulatedEvent, keyingConfig, keyingState);\n return choose(rules, simulatedEvent.event).bind(rule => rule(component, simulatedEvent, keyingConfig, keyingState));\n };\n const toEvents = (keyingConfig, keyingState) => {\n const onFocusHandler = keyingConfig.focusInside !== FocusInsideModes.OnFocusMode ? Optional.none() : optFocusIn(keyingConfig).map(focusIn => run$1(focus$4(), (component, simulatedEvent) => {\n focusIn(component, keyingConfig, keyingState);\n simulatedEvent.stop();\n }));\n const tryGoInsideComponent = (component, simulatedEvent) => {\n const isEnterOrSpace = inSet(SPACE.concat(ENTER))(simulatedEvent.event);\n if (keyingConfig.focusInside === FocusInsideModes.OnEnterOrSpaceMode && isEnterOrSpace && isSource(component, simulatedEvent)) {\n optFocusIn(keyingConfig).each(focusIn => {\n focusIn(component, keyingConfig, keyingState);\n simulatedEvent.stop();\n });\n }\n };\n const keyboardEvents = [\n run$1(keydown(), (component, simulatedEvent) => {\n processKey(component, simulatedEvent, getKeydownRules, keyingConfig, keyingState).fold(() => {\n tryGoInsideComponent(component, simulatedEvent);\n }, _ => {\n simulatedEvent.stop();\n });\n }),\n run$1(keyup(), (component, simulatedEvent) => {\n processKey(component, simulatedEvent, getKeyupRules, keyingConfig, keyingState).each(_ => {\n simulatedEvent.stop();\n });\n })\n ];\n return derive$2(onFocusHandler.toArray().concat(keyboardEvents));\n };\n const me = {\n schema,\n processKey,\n toEvents\n };\n return me;\n };\n\n const create$2 = cyclicField => {\n const schema = [\n option$3('onEscape'),\n option$3('onEnter'),\n defaulted('selector', '[data-alloy-tabstop=\"true\"]:not(:disabled)'),\n defaulted('firstTabstop', 0),\n defaulted('useTabstopAt', always),\n option$3('visibilitySelector')\n ].concat([cyclicField]);\n const isVisible = (tabbingConfig, element) => {\n const target = tabbingConfig.visibilitySelector.bind(sel => closest$1(element, sel)).getOr(element);\n return get$d(target) > 0;\n };\n const findInitial = (component, tabbingConfig) => {\n const tabstops = descendants(component.element, tabbingConfig.selector);\n const visibles = filter$2(tabstops, elem => isVisible(tabbingConfig, elem));\n return Optional.from(visibles[tabbingConfig.firstTabstop]);\n };\n const findCurrent = (component, tabbingConfig) => tabbingConfig.focusManager.get(component).bind(elem => closest$1(elem, tabbingConfig.selector));\n const isTabstop = (tabbingConfig, element) => isVisible(tabbingConfig, element) && tabbingConfig.useTabstopAt(element);\n const focusIn = (component, tabbingConfig, _tabbingState) => {\n findInitial(component, tabbingConfig).each(target => {\n tabbingConfig.focusManager.set(component, target);\n });\n };\n const goFromTabstop = (component, tabstops, stopIndex, tabbingConfig, cycle) => cycle(tabstops, stopIndex, elem => isTabstop(tabbingConfig, elem)).fold(() => tabbingConfig.cyclic ? Optional.some(true) : Optional.none(), target => {\n tabbingConfig.focusManager.set(component, target);\n return Optional.some(true);\n });\n const go = (component, _simulatedEvent, tabbingConfig, cycle) => {\n const tabstops = descendants(component.element, tabbingConfig.selector);\n return findCurrent(component, tabbingConfig).bind(tabstop => {\n const optStopIndex = findIndex$1(tabstops, curry(eq, tabstop));\n return optStopIndex.bind(stopIndex => goFromTabstop(component, tabstops, stopIndex, tabbingConfig, cycle));\n });\n };\n const goBackwards = (component, simulatedEvent, tabbingConfig) => {\n const navigate = tabbingConfig.cyclic ? cyclePrev : tryPrev;\n return go(component, simulatedEvent, tabbingConfig, navigate);\n };\n const goForwards = (component, simulatedEvent, tabbingConfig) => {\n const navigate = tabbingConfig.cyclic ? cycleNext : tryNext;\n return go(component, simulatedEvent, tabbingConfig, navigate);\n };\n const isFirstChild = elem => parentNode(elem).bind(firstChild).exists(child => eq(child, elem));\n const goFromPseudoTabstop = (component, simulatedEvent, tabbingConfig) => findCurrent(component, tabbingConfig).filter(elem => !tabbingConfig.useTabstopAt(elem)).bind(elem => (isFirstChild(elem) ? goBackwards : goForwards)(component, simulatedEvent, tabbingConfig));\n const execute = (component, simulatedEvent, tabbingConfig) => tabbingConfig.onEnter.bind(f => f(component, simulatedEvent));\n const exit = (component, simulatedEvent, tabbingConfig) => tabbingConfig.onEscape.bind(f => f(component, simulatedEvent));\n const getKeydownRules = constant$1([\n rule(and([\n isShift$1,\n inSet(TAB)\n ]), goBackwards),\n rule(inSet(TAB), goForwards),\n rule(and([\n isNotShift,\n inSet(ENTER)\n ]), execute)\n ]);\n const getKeyupRules = constant$1([\n rule(inSet(ESCAPE), exit),\n rule(inSet(TAB), goFromPseudoTabstop)\n ]);\n return typical(schema, NoState.init, getKeydownRules, getKeyupRules, () => Optional.some(focusIn));\n };\n\n var AcyclicType = create$2(customField('cyclic', never));\n\n var CyclicType = create$2(customField('cyclic', always));\n\n const doDefaultExecute = (component, _simulatedEvent, focused) => {\n dispatch(component, focused, execute$5());\n return Optional.some(true);\n };\n const defaultExecute = (component, simulatedEvent, focused) => {\n const isComplex = inside(focused) && inSet(SPACE)(simulatedEvent.event);\n return isComplex ? Optional.none() : doDefaultExecute(component, simulatedEvent, focused);\n };\n const stopEventForFirefox = (_component, _simulatedEvent) => Optional.some(true);\n\n const schema$v = [\n defaulted('execute', defaultExecute),\n defaulted('useSpace', false),\n defaulted('useEnter', true),\n defaulted('useControlEnter', false),\n defaulted('useDown', false)\n ];\n const execute$4 = (component, simulatedEvent, executeConfig) => executeConfig.execute(component, simulatedEvent, component.element);\n const getKeydownRules$5 = (component, _simulatedEvent, executeConfig, _executeState) => {\n const spaceExec = executeConfig.useSpace && !inside(component.element) ? SPACE : [];\n const enterExec = executeConfig.useEnter ? ENTER : [];\n const downExec = executeConfig.useDown ? DOWN : [];\n const execKeys = spaceExec.concat(enterExec).concat(downExec);\n return [rule(inSet(execKeys), execute$4)].concat(executeConfig.useControlEnter ? [rule(and([\n isControl,\n inSet(ENTER)\n ]), execute$4)] : []);\n };\n const getKeyupRules$5 = (component, _simulatedEvent, executeConfig, _executeState) => executeConfig.useSpace && !inside(component.element) ? [rule(inSet(SPACE), stopEventForFirefox)] : [];\n var ExecutionType = typical(schema$v, NoState.init, getKeydownRules$5, getKeyupRules$5, () => Optional.none());\n\n const flatgrid$1 = () => {\n const dimensions = value$2();\n const setGridSize = (numRows, numColumns) => {\n dimensions.set({\n numRows,\n numColumns\n });\n };\n const getNumRows = () => dimensions.get().map(d => d.numRows);\n const getNumColumns = () => dimensions.get().map(d => d.numColumns);\n return nu$8({\n readState: () => dimensions.get().map(d => ({\n numRows: String(d.numRows),\n numColumns: String(d.numColumns)\n })).getOr({\n numRows: '?',\n numColumns: '?'\n }),\n setGridSize,\n getNumRows,\n getNumColumns\n });\n };\n const init$d = spec => spec.state(spec);\n\n var KeyingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n flatgrid: flatgrid$1,\n init: init$d\n });\n\n const useH = movement => (component, simulatedEvent, config, state) => {\n const move = movement(component.element);\n return use(move, component, simulatedEvent, config, state);\n };\n const west$1 = (moveLeft, moveRight) => {\n const movement = onDirection(moveLeft, moveRight);\n return useH(movement);\n };\n const east$1 = (moveLeft, moveRight) => {\n const movement = onDirection(moveRight, moveLeft);\n return useH(movement);\n };\n const useV = move => (component, simulatedEvent, config, state) => use(move, component, simulatedEvent, config, state);\n const use = (move, component, simulatedEvent, config, state) => {\n const outcome = config.focusManager.get(component).bind(focused => move(component.element, focused, config, state));\n return outcome.map(newFocus => {\n config.focusManager.set(component, newFocus);\n return true;\n });\n };\n const north$1 = useV;\n const south$1 = useV;\n const move$1 = useV;\n\n const isHidden$1 = dom => dom.offsetWidth <= 0 && dom.offsetHeight <= 0;\n const isVisible = element => !isHidden$1(element.dom);\n\n const locate = (candidates, predicate) => findIndex$1(candidates, predicate).map(index => ({\n index,\n candidates\n }));\n\n const locateVisible = (container, current, selector) => {\n const predicate = x => eq(x, current);\n const candidates = descendants(container, selector);\n const visible = filter$2(candidates, isVisible);\n return locate(visible, predicate);\n };\n const findIndex = (elements, target) => findIndex$1(elements, elem => eq(target, elem));\n\n const withGrid = (values, index, numCols, f) => {\n const oldRow = Math.floor(index / numCols);\n const oldColumn = index % numCols;\n return f(oldRow, oldColumn).bind(address => {\n const newIndex = address.row * numCols + address.column;\n return newIndex >= 0 && newIndex < values.length ? Optional.some(values[newIndex]) : Optional.none();\n });\n };\n const cycleHorizontal$1 = (values, index, numRows, numCols, delta) => withGrid(values, index, numCols, (oldRow, oldColumn) => {\n const onLastRow = oldRow === numRows - 1;\n const colsInRow = onLastRow ? values.length - oldRow * numCols : numCols;\n const newColumn = cycleBy(oldColumn, delta, 0, colsInRow - 1);\n return Optional.some({\n row: oldRow,\n column: newColumn\n });\n });\n const cycleVertical$1 = (values, index, numRows, numCols, delta) => withGrid(values, index, numCols, (oldRow, oldColumn) => {\n const newRow = cycleBy(oldRow, delta, 0, numRows - 1);\n const onLastRow = newRow === numRows - 1;\n const colsInRow = onLastRow ? values.length - newRow * numCols : numCols;\n const newCol = clamp(oldColumn, 0, colsInRow - 1);\n return Optional.some({\n row: newRow,\n column: newCol\n });\n });\n const cycleRight$1 = (values, index, numRows, numCols) => cycleHorizontal$1(values, index, numRows, numCols, +1);\n const cycleLeft$1 = (values, index, numRows, numCols) => cycleHorizontal$1(values, index, numRows, numCols, -1);\n const cycleUp$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, -1);\n const cycleDown$1 = (values, index, numRows, numCols) => cycleVertical$1(values, index, numRows, numCols, +1);\n\n const schema$u = [\n required$1('selector'),\n defaulted('execute', defaultExecute),\n onKeyboardHandler('onEscape'),\n defaulted('captureTab', false),\n initSize()\n ];\n const focusIn$3 = (component, gridConfig, _gridState) => {\n descendant(component.element, gridConfig.selector).each(first => {\n gridConfig.focusManager.set(component, first);\n });\n };\n const findCurrent$1 = (component, gridConfig) => gridConfig.focusManager.get(component).bind(elem => closest$1(elem, gridConfig.selector));\n const execute$3 = (component, simulatedEvent, gridConfig, _gridState) => findCurrent$1(component, gridConfig).bind(focused => gridConfig.execute(component, simulatedEvent, focused));\n const doMove$2 = cycle => (element, focused, gridConfig, gridState) => locateVisible(element, focused, gridConfig.selector).bind(identified => cycle(identified.candidates, identified.index, gridState.getNumRows().getOr(gridConfig.initSize.numRows), gridState.getNumColumns().getOr(gridConfig.initSize.numColumns)));\n const handleTab = (_component, _simulatedEvent, gridConfig) => gridConfig.captureTab ? Optional.some(true) : Optional.none();\n const doEscape$1 = (component, simulatedEvent, gridConfig) => gridConfig.onEscape(component, simulatedEvent);\n const moveLeft$3 = doMove$2(cycleLeft$1);\n const moveRight$3 = doMove$2(cycleRight$1);\n const moveNorth$1 = doMove$2(cycleUp$1);\n const moveSouth$1 = doMove$2(cycleDown$1);\n const getKeydownRules$4 = constant$1([\n rule(inSet(LEFT), west$1(moveLeft$3, moveRight$3)),\n rule(inSet(RIGHT), east$1(moveLeft$3, moveRight$3)),\n rule(inSet(UP), north$1(moveNorth$1)),\n rule(inSet(DOWN), south$1(moveSouth$1)),\n rule(and([\n isShift$1,\n inSet(TAB)\n ]), handleTab),\n rule(and([\n isNotShift,\n inSet(TAB)\n ]), handleTab),\n rule(inSet(SPACE.concat(ENTER)), execute$3)\n ]);\n const getKeyupRules$4 = constant$1([\n rule(inSet(ESCAPE), doEscape$1),\n rule(inSet(SPACE), stopEventForFirefox)\n ]);\n var FlatgridType = typical(schema$u, flatgrid$1, getKeydownRules$4, getKeyupRules$4, () => Optional.some(focusIn$3));\n\n const f = (container, selector, current, delta, getNewIndex) => {\n const isDisabledButton = candidate => name$3(candidate) === 'button' && get$f(candidate, 'disabled') === 'disabled';\n const tryNewIndex = (initial, index, candidates) => getNewIndex(initial, index, delta, 0, candidates.length - 1, candidates[index], newIndex => isDisabledButton(candidates[newIndex]) ? tryNewIndex(initial, newIndex, candidates) : Optional.from(candidates[newIndex]));\n return locateVisible(container, current, selector).bind(identified => {\n const index = identified.index;\n const candidates = identified.candidates;\n return tryNewIndex(index, index, candidates);\n });\n };\n const horizontalWithoutCycles = (container, selector, current, delta) => f(container, selector, current, delta, (prevIndex, v, d, min, max, oldCandidate, onNewIndex) => {\n const newIndex = clamp(v + d, min, max);\n return newIndex === prevIndex ? Optional.from(oldCandidate) : onNewIndex(newIndex);\n });\n const horizontal = (container, selector, current, delta) => f(container, selector, current, delta, (prevIndex, v, d, min, max, _oldCandidate, onNewIndex) => {\n const newIndex = cycleBy(v, d, min, max);\n return newIndex === prevIndex ? Optional.none() : onNewIndex(newIndex);\n });\n\n const schema$t = [\n required$1('selector'),\n defaulted('getInitial', Optional.none),\n defaulted('execute', defaultExecute),\n onKeyboardHandler('onEscape'),\n defaulted('executeOnMove', false),\n defaulted('allowVertical', true),\n defaulted('allowHorizontal', true),\n defaulted('cycles', true)\n ];\n const findCurrent = (component, flowConfig) => flowConfig.focusManager.get(component).bind(elem => closest$1(elem, flowConfig.selector));\n const execute$2 = (component, simulatedEvent, flowConfig) => findCurrent(component, flowConfig).bind(focused => flowConfig.execute(component, simulatedEvent, focused));\n const focusIn$2 = (component, flowConfig, _state) => {\n flowConfig.getInitial(component).orThunk(() => descendant(component.element, flowConfig.selector)).each(first => {\n flowConfig.focusManager.set(component, first);\n });\n };\n const moveLeft$2 = (element, focused, info) => (info.cycles ? horizontal : horizontalWithoutCycles)(element, info.selector, focused, -1);\n const moveRight$2 = (element, focused, info) => (info.cycles ? horizontal : horizontalWithoutCycles)(element, info.selector, focused, +1);\n const doMove$1 = movement => (component, simulatedEvent, flowConfig, flowState) => movement(component, simulatedEvent, flowConfig, flowState).bind(() => flowConfig.executeOnMove ? execute$2(component, simulatedEvent, flowConfig) : Optional.some(true));\n const doEscape = (component, simulatedEvent, flowConfig) => flowConfig.onEscape(component, simulatedEvent);\n const getKeydownRules$3 = (_component, _se, flowConfig, _flowState) => {\n const westMovers = [...flowConfig.allowHorizontal ? LEFT : []].concat(flowConfig.allowVertical ? UP : []);\n const eastMovers = [...flowConfig.allowHorizontal ? RIGHT : []].concat(flowConfig.allowVertical ? DOWN : []);\n return [\n rule(inSet(westMovers), doMove$1(west$1(moveLeft$2, moveRight$2))),\n rule(inSet(eastMovers), doMove$1(east$1(moveLeft$2, moveRight$2))),\n rule(inSet(ENTER), execute$2),\n rule(inSet(SPACE), execute$2)\n ];\n };\n const getKeyupRules$3 = constant$1([\n rule(inSet(SPACE), stopEventForFirefox),\n rule(inSet(ESCAPE), doEscape)\n ]);\n var FlowType = typical(schema$t, NoState.init, getKeydownRules$3, getKeyupRules$3, () => Optional.some(focusIn$2));\n\n const toCell = (matrix, rowIndex, columnIndex) => Optional.from(matrix[rowIndex]).bind(row => Optional.from(row[columnIndex]).map(cell => ({\n rowIndex,\n columnIndex,\n cell\n })));\n const cycleHorizontal = (matrix, rowIndex, startCol, deltaCol) => {\n const row = matrix[rowIndex];\n const colsInRow = row.length;\n const newColIndex = cycleBy(startCol, deltaCol, 0, colsInRow - 1);\n return toCell(matrix, rowIndex, newColIndex);\n };\n const cycleVertical = (matrix, colIndex, startRow, deltaRow) => {\n const nextRowIndex = cycleBy(startRow, deltaRow, 0, matrix.length - 1);\n const colsInNextRow = matrix[nextRowIndex].length;\n const nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);\n return toCell(matrix, nextRowIndex, nextColIndex);\n };\n const moveHorizontal = (matrix, rowIndex, startCol, deltaCol) => {\n const row = matrix[rowIndex];\n const colsInRow = row.length;\n const newColIndex = clamp(startCol + deltaCol, 0, colsInRow - 1);\n return toCell(matrix, rowIndex, newColIndex);\n };\n const moveVertical = (matrix, colIndex, startRow, deltaRow) => {\n const nextRowIndex = clamp(startRow + deltaRow, 0, matrix.length - 1);\n const colsInNextRow = matrix[nextRowIndex].length;\n const nextColIndex = clamp(colIndex, 0, colsInNextRow - 1);\n return toCell(matrix, nextRowIndex, nextColIndex);\n };\n const cycleRight = (matrix, startRow, startCol) => cycleHorizontal(matrix, startRow, startCol, +1);\n const cycleLeft = (matrix, startRow, startCol) => cycleHorizontal(matrix, startRow, startCol, -1);\n const cycleUp = (matrix, startRow, startCol) => cycleVertical(matrix, startCol, startRow, -1);\n const cycleDown = (matrix, startRow, startCol) => cycleVertical(matrix, startCol, startRow, +1);\n const moveLeft$1 = (matrix, startRow, startCol) => moveHorizontal(matrix, startRow, startCol, -1);\n const moveRight$1 = (matrix, startRow, startCol) => moveHorizontal(matrix, startRow, startCol, +1);\n const moveUp$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, -1);\n const moveDown$1 = (matrix, startRow, startCol) => moveVertical(matrix, startCol, startRow, +1);\n\n const schema$s = [\n requiredObjOf('selectors', [\n required$1('row'),\n required$1('cell')\n ]),\n defaulted('cycles', true),\n defaulted('previousSelector', Optional.none),\n defaulted('execute', defaultExecute)\n ];\n const focusIn$1 = (component, matrixConfig, _state) => {\n const focused = matrixConfig.previousSelector(component).orThunk(() => {\n const selectors = matrixConfig.selectors;\n return descendant(component.element, selectors.cell);\n });\n focused.each(cell => {\n matrixConfig.focusManager.set(component, cell);\n });\n };\n const execute$1 = (component, simulatedEvent, matrixConfig) => search(component.element).bind(focused => matrixConfig.execute(component, simulatedEvent, focused));\n const toMatrix = (rows, matrixConfig) => map$2(rows, row => descendants(row, matrixConfig.selectors.cell));\n const doMove = (ifCycle, ifMove) => (element, focused, matrixConfig) => {\n const move = matrixConfig.cycles ? ifCycle : ifMove;\n return closest$1(focused, matrixConfig.selectors.row).bind(inRow => {\n const cellsInRow = descendants(inRow, matrixConfig.selectors.cell);\n return findIndex(cellsInRow, focused).bind(colIndex => {\n const allRows = descendants(element, matrixConfig.selectors.row);\n return findIndex(allRows, inRow).bind(rowIndex => {\n const matrix = toMatrix(allRows, matrixConfig);\n return move(matrix, rowIndex, colIndex).map(next => next.cell);\n });\n });\n });\n };\n const moveLeft = doMove(cycleLeft, moveLeft$1);\n const moveRight = doMove(cycleRight, moveRight$1);\n const moveNorth = doMove(cycleUp, moveUp$1);\n const moveSouth = doMove(cycleDown, moveDown$1);\n const getKeydownRules$2 = constant$1([\n rule(inSet(LEFT), west$1(moveLeft, moveRight)),\n rule(inSet(RIGHT), east$1(moveLeft, moveRight)),\n rule(inSet(UP), north$1(moveNorth)),\n rule(inSet(DOWN), south$1(moveSouth)),\n rule(inSet(SPACE.concat(ENTER)), execute$1)\n ]);\n const getKeyupRules$2 = constant$1([rule(inSet(SPACE), stopEventForFirefox)]);\n var MatrixType = typical(schema$s, NoState.init, getKeydownRules$2, getKeyupRules$2, () => Optional.some(focusIn$1));\n\n const schema$r = [\n required$1('selector'),\n defaulted('execute', defaultExecute),\n defaulted('moveOnTab', false)\n ];\n const execute = (component, simulatedEvent, menuConfig) => menuConfig.focusManager.get(component).bind(focused => menuConfig.execute(component, simulatedEvent, focused));\n const focusIn = (component, menuConfig, _state) => {\n descendant(component.element, menuConfig.selector).each(first => {\n menuConfig.focusManager.set(component, first);\n });\n };\n const moveUp = (element, focused, info) => horizontal(element, info.selector, focused, -1);\n const moveDown = (element, focused, info) => horizontal(element, info.selector, focused, +1);\n const fireShiftTab = (component, simulatedEvent, menuConfig, menuState) => menuConfig.moveOnTab ? move$1(moveUp)(component, simulatedEvent, menuConfig, menuState) : Optional.none();\n const fireTab = (component, simulatedEvent, menuConfig, menuState) => menuConfig.moveOnTab ? move$1(moveDown)(component, simulatedEvent, menuConfig, menuState) : Optional.none();\n const getKeydownRules$1 = constant$1([\n rule(inSet(UP), move$1(moveUp)),\n rule(inSet(DOWN), move$1(moveDown)),\n rule(and([\n isShift$1,\n inSet(TAB)\n ]), fireShiftTab),\n rule(and([\n isNotShift,\n inSet(TAB)\n ]), fireTab),\n rule(inSet(ENTER), execute),\n rule(inSet(SPACE), execute)\n ]);\n const getKeyupRules$1 = constant$1([rule(inSet(SPACE), stopEventForFirefox)]);\n var MenuType = typical(schema$r, NoState.init, getKeydownRules$1, getKeyupRules$1, () => Optional.some(focusIn));\n\n const schema$q = [\n onKeyboardHandler('onSpace'),\n onKeyboardHandler('onEnter'),\n onKeyboardHandler('onShiftEnter'),\n onKeyboardHandler('onLeft'),\n onKeyboardHandler('onRight'),\n onKeyboardHandler('onTab'),\n onKeyboardHandler('onShiftTab'),\n onKeyboardHandler('onUp'),\n onKeyboardHandler('onDown'),\n onKeyboardHandler('onEscape'),\n defaulted('stopSpaceKeyup', false),\n option$3('focusIn')\n ];\n const getKeydownRules = (component, simulatedEvent, specialInfo) => [\n rule(inSet(SPACE), specialInfo.onSpace),\n rule(and([\n isNotShift,\n inSet(ENTER)\n ]), specialInfo.onEnter),\n rule(and([\n isShift$1,\n inSet(ENTER)\n ]), specialInfo.onShiftEnter),\n rule(and([\n isShift$1,\n inSet(TAB)\n ]), specialInfo.onShiftTab),\n rule(and([\n isNotShift,\n inSet(TAB)\n ]), specialInfo.onTab),\n rule(inSet(UP), specialInfo.onUp),\n rule(inSet(DOWN), specialInfo.onDown),\n rule(inSet(LEFT), specialInfo.onLeft),\n rule(inSet(RIGHT), specialInfo.onRight),\n rule(inSet(SPACE), specialInfo.onSpace)\n ];\n const getKeyupRules = (component, simulatedEvent, specialInfo) => [\n ...specialInfo.stopSpaceKeyup ? [rule(inSet(SPACE), stopEventForFirefox)] : [],\n rule(inSet(ESCAPE), specialInfo.onEscape)\n ];\n var SpecialType = typical(schema$q, NoState.init, getKeydownRules, getKeyupRules, specialInfo => specialInfo.focusIn);\n\n const acyclic = AcyclicType.schema();\n const cyclic = CyclicType.schema();\n const flow = FlowType.schema();\n const flatgrid = FlatgridType.schema();\n const matrix = MatrixType.schema();\n const execution = ExecutionType.schema();\n const menu = MenuType.schema();\n const special = SpecialType.schema();\n\n var KeyboardBranches = /*#__PURE__*/Object.freeze({\n __proto__: null,\n acyclic: acyclic,\n cyclic: cyclic,\n flow: flow,\n flatgrid: flatgrid,\n matrix: matrix,\n execution: execution,\n menu: menu,\n special: special\n });\n\n const isFlatgridState = keyState => hasNonNullableKey(keyState, 'setGridSize');\n const Keying = createModes({\n branchKey: 'mode',\n branches: KeyboardBranches,\n name: 'keying',\n active: {\n events: (keyingConfig, keyingState) => {\n const handler = keyingConfig.handler;\n return handler.toEvents(keyingConfig, keyingState);\n }\n },\n apis: {\n focusIn: (component, keyConfig, keyState) => {\n keyConfig.sendFocusIn(keyConfig).fold(() => {\n component.getSystem().triggerFocus(component.element, component.element);\n }, sendFocusIn => {\n sendFocusIn(component, keyConfig, keyState);\n });\n },\n setGridSize: (component, keyConfig, keyState, numRows, numColumns) => {\n if (!isFlatgridState(keyState)) {\n console.error('Layout does not support setGridSize');\n } else {\n keyState.setGridSize(numRows, numColumns);\n }\n }\n },\n state: KeyingState\n });\n\n const withoutReuse = (parent, data) => {\n preserve$1(() => {\n replaceChildren(parent, data, () => map$2(data, parent.getSystem().build));\n }, parent.element);\n };\n const withReuse = (parent, data) => {\n preserve$1(() => {\n virtualReplaceChildren(parent, data, () => {\n return patchSpecChildren(parent.element, data, parent.getSystem().buildOrPatch);\n });\n }, parent.element);\n };\n\n const virtualReplace = (component, replacee, replaceeIndex, childSpec) => {\n virtualDetach(replacee);\n const child = patchSpecChild(component.element, replaceeIndex, childSpec, component.getSystem().buildOrPatch);\n virtualAttach(component, child);\n component.syncComponents();\n };\n const insert = (component, insertion, childSpec) => {\n const child = component.getSystem().build(childSpec);\n attachWith(component, child, insertion);\n };\n const replace = (component, replacee, replaceeIndex, childSpec) => {\n detach(replacee);\n insert(component, (p, c) => appendAt(p, c, replaceeIndex), childSpec);\n };\n const set$3 = (component, replaceConfig, replaceState, data) => {\n const replacer = replaceConfig.reuseDom ? withReuse : withoutReuse;\n return replacer(component, data);\n };\n const append = (component, replaceConfig, replaceState, appendee) => {\n insert(component, append$2, appendee);\n };\n const prepend = (component, replaceConfig, replaceState, prependee) => {\n insert(component, prepend$1, prependee);\n };\n const remove = (component, replaceConfig, replaceState, removee) => {\n const children = contents(component);\n const foundChild = find$5(children, child => eq(removee.element, child.element));\n foundChild.each(detach);\n };\n const contents = (component, _replaceConfig) => component.components();\n const replaceAt = (component, replaceConfig, replaceState, replaceeIndex, replacer) => {\n const children = contents(component);\n return Optional.from(children[replaceeIndex]).map(replacee => {\n replacer.fold(() => detach(replacee), r => {\n const replacer = replaceConfig.reuseDom ? virtualReplace : replace;\n replacer(component, replacee, replaceeIndex, r);\n });\n return replacee;\n });\n };\n const replaceBy = (component, replaceConfig, replaceState, replaceePred, replacer) => {\n const children = contents(component);\n return findIndex$1(children, replaceePred).bind(replaceeIndex => replaceAt(component, replaceConfig, replaceState, replaceeIndex, replacer));\n };\n\n var ReplaceApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n append: append,\n prepend: prepend,\n remove: remove,\n replaceAt: replaceAt,\n replaceBy: replaceBy,\n set: set$3,\n contents: contents\n });\n\n const Replacing = create$4({\n fields: [defaultedBoolean('reuseDom', true)],\n name: 'replacing',\n apis: ReplaceApis\n });\n\n const events$d = (name, eventHandlers) => {\n const events = derive$2(eventHandlers);\n return create$4({\n fields: [required$1('enabled')],\n name,\n active: { events: constant$1(events) }\n });\n };\n const config = (name, eventHandlers) => {\n const me = events$d(name, eventHandlers);\n return {\n key: name,\n value: {\n config: {},\n me,\n configAsRaw: constant$1({}),\n initialConfig: {},\n state: NoState\n }\n };\n };\n\n const focus$2 = (component, focusConfig) => {\n if (!focusConfig.ignore) {\n focus$3(component.element);\n focusConfig.onFocus(component);\n }\n };\n const blur = (component, focusConfig) => {\n if (!focusConfig.ignore) {\n blur$1(component.element);\n }\n };\n const isFocused = component => hasFocus(component.element);\n\n var FocusApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n focus: focus$2,\n blur: blur,\n isFocused: isFocused\n });\n\n const exhibit$4 = (base, focusConfig) => {\n const mod = focusConfig.ignore ? {} : { attributes: { tabindex: '-1' } };\n return nu$7(mod);\n };\n const events$c = focusConfig => derive$2([run$1(focus$4(), (component, simulatedEvent) => {\n focus$2(component, focusConfig);\n simulatedEvent.stop();\n })].concat(focusConfig.stopMousedown ? [run$1(mousedown(), (_, simulatedEvent) => {\n simulatedEvent.event.prevent();\n })] : []));\n\n var ActiveFocus = /*#__PURE__*/Object.freeze({\n __proto__: null,\n exhibit: exhibit$4,\n events: events$c\n });\n\n var FocusSchema = [\n onHandler('onFocus'),\n defaulted('stopMousedown', false),\n defaulted('ignore', false)\n ];\n\n const Focusing = create$4({\n fields: FocusSchema,\n name: 'focusing',\n active: ActiveFocus,\n apis: FocusApis\n });\n\n const SetupBehaviourCellState = initialState => {\n const init = () => {\n const cell = Cell(initialState);\n const get = () => cell.get();\n const set = newState => cell.set(newState);\n const clear = () => cell.set(initialState);\n const readState = () => cell.get();\n return {\n get,\n set,\n clear,\n readState\n };\n };\n return { init };\n };\n\n const updateAriaState = (component, toggleConfig, toggleState) => {\n const ariaInfo = toggleConfig.aria;\n ariaInfo.update(component, ariaInfo, toggleState.get());\n };\n const updateClass = (component, toggleConfig, toggleState) => {\n toggleConfig.toggleClass.each(toggleClass => {\n if (toggleState.get()) {\n add$2(component.element, toggleClass);\n } else {\n remove$2(component.element, toggleClass);\n }\n });\n };\n const set$2 = (component, toggleConfig, toggleState, state) => {\n const initialState = toggleState.get();\n toggleState.set(state);\n updateClass(component, toggleConfig, toggleState);\n updateAriaState(component, toggleConfig, toggleState);\n if (initialState !== state) {\n toggleConfig.onToggled(component, state);\n }\n };\n const toggle$2 = (component, toggleConfig, toggleState) => {\n set$2(component, toggleConfig, toggleState, !toggleState.get());\n };\n const on = (component, toggleConfig, toggleState) => {\n set$2(component, toggleConfig, toggleState, true);\n };\n const off = (component, toggleConfig, toggleState) => {\n set$2(component, toggleConfig, toggleState, false);\n };\n const isOn = (component, toggleConfig, toggleState) => toggleState.get();\n const onLoad = (component, toggleConfig, toggleState) => {\n set$2(component, toggleConfig, toggleState, toggleConfig.selected);\n };\n\n var ToggleApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n onLoad: onLoad,\n toggle: toggle$2,\n isOn: isOn,\n on: on,\n off: off,\n set: set$2\n });\n\n const exhibit$3 = () => nu$7({});\n const events$b = (toggleConfig, toggleState) => {\n const execute = executeEvent(toggleConfig, toggleState, toggle$2);\n const load = loadEvent(toggleConfig, toggleState, onLoad);\n return derive$2(flatten([\n toggleConfig.toggleOnExecute ? [execute] : [],\n [load]\n ]));\n };\n\n var ActiveToggle = /*#__PURE__*/Object.freeze({\n __proto__: null,\n exhibit: exhibit$3,\n events: events$b\n });\n\n const updatePressed = (component, ariaInfo, status) => {\n set$9(component.element, 'aria-pressed', status);\n if (ariaInfo.syncWithExpanded) {\n updateExpanded(component, ariaInfo, status);\n }\n };\n const updateSelected = (component, ariaInfo, status) => {\n set$9(component.element, 'aria-selected', status);\n };\n const updateChecked = (component, ariaInfo, status) => {\n set$9(component.element, 'aria-checked', status);\n };\n const updateExpanded = (component, ariaInfo, status) => {\n set$9(component.element, 'aria-expanded', status);\n };\n\n var ToggleSchema = [\n defaulted('selected', false),\n option$3('toggleClass'),\n defaulted('toggleOnExecute', true),\n onHandler('onToggled'),\n defaultedOf('aria', { mode: 'none' }, choose$1('mode', {\n pressed: [\n defaulted('syncWithExpanded', false),\n output$1('update', updatePressed)\n ],\n checked: [output$1('update', updateChecked)],\n expanded: [output$1('update', updateExpanded)],\n selected: [output$1('update', updateSelected)],\n none: [output$1('update', noop)]\n }))\n ];\n\n const Toggling = create$4({\n fields: ToggleSchema,\n name: 'toggling',\n active: ActiveToggle,\n apis: ToggleApis,\n state: SetupBehaviourCellState(false)\n });\n\n const pointerEvents = () => {\n const onClick = (component, simulatedEvent) => {\n simulatedEvent.stop();\n emitExecute(component);\n };\n return [\n run$1(click(), onClick),\n run$1(tap(), onClick),\n cutter(touchstart()),\n cutter(mousedown())\n ];\n };\n const events$a = optAction => {\n const executeHandler = action => runOnExecute$1((component, simulatedEvent) => {\n action(component);\n simulatedEvent.stop();\n });\n return derive$2(flatten([\n optAction.map(executeHandler).toArray(),\n pointerEvents()\n ]));\n };\n\n const hoverEvent = 'alloy.item-hover';\n const focusEvent = 'alloy.item-focus';\n const toggledEvent = 'alloy.item-toggled';\n const onHover = item => {\n if (search(item.element).isNone() || Focusing.isFocused(item)) {\n if (!Focusing.isFocused(item)) {\n Focusing.focus(item);\n }\n emitWith(item, hoverEvent, { item });\n }\n };\n const onFocus$1 = item => {\n emitWith(item, focusEvent, { item });\n };\n const onToggled = (item, state) => {\n emitWith(item, toggledEvent, {\n item,\n state\n });\n };\n const hover = constant$1(hoverEvent);\n const focus$1 = constant$1(focusEvent);\n const toggled = constant$1(toggledEvent);\n\n const getItemRole = detail => detail.toggling.map(toggling => toggling.exclusive ? 'menuitemradio' : 'menuitemcheckbox').getOr('menuitem');\n const getTogglingSpec = tConfig => ({\n aria: { mode: 'checked' },\n ...filter$1(tConfig, (_value, name) => name !== 'exclusive'),\n onToggled: (component, state) => {\n if (isFunction(tConfig.onToggled)) {\n tConfig.onToggled(component, state);\n }\n onToggled(component, state);\n }\n });\n const builder$2 = detail => ({\n dom: detail.dom,\n domModification: {\n ...detail.domModification,\n attributes: {\n 'role': getItemRole(detail),\n ...detail.domModification.attributes,\n 'aria-haspopup': detail.hasSubmenu,\n ...detail.hasSubmenu ? { 'aria-expanded': false } : {}\n }\n },\n behaviours: SketchBehaviours.augment(detail.itemBehaviours, [\n detail.toggling.fold(Toggling.revoke, tConfig => Toggling.config(getTogglingSpec(tConfig))),\n Focusing.config({\n ignore: detail.ignoreFocus,\n stopMousedown: detail.ignoreFocus,\n onFocus: component => {\n onFocus$1(component);\n }\n }),\n Keying.config({ mode: 'execution' }),\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: detail.data\n }\n }),\n config('item-type-events', [\n ...pointerEvents(),\n run$1(mouseover(), onHover),\n run$1(focusItem(), Focusing.focus)\n ])\n ]),\n components: detail.components,\n eventOrder: detail.eventOrder\n });\n const schema$p = [\n required$1('data'),\n required$1('components'),\n required$1('dom'),\n defaulted('hasSubmenu', false),\n option$3('toggling'),\n SketchBehaviours.field('itemBehaviours', [\n Toggling,\n Focusing,\n Keying,\n Representing\n ]),\n defaulted('ignoreFocus', false),\n defaulted('domModification', {}),\n output$1('builder', builder$2),\n defaulted('eventOrder', {})\n ];\n\n const builder$1 = detail => ({\n dom: detail.dom,\n components: detail.components,\n events: derive$2([stopper(focusItem())])\n });\n const schema$o = [\n required$1('dom'),\n required$1('components'),\n output$1('builder', builder$1)\n ];\n\n const owner$2 = constant$1('item-widget');\n const parts$h = constant$1([required({\n name: 'widget',\n overrides: detail => {\n return {\n behaviours: derive$1([Representing.config({\n store: {\n mode: 'manual',\n getValue: _component => {\n return detail.data;\n },\n setValue: noop\n }\n })])\n };\n }\n })]);\n\n const builder = detail => {\n const subs = substitutes(owner$2(), detail, parts$h());\n const components = components$1(owner$2(), detail, subs.internals());\n const focusWidget = component => getPart(component, detail, 'widget').map(widget => {\n Keying.focusIn(widget);\n return widget;\n });\n const onHorizontalArrow = (component, simulatedEvent) => inside(simulatedEvent.event.target) ? Optional.none() : (() => {\n if (detail.autofocus) {\n simulatedEvent.setSource(component.element);\n return Optional.none();\n } else {\n return Optional.none();\n }\n })();\n return {\n dom: detail.dom,\n components,\n domModification: detail.domModification,\n events: derive$2([\n runOnExecute$1((component, simulatedEvent) => {\n focusWidget(component).each(_widget => {\n simulatedEvent.stop();\n });\n }),\n run$1(mouseover(), onHover),\n run$1(focusItem(), (component, _simulatedEvent) => {\n if (detail.autofocus) {\n focusWidget(component);\n } else {\n Focusing.focus(component);\n }\n })\n ]),\n behaviours: SketchBehaviours.augment(detail.widgetBehaviours, [\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: detail.data\n }\n }),\n Focusing.config({\n ignore: detail.ignoreFocus,\n onFocus: component => {\n onFocus$1(component);\n }\n }),\n Keying.config({\n mode: 'special',\n focusIn: detail.autofocus ? component => {\n focusWidget(component);\n } : revoke(),\n onLeft: onHorizontalArrow,\n onRight: onHorizontalArrow,\n onEscape: (component, simulatedEvent) => {\n if (!Focusing.isFocused(component) && !detail.autofocus) {\n Focusing.focus(component);\n return Optional.some(true);\n } else if (detail.autofocus) {\n simulatedEvent.setSource(component.element);\n return Optional.none();\n } else {\n return Optional.none();\n }\n }\n })\n ])\n };\n };\n const schema$n = [\n required$1('uid'),\n required$1('data'),\n required$1('components'),\n required$1('dom'),\n defaulted('autofocus', false),\n defaulted('ignoreFocus', false),\n SketchBehaviours.field('widgetBehaviours', [\n Representing,\n Focusing,\n Keying\n ]),\n defaulted('domModification', {}),\n defaultUidsSchema(parts$h()),\n output$1('builder', builder)\n ];\n\n const itemSchema$2 = choose$1('type', {\n widget: schema$n,\n item: schema$p,\n separator: schema$o\n });\n const configureGrid = (detail, movementInfo) => ({\n mode: 'flatgrid',\n selector: '.' + detail.markers.item,\n initSize: {\n numColumns: movementInfo.initSize.numColumns,\n numRows: movementInfo.initSize.numRows\n },\n focusManager: detail.focusManager\n });\n const configureMatrix = (detail, movementInfo) => ({\n mode: 'matrix',\n selectors: {\n row: movementInfo.rowSelector,\n cell: '.' + detail.markers.item\n },\n previousSelector: movementInfo.previousSelector,\n focusManager: detail.focusManager\n });\n const configureMenu = (detail, movementInfo) => ({\n mode: 'menu',\n selector: '.' + detail.markers.item,\n moveOnTab: movementInfo.moveOnTab,\n focusManager: detail.focusManager\n });\n const parts$g = constant$1([group({\n factory: {\n sketch: spec => {\n const itemInfo = asRawOrDie$1('menu.spec item', itemSchema$2, spec);\n return itemInfo.builder(itemInfo);\n }\n },\n name: 'items',\n unit: 'item',\n defaults: (detail, u) => {\n return has$2(u, 'uid') ? u : {\n ...u,\n uid: generate$5('item')\n };\n },\n overrides: (detail, u) => {\n return {\n type: u.type,\n ignoreFocus: detail.fakeFocus,\n domModification: { classes: [detail.markers.item] }\n };\n }\n })]);\n const schema$m = constant$1([\n required$1('value'),\n required$1('items'),\n required$1('dom'),\n required$1('components'),\n defaulted('eventOrder', {}),\n field('menuBehaviours', [\n Highlighting,\n Representing,\n Composing,\n Keying\n ]),\n defaultedOf('movement', {\n mode: 'menu',\n moveOnTab: true\n }, choose$1('mode', {\n grid: [\n initSize(),\n output$1('config', configureGrid)\n ],\n matrix: [\n output$1('config', configureMatrix),\n required$1('rowSelector'),\n defaulted('previousSelector', Optional.none)\n ],\n menu: [\n defaulted('moveOnTab', true),\n output$1('config', configureMenu)\n ]\n })),\n itemMarkers(),\n defaulted('fakeFocus', false),\n defaulted('focusManager', dom$2()),\n onHandler('onHighlight'),\n onHandler('onDehighlight')\n ]);\n\n const focus = constant$1('alloy.menu-focus');\n\n const deselectOtherRadioItems = (menu, item) => {\n const checkedRadioItems = descendants(menu.element, '[role=\"menuitemradio\"][aria-checked=\"true\"]');\n each$1(checkedRadioItems, ele => {\n if (!eq(ele, item.element)) {\n menu.getSystem().getByDom(ele).each(c => {\n Toggling.off(c);\n });\n }\n });\n };\n const make$7 = (detail, components, _spec, _externals) => ({\n uid: detail.uid,\n dom: detail.dom,\n markers: detail.markers,\n behaviours: augment(detail.menuBehaviours, [\n Highlighting.config({\n highlightClass: detail.markers.selectedItem,\n itemClass: detail.markers.item,\n onHighlight: detail.onHighlight,\n onDehighlight: detail.onDehighlight\n }),\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: detail.value\n }\n }),\n Composing.config({ find: Optional.some }),\n Keying.config(detail.movement.config(detail, detail.movement))\n ]),\n events: derive$2([\n run$1(focus$1(), (menu, simulatedEvent) => {\n const event = simulatedEvent.event;\n menu.getSystem().getByDom(event.target).each(item => {\n Highlighting.highlight(menu, item);\n simulatedEvent.stop();\n emitWith(menu, focus(), {\n menu,\n item\n });\n });\n }),\n run$1(hover(), (menu, simulatedEvent) => {\n const item = simulatedEvent.event.item;\n Highlighting.highlight(menu, item);\n }),\n run$1(toggled(), (menu, simulatedEvent) => {\n const {item, state} = simulatedEvent.event;\n if (state && get$f(item.element, 'role') === 'menuitemradio') {\n deselectOtherRadioItems(menu, item);\n }\n })\n ]),\n components,\n eventOrder: detail.eventOrder,\n domModification: { attributes: { role: 'menu' } }\n });\n\n const Menu = composite({\n name: 'Menu',\n configFields: schema$m(),\n partFields: parts$g(),\n factory: make$7\n });\n\n const transpose$1 = obj => tupleMap(obj, (v, k) => ({\n k: v,\n v: k\n }));\n const trace = (items, byItem, byMenu, finish) => get$g(byMenu, finish).bind(triggerItem => get$g(items, triggerItem).bind(triggerMenu => {\n const rest = trace(items, byItem, byMenu, triggerMenu);\n return Optional.some([triggerMenu].concat(rest));\n })).getOr([]);\n const generate$2 = (menus, expansions) => {\n const items = {};\n each(menus, (menuItems, menu) => {\n each$1(menuItems, item => {\n items[item] = menu;\n });\n });\n const byItem = expansions;\n const byMenu = transpose$1(expansions);\n const menuPaths = map$1(byMenu, (_triggerItem, submenu) => [submenu].concat(trace(items, byItem, byMenu, submenu)));\n return map$1(items, menu => get$g(menuPaths, menu).getOr([menu]));\n };\n\n const init$c = () => {\n const expansions = Cell({});\n const menus = Cell({});\n const paths = Cell({});\n const primary = value$2();\n const directory = Cell({});\n const clear = () => {\n expansions.set({});\n menus.set({});\n paths.set({});\n primary.clear();\n };\n const isClear = () => primary.get().isNone();\n const setMenuBuilt = (menuName, built) => {\n menus.set({\n ...menus.get(),\n [menuName]: {\n type: 'prepared',\n menu: built\n }\n });\n };\n const setContents = (sPrimary, sMenus, sExpansions, dir) => {\n primary.set(sPrimary);\n expansions.set(sExpansions);\n menus.set(sMenus);\n directory.set(dir);\n const sPaths = generate$2(dir, sExpansions);\n paths.set(sPaths);\n };\n const getTriggeringItem = menuValue => find$4(expansions.get(), (v, _k) => v === menuValue);\n const getTriggerData = (menuValue, getItemByValue, path) => getPreparedMenu(menuValue).bind(menu => getTriggeringItem(menuValue).bind(triggeringItemValue => getItemByValue(triggeringItemValue).map(triggeredItem => ({\n triggeredMenu: menu,\n triggeringItem: triggeredItem,\n triggeringPath: path\n }))));\n const getTriggeringPath = (itemValue, getItemByValue) => {\n const extraPath = filter$2(lookupItem(itemValue).toArray(), menuValue => getPreparedMenu(menuValue).isSome());\n return get$g(paths.get(), itemValue).bind(path => {\n const revPath = reverse(extraPath.concat(path));\n const triggers = bind$3(revPath, (menuValue, menuIndex) => getTriggerData(menuValue, getItemByValue, revPath.slice(0, menuIndex + 1)).fold(() => is$1(primary.get(), menuValue) ? [] : [Optional.none()], data => [Optional.some(data)]));\n return sequence(triggers);\n });\n };\n const expand = itemValue => get$g(expansions.get(), itemValue).map(menu => {\n const current = get$g(paths.get(), itemValue).getOr([]);\n return [menu].concat(current);\n });\n const collapse = itemValue => get$g(paths.get(), itemValue).bind(path => path.length > 1 ? Optional.some(path.slice(1)) : Optional.none());\n const refresh = itemValue => get$g(paths.get(), itemValue);\n const getPreparedMenu = menuValue => lookupMenu(menuValue).bind(extractPreparedMenu);\n const lookupMenu = menuValue => get$g(menus.get(), menuValue);\n const lookupItem = itemValue => get$g(expansions.get(), itemValue);\n const otherMenus = path => {\n const menuValues = directory.get();\n return difference(keys(menuValues), path);\n };\n const getPrimary = () => primary.get().bind(getPreparedMenu);\n const getMenus = () => menus.get();\n return {\n setMenuBuilt,\n setContents,\n expand,\n refresh,\n collapse,\n lookupMenu,\n lookupItem,\n otherMenus,\n getPrimary,\n getMenus,\n clear,\n isClear,\n getTriggeringPath\n };\n };\n const extractPreparedMenu = prep => prep.type === 'prepared' ? Optional.some(prep.menu) : Optional.none();\n const LayeredState = {\n init: init$c,\n extractPreparedMenu\n };\n\n const onMenuItemHighlightedEvent = generate$6('tiered-menu-item-highlight');\n const onMenuItemDehighlightedEvent = generate$6('tiered-menu-item-dehighlight');\n\n var HighlightOnOpen;\n (function (HighlightOnOpen) {\n HighlightOnOpen[HighlightOnOpen['HighlightMenuAndItem'] = 0] = 'HighlightMenuAndItem';\n HighlightOnOpen[HighlightOnOpen['HighlightJustMenu'] = 1] = 'HighlightJustMenu';\n HighlightOnOpen[HighlightOnOpen['HighlightNone'] = 2] = 'HighlightNone';\n }(HighlightOnOpen || (HighlightOnOpen = {})));\n\n const make$6 = (detail, _rawUiSpec) => {\n const submenuParentItems = value$2();\n const buildMenus = (container, primaryName, menus) => map$1(menus, (spec, name) => {\n const makeSketch = () => Menu.sketch({\n ...spec,\n value: name,\n markers: detail.markers,\n fakeFocus: detail.fakeFocus,\n onHighlight: (menuComp, itemComp) => {\n const highlightData = {\n menuComp,\n itemComp\n };\n emitWith(menuComp, onMenuItemHighlightedEvent, highlightData);\n },\n onDehighlight: (menuComp, itemComp) => {\n const dehighlightData = {\n menuComp,\n itemComp\n };\n emitWith(menuComp, onMenuItemDehighlightedEvent, dehighlightData);\n },\n focusManager: detail.fakeFocus ? highlights() : dom$2()\n });\n return name === primaryName ? {\n type: 'prepared',\n menu: container.getSystem().build(makeSketch())\n } : {\n type: 'notbuilt',\n nbMenu: makeSketch\n };\n });\n const layeredState = LayeredState.init();\n const setup = container => {\n const componentMap = buildMenus(container, detail.data.primary, detail.data.menus);\n const directory = toDirectory();\n layeredState.setContents(detail.data.primary, componentMap, detail.data.expansions, directory);\n return layeredState.getPrimary();\n };\n const getItemValue = item => Representing.getValue(item).value;\n const getItemByValue = (_container, menus, itemValue) => findMap(menus, menu => {\n if (!menu.getSystem().isConnected()) {\n return Optional.none();\n }\n const candidates = Highlighting.getCandidates(menu);\n return find$5(candidates, c => getItemValue(c) === itemValue);\n });\n const toDirectory = _container => map$1(detail.data.menus, (data, _menuName) => bind$3(data.items, item => item.type === 'separator' ? [] : [item.data.value]));\n const setActiveMenu = Highlighting.highlight;\n const setActiveMenuAndItem = (container, menu) => {\n setActiveMenu(container, menu);\n Highlighting.getHighlighted(menu).orThunk(() => Highlighting.getFirst(menu)).each(item => {\n if (detail.fakeFocus) {\n Highlighting.highlight(menu, item);\n } else {\n dispatch(container, item.element, focusItem());\n }\n });\n };\n const getMenus = (state, menuValues) => cat(map$2(menuValues, mv => state.lookupMenu(mv).bind(prep => prep.type === 'prepared' ? Optional.some(prep.menu) : Optional.none())));\n const closeOthers = (container, state, path) => {\n const others = getMenus(state, state.otherMenus(path));\n each$1(others, o => {\n remove$1(o.element, [detail.markers.backgroundMenu]);\n if (!detail.stayInDom) {\n Replacing.remove(container, o);\n }\n });\n };\n const getSubmenuParents = container => submenuParentItems.get().getOrThunk(() => {\n const r = {};\n const items = descendants(container.element, `.${ detail.markers.item }`);\n const parentItems = filter$2(items, i => get$f(i, 'aria-haspopup') === 'true');\n each$1(parentItems, i => {\n container.getSystem().getByDom(i).each(itemComp => {\n const key = getItemValue(itemComp);\n r[key] = itemComp;\n });\n });\n submenuParentItems.set(r);\n return r;\n });\n const updateAriaExpansions = (container, path) => {\n const parentItems = getSubmenuParents(container);\n each(parentItems, (v, k) => {\n const expanded = contains$2(path, k);\n set$9(v.element, 'aria-expanded', expanded);\n });\n };\n const updateMenuPath = (container, state, path) => Optional.from(path[0]).bind(latestMenuName => state.lookupMenu(latestMenuName).bind(menuPrep => {\n if (menuPrep.type === 'notbuilt') {\n return Optional.none();\n } else {\n const activeMenu = menuPrep.menu;\n const rest = getMenus(state, path.slice(1));\n each$1(rest, r => {\n add$2(r.element, detail.markers.backgroundMenu);\n });\n if (!inBody(activeMenu.element)) {\n Replacing.append(container, premade(activeMenu));\n }\n remove$1(activeMenu.element, [detail.markers.backgroundMenu]);\n setActiveMenuAndItem(container, activeMenu);\n closeOthers(container, state, path);\n return Optional.some(activeMenu);\n }\n }));\n let ExpandHighlightDecision;\n (function (ExpandHighlightDecision) {\n ExpandHighlightDecision[ExpandHighlightDecision['HighlightSubmenu'] = 0] = 'HighlightSubmenu';\n ExpandHighlightDecision[ExpandHighlightDecision['HighlightParent'] = 1] = 'HighlightParent';\n }(ExpandHighlightDecision || (ExpandHighlightDecision = {})));\n const buildIfRequired = (container, menuName, menuPrep) => {\n if (menuPrep.type === 'notbuilt') {\n const menu = container.getSystem().build(menuPrep.nbMenu());\n layeredState.setMenuBuilt(menuName, menu);\n return menu;\n } else {\n return menuPrep.menu;\n }\n };\n const expandRight = (container, item, decision = ExpandHighlightDecision.HighlightSubmenu) => {\n if (item.hasConfigured(Disabling) && Disabling.isDisabled(item)) {\n return Optional.some(item);\n } else {\n const value = getItemValue(item);\n return layeredState.expand(value).bind(path => {\n updateAriaExpansions(container, path);\n return Optional.from(path[0]).bind(menuName => layeredState.lookupMenu(menuName).bind(activeMenuPrep => {\n const activeMenu = buildIfRequired(container, menuName, activeMenuPrep);\n if (!inBody(activeMenu.element)) {\n Replacing.append(container, premade(activeMenu));\n }\n detail.onOpenSubmenu(container, item, activeMenu, reverse(path));\n if (decision === ExpandHighlightDecision.HighlightSubmenu) {\n Highlighting.highlightFirst(activeMenu);\n return updateMenuPath(container, layeredState, path);\n } else {\n Highlighting.dehighlightAll(activeMenu);\n return Optional.some(item);\n }\n }));\n });\n }\n };\n const collapseLeft = (container, item) => {\n const value = getItemValue(item);\n return layeredState.collapse(value).bind(path => {\n updateAriaExpansions(container, path);\n return updateMenuPath(container, layeredState, path).map(activeMenu => {\n detail.onCollapseMenu(container, item, activeMenu);\n return activeMenu;\n });\n });\n };\n const updateView = (container, item) => {\n const value = getItemValue(item);\n return layeredState.refresh(value).bind(path => {\n updateAriaExpansions(container, path);\n return updateMenuPath(container, layeredState, path);\n });\n };\n const onRight = (container, item) => inside(item.element) ? Optional.none() : expandRight(container, item, ExpandHighlightDecision.HighlightSubmenu);\n const onLeft = (container, item) => inside(item.element) ? Optional.none() : collapseLeft(container, item);\n const onEscape = (container, item) => collapseLeft(container, item).orThunk(() => detail.onEscape(container, item).map(() => container));\n const keyOnItem = f => (container, simulatedEvent) => {\n return closest$1(simulatedEvent.getSource(), `.${ detail.markers.item }`).bind(target => container.getSystem().getByDom(target).toOptional().bind(item => f(container, item).map(always)));\n };\n const events = derive$2([\n run$1(focus(), (tmenu, simulatedEvent) => {\n const item = simulatedEvent.event.item;\n layeredState.lookupItem(getItemValue(item)).each(() => {\n const menu = simulatedEvent.event.menu;\n Highlighting.highlight(tmenu, menu);\n const value = getItemValue(simulatedEvent.event.item);\n layeredState.refresh(value).each(path => closeOthers(tmenu, layeredState, path));\n });\n }),\n runOnExecute$1((component, simulatedEvent) => {\n const target = simulatedEvent.event.target;\n component.getSystem().getByDom(target).each(item => {\n const itemValue = getItemValue(item);\n if (itemValue.indexOf('collapse-item') === 0) {\n collapseLeft(component, item);\n }\n expandRight(component, item, ExpandHighlightDecision.HighlightSubmenu).fold(() => {\n detail.onExecute(component, item);\n }, noop);\n });\n }),\n runOnAttached((container, _simulatedEvent) => {\n setup(container).each(primary => {\n Replacing.append(container, premade(primary));\n detail.onOpenMenu(container, primary);\n if (detail.highlightOnOpen === HighlightOnOpen.HighlightMenuAndItem) {\n setActiveMenuAndItem(container, primary);\n } else if (detail.highlightOnOpen === HighlightOnOpen.HighlightJustMenu) {\n setActiveMenu(container, primary);\n }\n });\n }),\n run$1(onMenuItemHighlightedEvent, (tmenuComp, se) => {\n detail.onHighlightItem(tmenuComp, se.event.menuComp, se.event.itemComp);\n }),\n run$1(onMenuItemDehighlightedEvent, (tmenuComp, se) => {\n detail.onDehighlightItem(tmenuComp, se.event.menuComp, se.event.itemComp);\n }),\n ...detail.navigateOnHover ? [run$1(hover(), (tmenu, simulatedEvent) => {\n const item = simulatedEvent.event.item;\n updateView(tmenu, item);\n expandRight(tmenu, item, ExpandHighlightDecision.HighlightParent);\n detail.onHover(tmenu, item);\n })] : []\n ]);\n const getActiveItem = container => Highlighting.getHighlighted(container).bind(Highlighting.getHighlighted);\n const collapseMenuApi = container => {\n getActiveItem(container).each(currentItem => {\n collapseLeft(container, currentItem);\n });\n };\n const highlightPrimary = container => {\n layeredState.getPrimary().each(primary => {\n setActiveMenuAndItem(container, primary);\n });\n };\n const extractMenuFromContainer = container => Optional.from(container.components()[0]).filter(comp => get$f(comp.element, 'role') === 'menu');\n const repositionMenus = container => {\n const maybeActivePrimary = layeredState.getPrimary().bind(primary => getActiveItem(container).bind(currentItem => {\n const itemValue = getItemValue(currentItem);\n const allMenus = values(layeredState.getMenus());\n const preparedMenus = cat(map$2(allMenus, LayeredState.extractPreparedMenu));\n return layeredState.getTriggeringPath(itemValue, v => getItemByValue(container, preparedMenus, v));\n }).map(triggeringPath => ({\n primary,\n triggeringPath\n })));\n maybeActivePrimary.fold(() => {\n extractMenuFromContainer(container).each(primaryMenu => {\n detail.onRepositionMenu(container, primaryMenu, []);\n });\n }, ({primary, triggeringPath}) => {\n detail.onRepositionMenu(container, primary, triggeringPath);\n });\n };\n const apis = {\n collapseMenu: collapseMenuApi,\n highlightPrimary,\n repositionMenus\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n markers: detail.markers,\n behaviours: augment(detail.tmenuBehaviours, [\n Keying.config({\n mode: 'special',\n onRight: keyOnItem(onRight),\n onLeft: keyOnItem(onLeft),\n onEscape: keyOnItem(onEscape),\n focusIn: (container, _keyInfo) => {\n layeredState.getPrimary().each(primary => {\n dispatch(container, primary.element, focusItem());\n });\n }\n }),\n Highlighting.config({\n highlightClass: detail.markers.selectedMenu,\n itemClass: detail.markers.menu\n }),\n Composing.config({\n find: container => {\n return Highlighting.getHighlighted(container);\n }\n }),\n Replacing.config({})\n ]),\n eventOrder: detail.eventOrder,\n apis,\n events\n };\n };\n const collapseItem$1 = constant$1('collapse-item');\n\n const tieredData = (primary, menus, expansions) => ({\n primary,\n menus,\n expansions\n });\n const singleData = (name, menu) => ({\n primary: name,\n menus: wrap$1(name, menu),\n expansions: {}\n });\n const collapseItem = text => ({\n value: generate$6(collapseItem$1()),\n meta: { text }\n });\n const tieredMenu = single({\n name: 'TieredMenu',\n configFields: [\n onStrictKeyboardHandler('onExecute'),\n onStrictKeyboardHandler('onEscape'),\n onStrictHandler('onOpenMenu'),\n onStrictHandler('onOpenSubmenu'),\n onHandler('onRepositionMenu'),\n onHandler('onCollapseMenu'),\n defaulted('highlightOnOpen', HighlightOnOpen.HighlightMenuAndItem),\n requiredObjOf('data', [\n required$1('primary'),\n required$1('menus'),\n required$1('expansions')\n ]),\n defaulted('fakeFocus', false),\n onHandler('onHighlightItem'),\n onHandler('onDehighlightItem'),\n onHandler('onHover'),\n tieredMenuMarkers(),\n required$1('dom'),\n defaulted('navigateOnHover', true),\n defaulted('stayInDom', false),\n field('tmenuBehaviours', [\n Keying,\n Highlighting,\n Composing,\n Replacing\n ]),\n defaulted('eventOrder', {})\n ],\n apis: {\n collapseMenu: (apis, tmenu) => {\n apis.collapseMenu(tmenu);\n },\n highlightPrimary: (apis, tmenu) => {\n apis.highlightPrimary(tmenu);\n },\n repositionMenus: (apis, tmenu) => {\n apis.repositionMenus(tmenu);\n }\n },\n factory: make$6,\n extraApis: {\n tieredData,\n singleData,\n collapseItem\n }\n });\n\n const makeMenu = (detail, menuSandbox, placementSpec, menuSpec, getBounds) => {\n const lazySink = () => detail.lazySink(menuSandbox);\n const layouts = menuSpec.type === 'horizontal' ? {\n layouts: {\n onLtr: () => belowOrAbove(),\n onRtl: () => belowOrAboveRtl()\n }\n } : {};\n const isFirstTierSubmenu = triggeringPaths => triggeringPaths.length === 2;\n const getSubmenuLayouts = triggeringPaths => isFirstTierSubmenu(triggeringPaths) ? layouts : {};\n return tieredMenu.sketch({\n dom: { tag: 'div' },\n data: menuSpec.data,\n markers: menuSpec.menu.markers,\n highlightOnOpen: menuSpec.menu.highlightOnOpen,\n fakeFocus: menuSpec.menu.fakeFocus,\n onEscape: () => {\n Sandboxing.close(menuSandbox);\n detail.onEscape.map(handler => handler(menuSandbox));\n return Optional.some(true);\n },\n onExecute: () => {\n return Optional.some(true);\n },\n onOpenMenu: (tmenu, menu) => {\n Positioning.positionWithinBounds(lazySink().getOrDie(), menu, placementSpec, getBounds());\n },\n onOpenSubmenu: (tmenu, item, submenu, triggeringPaths) => {\n const sink = lazySink().getOrDie();\n Positioning.position(sink, submenu, {\n anchor: {\n type: 'submenu',\n item,\n ...getSubmenuLayouts(triggeringPaths)\n }\n });\n },\n onRepositionMenu: (tmenu, primaryMenu, submenuTriggers) => {\n const sink = lazySink().getOrDie();\n Positioning.positionWithinBounds(sink, primaryMenu, placementSpec, getBounds());\n each$1(submenuTriggers, st => {\n const submenuLayouts = getSubmenuLayouts(st.triggeringPath);\n Positioning.position(sink, st.triggeredMenu, {\n anchor: {\n type: 'submenu',\n item: st.triggeringItem,\n ...submenuLayouts\n }\n });\n });\n }\n });\n };\n const factory$o = (detail, spec) => {\n const isPartOfRelated = (sandbox, queryElem) => {\n const related = detail.getRelated(sandbox);\n return related.exists(rel => isPartOf$1(rel, queryElem));\n };\n const setContent = (sandbox, thing) => {\n Sandboxing.setContent(sandbox, thing);\n };\n const showAt = (sandbox, thing, placementSpec) => {\n const getBounds = Optional.none;\n showWithinBounds(sandbox, thing, placementSpec, getBounds);\n };\n const showWithinBounds = (sandbox, thing, placementSpec, getBounds) => {\n const sink = detail.lazySink(sandbox).getOrDie();\n Sandboxing.openWhileCloaked(sandbox, thing, () => Positioning.positionWithinBounds(sink, sandbox, placementSpec, getBounds()));\n Representing.setValue(sandbox, Optional.some({\n mode: 'position',\n config: placementSpec,\n getBounds\n }));\n };\n const showMenuAt = (sandbox, placementSpec, menuSpec) => {\n showMenuWithinBounds(sandbox, placementSpec, menuSpec, Optional.none);\n };\n const showMenuWithinBounds = (sandbox, placementSpec, menuSpec, getBounds) => {\n const menu = makeMenu(detail, sandbox, placementSpec, menuSpec, getBounds);\n Sandboxing.open(sandbox, menu);\n Representing.setValue(sandbox, Optional.some({\n mode: 'menu',\n menu\n }));\n };\n const hide = sandbox => {\n if (Sandboxing.isOpen(sandbox)) {\n Representing.setValue(sandbox, Optional.none());\n Sandboxing.close(sandbox);\n }\n };\n const getContent = sandbox => Sandboxing.getState(sandbox);\n const reposition = sandbox => {\n if (Sandboxing.isOpen(sandbox)) {\n Representing.getValue(sandbox).each(state => {\n switch (state.mode) {\n case 'menu':\n Sandboxing.getState(sandbox).each(tieredMenu.repositionMenus);\n break;\n case 'position':\n const sink = detail.lazySink(sandbox).getOrDie();\n Positioning.positionWithinBounds(sink, sandbox, state.config, state.getBounds());\n break;\n }\n });\n }\n };\n const apis = {\n setContent,\n showAt,\n showWithinBounds,\n showMenuAt,\n showMenuWithinBounds,\n hide,\n getContent,\n reposition,\n isOpen: Sandboxing.isOpen\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n behaviours: augment(detail.inlineBehaviours, [\n Sandboxing.config({\n isPartOf: (sandbox, data, queryElem) => {\n return isPartOf$1(data, queryElem) || isPartOfRelated(sandbox, queryElem);\n },\n getAttachPoint: sandbox => {\n return detail.lazySink(sandbox).getOrDie();\n },\n onOpen: sandbox => {\n detail.onShow(sandbox);\n },\n onClose: sandbox => {\n detail.onHide(sandbox);\n }\n }),\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: Optional.none()\n }\n }),\n Receiving.config({\n channels: {\n ...receivingChannel$1({\n isExtraPart: spec.isExtraPart,\n ...detail.fireDismissalEventInstead.map(fe => ({ fireEventInstead: { event: fe.event } })).getOr({})\n }),\n ...receivingChannel({\n ...detail.fireRepositionEventInstead.map(fe => ({ fireEventInstead: { event: fe.event } })).getOr({}),\n doReposition: reposition\n })\n }\n })\n ]),\n eventOrder: detail.eventOrder,\n apis\n };\n };\n const InlineView = single({\n name: 'InlineView',\n configFields: [\n required$1('lazySink'),\n onHandler('onShow'),\n onHandler('onHide'),\n optionFunction('onEscape'),\n field('inlineBehaviours', [\n Sandboxing,\n Representing,\n Receiving\n ]),\n optionObjOf('fireDismissalEventInstead', [defaulted('event', dismissRequested())]),\n optionObjOf('fireRepositionEventInstead', [defaulted('event', repositionRequested())]),\n defaulted('getRelated', Optional.none),\n defaulted('isExtraPart', never),\n defaulted('eventOrder', Optional.none)\n ],\n factory: factory$o,\n apis: {\n showAt: (apis, component, anchor, thing) => {\n apis.showAt(component, anchor, thing);\n },\n showWithinBounds: (apis, component, anchor, thing, bounds) => {\n apis.showWithinBounds(component, anchor, thing, bounds);\n },\n showMenuAt: (apis, component, anchor, menuSpec) => {\n apis.showMenuAt(component, anchor, menuSpec);\n },\n showMenuWithinBounds: (apis, component, anchor, menuSpec, bounds) => {\n apis.showMenuWithinBounds(component, anchor, menuSpec, bounds);\n },\n hide: (apis, component) => {\n apis.hide(component);\n },\n isOpen: (apis, component) => apis.isOpen(component),\n getContent: (apis, component) => apis.getContent(component),\n setContent: (apis, component, thing) => {\n apis.setContent(component, thing);\n },\n reposition: (apis, component) => {\n apis.reposition(component);\n }\n }\n });\n\n var global$9 = tinymce.util.Tools.resolve('tinymce.util.Delay');\n\n const factory$n = detail => {\n const events = events$a(detail.action);\n const tag = detail.dom.tag;\n const lookupAttr = attr => get$g(detail.dom, 'attributes').bind(attrs => get$g(attrs, attr));\n const getModAttributes = () => {\n if (tag === 'button') {\n const type = lookupAttr('type').getOr('button');\n const roleAttrs = lookupAttr('role').map(role => ({ role })).getOr({});\n return {\n type,\n ...roleAttrs\n };\n } else {\n const role = detail.role.getOr(lookupAttr('role').getOr('button'));\n return { role };\n }\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components: detail.components,\n events,\n behaviours: SketchBehaviours.augment(detail.buttonBehaviours, [\n Focusing.config({}),\n Keying.config({\n mode: 'execution',\n useSpace: true,\n useEnter: true\n })\n ]),\n domModification: { attributes: getModAttributes() },\n eventOrder: detail.eventOrder\n };\n };\n const Button = single({\n name: 'Button',\n factory: factory$n,\n configFields: [\n defaulted('uid', undefined),\n required$1('dom'),\n defaulted('components', []),\n SketchBehaviours.field('buttonBehaviours', [\n Focusing,\n Keying\n ]),\n option$3('action'),\n option$3('role'),\n defaulted('eventOrder', {})\n ]\n });\n\n const getAttrs = elem => {\n const attributes = elem.dom.attributes !== undefined ? elem.dom.attributes : [];\n return foldl(attributes, (b, attr) => {\n if (attr.name === 'class') {\n return b;\n } else {\n return {\n ...b,\n [attr.name]: attr.value\n };\n }\n }, {});\n };\n const getClasses = elem => Array.prototype.slice.call(elem.dom.classList, 0);\n const fromHtml = html => {\n const elem = SugarElement.fromHtml(html);\n const children$1 = children(elem);\n const attrs = getAttrs(elem);\n const classes = getClasses(elem);\n const contents = children$1.length === 0 ? {} : { innerHtml: get$9(elem) };\n return {\n tag: name$3(elem),\n classes,\n attributes: attrs,\n ...contents\n };\n };\n\n const record = spec => {\n const uid = isSketchSpec(spec) && hasNonNullableKey(spec, 'uid') ? spec.uid : generate$5('memento');\n const get = anyInSystem => anyInSystem.getSystem().getByUid(uid).getOrDie();\n const getOpt = anyInSystem => anyInSystem.getSystem().getByUid(uid).toOptional();\n const asSpec = () => ({\n ...spec,\n uid\n });\n return {\n get,\n getOpt,\n asSpec\n };\n };\n\n /*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create: create$1\n } = Object; // eslint-disable-line import/no-mutable-exports\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n }\n\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n\n /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n }\n\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n function clone(object) {\n const newObject = create$1(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\n\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text$1 = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n const DOCTYPE_NAME = seal(/^html$/i);\n const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME,\n CUSTOM_ELEMENT: CUSTOM_ELEMENT\n });\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n };\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.1.7';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text$1]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create$1(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with <html>... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text$1);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n\n // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n getParentNode(node).removeChild(node);\n } catch (_) {\n remove(node);\n }\n };\n\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any occurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n\n /* Keep content except for bad-listed elements */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n return true;\n };\n\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\n\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n const initValue = value;\n\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Handle attributes that require Trusted Types */\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n\n /* Handle invalid data-* attribute set by try-catching it */\n if (value !== initValue) {\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n\n const sanitizeHtmlString = html => purify().sanitize(html);\n\n var global$8 = tinymce.util.Tools.resolve('tinymce.util.I18n');\n\n const rtlTransform = {\n 'indent': true,\n 'outdent': true,\n 'table-insert-column-after': true,\n 'table-insert-column-before': true,\n 'paste-column-after': true,\n 'paste-column-before': true,\n 'unordered-list': true,\n 'list-bull-circle': true,\n 'list-bull-default': true,\n 'list-bull-square': true\n };\n const defaultIconName = 'temporary-placeholder';\n const defaultIcon = icons => () => get$g(icons, defaultIconName).getOr('!not found!');\n const getIconName = (name, icons) => {\n const lcName = name.toLowerCase();\n if (global$8.isRtl()) {\n const rtlName = ensureTrailing(lcName, '-rtl');\n return has$2(icons, rtlName) ? rtlName : lcName;\n } else {\n return lcName;\n }\n };\n const lookupIcon = (name, icons) => get$g(icons, getIconName(name, icons));\n const get$2 = (name, iconProvider) => {\n const icons = iconProvider();\n return lookupIcon(name, icons).getOrThunk(defaultIcon(icons));\n };\n const getOr = (name, iconProvider, fallbackIcon) => {\n const icons = iconProvider();\n return lookupIcon(name, icons).or(fallbackIcon).getOrThunk(defaultIcon(icons));\n };\n const needsRtlTransform = iconName => global$8.isRtl() ? has$2(rtlTransform, iconName) : false;\n const addFocusableBehaviour = () => config('add-focusable', [runOnAttached(comp => {\n child(comp.element, 'svg').each(svg => set$9(svg, 'focusable', 'false'));\n })]);\n const renderIcon$3 = (spec, iconName, icons, fallbackIcon) => {\n var _a, _b;\n const rtlIconClasses = needsRtlTransform(iconName) ? ['tox-icon--flip'] : [];\n const iconHtml = get$g(icons, getIconName(iconName, icons)).or(fallbackIcon).getOrThunk(defaultIcon(icons));\n return {\n dom: {\n tag: spec.tag,\n attributes: (_a = spec.attributes) !== null && _a !== void 0 ? _a : {},\n classes: spec.classes.concat(rtlIconClasses),\n innerHtml: iconHtml\n },\n behaviours: derive$1([\n ...(_b = spec.behaviours) !== null && _b !== void 0 ? _b : [],\n addFocusableBehaviour()\n ])\n };\n };\n const render$3 = (iconName, spec, iconProvider, fallbackIcon = Optional.none()) => renderIcon$3(spec, iconName, iconProvider(), fallbackIcon);\n const renderFirst = (iconNames, spec, iconProvider) => {\n const icons = iconProvider();\n const iconName = find$5(iconNames, name => has$2(icons, getIconName(name, icons)));\n return renderIcon$3(spec, iconName.getOr(defaultIconName), icons, Optional.none());\n };\n\n const notificationIconMap = {\n success: 'checkmark',\n error: 'warning',\n err: 'error',\n warning: 'warning',\n warn: 'warning',\n info: 'info'\n };\n const factory$m = detail => {\n const memBannerText = record({\n dom: fromHtml(`<p>${ sanitizeHtmlString(detail.translationProvider(detail.text)) }</p>`),\n behaviours: derive$1([Replacing.config({})])\n });\n const renderPercentBar = percent => ({\n dom: {\n tag: 'div',\n classes: ['tox-bar'],\n styles: { width: `${ percent }%` }\n }\n });\n const renderPercentText = percent => ({\n dom: {\n tag: 'div',\n classes: ['tox-text'],\n innerHtml: `${ percent }%`\n }\n });\n const memBannerProgress = record({\n dom: {\n tag: 'div',\n classes: detail.progress ? [\n 'tox-progress-bar',\n 'tox-progress-indicator'\n ] : ['tox-progress-bar']\n },\n components: [\n {\n dom: {\n tag: 'div',\n classes: ['tox-bar-container']\n },\n components: [renderPercentBar(0)]\n },\n renderPercentText(0)\n ],\n behaviours: derive$1([Replacing.config({})])\n });\n const updateProgress = (comp, percent) => {\n if (comp.getSystem().isConnected()) {\n memBannerProgress.getOpt(comp).each(progress => {\n Replacing.set(progress, [\n {\n dom: {\n tag: 'div',\n classes: ['tox-bar-container']\n },\n components: [renderPercentBar(percent)]\n },\n renderPercentText(percent)\n ]);\n });\n }\n };\n const updateText = (comp, text) => {\n if (comp.getSystem().isConnected()) {\n const banner = memBannerText.get(comp);\n Replacing.set(banner, [text$2(text)]);\n }\n };\n const apis = {\n updateProgress,\n updateText\n };\n const iconChoices = flatten([\n detail.icon.toArray(),\n detail.level.toArray(),\n detail.level.bind(level => Optional.from(notificationIconMap[level])).toArray()\n ]);\n const memButton = record(Button.sketch({\n dom: {\n tag: 'button',\n classes: [\n 'tox-notification__dismiss',\n 'tox-button',\n 'tox-button--naked',\n 'tox-button--icon'\n ]\n },\n components: [render$3('close', {\n tag: 'span',\n classes: ['tox-icon'],\n attributes: { 'aria-label': detail.translationProvider('Close') }\n }, detail.iconProvider)],\n action: comp => {\n detail.onAction(comp);\n }\n }));\n const notificationIconSpec = renderFirst(iconChoices, {\n tag: 'div',\n classes: ['tox-notification__icon']\n }, detail.iconProvider);\n const notificationBodySpec = {\n dom: {\n tag: 'div',\n classes: ['tox-notification__body']\n },\n components: [memBannerText.asSpec()],\n behaviours: derive$1([Replacing.config({})])\n };\n const components = [\n notificationIconSpec,\n notificationBodySpec\n ];\n return {\n uid: detail.uid,\n dom: {\n tag: 'div',\n attributes: { role: 'alert' },\n classes: detail.level.map(level => [\n 'tox-notification',\n 'tox-notification--in',\n `tox-notification--${ level }`\n ]).getOr([\n 'tox-notification',\n 'tox-notification--in'\n ])\n },\n behaviours: derive$1([\n Focusing.config({}),\n config('notification-events', [run$1(focusin(), comp => {\n memButton.getOpt(comp).each(Focusing.focus);\n })])\n ]),\n components: components.concat(detail.progress ? [memBannerProgress.asSpec()] : []).concat(!detail.closeButton ? [] : [memButton.asSpec()]),\n apis\n };\n };\n const Notification = single({\n name: 'Notification',\n factory: factory$m,\n configFields: [\n option$3('level'),\n required$1('progress'),\n option$3('icon'),\n required$1('onAction'),\n required$1('text'),\n required$1('iconProvider'),\n required$1('translationProvider'),\n defaultedBoolean('closeButton', true)\n ],\n apis: {\n updateProgress: (apis, comp, percent) => {\n apis.updateProgress(comp, percent);\n },\n updateText: (apis, comp, text) => {\n apis.updateText(comp, text);\n }\n }\n });\n\n var NotificationManagerImpl = (editor, extras, uiMothership) => {\n const sharedBackstage = extras.backstage.shared;\n const getBounds = () => {\n const contentArea = box$1(SugarElement.fromDom(editor.getContentAreaContainer()));\n const win$1 = win();\n const x = clamp(win$1.x, contentArea.x, contentArea.right);\n const y = clamp(win$1.y, contentArea.y, contentArea.bottom);\n const right = Math.max(contentArea.right, win$1.right);\n const bottom = Math.max(contentArea.bottom, win$1.bottom);\n return Optional.some(bounds(x, y, right - x, bottom - y));\n };\n const open = (settings, closeCallback) => {\n const close = () => {\n closeCallback();\n InlineView.hide(notificationWrapper);\n };\n const notification = build$1(Notification.sketch({\n text: settings.text,\n level: contains$2([\n 'success',\n 'error',\n 'warning',\n 'warn',\n 'info'\n ], settings.type) ? settings.type : undefined,\n progress: settings.progressBar === true,\n icon: settings.icon,\n closeButton: settings.closeButton,\n onAction: close,\n iconProvider: sharedBackstage.providers.icons,\n translationProvider: sharedBackstage.providers.translate\n }));\n const notificationWrapper = build$1(InlineView.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-notifications-container']\n },\n lazySink: sharedBackstage.getSink,\n fireDismissalEventInstead: {},\n ...sharedBackstage.header.isPositionedAtTop() ? {} : { fireRepositionEventInstead: {} }\n }));\n uiMothership.add(notificationWrapper);\n if (isNumber(settings.timeout) && settings.timeout > 0) {\n global$9.setEditorTimeout(editor, () => {\n close();\n }, settings.timeout);\n }\n const reposition = () => {\n const notificationSpec = premade(notification);\n const anchorOverrides = { maxHeightFunction: expandable$1() };\n const allNotifications = editor.notificationManager.getNotifications();\n if (allNotifications[0] === thisNotification) {\n const anchor = {\n ...sharedBackstage.anchors.banner(),\n overrides: anchorOverrides\n };\n InlineView.showWithinBounds(notificationWrapper, notificationSpec, { anchor }, getBounds);\n } else {\n indexOf(allNotifications, thisNotification).each(idx => {\n const previousNotification = allNotifications[idx - 1].getEl();\n const nodeAnchor = {\n type: 'node',\n root: body(),\n node: Optional.some(SugarElement.fromDom(previousNotification)),\n overrides: anchorOverrides,\n layouts: {\n onRtl: () => [south$2],\n onLtr: () => [south$2]\n }\n };\n InlineView.showWithinBounds(notificationWrapper, notificationSpec, { anchor: nodeAnchor }, getBounds);\n });\n }\n };\n const thisNotification = {\n close,\n reposition,\n text: nuText => {\n Notification.updateText(notification, nuText);\n },\n settings,\n getEl: () => notification.element.dom,\n progressBar: {\n value: percent => {\n Notification.updateProgress(notification, percent);\n }\n }\n };\n return thisNotification;\n };\n const close = notification => {\n notification.close();\n };\n const getArgs = notification => {\n return notification.settings;\n };\n return {\n open,\n close,\n getArgs\n };\n };\n\n var global$7 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');\n\n var global$6 = tinymce.util.Tools.resolve('tinymce.EditorManager');\n\n var global$5 = tinymce.util.Tools.resolve('tinymce.Env');\n\n var ToolbarMode$1;\n (function (ToolbarMode) {\n ToolbarMode['default'] = 'wrap';\n ToolbarMode['floating'] = 'floating';\n ToolbarMode['sliding'] = 'sliding';\n ToolbarMode['scrolling'] = 'scrolling';\n }(ToolbarMode$1 || (ToolbarMode$1 = {})));\n var ToolbarLocation$1;\n (function (ToolbarLocation) {\n ToolbarLocation['auto'] = 'auto';\n ToolbarLocation['top'] = 'top';\n ToolbarLocation['bottom'] = 'bottom';\n }(ToolbarLocation$1 || (ToolbarLocation$1 = {})));\n const option$2 = name => editor => editor.options.get(name);\n const wrapOptional = fn => editor => Optional.from(fn(editor));\n const register$e = editor => {\n const isPhone = global$5.deviceType.isPhone();\n const isMobile = global$5.deviceType.isTablet() || isPhone;\n const registerOption = editor.options.register;\n const stringOrFalseProcessor = value => isString(value) || value === false;\n const stringOrNumberProcessor = value => isString(value) || isNumber(value);\n registerOption('skin', {\n processor: value => isString(value) || value === false,\n default: 'oxide'\n });\n registerOption('skin_url', { processor: 'string' });\n registerOption('height', {\n processor: stringOrNumberProcessor,\n default: Math.max(editor.getElement().offsetHeight, 400)\n });\n registerOption('width', {\n processor: stringOrNumberProcessor,\n default: global$7.DOM.getStyle(editor.getElement(), 'width')\n });\n registerOption('min_height', {\n processor: 'number',\n default: 100\n });\n registerOption('min_width', { processor: 'number' });\n registerOption('max_height', { processor: 'number' });\n registerOption('max_width', { processor: 'number' });\n registerOption('style_formats', { processor: 'object[]' });\n registerOption('style_formats_merge', {\n processor: 'boolean',\n default: false\n });\n registerOption('style_formats_autohide', {\n processor: 'boolean',\n default: false\n });\n registerOption('line_height_formats', {\n processor: 'string',\n default: '1 1.1 1.2 1.3 1.4 1.5 2'\n });\n registerOption('font_family_formats', {\n processor: 'string',\n default: 'Andale Mono=andale mono,monospace;' + 'Arial=arial,helvetica,sans-serif;' + 'Arial Black=arial black,sans-serif;' + 'Book Antiqua=book antiqua,palatino,serif;' + 'Comic Sans MS=comic sans ms,sans-serif;' + 'Courier New=courier new,courier,monospace;' + 'Georgia=georgia,palatino,serif;' + 'Helvetica=helvetica,arial,sans-serif;' + 'Impact=impact,sans-serif;' + 'Symbol=symbol;' + 'Tahoma=tahoma,arial,helvetica,sans-serif;' + 'Terminal=terminal,monaco,monospace;' + 'Times New Roman=times new roman,times,serif;' + 'Trebuchet MS=trebuchet ms,geneva,sans-serif;' + 'Verdana=verdana,geneva,sans-serif;' + 'Webdings=webdings;' + 'Wingdings=wingdings,zapf dingbats'\n });\n registerOption('font_size_formats', {\n processor: 'string',\n default: '8pt 10pt 12pt 14pt 18pt 24pt 36pt'\n });\n registerOption('font_size_input_default_unit', {\n processor: 'string',\n default: 'pt'\n });\n registerOption('block_formats', {\n processor: 'string',\n default: 'Paragraph=p;' + 'Heading 1=h1;' + 'Heading 2=h2;' + 'Heading 3=h3;' + 'Heading 4=h4;' + 'Heading 5=h5;' + 'Heading 6=h6;' + 'Preformatted=pre'\n });\n registerOption('content_langs', { processor: 'object[]' });\n registerOption('removed_menuitems', {\n processor: 'string',\n default: ''\n });\n registerOption('menubar', {\n processor: value => isString(value) || isBoolean(value),\n default: !isPhone\n });\n registerOption('menu', {\n processor: 'object',\n default: {}\n });\n registerOption('toolbar', {\n processor: value => {\n if (isBoolean(value) || isString(value) || isArray(value)) {\n return {\n value,\n valid: true\n };\n } else {\n return {\n valid: false,\n message: 'Must be a boolean, string or array.'\n };\n }\n },\n default: true\n });\n range$2(9, num => {\n registerOption('toolbar' + (num + 1), { processor: 'string' });\n });\n registerOption('toolbar_mode', {\n processor: 'string',\n default: isMobile ? 'scrolling' : 'floating'\n });\n registerOption('toolbar_groups', {\n processor: 'object',\n default: {}\n });\n registerOption('toolbar_location', {\n processor: 'string',\n default: ToolbarLocation$1.auto\n });\n registerOption('toolbar_persist', {\n processor: 'boolean',\n default: false\n });\n registerOption('toolbar_sticky', {\n processor: 'boolean',\n default: editor.inline\n });\n registerOption('toolbar_sticky_offset', {\n processor: 'number',\n default: 0\n });\n registerOption('fixed_toolbar_container', {\n processor: 'string',\n default: ''\n });\n registerOption('fixed_toolbar_container_target', { processor: 'object' });\n registerOption('ui_mode', {\n processor: 'string',\n default: 'combined'\n });\n registerOption('file_picker_callback', { processor: 'function' });\n registerOption('file_picker_validator_handler', { processor: 'function' });\n registerOption('file_picker_types', { processor: 'string' });\n registerOption('typeahead_urls', {\n processor: 'boolean',\n default: true\n });\n registerOption('anchor_top', {\n processor: stringOrFalseProcessor,\n default: '#top'\n });\n registerOption('anchor_bottom', {\n processor: stringOrFalseProcessor,\n default: '#bottom'\n });\n registerOption('draggable_modal', {\n processor: 'boolean',\n default: false\n });\n registerOption('statusbar', {\n processor: 'boolean',\n default: true\n });\n registerOption('elementpath', {\n processor: 'boolean',\n default: true\n });\n registerOption('branding', {\n processor: 'boolean',\n default: true\n });\n registerOption('promotion', {\n processor: 'boolean',\n default: true\n });\n registerOption('resize', {\n processor: value => value === 'both' || isBoolean(value),\n default: !global$5.deviceType.isTouch()\n });\n registerOption('sidebar_show', { processor: 'string' });\n registerOption('help_accessibility', {\n processor: 'boolean',\n default: editor.hasPlugin('help')\n });\n registerOption('default_font_stack', {\n processor: 'string[]',\n default: []\n });\n };\n const isReadOnly = option$2('readonly');\n const getHeightOption = option$2('height');\n const getWidthOption = option$2('width');\n const getMinWidthOption = wrapOptional(option$2('min_width'));\n const getMinHeightOption = wrapOptional(option$2('min_height'));\n const getMaxWidthOption = wrapOptional(option$2('max_width'));\n const getMaxHeightOption = wrapOptional(option$2('max_height'));\n const getUserStyleFormats = wrapOptional(option$2('style_formats'));\n const shouldMergeStyleFormats = option$2('style_formats_merge');\n const shouldAutoHideStyleFormats = option$2('style_formats_autohide');\n const getContentLanguages = option$2('content_langs');\n const getRemovedMenuItems = option$2('removed_menuitems');\n const getToolbarMode = option$2('toolbar_mode');\n const getToolbarGroups = option$2('toolbar_groups');\n const getToolbarLocation = option$2('toolbar_location');\n const fixedContainerSelector = option$2('fixed_toolbar_container');\n const fixedToolbarContainerTarget = option$2('fixed_toolbar_container_target');\n const isToolbarPersist = option$2('toolbar_persist');\n const getStickyToolbarOffset = option$2('toolbar_sticky_offset');\n const getMenubar = option$2('menubar');\n const getToolbar = option$2('toolbar');\n const getFilePickerCallback = option$2('file_picker_callback');\n const getFilePickerValidatorHandler = option$2('file_picker_validator_handler');\n const getFontSizeInputDefaultUnit = option$2('font_size_input_default_unit');\n const getFilePickerTypes = option$2('file_picker_types');\n const useTypeaheadUrls = option$2('typeahead_urls');\n const getAnchorTop = option$2('anchor_top');\n const getAnchorBottom = option$2('anchor_bottom');\n const isDraggableModal$1 = option$2('draggable_modal');\n const useStatusBar = option$2('statusbar');\n const useElementPath = option$2('elementpath');\n const useBranding = option$2('branding');\n const getResize = option$2('resize');\n const getPasteAsText = option$2('paste_as_text');\n const getSidebarShow = option$2('sidebar_show');\n const promotionEnabled = option$2('promotion');\n const useHelpAccessibility = option$2('help_accessibility');\n const getDefaultFontStack = option$2('default_font_stack');\n const isSkinDisabled = editor => editor.options.get('skin') === false;\n const isMenubarEnabled = editor => editor.options.get('menubar') !== false;\n const getSkinUrl = editor => {\n const skinUrl = editor.options.get('skin_url');\n if (isSkinDisabled(editor)) {\n return skinUrl;\n } else {\n if (skinUrl) {\n return editor.documentBaseURI.toAbsolute(skinUrl);\n } else {\n const skin = editor.options.get('skin');\n return global$6.baseURL + '/skins/ui/' + skin;\n }\n }\n };\n const getSkinUrlOption = editor => Optional.from(editor.options.get('skin_url'));\n const getLineHeightFormats = editor => editor.options.get('line_height_formats').split(' ');\n const isToolbarEnabled = editor => {\n const toolbar = getToolbar(editor);\n const isToolbarString = isString(toolbar);\n const isToolbarObjectArray = isArray(toolbar) && toolbar.length > 0;\n return !isMultipleToolbars(editor) && (isToolbarObjectArray || isToolbarString || toolbar === true);\n };\n const getMultipleToolbarsOption = editor => {\n const toolbars = range$2(9, num => editor.options.get('toolbar' + (num + 1)));\n const toolbarArray = filter$2(toolbars, isString);\n return someIf(toolbarArray.length > 0, toolbarArray);\n };\n const isMultipleToolbars = editor => getMultipleToolbarsOption(editor).fold(() => {\n const toolbar = getToolbar(editor);\n return isArrayOf(toolbar, isString) && toolbar.length > 0;\n }, always);\n const isToolbarLocationBottom = editor => getToolbarLocation(editor) === ToolbarLocation$1.bottom;\n const fixedContainerTarget = editor => {\n var _a;\n if (!editor.inline) {\n return Optional.none();\n }\n const selector = (_a = fixedContainerSelector(editor)) !== null && _a !== void 0 ? _a : '';\n if (selector.length > 0) {\n return descendant(body(), selector);\n }\n const element = fixedToolbarContainerTarget(editor);\n if (isNonNullable(element)) {\n return Optional.some(SugarElement.fromDom(element));\n }\n return Optional.none();\n };\n const useFixedContainer = editor => editor.inline && fixedContainerTarget(editor).isSome();\n const getUiContainer = editor => {\n const fixedContainer = fixedContainerTarget(editor);\n return fixedContainer.getOrThunk(() => getContentContainer(getRootNode(SugarElement.fromDom(editor.getElement()))));\n };\n const isDistractionFree = editor => editor.inline && !isMenubarEnabled(editor) && !isToolbarEnabled(editor) && !isMultipleToolbars(editor);\n const isStickyToolbar = editor => {\n const isStickyToolbar = editor.options.get('toolbar_sticky');\n return (isStickyToolbar || editor.inline) && !useFixedContainer(editor) && !isDistractionFree(editor);\n };\n const isSplitUiMode = editor => !useFixedContainer(editor) && editor.options.get('ui_mode') === 'split';\n const getMenus = editor => {\n const menu = editor.options.get('menu');\n return map$1(menu, menu => ({\n ...menu,\n items: menu.items\n }));\n };\n\n var Options = /*#__PURE__*/Object.freeze({\n __proto__: null,\n get ToolbarMode () { return ToolbarMode$1; },\n get ToolbarLocation () { return ToolbarLocation$1; },\n register: register$e,\n getSkinUrl: getSkinUrl,\n getSkinUrlOption: getSkinUrlOption,\n isReadOnly: isReadOnly,\n isSkinDisabled: isSkinDisabled,\n getHeightOption: getHeightOption,\n getWidthOption: getWidthOption,\n getMinWidthOption: getMinWidthOption,\n getMinHeightOption: getMinHeightOption,\n getMaxWidthOption: getMaxWidthOption,\n getMaxHeightOption: getMaxHeightOption,\n getUserStyleFormats: getUserStyleFormats,\n shouldMergeStyleFormats: shouldMergeStyleFormats,\n shouldAutoHideStyleFormats: shouldAutoHideStyleFormats,\n getLineHeightFormats: getLineHeightFormats,\n getContentLanguages: getContentLanguages,\n getRemovedMenuItems: getRemovedMenuItems,\n isMenubarEnabled: isMenubarEnabled,\n isMultipleToolbars: isMultipleToolbars,\n isToolbarEnabled: isToolbarEnabled,\n isToolbarPersist: isToolbarPersist,\n getMultipleToolbarsOption: getMultipleToolbarsOption,\n getUiContainer: getUiContainer,\n useFixedContainer: useFixedContainer,\n isSplitUiMode: isSplitUiMode,\n getToolbarMode: getToolbarMode,\n isDraggableModal: isDraggableModal$1,\n isDistractionFree: isDistractionFree,\n isStickyToolbar: isStickyToolbar,\n getStickyToolbarOffset: getStickyToolbarOffset,\n getToolbarLocation: getToolbarLocation,\n isToolbarLocationBottom: isToolbarLocationBottom,\n getToolbarGroups: getToolbarGroups,\n getMenus: getMenus,\n getMenubar: getMenubar,\n getToolbar: getToolbar,\n getFilePickerCallback: getFilePickerCallback,\n getFilePickerTypes: getFilePickerTypes,\n useTypeaheadUrls: useTypeaheadUrls,\n getAnchorTop: getAnchorTop,\n getAnchorBottom: getAnchorBottom,\n getFilePickerValidatorHandler: getFilePickerValidatorHandler,\n getFontSizeInputDefaultUnit: getFontSizeInputDefaultUnit,\n useStatusBar: useStatusBar,\n useElementPath: useElementPath,\n promotionEnabled: promotionEnabled,\n useBranding: useBranding,\n getResize: getResize,\n getPasteAsText: getPasteAsText,\n getSidebarShow: getSidebarShow,\n useHelpAccessibility: useHelpAccessibility,\n getDefaultFontStack: getDefaultFontStack\n });\n\n const autocompleteSelector = '[data-mce-autocompleter]';\n const detect$1 = elm => closest$1(elm, autocompleteSelector);\n const findIn = elm => descendant(elm, autocompleteSelector);\n\n const setup$e = (api, editor) => {\n const redirectKeyToItem = (item, e) => {\n emitWith(item, keydown(), { raw: e });\n };\n const getItem = () => api.getMenu().bind(Highlighting.getHighlighted);\n editor.on('keydown', e => {\n const keyCode = e.which;\n if (!api.isActive()) {\n return;\n }\n if (api.isMenuOpen()) {\n if (keyCode === 13) {\n getItem().each(emitExecute);\n e.preventDefault();\n } else if (keyCode === 40) {\n getItem().fold(() => {\n api.getMenu().each(Highlighting.highlightFirst);\n }, item => {\n redirectKeyToItem(item, e);\n });\n e.preventDefault();\n e.stopImmediatePropagation();\n } else if (keyCode === 37 || keyCode === 38 || keyCode === 39) {\n getItem().each(item => {\n redirectKeyToItem(item, e);\n e.preventDefault();\n e.stopImmediatePropagation();\n });\n }\n } else {\n if (keyCode === 13 || keyCode === 38 || keyCode === 40) {\n api.cancelIfNecessary();\n }\n }\n });\n editor.on('NodeChange', e => {\n if (api.isActive() && !api.isProcessingAction() && detect$1(SugarElement.fromDom(e.element)).isNone()) {\n api.cancelIfNecessary();\n }\n });\n };\n const AutocompleterEditorEvents = { setup: setup$e };\n\n var ItemResponse;\n (function (ItemResponse) {\n ItemResponse[ItemResponse['CLOSE_ON_EXECUTE'] = 0] = 'CLOSE_ON_EXECUTE';\n ItemResponse[ItemResponse['BUBBLE_TO_SANDBOX'] = 1] = 'BUBBLE_TO_SANDBOX';\n }(ItemResponse || (ItemResponse = {})));\n var ItemResponse$1 = ItemResponse;\n\n const navClass = 'tox-menu-nav__js';\n const selectableClass = 'tox-collection__item';\n const colorClass = 'tox-swatch';\n const presetClasses = {\n normal: navClass,\n color: colorClass\n };\n const tickedClass = 'tox-collection__item--enabled';\n const groupHeadingClass = 'tox-collection__group-heading';\n const iconClass = 'tox-collection__item-icon';\n const textClass = 'tox-collection__item-label';\n const accessoryClass = 'tox-collection__item-accessory';\n const caretClass = 'tox-collection__item-caret';\n const checkmarkClass = 'tox-collection__item-checkmark';\n const activeClass = 'tox-collection__item--active';\n const containerClass = 'tox-collection__item-container';\n const containerColumnClass = 'tox-collection__item-container--column';\n const containerRowClass = 'tox-collection__item-container--row';\n const containerAlignRightClass = 'tox-collection__item-container--align-right';\n const containerAlignLeftClass = 'tox-collection__item-container--align-left';\n const containerValignTopClass = 'tox-collection__item-container--valign-top';\n const containerValignMiddleClass = 'tox-collection__item-container--valign-middle';\n const containerValignBottomClass = 'tox-collection__item-container--valign-bottom';\n const classForPreset = presets => get$g(presetClasses, presets).getOr(navClass);\n\n const forMenu = presets => {\n if (presets === 'color') {\n return 'tox-swatches';\n } else {\n return 'tox-menu';\n }\n };\n const classes = presets => ({\n backgroundMenu: 'tox-background-menu',\n selectedMenu: 'tox-selected-menu',\n selectedItem: 'tox-collection__item--active',\n hasIcons: 'tox-menu--has-icons',\n menu: forMenu(presets),\n tieredMenu: 'tox-tiered-menu'\n });\n\n const markers = presets => {\n const menuClasses = classes(presets);\n return {\n backgroundMenu: menuClasses.backgroundMenu,\n selectedMenu: menuClasses.selectedMenu,\n menu: menuClasses.menu,\n selectedItem: menuClasses.selectedItem,\n item: classForPreset(presets)\n };\n };\n const dom$1 = (hasIcons, columns, presets) => {\n const menuClasses = classes(presets);\n return {\n tag: 'div',\n classes: flatten([\n [\n menuClasses.menu,\n `tox-menu-${ columns }-column`\n ],\n hasIcons ? [menuClasses.hasIcons] : []\n ])\n };\n };\n const components = [Menu.parts.items({})];\n const part = (hasIcons, columns, presets) => {\n const menuClasses = classes(presets);\n const d = {\n tag: 'div',\n classes: flatten([[menuClasses.tieredMenu]])\n };\n return {\n dom: d,\n markers: markers(presets)\n };\n };\n\n const schema$l = constant$1([\n option$3('data'),\n defaulted('inputAttributes', {}),\n defaulted('inputStyles', {}),\n defaulted('tag', 'input'),\n defaulted('inputClasses', []),\n onHandler('onSetValue'),\n defaulted('styles', {}),\n defaulted('eventOrder', {}),\n field('inputBehaviours', [\n Representing,\n Focusing\n ]),\n defaulted('selectOnFocus', true)\n ]);\n const focusBehaviours = detail => derive$1([Focusing.config({\n onFocus: !detail.selectOnFocus ? noop : component => {\n const input = component.element;\n const value = get$6(input);\n input.dom.setSelectionRange(0, value.length);\n }\n })]);\n const behaviours = detail => ({\n ...focusBehaviours(detail),\n ...augment(detail.inputBehaviours, [Representing.config({\n store: {\n mode: 'manual',\n ...detail.data.map(data => ({ initialValue: data })).getOr({}),\n getValue: input => {\n return get$6(input.element);\n },\n setValue: (input, data) => {\n const current = get$6(input.element);\n if (current !== data) {\n set$5(input.element, data);\n }\n }\n },\n onSetValue: detail.onSetValue\n })])\n });\n const dom = detail => ({\n tag: detail.tag,\n attributes: {\n type: 'text',\n ...detail.inputAttributes\n },\n styles: detail.inputStyles,\n classes: detail.inputClasses\n });\n\n const factory$l = (detail, _spec) => ({\n uid: detail.uid,\n dom: dom(detail),\n components: [],\n behaviours: behaviours(detail),\n eventOrder: detail.eventOrder\n });\n const Input = single({\n name: 'Input',\n configFields: schema$l(),\n factory: factory$l\n });\n\n const refetchTriggerEvent = generate$6('refetch-trigger-event');\n const redirectMenuItemInteractionEvent = generate$6('redirect-menu-item-interaction');\n\n const menuSearcherClass = 'tox-menu__searcher';\n const findWithinSandbox = sandboxComp => {\n return descendant(sandboxComp.element, `.${ menuSearcherClass }`).bind(inputElem => sandboxComp.getSystem().getByDom(inputElem).toOptional());\n };\n const findWithinMenu = findWithinSandbox;\n const restoreState = (inputComp, searcherState) => {\n Representing.setValue(inputComp, searcherState.fetchPattern);\n inputComp.element.dom.selectionStart = searcherState.selectionStart;\n inputComp.element.dom.selectionEnd = searcherState.selectionEnd;\n };\n const saveState = inputComp => {\n const fetchPattern = Representing.getValue(inputComp);\n const selectionStart = inputComp.element.dom.selectionStart;\n const selectionEnd = inputComp.element.dom.selectionEnd;\n return {\n fetchPattern,\n selectionStart,\n selectionEnd\n };\n };\n const setActiveDescendant = (inputComp, active) => {\n getOpt(active.element, 'id').each(id => set$9(inputComp.element, 'aria-activedescendant', id));\n };\n const renderMenuSearcher = spec => {\n const handleByBrowser = (comp, se) => {\n se.cut();\n return Optional.none();\n };\n const handleByHighlightedItem = (comp, se) => {\n const eventData = {\n interactionEvent: se.event,\n eventType: se.event.raw.type\n };\n emitWith(comp, redirectMenuItemInteractionEvent, eventData);\n return Optional.some(true);\n };\n const customSearcherEventsName = 'searcher-events';\n return {\n dom: {\n tag: 'div',\n classes: [selectableClass]\n },\n components: [Input.sketch({\n inputClasses: [\n menuSearcherClass,\n 'tox-textfield'\n ],\n inputAttributes: {\n ...spec.placeholder.map(placeholder => ({ placeholder: spec.i18n(placeholder) })).getOr({}),\n 'type': 'search',\n 'aria-autocomplete': 'list'\n },\n inputBehaviours: derive$1([\n config(customSearcherEventsName, [\n run$1(input(), inputComp => {\n emit(inputComp, refetchTriggerEvent);\n }),\n run$1(keydown(), (inputComp, se) => {\n if (se.event.raw.key === 'Escape') {\n se.stop();\n }\n })\n ]),\n Keying.config({\n mode: 'special',\n onLeft: handleByBrowser,\n onRight: handleByBrowser,\n onSpace: handleByBrowser,\n onEnter: handleByHighlightedItem,\n onEscape: handleByHighlightedItem,\n onUp: handleByHighlightedItem,\n onDown: handleByHighlightedItem\n })\n ]),\n eventOrder: {\n keydown: [\n customSearcherEventsName,\n Keying.name()\n ]\n }\n })]\n };\n };\n\n const searchResultsClass = 'tox-collection--results__js';\n const augmentWithAria = item => {\n var _a;\n if (item.dom) {\n return {\n ...item,\n dom: {\n ...item.dom,\n attributes: {\n ...(_a = item.dom.attributes) !== null && _a !== void 0 ? _a : {},\n 'id': generate$6('aria-item-search-result-id'),\n 'aria-selected': 'false'\n }\n }\n };\n } else {\n return item;\n }\n };\n\n const chunk = (rowDom, numColumns) => items => {\n const chunks = chunk$1(items, numColumns);\n return map$2(chunks, c => ({\n dom: rowDom,\n components: c\n }));\n };\n const forSwatch = columns => ({\n dom: {\n tag: 'div',\n classes: [\n 'tox-menu',\n 'tox-swatches-menu'\n ]\n },\n components: [{\n dom: {\n tag: 'div',\n classes: ['tox-swatches']\n },\n components: [Menu.parts.items({\n preprocess: columns !== 'auto' ? chunk({\n tag: 'div',\n classes: ['tox-swatches__row']\n }, columns) : identity\n })]\n }]\n });\n const forToolbar = columns => ({\n dom: {\n tag: 'div',\n classes: [\n 'tox-menu',\n 'tox-collection',\n 'tox-collection--toolbar',\n 'tox-collection--toolbar-lg'\n ]\n },\n components: [Menu.parts.items({\n preprocess: chunk({\n tag: 'div',\n classes: ['tox-collection__group']\n }, columns)\n })]\n });\n const preprocessCollection = (items, isSeparator) => {\n const allSplits = [];\n let currentSplit = [];\n each$1(items, (item, i) => {\n if (isSeparator(item, i)) {\n if (currentSplit.length > 0) {\n allSplits.push(currentSplit);\n }\n currentSplit = [];\n if (has$2(item.dom, 'innerHtml') || item.components && item.components.length > 0) {\n currentSplit.push(item);\n }\n } else {\n currentSplit.push(item);\n }\n });\n if (currentSplit.length > 0) {\n allSplits.push(currentSplit);\n }\n return map$2(allSplits, s => ({\n dom: {\n tag: 'div',\n classes: ['tox-collection__group']\n },\n components: s\n }));\n };\n const insertItemsPlaceholder = (columns, initItems, onItem) => {\n return Menu.parts.items({\n preprocess: rawItems => {\n const enrichedItems = map$2(rawItems, onItem);\n if (columns !== 'auto' && columns > 1) {\n return chunk({\n tag: 'div',\n classes: ['tox-collection__group']\n }, columns)(enrichedItems);\n } else {\n return preprocessCollection(enrichedItems, (_item, i) => initItems[i].type === 'separator');\n }\n }\n });\n };\n const forCollection = (columns, initItems, _hasIcons = true) => ({\n dom: {\n tag: 'div',\n classes: [\n 'tox-menu',\n 'tox-collection'\n ].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid'])\n },\n components: [insertItemsPlaceholder(columns, initItems, identity)]\n });\n const forCollectionWithSearchResults = (columns, initItems, _hasIcons = true) => {\n const ariaControlsSearchResults = generate$6('aria-controls-search-results');\n return {\n dom: {\n tag: 'div',\n classes: [\n 'tox-menu',\n 'tox-collection',\n searchResultsClass\n ].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid']),\n attributes: { id: ariaControlsSearchResults }\n },\n components: [insertItemsPlaceholder(columns, initItems, augmentWithAria)]\n };\n };\n const forCollectionWithSearchField = (columns, initItems, searchField) => {\n const ariaControlsSearchResults = generate$6('aria-controls-search-results');\n return {\n dom: {\n tag: 'div',\n classes: [\n 'tox-menu',\n 'tox-collection'\n ].concat(columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid'])\n },\n components: [\n renderMenuSearcher({\n i18n: global$8.translate,\n placeholder: searchField.placeholder\n }),\n {\n dom: {\n tag: 'div',\n classes: [\n ...columns === 1 ? ['tox-collection--list'] : ['tox-collection--grid'],\n searchResultsClass\n ],\n attributes: { id: ariaControlsSearchResults }\n },\n components: [insertItemsPlaceholder(columns, initItems, augmentWithAria)]\n }\n ]\n };\n };\n const forHorizontalCollection = (initItems, _hasIcons = true) => ({\n dom: {\n tag: 'div',\n classes: [\n 'tox-collection',\n 'tox-collection--horizontal'\n ]\n },\n components: [Menu.parts.items({ preprocess: items => preprocessCollection(items, (_item, i) => initItems[i].type === 'separator') })]\n });\n\n const menuHasIcons = xs => exists(xs, item => 'icon' in item && item.icon !== undefined);\n const handleError = error => {\n console.error(formatError(error));\n console.log(error);\n return Optional.none();\n };\n const createHorizontalPartialMenuWithAlloyItems = (value, _hasIcons, items, _columns, _menuLayout) => {\n const structure = forHorizontalCollection(items);\n return {\n value,\n dom: structure.dom,\n components: structure.components,\n items\n };\n };\n const createPartialMenuWithAlloyItems = (value, hasIcons, items, columns, menuLayout) => {\n const getNormalStructure = () => {\n if (menuLayout.menuType !== 'searchable') {\n return forCollection(columns, items);\n } else {\n return menuLayout.searchMode.searchMode === 'search-with-field' ? forCollectionWithSearchField(columns, items, menuLayout.searchMode) : forCollectionWithSearchResults(columns, items);\n }\n };\n if (menuLayout.menuType === 'color') {\n const structure = forSwatch(columns);\n return {\n value,\n dom: structure.dom,\n components: structure.components,\n items\n };\n } else if (menuLayout.menuType === 'normal' && columns === 'auto') {\n const structure = forCollection(columns, items);\n return {\n value,\n dom: structure.dom,\n components: structure.components,\n items\n };\n } else if (menuLayout.menuType === 'normal' || menuLayout.menuType === 'searchable') {\n const structure = getNormalStructure();\n return {\n value,\n dom: structure.dom,\n components: structure.components,\n items\n };\n } else if (menuLayout.menuType === 'listpreview' && columns !== 'auto') {\n const structure = forToolbar(columns);\n return {\n value,\n dom: structure.dom,\n components: structure.components,\n items\n };\n } else {\n return {\n value,\n dom: dom$1(hasIcons, columns, menuLayout.menuType),\n components: components,\n items\n };\n }\n };\n\n const type = requiredString('type');\n const name$1 = requiredString('name');\n const label = requiredString('label');\n const text = requiredString('text');\n const title = requiredString('title');\n const icon = requiredString('icon');\n const value$1 = requiredString('value');\n const fetch$1 = requiredFunction('fetch');\n const getSubmenuItems = requiredFunction('getSubmenuItems');\n const onAction = requiredFunction('onAction');\n const onItemAction = requiredFunction('onItemAction');\n const onSetup = defaultedFunction('onSetup', () => noop);\n const optionalName = optionString('name');\n const optionalText = optionString('text');\n const optionalIcon = optionString('icon');\n const optionalTooltip = optionString('tooltip');\n const optionalLabel = optionString('label');\n const optionalShortcut = optionString('shortcut');\n const optionalSelect = optionFunction('select');\n const active = defaultedBoolean('active', false);\n const borderless = defaultedBoolean('borderless', false);\n const enabled = defaultedBoolean('enabled', true);\n const primary = defaultedBoolean('primary', false);\n const defaultedColumns = num => defaulted('columns', num);\n const defaultedMeta = defaulted('meta', {});\n const defaultedOnAction = defaultedFunction('onAction', noop);\n const defaultedType = type => defaultedString('type', type);\n const generatedName = namePrefix => field$1('name', 'name', defaultedThunk(() => generate$6(`${ namePrefix }-name`)), string);\n const generatedValue = valuePrefix => field$1('value', 'value', defaultedThunk(() => generate$6(`${ valuePrefix }-value`)), anyValue());\n\n const separatorMenuItemSchema = objOf([\n type,\n optionalText\n ]);\n const createSeparatorMenuItem = spec => asRaw('separatormenuitem', separatorMenuItemSchema, spec);\n\n const autocompleterItemSchema = objOf([\n defaultedType('autocompleteitem'),\n active,\n enabled,\n defaultedMeta,\n value$1,\n optionalText,\n optionalIcon\n ]);\n const createSeparatorItem = spec => asRaw('Autocompleter.Separator', separatorMenuItemSchema, spec);\n const createAutocompleterItem = spec => asRaw('Autocompleter.Item', autocompleterItemSchema, spec);\n\n const baseToolbarButtonFields = [\n enabled,\n optionalTooltip,\n optionalIcon,\n optionalText,\n onSetup\n ];\n const toolbarButtonSchema = objOf([\n type,\n onAction\n ].concat(baseToolbarButtonFields));\n const createToolbarButton = spec => asRaw('toolbarbutton', toolbarButtonSchema, spec);\n\n const baseToolbarToggleButtonFields = [active].concat(baseToolbarButtonFields);\n const toggleButtonSchema = objOf(baseToolbarToggleButtonFields.concat([\n type,\n onAction\n ]));\n const createToggleButton = spec => asRaw('ToggleButton', toggleButtonSchema, spec);\n\n const contextBarFields = [\n defaultedFunction('predicate', never),\n defaultedStringEnum('scope', 'node', [\n 'node',\n 'editor'\n ]),\n defaultedStringEnum('position', 'selection', [\n 'node',\n 'selection',\n 'line'\n ])\n ];\n\n const contextButtonFields = baseToolbarButtonFields.concat([\n defaultedType('contextformbutton'),\n primary,\n onAction,\n customField('original', identity)\n ]);\n const contextToggleButtonFields = baseToolbarToggleButtonFields.concat([\n defaultedType('contextformbutton'),\n primary,\n onAction,\n customField('original', identity)\n ]);\n const launchButtonFields = baseToolbarButtonFields.concat([defaultedType('contextformbutton')]);\n const launchToggleButtonFields = baseToolbarToggleButtonFields.concat([defaultedType('contextformtogglebutton')]);\n const toggleOrNormal = choose$1('type', {\n contextformbutton: contextButtonFields,\n contextformtogglebutton: contextToggleButtonFields\n });\n const contextFormSchema = objOf([\n defaultedType('contextform'),\n defaultedFunction('initValue', constant$1('')),\n optionalLabel,\n requiredArrayOf('commands', toggleOrNormal),\n optionOf('launch', choose$1('type', {\n contextformbutton: launchButtonFields,\n contextformtogglebutton: launchToggleButtonFields\n }))\n ].concat(contextBarFields));\n const createContextForm = spec => asRaw('ContextForm', contextFormSchema, spec);\n\n const contextToolbarSchema = objOf([\n defaultedType('contexttoolbar'),\n requiredString('items')\n ].concat(contextBarFields));\n const createContextToolbar = spec => asRaw('ContextToolbar', contextToolbarSchema, spec);\n\n const cardImageFields = [\n type,\n requiredString('src'),\n optionString('alt'),\n defaultedArrayOf('classes', [], string)\n ];\n const cardImageSchema = objOf(cardImageFields);\n\n const cardTextFields = [\n type,\n text,\n optionalName,\n defaultedArrayOf('classes', ['tox-collection__item-label'], string)\n ];\n const cardTextSchema = objOf(cardTextFields);\n\n const itemSchema$1 = valueThunk(() => choose$2('type', {\n cardimage: cardImageSchema,\n cardtext: cardTextSchema,\n cardcontainer: cardContainerSchema\n }));\n const cardContainerSchema = objOf([\n type,\n defaultedString('direction', 'horizontal'),\n defaultedString('align', 'left'),\n defaultedString('valign', 'middle'),\n requiredArrayOf('items', itemSchema$1)\n ]);\n\n const commonMenuItemFields = [\n enabled,\n optionalText,\n optionalShortcut,\n generatedValue('menuitem'),\n defaultedMeta\n ];\n\n const cardMenuItemSchema = objOf([\n type,\n optionalLabel,\n requiredArrayOf('items', itemSchema$1),\n onSetup,\n defaultedOnAction\n ].concat(commonMenuItemFields));\n const createCardMenuItem = spec => asRaw('cardmenuitem', cardMenuItemSchema, spec);\n\n const choiceMenuItemSchema = objOf([\n type,\n active,\n optionalIcon\n ].concat(commonMenuItemFields));\n const createChoiceMenuItem = spec => asRaw('choicemenuitem', choiceMenuItemSchema, spec);\n\n const baseFields = [\n type,\n requiredString('fancytype'),\n defaultedOnAction\n ];\n const insertTableFields = [defaulted('initData', {})].concat(baseFields);\n const colorSwatchFields = [\n optionFunction('select'),\n defaultedObjOf('initData', {}, [\n defaultedBoolean('allowCustomColors', true),\n defaultedString('storageKey', 'default'),\n optionArrayOf('colors', anyValue())\n ])\n ].concat(baseFields);\n const fancyMenuItemSchema = choose$1('fancytype', {\n inserttable: insertTableFields,\n colorswatch: colorSwatchFields\n });\n const createFancyMenuItem = spec => asRaw('fancymenuitem', fancyMenuItemSchema, spec);\n\n const menuItemSchema = objOf([\n type,\n onSetup,\n defaultedOnAction,\n optionalIcon\n ].concat(commonMenuItemFields));\n const createMenuItem = spec => asRaw('menuitem', menuItemSchema, spec);\n\n const nestedMenuItemSchema = objOf([\n type,\n getSubmenuItems,\n onSetup,\n optionalIcon\n ].concat(commonMenuItemFields));\n const createNestedMenuItem = spec => asRaw('nestedmenuitem', nestedMenuItemSchema, spec);\n\n const toggleMenuItemSchema = objOf([\n type,\n optionalIcon,\n active,\n onSetup,\n onAction\n ].concat(commonMenuItemFields));\n const createToggleMenuItem = spec => asRaw('togglemenuitem', toggleMenuItemSchema, spec);\n\n const detectSize = (comp, margin, selectorClass) => {\n const descendants$1 = descendants(comp.element, '.' + selectorClass);\n if (descendants$1.length > 0) {\n const columnLength = findIndex$1(descendants$1, c => {\n const thisTop = c.dom.getBoundingClientRect().top;\n const cTop = descendants$1[0].dom.getBoundingClientRect().top;\n return Math.abs(thisTop - cTop) > margin;\n }).getOr(descendants$1.length);\n return Optional.some({\n numColumns: columnLength,\n numRows: Math.ceil(descendants$1.length / columnLength)\n });\n } else {\n return Optional.none();\n }\n };\n\n const namedEvents = (name, handlers) => derive$1([config(name, handlers)]);\n const unnamedEvents = handlers => namedEvents(generate$6('unnamed-events'), handlers);\n const SimpleBehaviours = {\n namedEvents,\n unnamedEvents\n };\n\n const ExclusivityChannel = generate$6('tooltip.exclusive');\n const ShowTooltipEvent = generate$6('tooltip.show');\n const HideTooltipEvent = generate$6('tooltip.hide');\n\n const hideAllExclusive = (component, _tConfig, _tState) => {\n component.getSystem().broadcastOn([ExclusivityChannel], {});\n };\n const setComponents = (component, tConfig, tState, specs) => {\n tState.getTooltip().each(tooltip => {\n if (tooltip.getSystem().isConnected()) {\n Replacing.set(tooltip, specs);\n }\n });\n };\n\n var TooltippingApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hideAllExclusive: hideAllExclusive,\n setComponents: setComponents\n });\n\n const events$9 = (tooltipConfig, state) => {\n const hide = comp => {\n state.getTooltip().each(p => {\n detach(p);\n tooltipConfig.onHide(comp, p);\n state.clearTooltip();\n });\n state.clearTimer();\n };\n const show = comp => {\n if (!state.isShowing()) {\n hideAllExclusive(comp);\n const sink = tooltipConfig.lazySink(comp).getOrDie();\n const popup = comp.getSystem().build({\n dom: tooltipConfig.tooltipDom,\n components: tooltipConfig.tooltipComponents,\n events: derive$2(tooltipConfig.mode === 'normal' ? [\n run$1(mouseover(), _ => {\n emit(comp, ShowTooltipEvent);\n }),\n run$1(mouseout(), _ => {\n emit(comp, HideTooltipEvent);\n })\n ] : []),\n behaviours: derive$1([Replacing.config({})])\n });\n state.setTooltip(popup);\n attach(sink, popup);\n tooltipConfig.onShow(comp, popup);\n Positioning.position(sink, popup, { anchor: tooltipConfig.anchor(comp) });\n }\n };\n return derive$2(flatten([\n [\n run$1(ShowTooltipEvent, comp => {\n state.resetTimer(() => {\n show(comp);\n }, tooltipConfig.delay);\n }),\n run$1(HideTooltipEvent, comp => {\n state.resetTimer(() => {\n hide(comp);\n }, tooltipConfig.delay);\n }),\n run$1(receive(), (comp, message) => {\n const receivingData = message;\n if (!receivingData.universal) {\n if (contains$2(receivingData.channels, ExclusivityChannel)) {\n hide(comp);\n }\n }\n }),\n runOnDetached(comp => {\n hide(comp);\n })\n ],\n tooltipConfig.mode === 'normal' ? [\n run$1(focusin(), comp => {\n emit(comp, ShowTooltipEvent);\n }),\n run$1(postBlur(), comp => {\n emit(comp, HideTooltipEvent);\n }),\n run$1(mouseover(), comp => {\n emit(comp, ShowTooltipEvent);\n }),\n run$1(mouseout(), comp => {\n emit(comp, HideTooltipEvent);\n })\n ] : [\n run$1(highlight$1(), (comp, _se) => {\n emit(comp, ShowTooltipEvent);\n }),\n run$1(dehighlight$1(), comp => {\n emit(comp, HideTooltipEvent);\n })\n ]\n ]));\n };\n\n var ActiveTooltipping = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$9\n });\n\n var TooltippingSchema = [\n required$1('lazySink'),\n required$1('tooltipDom'),\n defaulted('exclusive', true),\n defaulted('tooltipComponents', []),\n defaulted('delay', 300),\n defaultedStringEnum('mode', 'normal', [\n 'normal',\n 'follow-highlight'\n ]),\n defaulted('anchor', comp => ({\n type: 'hotspot',\n hotspot: comp,\n layouts: {\n onLtr: constant$1([\n south$2,\n north$2,\n southeast$2,\n northeast$2,\n southwest$2,\n northwest$2\n ]),\n onRtl: constant$1([\n south$2,\n north$2,\n southeast$2,\n northeast$2,\n southwest$2,\n northwest$2\n ])\n }\n })),\n onHandler('onHide'),\n onHandler('onShow')\n ];\n\n const init$b = () => {\n const timer = value$2();\n const popup = value$2();\n const clearTimer = () => {\n timer.on(clearTimeout);\n };\n const resetTimer = (f, delay) => {\n clearTimer();\n timer.set(setTimeout(f, delay));\n };\n const readState = constant$1('not-implemented');\n return nu$8({\n getTooltip: popup.get,\n isShowing: popup.isSet,\n setTooltip: popup.set,\n clearTooltip: popup.clear,\n clearTimer,\n resetTimer,\n readState\n });\n };\n\n var TooltippingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$b\n });\n\n const Tooltipping = create$4({\n fields: TooltippingSchema,\n name: 'tooltipping',\n active: ActiveTooltipping,\n state: TooltippingState,\n apis: TooltippingApis\n });\n\n const escape = text => text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n const ReadOnlyChannel = 'silver.readonly';\n const ReadOnlyDataSchema = objOf([requiredBoolean('readonly')]);\n const broadcastReadonly = (uiRefs, readonly) => {\n const outerContainer = uiRefs.mainUi.outerContainer;\n const target = outerContainer.element;\n const motherships = [\n uiRefs.mainUi.mothership,\n ...uiRefs.uiMotherships\n ];\n if (readonly) {\n each$1(motherships, m => {\n m.broadcastOn([dismissPopups()], { target });\n });\n }\n each$1(motherships, m => {\n m.broadcastOn([ReadOnlyChannel], { readonly });\n });\n };\n const setupReadonlyModeSwitch = (editor, uiRefs) => {\n editor.on('init', () => {\n if (editor.mode.isReadOnly()) {\n broadcastReadonly(uiRefs, true);\n }\n });\n editor.on('SwitchMode', () => broadcastReadonly(uiRefs, editor.mode.isReadOnly()));\n if (isReadOnly(editor)) {\n editor.mode.set('readonly');\n }\n };\n const receivingConfig = () => Receiving.config({\n channels: {\n [ReadOnlyChannel]: {\n schema: ReadOnlyDataSchema,\n onReceive: (comp, data) => {\n Disabling.set(comp, data.readonly);\n }\n }\n }\n });\n\n const item = disabled => Disabling.config({\n disabled,\n disableClass: 'tox-collection__item--state-disabled'\n });\n const button = disabled => Disabling.config({ disabled });\n const splitButton = disabled => Disabling.config({\n disabled,\n disableClass: 'tox-tbtn--disabled'\n });\n const toolbarButton = disabled => Disabling.config({\n disabled,\n disableClass: 'tox-tbtn--disabled',\n useNative: false\n });\n const DisablingConfigs = {\n item,\n button,\n splitButton,\n toolbarButton\n };\n\n const runWithApi = (info, comp) => {\n const api = info.getApi(comp);\n return f => {\n f(api);\n };\n };\n const onControlAttached = (info, editorOffCell) => runOnAttached(comp => {\n const run = runWithApi(info, comp);\n run(api => {\n const onDestroy = info.onSetup(api);\n if (isFunction(onDestroy)) {\n editorOffCell.set(onDestroy);\n }\n });\n });\n const onControlDetached = (getApi, editorOffCell) => runOnDetached(comp => runWithApi(getApi, comp)(editorOffCell.get()));\n\n const onMenuItemExecute = (info, itemResponse) => runOnExecute$1((comp, simulatedEvent) => {\n runWithApi(info, comp)(info.onAction);\n if (!info.triggersSubmenu && itemResponse === ItemResponse$1.CLOSE_ON_EXECUTE) {\n if (comp.getSystem().isConnected()) {\n emit(comp, sandboxClose());\n }\n simulatedEvent.stop();\n }\n });\n const menuItemEventOrder = {\n [execute$5()]: [\n 'disabling',\n 'alloy.base.behaviour',\n 'toggling',\n 'item-events'\n ]\n };\n\n const componentRenderPipeline = cat;\n const renderCommonItem = (spec, structure, itemResponse, providersBackstage) => {\n const editorOffCell = Cell(noop);\n return {\n type: 'item',\n dom: structure.dom,\n components: componentRenderPipeline(structure.optComponents),\n data: spec.data,\n eventOrder: menuItemEventOrder,\n hasSubmenu: spec.triggersSubmenu,\n itemBehaviours: derive$1([\n config('item-events', [\n onMenuItemExecute(spec, itemResponse),\n onControlAttached(spec, editorOffCell),\n onControlDetached(spec, editorOffCell)\n ]),\n DisablingConfigs.item(() => !spec.enabled || providersBackstage.isDisabled()),\n receivingConfig(),\n Replacing.config({})\n ].concat(spec.itemBehaviours))\n };\n };\n const buildData = source => ({\n value: source.value,\n meta: {\n text: source.text.getOr(''),\n ...source.meta\n }\n });\n\n const convertText = source => {\n const isMac = global$5.os.isMacOS() || global$5.os.isiOS();\n const mac = {\n alt: '\\u2325',\n ctrl: '\\u2303',\n shift: '\\u21E7',\n meta: '\\u2318',\n access: '\\u2303\\u2325'\n };\n const other = {\n meta: 'Ctrl',\n access: 'Shift+Alt'\n };\n const replace = isMac ? mac : other;\n const shortcut = source.split('+');\n const updated = map$2(shortcut, segment => {\n const search = segment.toLowerCase().trim();\n return has$2(replace, search) ? replace[search] : segment;\n });\n return isMac ? updated.join('') : updated.join('+');\n };\n\n const renderIcon$2 = (name, icons, classes = [iconClass]) => render$3(name, {\n tag: 'div',\n classes\n }, icons);\n const renderText = text => ({\n dom: {\n tag: 'div',\n classes: [textClass]\n },\n components: [text$2(global$8.translate(text))]\n });\n const renderHtml = (html, classes) => ({\n dom: {\n tag: 'div',\n classes,\n innerHtml: html\n }\n });\n const renderStyledText = (style, text) => ({\n dom: {\n tag: 'div',\n classes: [textClass]\n },\n components: [{\n dom: {\n tag: style.tag,\n styles: style.styles\n },\n components: [text$2(global$8.translate(text))]\n }]\n });\n const renderShortcut = shortcut => ({\n dom: {\n tag: 'div',\n classes: [accessoryClass]\n },\n components: [text$2(convertText(shortcut))]\n });\n const renderCheckmark = icons => renderIcon$2('checkmark', icons, [checkmarkClass]);\n const renderSubmenuCaret = icons => renderIcon$2('chevron-right', icons, [caretClass]);\n const renderDownwardsCaret = icons => renderIcon$2('chevron-down', icons, [caretClass]);\n const renderContainer = (container, components) => {\n const directionClass = container.direction === 'vertical' ? containerColumnClass : containerRowClass;\n const alignClass = container.align === 'left' ? containerAlignLeftClass : containerAlignRightClass;\n const getValignClass = () => {\n switch (container.valign) {\n case 'top':\n return containerValignTopClass;\n case 'middle':\n return containerValignMiddleClass;\n case 'bottom':\n return containerValignBottomClass;\n }\n };\n return {\n dom: {\n tag: 'div',\n classes: [\n containerClass,\n directionClass,\n alignClass,\n getValignClass()\n ]\n },\n components\n };\n };\n const renderImage = (src, classes, alt) => ({\n dom: {\n tag: 'img',\n classes,\n attributes: {\n src,\n alt: alt.getOr('')\n }\n }\n });\n\n const renderColorStructure = (item, providerBackstage, fallbackIcon) => {\n const colorPickerCommand = 'custom';\n const removeColorCommand = 'remove';\n const itemText = item.ariaLabel;\n const itemValue = item.value;\n const iconSvg = item.iconContent.map(name => getOr(name, providerBackstage.icons, fallbackIcon));\n const getDom = () => {\n const common = colorClass;\n const icon = iconSvg.getOr('');\n const attributes = itemText.map(text => ({ title: providerBackstage.translate(text) })).getOr({});\n const baseDom = {\n tag: 'div',\n attributes,\n classes: [common]\n };\n if (itemValue === colorPickerCommand) {\n return {\n ...baseDom,\n tag: 'button',\n classes: [\n ...baseDom.classes,\n 'tox-swatches__picker-btn'\n ],\n innerHtml: icon\n };\n } else if (itemValue === removeColorCommand) {\n return {\n ...baseDom,\n classes: [\n ...baseDom.classes,\n 'tox-swatch--remove'\n ],\n innerHtml: icon\n };\n } else if (isNonNullable(itemValue)) {\n return {\n ...baseDom,\n attributes: {\n ...baseDom.attributes,\n 'data-mce-color': itemValue\n },\n styles: { 'background-color': itemValue },\n innerHtml: icon\n };\n } else {\n return baseDom;\n }\n };\n return {\n dom: getDom(),\n optComponents: []\n };\n };\n const renderItemDomStructure = ariaLabel => {\n const domTitle = ariaLabel.map(label => ({\n attributes: {\n title: global$8.translate(label),\n id: generate$6('menu-item')\n }\n })).getOr({});\n return {\n tag: 'div',\n classes: [\n navClass,\n selectableClass\n ],\n ...domTitle\n };\n };\n const renderNormalItemStructure = (info, providersBackstage, renderIcons, fallbackIcon) => {\n const iconSpec = {\n tag: 'div',\n classes: [iconClass]\n };\n const renderIcon = iconName => render$3(iconName, iconSpec, providersBackstage.icons, fallbackIcon);\n const renderEmptyIcon = () => Optional.some({ dom: iconSpec });\n const leftIcon = renderIcons ? info.iconContent.map(renderIcon).orThunk(renderEmptyIcon) : Optional.none();\n const checkmark = info.checkMark;\n const textRender = Optional.from(info.meta).fold(() => renderText, meta => has$2(meta, 'style') ? curry(renderStyledText, meta.style) : renderText);\n const content = info.htmlContent.fold(() => info.textContent.map(textRender), html => Optional.some(renderHtml(html, [textClass])));\n const menuItem = {\n dom: renderItemDomStructure(info.ariaLabel),\n optComponents: [\n leftIcon,\n content,\n info.shortcutContent.map(renderShortcut),\n checkmark,\n info.caret\n ]\n };\n return menuItem;\n };\n const renderItemStructure = (info, providersBackstage, renderIcons, fallbackIcon = Optional.none()) => {\n if (info.presets === 'color') {\n return renderColorStructure(info, providersBackstage, fallbackIcon);\n } else {\n return renderNormalItemStructure(info, providersBackstage, renderIcons, fallbackIcon);\n }\n };\n\n const tooltipBehaviour = (meta, sharedBackstage) => get$g(meta, 'tooltipWorker').map(tooltipWorker => [Tooltipping.config({\n lazySink: sharedBackstage.getSink,\n tooltipDom: {\n tag: 'div',\n classes: ['tox-tooltip-worker-container']\n },\n tooltipComponents: [],\n anchor: comp => ({\n type: 'submenu',\n item: comp,\n overrides: { maxHeightFunction: expandable$1 }\n }),\n mode: 'follow-highlight',\n onShow: (component, _tooltip) => {\n tooltipWorker(elm => {\n Tooltipping.setComponents(component, [external$1({ element: SugarElement.fromDom(elm) })]);\n });\n }\n })]).getOr([]);\n const encodeText = text => global$7.DOM.encode(text);\n const replaceText = (text, matchText) => {\n const translated = global$8.translate(text);\n const encoded = encodeText(translated);\n if (matchText.length > 0) {\n const escapedMatchRegex = new RegExp(escape(matchText), 'gi');\n return encoded.replace(escapedMatchRegex, match => `<span class=\"tox-autocompleter-highlight\">${ match }</span>`);\n } else {\n return encoded;\n }\n };\n const renderAutocompleteItem = (spec, matchText, useText, presets, onItemValueHandler, itemResponse, sharedBackstage, renderIcons = true) => {\n const structure = renderItemStructure({\n presets,\n textContent: Optional.none(),\n htmlContent: useText ? spec.text.map(text => replaceText(text, matchText)) : Optional.none(),\n ariaLabel: spec.text,\n iconContent: spec.icon,\n shortcutContent: Optional.none(),\n checkMark: Optional.none(),\n caret: Optional.none(),\n value: spec.value\n }, sharedBackstage.providers, renderIcons, spec.icon);\n return renderCommonItem({\n data: buildData(spec),\n enabled: spec.enabled,\n getApi: constant$1({}),\n onAction: _api => onItemValueHandler(spec.value, spec.meta),\n onSetup: constant$1(noop),\n triggersSubmenu: false,\n itemBehaviours: tooltipBehaviour(spec.meta, sharedBackstage)\n }, structure, itemResponse, sharedBackstage.providers);\n };\n\n const render$2 = (items, extras) => map$2(items, item => {\n switch (item.type) {\n case 'cardcontainer':\n return renderContainer(item, render$2(item.items, extras));\n case 'cardimage':\n return renderImage(item.src, item.classes, item.alt);\n case 'cardtext':\n const shouldHighlight = item.name.exists(name => contains$2(extras.cardText.highlightOn, name));\n const matchText = shouldHighlight ? Optional.from(extras.cardText.matchText).getOr('') : '';\n return renderHtml(replaceText(item.text, matchText), item.classes);\n }\n });\n const renderCardMenuItem = (spec, itemResponse, sharedBackstage, extras) => {\n const getApi = component => ({\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => {\n Disabling.set(component, !state);\n each$1(descendants(component.element, '*'), elm => {\n component.getSystem().getByDom(elm).each(comp => {\n if (comp.hasConfigured(Disabling)) {\n Disabling.set(comp, !state);\n }\n });\n });\n }\n });\n const structure = {\n dom: renderItemDomStructure(spec.label),\n optComponents: [Optional.some({\n dom: {\n tag: 'div',\n classes: [\n containerClass,\n containerRowClass\n ]\n },\n components: render$2(spec.items, extras)\n })]\n };\n return renderCommonItem({\n data: buildData({\n text: Optional.none(),\n ...spec\n }),\n enabled: spec.enabled,\n getApi,\n onAction: spec.onAction,\n onSetup: spec.onSetup,\n triggersSubmenu: false,\n itemBehaviours: Optional.from(extras.itemBehaviours).getOr([])\n }, structure, itemResponse, sharedBackstage.providers);\n };\n\n const renderChoiceItem = (spec, useText, presets, onItemValueHandler, isSelected, itemResponse, providersBackstage, renderIcons = true) => {\n const getApi = component => ({\n setActive: state => {\n Toggling.set(component, state);\n },\n isActive: () => Toggling.isOn(component),\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => Disabling.set(component, !state)\n });\n const structure = renderItemStructure({\n presets,\n textContent: useText ? spec.text : Optional.none(),\n htmlContent: Optional.none(),\n ariaLabel: spec.text,\n iconContent: spec.icon,\n shortcutContent: useText ? spec.shortcut : Optional.none(),\n checkMark: useText ? Optional.some(renderCheckmark(providersBackstage.icons)) : Optional.none(),\n caret: Optional.none(),\n value: spec.value\n }, providersBackstage, renderIcons);\n return deepMerge(renderCommonItem({\n data: buildData(spec),\n enabled: spec.enabled,\n getApi,\n onAction: _api => onItemValueHandler(spec.value),\n onSetup: api => {\n api.setActive(isSelected);\n return noop;\n },\n triggersSubmenu: false,\n itemBehaviours: []\n }, structure, itemResponse, providersBackstage), {\n toggling: {\n toggleClass: tickedClass,\n toggleOnExecute: false,\n selected: spec.active,\n exclusive: true\n }\n });\n };\n\n const parts$f = generate$3(owner$2(), parts$h());\n\n const hexColour = value => ({ value: normalizeHex(value) });\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n const longformRegex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n const isHexString = hex => shorthandRegex.test(hex) || longformRegex.test(hex);\n const normalizeHex = hex => removeLeading(hex, '#').toUpperCase();\n const fromString$1 = hex => isHexString(hex) ? Optional.some({ value: normalizeHex(hex) }) : Optional.none();\n const getLongForm = hex => {\n const hexString = hex.value.replace(shorthandRegex, (m, r, g, b) => r + r + g + g + b + b);\n return { value: hexString };\n };\n const extractValues = hex => {\n const longForm = getLongForm(hex);\n const splitForm = longformRegex.exec(longForm.value);\n return splitForm === null ? [\n 'FFFFFF',\n 'FF',\n 'FF',\n 'FF'\n ] : splitForm;\n };\n const toHex = component => {\n const hex = component.toString(16);\n return (hex.length === 1 ? '0' + hex : hex).toUpperCase();\n };\n const fromRgba = rgbaColour => {\n const value = toHex(rgbaColour.red) + toHex(rgbaColour.green) + toHex(rgbaColour.blue);\n return hexColour(value);\n };\n\n const min = Math.min;\n const max = Math.max;\n const round$1 = Math.round;\n const rgbRegex = /^\\s*rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)\\s*$/i;\n const rgbaRegex = /^\\s*rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d?(?:\\.\\d+)?)\\s*\\)\\s*$/i;\n const rgbaColour = (red, green, blue, alpha) => ({\n red,\n green,\n blue,\n alpha\n });\n const isRgbaComponent = value => {\n const num = parseInt(value, 10);\n return num.toString() === value && num >= 0 && num <= 255;\n };\n const fromHsv = hsv => {\n let r;\n let g;\n let b;\n const hue = (hsv.hue || 0) % 360;\n let saturation = hsv.saturation / 100;\n let brightness = hsv.value / 100;\n saturation = max(0, min(saturation, 1));\n brightness = max(0, min(brightness, 1));\n if (saturation === 0) {\n r = g = b = round$1(255 * brightness);\n return rgbaColour(r, g, b, 1);\n }\n const side = hue / 60;\n const chroma = brightness * saturation;\n const x = chroma * (1 - Math.abs(side % 2 - 1));\n const match = brightness - chroma;\n switch (Math.floor(side)) {\n case 0:\n r = chroma;\n g = x;\n b = 0;\n break;\n case 1:\n r = x;\n g = chroma;\n b = 0;\n break;\n case 2:\n r = 0;\n g = chroma;\n b = x;\n break;\n case 3:\n r = 0;\n g = x;\n b = chroma;\n break;\n case 4:\n r = x;\n g = 0;\n b = chroma;\n break;\n case 5:\n r = chroma;\n g = 0;\n b = x;\n break;\n default:\n r = g = b = 0;\n }\n r = round$1(255 * (r + match));\n g = round$1(255 * (g + match));\n b = round$1(255 * (b + match));\n return rgbaColour(r, g, b, 1);\n };\n const fromHex = hexColour => {\n const result = extractValues(hexColour);\n const red = parseInt(result[1], 16);\n const green = parseInt(result[2], 16);\n const blue = parseInt(result[3], 16);\n return rgbaColour(red, green, blue, 1);\n };\n const fromStringValues = (red, green, blue, alpha) => {\n const r = parseInt(red, 10);\n const g = parseInt(green, 10);\n const b = parseInt(blue, 10);\n const a = parseFloat(alpha);\n return rgbaColour(r, g, b, a);\n };\n const fromString = rgbaString => {\n if (rgbaString === 'transparent') {\n return Optional.some(rgbaColour(0, 0, 0, 0));\n }\n const rgbMatch = rgbRegex.exec(rgbaString);\n if (rgbMatch !== null) {\n return Optional.some(fromStringValues(rgbMatch[1], rgbMatch[2], rgbMatch[3], '1'));\n }\n const rgbaMatch = rgbaRegex.exec(rgbaString);\n if (rgbaMatch !== null) {\n return Optional.some(fromStringValues(rgbaMatch[1], rgbaMatch[2], rgbaMatch[3], rgbaMatch[4]));\n }\n return Optional.none();\n };\n const toString = rgba => `rgba(${ rgba.red },${ rgba.green },${ rgba.blue },${ rgba.alpha })`;\n const red = rgbaColour(255, 0, 0, 1);\n\n const fireSkinLoaded$1 = editor => {\n editor.dispatch('SkinLoaded');\n };\n const fireSkinLoadError$1 = (editor, error) => {\n editor.dispatch('SkinLoadError', error);\n };\n const fireResizeEditor = editor => {\n editor.dispatch('ResizeEditor');\n };\n const fireResizeContent = (editor, e) => {\n editor.dispatch('ResizeContent', e);\n };\n const fireScrollContent = (editor, e) => {\n editor.dispatch('ScrollContent', e);\n };\n const fireTextColorChange = (editor, data) => {\n editor.dispatch('TextColorChange', data);\n };\n const fireAfterProgressState = (editor, state) => {\n editor.dispatch('AfterProgressState', { state });\n };\n const fireResolveName = (editor, node) => editor.dispatch('ResolveName', {\n name: node.nodeName.toLowerCase(),\n target: node\n });\n const fireToggleToolbarDrawer = (editor, state) => {\n editor.dispatch('ToggleToolbarDrawer', { state });\n };\n const fireStylesTextUpdate = (editor, data) => {\n editor.dispatch('StylesTextUpdate', data);\n };\n const fireAlignTextUpdate = (editor, data) => {\n editor.dispatch('AlignTextUpdate', data);\n };\n const fireFontSizeTextUpdate = (editor, data) => {\n editor.dispatch('FontSizeTextUpdate', data);\n };\n const fireFontSizeInputTextUpdate = (editor, data) => {\n editor.dispatch('FontSizeInputTextUpdate', data);\n };\n const fireBlocksTextUpdate = (editor, data) => {\n editor.dispatch('BlocksTextUpdate', data);\n };\n const fireFontFamilyTextUpdate = (editor, data) => {\n editor.dispatch('FontFamilyTextUpdate', data);\n };\n\n const composeUnbinders = (f, g) => () => {\n f();\n g();\n };\n const onSetupEditableToggle = editor => onSetupEvent(editor, 'NodeChange', api => {\n api.setEnabled(editor.selection.isEditable());\n });\n const onSetupFormatToggle = (editor, name) => api => {\n const boundFormatChangeCallback = unbindable();\n const init = () => {\n api.setActive(editor.formatter.match(name));\n const binding = editor.formatter.formatChanged(name, api.setActive);\n boundFormatChangeCallback.set(binding);\n };\n editor.initialized ? init() : editor.once('init', init);\n return () => {\n editor.off('init', init);\n boundFormatChangeCallback.clear();\n };\n };\n const onSetupStateToggle = (editor, name) => api => {\n const unbindEditableToogle = onSetupEditableToggle(editor)(api);\n const unbindFormatToggle = onSetupFormatToggle(editor, name)(api);\n return () => {\n unbindEditableToogle();\n unbindFormatToggle();\n };\n };\n const onSetupEvent = (editor, event, f) => api => {\n const handleEvent = () => f(api);\n const init = () => {\n f(api);\n editor.on(event, handleEvent);\n };\n editor.initialized ? init() : editor.once('init', init);\n return () => {\n editor.off('init', init);\n editor.off(event, handleEvent);\n };\n };\n const onActionToggleFormat$1 = editor => rawItem => () => {\n editor.undoManager.transact(() => {\n editor.focus();\n editor.execCommand('mceToggleFormat', false, rawItem.format);\n });\n };\n const onActionExecCommand = (editor, command) => () => editor.execCommand(command);\n\n var global$4 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');\n\n const cacheStorage = {};\n const ColorCache = (storageId, max = 10) => {\n const storageString = global$4.getItem(storageId);\n const localstorage = isString(storageString) ? JSON.parse(storageString) : [];\n const prune = list => {\n const diff = max - list.length;\n return diff < 0 ? list.slice(0, max) : list;\n };\n const cache = prune(localstorage);\n const add = key => {\n indexOf(cache, key).each(remove);\n cache.unshift(key);\n if (cache.length > max) {\n cache.pop();\n }\n global$4.setItem(storageId, JSON.stringify(cache));\n };\n const remove = idx => {\n cache.splice(idx, 1);\n };\n const state = () => cache.slice(0);\n return {\n add,\n state\n };\n };\n const getCacheForId = id => get$g(cacheStorage, id).getOrThunk(() => {\n const storageId = `tinymce-custom-colors-${ id }`;\n const currentData = global$4.getItem(storageId);\n if (isNullable(currentData)) {\n const legacyDefault = global$4.getItem('tinymce-custom-colors');\n global$4.setItem(storageId, isNonNullable(legacyDefault) ? legacyDefault : '[]');\n }\n const storage = ColorCache(storageId, 10);\n cacheStorage[id] = storage;\n return storage;\n });\n const getCurrentColors = id => map$2(getCacheForId(id).state(), color => ({\n type: 'choiceitem',\n text: color,\n icon: 'checkmark',\n value: color\n }));\n const addColor = (id, color) => {\n getCacheForId(id).add(color);\n };\n\n const hsvColour = (hue, saturation, value) => ({\n hue,\n saturation,\n value\n });\n const fromRgb = rgbaColour => {\n let h = 0;\n let s = 0;\n let v = 0;\n const r = rgbaColour.red / 255;\n const g = rgbaColour.green / 255;\n const b = rgbaColour.blue / 255;\n const minRGB = Math.min(r, Math.min(g, b));\n const maxRGB = Math.max(r, Math.max(g, b));\n if (minRGB === maxRGB) {\n v = minRGB;\n return hsvColour(0, 0, v * 100);\n }\n const d = r === minRGB ? g - b : b === minRGB ? r - g : b - r;\n h = r === minRGB ? 3 : b === minRGB ? 1 : 5;\n h = 60 * (h - d / (maxRGB - minRGB));\n s = (maxRGB - minRGB) / maxRGB;\n v = maxRGB;\n return hsvColour(Math.round(h), Math.round(s * 100), Math.round(v * 100));\n };\n\n const hexToHsv = hex => fromRgb(fromHex(hex));\n const hsvToHex = hsv => fromRgba(fromHsv(hsv));\n const anyToHex = color => fromString$1(color).orThunk(() => fromString(color).map(fromRgba)).getOrThunk(() => {\n const canvas = document.createElement('canvas');\n canvas.height = 1;\n canvas.width = 1;\n const canvasContext = canvas.getContext('2d');\n canvasContext.clearRect(0, 0, canvas.width, canvas.height);\n canvasContext.fillStyle = '#FFFFFF';\n canvasContext.fillStyle = color;\n canvasContext.fillRect(0, 0, 1, 1);\n const rgba = canvasContext.getImageData(0, 0, 1, 1).data;\n const r = rgba[0];\n const g = rgba[1];\n const b = rgba[2];\n const a = rgba[3];\n return fromRgba(rgbaColour(r, g, b, a));\n });\n\n const foregroundId = 'forecolor';\n const backgroundId = 'hilitecolor';\n const fallbackCols = 5;\n const mapColors = colorMap => {\n const colors = [];\n for (let i = 0; i < colorMap.length; i += 2) {\n colors.push({\n text: colorMap[i + 1],\n value: '#' + anyToHex(colorMap[i]).value,\n icon: 'checkmark',\n type: 'choiceitem'\n });\n }\n return colors;\n };\n const option$1 = name => editor => editor.options.get(name);\n const fallbackColor = '#000000';\n const register$d = editor => {\n const registerOption = editor.options.register;\n const colorProcessor = value => {\n if (isArrayOf(value, isString)) {\n return {\n value: mapColors(value),\n valid: true\n };\n } else {\n return {\n valid: false,\n message: 'Must be an array of strings.'\n };\n }\n };\n const colorColsProcessor = value => {\n if (isNumber(value) && value > 0) {\n return {\n value,\n valid: true\n };\n } else {\n return {\n valid: false,\n message: 'Must be a positive number.'\n };\n }\n };\n registerOption('color_map', {\n processor: colorProcessor,\n default: [\n '#BFEDD2',\n 'Light Green',\n '#FBEEB8',\n 'Light Yellow',\n '#F8CAC6',\n 'Light Red',\n '#ECCAFA',\n 'Light Purple',\n '#C2E0F4',\n 'Light Blue',\n '#2DC26B',\n 'Green',\n '#F1C40F',\n 'Yellow',\n '#E03E2D',\n 'Red',\n '#B96AD9',\n 'Purple',\n '#3598DB',\n 'Blue',\n '#169179',\n 'Dark Turquoise',\n '#E67E23',\n 'Orange',\n '#BA372A',\n 'Dark Red',\n '#843FA1',\n 'Dark Purple',\n '#236FA1',\n 'Dark Blue',\n '#ECF0F1',\n 'Light Gray',\n '#CED4D9',\n 'Medium Gray',\n '#95A5A6',\n 'Gray',\n '#7E8C8D',\n 'Dark Gray',\n '#34495E',\n 'Navy Blue',\n '#000000',\n 'Black',\n '#ffffff',\n 'White'\n ]\n });\n registerOption('color_map_background', { processor: colorProcessor });\n registerOption('color_map_foreground', { processor: colorProcessor });\n registerOption('color_cols', {\n processor: colorColsProcessor,\n default: calcCols(editor)\n });\n registerOption('color_cols_foreground', {\n processor: colorColsProcessor,\n default: defaultCols(editor, foregroundId)\n });\n registerOption('color_cols_background', {\n processor: colorColsProcessor,\n default: defaultCols(editor, backgroundId)\n });\n registerOption('custom_colors', {\n processor: 'boolean',\n default: true\n });\n registerOption('color_default_foreground', {\n processor: 'string',\n default: fallbackColor\n });\n registerOption('color_default_background', {\n processor: 'string',\n default: fallbackColor\n });\n };\n const getColors$2 = (editor, id) => {\n if (id === foregroundId && editor.options.isSet('color_map_foreground')) {\n return option$1('color_map_foreground')(editor);\n } else if (id === backgroundId && editor.options.isSet('color_map_background')) {\n return option$1('color_map_background')(editor);\n } else {\n return option$1('color_map')(editor);\n }\n };\n const calcCols = (editor, id = 'default') => Math.max(fallbackCols, Math.ceil(Math.sqrt(getColors$2(editor, id).length)));\n const defaultCols = (editor, id) => {\n const defaultCols = option$1('color_cols')(editor);\n const calculatedCols = calcCols(editor, id);\n if (defaultCols === calcCols(editor)) {\n return calculatedCols;\n } else {\n return defaultCols;\n }\n };\n const getColorCols$1 = (editor, id = 'default') => {\n const getCols = () => {\n if (id === foregroundId) {\n return option$1('color_cols_foreground')(editor);\n } else if (id === backgroundId) {\n return option$1('color_cols_background')(editor);\n } else {\n return option$1('color_cols')(editor);\n }\n };\n return Math.round(getCols());\n };\n const hasCustomColors$1 = option$1('custom_colors');\n const getDefaultForegroundColor = option$1('color_default_foreground');\n const getDefaultBackgroundColor = option$1('color_default_background');\n\n const defaultBackgroundColor = 'rgba(0, 0, 0, 0)';\n const isValidBackgroundColor = value => fromString(value).exists(c => c.alpha !== 0);\n const getClosestCssBackgroundColorValue = scope => {\n return closest$4(scope, node => {\n if (isElement$1(node)) {\n const color = get$e(node, 'background-color');\n return someIf(isValidBackgroundColor(color), color);\n } else {\n return Optional.none();\n }\n }).getOr(defaultBackgroundColor);\n };\n const getCurrentColor = (editor, format) => {\n const node = SugarElement.fromDom(editor.selection.getStart());\n const cssRgbValue = format === 'hilitecolor' ? getClosestCssBackgroundColorValue(node) : get$e(node, 'color');\n return fromString(cssRgbValue).map(rgba => '#' + fromRgba(rgba).value);\n };\n const applyFormat = (editor, format, value) => {\n editor.undoManager.transact(() => {\n editor.focus();\n editor.formatter.apply(format, { value });\n editor.nodeChanged();\n });\n };\n const removeFormat = (editor, format) => {\n editor.undoManager.transact(() => {\n editor.focus();\n editor.formatter.remove(format, { value: null }, undefined, true);\n editor.nodeChanged();\n });\n };\n const registerCommands = editor => {\n editor.addCommand('mceApplyTextcolor', (format, value) => {\n applyFormat(editor, format, value);\n });\n editor.addCommand('mceRemoveTextcolor', format => {\n removeFormat(editor, format);\n });\n };\n const getAdditionalColors = hasCustom => {\n const type = 'choiceitem';\n const remove = {\n type,\n text: 'Remove color',\n icon: 'color-swatch-remove-color',\n value: 'remove'\n };\n const custom = {\n type,\n text: 'Custom color',\n icon: 'color-picker',\n value: 'custom'\n };\n return hasCustom ? [\n remove,\n custom\n ] : [remove];\n };\n const applyColor = (editor, format, value, onChoice) => {\n if (value === 'custom') {\n const dialog = colorPickerDialog(editor);\n dialog(colorOpt => {\n colorOpt.each(color => {\n addColor(format, color);\n editor.execCommand('mceApplyTextcolor', format, color);\n onChoice(color);\n });\n }, getCurrentColor(editor, format).getOr(fallbackColor));\n } else if (value === 'remove') {\n onChoice('');\n editor.execCommand('mceRemoveTextcolor', format);\n } else {\n onChoice(value);\n editor.execCommand('mceApplyTextcolor', format, value);\n }\n };\n const getColors$1 = (colors, id, hasCustom) => colors.concat(getCurrentColors(id).concat(getAdditionalColors(hasCustom)));\n const getFetch$1 = (colors, id, hasCustom) => callback => {\n callback(getColors$1(colors, id, hasCustom));\n };\n const setIconColor = (splitButtonApi, name, newColor) => {\n const id = name === 'forecolor' ? 'tox-icon-text-color__color' : 'tox-icon-highlight-bg-color__color';\n splitButtonApi.setIconFill(id, newColor);\n };\n const setTooltip = (buttonApi, tooltip) => {\n buttonApi.setTooltip(tooltip);\n };\n const select$1 = (editor, format) => value => {\n const optCurrentHex = getCurrentColor(editor, format);\n return is$1(optCurrentHex, value.toUpperCase());\n };\n const getToolTipText = (editor, format, lastColor) => {\n if (isEmpty(lastColor)) {\n return format === 'forecolor' ? 'Text color' : 'Background color';\n }\n const tooltipPrefix = format === 'forecolor' ? 'Text color {0}' : 'Background color {0}';\n const colors = getColors$1(getColors$2(editor, format), format, false);\n const colorText = find$5(colors, c => c.value === lastColor).getOr({ text: '' }).text;\n return editor.translate([\n tooltipPrefix,\n editor.translate(colorText)\n ]);\n };\n const registerTextColorButton = (editor, name, format, lastColor) => {\n editor.ui.registry.addSplitButton(name, {\n tooltip: getToolTipText(editor, format, lastColor.get()),\n presets: 'color',\n icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',\n select: select$1(editor, format),\n columns: getColorCols$1(editor, format),\n fetch: getFetch$1(getColors$2(editor, format), format, hasCustomColors$1(editor)),\n onAction: _splitButtonApi => {\n applyColor(editor, format, lastColor.get(), noop);\n },\n onItemAction: (_splitButtonApi, value) => {\n applyColor(editor, format, value, newColor => {\n lastColor.set(newColor);\n fireTextColorChange(editor, {\n name,\n color: newColor\n });\n });\n },\n onSetup: splitButtonApi => {\n setIconColor(splitButtonApi, name, lastColor.get());\n const handler = e => {\n if (e.name === name) {\n setIconColor(splitButtonApi, e.name, e.color);\n setTooltip(splitButtonApi, getToolTipText(editor, format, e.color));\n }\n };\n editor.on('TextColorChange', handler);\n return composeUnbinders(onSetupEditableToggle(editor)(splitButtonApi), () => {\n editor.off('TextColorChange', handler);\n });\n }\n });\n };\n const registerTextColorMenuItem = (editor, name, format, text, lastColor) => {\n editor.ui.registry.addNestedMenuItem(name, {\n text,\n icon: name === 'forecolor' ? 'text-color' : 'highlight-bg-color',\n onSetup: api => {\n setTooltip(api, getToolTipText(editor, format, lastColor.get()));\n setIconColor(api, name, lastColor.get());\n return onSetupEditableToggle(editor)(api);\n },\n getSubmenuItems: () => [{\n type: 'fancymenuitem',\n fancytype: 'colorswatch',\n select: select$1(editor, format),\n initData: { storageKey: format },\n onAction: data => {\n applyColor(editor, format, data.value, newColor => {\n lastColor.set(newColor);\n fireTextColorChange(editor, {\n name,\n color: newColor\n });\n });\n }\n }]\n });\n };\n const colorPickerDialog = editor => (callback, value) => {\n let isValid = false;\n const onSubmit = api => {\n const data = api.getData();\n const hex = data.colorpicker;\n if (isValid) {\n callback(Optional.from(hex));\n api.close();\n } else {\n editor.windowManager.alert(editor.translate([\n 'Invalid hex color code: {0}',\n hex\n ]));\n }\n };\n const onAction = (_api, details) => {\n if (details.name === 'hex-valid') {\n isValid = details.value;\n }\n };\n const initialData = { colorpicker: value };\n editor.windowManager.open({\n title: 'Color Picker',\n size: 'normal',\n body: {\n type: 'panel',\n items: [{\n type: 'colorpicker',\n name: 'colorpicker',\n label: 'Color'\n }]\n },\n buttons: [\n {\n type: 'cancel',\n name: 'cancel',\n text: 'Cancel'\n },\n {\n type: 'submit',\n name: 'save',\n text: 'Save',\n primary: true\n }\n ],\n initialData,\n onAction,\n onSubmit,\n onClose: noop,\n onCancel: () => {\n callback(Optional.none());\n }\n });\n };\n const register$c = editor => {\n registerCommands(editor);\n const fallbackColorForeground = getDefaultForegroundColor(editor);\n const fallbackColorBackground = getDefaultBackgroundColor(editor);\n const lastForeColor = Cell(fallbackColorForeground);\n const lastBackColor = Cell(fallbackColorBackground);\n registerTextColorButton(editor, 'forecolor', 'forecolor', lastForeColor);\n registerTextColorButton(editor, 'backcolor', 'hilitecolor', lastBackColor);\n registerTextColorMenuItem(editor, 'forecolor', 'forecolor', 'Text color', lastForeColor);\n registerTextColorMenuItem(editor, 'backcolor', 'hilitecolor', 'Background color', lastBackColor);\n };\n\n const createPartialChoiceMenu = (value, items, onItemValueHandler, columns, presets, itemResponse, select, providersBackstage) => {\n const hasIcons = menuHasIcons(items);\n const presetItemTypes = presets !== 'color' ? 'normal' : 'color';\n const alloyItems = createChoiceItems(items, onItemValueHandler, columns, presetItemTypes, itemResponse, select, providersBackstage);\n const menuLayout = { menuType: presets };\n return createPartialMenuWithAlloyItems(value, hasIcons, alloyItems, columns, menuLayout);\n };\n const createChoiceItems = (items, onItemValueHandler, columns, itemPresets, itemResponse, select, providersBackstage) => cat(map$2(items, item => {\n if (item.type === 'choiceitem') {\n return createChoiceMenuItem(item).fold(handleError, d => Optional.some(renderChoiceItem(d, columns === 1, itemPresets, onItemValueHandler, select(d.value), itemResponse, providersBackstage, menuHasIcons(items))));\n } else {\n return Optional.none();\n }\n }));\n\n const deriveMenuMovement = (columns, presets) => {\n const menuMarkers = markers(presets);\n if (columns === 1) {\n return {\n mode: 'menu',\n moveOnTab: true\n };\n } else if (columns === 'auto') {\n return {\n mode: 'grid',\n selector: '.' + menuMarkers.item,\n initSize: {\n numColumns: 1,\n numRows: 1\n }\n };\n } else {\n const rowClass = presets === 'color' ? 'tox-swatches__row' : 'tox-collection__group';\n return {\n mode: 'matrix',\n rowSelector: '.' + rowClass,\n previousSelector: menu => {\n return presets === 'color' ? descendant(menu.element, '[aria-checked=true]') : Optional.none();\n }\n };\n }\n };\n const deriveCollectionMovement = (columns, presets) => {\n if (columns === 1) {\n return {\n mode: 'menu',\n moveOnTab: false,\n selector: '.tox-collection__item'\n };\n } else if (columns === 'auto') {\n return {\n mode: 'flatgrid',\n selector: '.' + 'tox-collection__item',\n initSize: {\n numColumns: 1,\n numRows: 1\n }\n };\n } else {\n return {\n mode: 'matrix',\n selectors: {\n row: presets === 'color' ? '.tox-swatches__row' : '.tox-collection__group',\n cell: presets === 'color' ? `.${ colorClass }` : `.${ selectableClass }`\n }\n };\n }\n };\n\n const renderColorSwatchItem = (spec, backstage) => {\n const items = getColorItems(spec, backstage);\n const columns = backstage.colorinput.getColorCols(spec.initData.storageKey);\n const presets = 'color';\n const menuSpec = createPartialChoiceMenu(generate$6('menu-value'), items, value => {\n spec.onAction({ value });\n }, columns, presets, ItemResponse$1.CLOSE_ON_EXECUTE, spec.select.getOr(never), backstage.shared.providers);\n const widgetSpec = {\n ...menuSpec,\n markers: markers(presets),\n movement: deriveMenuMovement(columns, presets)\n };\n return {\n type: 'widget',\n data: { value: generate$6('widget-id') },\n dom: {\n tag: 'div',\n classes: ['tox-fancymenuitem']\n },\n autofocus: true,\n components: [parts$f.widget(Menu.sketch(widgetSpec))]\n };\n };\n const getColorItems = (spec, backstage) => {\n const useCustomColors = spec.initData.allowCustomColors && backstage.colorinput.hasCustomColors();\n return spec.initData.colors.fold(() => getColors$1(backstage.colorinput.getColors(spec.initData.storageKey), spec.initData.storageKey, useCustomColors), colors => colors.concat(getAdditionalColors(useCustomColors)));\n };\n\n const cellOverEvent = generate$6('cell-over');\n const cellExecuteEvent = generate$6('cell-execute');\n const makeAnnouncementText = backstage => (row, col) => backstage.shared.providers.translate([\n '{0} columns, {1} rows',\n col,\n row\n ]);\n const makeCell = (row, col, label) => {\n const emitCellOver = c => emitWith(c, cellOverEvent, {\n row,\n col\n });\n const emitExecute = c => emitWith(c, cellExecuteEvent, {\n row,\n col\n });\n const onClick = (c, se) => {\n se.stop();\n emitExecute(c);\n };\n return build$1({\n dom: {\n tag: 'div',\n attributes: {\n role: 'button',\n ['aria-label']: label\n }\n },\n behaviours: derive$1([\n config('insert-table-picker-cell', [\n run$1(mouseover(), Focusing.focus),\n run$1(execute$5(), emitExecute),\n run$1(click(), onClick),\n run$1(tap(), onClick)\n ]),\n Toggling.config({\n toggleClass: 'tox-insert-table-picker__selected',\n toggleOnExecute: false\n }),\n Focusing.config({ onFocus: emitCellOver })\n ])\n });\n };\n const makeCells = (getCellLabel, numRows, numCols) => {\n const cells = [];\n for (let i = 0; i < numRows; i++) {\n const row = [];\n for (let j = 0; j < numCols; j++) {\n const label = getCellLabel(i + 1, j + 1);\n row.push(makeCell(i, j, label));\n }\n cells.push(row);\n }\n return cells;\n };\n const selectCells = (cells, selectedRow, selectedColumn, numRows, numColumns) => {\n for (let i = 0; i < numRows; i++) {\n for (let j = 0; j < numColumns; j++) {\n Toggling.set(cells[i][j], i <= selectedRow && j <= selectedColumn);\n }\n }\n };\n const makeComponents = cells => bind$3(cells, cellRow => map$2(cellRow, premade));\n const makeLabelText = (row, col) => text$2(`${ col }x${ row }`);\n const renderInsertTableMenuItem = (spec, backstage) => {\n const numRows = 10;\n const numColumns = 10;\n const getCellLabel = makeAnnouncementText(backstage);\n const cells = makeCells(getCellLabel, numRows, numColumns);\n const emptyLabelText = makeLabelText(0, 0);\n const memLabel = record({\n dom: {\n tag: 'span',\n classes: ['tox-insert-table-picker__label']\n },\n components: [emptyLabelText],\n behaviours: derive$1([Replacing.config({})])\n });\n return {\n type: 'widget',\n data: { value: generate$6('widget-id') },\n dom: {\n tag: 'div',\n classes: ['tox-fancymenuitem']\n },\n autofocus: true,\n components: [parts$f.widget({\n dom: {\n tag: 'div',\n classes: ['tox-insert-table-picker']\n },\n components: makeComponents(cells).concat(memLabel.asSpec()),\n behaviours: derive$1([\n config('insert-table-picker', [\n runOnAttached(c => {\n Replacing.set(memLabel.get(c), [emptyLabelText]);\n }),\n runWithTarget(cellOverEvent, (c, t, e) => {\n const {row, col} = e.event;\n selectCells(cells, row, col, numRows, numColumns);\n Replacing.set(memLabel.get(c), [makeLabelText(row + 1, col + 1)]);\n }),\n runWithTarget(cellExecuteEvent, (c, _, e) => {\n const {row, col} = e.event;\n spec.onAction({\n numRows: row + 1,\n numColumns: col + 1\n });\n emit(c, sandboxClose());\n })\n ]),\n Keying.config({\n initSize: {\n numRows,\n numColumns\n },\n mode: 'flatgrid',\n selector: '[role=\"button\"]'\n })\n ])\n })]\n };\n };\n\n const fancyMenuItems = {\n inserttable: renderInsertTableMenuItem,\n colorswatch: renderColorSwatchItem\n };\n const renderFancyMenuItem = (spec, backstage) => get$g(fancyMenuItems, spec.fancytype).map(render => render(spec, backstage));\n\n const renderNestedItem = (spec, itemResponse, providersBackstage, renderIcons = true, downwardsCaret = false) => {\n const caret = downwardsCaret ? renderDownwardsCaret(providersBackstage.icons) : renderSubmenuCaret(providersBackstage.icons);\n const getApi = component => ({\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => Disabling.set(component, !state),\n setIconFill: (id, value) => {\n descendant(component.element, `svg path[class=\"${ id }\"], rect[class=\"${ id }\"]`).each(underlinePath => {\n set$9(underlinePath, 'fill', value);\n });\n },\n setTooltip: tooltip => {\n const translatedTooltip = providersBackstage.translate(tooltip);\n setAll$1(component.element, {\n 'aria-label': translatedTooltip,\n 'title': translatedTooltip\n });\n }\n });\n const structure = renderItemStructure({\n presets: 'normal',\n iconContent: spec.icon,\n textContent: spec.text,\n htmlContent: Optional.none(),\n ariaLabel: spec.text,\n caret: Optional.some(caret),\n checkMark: Optional.none(),\n shortcutContent: spec.shortcut\n }, providersBackstage, renderIcons);\n return renderCommonItem({\n data: buildData(spec),\n getApi,\n enabled: spec.enabled,\n onAction: noop,\n onSetup: spec.onSetup,\n triggersSubmenu: true,\n itemBehaviours: []\n }, structure, itemResponse, providersBackstage);\n };\n\n const renderNormalItem = (spec, itemResponse, providersBackstage, renderIcons = true) => {\n const getApi = component => ({\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => Disabling.set(component, !state)\n });\n const structure = renderItemStructure({\n presets: 'normal',\n iconContent: spec.icon,\n textContent: spec.text,\n htmlContent: Optional.none(),\n ariaLabel: spec.text,\n caret: Optional.none(),\n checkMark: Optional.none(),\n shortcutContent: spec.shortcut\n }, providersBackstage, renderIcons);\n return renderCommonItem({\n data: buildData(spec),\n getApi,\n enabled: spec.enabled,\n onAction: spec.onAction,\n onSetup: spec.onSetup,\n triggersSubmenu: false,\n itemBehaviours: []\n }, structure, itemResponse, providersBackstage);\n };\n\n const renderSeparatorItem = spec => ({\n type: 'separator',\n dom: {\n tag: 'div',\n classes: [\n selectableClass,\n groupHeadingClass\n ]\n },\n components: spec.text.map(text$2).toArray()\n });\n\n const renderToggleMenuItem = (spec, itemResponse, providersBackstage, renderIcons = true) => {\n const getApi = component => ({\n setActive: state => {\n Toggling.set(component, state);\n },\n isActive: () => Toggling.isOn(component),\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => Disabling.set(component, !state)\n });\n const structure = renderItemStructure({\n iconContent: spec.icon,\n textContent: spec.text,\n htmlContent: Optional.none(),\n ariaLabel: spec.text,\n checkMark: Optional.some(renderCheckmark(providersBackstage.icons)),\n caret: Optional.none(),\n shortcutContent: spec.shortcut,\n presets: 'normal',\n meta: spec.meta\n }, providersBackstage, renderIcons);\n return deepMerge(renderCommonItem({\n data: buildData(spec),\n enabled: spec.enabled,\n getApi,\n onAction: spec.onAction,\n onSetup: spec.onSetup,\n triggersSubmenu: false,\n itemBehaviours: []\n }, structure, itemResponse, providersBackstage), {\n toggling: {\n toggleClass: tickedClass,\n toggleOnExecute: false,\n selected: spec.active\n }\n });\n };\n\n const autocomplete = renderAutocompleteItem;\n const separator$3 = renderSeparatorItem;\n const normal = renderNormalItem;\n const nested = renderNestedItem;\n const toggle$1 = renderToggleMenuItem;\n const fancy = renderFancyMenuItem;\n const card = renderCardMenuItem;\n\n const getCoupled = (component, coupleConfig, coupleState, name) => coupleState.getOrCreate(component, coupleConfig, name);\n const getExistingCoupled = (component, coupleConfig, coupleState, name) => coupleState.getExisting(component, coupleConfig, name);\n\n var CouplingApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getCoupled: getCoupled,\n getExistingCoupled: getExistingCoupled\n });\n\n var CouplingSchema = [requiredOf('others', setOf(Result.value, anyValue()))];\n\n const init$a = () => {\n const coupled = {};\n const lookupCoupled = (coupleConfig, coupledName) => {\n const available = keys(coupleConfig.others);\n if (available.length === 0) {\n throw new Error('Cannot find any known coupled components');\n } else {\n return get$g(coupled, coupledName);\n }\n };\n const getOrCreate = (component, coupleConfig, name) => {\n return lookupCoupled(coupleConfig, name).getOrThunk(() => {\n const builder = get$g(coupleConfig.others, name).getOrDie('No information found for coupled component: ' + name);\n const spec = builder(component);\n const built = component.getSystem().build(spec);\n coupled[name] = built;\n return built;\n });\n };\n const getExisting = (component, coupleConfig, name) => {\n return lookupCoupled(coupleConfig, name).orThunk(() => {\n get$g(coupleConfig.others, name).getOrDie('No information found for coupled component: ' + name);\n return Optional.none();\n });\n };\n const readState = constant$1({});\n return nu$8({\n readState,\n getExisting,\n getOrCreate\n });\n };\n\n var CouplingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$a\n });\n\n const Coupling = create$4({\n fields: CouplingSchema,\n name: 'coupling',\n apis: CouplingApis,\n state: CouplingState\n });\n\n const nu$3 = baseFn => {\n let data = Optional.none();\n let callbacks = [];\n const map = f => nu$3(nCallback => {\n get(data => {\n nCallback(f(data));\n });\n });\n const get = nCallback => {\n if (isReady()) {\n call(nCallback);\n } else {\n callbacks.push(nCallback);\n }\n };\n const set = x => {\n if (!isReady()) {\n data = Optional.some(x);\n run(callbacks);\n callbacks = [];\n }\n };\n const isReady = () => data.isSome();\n const run = cbs => {\n each$1(cbs, call);\n };\n const call = cb => {\n data.each(x => {\n setTimeout(() => {\n cb(x);\n }, 0);\n });\n };\n baseFn(set);\n return {\n get,\n map,\n isReady\n };\n };\n const pure$1 = a => nu$3(callback => {\n callback(a);\n });\n const LazyValue = {\n nu: nu$3,\n pure: pure$1\n };\n\n const errorReporter = err => {\n setTimeout(() => {\n throw err;\n }, 0);\n };\n const make$5 = run => {\n const get = callback => {\n run().then(callback, errorReporter);\n };\n const map = fab => {\n return make$5(() => run().then(fab));\n };\n const bind = aFutureB => {\n return make$5(() => run().then(v => aFutureB(v).toPromise()));\n };\n const anonBind = futureB => {\n return make$5(() => run().then(() => futureB.toPromise()));\n };\n const toLazy = () => {\n return LazyValue.nu(get);\n };\n const toCached = () => {\n let cache = null;\n return make$5(() => {\n if (cache === null) {\n cache = run();\n }\n return cache;\n });\n };\n const toPromise = run;\n return {\n map,\n bind,\n anonBind,\n toLazy,\n toCached,\n toPromise,\n get\n };\n };\n const nu$2 = baseFn => {\n return make$5(() => new Promise(baseFn));\n };\n const pure = a => {\n return make$5(() => Promise.resolve(a));\n };\n const Future = {\n nu: nu$2,\n pure\n };\n\n const suffix = constant$1('sink');\n const partType$1 = constant$1(optional({\n name: suffix(),\n overrides: constant$1({\n dom: { tag: 'div' },\n behaviours: derive$1([Positioning.config({ useFixed: always })]),\n events: derive$2([\n cutter(keydown()),\n cutter(mousedown()),\n cutter(click())\n ])\n })\n }));\n\n const getAnchor = (detail, component) => {\n const hotspot = detail.getHotspot(component).getOr(component);\n const type = 'hotspot';\n const overrides = detail.getAnchorOverrides();\n return detail.layouts.fold(() => ({\n type,\n hotspot,\n overrides\n }), layouts => ({\n type,\n hotspot,\n overrides,\n layouts\n }));\n };\n const fetch = (detail, mapFetch, component) => {\n const fetcher = detail.fetch;\n return fetcher(component).map(mapFetch);\n };\n const openF = (detail, mapFetch, anchor, component, sandbox, externals, highlightOnOpen) => {\n const futureData = fetch(detail, mapFetch, component);\n const getLazySink = getSink(component, detail);\n return futureData.map(tdata => tdata.bind(data => Optional.from(tieredMenu.sketch({\n ...externals.menu(),\n uid: generate$5(''),\n data,\n highlightOnOpen,\n onOpenMenu: (tmenu, menu) => {\n const sink = getLazySink().getOrDie();\n Positioning.position(sink, menu, { anchor });\n Sandboxing.decloak(sandbox);\n },\n onOpenSubmenu: (tmenu, item, submenu) => {\n const sink = getLazySink().getOrDie();\n Positioning.position(sink, submenu, {\n anchor: {\n type: 'submenu',\n item\n }\n });\n Sandboxing.decloak(sandbox);\n },\n onRepositionMenu: (tmenu, primaryMenu, submenuTriggers) => {\n const sink = getLazySink().getOrDie();\n Positioning.position(sink, primaryMenu, { anchor });\n each$1(submenuTriggers, st => {\n Positioning.position(sink, st.triggeredMenu, {\n anchor: {\n type: 'submenu',\n item: st.triggeringItem\n }\n });\n });\n },\n onEscape: () => {\n Focusing.focus(component);\n Sandboxing.close(sandbox);\n return Optional.some(true);\n }\n }))));\n };\n const open = (detail, mapFetch, hotspot, sandbox, externals, onOpenSync, highlightOnOpen) => {\n const anchor = getAnchor(detail, hotspot);\n const processed = openF(detail, mapFetch, anchor, hotspot, sandbox, externals, highlightOnOpen);\n return processed.map(tdata => {\n tdata.fold(() => {\n if (Sandboxing.isOpen(sandbox)) {\n Sandboxing.close(sandbox);\n }\n }, data => {\n Sandboxing.cloak(sandbox);\n Sandboxing.open(sandbox, data);\n onOpenSync(sandbox);\n });\n return sandbox;\n });\n };\n const close = (detail, mapFetch, component, sandbox, _externals, _onOpenSync, _highlightOnOpen) => {\n Sandboxing.close(sandbox);\n return Future.pure(sandbox);\n };\n const togglePopup = (detail, mapFetch, hotspot, externals, onOpenSync, highlightOnOpen) => {\n const sandbox = Coupling.getCoupled(hotspot, 'sandbox');\n const showing = Sandboxing.isOpen(sandbox);\n const action = showing ? close : open;\n return action(detail, mapFetch, hotspot, sandbox, externals, onOpenSync, highlightOnOpen);\n };\n const matchWidth = (hotspot, container, useMinWidth) => {\n const menu = Composing.getCurrent(container).getOr(container);\n const buttonWidth = get$c(hotspot.element);\n if (useMinWidth) {\n set$8(menu.element, 'min-width', buttonWidth + 'px');\n } else {\n set$7(menu.element, buttonWidth);\n }\n };\n const getSink = (anyInSystem, sinkDetail) => anyInSystem.getSystem().getByUid(sinkDetail.uid + '-' + suffix()).map(internalSink => () => Result.value(internalSink)).getOrThunk(() => sinkDetail.lazySink.fold(() => () => Result.error(new Error('No internal sink is specified, nor could an external sink be found')), lazySinkFn => () => lazySinkFn(anyInSystem)));\n const doRepositionMenus = sandbox => {\n Sandboxing.getState(sandbox).each(tmenu => {\n tieredMenu.repositionMenus(tmenu);\n });\n };\n const makeSandbox$1 = (detail, hotspot, extras) => {\n const ariaControls = manager();\n const onOpen = (component, menu) => {\n const anchor = getAnchor(detail, hotspot);\n ariaControls.link(hotspot.element);\n if (detail.matchWidth) {\n matchWidth(anchor.hotspot, menu, detail.useMinWidth);\n }\n detail.onOpen(anchor, component, menu);\n if (extras !== undefined && extras.onOpen !== undefined) {\n extras.onOpen(component, menu);\n }\n };\n const onClose = (component, menu) => {\n ariaControls.unlink(hotspot.element);\n if (extras !== undefined && extras.onClose !== undefined) {\n extras.onClose(component, menu);\n }\n };\n const lazySink = getSink(hotspot, detail);\n return {\n dom: {\n tag: 'div',\n classes: detail.sandboxClasses,\n attributes: {\n id: ariaControls.id,\n role: 'listbox'\n }\n },\n behaviours: SketchBehaviours.augment(detail.sandboxBehaviours, [\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: hotspot\n }\n }),\n Sandboxing.config({\n onOpen,\n onClose,\n isPartOf: (container, data, queryElem) => {\n return isPartOf$1(data, queryElem) || isPartOf$1(hotspot, queryElem);\n },\n getAttachPoint: () => {\n return lazySink().getOrDie();\n }\n }),\n Composing.config({\n find: sandbox => {\n return Sandboxing.getState(sandbox).bind(menu => Composing.getCurrent(menu));\n }\n }),\n Receiving.config({\n channels: {\n ...receivingChannel$1({ isExtraPart: never }),\n ...receivingChannel({ doReposition: doRepositionMenus })\n }\n })\n ])\n };\n };\n const repositionMenus = comp => {\n const sandbox = Coupling.getCoupled(comp, 'sandbox');\n doRepositionMenus(sandbox);\n };\n\n const sandboxFields = () => [\n defaulted('sandboxClasses', []),\n SketchBehaviours.field('sandboxBehaviours', [\n Composing,\n Receiving,\n Sandboxing,\n Representing\n ])\n ];\n\n const schema$k = constant$1([\n required$1('dom'),\n required$1('fetch'),\n onHandler('onOpen'),\n onKeyboardHandler('onExecute'),\n defaulted('getHotspot', Optional.some),\n defaulted('getAnchorOverrides', constant$1({})),\n schema$y(),\n field('dropdownBehaviours', [\n Toggling,\n Coupling,\n Keying,\n Focusing\n ]),\n required$1('toggleClass'),\n defaulted('eventOrder', {}),\n option$3('lazySink'),\n defaulted('matchWidth', false),\n defaulted('useMinWidth', false),\n option$3('role')\n ].concat(sandboxFields()));\n const parts$e = constant$1([\n external({\n schema: [\n tieredMenuMarkers(),\n defaulted('fakeFocus', false)\n ],\n name: 'menu',\n defaults: detail => {\n return { onExecute: detail.onExecute };\n }\n }),\n partType$1()\n ]);\n\n const factory$k = (detail, components, _spec, externals) => {\n const lookupAttr = attr => get$g(detail.dom, 'attributes').bind(attrs => get$g(attrs, attr));\n const switchToMenu = sandbox => {\n Sandboxing.getState(sandbox).each(tmenu => {\n tieredMenu.highlightPrimary(tmenu);\n });\n };\n const togglePopup$1 = (dropdownComp, onOpenSync, highlightOnOpen) => {\n return togglePopup(detail, identity, dropdownComp, externals, onOpenSync, highlightOnOpen);\n };\n const action = component => {\n const onOpenSync = switchToMenu;\n togglePopup$1(component, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n };\n const apis = {\n expand: comp => {\n if (!Toggling.isOn(comp)) {\n togglePopup$1(comp, noop, HighlightOnOpen.HighlightNone).get(noop);\n }\n },\n open: comp => {\n if (!Toggling.isOn(comp)) {\n togglePopup$1(comp, noop, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n }\n },\n refetch: comp => {\n const optSandbox = Coupling.getExistingCoupled(comp, 'sandbox');\n return optSandbox.fold(() => {\n return togglePopup$1(comp, noop, HighlightOnOpen.HighlightMenuAndItem).map(noop);\n }, sandboxComp => {\n return open(detail, identity, comp, sandboxComp, externals, noop, HighlightOnOpen.HighlightMenuAndItem).map(noop);\n });\n },\n isOpen: Toggling.isOn,\n close: comp => {\n if (Toggling.isOn(comp)) {\n togglePopup$1(comp, noop, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n }\n },\n repositionMenus: comp => {\n if (Toggling.isOn(comp)) {\n repositionMenus(comp);\n }\n }\n };\n const triggerExecute = (comp, _se) => {\n emitExecute(comp);\n return Optional.some(true);\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: augment(detail.dropdownBehaviours, [\n Toggling.config({\n toggleClass: detail.toggleClass,\n aria: { mode: 'expanded' }\n }),\n Coupling.config({\n others: {\n sandbox: hotspot => {\n return makeSandbox$1(detail, hotspot, {\n onOpen: () => Toggling.on(hotspot),\n onClose: () => Toggling.off(hotspot)\n });\n }\n }\n }),\n Keying.config({\n mode: 'special',\n onSpace: triggerExecute,\n onEnter: triggerExecute,\n onDown: (comp, _se) => {\n if (Dropdown.isOpen(comp)) {\n const sandbox = Coupling.getCoupled(comp, 'sandbox');\n switchToMenu(sandbox);\n } else {\n Dropdown.open(comp);\n }\n return Optional.some(true);\n },\n onEscape: (comp, _se) => {\n if (Dropdown.isOpen(comp)) {\n Dropdown.close(comp);\n return Optional.some(true);\n } else {\n return Optional.none();\n }\n }\n }),\n Focusing.config({})\n ]),\n events: events$a(Optional.some(action)),\n eventOrder: {\n ...detail.eventOrder,\n [execute$5()]: [\n 'disabling',\n 'toggling',\n 'alloy.base.behaviour'\n ]\n },\n apis,\n domModification: {\n attributes: {\n 'aria-haspopup': 'true',\n ...detail.role.fold(() => ({}), role => ({ role })),\n ...detail.dom.tag === 'button' ? { type: lookupAttr('type').getOr('button') } : {}\n }\n }\n };\n };\n const Dropdown = composite({\n name: 'Dropdown',\n configFields: schema$k(),\n partFields: parts$e(),\n factory: factory$k,\n apis: {\n open: (apis, comp) => apis.open(comp),\n refetch: (apis, comp) => apis.refetch(comp),\n expand: (apis, comp) => apis.expand(comp),\n close: (apis, comp) => apis.close(comp),\n isOpen: (apis, comp) => apis.isOpen(comp),\n repositionMenus: (apis, comp) => apis.repositionMenus(comp)\n }\n });\n\n const identifyMenuLayout = searchMode => {\n switch (searchMode.searchMode) {\n case 'no-search': {\n return { menuType: 'normal' };\n }\n default: {\n return {\n menuType: 'searchable',\n searchMode\n };\n }\n }\n };\n const handleRefetchTrigger = originalSandboxComp => {\n const dropdown = Representing.getValue(originalSandboxComp);\n const optSearcherState = findWithinSandbox(originalSandboxComp).map(saveState);\n Dropdown.refetch(dropdown).get(() => {\n const newSandboxComp = Coupling.getCoupled(dropdown, 'sandbox');\n optSearcherState.each(searcherState => findWithinSandbox(newSandboxComp).each(inputComp => restoreState(inputComp, searcherState)));\n });\n };\n const handleRedirectToMenuItem = (sandboxComp, se) => {\n getActiveMenuItemFrom(sandboxComp).each(activeItem => {\n retargetAndDispatchWith(sandboxComp, activeItem.element, se.event.eventType, se.event.interactionEvent);\n });\n };\n const getActiveMenuItemFrom = sandboxComp => {\n return Sandboxing.getState(sandboxComp).bind(Highlighting.getHighlighted).bind(Highlighting.getHighlighted);\n };\n const getSearchResults = activeMenuComp => {\n return has(activeMenuComp.element, searchResultsClass) ? Optional.some(activeMenuComp.element) : descendant(activeMenuComp.element, '.' + searchResultsClass);\n };\n const updateAriaOnHighlight = (tmenuComp, menuComp, itemComp) => {\n findWithinMenu(tmenuComp).each(inputComp => {\n setActiveDescendant(inputComp, itemComp);\n const optActiveResults = getSearchResults(menuComp);\n optActiveResults.each(resultsElem => {\n getOpt(resultsElem, 'id').each(controlledId => set$9(inputComp.element, 'aria-controls', controlledId));\n });\n });\n set$9(itemComp.element, 'aria-selected', 'true');\n };\n const updateAriaOnDehighlight = (tmenuComp, menuComp, itemComp) => {\n set$9(itemComp.element, 'aria-selected', 'false');\n };\n const focusSearchField = tmenuComp => {\n findWithinMenu(tmenuComp).each(searcherComp => Focusing.focus(searcherComp));\n };\n const getSearchPattern = dropdownComp => {\n const optSandboxComp = Coupling.getExistingCoupled(dropdownComp, 'sandbox');\n return optSandboxComp.bind(findWithinSandbox).map(saveState).map(state => state.fetchPattern).getOr('');\n };\n\n var FocusMode;\n (function (FocusMode) {\n FocusMode[FocusMode['ContentFocus'] = 0] = 'ContentFocus';\n FocusMode[FocusMode['UiFocus'] = 1] = 'UiFocus';\n }(FocusMode || (FocusMode = {})));\n const createMenuItemFromBridge = (item, itemResponse, backstage, menuHasIcons, isHorizontalMenu) => {\n const providersBackstage = backstage.shared.providers;\n const parseForHorizontalMenu = menuitem => !isHorizontalMenu ? menuitem : {\n ...menuitem,\n shortcut: Optional.none(),\n icon: menuitem.text.isSome() ? Optional.none() : menuitem.icon\n };\n switch (item.type) {\n case 'menuitem':\n return createMenuItem(item).fold(handleError, d => Optional.some(normal(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons)));\n case 'nestedmenuitem':\n return createNestedMenuItem(item).fold(handleError, d => Optional.some(nested(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons, isHorizontalMenu)));\n case 'togglemenuitem':\n return createToggleMenuItem(item).fold(handleError, d => Optional.some(toggle$1(parseForHorizontalMenu(d), itemResponse, providersBackstage, menuHasIcons)));\n case 'separator':\n return createSeparatorMenuItem(item).fold(handleError, d => Optional.some(separator$3(d)));\n case 'fancymenuitem':\n return createFancyMenuItem(item).fold(handleError, d => fancy(d, backstage));\n default: {\n console.error('Unknown item in general menu', item);\n return Optional.none();\n }\n }\n };\n const createAutocompleteItems = (items, matchText, onItemValueHandler, columns, itemResponse, sharedBackstage, highlightOn) => {\n const renderText = columns === 1;\n const renderIcons = !renderText || menuHasIcons(items);\n return cat(map$2(items, item => {\n switch (item.type) {\n case 'separator':\n return createSeparatorItem(item).fold(handleError, d => Optional.some(separator$3(d)));\n case 'cardmenuitem':\n return createCardMenuItem(item).fold(handleError, d => Optional.some(card({\n ...d,\n onAction: api => {\n d.onAction(api);\n onItemValueHandler(d.value, d.meta);\n }\n }, itemResponse, sharedBackstage, {\n itemBehaviours: tooltipBehaviour(d.meta, sharedBackstage),\n cardText: {\n matchText,\n highlightOn\n }\n })));\n case 'autocompleteitem':\n default:\n return createAutocompleterItem(item).fold(handleError, d => Optional.some(autocomplete(d, matchText, renderText, 'normal', onItemValueHandler, itemResponse, sharedBackstage, renderIcons)));\n }\n }));\n };\n const createPartialMenu = (value, items, itemResponse, backstage, isHorizontalMenu, searchMode) => {\n const hasIcons = menuHasIcons(items);\n const alloyItems = cat(map$2(items, item => {\n const itemHasIcon = i => isHorizontalMenu ? !has$2(i, 'text') : hasIcons;\n const createItem = i => createMenuItemFromBridge(i, itemResponse, backstage, itemHasIcon(i), isHorizontalMenu);\n if (item.type === 'nestedmenuitem' && item.getSubmenuItems().length <= 0) {\n return createItem({\n ...item,\n enabled: false\n });\n } else {\n return createItem(item);\n }\n }));\n const menuLayout = identifyMenuLayout(searchMode);\n const createPartial = isHorizontalMenu ? createHorizontalPartialMenuWithAlloyItems : createPartialMenuWithAlloyItems;\n return createPartial(value, hasIcons, alloyItems, 1, menuLayout);\n };\n const createTieredDataFrom = partialMenu => tieredMenu.singleData(partialMenu.value, partialMenu);\n const createInlineMenuFrom = (partialMenu, columns, focusMode, presets) => {\n const movement = deriveMenuMovement(columns, presets);\n const menuMarkers = markers(presets);\n return {\n data: createTieredDataFrom({\n ...partialMenu,\n movement,\n menuBehaviours: SimpleBehaviours.unnamedEvents(columns !== 'auto' ? [] : [runOnAttached((comp, _se) => {\n detectSize(comp, 4, menuMarkers.item).each(({numColumns, numRows}) => {\n Keying.setGridSize(comp, numRows, numColumns);\n });\n })])\n }),\n menu: {\n markers: markers(presets),\n fakeFocus: focusMode === FocusMode.ContentFocus\n }\n };\n };\n\n const getAutocompleterRange = (dom, initRange) => {\n return detect$1(SugarElement.fromDom(initRange.startContainer)).map(elm => {\n const range = dom.createRng();\n range.selectNode(elm.dom);\n return range;\n });\n };\n const register$b = (editor, sharedBackstage) => {\n const autocompleterId = generate$6('autocompleter');\n const processingAction = Cell(false);\n const activeState = Cell(false);\n const autocompleter = build$1(InlineView.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-autocompleter'],\n attributes: { id: autocompleterId }\n },\n components: [],\n fireDismissalEventInstead: {},\n inlineBehaviours: derive$1([config('dismissAutocompleter', [\n run$1(dismissRequested(), () => cancelIfNecessary()),\n run$1(highlight$1(), (_, se) => {\n getOpt(se.event.target, 'id').each(id => set$9(SugarElement.fromDom(editor.getBody()), 'aria-activedescendant', id));\n })\n ])]),\n lazySink: sharedBackstage.getSink\n }));\n const isMenuOpen = () => InlineView.isOpen(autocompleter);\n const isActive = activeState.get;\n const hideIfNecessary = () => {\n if (isMenuOpen()) {\n InlineView.hide(autocompleter);\n editor.dom.remove(autocompleterId, false);\n const editorBody = SugarElement.fromDom(editor.getBody());\n getOpt(editorBody, 'aria-owns').filter(ariaOwnsAttr => ariaOwnsAttr === autocompleterId).each(() => {\n remove$7(editorBody, 'aria-owns');\n remove$7(editorBody, 'aria-activedescendant');\n });\n }\n };\n const getMenu = () => InlineView.getContent(autocompleter).bind(tmenu => {\n return get$h(tmenu.components(), 0);\n });\n const cancelIfNecessary = () => editor.execCommand('mceAutocompleterClose');\n const getCombinedItems = matches => {\n const columns = findMap(matches, m => Optional.from(m.columns)).getOr(1);\n return bind$3(matches, match => {\n const choices = match.items;\n return createAutocompleteItems(choices, match.matchText, (itemValue, itemMeta) => {\n const nr = editor.selection.getRng();\n getAutocompleterRange(editor.dom, nr).each(range => {\n const autocompleterApi = {\n hide: () => cancelIfNecessary(),\n reload: fetchOptions => {\n hideIfNecessary();\n editor.execCommand('mceAutocompleterReload', false, { fetchOptions });\n }\n };\n processingAction.set(true);\n match.onAction(autocompleterApi, range, itemValue, itemMeta);\n processingAction.set(false);\n });\n }, columns, ItemResponse$1.BUBBLE_TO_SANDBOX, sharedBackstage, match.highlightOn);\n });\n };\n const display = (lookupData, items) => {\n findIn(SugarElement.fromDom(editor.getBody())).each(element => {\n const columns = findMap(lookupData, ld => Optional.from(ld.columns)).getOr(1);\n InlineView.showMenuAt(autocompleter, {\n anchor: {\n type: 'node',\n root: SugarElement.fromDom(editor.getBody()),\n node: Optional.from(element)\n }\n }, createInlineMenuFrom(createPartialMenuWithAlloyItems('autocompleter-value', true, items, columns, { menuType: 'normal' }), columns, FocusMode.ContentFocus, 'normal'));\n });\n getMenu().each(Highlighting.highlightFirst);\n };\n const updateDisplay = lookupData => {\n const combinedItems = getCombinedItems(lookupData);\n if (combinedItems.length > 0) {\n display(lookupData, combinedItems);\n set$9(SugarElement.fromDom(editor.getBody()), 'aria-owns', autocompleterId);\n if (!editor.inline) {\n cloneAutocompleterToEditorDoc();\n }\n } else {\n hideIfNecessary();\n }\n };\n const cloneAutocompleterToEditorDoc = () => {\n if (editor.dom.get(autocompleterId)) {\n editor.dom.remove(autocompleterId, false);\n }\n const docElm = editor.getDoc().documentElement;\n const selection = editor.selection.getNode();\n const newElm = deep(autocompleter.element);\n setAll(newElm, {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n width: '1px',\n top: `${ selection.offsetTop }px`,\n left: `${ selection.offsetLeft }px`\n });\n editor.dom.add(docElm, newElm.dom);\n descendant(newElm, '[role=\"menu\"]').each(child => {\n remove$6(child, 'position');\n remove$6(child, 'max-height');\n });\n };\n editor.on('AutocompleterStart', ({lookupData}) => {\n activeState.set(true);\n processingAction.set(false);\n updateDisplay(lookupData);\n });\n editor.on('AutocompleterUpdate', ({lookupData}) => updateDisplay(lookupData));\n editor.on('AutocompleterEnd', () => {\n hideIfNecessary();\n activeState.set(false);\n processingAction.set(false);\n });\n const autocompleterUiApi = {\n cancelIfNecessary,\n isMenuOpen,\n isActive,\n isProcessingAction: processingAction.get,\n getMenu\n };\n AutocompleterEditorEvents.setup(autocompleterUiApi, editor);\n };\n const Autocompleter = { register: register$b };\n\n const nonScrollingOverflows = [\n 'visible',\n 'hidden',\n 'clip'\n ];\n const isScrollingOverflowValue = value => trim$1(value).length > 0 && !contains$2(nonScrollingOverflows, value);\n const isScroller = elem => {\n if (isHTMLElement(elem)) {\n const overflowX = get$e(elem, 'overflow-x');\n const overflowY = get$e(elem, 'overflow-y');\n return isScrollingOverflowValue(overflowX) || isScrollingOverflowValue(overflowY);\n } else {\n return false;\n }\n };\n const detect = popupSinkElem => {\n const ancestorsScrollers = ancestors(popupSinkElem, isScroller);\n const scrollers = ancestorsScrollers.length === 0 ? getShadowRoot(popupSinkElem).map(getShadowHost).map(x => ancestors(x, isScroller)).getOr([]) : ancestorsScrollers;\n return head(scrollers).map(element => ({\n element,\n others: scrollers.slice(1)\n }));\n };\n const detectWhenSplitUiMode = (editor, popupSinkElem) => isSplitUiMode(editor) ? detect(popupSinkElem) : Optional.none();\n const getBoundsFrom = sc => {\n const scrollableBoxes = [\n ...map$2(sc.others, box$1),\n win()\n ];\n return constrainByMany(box$1(sc.element), scrollableBoxes);\n };\n\n const closest = (scope, selector, isRoot) => closest$1(scope, selector, isRoot).isSome();\n\n const DelayedFunction = (fun, delay) => {\n let ref = null;\n const schedule = (...args) => {\n ref = setTimeout(() => {\n fun.apply(null, args);\n ref = null;\n }, delay);\n };\n const cancel = () => {\n if (ref !== null) {\n clearTimeout(ref);\n ref = null;\n }\n };\n return {\n cancel,\n schedule\n };\n };\n\n const SIGNIFICANT_MOVE = 5;\n const LONGPRESS_DELAY = 400;\n const getTouch = event => {\n const raw = event.raw;\n if (raw.touches === undefined || raw.touches.length !== 1) {\n return Optional.none();\n }\n return Optional.some(raw.touches[0]);\n };\n const isFarEnough = (touch, data) => {\n const distX = Math.abs(touch.clientX - data.x);\n const distY = Math.abs(touch.clientY - data.y);\n return distX > SIGNIFICANT_MOVE || distY > SIGNIFICANT_MOVE;\n };\n const monitor = settings => {\n const startData = value$2();\n const longpressFired = Cell(false);\n const longpress$1 = DelayedFunction(event => {\n settings.triggerEvent(longpress(), event);\n longpressFired.set(true);\n }, LONGPRESS_DELAY);\n const handleTouchstart = event => {\n getTouch(event).each(touch => {\n longpress$1.cancel();\n const data = {\n x: touch.clientX,\n y: touch.clientY,\n target: event.target\n };\n longpress$1.schedule(event);\n longpressFired.set(false);\n startData.set(data);\n });\n return Optional.none();\n };\n const handleTouchmove = event => {\n longpress$1.cancel();\n getTouch(event).each(touch => {\n startData.on(data => {\n if (isFarEnough(touch, data)) {\n startData.clear();\n }\n });\n });\n return Optional.none();\n };\n const handleTouchend = event => {\n longpress$1.cancel();\n const isSame = data => eq(data.target, event.target);\n return startData.get().filter(isSame).map(_data => {\n if (longpressFired.get()) {\n event.prevent();\n return false;\n } else {\n return settings.triggerEvent(tap(), event);\n }\n });\n };\n const handlers = wrapAll([\n {\n key: touchstart(),\n value: handleTouchstart\n },\n {\n key: touchmove(),\n value: handleTouchmove\n },\n {\n key: touchend(),\n value: handleTouchend\n }\n ]);\n const fireIfReady = (event, type) => get$g(handlers, type).bind(handler => handler(event));\n return { fireIfReady };\n };\n\n const isDangerous = event => {\n const keyEv = event.raw;\n return keyEv.which === BACKSPACE[0] && !contains$2([\n 'input',\n 'textarea'\n ], name$3(event.target)) && !closest(event.target, '[contenteditable=\"true\"]');\n };\n const setup$d = (container, rawSettings) => {\n const settings = {\n stopBackspace: true,\n ...rawSettings\n };\n const pointerEvents = [\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'gesturestart',\n 'mousedown',\n 'mouseup',\n 'mouseover',\n 'mousemove',\n 'mouseout',\n 'click'\n ];\n const tapEvent = monitor(settings);\n const simpleEvents = map$2(pointerEvents.concat([\n 'selectstart',\n 'input',\n 'contextmenu',\n 'change',\n 'transitionend',\n 'transitioncancel',\n 'drag',\n 'dragstart',\n 'dragend',\n 'dragenter',\n 'dragleave',\n 'dragover',\n 'drop',\n 'keyup'\n ]), type => bind(container, type, event => {\n tapEvent.fireIfReady(event, type).each(tapStopped => {\n if (tapStopped) {\n event.kill();\n }\n });\n const stopped = settings.triggerEvent(type, event);\n if (stopped) {\n event.kill();\n }\n }));\n const pasteTimeout = value$2();\n const onPaste = bind(container, 'paste', event => {\n tapEvent.fireIfReady(event, 'paste').each(tapStopped => {\n if (tapStopped) {\n event.kill();\n }\n });\n const stopped = settings.triggerEvent('paste', event);\n if (stopped) {\n event.kill();\n }\n pasteTimeout.set(setTimeout(() => {\n settings.triggerEvent(postPaste(), event);\n }, 0));\n });\n const onKeydown = bind(container, 'keydown', event => {\n const stopped = settings.triggerEvent('keydown', event);\n if (stopped) {\n event.kill();\n } else if (settings.stopBackspace && isDangerous(event)) {\n event.prevent();\n }\n });\n const onFocusIn = bind(container, 'focusin', event => {\n const stopped = settings.triggerEvent('focusin', event);\n if (stopped) {\n event.kill();\n }\n });\n const focusoutTimeout = value$2();\n const onFocusOut = bind(container, 'focusout', event => {\n const stopped = settings.triggerEvent('focusout', event);\n if (stopped) {\n event.kill();\n }\n focusoutTimeout.set(setTimeout(() => {\n settings.triggerEvent(postBlur(), event);\n }, 0));\n });\n const unbind = () => {\n each$1(simpleEvents, e => {\n e.unbind();\n });\n onKeydown.unbind();\n onFocusIn.unbind();\n onFocusOut.unbind();\n onPaste.unbind();\n pasteTimeout.on(clearTimeout);\n focusoutTimeout.on(clearTimeout);\n };\n return { unbind };\n };\n\n const derive = (rawEvent, rawTarget) => {\n const source = get$g(rawEvent, 'target').getOr(rawTarget);\n return Cell(source);\n };\n\n const fromSource = (event, source) => {\n const stopper = Cell(false);\n const cutter = Cell(false);\n const stop = () => {\n stopper.set(true);\n };\n const cut = () => {\n cutter.set(true);\n };\n return {\n stop,\n cut,\n isStopped: stopper.get,\n isCut: cutter.get,\n event,\n setSource: source.set,\n getSource: source.get\n };\n };\n const fromExternal = event => {\n const stopper = Cell(false);\n const stop = () => {\n stopper.set(true);\n };\n return {\n stop,\n cut: noop,\n isStopped: stopper.get,\n isCut: never,\n event,\n setSource: die('Cannot set source of a broadcasted event'),\n getSource: die('Cannot get source of a broadcasted event')\n };\n };\n\n const adt$1 = Adt.generate([\n { stopped: [] },\n { resume: ['element'] },\n { complete: [] }\n ]);\n const doTriggerHandler = (lookup, eventType, rawEvent, target, source, logger) => {\n const handler = lookup(eventType, target);\n const simulatedEvent = fromSource(rawEvent, source);\n return handler.fold(() => {\n logger.logEventNoHandlers(eventType, target);\n return adt$1.complete();\n }, handlerInfo => {\n const descHandler = handlerInfo.descHandler;\n const eventHandler = getCurried(descHandler);\n eventHandler(simulatedEvent);\n if (simulatedEvent.isStopped()) {\n logger.logEventStopped(eventType, handlerInfo.element, descHandler.purpose);\n return adt$1.stopped();\n } else if (simulatedEvent.isCut()) {\n logger.logEventCut(eventType, handlerInfo.element, descHandler.purpose);\n return adt$1.complete();\n } else {\n return parent(handlerInfo.element).fold(() => {\n logger.logNoParent(eventType, handlerInfo.element, descHandler.purpose);\n return adt$1.complete();\n }, parent => {\n logger.logEventResponse(eventType, handlerInfo.element, descHandler.purpose);\n return adt$1.resume(parent);\n });\n }\n });\n };\n const doTriggerOnUntilStopped = (lookup, eventType, rawEvent, rawTarget, source, logger) => doTriggerHandler(lookup, eventType, rawEvent, rawTarget, source, logger).fold(always, parent => doTriggerOnUntilStopped(lookup, eventType, rawEvent, parent, source, logger), never);\n const triggerHandler = (lookup, eventType, rawEvent, target, logger) => {\n const source = derive(rawEvent, target);\n return doTriggerHandler(lookup, eventType, rawEvent, target, source, logger);\n };\n const broadcast = (listeners, rawEvent, _logger) => {\n const simulatedEvent = fromExternal(rawEvent);\n each$1(listeners, listener => {\n const descHandler = listener.descHandler;\n const handler = getCurried(descHandler);\n handler(simulatedEvent);\n });\n return simulatedEvent.isStopped();\n };\n const triggerUntilStopped = (lookup, eventType, rawEvent, logger) => triggerOnUntilStopped(lookup, eventType, rawEvent, rawEvent.target, logger);\n const triggerOnUntilStopped = (lookup, eventType, rawEvent, rawTarget, logger) => {\n const source = derive(rawEvent, rawTarget);\n return doTriggerOnUntilStopped(lookup, eventType, rawEvent, rawTarget, source, logger);\n };\n\n const eventHandler = (element, descHandler) => ({\n element,\n descHandler\n });\n const broadcastHandler = (id, handler) => ({\n id,\n descHandler: handler\n });\n const EventRegistry = () => {\n const registry = {};\n const registerId = (extraArgs, id, events) => {\n each(events, (v, k) => {\n const handlers = registry[k] !== undefined ? registry[k] : {};\n handlers[id] = curryArgs(v, extraArgs);\n registry[k] = handlers;\n });\n };\n const findHandler = (handlers, elem) => read$1(elem).bind(id => get$g(handlers, id)).map(descHandler => eventHandler(elem, descHandler));\n const filterByType = type => get$g(registry, type).map(handlers => mapToArray(handlers, (f, id) => broadcastHandler(id, f))).getOr([]);\n const find = (isAboveRoot, type, target) => get$g(registry, type).bind(handlers => closest$4(target, elem => findHandler(handlers, elem), isAboveRoot));\n const unregisterId = id => {\n each(registry, (handlersById, _eventName) => {\n if (has$2(handlersById, id)) {\n delete handlersById[id];\n }\n });\n };\n return {\n registerId,\n unregisterId,\n filterByType,\n find\n };\n };\n\n const Registry = () => {\n const events = EventRegistry();\n const components = {};\n const readOrTag = component => {\n const elem = component.element;\n return read$1(elem).getOrThunk(() => write('uid-', component.element));\n };\n const failOnDuplicate = (component, tagId) => {\n const conflict = components[tagId];\n if (conflict === component) {\n unregister(component);\n } else {\n throw new Error('The tagId \"' + tagId + '\" is already used by: ' + element(conflict.element) + '\\nCannot use it for: ' + element(component.element) + '\\n' + 'The conflicting element is' + (inBody(conflict.element) ? ' ' : ' not ') + 'already in the DOM');\n }\n };\n const register = component => {\n const tagId = readOrTag(component);\n if (hasNonNullableKey(components, tagId)) {\n failOnDuplicate(component, tagId);\n }\n const extraArgs = [component];\n events.registerId(extraArgs, tagId, component.events);\n components[tagId] = component;\n };\n const unregister = component => {\n read$1(component.element).each(tagId => {\n delete components[tagId];\n events.unregisterId(tagId);\n });\n };\n const filter = type => events.filterByType(type);\n const find = (isAboveRoot, type, target) => events.find(isAboveRoot, type, target);\n const getById = id => get$g(components, id);\n return {\n find,\n filter,\n register,\n unregister,\n getById\n };\n };\n\n const factory$j = detail => {\n const {attributes, ...domWithoutAttributes} = detail.dom;\n return {\n uid: detail.uid,\n dom: {\n tag: 'div',\n attributes: {\n role: 'presentation',\n ...attributes\n },\n ...domWithoutAttributes\n },\n components: detail.components,\n behaviours: get$3(detail.containerBehaviours),\n events: detail.events,\n domModification: detail.domModification,\n eventOrder: detail.eventOrder\n };\n };\n const Container = single({\n name: 'Container',\n factory: factory$j,\n configFields: [\n defaulted('components', []),\n field('containerBehaviours', []),\n defaulted('events', {}),\n defaulted('domModification', {}),\n defaulted('eventOrder', {})\n ]\n });\n\n const takeover = root => {\n const isAboveRoot = el => parent(root.element).fold(always, parent => eq(el, parent));\n const registry = Registry();\n const lookup = (eventName, target) => registry.find(isAboveRoot, eventName, target);\n const domEvents = setup$d(root.element, {\n triggerEvent: (eventName, event) => {\n return monitorEvent(eventName, event.target, logger => triggerUntilStopped(lookup, eventName, event, logger));\n }\n });\n const systemApi = {\n debugInfo: constant$1('real'),\n triggerEvent: (eventName, target, data) => {\n monitorEvent(eventName, target, logger => triggerOnUntilStopped(lookup, eventName, data, target, logger));\n },\n triggerFocus: (target, originator) => {\n read$1(target).fold(() => {\n focus$3(target);\n }, _alloyId => {\n monitorEvent(focus$4(), target, logger => {\n triggerHandler(lookup, focus$4(), {\n originator,\n kill: noop,\n prevent: noop,\n target\n }, target, logger);\n return false;\n });\n });\n },\n triggerEscape: (comp, simulatedEvent) => {\n systemApi.triggerEvent('keydown', comp.element, simulatedEvent.event);\n },\n getByUid: uid => {\n return getByUid(uid);\n },\n getByDom: elem => {\n return getByDom(elem);\n },\n build: build$1,\n buildOrPatch: buildOrPatch,\n addToGui: c => {\n add(c);\n },\n removeFromGui: c => {\n remove(c);\n },\n addToWorld: c => {\n addToWorld(c);\n },\n removeFromWorld: c => {\n removeFromWorld(c);\n },\n broadcast: message => {\n broadcast$1(message);\n },\n broadcastOn: (channels, message) => {\n broadcastOn(channels, message);\n },\n broadcastEvent: (eventName, event) => {\n broadcastEvent(eventName, event);\n },\n isConnected: always\n };\n const addToWorld = component => {\n component.connect(systemApi);\n if (!isText(component.element)) {\n registry.register(component);\n each$1(component.components(), addToWorld);\n systemApi.triggerEvent(systemInit(), component.element, { target: component.element });\n }\n };\n const removeFromWorld = component => {\n if (!isText(component.element)) {\n each$1(component.components(), removeFromWorld);\n registry.unregister(component);\n }\n component.disconnect();\n };\n const add = component => {\n attach(root, component);\n };\n const remove = component => {\n detach(component);\n };\n const destroy = () => {\n domEvents.unbind();\n remove$5(root.element);\n };\n const broadcastData = data => {\n const receivers = registry.filter(receive());\n each$1(receivers, receiver => {\n const descHandler = receiver.descHandler;\n const handler = getCurried(descHandler);\n handler(data);\n });\n };\n const broadcast$1 = message => {\n broadcastData({\n universal: true,\n data: message\n });\n };\n const broadcastOn = (channels, message) => {\n broadcastData({\n universal: false,\n channels,\n data: message\n });\n };\n const broadcastEvent = (eventName, event) => {\n const listeners = registry.filter(eventName);\n return broadcast(listeners, event);\n };\n const getByUid = uid => registry.getById(uid).fold(() => Result.error(new Error('Could not find component with uid: \"' + uid + '\" in system.')), Result.value);\n const getByDom = elem => {\n const uid = read$1(elem).getOr('not found');\n return getByUid(uid);\n };\n addToWorld(root);\n return {\n root,\n element: root.element,\n destroy,\n add,\n remove,\n getByUid,\n getByDom,\n addToWorld,\n removeFromWorld,\n broadcast: broadcast$1,\n broadcastOn,\n broadcastEvent\n };\n };\n\n const renderBar = (spec, backstage) => ({\n dom: {\n tag: 'div',\n classes: [\n 'tox-bar',\n 'tox-form__controls-h-stack'\n ]\n },\n components: map$2(spec.items, backstage.interpreter)\n });\n\n const schema$j = constant$1([\n defaulted('prefix', 'form-field'),\n field('fieldBehaviours', [\n Composing,\n Representing\n ])\n ]);\n const parts$d = constant$1([\n optional({\n schema: [required$1('dom')],\n name: 'label'\n }),\n optional({\n factory: {\n sketch: spec => {\n return {\n uid: spec.uid,\n dom: {\n tag: 'span',\n styles: { display: 'none' },\n attributes: { 'aria-hidden': 'true' },\n innerHtml: spec.text\n }\n };\n }\n },\n schema: [required$1('text')],\n name: 'aria-descriptor'\n }),\n required({\n factory: {\n sketch: spec => {\n const excludeFactory = exclude(spec, ['factory']);\n return spec.factory.sketch(excludeFactory);\n }\n },\n schema: [required$1('factory')],\n name: 'field'\n })\n ]);\n\n const factory$i = (detail, components, _spec, _externals) => {\n const behaviours = augment(detail.fieldBehaviours, [\n Composing.config({\n find: container => {\n return getPart(container, detail, 'field');\n }\n }),\n Representing.config({\n store: {\n mode: 'manual',\n getValue: field => {\n return Composing.getCurrent(field).bind(Representing.getValue);\n },\n setValue: (field, value) => {\n Composing.getCurrent(field).each(current => {\n Representing.setValue(current, value);\n });\n }\n }\n })\n ]);\n const events = derive$2([runOnAttached((component, _simulatedEvent) => {\n const ps = getParts(component, detail, [\n 'label',\n 'field',\n 'aria-descriptor'\n ]);\n ps.field().each(field => {\n const id = generate$6(detail.prefix);\n ps.label().each(label => {\n set$9(label.element, 'for', id);\n set$9(field.element, 'id', id);\n });\n ps['aria-descriptor']().each(descriptor => {\n const descriptorId = generate$6(detail.prefix);\n set$9(descriptor.element, 'id', descriptorId);\n set$9(field.element, 'aria-describedby', descriptorId);\n });\n });\n })]);\n const apis = {\n getField: container => getPart(container, detail, 'field'),\n getLabel: container => getPart(container, detail, 'label')\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours,\n events,\n apis\n };\n };\n const FormField = composite({\n name: 'FormField',\n configFields: schema$j(),\n partFields: parts$d(),\n factory: factory$i,\n apis: {\n getField: (apis, comp) => apis.getField(comp),\n getLabel: (apis, comp) => apis.getLabel(comp)\n }\n });\n\n const exhibit$2 = (base, tabConfig) => nu$7({\n attributes: wrapAll([{\n key: tabConfig.tabAttr,\n value: 'true'\n }])\n });\n\n var ActiveTabstopping = /*#__PURE__*/Object.freeze({\n __proto__: null,\n exhibit: exhibit$2\n });\n\n var TabstopSchema = [defaulted('tabAttr', 'data-alloy-tabstop')];\n\n const Tabstopping = create$4({\n fields: TabstopSchema,\n name: 'tabstopping',\n active: ActiveTabstopping\n });\n\n var global$3 = tinymce.util.Tools.resolve('tinymce.html.Entities');\n\n const renderFormFieldWith = (pLabel, pField, extraClasses, extraBehaviours) => {\n const spec = renderFormFieldSpecWith(pLabel, pField, extraClasses, extraBehaviours);\n return FormField.sketch(spec);\n };\n const renderFormField = (pLabel, pField) => renderFormFieldWith(pLabel, pField, [], []);\n const renderFormFieldSpecWith = (pLabel, pField, extraClasses, extraBehaviours) => ({\n dom: renderFormFieldDomWith(extraClasses),\n components: pLabel.toArray().concat([pField]),\n fieldBehaviours: derive$1(extraBehaviours)\n });\n const renderFormFieldDom = () => renderFormFieldDomWith([]);\n const renderFormFieldDomWith = extraClasses => ({\n tag: 'div',\n classes: ['tox-form__group'].concat(extraClasses)\n });\n const renderLabel$3 = (label, providersBackstage) => FormField.parts.label({\n dom: {\n tag: 'label',\n classes: ['tox-label']\n },\n components: [text$2(providersBackstage.translate(label))]\n });\n\n const formChangeEvent = generate$6('form-component-change');\n const formCloseEvent = generate$6('form-close');\n const formCancelEvent = generate$6('form-cancel');\n const formActionEvent = generate$6('form-action');\n const formSubmitEvent = generate$6('form-submit');\n const formBlockEvent = generate$6('form-block');\n const formUnblockEvent = generate$6('form-unblock');\n const formTabChangeEvent = generate$6('form-tabchange');\n const formResizeEvent = generate$6('form-resize');\n\n const renderCollection = (spec, providersBackstage, initialData) => {\n const pLabel = spec.label.map(label => renderLabel$3(label, providersBackstage));\n const icons = providersBackstage.icons();\n const getIcon = icon => {\n var _a;\n return (_a = icons[icon]) !== null && _a !== void 0 ? _a : icon;\n };\n const runOnItem = f => (comp, se) => {\n closest$1(se.event.target, '[data-collection-item-value]').each(target => {\n f(comp, se, target, get$f(target, 'data-collection-item-value'));\n });\n };\n const setContents = (comp, items) => {\n const htmlLines = map$2(items, item => {\n const itemText = global$8.translate(item.text);\n const textContent = spec.columns === 1 ? `<div class=\"tox-collection__item-label\">${ itemText }</div>` : '';\n const iconContent = `<div class=\"tox-collection__item-icon\">${ getIcon(item.icon) }</div>`;\n const mapItemName = {\n '_': ' ',\n ' - ': ' ',\n '-': ' '\n };\n const ariaLabel = itemText.replace(/\\_| \\- |\\-/g, match => mapItemName[match]);\n const disabledClass = providersBackstage.isDisabled() ? ' tox-collection__item--state-disabled' : '';\n return `<div class=\"tox-collection__item${ disabledClass }\" tabindex=\"-1\" data-collection-item-value=\"${ global$3.encodeAllRaw(item.value) }\" title=\"${ ariaLabel }\" aria-label=\"${ ariaLabel }\">${ iconContent }${ textContent }</div>`;\n });\n const chunks = spec.columns !== 'auto' && spec.columns > 1 ? chunk$1(htmlLines, spec.columns) : [htmlLines];\n const html = map$2(chunks, ch => `<div class=\"tox-collection__group\">${ ch.join('') }</div>`);\n set$6(comp.element, html.join(''));\n };\n const onClick = runOnItem((comp, se, tgt, itemValue) => {\n se.stop();\n if (!providersBackstage.isDisabled()) {\n emitWith(comp, formActionEvent, {\n name: spec.name,\n value: itemValue\n });\n }\n });\n const collectionEvents = [\n run$1(mouseover(), runOnItem((comp, se, tgt) => {\n focus$3(tgt);\n })),\n run$1(click(), onClick),\n run$1(tap(), onClick),\n run$1(focusin(), runOnItem((comp, se, tgt) => {\n descendant(comp.element, '.' + activeClass).each(currentActive => {\n remove$2(currentActive, activeClass);\n });\n add$2(tgt, activeClass);\n })),\n run$1(focusout(), runOnItem(comp => {\n descendant(comp.element, '.' + activeClass).each(currentActive => {\n remove$2(currentActive, activeClass);\n });\n })),\n runOnExecute$1(runOnItem((comp, se, tgt, itemValue) => {\n emitWith(comp, formActionEvent, {\n name: spec.name,\n value: itemValue\n });\n }))\n ];\n const iterCollectionItems = (comp, applyAttributes) => map$2(descendants(comp.element, '.tox-collection__item'), applyAttributes);\n const pField = FormField.parts.field({\n dom: {\n tag: 'div',\n classes: ['tox-collection'].concat(spec.columns !== 1 ? ['tox-collection--grid'] : ['tox-collection--list'])\n },\n components: [],\n factory: { sketch: identity },\n behaviours: derive$1([\n Disabling.config({\n disabled: providersBackstage.isDisabled,\n onDisabled: comp => {\n iterCollectionItems(comp, childElm => {\n add$2(childElm, 'tox-collection__item--state-disabled');\n set$9(childElm, 'aria-disabled', true);\n });\n },\n onEnabled: comp => {\n iterCollectionItems(comp, childElm => {\n remove$2(childElm, 'tox-collection__item--state-disabled');\n remove$7(childElm, 'aria-disabled');\n });\n }\n }),\n receivingConfig(),\n Replacing.config({}),\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: initialData.getOr([])\n },\n onSetValue: (comp, items) => {\n setContents(comp, items);\n if (spec.columns === 'auto') {\n detectSize(comp, 5, 'tox-collection__item').each(({numRows, numColumns}) => {\n Keying.setGridSize(comp, numRows, numColumns);\n });\n }\n emit(comp, formResizeEvent);\n }\n }),\n Tabstopping.config({}),\n Keying.config(deriveCollectionMovement(spec.columns, 'normal')),\n config('collection-events', collectionEvents)\n ]),\n eventOrder: {\n [execute$5()]: [\n 'disabling',\n 'alloy.base.behaviour',\n 'collection-events'\n ]\n }\n });\n const extraClasses = ['tox-form__group--collection'];\n return renderFormFieldWith(pLabel, pField, extraClasses, []);\n };\n\n const ariaElements = [\n 'input',\n 'textarea'\n ];\n const isAriaElement = elem => {\n const name = name$3(elem);\n return contains$2(ariaElements, name);\n };\n const markValid = (component, invalidConfig) => {\n const elem = invalidConfig.getRoot(component).getOr(component.element);\n remove$2(elem, invalidConfig.invalidClass);\n invalidConfig.notify.each(notifyInfo => {\n if (isAriaElement(component.element)) {\n set$9(component.element, 'aria-invalid', false);\n }\n notifyInfo.getContainer(component).each(container => {\n set$6(container, notifyInfo.validHtml);\n });\n notifyInfo.onValid(component);\n });\n };\n const markInvalid = (component, invalidConfig, invalidState, text) => {\n const elem = invalidConfig.getRoot(component).getOr(component.element);\n add$2(elem, invalidConfig.invalidClass);\n invalidConfig.notify.each(notifyInfo => {\n if (isAriaElement(component.element)) {\n set$9(component.element, 'aria-invalid', true);\n }\n notifyInfo.getContainer(component).each(container => {\n set$6(container, text);\n });\n notifyInfo.onInvalid(component, text);\n });\n };\n const query = (component, invalidConfig, _invalidState) => invalidConfig.validator.fold(() => Future.pure(Result.value(true)), validatorInfo => validatorInfo.validate(component));\n const run = (component, invalidConfig, invalidState) => {\n invalidConfig.notify.each(notifyInfo => {\n notifyInfo.onValidate(component);\n });\n return query(component, invalidConfig).map(valid => {\n if (component.getSystem().isConnected()) {\n return valid.fold(err => {\n markInvalid(component, invalidConfig, invalidState, err);\n return Result.error(err);\n }, v => {\n markValid(component, invalidConfig);\n return Result.value(v);\n });\n } else {\n return Result.error('No longer in system');\n }\n });\n };\n const isInvalid = (component, invalidConfig) => {\n const elem = invalidConfig.getRoot(component).getOr(component.element);\n return has(elem, invalidConfig.invalidClass);\n };\n\n var InvalidateApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n markValid: markValid,\n markInvalid: markInvalid,\n query: query,\n run: run,\n isInvalid: isInvalid\n });\n\n const events$8 = (invalidConfig, invalidState) => invalidConfig.validator.map(validatorInfo => derive$2([run$1(validatorInfo.onEvent, component => {\n run(component, invalidConfig, invalidState).get(identity);\n })].concat(validatorInfo.validateOnLoad ? [runOnAttached(component => {\n run(component, invalidConfig, invalidState).get(noop);\n })] : []))).getOr({});\n\n var ActiveInvalidate = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$8\n });\n\n var InvalidateSchema = [\n required$1('invalidClass'),\n defaulted('getRoot', Optional.none),\n optionObjOf('notify', [\n defaulted('aria', 'alert'),\n defaulted('getContainer', Optional.none),\n defaulted('validHtml', ''),\n onHandler('onValid'),\n onHandler('onInvalid'),\n onHandler('onValidate')\n ]),\n optionObjOf('validator', [\n required$1('validate'),\n defaulted('onEvent', 'input'),\n defaulted('validateOnLoad', true)\n ])\n ];\n\n const Invalidating = create$4({\n fields: InvalidateSchema,\n name: 'invalidating',\n active: ActiveInvalidate,\n apis: InvalidateApis,\n extra: {\n validation: validator => {\n return component => {\n const v = Representing.getValue(component);\n return Future.pure(validator(v));\n };\n }\n }\n });\n\n const exhibit$1 = () => nu$7({\n styles: {\n '-webkit-user-select': 'none',\n 'user-select': 'none',\n '-ms-user-select': 'none',\n '-moz-user-select': '-moz-none'\n },\n attributes: { unselectable: 'on' }\n });\n const events$7 = () => derive$2([abort(selectstart(), always)]);\n\n var ActiveUnselecting = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$7,\n exhibit: exhibit$1\n });\n\n const Unselecting = create$4({\n fields: [],\n name: 'unselecting',\n active: ActiveUnselecting\n });\n\n const renderPanelButton = (spec, sharedBackstage) => Dropdown.sketch({\n dom: spec.dom,\n components: spec.components,\n toggleClass: 'mce-active',\n dropdownBehaviours: derive$1([\n DisablingConfigs.button(sharedBackstage.providers.isDisabled),\n receivingConfig(),\n Unselecting.config({}),\n Tabstopping.config({})\n ]),\n layouts: spec.layouts,\n sandboxClasses: ['tox-dialog__popups'],\n lazySink: sharedBackstage.getSink,\n fetch: comp => Future.nu(callback => spec.fetch(callback)).map(items => Optional.from(createTieredDataFrom(deepMerge(createPartialChoiceMenu(generate$6('menu-value'), items, value => {\n spec.onItemAction(comp, value);\n }, spec.columns, spec.presets, ItemResponse$1.CLOSE_ON_EXECUTE, never, sharedBackstage.providers), { movement: deriveMenuMovement(spec.columns, spec.presets) })))),\n parts: { menu: part(false, 1, spec.presets) }\n });\n\n const colorInputChangeEvent = generate$6('color-input-change');\n const colorSwatchChangeEvent = generate$6('color-swatch-change');\n const colorPickerCancelEvent = generate$6('color-picker-cancel');\n const renderColorInput = (spec, sharedBackstage, colorInputBackstage, initialData) => {\n const pField = FormField.parts.field({\n factory: Input,\n inputClasses: ['tox-textfield'],\n data: initialData,\n onSetValue: c => Invalidating.run(c).get(noop),\n inputBehaviours: derive$1([\n Disabling.config({ disabled: sharedBackstage.providers.isDisabled }),\n receivingConfig(),\n Tabstopping.config({}),\n Invalidating.config({\n invalidClass: 'tox-textbox-field-invalid',\n getRoot: comp => parentElement(comp.element),\n notify: {\n onValid: comp => {\n const val = Representing.getValue(comp);\n emitWith(comp, colorInputChangeEvent, { color: val });\n }\n },\n validator: {\n validateOnLoad: false,\n validate: input => {\n const inputValue = Representing.getValue(input);\n if (inputValue.length === 0) {\n return Future.pure(Result.value(true));\n } else {\n const span = SugarElement.fromTag('span');\n set$8(span, 'background-color', inputValue);\n const res = getRaw(span, 'background-color').fold(() => Result.error('blah'), _ => Result.value(inputValue));\n return Future.pure(res);\n }\n }\n }\n })\n ]),\n selectOnFocus: false\n });\n const pLabel = spec.label.map(label => renderLabel$3(label, sharedBackstage.providers));\n const emitSwatchChange = (colorBit, value) => {\n emitWith(colorBit, colorSwatchChangeEvent, { value });\n };\n const onItemAction = (comp, value) => {\n memColorButton.getOpt(comp).each(colorBit => {\n if (value === 'custom') {\n colorInputBackstage.colorPicker(valueOpt => {\n valueOpt.fold(() => emit(colorBit, colorPickerCancelEvent), value => {\n emitSwatchChange(colorBit, value);\n addColor(spec.storageKey, value);\n });\n }, '#ffffff');\n } else if (value === 'remove') {\n emitSwatchChange(colorBit, '');\n } else {\n emitSwatchChange(colorBit, value);\n }\n });\n };\n const memColorButton = record(renderPanelButton({\n dom: {\n tag: 'span',\n attributes: { 'aria-label': sharedBackstage.providers.translate('Color swatch') }\n },\n layouts: {\n onRtl: () => [\n southwest$2,\n southeast$2,\n south$2\n ],\n onLtr: () => [\n southeast$2,\n southwest$2,\n south$2\n ]\n },\n components: [],\n fetch: getFetch$1(colorInputBackstage.getColors(spec.storageKey), spec.storageKey, colorInputBackstage.hasCustomColors()),\n columns: colorInputBackstage.getColorCols(spec.storageKey),\n presets: 'color',\n onItemAction\n }, sharedBackstage));\n return FormField.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-form__group']\n },\n components: pLabel.toArray().concat([{\n dom: {\n tag: 'div',\n classes: ['tox-color-input']\n },\n components: [\n pField,\n memColorButton.asSpec()\n ]\n }]),\n fieldBehaviours: derive$1([config('form-field-events', [\n run$1(colorInputChangeEvent, (comp, se) => {\n memColorButton.getOpt(comp).each(colorButton => {\n set$8(colorButton.element, 'background-color', se.event.color);\n });\n emitWith(comp, formChangeEvent, { name: spec.name });\n }),\n run$1(colorSwatchChangeEvent, (comp, se) => {\n FormField.getField(comp).each(field => {\n Representing.setValue(field, se.event.value);\n Composing.getCurrent(comp).each(Focusing.focus);\n });\n }),\n run$1(colorPickerCancelEvent, (comp, _se) => {\n FormField.getField(comp).each(_field => {\n Composing.getCurrent(comp).each(Focusing.focus);\n });\n })\n ])])\n });\n };\n\n const labelPart = optional({\n schema: [required$1('dom')],\n name: 'label'\n });\n const edgePart = name => optional({\n name: '' + name + '-edge',\n overrides: detail => {\n const action = detail.model.manager.edgeActions[name];\n return action.fold(() => ({}), a => ({\n events: derive$2([\n runActionExtra(touchstart(), (comp, se, d) => a(comp, d), [detail]),\n runActionExtra(mousedown(), (comp, se, d) => a(comp, d), [detail]),\n runActionExtra(mousemove(), (comp, se, det) => {\n if (det.mouseIsDown.get()) {\n a(comp, det);\n }\n }, [detail])\n ])\n }));\n }\n });\n const tlEdgePart = edgePart('top-left');\n const tedgePart = edgePart('top');\n const trEdgePart = edgePart('top-right');\n const redgePart = edgePart('right');\n const brEdgePart = edgePart('bottom-right');\n const bedgePart = edgePart('bottom');\n const blEdgePart = edgePart('bottom-left');\n const ledgePart = edgePart('left');\n const thumbPart = required({\n name: 'thumb',\n defaults: constant$1({ dom: { styles: { position: 'absolute' } } }),\n overrides: detail => {\n return {\n events: derive$2([\n redirectToPart(touchstart(), detail, 'spectrum'),\n redirectToPart(touchmove(), detail, 'spectrum'),\n redirectToPart(touchend(), detail, 'spectrum'),\n redirectToPart(mousedown(), detail, 'spectrum'),\n redirectToPart(mousemove(), detail, 'spectrum'),\n redirectToPart(mouseup(), detail, 'spectrum')\n ])\n };\n }\n });\n const isShift = event => isShift$1(event.event);\n const spectrumPart = required({\n schema: [customField('mouseIsDown', () => Cell(false))],\n name: 'spectrum',\n overrides: detail => {\n const modelDetail = detail.model;\n const model = modelDetail.manager;\n const setValueFrom = (component, simulatedEvent) => model.getValueFromEvent(simulatedEvent).map(value => model.setValueFrom(component, detail, value));\n return {\n behaviours: derive$1([\n Keying.config({\n mode: 'special',\n onLeft: (spectrum, event) => model.onLeft(spectrum, detail, isShift(event)),\n onRight: (spectrum, event) => model.onRight(spectrum, detail, isShift(event)),\n onUp: (spectrum, event) => model.onUp(spectrum, detail, isShift(event)),\n onDown: (spectrum, event) => model.onDown(spectrum, detail, isShift(event))\n }),\n Tabstopping.config({}),\n Focusing.config({})\n ]),\n events: derive$2([\n run$1(touchstart(), setValueFrom),\n run$1(touchmove(), setValueFrom),\n run$1(mousedown(), setValueFrom),\n run$1(mousemove(), (spectrum, se) => {\n if (detail.mouseIsDown.get()) {\n setValueFrom(spectrum, se);\n }\n })\n ])\n };\n }\n });\n var SliderParts = [\n labelPart,\n ledgePart,\n redgePart,\n tedgePart,\n bedgePart,\n tlEdgePart,\n trEdgePart,\n blEdgePart,\n brEdgePart,\n thumbPart,\n spectrumPart\n ];\n\n const _sliderChangeEvent = 'slider.change.value';\n const sliderChangeEvent = constant$1(_sliderChangeEvent);\n const isTouchEvent$2 = evt => evt.type.indexOf('touch') !== -1;\n const getEventSource = simulatedEvent => {\n const evt = simulatedEvent.event.raw;\n if (isTouchEvent$2(evt)) {\n const touchEvent = evt;\n return touchEvent.touches !== undefined && touchEvent.touches.length === 1 ? Optional.some(touchEvent.touches[0]).map(t => SugarPosition(t.clientX, t.clientY)) : Optional.none();\n } else {\n const mouseEvent = evt;\n return mouseEvent.clientX !== undefined ? Optional.some(mouseEvent).map(me => SugarPosition(me.clientX, me.clientY)) : Optional.none();\n }\n };\n\n const t = 'top', r = 'right', b = 'bottom', l = 'left';\n const minX = detail => detail.model.minX;\n const minY = detail => detail.model.minY;\n const min1X = detail => detail.model.minX - 1;\n const min1Y = detail => detail.model.minY - 1;\n const maxX = detail => detail.model.maxX;\n const maxY = detail => detail.model.maxY;\n const max1X = detail => detail.model.maxX + 1;\n const max1Y = detail => detail.model.maxY + 1;\n const range = (detail, max, min) => max(detail) - min(detail);\n const xRange = detail => range(detail, maxX, minX);\n const yRange = detail => range(detail, maxY, minY);\n const halfX = detail => xRange(detail) / 2;\n const halfY = detail => yRange(detail) / 2;\n const step = (detail, useMultiplier) => useMultiplier ? detail.stepSize * detail.speedMultiplier : detail.stepSize;\n const snap = detail => detail.snapToGrid;\n const snapStart = detail => detail.snapStart;\n const rounded = detail => detail.rounded;\n const hasEdge = (detail, edgeName) => detail[edgeName + '-edge'] !== undefined;\n const hasLEdge = detail => hasEdge(detail, l);\n const hasREdge = detail => hasEdge(detail, r);\n const hasTEdge = detail => hasEdge(detail, t);\n const hasBEdge = detail => hasEdge(detail, b);\n const currentValue = detail => detail.model.value.get();\n\n const xyValue = (x, y) => ({\n x,\n y\n });\n const fireSliderChange$3 = (component, value) => {\n emitWith(component, sliderChangeEvent(), { value });\n };\n const setToTLEdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(min1X(detail), min1Y(detail)));\n };\n const setToTEdge = (edge, detail) => {\n fireSliderChange$3(edge, min1Y(detail));\n };\n const setToTEdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(halfX(detail), min1Y(detail)));\n };\n const setToTREdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(max1X(detail), min1Y(detail)));\n };\n const setToREdge = (edge, detail) => {\n fireSliderChange$3(edge, max1X(detail));\n };\n const setToREdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(max1X(detail), halfY(detail)));\n };\n const setToBREdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(max1X(detail), max1Y(detail)));\n };\n const setToBEdge = (edge, detail) => {\n fireSliderChange$3(edge, max1Y(detail));\n };\n const setToBEdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(halfX(detail), max1Y(detail)));\n };\n const setToBLEdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(min1X(detail), max1Y(detail)));\n };\n const setToLEdge = (edge, detail) => {\n fireSliderChange$3(edge, min1X(detail));\n };\n const setToLEdgeXY = (edge, detail) => {\n fireSliderChange$3(edge, xyValue(min1X(detail), halfY(detail)));\n };\n\n const reduceBy = (value, min, max, step) => {\n if (value < min) {\n return value;\n } else if (value > max) {\n return max;\n } else if (value === min) {\n return min - 1;\n } else {\n return Math.max(min, value - step);\n }\n };\n const increaseBy = (value, min, max, step) => {\n if (value > max) {\n return value;\n } else if (value < min) {\n return min;\n } else if (value === max) {\n return max + 1;\n } else {\n return Math.min(max, value + step);\n }\n };\n const capValue = (value, min, max) => Math.max(min, Math.min(max, value));\n const snapValueOf = (value, min, max, step, snapStart) => snapStart.fold(() => {\n const initValue = value - min;\n const extraValue = Math.round(initValue / step) * step;\n return capValue(min + extraValue, min - 1, max + 1);\n }, start => {\n const remainder = (value - start) % step;\n const adjustment = Math.round(remainder / step);\n const rawSteps = Math.floor((value - start) / step);\n const maxSteps = Math.floor((max - start) / step);\n const numSteps = Math.min(maxSteps, rawSteps + adjustment);\n const r = start + numSteps * step;\n return Math.max(start, r);\n });\n const findOffsetOf = (value, min, max) => Math.min(max, Math.max(value, min)) - min;\n const findValueOf = args => {\n const {min, max, range, value, step, snap, snapStart, rounded, hasMinEdge, hasMaxEdge, minBound, maxBound, screenRange} = args;\n const capMin = hasMinEdge ? min - 1 : min;\n const capMax = hasMaxEdge ? max + 1 : max;\n if (value < minBound) {\n return capMin;\n } else if (value > maxBound) {\n return capMax;\n } else {\n const offset = findOffsetOf(value, minBound, maxBound);\n const newValue = capValue(offset / screenRange * range + min, capMin, capMax);\n if (snap && newValue >= min && newValue <= max) {\n return snapValueOf(newValue, min, max, step, snapStart);\n } else if (rounded) {\n return Math.round(newValue);\n } else {\n return newValue;\n }\n }\n };\n const findOffsetOfValue$2 = args => {\n const {min, max, range, value, hasMinEdge, hasMaxEdge, maxBound, maxOffset, centerMinEdge, centerMaxEdge} = args;\n if (value < min) {\n return hasMinEdge ? 0 : centerMinEdge;\n } else if (value > max) {\n return hasMaxEdge ? maxBound : centerMaxEdge;\n } else {\n return (value - min) / range * maxOffset;\n }\n };\n\n const top = 'top', right = 'right', bottom = 'bottom', left = 'left', width = 'width', height = 'height';\n const getBounds = component => component.element.dom.getBoundingClientRect();\n const getBoundsProperty = (bounds, property) => bounds[property];\n const getMinXBounds = component => {\n const bounds = getBounds(component);\n return getBoundsProperty(bounds, left);\n };\n const getMaxXBounds = component => {\n const bounds = getBounds(component);\n return getBoundsProperty(bounds, right);\n };\n const getMinYBounds = component => {\n const bounds = getBounds(component);\n return getBoundsProperty(bounds, top);\n };\n const getMaxYBounds = component => {\n const bounds = getBounds(component);\n return getBoundsProperty(bounds, bottom);\n };\n const getXScreenRange = component => {\n const bounds = getBounds(component);\n return getBoundsProperty(bounds, width);\n };\n const getYScreenRange = component => {\n const bounds = getBounds(component);\n return getBoundsProperty(bounds, height);\n };\n const getCenterOffsetOf = (componentMinEdge, componentMaxEdge, spectrumMinEdge) => (componentMinEdge + componentMaxEdge) / 2 - spectrumMinEdge;\n const getXCenterOffSetOf = (component, spectrum) => {\n const componentBounds = getBounds(component);\n const spectrumBounds = getBounds(spectrum);\n const componentMinEdge = getBoundsProperty(componentBounds, left);\n const componentMaxEdge = getBoundsProperty(componentBounds, right);\n const spectrumMinEdge = getBoundsProperty(spectrumBounds, left);\n return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);\n };\n const getYCenterOffSetOf = (component, spectrum) => {\n const componentBounds = getBounds(component);\n const spectrumBounds = getBounds(spectrum);\n const componentMinEdge = getBoundsProperty(componentBounds, top);\n const componentMaxEdge = getBoundsProperty(componentBounds, bottom);\n const spectrumMinEdge = getBoundsProperty(spectrumBounds, top);\n return getCenterOffsetOf(componentMinEdge, componentMaxEdge, spectrumMinEdge);\n };\n\n const fireSliderChange$2 = (spectrum, value) => {\n emitWith(spectrum, sliderChangeEvent(), { value });\n };\n const findValueOfOffset$1 = (spectrum, detail, left) => {\n const args = {\n min: minX(detail),\n max: maxX(detail),\n range: xRange(detail),\n value: left,\n step: step(detail),\n snap: snap(detail),\n snapStart: snapStart(detail),\n rounded: rounded(detail),\n hasMinEdge: hasLEdge(detail),\n hasMaxEdge: hasREdge(detail),\n minBound: getMinXBounds(spectrum),\n maxBound: getMaxXBounds(spectrum),\n screenRange: getXScreenRange(spectrum)\n };\n return findValueOf(args);\n };\n const setValueFrom$2 = (spectrum, detail, value) => {\n const xValue = findValueOfOffset$1(spectrum, detail, value);\n const sliderVal = xValue;\n fireSliderChange$2(spectrum, sliderVal);\n return xValue;\n };\n const setToMin$2 = (spectrum, detail) => {\n const min = minX(detail);\n fireSliderChange$2(spectrum, min);\n };\n const setToMax$2 = (spectrum, detail) => {\n const max = maxX(detail);\n fireSliderChange$2(spectrum, max);\n };\n const moveBy$2 = (direction, spectrum, detail, useMultiplier) => {\n const f = direction > 0 ? increaseBy : reduceBy;\n const xValue = f(currentValue(detail), minX(detail), maxX(detail), step(detail, useMultiplier));\n fireSliderChange$2(spectrum, xValue);\n return Optional.some(xValue);\n };\n const handleMovement$2 = direction => (spectrum, detail, useMultiplier) => moveBy$2(direction, spectrum, detail, useMultiplier).map(always);\n const getValueFromEvent$2 = simulatedEvent => {\n const pos = getEventSource(simulatedEvent);\n return pos.map(p => p.left);\n };\n const findOffsetOfValue$1 = (spectrum, detail, value, minEdge, maxEdge) => {\n const minOffset = 0;\n const maxOffset = getXScreenRange(spectrum);\n const centerMinEdge = minEdge.bind(edge => Optional.some(getXCenterOffSetOf(edge, spectrum))).getOr(minOffset);\n const centerMaxEdge = maxEdge.bind(edge => Optional.some(getXCenterOffSetOf(edge, spectrum))).getOr(maxOffset);\n const args = {\n min: minX(detail),\n max: maxX(detail),\n range: xRange(detail),\n value,\n hasMinEdge: hasLEdge(detail),\n hasMaxEdge: hasREdge(detail),\n minBound: getMinXBounds(spectrum),\n minOffset,\n maxBound: getMaxXBounds(spectrum),\n maxOffset,\n centerMinEdge,\n centerMaxEdge\n };\n return findOffsetOfValue$2(args);\n };\n const findPositionOfValue$1 = (slider, spectrum, value, minEdge, maxEdge, detail) => {\n const offset = findOffsetOfValue$1(spectrum, detail, value, minEdge, maxEdge);\n return getMinXBounds(spectrum) - getMinXBounds(slider) + offset;\n };\n const setPositionFromValue$2 = (slider, thumb, detail, edges) => {\n const value = currentValue(detail);\n const pos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value, edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);\n const thumbRadius = get$c(thumb.element) / 2;\n set$8(thumb.element, 'left', pos - thumbRadius + 'px');\n };\n const onLeft$2 = handleMovement$2(-1);\n const onRight$2 = handleMovement$2(1);\n const onUp$2 = Optional.none;\n const onDown$2 = Optional.none;\n const edgeActions$2 = {\n 'top-left': Optional.none(),\n 'top': Optional.none(),\n 'top-right': Optional.none(),\n 'right': Optional.some(setToREdge),\n 'bottom-right': Optional.none(),\n 'bottom': Optional.none(),\n 'bottom-left': Optional.none(),\n 'left': Optional.some(setToLEdge)\n };\n\n var HorizontalModel = /*#__PURE__*/Object.freeze({\n __proto__: null,\n setValueFrom: setValueFrom$2,\n setToMin: setToMin$2,\n setToMax: setToMax$2,\n findValueOfOffset: findValueOfOffset$1,\n getValueFromEvent: getValueFromEvent$2,\n findPositionOfValue: findPositionOfValue$1,\n setPositionFromValue: setPositionFromValue$2,\n onLeft: onLeft$2,\n onRight: onRight$2,\n onUp: onUp$2,\n onDown: onDown$2,\n edgeActions: edgeActions$2\n });\n\n const fireSliderChange$1 = (spectrum, value) => {\n emitWith(spectrum, sliderChangeEvent(), { value });\n };\n const findValueOfOffset = (spectrum, detail, top) => {\n const args = {\n min: minY(detail),\n max: maxY(detail),\n range: yRange(detail),\n value: top,\n step: step(detail),\n snap: snap(detail),\n snapStart: snapStart(detail),\n rounded: rounded(detail),\n hasMinEdge: hasTEdge(detail),\n hasMaxEdge: hasBEdge(detail),\n minBound: getMinYBounds(spectrum),\n maxBound: getMaxYBounds(spectrum),\n screenRange: getYScreenRange(spectrum)\n };\n return findValueOf(args);\n };\n const setValueFrom$1 = (spectrum, detail, value) => {\n const yValue = findValueOfOffset(spectrum, detail, value);\n const sliderVal = yValue;\n fireSliderChange$1(spectrum, sliderVal);\n return yValue;\n };\n const setToMin$1 = (spectrum, detail) => {\n const min = minY(detail);\n fireSliderChange$1(spectrum, min);\n };\n const setToMax$1 = (spectrum, detail) => {\n const max = maxY(detail);\n fireSliderChange$1(spectrum, max);\n };\n const moveBy$1 = (direction, spectrum, detail, useMultiplier) => {\n const f = direction > 0 ? increaseBy : reduceBy;\n const yValue = f(currentValue(detail), minY(detail), maxY(detail), step(detail, useMultiplier));\n fireSliderChange$1(spectrum, yValue);\n return Optional.some(yValue);\n };\n const handleMovement$1 = direction => (spectrum, detail, useMultiplier) => moveBy$1(direction, spectrum, detail, useMultiplier).map(always);\n const getValueFromEvent$1 = simulatedEvent => {\n const pos = getEventSource(simulatedEvent);\n return pos.map(p => {\n return p.top;\n });\n };\n const findOffsetOfValue = (spectrum, detail, value, minEdge, maxEdge) => {\n const minOffset = 0;\n const maxOffset = getYScreenRange(spectrum);\n const centerMinEdge = minEdge.bind(edge => Optional.some(getYCenterOffSetOf(edge, spectrum))).getOr(minOffset);\n const centerMaxEdge = maxEdge.bind(edge => Optional.some(getYCenterOffSetOf(edge, spectrum))).getOr(maxOffset);\n const args = {\n min: minY(detail),\n max: maxY(detail),\n range: yRange(detail),\n value,\n hasMinEdge: hasTEdge(detail),\n hasMaxEdge: hasBEdge(detail),\n minBound: getMinYBounds(spectrum),\n minOffset,\n maxBound: getMaxYBounds(spectrum),\n maxOffset,\n centerMinEdge,\n centerMaxEdge\n };\n return findOffsetOfValue$2(args);\n };\n const findPositionOfValue = (slider, spectrum, value, minEdge, maxEdge, detail) => {\n const offset = findOffsetOfValue(spectrum, detail, value, minEdge, maxEdge);\n return getMinYBounds(spectrum) - getMinYBounds(slider) + offset;\n };\n const setPositionFromValue$1 = (slider, thumb, detail, edges) => {\n const value = currentValue(detail);\n const pos = findPositionOfValue(slider, edges.getSpectrum(slider), value, edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);\n const thumbRadius = get$d(thumb.element) / 2;\n set$8(thumb.element, 'top', pos - thumbRadius + 'px');\n };\n const onLeft$1 = Optional.none;\n const onRight$1 = Optional.none;\n const onUp$1 = handleMovement$1(-1);\n const onDown$1 = handleMovement$1(1);\n const edgeActions$1 = {\n 'top-left': Optional.none(),\n 'top': Optional.some(setToTEdge),\n 'top-right': Optional.none(),\n 'right': Optional.none(),\n 'bottom-right': Optional.none(),\n 'bottom': Optional.some(setToBEdge),\n 'bottom-left': Optional.none(),\n 'left': Optional.none()\n };\n\n var VerticalModel = /*#__PURE__*/Object.freeze({\n __proto__: null,\n setValueFrom: setValueFrom$1,\n setToMin: setToMin$1,\n setToMax: setToMax$1,\n findValueOfOffset: findValueOfOffset,\n getValueFromEvent: getValueFromEvent$1,\n findPositionOfValue: findPositionOfValue,\n setPositionFromValue: setPositionFromValue$1,\n onLeft: onLeft$1,\n onRight: onRight$1,\n onUp: onUp$1,\n onDown: onDown$1,\n edgeActions: edgeActions$1\n });\n\n const fireSliderChange = (spectrum, value) => {\n emitWith(spectrum, sliderChangeEvent(), { value });\n };\n const sliderValue = (x, y) => ({\n x,\n y\n });\n const setValueFrom = (spectrum, detail, value) => {\n const xValue = findValueOfOffset$1(spectrum, detail, value.left);\n const yValue = findValueOfOffset(spectrum, detail, value.top);\n const val = sliderValue(xValue, yValue);\n fireSliderChange(spectrum, val);\n return val;\n };\n const moveBy = (direction, isVerticalMovement, spectrum, detail, useMultiplier) => {\n const f = direction > 0 ? increaseBy : reduceBy;\n const xValue = isVerticalMovement ? currentValue(detail).x : f(currentValue(detail).x, minX(detail), maxX(detail), step(detail, useMultiplier));\n const yValue = !isVerticalMovement ? currentValue(detail).y : f(currentValue(detail).y, minY(detail), maxY(detail), step(detail, useMultiplier));\n fireSliderChange(spectrum, sliderValue(xValue, yValue));\n return Optional.some(xValue);\n };\n const handleMovement = (direction, isVerticalMovement) => (spectrum, detail, useMultiplier) => moveBy(direction, isVerticalMovement, spectrum, detail, useMultiplier).map(always);\n const setToMin = (spectrum, detail) => {\n const mX = minX(detail);\n const mY = minY(detail);\n fireSliderChange(spectrum, sliderValue(mX, mY));\n };\n const setToMax = (spectrum, detail) => {\n const mX = maxX(detail);\n const mY = maxY(detail);\n fireSliderChange(spectrum, sliderValue(mX, mY));\n };\n const getValueFromEvent = simulatedEvent => getEventSource(simulatedEvent);\n const setPositionFromValue = (slider, thumb, detail, edges) => {\n const value = currentValue(detail);\n const xPos = findPositionOfValue$1(slider, edges.getSpectrum(slider), value.x, edges.getLeftEdge(slider), edges.getRightEdge(slider), detail);\n const yPos = findPositionOfValue(slider, edges.getSpectrum(slider), value.y, edges.getTopEdge(slider), edges.getBottomEdge(slider), detail);\n const thumbXRadius = get$c(thumb.element) / 2;\n const thumbYRadius = get$d(thumb.element) / 2;\n set$8(thumb.element, 'left', xPos - thumbXRadius + 'px');\n set$8(thumb.element, 'top', yPos - thumbYRadius + 'px');\n };\n const onLeft = handleMovement(-1, false);\n const onRight = handleMovement(1, false);\n const onUp = handleMovement(-1, true);\n const onDown = handleMovement(1, true);\n const edgeActions = {\n 'top-left': Optional.some(setToTLEdgeXY),\n 'top': Optional.some(setToTEdgeXY),\n 'top-right': Optional.some(setToTREdgeXY),\n 'right': Optional.some(setToREdgeXY),\n 'bottom-right': Optional.some(setToBREdgeXY),\n 'bottom': Optional.some(setToBEdgeXY),\n 'bottom-left': Optional.some(setToBLEdgeXY),\n 'left': Optional.some(setToLEdgeXY)\n };\n\n var TwoDModel = /*#__PURE__*/Object.freeze({\n __proto__: null,\n setValueFrom: setValueFrom,\n setToMin: setToMin,\n setToMax: setToMax,\n getValueFromEvent: getValueFromEvent,\n setPositionFromValue: setPositionFromValue,\n onLeft: onLeft,\n onRight: onRight,\n onUp: onUp,\n onDown: onDown,\n edgeActions: edgeActions\n });\n\n const SliderSchema = [\n defaulted('stepSize', 1),\n defaulted('speedMultiplier', 10),\n defaulted('onChange', noop),\n defaulted('onChoose', noop),\n defaulted('onInit', noop),\n defaulted('onDragStart', noop),\n defaulted('onDragEnd', noop),\n defaulted('snapToGrid', false),\n defaulted('rounded', true),\n option$3('snapStart'),\n requiredOf('model', choose$1('mode', {\n x: [\n defaulted('minX', 0),\n defaulted('maxX', 100),\n customField('value', spec => Cell(spec.mode.minX)),\n required$1('getInitialValue'),\n output$1('manager', HorizontalModel)\n ],\n y: [\n defaulted('minY', 0),\n defaulted('maxY', 100),\n customField('value', spec => Cell(spec.mode.minY)),\n required$1('getInitialValue'),\n output$1('manager', VerticalModel)\n ],\n xy: [\n defaulted('minX', 0),\n defaulted('maxX', 100),\n defaulted('minY', 0),\n defaulted('maxY', 100),\n customField('value', spec => Cell({\n x: spec.mode.minX,\n y: spec.mode.minY\n })),\n required$1('getInitialValue'),\n output$1('manager', TwoDModel)\n ]\n })),\n field('sliderBehaviours', [\n Keying,\n Representing\n ]),\n customField('mouseIsDown', () => Cell(false))\n ];\n\n const sketch$2 = (detail, components, _spec, _externals) => {\n const getThumb = component => getPartOrDie(component, detail, 'thumb');\n const getSpectrum = component => getPartOrDie(component, detail, 'spectrum');\n const getLeftEdge = component => getPart(component, detail, 'left-edge');\n const getRightEdge = component => getPart(component, detail, 'right-edge');\n const getTopEdge = component => getPart(component, detail, 'top-edge');\n const getBottomEdge = component => getPart(component, detail, 'bottom-edge');\n const modelDetail = detail.model;\n const model = modelDetail.manager;\n const refresh = (slider, thumb) => {\n model.setPositionFromValue(slider, thumb, detail, {\n getLeftEdge,\n getRightEdge,\n getTopEdge,\n getBottomEdge,\n getSpectrum\n });\n };\n const setValue = (slider, newValue) => {\n modelDetail.value.set(newValue);\n const thumb = getThumb(slider);\n refresh(slider, thumb);\n };\n const changeValue = (slider, newValue) => {\n setValue(slider, newValue);\n const thumb = getThumb(slider);\n detail.onChange(slider, thumb, newValue);\n return Optional.some(true);\n };\n const resetToMin = slider => {\n model.setToMin(slider, detail);\n };\n const resetToMax = slider => {\n model.setToMax(slider, detail);\n };\n const choose = slider => {\n const fireOnChoose = () => {\n getPart(slider, detail, 'thumb').each(thumb => {\n const value = modelDetail.value.get();\n detail.onChoose(slider, thumb, value);\n });\n };\n const wasDown = detail.mouseIsDown.get();\n detail.mouseIsDown.set(false);\n if (wasDown) {\n fireOnChoose();\n }\n };\n const onDragStart = (slider, simulatedEvent) => {\n simulatedEvent.stop();\n detail.mouseIsDown.set(true);\n detail.onDragStart(slider, getThumb(slider));\n };\n const onDragEnd = (slider, simulatedEvent) => {\n simulatedEvent.stop();\n detail.onDragEnd(slider, getThumb(slider));\n choose(slider);\n };\n const focusWidget = component => {\n getPart(component, detail, 'spectrum').map(Keying.focusIn);\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: augment(detail.sliderBehaviours, [\n Keying.config({\n mode: 'special',\n focusIn: focusWidget\n }),\n Representing.config({\n store: {\n mode: 'manual',\n getValue: _ => {\n return modelDetail.value.get();\n },\n setValue\n }\n }),\n Receiving.config({ channels: { [mouseReleased()]: { onReceive: choose } } })\n ]),\n events: derive$2([\n run$1(sliderChangeEvent(), (slider, simulatedEvent) => {\n changeValue(slider, simulatedEvent.event.value);\n }),\n runOnAttached((slider, _simulatedEvent) => {\n const getInitial = modelDetail.getInitialValue();\n modelDetail.value.set(getInitial);\n const thumb = getThumb(slider);\n refresh(slider, thumb);\n const spectrum = getSpectrum(slider);\n detail.onInit(slider, thumb, spectrum, modelDetail.value.get());\n }),\n run$1(touchstart(), onDragStart),\n run$1(touchend(), onDragEnd),\n run$1(mousedown(), (component, event) => {\n focusWidget(component);\n onDragStart(component, event);\n }),\n run$1(mouseup(), onDragEnd)\n ]),\n apis: {\n resetToMin,\n resetToMax,\n setValue,\n refresh\n },\n domModification: { styles: { position: 'relative' } }\n };\n };\n\n const Slider = composite({\n name: 'Slider',\n configFields: SliderSchema,\n partFields: SliderParts,\n factory: sketch$2,\n apis: {\n setValue: (apis, slider, value) => {\n apis.setValue(slider, value);\n },\n resetToMin: (apis, slider) => {\n apis.resetToMin(slider);\n },\n resetToMax: (apis, slider) => {\n apis.resetToMax(slider);\n },\n refresh: (apis, slider) => {\n apis.refresh(slider);\n }\n }\n });\n\n const fieldsUpdate = generate$6('rgb-hex-update');\n const sliderUpdate = generate$6('slider-update');\n const paletteUpdate = generate$6('palette-update');\n\n const sliderFactory = (translate, getClass) => {\n const spectrum = Slider.parts.spectrum({\n dom: {\n tag: 'div',\n classes: [getClass('hue-slider-spectrum')],\n attributes: { role: 'presentation' }\n }\n });\n const thumb = Slider.parts.thumb({\n dom: {\n tag: 'div',\n classes: [getClass('hue-slider-thumb')],\n attributes: { role: 'presentation' }\n }\n });\n return Slider.sketch({\n dom: {\n tag: 'div',\n classes: [getClass('hue-slider')],\n attributes: {\n 'role': 'slider',\n 'aria-valuemin': 0,\n 'aria-valuemax': 360,\n 'aria-valuenow': 120\n }\n },\n rounded: false,\n model: {\n mode: 'y',\n getInitialValue: constant$1(0)\n },\n components: [\n spectrum,\n thumb\n ],\n sliderBehaviours: derive$1([Focusing.config({})]),\n onChange: (slider, _thumb, value) => {\n set$9(slider.element, 'aria-valuenow', Math.floor(360 - value * 3.6));\n emitWith(slider, sliderUpdate, { value });\n }\n });\n };\n\n const owner$1 = 'form';\n const schema$i = [field('formBehaviours', [Representing])];\n const getPartName$1 = name => '<alloy.field.' + name + '>';\n const sketch$1 = fSpec => {\n const parts = (() => {\n const record = [];\n const field = (name, config) => {\n record.push(name);\n return generateOne$1(owner$1, getPartName$1(name), config);\n };\n return {\n field,\n record: constant$1(record)\n };\n })();\n const spec = fSpec(parts);\n const partNames = parts.record();\n const fieldParts = map$2(partNames, n => required({\n name: n,\n pname: getPartName$1(n)\n }));\n return composite$1(owner$1, schema$i, fieldParts, make$4, spec);\n };\n const toResult = (o, e) => o.fold(() => Result.error(e), Result.value);\n const make$4 = (detail, components) => ({\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: augment(detail.formBehaviours, [Representing.config({\n store: {\n mode: 'manual',\n getValue: form => {\n const resPs = getAllParts(form, detail);\n return map$1(resPs, (resPThunk, pName) => resPThunk().bind(v => {\n const opt = Composing.getCurrent(v);\n return toResult(opt, new Error(`Cannot find a current component to extract the value from for form part '${ pName }': ` + element(v.element)));\n }).map(Representing.getValue));\n },\n setValue: (form, values) => {\n each(values, (newValue, key) => {\n getPart(form, detail, key).each(wrapper => {\n Composing.getCurrent(wrapper).each(field => {\n Representing.setValue(field, newValue);\n });\n });\n });\n }\n }\n })]),\n apis: {\n getField: (form, key) => {\n return getPart(form, detail, key).bind(Composing.getCurrent);\n }\n }\n });\n const Form = {\n getField: makeApi((apis, component, key) => apis.getField(component, key)),\n sketch: sketch$1\n };\n\n const validInput = generate$6('valid-input');\n const invalidInput = generate$6('invalid-input');\n const validatingInput = generate$6('validating-input');\n const translatePrefix = 'colorcustom.rgb.';\n const rgbFormFactory = (translate, getClass, onValidHexx, onInvalidHexx) => {\n const invalidation = (label, isValid) => Invalidating.config({\n invalidClass: getClass('invalid'),\n notify: {\n onValidate: comp => {\n emitWith(comp, validatingInput, { type: label });\n },\n onValid: comp => {\n emitWith(comp, validInput, {\n type: label,\n value: Representing.getValue(comp)\n });\n },\n onInvalid: comp => {\n emitWith(comp, invalidInput, {\n type: label,\n value: Representing.getValue(comp)\n });\n }\n },\n validator: {\n validate: comp => {\n const value = Representing.getValue(comp);\n const res = isValid(value) ? Result.value(true) : Result.error(translate('aria.input.invalid'));\n return Future.pure(res);\n },\n validateOnLoad: false\n }\n });\n const renderTextField = (isValid, name, label, description, data) => {\n const helptext = translate(translatePrefix + 'range');\n const pLabel = FormField.parts.label({\n dom: {\n tag: 'label',\n attributes: { 'aria-label': description }\n },\n components: [text$2(label)]\n });\n const pField = FormField.parts.field({\n data,\n factory: Input,\n inputAttributes: {\n type: 'text',\n ...name === 'hex' ? { 'aria-live': 'polite' } : {}\n },\n inputClasses: [getClass('textfield')],\n inputBehaviours: derive$1([\n invalidation(name, isValid),\n Tabstopping.config({})\n ]),\n onSetValue: input => {\n if (Invalidating.isInvalid(input)) {\n const run = Invalidating.run(input);\n run.get(noop);\n }\n }\n });\n const comps = [\n pLabel,\n pField\n ];\n const concats = name !== 'hex' ? [FormField.parts['aria-descriptor']({ text: helptext })] : [];\n const components = comps.concat(concats);\n return {\n dom: {\n tag: 'div',\n attributes: { role: 'presentation' }\n },\n components\n };\n };\n const copyRgbToHex = (form, rgba) => {\n const hex = fromRgba(rgba);\n Form.getField(form, 'hex').each(hexField => {\n if (!Focusing.isFocused(hexField)) {\n Representing.setValue(form, { hex: hex.value });\n }\n });\n return hex;\n };\n const copyRgbToForm = (form, rgb) => {\n const red = rgb.red;\n const green = rgb.green;\n const blue = rgb.blue;\n Representing.setValue(form, {\n red,\n green,\n blue\n });\n };\n const memPreview = record({\n dom: {\n tag: 'div',\n classes: [getClass('rgba-preview')],\n styles: { 'background-color': 'white' },\n attributes: { role: 'presentation' }\n }\n });\n const updatePreview = (anyInSystem, hex) => {\n memPreview.getOpt(anyInSystem).each(preview => {\n set$8(preview.element, 'background-color', '#' + hex.value);\n });\n };\n const factory = () => {\n const state = {\n red: Cell(Optional.some(255)),\n green: Cell(Optional.some(255)),\n blue: Cell(Optional.some(255)),\n hex: Cell(Optional.some('ffffff'))\n };\n const copyHexToRgb = (form, hex) => {\n const rgb = fromHex(hex);\n copyRgbToForm(form, rgb);\n setValueRgb(rgb);\n };\n const get = prop => state[prop].get();\n const set = (prop, value) => {\n state[prop].set(value);\n };\n const getValueRgb = () => get('red').bind(red => get('green').bind(green => get('blue').map(blue => rgbaColour(red, green, blue, 1))));\n const setValueRgb = rgb => {\n const red = rgb.red;\n const green = rgb.green;\n const blue = rgb.blue;\n set('red', Optional.some(red));\n set('green', Optional.some(green));\n set('blue', Optional.some(blue));\n };\n const onInvalidInput = (form, simulatedEvent) => {\n const data = simulatedEvent.event;\n if (data.type !== 'hex') {\n set(data.type, Optional.none());\n } else {\n onInvalidHexx(form);\n }\n };\n const onValidHex = (form, value) => {\n onValidHexx(form);\n const hex = hexColour(value);\n set('hex', Optional.some(hex.value));\n const rgb = fromHex(hex);\n copyRgbToForm(form, rgb);\n setValueRgb(rgb);\n emitWith(form, fieldsUpdate, { hex });\n updatePreview(form, hex);\n };\n const onValidRgb = (form, prop, value) => {\n const val = parseInt(value, 10);\n set(prop, Optional.some(val));\n getValueRgb().each(rgb => {\n const hex = copyRgbToHex(form, rgb);\n emitWith(form, fieldsUpdate, { hex });\n updatePreview(form, hex);\n });\n };\n const isHexInputEvent = data => data.type === 'hex';\n const onValidInput = (form, simulatedEvent) => {\n const data = simulatedEvent.event;\n if (isHexInputEvent(data)) {\n onValidHex(form, data.value);\n } else {\n onValidRgb(form, data.type, data.value);\n }\n };\n const formPartStrings = key => ({\n label: translate(translatePrefix + key + '.label'),\n description: translate(translatePrefix + key + '.description')\n });\n const redStrings = formPartStrings('red');\n const greenStrings = formPartStrings('green');\n const blueStrings = formPartStrings('blue');\n const hexStrings = formPartStrings('hex');\n return deepMerge(Form.sketch(parts => ({\n dom: {\n tag: 'form',\n classes: [getClass('rgb-form')],\n attributes: { 'aria-label': translate('aria.color.picker') }\n },\n components: [\n parts.field('red', FormField.sketch(renderTextField(isRgbaComponent, 'red', redStrings.label, redStrings.description, 255))),\n parts.field('green', FormField.sketch(renderTextField(isRgbaComponent, 'green', greenStrings.label, greenStrings.description, 255))),\n parts.field('blue', FormField.sketch(renderTextField(isRgbaComponent, 'blue', blueStrings.label, blueStrings.description, 255))),\n parts.field('hex', FormField.sketch(renderTextField(isHexString, 'hex', hexStrings.label, hexStrings.description, 'ffffff'))),\n memPreview.asSpec()\n ],\n formBehaviours: derive$1([\n Invalidating.config({ invalidClass: getClass('form-invalid') }),\n config('rgb-form-events', [\n run$1(validInput, onValidInput),\n run$1(invalidInput, onInvalidInput),\n run$1(validatingInput, onInvalidInput)\n ])\n ])\n })), {\n apis: {\n updateHex: (form, hex) => {\n Representing.setValue(form, { hex: hex.value });\n copyHexToRgb(form, hex);\n updatePreview(form, hex);\n }\n }\n });\n };\n const rgbFormSketcher = single({\n factory,\n name: 'RgbForm',\n configFields: [],\n apis: {\n updateHex: (apis, form, hex) => {\n apis.updateHex(form, hex);\n }\n },\n extraApis: {}\n });\n return rgbFormSketcher;\n };\n\n const paletteFactory = (translate, getClass) => {\n const spectrumPart = Slider.parts.spectrum({\n dom: {\n tag: 'canvas',\n attributes: { role: 'presentation' },\n classes: [getClass('sv-palette-spectrum')]\n }\n });\n const thumbPart = Slider.parts.thumb({\n dom: {\n tag: 'div',\n attributes: { role: 'presentation' },\n classes: [getClass('sv-palette-thumb')],\n innerHtml: `<div class=${ getClass('sv-palette-inner-thumb') } role=\"presentation\"></div>`\n }\n });\n const setColour = (canvas, rgba) => {\n const {width, height} = canvas;\n const ctx = canvas.getContext('2d');\n if (ctx === null) {\n return;\n }\n ctx.fillStyle = rgba;\n ctx.fillRect(0, 0, width, height);\n const grdWhite = ctx.createLinearGradient(0, 0, width, 0);\n grdWhite.addColorStop(0, 'rgba(255,255,255,1)');\n grdWhite.addColorStop(1, 'rgba(255,255,255,0)');\n ctx.fillStyle = grdWhite;\n ctx.fillRect(0, 0, width, height);\n const grdBlack = ctx.createLinearGradient(0, 0, 0, height);\n grdBlack.addColorStop(0, 'rgba(0,0,0,0)');\n grdBlack.addColorStop(1, 'rgba(0,0,0,1)');\n ctx.fillStyle = grdBlack;\n ctx.fillRect(0, 0, width, height);\n };\n const setPaletteHue = (slider, hue) => {\n const canvas = slider.components()[0].element.dom;\n const hsv = hsvColour(hue, 100, 100);\n const rgba = fromHsv(hsv);\n setColour(canvas, toString(rgba));\n };\n const setPaletteThumb = (slider, hex) => {\n const hsv = fromRgb(fromHex(hex));\n Slider.setValue(slider, {\n x: hsv.saturation,\n y: 100 - hsv.value\n });\n set$9(slider.element, 'aria-valuetext', translate([\n 'Saturation {0}%, Brightness {1}%',\n hsv.saturation,\n hsv.value\n ]));\n };\n const factory = _detail => {\n const getInitialValue = constant$1({\n x: 0,\n y: 0\n });\n const onChange = (slider, _thumb, value) => {\n if (!isNumber(value)) {\n set$9(slider.element, 'aria-valuetext', translate([\n 'Saturation {0}%, Brightness {1}%',\n Math.floor(value.x),\n Math.floor(100 - value.y)\n ]));\n }\n emitWith(slider, paletteUpdate, { value });\n };\n const onInit = (_slider, _thumb, spectrum, _value) => {\n setColour(spectrum.element.dom, toString(red));\n };\n const sliderBehaviours = derive$1([\n Composing.config({ find: Optional.some }),\n Focusing.config({})\n ]);\n return Slider.sketch({\n dom: {\n tag: 'div',\n attributes: {\n 'role': 'slider',\n 'aria-valuetext': translate([\n 'Saturation {0}%, Brightness {1}%',\n 0,\n 0\n ])\n },\n classes: [getClass('sv-palette')]\n },\n model: {\n mode: 'xy',\n getInitialValue\n },\n rounded: false,\n components: [\n spectrumPart,\n thumbPart\n ],\n onChange,\n onInit,\n sliderBehaviours\n });\n };\n const saturationBrightnessPaletteSketcher = single({\n factory,\n name: 'SaturationBrightnessPalette',\n configFields: [],\n apis: {\n setHue: (_apis, slider, hue) => {\n setPaletteHue(slider, hue);\n },\n setThumb: (_apis, slider, hex) => {\n setPaletteThumb(slider, hex);\n }\n },\n extraApis: {}\n });\n return saturationBrightnessPaletteSketcher;\n };\n\n const makeFactory = (translate, getClass) => {\n const factory = detail => {\n const rgbForm = rgbFormFactory(translate, getClass, detail.onValidHex, detail.onInvalidHex);\n const sbPalette = paletteFactory(translate, getClass);\n const hueSliderToDegrees = hue => (100 - hue) / 100 * 360;\n const hueDegreesToSlider = hue => 100 - hue / 360 * 100;\n const state = {\n paletteRgba: Cell(red),\n paletteHue: Cell(0)\n };\n const memSlider = record(sliderFactory(translate, getClass));\n const memPalette = record(sbPalette.sketch({}));\n const memRgb = record(rgbForm.sketch({}));\n const updatePalette = (anyInSystem, _hex, hue) => {\n memPalette.getOpt(anyInSystem).each(palette => {\n sbPalette.setHue(palette, hue);\n });\n };\n const updateFields = (anyInSystem, hex) => {\n memRgb.getOpt(anyInSystem).each(form => {\n rgbForm.updateHex(form, hex);\n });\n };\n const updateSlider = (anyInSystem, _hex, hue) => {\n memSlider.getOpt(anyInSystem).each(slider => {\n Slider.setValue(slider, hueDegreesToSlider(hue));\n });\n };\n const updatePaletteThumb = (anyInSystem, hex) => {\n memPalette.getOpt(anyInSystem).each(palette => {\n sbPalette.setThumb(palette, hex);\n });\n };\n const updateState = (hex, hue) => {\n const rgba = fromHex(hex);\n state.paletteRgba.set(rgba);\n state.paletteHue.set(hue);\n };\n const runUpdates = (anyInSystem, hex, hue, updates) => {\n updateState(hex, hue);\n each$1(updates, update => {\n update(anyInSystem, hex, hue);\n });\n };\n const onPaletteUpdate = () => {\n const updates = [updateFields];\n return (form, simulatedEvent) => {\n const value = simulatedEvent.event.value;\n const oldHue = state.paletteHue.get();\n const newHsv = hsvColour(oldHue, value.x, 100 - value.y);\n const newHex = hsvToHex(newHsv);\n runUpdates(form, newHex, oldHue, updates);\n };\n };\n const onSliderUpdate = () => {\n const updates = [\n updatePalette,\n updateFields\n ];\n return (form, simulatedEvent) => {\n const hue = hueSliderToDegrees(simulatedEvent.event.value);\n const oldRgb = state.paletteRgba.get();\n const oldHsv = fromRgb(oldRgb);\n const newHsv = hsvColour(hue, oldHsv.saturation, oldHsv.value);\n const newHex = hsvToHex(newHsv);\n runUpdates(form, newHex, hue, updates);\n };\n };\n const onFieldsUpdate = () => {\n const updates = [\n updatePalette,\n updateSlider,\n updatePaletteThumb\n ];\n return (form, simulatedEvent) => {\n const hex = simulatedEvent.event.hex;\n const hsv = hexToHsv(hex);\n runUpdates(form, hex, hsv.hue, updates);\n };\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components: [\n memPalette.asSpec(),\n memSlider.asSpec(),\n memRgb.asSpec()\n ],\n behaviours: derive$1([\n config('colour-picker-events', [\n run$1(fieldsUpdate, onFieldsUpdate()),\n run$1(paletteUpdate, onPaletteUpdate()),\n run$1(sliderUpdate, onSliderUpdate())\n ]),\n Composing.config({ find: comp => memRgb.getOpt(comp) }),\n Keying.config({ mode: 'acyclic' })\n ])\n };\n };\n const colourPickerSketcher = single({\n name: 'ColourPicker',\n configFields: [\n required$1('dom'),\n defaulted('onValidHex', noop),\n defaulted('onInvalidHex', noop)\n ],\n factory\n });\n return colourPickerSketcher;\n };\n\n const self = () => Composing.config({ find: Optional.some });\n const memento$1 = mem => Composing.config({ find: mem.getOpt });\n const childAt = index => Composing.config({ find: comp => child$2(comp.element, index).bind(element => comp.getSystem().getByDom(element).toOptional()) });\n const ComposingConfigs = {\n self,\n memento: memento$1,\n childAt\n };\n\n const processors = objOf([\n defaulted('preprocess', identity),\n defaulted('postprocess', identity)\n ]);\n const memento = (mem, rawProcessors) => {\n const ps = asRawOrDie$1('RepresentingConfigs.memento processors', processors, rawProcessors);\n return Representing.config({\n store: {\n mode: 'manual',\n getValue: comp => {\n const other = mem.get(comp);\n const rawValue = Representing.getValue(other);\n return ps.postprocess(rawValue);\n },\n setValue: (comp, rawValue) => {\n const newValue = ps.preprocess(rawValue);\n const other = mem.get(comp);\n Representing.setValue(other, newValue);\n }\n }\n });\n };\n const withComp = (optInitialValue, getter, setter) => Representing.config({\n store: {\n mode: 'manual',\n ...optInitialValue.map(initialValue => ({ initialValue })).getOr({}),\n getValue: getter,\n setValue: setter\n }\n });\n const withElement = (initialValue, getter, setter) => withComp(initialValue, c => getter(c.element), (c, v) => setter(c.element, v));\n const domHtml = optInitialValue => withElement(optInitialValue, get$9, set$6);\n const memory = initialValue => Representing.config({\n store: {\n mode: 'memory',\n initialValue\n }\n });\n\n const english = {\n 'colorcustom.rgb.red.label': 'R',\n 'colorcustom.rgb.red.description': 'Red component',\n 'colorcustom.rgb.green.label': 'G',\n 'colorcustom.rgb.green.description': 'Green component',\n 'colorcustom.rgb.blue.label': 'B',\n 'colorcustom.rgb.blue.description': 'Blue component',\n 'colorcustom.rgb.hex.label': '#',\n 'colorcustom.rgb.hex.description': 'Hex color code',\n 'colorcustom.rgb.range': 'Range 0 to 255',\n 'aria.color.picker': 'Color Picker',\n 'aria.input.invalid': 'Invalid input'\n };\n const translate$1 = providerBackstage => key => {\n if (isString(key)) {\n return providerBackstage.translate(english[key]);\n } else {\n return providerBackstage.translate(key);\n }\n };\n const renderColorPicker = (_spec, providerBackstage, initialData) => {\n const getClass = key => 'tox-' + key;\n const colourPickerFactory = makeFactory(translate$1(providerBackstage), getClass);\n const onValidHex = form => {\n emitWith(form, formActionEvent, {\n name: 'hex-valid',\n value: true\n });\n };\n const onInvalidHex = form => {\n emitWith(form, formActionEvent, {\n name: 'hex-valid',\n value: false\n });\n };\n const memPicker = record(colourPickerFactory.sketch({\n dom: {\n tag: 'div',\n classes: [getClass('color-picker-container')],\n attributes: { role: 'presentation' }\n },\n onValidHex,\n onInvalidHex\n }));\n return {\n dom: { tag: 'div' },\n components: [memPicker.asSpec()],\n behaviours: derive$1([\n withComp(initialData, comp => {\n const picker = memPicker.get(comp);\n const optRgbForm = Composing.getCurrent(picker);\n const optHex = optRgbForm.bind(rgbForm => {\n const formValues = Representing.getValue(rgbForm);\n return formValues.hex;\n });\n return optHex.map(hex => '#' + removeLeading(hex, '#')).getOr('');\n }, (comp, newValue) => {\n const pattern = /^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/;\n const valOpt = Optional.from(pattern.exec(newValue)).bind(matches => get$h(matches, 1));\n const picker = memPicker.get(comp);\n const optRgbForm = Composing.getCurrent(picker);\n optRgbForm.fold(() => {\n console.log('Can not find form');\n }, rgbForm => {\n Representing.setValue(rgbForm, { hex: valOpt.getOr('') });\n Form.getField(rgbForm, 'hex').each(hexField => {\n emit(hexField, input());\n });\n });\n }),\n ComposingConfigs.self()\n ])\n };\n };\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.Resource');\n\n const isOldCustomEditor = spec => has$2(spec, 'init');\n const renderCustomEditor = spec => {\n const editorApi = value$2();\n const memReplaced = record({ dom: { tag: spec.tag } });\n const initialValue = value$2();\n return {\n dom: {\n tag: 'div',\n classes: ['tox-custom-editor']\n },\n behaviours: derive$1([\n config('custom-editor-events', [runOnAttached(component => {\n memReplaced.getOpt(component).each(ta => {\n (isOldCustomEditor(spec) ? spec.init(ta.element.dom) : global$2.load(spec.scriptId, spec.scriptUrl).then(init => init(ta.element.dom, spec.settings))).then(ea => {\n initialValue.on(cvalue => {\n ea.setValue(cvalue);\n });\n initialValue.clear();\n editorApi.set(ea);\n });\n });\n })]),\n withComp(Optional.none(), () => editorApi.get().fold(() => initialValue.get().getOr(''), ed => ed.getValue()), (component, value) => {\n editorApi.get().fold(() => initialValue.set(value), ed => ed.setValue(value));\n }),\n ComposingConfigs.self()\n ]),\n components: [memReplaced.asSpec()]\n };\n };\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const filterByExtension = (files, providersBackstage) => {\n const allowedImageFileTypes = global$1.explode(providersBackstage.getOption('images_file_types'));\n const isFileInAllowedTypes = file => exists(allowedImageFileTypes, type => endsWith(file.name.toLowerCase(), `.${ type.toLowerCase() }`));\n return filter$2(from(files), isFileInAllowedTypes);\n };\n const renderDropZone = (spec, providersBackstage, initialData) => {\n const stopper = (_, se) => {\n se.stop();\n };\n const sequence = actions => (comp, se) => {\n each$1(actions, a => {\n a(comp, se);\n });\n };\n const onDrop = (comp, se) => {\n var _a;\n if (!Disabling.isDisabled(comp)) {\n const transferEvent = se.event.raw;\n handleFiles(comp, (_a = transferEvent.dataTransfer) === null || _a === void 0 ? void 0 : _a.files);\n }\n };\n const onSelect = (component, simulatedEvent) => {\n const input = simulatedEvent.event.raw.target;\n handleFiles(component, input.files);\n };\n const handleFiles = (component, files) => {\n if (files) {\n Representing.setValue(component, filterByExtension(files, providersBackstage));\n emitWith(component, formChangeEvent, { name: spec.name });\n }\n };\n const memInput = record({\n dom: {\n tag: 'input',\n attributes: {\n type: 'file',\n accept: 'image/*'\n },\n styles: { display: 'none' }\n },\n behaviours: derive$1([config('input-file-events', [\n cutter(click()),\n cutter(tap())\n ])])\n });\n const renderField = s => ({\n uid: s.uid,\n dom: {\n tag: 'div',\n classes: ['tox-dropzone-container']\n },\n behaviours: derive$1([\n memory(initialData.getOr([])),\n ComposingConfigs.self(),\n Disabling.config({}),\n Toggling.config({\n toggleClass: 'dragenter',\n toggleOnExecute: false\n }),\n config('dropzone-events', [\n run$1('dragenter', sequence([\n stopper,\n Toggling.toggle\n ])),\n run$1('dragleave', sequence([\n stopper,\n Toggling.toggle\n ])),\n run$1('dragover', stopper),\n run$1('drop', sequence([\n stopper,\n onDrop\n ])),\n run$1(change(), onSelect)\n ])\n ]),\n components: [{\n dom: {\n tag: 'div',\n classes: ['tox-dropzone'],\n styles: {}\n },\n components: [\n {\n dom: { tag: 'p' },\n components: [text$2(providersBackstage.translate('Drop an image here'))]\n },\n Button.sketch({\n dom: {\n tag: 'button',\n styles: { position: 'relative' },\n classes: [\n 'tox-button',\n 'tox-button--secondary'\n ]\n },\n components: [\n text$2(providersBackstage.translate('Browse for an image')),\n memInput.asSpec()\n ],\n action: comp => {\n const inputComp = memInput.get(comp);\n inputComp.element.dom.click();\n },\n buttonBehaviours: derive$1([\n Tabstopping.config({}),\n DisablingConfigs.button(providersBackstage.isDisabled),\n receivingConfig()\n ])\n })\n ]\n }]\n });\n const pLabel = spec.label.map(label => renderLabel$3(label, providersBackstage));\n const pField = FormField.parts.field({ factory: { sketch: renderField } });\n return renderFormFieldWith(pLabel, pField, ['tox-form__group--stretched'], []);\n };\n\n const renderGrid = (spec, backstage) => ({\n dom: {\n tag: 'div',\n classes: [\n 'tox-form__grid',\n `tox-form__grid--${ spec.columns }col`\n ]\n },\n components: map$2(spec.items, backstage.interpreter)\n });\n\n const adaptable = (fn, rate) => {\n let timer = null;\n let args = null;\n const cancel = () => {\n if (!isNull(timer)) {\n clearTimeout(timer);\n timer = null;\n args = null;\n }\n };\n const throttle = (...newArgs) => {\n args = newArgs;\n if (isNull(timer)) {\n timer = setTimeout(() => {\n const tempArgs = args;\n timer = null;\n args = null;\n fn.apply(null, tempArgs);\n }, rate);\n }\n };\n return {\n cancel,\n throttle\n };\n };\n const first = (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 if (isNull(timer)) {\n timer = setTimeout(() => {\n timer = null;\n fn.apply(null, args);\n }, rate);\n }\n };\n return {\n cancel,\n throttle\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 beforeObject = generate$6('alloy-fake-before-tabstop');\n const afterObject = generate$6('alloy-fake-after-tabstop');\n const craftWithClasses = classes => {\n return {\n dom: {\n tag: 'div',\n styles: {\n width: '1px',\n height: '1px',\n outline: 'none'\n },\n attributes: { tabindex: '0' },\n classes\n },\n behaviours: derive$1([\n Focusing.config({ ignore: true }),\n Tabstopping.config({})\n ])\n };\n };\n const craft = (containerClasses, spec) => {\n return {\n dom: {\n tag: 'div',\n classes: [\n 'tox-navobj',\n ...containerClasses.getOr([])\n ]\n },\n components: [\n craftWithClasses([beforeObject]),\n spec,\n craftWithClasses([afterObject])\n ],\n behaviours: derive$1([ComposingConfigs.childAt(1)])\n };\n };\n const triggerTab = (placeholder, shiftKey) => {\n emitWith(placeholder, keydown(), {\n raw: {\n which: 9,\n shiftKey\n }\n });\n };\n const onFocus = (container, targetComp) => {\n const target = targetComp.element;\n if (has(target, beforeObject)) {\n triggerTab(container, true);\n } else if (has(target, afterObject)) {\n triggerTab(container, false);\n }\n };\n const isPseudoStop = element => {\n return closest(element, [\n '.' + beforeObject,\n '.' + afterObject\n ].join(','), never);\n };\n\n const dialogChannel = generate$6('update-dialog');\n const titleChannel = generate$6('update-title');\n const bodyChannel = generate$6('update-body');\n const footerChannel = generate$6('update-footer');\n const bodySendMessageChannel = generate$6('body-send-message');\n const dialogFocusShiftedChannel = generate$6('dialog-focus-shifted');\n\n const browser = detect$2().browser;\n const isSafari = browser.isSafari();\n const isFirefox = browser.isFirefox();\n const isSafariOrFirefox = isSafari || isFirefox;\n const isChromium = browser.isChromium();\n const isElementScrollAtBottom = ({scrollTop, scrollHeight, clientHeight}) => Math.ceil(scrollTop) + clientHeight >= scrollHeight;\n const scrollToY = (win, y) => win.scrollTo(0, y === 'bottom' ? 99999999 : y);\n const getScrollingElement = (doc, html) => {\n const body = doc.body;\n return Optional.from(!/^<!DOCTYPE (html|HTML)/.test(html) && (!isChromium && !isSafari || isNonNullable(body) && (body.scrollTop !== 0 || Math.abs(body.scrollHeight - body.clientHeight) > 1)) ? body : doc.documentElement);\n };\n const writeValue = (iframeElement, html, fallbackFn) => {\n const iframe = iframeElement.dom;\n Optional.from(iframe.contentDocument).fold(fallbackFn, doc => {\n let lastScrollTop = 0;\n const isScrollAtBottom = getScrollingElement(doc, html).map(el => {\n lastScrollTop = el.scrollTop;\n return el;\n }).forall(isElementScrollAtBottom);\n const scrollAfterWrite = () => {\n const win = iframe.contentWindow;\n if (isNonNullable(win)) {\n if (isScrollAtBottom) {\n scrollToY(win, 'bottom');\n } else if (!isScrollAtBottom && isSafariOrFirefox && lastScrollTop !== 0) {\n scrollToY(win, lastScrollTop);\n }\n }\n };\n if (isSafari) {\n iframe.addEventListener('load', scrollAfterWrite, { once: true });\n }\n doc.open();\n doc.write(html);\n doc.close();\n if (!isSafari) {\n scrollAfterWrite();\n }\n });\n };\n const throttleInterval = someIf(isSafariOrFirefox, isSafari ? 500 : 200);\n const writeValueThrottler = throttleInterval.map(interval => adaptable(writeValue, interval));\n const getDynamicSource = (initialData, stream) => {\n const cachedValue = Cell(initialData.getOr(''));\n return {\n getValue: _frameComponent => cachedValue.get(),\n setValue: (frameComponent, html) => {\n if (cachedValue.get() !== html) {\n const iframeElement = frameComponent.element;\n const setSrcdocValue = () => set$9(iframeElement, 'srcdoc', html);\n if (stream) {\n writeValueThrottler.fold(constant$1(writeValue), throttler => throttler.throttle)(iframeElement, html, setSrcdocValue);\n } else {\n setSrcdocValue();\n }\n }\n cachedValue.set(html);\n }\n };\n };\n const renderIFrame = (spec, providersBackstage, initialData) => {\n const baseClass = 'tox-dialog__iframe';\n const opaqueClass = spec.transparent ? [] : [`${ baseClass }--opaque`];\n const containerBorderedClass = spec.border ? [`tox-navobj-bordered`] : [];\n const attributes = {\n ...spec.label.map(title => ({ title })).getOr({}),\n ...initialData.map(html => ({ srcdoc: html })).getOr({}),\n ...spec.sandboxed ? { sandbox: 'allow-scripts allow-same-origin' } : {}\n };\n const sourcing = getDynamicSource(initialData, spec.streamContent);\n const pLabel = spec.label.map(label => renderLabel$3(label, providersBackstage));\n const factory = newSpec => craft(Optional.from(containerBorderedClass), {\n uid: newSpec.uid,\n dom: {\n tag: 'iframe',\n attributes,\n classes: [\n baseClass,\n ...opaqueClass\n ]\n },\n behaviours: derive$1([\n Tabstopping.config({}),\n Focusing.config({}),\n withComp(initialData, sourcing.getValue, sourcing.setValue),\n Receiving.config({\n channels: {\n [dialogFocusShiftedChannel]: {\n onReceive: (comp, message) => {\n message.newFocus.each(newFocus => {\n parentElement(comp.element).each(parent => {\n const f = eq(comp.element, newFocus) ? add$2 : remove$2;\n f(parent, 'tox-navobj-bordered-focus');\n });\n });\n }\n }\n }\n })\n ])\n });\n const pField = FormField.parts.field({ factory: { sketch: factory } });\n return renderFormFieldWith(pLabel, pField, ['tox-form__group--stretched'], []);\n };\n\n const image = image => new Promise((resolve, reject) => {\n const loaded = () => {\n destroy();\n resolve(image);\n };\n const listeners = [\n bind(image, 'load', loaded),\n bind(image, 'error', () => {\n destroy();\n reject('Unable to load data from image: ' + image.dom.src);\n })\n ];\n const destroy = () => each$1(listeners, l => l.unbind());\n if (image.dom.complete) {\n loaded();\n }\n });\n\n const calculateImagePosition = (panelWidth, panelHeight, imageWidth, imageHeight, zoom) => {\n const width = imageWidth * zoom;\n const height = imageHeight * zoom;\n const left = Math.max(0, panelWidth / 2 - width / 2);\n const top = Math.max(0, panelHeight / 2 - height / 2);\n return {\n left: left.toString() + 'px',\n top: top.toString() + 'px',\n width: width.toString() + 'px',\n height: height.toString() + 'px'\n };\n };\n const zoomToFit = (panel, width, height) => {\n const panelW = get$c(panel);\n const panelH = get$d(panel);\n return Math.min(panelW / width, panelH / height, 1);\n };\n const renderImagePreview = (spec, initialData) => {\n const cachedData = Cell(initialData.getOr({ url: '' }));\n const memImage = record({\n dom: {\n tag: 'img',\n classes: ['tox-imagepreview__image'],\n attributes: initialData.map(data => ({ src: data.url })).getOr({})\n }\n });\n const memContainer = record({\n dom: {\n tag: 'div',\n classes: ['tox-imagepreview__container'],\n attributes: { role: 'presentation' }\n },\n components: [memImage.asSpec()]\n });\n const setValue = (frameComponent, data) => {\n const translatedData = { url: data.url };\n data.zoom.each(z => translatedData.zoom = z);\n data.cachedWidth.each(z => translatedData.cachedWidth = z);\n data.cachedHeight.each(z => translatedData.cachedHeight = z);\n cachedData.set(translatedData);\n const applyFramePositioning = () => {\n const {cachedWidth, cachedHeight, zoom} = translatedData;\n if (!isUndefined(cachedWidth) && !isUndefined(cachedHeight)) {\n if (isUndefined(zoom)) {\n const z = zoomToFit(frameComponent.element, cachedWidth, cachedHeight);\n translatedData.zoom = z;\n }\n const position = calculateImagePosition(get$c(frameComponent.element), get$d(frameComponent.element), cachedWidth, cachedHeight, translatedData.zoom);\n memContainer.getOpt(frameComponent).each(container => {\n setAll(container.element, position);\n });\n }\n };\n memImage.getOpt(frameComponent).each(imageComponent => {\n const img = imageComponent.element;\n if (data.url !== get$f(img, 'src')) {\n set$9(img, 'src', data.url);\n remove$2(frameComponent.element, 'tox-imagepreview__loaded');\n }\n applyFramePositioning();\n image(img).then(img => {\n if (frameComponent.getSystem().isConnected()) {\n add$2(frameComponent.element, 'tox-imagepreview__loaded');\n translatedData.cachedWidth = img.dom.naturalWidth;\n translatedData.cachedHeight = img.dom.naturalHeight;\n applyFramePositioning();\n }\n });\n });\n };\n const styles = {};\n spec.height.each(h => styles.height = h);\n const fakeValidatedData = initialData.map(d => ({\n url: d.url,\n zoom: Optional.from(d.zoom),\n cachedWidth: Optional.from(d.cachedWidth),\n cachedHeight: Optional.from(d.cachedHeight)\n }));\n return {\n dom: {\n tag: 'div',\n classes: ['tox-imagepreview'],\n styles,\n attributes: { role: 'presentation' }\n },\n components: [memContainer.asSpec()],\n behaviours: derive$1([\n ComposingConfigs.self(),\n withComp(fakeValidatedData, () => cachedData.get(), setValue)\n ])\n };\n };\n\n const renderLabel$2 = (spec, backstageShared) => {\n const baseClass = 'tox-label';\n const centerClass = spec.align === 'center' ? [`${ baseClass }--center`] : [];\n const endClass = spec.align === 'end' ? [`${ baseClass }--end`] : [];\n const label = {\n dom: {\n tag: 'label',\n classes: [\n baseClass,\n ...centerClass,\n ...endClass\n ]\n },\n components: [text$2(backstageShared.providers.translate(spec.label))]\n };\n const comps = map$2(spec.items, backstageShared.interpreter);\n return {\n dom: {\n tag: 'div',\n classes: ['tox-form__group']\n },\n components: [\n label,\n ...comps\n ],\n behaviours: derive$1([\n ComposingConfigs.self(),\n Replacing.config({}),\n domHtml(Optional.none()),\n Keying.config({ mode: 'acyclic' })\n ])\n };\n };\n\n const internalToolbarButtonExecute = generate$6('toolbar.button.execute');\n const onToolbarButtonExecute = info => runOnExecute$1((comp, _simulatedEvent) => {\n runWithApi(info, comp)(itemApi => {\n emitWith(comp, internalToolbarButtonExecute, { buttonApi: itemApi });\n info.onAction(itemApi);\n });\n });\n const commonButtonDisplayEvent = generate$6('common-button-display-events');\n const toolbarButtonEventOrder = {\n [execute$5()]: [\n 'disabling',\n 'alloy.base.behaviour',\n 'toggling',\n 'toolbar-button-events'\n ],\n [attachedToDom()]: [\n 'toolbar-button-events',\n commonButtonDisplayEvent\n ],\n [mousedown()]: [\n 'focusing',\n 'alloy.base.behaviour',\n commonButtonDisplayEvent\n ]\n };\n\n const forceInitialSize = comp => set$8(comp.element, 'width', get$e(comp.element, 'width'));\n\n const renderIcon$1 = (iconName, iconsProvider, behaviours) => render$3(iconName, {\n tag: 'span',\n classes: [\n 'tox-icon',\n 'tox-tbtn__icon-wrap'\n ],\n behaviours\n }, iconsProvider);\n const renderIconFromPack$1 = (iconName, iconsProvider) => renderIcon$1(iconName, iconsProvider, []);\n const renderReplaceableIconFromPack = (iconName, iconsProvider) => renderIcon$1(iconName, iconsProvider, [Replacing.config({})]);\n const renderLabel$1 = (text, prefix, providersBackstage) => ({\n dom: {\n tag: 'span',\n classes: [`${ prefix }__select-label`]\n },\n components: [text$2(providersBackstage.translate(text))],\n behaviours: derive$1([Replacing.config({})])\n });\n\n const updateMenuText = generate$6('update-menu-text');\n const updateMenuIcon = generate$6('update-menu-icon');\n const renderCommonDropdown = (spec, prefix, sharedBackstage) => {\n const editorOffCell = Cell(noop);\n const optMemDisplayText = spec.text.map(text => record(renderLabel$1(text, prefix, sharedBackstage.providers)));\n const optMemDisplayIcon = spec.icon.map(iconName => record(renderReplaceableIconFromPack(iconName, sharedBackstage.providers.icons)));\n const onLeftOrRightInMenu = (comp, se) => {\n const dropdown = Representing.getValue(comp);\n Focusing.focus(dropdown);\n emitWith(dropdown, 'keydown', { raw: se.event.raw });\n Dropdown.close(dropdown);\n return Optional.some(true);\n };\n const role = spec.role.fold(() => ({}), role => ({ role }));\n const tooltipAttributes = spec.tooltip.fold(() => ({}), tooltip => {\n const translatedTooltip = sharedBackstage.providers.translate(tooltip);\n return {\n 'title': translatedTooltip,\n 'aria-label': translatedTooltip\n };\n });\n const iconSpec = render$3('chevron-down', {\n tag: 'div',\n classes: [`${ prefix }__select-chevron`]\n }, sharedBackstage.providers.icons);\n const fixWidthBehaviourName = generate$6('common-button-display-events');\n const memDropdown = record(Dropdown.sketch({\n ...spec.uid ? { uid: spec.uid } : {},\n ...role,\n dom: {\n tag: 'button',\n classes: [\n prefix,\n `${ prefix }--select`\n ].concat(map$2(spec.classes, c => `${ prefix }--${ c }`)),\n attributes: { ...tooltipAttributes }\n },\n components: componentRenderPipeline([\n optMemDisplayIcon.map(mem => mem.asSpec()),\n optMemDisplayText.map(mem => mem.asSpec()),\n Optional.some(iconSpec)\n ]),\n matchWidth: true,\n useMinWidth: true,\n onOpen: (anchor, dropdownComp, tmenuComp) => {\n if (spec.searchable) {\n focusSearchField(tmenuComp);\n }\n },\n dropdownBehaviours: derive$1([\n ...spec.dropdownBehaviours,\n DisablingConfigs.button(() => spec.disabled || sharedBackstage.providers.isDisabled()),\n receivingConfig(),\n Unselecting.config({}),\n Replacing.config({}),\n config('dropdown-events', [\n onControlAttached(spec, editorOffCell),\n onControlDetached(spec, editorOffCell)\n ]),\n config(fixWidthBehaviourName, [runOnAttached((comp, _se) => forceInitialSize(comp))]),\n config('menubutton-update-display-text', [\n run$1(updateMenuText, (comp, se) => {\n optMemDisplayText.bind(mem => mem.getOpt(comp)).each(displayText => {\n Replacing.set(displayText, [text$2(sharedBackstage.providers.translate(se.event.text))]);\n });\n }),\n run$1(updateMenuIcon, (comp, se) => {\n optMemDisplayIcon.bind(mem => mem.getOpt(comp)).each(displayIcon => {\n Replacing.set(displayIcon, [renderReplaceableIconFromPack(se.event.icon, sharedBackstage.providers.icons)]);\n });\n })\n ])\n ]),\n eventOrder: deepMerge(toolbarButtonEventOrder, {\n mousedown: [\n 'focusing',\n 'alloy.base.behaviour',\n 'item-type-events',\n 'normal-dropdown-events'\n ],\n [attachedToDom()]: [\n 'toolbar-button-events',\n 'dropdown-events',\n fixWidthBehaviourName\n ]\n }),\n sandboxBehaviours: derive$1([\n Keying.config({\n mode: 'special',\n onLeft: onLeftOrRightInMenu,\n onRight: onLeftOrRightInMenu\n }),\n config('dropdown-sandbox-events', [\n run$1(refetchTriggerEvent, (originalSandboxComp, se) => {\n handleRefetchTrigger(originalSandboxComp);\n se.stop();\n }),\n run$1(redirectMenuItemInteractionEvent, (sandboxComp, se) => {\n handleRedirectToMenuItem(sandboxComp, se);\n se.stop();\n })\n ])\n ]),\n lazySink: sharedBackstage.getSink,\n toggleClass: `${ prefix }--active`,\n parts: {\n menu: {\n ...part(false, spec.columns, spec.presets),\n fakeFocus: spec.searchable,\n onHighlightItem: updateAriaOnHighlight,\n onCollapseMenu: (tmenuComp, itemCompCausingCollapse, nowActiveMenuComp) => {\n Highlighting.getHighlighted(nowActiveMenuComp).each(itemComp => {\n updateAriaOnHighlight(tmenuComp, nowActiveMenuComp, itemComp);\n });\n },\n onDehighlightItem: updateAriaOnDehighlight\n }\n },\n getAnchorOverrides: () => {\n return {\n maxHeightFunction: (element, available) => {\n anchored()(element, available - 10);\n }\n };\n },\n fetch: comp => Future.nu(curry(spec.fetch, comp))\n }));\n return memDropdown.asSpec();\n };\n\n const isMenuItemReference = item => isString(item);\n const isSeparator$2 = item => item.type === 'separator';\n const isExpandingMenuItem = item => has$2(item, 'getSubmenuItems');\n const separator$2 = { type: 'separator' };\n const unwrapReferences = (items, menuItems) => {\n const realItems = foldl(items, (acc, item) => {\n if (isMenuItemReference(item)) {\n if (item === '') {\n return acc;\n } else if (item === '|') {\n return acc.length > 0 && !isSeparator$2(acc[acc.length - 1]) ? acc.concat([separator$2]) : acc;\n } else if (has$2(menuItems, item.toLowerCase())) {\n return acc.concat([menuItems[item.toLowerCase()]]);\n } else {\n return acc;\n }\n } else {\n return acc.concat([item]);\n }\n }, []);\n if (realItems.length > 0 && isSeparator$2(realItems[realItems.length - 1])) {\n realItems.pop();\n }\n return realItems;\n };\n const getFromExpandingItem = (item, menuItems) => {\n const submenuItems = item.getSubmenuItems();\n const rest = expand(submenuItems, menuItems);\n const newMenus = deepMerge(rest.menus, { [item.value]: rest.items });\n const newExpansions = deepMerge(rest.expansions, { [item.value]: item.value });\n return {\n item,\n menus: newMenus,\n expansions: newExpansions\n };\n };\n const generateValueIfRequired = item => {\n const itemValue = get$g(item, 'value').getOrThunk(() => generate$6('generated-menu-item'));\n return deepMerge({ value: itemValue }, item);\n };\n const expand = (items, menuItems) => {\n const realItems = unwrapReferences(isString(items) ? items.split(' ') : items, menuItems);\n return foldr(realItems, (acc, item) => {\n if (isExpandingMenuItem(item)) {\n const itemWithValue = generateValueIfRequired(item);\n const newData = getFromExpandingItem(itemWithValue, menuItems);\n return {\n menus: deepMerge(acc.menus, newData.menus),\n items: [\n newData.item,\n ...acc.items\n ],\n expansions: deepMerge(acc.expansions, newData.expansions)\n };\n } else {\n return {\n ...acc,\n items: [\n item,\n ...acc.items\n ]\n };\n }\n }, {\n menus: {},\n expansions: {},\n items: []\n });\n };\n\n const getSearchModeForField = settings => {\n return settings.search.fold(() => ({ searchMode: 'no-search' }), searchSettings => ({\n searchMode: 'search-with-field',\n placeholder: searchSettings.placeholder\n }));\n };\n const getSearchModeForResults = settings => {\n return settings.search.fold(() => ({ searchMode: 'no-search' }), _ => ({ searchMode: 'search-with-results' }));\n };\n const build = (items, itemResponse, backstage, settings) => {\n const primary = generate$6('primary-menu');\n const data = expand(items, backstage.shared.providers.menuItems());\n if (data.items.length === 0) {\n return Optional.none();\n }\n const mainMenuSearchMode = getSearchModeForField(settings);\n const mainMenu = createPartialMenu(primary, data.items, itemResponse, backstage, settings.isHorizontalMenu, mainMenuSearchMode);\n const submenuSearchMode = getSearchModeForResults(settings);\n const submenus = map$1(data.menus, (menuItems, menuName) => createPartialMenu(menuName, menuItems, itemResponse, backstage, false, submenuSearchMode));\n const menus = deepMerge(submenus, wrap$1(primary, mainMenu));\n return Optional.from(tieredMenu.tieredData(primary, menus, data.expansions));\n };\n\n const isSingleListItem = item => !has$2(item, 'items');\n const dataAttribute = 'data-value';\n const fetchItems = (dropdownComp, name, items, selectedValue) => map$2(items, item => {\n if (!isSingleListItem(item)) {\n return {\n type: 'nestedmenuitem',\n text: item.text,\n getSubmenuItems: () => fetchItems(dropdownComp, name, item.items, selectedValue)\n };\n } else {\n return {\n type: 'togglemenuitem',\n text: item.text,\n value: item.value,\n active: item.value === selectedValue,\n onAction: () => {\n Representing.setValue(dropdownComp, item.value);\n emitWith(dropdownComp, formChangeEvent, { name });\n Focusing.focus(dropdownComp);\n }\n };\n }\n });\n const findItemByValue = (items, value) => findMap(items, item => {\n if (!isSingleListItem(item)) {\n return findItemByValue(item.items, value);\n } else {\n return someIf(item.value === value, item);\n }\n });\n const renderListBox = (spec, backstage, initialData) => {\n const providersBackstage = backstage.shared.providers;\n const initialItem = initialData.bind(value => findItemByValue(spec.items, value)).orThunk(() => head(spec.items).filter(isSingleListItem));\n const pLabel = spec.label.map(label => renderLabel$3(label, providersBackstage));\n const pField = FormField.parts.field({\n dom: {},\n factory: {\n sketch: sketchSpec => renderCommonDropdown({\n uid: sketchSpec.uid,\n text: initialItem.map(item => item.text),\n icon: Optional.none(),\n tooltip: spec.label,\n role: Optional.none(),\n fetch: (comp, callback) => {\n const items = fetchItems(comp, spec.name, spec.items, Representing.getValue(comp));\n callback(build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n isHorizontalMenu: false,\n search: Optional.none()\n }));\n },\n onSetup: constant$1(noop),\n getApi: constant$1({}),\n columns: 1,\n presets: 'normal',\n classes: [],\n dropdownBehaviours: [\n Tabstopping.config({}),\n withComp(initialItem.map(item => item.value), comp => get$f(comp.element, dataAttribute), (comp, data) => {\n findItemByValue(spec.items, data).each(item => {\n set$9(comp.element, dataAttribute, item.value);\n emitWith(comp, updateMenuText, { text: item.text });\n });\n })\n ]\n }, 'tox-listbox', backstage.shared)\n }\n });\n const listBoxWrap = {\n dom: {\n tag: 'div',\n classes: ['tox-listboxfield']\n },\n components: [pField]\n };\n return FormField.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-form__group']\n },\n components: flatten([\n pLabel.toArray(),\n [listBoxWrap]\n ]),\n fieldBehaviours: derive$1([Disabling.config({\n disabled: constant$1(!spec.enabled),\n onDisabled: comp => {\n FormField.getField(comp).each(Disabling.disable);\n },\n onEnabled: comp => {\n FormField.getField(comp).each(Disabling.enable);\n }\n })])\n });\n };\n\n const renderPanel = (spec, backstage) => ({\n dom: {\n tag: 'div',\n classes: spec.classes\n },\n components: map$2(spec.items, backstage.shared.interpreter)\n });\n\n const factory$h = (detail, _spec) => {\n const options = map$2(detail.options, option => ({\n dom: {\n tag: 'option',\n value: option.value,\n innerHtml: option.text\n }\n }));\n const initialValues = detail.data.map(v => wrap$1('initialValue', v)).getOr({});\n return {\n uid: detail.uid,\n dom: {\n tag: 'select',\n classes: detail.selectClasses,\n attributes: detail.selectAttributes\n },\n components: options,\n behaviours: augment(detail.selectBehaviours, [\n Focusing.config({}),\n Representing.config({\n store: {\n mode: 'manual',\n getValue: select => {\n return get$6(select.element);\n },\n setValue: (select, newValue) => {\n const firstOption = head(detail.options);\n const found = find$5(detail.options, opt => opt.value === newValue);\n if (found.isSome()) {\n set$5(select.element, newValue);\n } else if (select.element.dom.selectedIndex === -1 && newValue === '') {\n firstOption.each(value => set$5(select.element, value.value));\n }\n },\n ...initialValues\n }\n })\n ])\n };\n };\n const HtmlSelect = single({\n name: 'HtmlSelect',\n configFields: [\n required$1('options'),\n field('selectBehaviours', [\n Focusing,\n Representing\n ]),\n defaulted('selectClasses', []),\n defaulted('selectAttributes', {}),\n option$3('data')\n ],\n factory: factory$h\n });\n\n const renderSelectBox = (spec, providersBackstage, initialData) => {\n const translatedOptions = map$2(spec.items, item => ({\n text: providersBackstage.translate(item.text),\n value: item.value\n }));\n const pLabel = spec.label.map(label => renderLabel$3(label, providersBackstage));\n const pField = FormField.parts.field({\n dom: {},\n ...initialData.map(data => ({ data })).getOr({}),\n selectAttributes: { size: spec.size },\n options: translatedOptions,\n factory: HtmlSelect,\n selectBehaviours: derive$1([\n Disabling.config({ disabled: () => !spec.enabled || providersBackstage.isDisabled() }),\n Tabstopping.config({}),\n config('selectbox-change', [run$1(change(), (component, _) => {\n emitWith(component, formChangeEvent, { name: spec.name });\n })])\n ])\n });\n const chevron = spec.size > 1 ? Optional.none() : Optional.some(render$3('chevron-down', {\n tag: 'div',\n classes: ['tox-selectfield__icon-js']\n }, providersBackstage.icons));\n const selectWrap = {\n dom: {\n tag: 'div',\n classes: ['tox-selectfield']\n },\n components: flatten([\n [pField],\n chevron.toArray()\n ])\n };\n return FormField.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-form__group']\n },\n components: flatten([\n pLabel.toArray(),\n [selectWrap]\n ]),\n fieldBehaviours: derive$1([\n Disabling.config({\n disabled: () => !spec.enabled || providersBackstage.isDisabled(),\n onDisabled: comp => {\n FormField.getField(comp).each(Disabling.disable);\n },\n onEnabled: comp => {\n FormField.getField(comp).each(Disabling.enable);\n }\n }),\n receivingConfig()\n ])\n });\n };\n\n const schema$h = constant$1([\n defaulted('field1Name', 'field1'),\n defaulted('field2Name', 'field2'),\n onStrictHandler('onLockedChange'),\n markers$1(['lockClass']),\n defaulted('locked', false),\n SketchBehaviours.field('coupledFieldBehaviours', [\n Composing,\n Representing\n ])\n ]);\n const getField = (comp, detail, partName) => getPart(comp, detail, partName).bind(Composing.getCurrent);\n const coupledPart = (selfName, otherName) => required({\n factory: FormField,\n name: selfName,\n overrides: detail => {\n return {\n fieldBehaviours: derive$1([config('coupled-input-behaviour', [run$1(input(), me => {\n getField(me, detail, otherName).each(other => {\n getPart(me, detail, 'lock').each(lock => {\n if (Toggling.isOn(lock)) {\n detail.onLockedChange(me, other, lock);\n }\n });\n });\n })])])\n };\n }\n });\n const parts$c = constant$1([\n coupledPart('field1', 'field2'),\n coupledPart('field2', 'field1'),\n required({\n factory: Button,\n schema: [required$1('dom')],\n name: 'lock',\n overrides: detail => {\n return {\n buttonBehaviours: derive$1([Toggling.config({\n selected: detail.locked,\n toggleClass: detail.markers.lockClass,\n aria: { mode: 'pressed' }\n })])\n };\n }\n })\n ]);\n\n const factory$g = (detail, components, _spec, _externals) => ({\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: SketchBehaviours.augment(detail.coupledFieldBehaviours, [\n Composing.config({ find: Optional.some }),\n Representing.config({\n store: {\n mode: 'manual',\n getValue: comp => {\n const parts = getPartsOrDie(comp, detail, [\n 'field1',\n 'field2'\n ]);\n return {\n [detail.field1Name]: Representing.getValue(parts.field1()),\n [detail.field2Name]: Representing.getValue(parts.field2())\n };\n },\n setValue: (comp, value) => {\n const parts = getPartsOrDie(comp, detail, [\n 'field1',\n 'field2'\n ]);\n if (hasNonNullableKey(value, detail.field1Name)) {\n Representing.setValue(parts.field1(), value[detail.field1Name]);\n }\n if (hasNonNullableKey(value, detail.field2Name)) {\n Representing.setValue(parts.field2(), value[detail.field2Name]);\n }\n }\n }\n })\n ]),\n apis: {\n getField1: component => getPart(component, detail, 'field1'),\n getField2: component => getPart(component, detail, 'field2'),\n getLock: component => getPart(component, detail, 'lock')\n }\n });\n const FormCoupledInputs = composite({\n name: 'FormCoupledInputs',\n configFields: schema$h(),\n partFields: parts$c(),\n factory: factory$g,\n apis: {\n getField1: (apis, component) => apis.getField1(component),\n getField2: (apis, component) => apis.getField2(component),\n getLock: (apis, component) => apis.getLock(component)\n }\n });\n\n const formatSize = size => {\n const unitDec = {\n '': 0,\n 'px': 0,\n 'pt': 1,\n 'mm': 1,\n 'pc': 2,\n 'ex': 2,\n 'em': 2,\n 'ch': 2,\n 'rem': 2,\n 'cm': 3,\n 'in': 4,\n '%': 4\n };\n const maxDecimal = unit => unit in unitDec ? unitDec[unit] : 1;\n let numText = size.value.toFixed(maxDecimal(size.unit));\n if (numText.indexOf('.') !== -1) {\n numText = numText.replace(/\\.?0*$/, '');\n }\n return numText + size.unit;\n };\n const parseSize = sizeText => {\n const numPattern = /^\\s*(\\d+(?:\\.\\d+)?)\\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\\s*$/;\n const match = numPattern.exec(sizeText);\n if (match !== null) {\n const value = parseFloat(match[1]);\n const unit = match[2];\n return Result.value({\n value,\n unit\n });\n } else {\n return Result.error(sizeText);\n }\n };\n const convertUnit = (size, unit) => {\n const inInch = {\n '': 96,\n 'px': 96,\n 'pt': 72,\n 'cm': 2.54,\n 'pc': 12,\n 'mm': 25.4,\n 'in': 1\n };\n const supported = u => has$2(inInch, u);\n if (size.unit === unit) {\n return Optional.some(size.value);\n } else if (supported(size.unit) && supported(unit)) {\n if (inInch[size.unit] === inInch[unit]) {\n return Optional.some(size.value);\n } else {\n return Optional.some(size.value / inInch[size.unit] * inInch[unit]);\n }\n } else {\n return Optional.none();\n }\n };\n const noSizeConversion = _input => Optional.none();\n const ratioSizeConversion = (scale, unit) => size => convertUnit(size, unit).map(value => ({\n value: value * scale,\n unit\n }));\n const makeRatioConverter = (currentFieldText, otherFieldText) => {\n const cValue = parseSize(currentFieldText).toOptional();\n const oValue = parseSize(otherFieldText).toOptional();\n return lift2(cValue, oValue, (cSize, oSize) => convertUnit(cSize, oSize.unit).map(val => oSize.value / val).map(r => ratioSizeConversion(r, oSize.unit)).getOr(noSizeConversion)).getOr(noSizeConversion);\n };\n\n const renderSizeInput = (spec, providersBackstage) => {\n let converter = noSizeConversion;\n const ratioEvent = generate$6('ratio-event');\n const makeIcon = iconName => render$3(iconName, {\n tag: 'span',\n classes: [\n 'tox-icon',\n 'tox-lock-icon__' + iconName\n ]\n }, providersBackstage.icons);\n const pLock = FormCoupledInputs.parts.lock({\n dom: {\n tag: 'button',\n classes: [\n 'tox-lock',\n 'tox-button',\n 'tox-button--naked',\n 'tox-button--icon'\n ],\n attributes: { title: providersBackstage.translate(spec.label.getOr('Constrain proportions')) }\n },\n components: [\n makeIcon('lock'),\n makeIcon('unlock')\n ],\n buttonBehaviours: derive$1([\n Disabling.config({ disabled: () => !spec.enabled || providersBackstage.isDisabled() }),\n receivingConfig(),\n Tabstopping.config({})\n ])\n });\n const formGroup = components => ({\n dom: {\n tag: 'div',\n classes: ['tox-form__group']\n },\n components\n });\n const getFieldPart = isField1 => FormField.parts.field({\n factory: Input,\n inputClasses: ['tox-textfield'],\n inputBehaviours: derive$1([\n Disabling.config({ disabled: () => !spec.enabled || providersBackstage.isDisabled() }),\n receivingConfig(),\n Tabstopping.config({}),\n config('size-input-events', [\n run$1(focusin(), (component, _simulatedEvent) => {\n emitWith(component, ratioEvent, { isField1 });\n }),\n run$1(change(), (component, _simulatedEvent) => {\n emitWith(component, formChangeEvent, { name: spec.name });\n })\n ])\n ]),\n selectOnFocus: false\n });\n const getLabel = label => ({\n dom: {\n tag: 'label',\n classes: ['tox-label']\n },\n components: [text$2(providersBackstage.translate(label))]\n });\n const widthField = FormCoupledInputs.parts.field1(formGroup([\n FormField.parts.label(getLabel('Width')),\n getFieldPart(true)\n ]));\n const heightField = FormCoupledInputs.parts.field2(formGroup([\n FormField.parts.label(getLabel('Height')),\n getFieldPart(false)\n ]));\n return FormCoupledInputs.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-form__group']\n },\n components: [{\n dom: {\n tag: 'div',\n classes: ['tox-form__controls-h-stack']\n },\n components: [\n widthField,\n heightField,\n formGroup([\n getLabel(nbsp),\n pLock\n ])\n ]\n }],\n field1Name: 'width',\n field2Name: 'height',\n locked: true,\n markers: { lockClass: 'tox-locked' },\n onLockedChange: (current, other, _lock) => {\n parseSize(Representing.getValue(current)).each(size => {\n converter(size).each(newSize => {\n Representing.setValue(other, formatSize(newSize));\n });\n });\n },\n coupledFieldBehaviours: derive$1([\n Disabling.config({\n disabled: () => !spec.enabled || providersBackstage.isDisabled(),\n onDisabled: comp => {\n FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.disable);\n FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.disable);\n FormCoupledInputs.getLock(comp).each(Disabling.disable);\n },\n onEnabled: comp => {\n FormCoupledInputs.getField1(comp).bind(FormField.getField).each(Disabling.enable);\n FormCoupledInputs.getField2(comp).bind(FormField.getField).each(Disabling.enable);\n FormCoupledInputs.getLock(comp).each(Disabling.enable);\n }\n }),\n receivingConfig(),\n config('size-input-events2', [run$1(ratioEvent, (component, simulatedEvent) => {\n const isField1 = simulatedEvent.event.isField1;\n const optCurrent = isField1 ? FormCoupledInputs.getField1(component) : FormCoupledInputs.getField2(component);\n const optOther = isField1 ? FormCoupledInputs.getField2(component) : FormCoupledInputs.getField1(component);\n const value1 = optCurrent.map(Representing.getValue).getOr('');\n const value2 = optOther.map(Representing.getValue).getOr('');\n converter = makeRatioConverter(value1, value2);\n })])\n ])\n });\n };\n\n const renderSlider = (spec, providerBackstage, initialData) => {\n const labelPart = Slider.parts.label({\n dom: {\n tag: 'label',\n classes: ['tox-label']\n },\n components: [text$2(providerBackstage.translate(spec.label))]\n });\n const spectrum = Slider.parts.spectrum({\n dom: {\n tag: 'div',\n classes: ['tox-slider__rail'],\n attributes: { role: 'presentation' }\n }\n });\n const thumb = Slider.parts.thumb({\n dom: {\n tag: 'div',\n classes: ['tox-slider__handle'],\n attributes: { role: 'presentation' }\n }\n });\n return Slider.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-slider'],\n attributes: { role: 'presentation' }\n },\n model: {\n mode: 'x',\n minX: spec.min,\n maxX: spec.max,\n getInitialValue: constant$1(initialData.getOrThunk(() => (Math.abs(spec.max) - Math.abs(spec.min)) / 2))\n },\n components: [\n labelPart,\n spectrum,\n thumb\n ],\n sliderBehaviours: derive$1([\n ComposingConfigs.self(),\n Focusing.config({})\n ]),\n onChoose: (component, thumb, value) => {\n emitWith(component, formChangeEvent, {\n name: spec.name,\n value\n });\n }\n });\n };\n\n const renderTable = (spec, providersBackstage) => {\n const renderTh = text => ({\n dom: {\n tag: 'th',\n innerHtml: providersBackstage.translate(text)\n }\n });\n const renderHeader = header => ({\n dom: { tag: 'thead' },\n components: [{\n dom: { tag: 'tr' },\n components: map$2(header, renderTh)\n }]\n });\n const renderTd = text => ({\n dom: {\n tag: 'td',\n innerHtml: providersBackstage.translate(text)\n }\n });\n const renderTr = row => ({\n dom: { tag: 'tr' },\n components: map$2(row, renderTd)\n });\n const renderRows = rows => ({\n dom: { tag: 'tbody' },\n components: map$2(rows, renderTr)\n });\n return {\n dom: {\n tag: 'table',\n classes: ['tox-dialog__table']\n },\n components: [\n renderHeader(spec.header),\n renderRows(spec.cells)\n ],\n behaviours: derive$1([\n Tabstopping.config({}),\n Focusing.config({})\n ])\n };\n };\n\n const renderTextField = (spec, providersBackstage) => {\n const pLabel = spec.label.map(label => renderLabel$3(label, providersBackstage));\n const baseInputBehaviours = [\n Disabling.config({ disabled: () => spec.disabled || providersBackstage.isDisabled() }),\n receivingConfig(),\n Keying.config({\n mode: 'execution',\n useEnter: spec.multiline !== true,\n useControlEnter: spec.multiline === true,\n execute: comp => {\n emit(comp, formSubmitEvent);\n return Optional.some(true);\n }\n }),\n config('textfield-change', [\n run$1(input(), (component, _) => {\n emitWith(component, formChangeEvent, { name: spec.name });\n }),\n run$1(postPaste(), (component, _) => {\n emitWith(component, formChangeEvent, { name: spec.name });\n })\n ]),\n Tabstopping.config({})\n ];\n const validatingBehaviours = spec.validation.map(vl => Invalidating.config({\n getRoot: input => {\n return parentElement(input.element);\n },\n invalidClass: 'tox-invalid',\n validator: {\n validate: input => {\n const v = Representing.getValue(input);\n const result = vl.validator(v);\n return Future.pure(result === true ? Result.value(v) : Result.error(result));\n },\n validateOnLoad: vl.validateOnLoad\n }\n })).toArray();\n const placeholder = spec.placeholder.fold(constant$1({}), p => ({ placeholder: providersBackstage.translate(p) }));\n const inputMode = spec.inputMode.fold(constant$1({}), mode => ({ inputmode: mode }));\n const inputAttributes = {\n ...placeholder,\n ...inputMode\n };\n const pField = FormField.parts.field({\n tag: spec.multiline === true ? 'textarea' : 'input',\n ...spec.data.map(data => ({ data })).getOr({}),\n inputAttributes,\n inputClasses: [spec.classname],\n inputBehaviours: derive$1(flatten([\n baseInputBehaviours,\n validatingBehaviours\n ])),\n selectOnFocus: false,\n factory: Input\n });\n const pTextField = spec.multiline ? {\n dom: {\n tag: 'div',\n classes: ['tox-textarea-wrap']\n },\n components: [pField]\n } : pField;\n const extraClasses = spec.flex ? ['tox-form__group--stretched'] : [];\n const extraClasses2 = extraClasses.concat(spec.maximized ? ['tox-form-group--maximize'] : []);\n const extraBehaviours = [\n Disabling.config({\n disabled: () => spec.disabled || providersBackstage.isDisabled(),\n onDisabled: comp => {\n FormField.getField(comp).each(Disabling.disable);\n },\n onEnabled: comp => {\n FormField.getField(comp).each(Disabling.enable);\n }\n }),\n receivingConfig()\n ];\n return renderFormFieldWith(pLabel, pTextField, extraClasses2, extraBehaviours);\n };\n const renderInput = (spec, providersBackstage, initialData) => renderTextField({\n name: spec.name,\n multiline: false,\n label: spec.label,\n inputMode: spec.inputMode,\n placeholder: spec.placeholder,\n flex: false,\n disabled: !spec.enabled,\n classname: 'tox-textfield',\n validation: Optional.none(),\n maximized: spec.maximized,\n data: initialData\n }, providersBackstage);\n const renderTextarea = (spec, providersBackstage, initialData) => renderTextField({\n name: spec.name,\n multiline: true,\n label: spec.label,\n inputMode: Optional.none(),\n placeholder: spec.placeholder,\n flex: true,\n disabled: !spec.enabled,\n classname: 'tox-textarea',\n validation: Optional.none(),\n maximized: spec.maximized,\n data: initialData\n }, providersBackstage);\n\n const getAnimationRoot = (component, slideConfig) => slideConfig.getAnimationRoot.fold(() => component.element, get => get(component));\n\n const getDimensionProperty = slideConfig => slideConfig.dimension.property;\n const getDimension = (slideConfig, elem) => slideConfig.dimension.getDimension(elem);\n const disableTransitions = (component, slideConfig) => {\n const root = getAnimationRoot(component, slideConfig);\n remove$1(root, [\n slideConfig.shrinkingClass,\n slideConfig.growingClass\n ]);\n };\n const setShrunk = (component, slideConfig) => {\n remove$2(component.element, slideConfig.openClass);\n add$2(component.element, slideConfig.closedClass);\n set$8(component.element, getDimensionProperty(slideConfig), '0px');\n reflow(component.element);\n };\n const setGrown = (component, slideConfig) => {\n remove$2(component.element, slideConfig.closedClass);\n add$2(component.element, slideConfig.openClass);\n remove$6(component.element, getDimensionProperty(slideConfig));\n };\n const doImmediateShrink = (component, slideConfig, slideState, _calculatedSize) => {\n slideState.setCollapsed();\n set$8(component.element, getDimensionProperty(slideConfig), getDimension(slideConfig, component.element));\n disableTransitions(component, slideConfig);\n setShrunk(component, slideConfig);\n slideConfig.onStartShrink(component);\n slideConfig.onShrunk(component);\n };\n const doStartShrink = (component, slideConfig, slideState, calculatedSize) => {\n const size = calculatedSize.getOrThunk(() => getDimension(slideConfig, component.element));\n slideState.setCollapsed();\n set$8(component.element, getDimensionProperty(slideConfig), size);\n reflow(component.element);\n const root = getAnimationRoot(component, slideConfig);\n remove$2(root, slideConfig.growingClass);\n add$2(root, slideConfig.shrinkingClass);\n setShrunk(component, slideConfig);\n slideConfig.onStartShrink(component);\n };\n const doStartSmartShrink = (component, slideConfig, slideState) => {\n const size = getDimension(slideConfig, component.element);\n const shrinker = size === '0px' ? doImmediateShrink : doStartShrink;\n shrinker(component, slideConfig, slideState, Optional.some(size));\n };\n const doStartGrow = (component, slideConfig, slideState) => {\n const root = getAnimationRoot(component, slideConfig);\n const wasShrinking = has(root, slideConfig.shrinkingClass);\n const beforeSize = getDimension(slideConfig, component.element);\n setGrown(component, slideConfig);\n const fullSize = getDimension(slideConfig, component.element);\n const startPartialGrow = () => {\n set$8(component.element, getDimensionProperty(slideConfig), beforeSize);\n reflow(component.element);\n };\n const startCompleteGrow = () => {\n setShrunk(component, slideConfig);\n };\n const setStartSize = wasShrinking ? startPartialGrow : startCompleteGrow;\n setStartSize();\n remove$2(root, slideConfig.shrinkingClass);\n add$2(root, slideConfig.growingClass);\n setGrown(component, slideConfig);\n set$8(component.element, getDimensionProperty(slideConfig), fullSize);\n slideState.setExpanded();\n slideConfig.onStartGrow(component);\n };\n const refresh$4 = (component, slideConfig, slideState) => {\n if (slideState.isExpanded()) {\n remove$6(component.element, getDimensionProperty(slideConfig));\n const fullSize = getDimension(slideConfig, component.element);\n set$8(component.element, getDimensionProperty(slideConfig), fullSize);\n }\n };\n const grow = (component, slideConfig, slideState) => {\n if (!slideState.isExpanded()) {\n doStartGrow(component, slideConfig, slideState);\n }\n };\n const shrink = (component, slideConfig, slideState) => {\n if (slideState.isExpanded()) {\n doStartSmartShrink(component, slideConfig, slideState);\n }\n };\n const immediateShrink = (component, slideConfig, slideState) => {\n if (slideState.isExpanded()) {\n doImmediateShrink(component, slideConfig, slideState);\n }\n };\n const hasGrown = (component, slideConfig, slideState) => slideState.isExpanded();\n const hasShrunk = (component, slideConfig, slideState) => slideState.isCollapsed();\n const isGrowing = (component, slideConfig, _slideState) => {\n const root = getAnimationRoot(component, slideConfig);\n return has(root, slideConfig.growingClass) === true;\n };\n const isShrinking = (component, slideConfig, _slideState) => {\n const root = getAnimationRoot(component, slideConfig);\n return has(root, slideConfig.shrinkingClass) === true;\n };\n const isTransitioning = (component, slideConfig, slideState) => isGrowing(component, slideConfig) || isShrinking(component, slideConfig);\n const toggleGrow = (component, slideConfig, slideState) => {\n const f = slideState.isExpanded() ? doStartSmartShrink : doStartGrow;\n f(component, slideConfig, slideState);\n };\n const immediateGrow = (component, slideConfig, slideState) => {\n if (!slideState.isExpanded()) {\n setGrown(component, slideConfig);\n set$8(component.element, getDimensionProperty(slideConfig), getDimension(slideConfig, component.element));\n disableTransitions(component, slideConfig);\n slideState.setExpanded();\n slideConfig.onStartGrow(component);\n slideConfig.onGrown(component);\n }\n };\n\n var SlidingApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n refresh: refresh$4,\n grow: grow,\n shrink: shrink,\n immediateShrink: immediateShrink,\n hasGrown: hasGrown,\n hasShrunk: hasShrunk,\n isGrowing: isGrowing,\n isShrinking: isShrinking,\n isTransitioning: isTransitioning,\n toggleGrow: toggleGrow,\n disableTransitions: disableTransitions,\n immediateGrow: immediateGrow\n });\n\n const exhibit = (base, slideConfig, _slideState) => {\n const expanded = slideConfig.expanded;\n return expanded ? nu$7({\n classes: [slideConfig.openClass],\n styles: {}\n }) : nu$7({\n classes: [slideConfig.closedClass],\n styles: wrap$1(slideConfig.dimension.property, '0px')\n });\n };\n const events$6 = (slideConfig, slideState) => derive$2([runOnSource(transitionend(), (component, simulatedEvent) => {\n const raw = simulatedEvent.event.raw;\n if (raw.propertyName === slideConfig.dimension.property) {\n disableTransitions(component, slideConfig);\n if (slideState.isExpanded()) {\n remove$6(component.element, slideConfig.dimension.property);\n }\n const notify = slideState.isExpanded() ? slideConfig.onGrown : slideConfig.onShrunk;\n notify(component);\n }\n })]);\n\n var ActiveSliding = /*#__PURE__*/Object.freeze({\n __proto__: null,\n exhibit: exhibit,\n events: events$6\n });\n\n var SlidingSchema = [\n required$1('closedClass'),\n required$1('openClass'),\n required$1('shrinkingClass'),\n required$1('growingClass'),\n option$3('getAnimationRoot'),\n onHandler('onShrunk'),\n onHandler('onStartShrink'),\n onHandler('onGrown'),\n onHandler('onStartGrow'),\n defaulted('expanded', false),\n requiredOf('dimension', choose$1('property', {\n width: [\n output$1('property', 'width'),\n output$1('getDimension', elem => get$c(elem) + 'px')\n ],\n height: [\n output$1('property', 'height'),\n output$1('getDimension', elem => get$d(elem) + 'px')\n ]\n }))\n ];\n\n const init$9 = spec => {\n const state = Cell(spec.expanded);\n const readState = () => 'expanded: ' + state.get();\n return nu$8({\n isExpanded: () => state.get() === true,\n isCollapsed: () => state.get() === false,\n setCollapsed: curry(state.set, false),\n setExpanded: curry(state.set, true),\n readState\n });\n };\n\n var SlidingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$9\n });\n\n const Sliding = create$4({\n fields: SlidingSchema,\n name: 'sliding',\n active: ActiveSliding,\n apis: SlidingApis,\n state: SlidingState\n });\n\n const getMenuButtonApi = component => ({\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => Disabling.set(component, !state),\n setActive: state => {\n const elm = component.element;\n if (state) {\n add$2(elm, 'tox-tbtn--enabled');\n set$9(elm, 'aria-pressed', true);\n } else {\n remove$2(elm, 'tox-tbtn--enabled');\n remove$7(elm, 'aria-pressed');\n }\n },\n isActive: () => has(component.element, 'tox-tbtn--enabled'),\n setText: text => {\n emitWith(component, updateMenuText, { text });\n },\n setIcon: icon => emitWith(component, updateMenuIcon, { icon })\n });\n const renderMenuButton = (spec, prefix, backstage, role, tabstopping = true) => {\n return renderCommonDropdown({\n text: spec.text,\n icon: spec.icon,\n tooltip: spec.tooltip,\n searchable: spec.search.isSome(),\n role,\n fetch: (dropdownComp, callback) => {\n const fetchContext = { pattern: spec.search.isSome() ? getSearchPattern(dropdownComp) : '' };\n spec.fetch(items => {\n callback(build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n isHorizontalMenu: false,\n search: spec.search\n }));\n }, fetchContext, getMenuButtonApi(dropdownComp));\n },\n onSetup: spec.onSetup,\n getApi: getMenuButtonApi,\n columns: 1,\n presets: 'normal',\n classes: [],\n dropdownBehaviours: [...tabstopping ? [Tabstopping.config({})] : []]\n }, prefix, backstage.shared);\n };\n const getFetch = (items, getButton, backstage) => {\n const getMenuItemAction = item => api => {\n const newValue = !api.isActive();\n api.setActive(newValue);\n item.storage.set(newValue);\n backstage.shared.getSink().each(sink => {\n getButton().getOpt(sink).each(orig => {\n focus$3(orig.element);\n emitWith(orig, formActionEvent, {\n name: item.name,\n value: item.storage.get()\n });\n });\n });\n };\n const getMenuItemSetup = item => api => {\n api.setActive(item.storage.get());\n };\n return success => {\n success(map$2(items, item => {\n const text = item.text.fold(() => ({}), text => ({ text }));\n return {\n type: item.type,\n active: false,\n ...text,\n onAction: getMenuItemAction(item),\n onSetup: getMenuItemSetup(item)\n };\n }));\n };\n };\n\n const renderLabel = text => ({\n dom: {\n tag: 'span',\n classes: ['tox-tree__label'],\n attributes: {\n 'title': text,\n 'aria-label': text\n }\n },\n components: [text$2(text)]\n });\n const leafLabelEventsId = generate$6('leaf-label-event-id');\n const renderLeafLabel = ({leaf, onLeafAction, visible, treeId, selectedId, backstage}) => {\n const internalMenuButton = leaf.menu.map(btn => renderMenuButton(btn, 'tox-mbtn', backstage, Optional.none(), visible));\n const components = [renderLabel(leaf.title)];\n internalMenuButton.each(btn => components.push(btn));\n return Button.sketch({\n dom: {\n tag: 'div',\n classes: [\n 'tox-tree--leaf__label',\n 'tox-trbtn'\n ].concat(visible ? ['tox-tree--leaf__label--visible'] : [])\n },\n components,\n role: 'treeitem',\n action: button => {\n onLeafAction(leaf.id);\n button.getSystem().broadcastOn([`update-active-item-${ treeId }`], { value: leaf.id });\n },\n eventOrder: {\n [keydown()]: [\n leafLabelEventsId,\n 'keying'\n ]\n },\n buttonBehaviours: derive$1([\n ...visible ? [Tabstopping.config({})] : [],\n Toggling.config({\n toggleClass: 'tox-trbtn--enabled',\n toggleOnExecute: false,\n aria: { mode: 'selected' }\n }),\n Receiving.config({\n channels: {\n [`update-active-item-${ treeId }`]: {\n onReceive: (comp, message) => {\n (message.value === leaf.id ? Toggling.on : Toggling.off)(comp);\n }\n }\n }\n }),\n config(leafLabelEventsId, [\n runOnAttached((comp, _se) => {\n selectedId.each(id => {\n const toggle = id === leaf.id ? Toggling.on : Toggling.off;\n toggle(comp);\n });\n }),\n run$1(keydown(), (comp, se) => {\n const isLeftArrowKey = se.event.raw.code === 'ArrowLeft';\n const isRightArrowKey = se.event.raw.code === 'ArrowRight';\n if (isLeftArrowKey) {\n ancestor(comp.element, '.tox-tree--directory').each(dirElement => {\n comp.getSystem().getByDom(dirElement).each(dirComp => {\n child(dirElement, '.tox-tree--directory__label').each(dirLabelElement => {\n dirComp.getSystem().getByDom(dirLabelElement).each(Focusing.focus);\n });\n });\n });\n se.stop();\n } else if (isRightArrowKey) {\n se.stop();\n }\n })\n ])\n ])\n });\n };\n const renderIcon = (iconName, iconsProvider, behaviours) => render$3(iconName, {\n tag: 'span',\n classes: [\n 'tox-tree__icon-wrap',\n 'tox-icon'\n ],\n behaviours\n }, iconsProvider);\n const renderIconFromPack = (iconName, iconsProvider) => renderIcon(iconName, iconsProvider, []);\n const directoryLabelEventsId = generate$6('directory-label-event-id');\n const renderDirectoryLabel = ({directory, visible, noChildren, backstage}) => {\n const internalMenuButton = directory.menu.map(btn => renderMenuButton(btn, 'tox-mbtn', backstage, Optional.none()));\n const components = [\n {\n dom: {\n tag: 'div',\n classes: ['tox-chevron']\n },\n components: [renderIconFromPack('chevron-right', backstage.shared.providers.icons)]\n },\n renderLabel(directory.title)\n ];\n internalMenuButton.each(btn => {\n components.push(btn);\n });\n const toggleExpandChildren = button => {\n ancestor(button.element, '.tox-tree--directory').each(directoryEle => {\n button.getSystem().getByDom(directoryEle).each(directoryComp => {\n const willExpand = !Toggling.isOn(directoryComp);\n Toggling.toggle(directoryComp);\n emitWith(button, 'expand-tree-node', {\n expanded: willExpand,\n node: directory.id\n });\n });\n });\n };\n return Button.sketch({\n dom: {\n tag: 'div',\n classes: [\n 'tox-tree--directory__label',\n 'tox-trbtn'\n ].concat(visible ? ['tox-tree--directory__label--visible'] : [])\n },\n components,\n action: toggleExpandChildren,\n eventOrder: {\n [keydown()]: [\n directoryLabelEventsId,\n 'keying'\n ]\n },\n buttonBehaviours: derive$1([\n ...visible ? [Tabstopping.config({})] : [],\n config(directoryLabelEventsId, [run$1(keydown(), (comp, se) => {\n const isRightArrowKey = se.event.raw.code === 'ArrowRight';\n const isLeftArrowKey = se.event.raw.code === 'ArrowLeft';\n if (isRightArrowKey && noChildren) {\n se.stop();\n }\n if (isRightArrowKey || isLeftArrowKey) {\n ancestor(comp.element, '.tox-tree--directory').each(directoryEle => {\n comp.getSystem().getByDom(directoryEle).each(directoryComp => {\n if (!Toggling.isOn(directoryComp) && isRightArrowKey || Toggling.isOn(directoryComp) && isLeftArrowKey) {\n toggleExpandChildren(comp);\n se.stop();\n } else if (isLeftArrowKey && !Toggling.isOn(directoryComp)) {\n ancestor(directoryComp.element, '.tox-tree--directory').each(parentDirElement => {\n child(parentDirElement, '.tox-tree--directory__label').each(parentDirLabelElement => {\n directoryComp.getSystem().getByDom(parentDirLabelElement).each(Focusing.focus);\n });\n });\n se.stop();\n }\n });\n });\n }\n })])\n ])\n });\n };\n const renderDirectoryChildren = ({children, onLeafAction, visible, treeId, expandedIds, selectedId, backstage}) => {\n return {\n dom: {\n tag: 'div',\n classes: ['tox-tree--directory__children']\n },\n components: children.map(item => {\n return item.type === 'leaf' ? renderLeafLabel({\n leaf: item,\n selectedId,\n onLeafAction,\n visible,\n treeId,\n backstage\n }) : renderDirectory({\n directory: item,\n expandedIds,\n selectedId,\n onLeafAction,\n labelTabstopping: visible,\n treeId,\n backstage\n });\n }),\n behaviours: derive$1([\n Sliding.config({\n dimension: { property: 'height' },\n closedClass: 'tox-tree--directory__children--closed',\n openClass: 'tox-tree--directory__children--open',\n growingClass: 'tox-tree--directory__children--growing',\n shrinkingClass: 'tox-tree--directory__children--shrinking',\n expanded: visible\n }),\n Replacing.config({})\n ])\n };\n };\n const directoryEventsId = generate$6('directory-event-id');\n const renderDirectory = ({directory, onLeafAction, labelTabstopping, treeId, backstage, expandedIds, selectedId}) => {\n const {children} = directory;\n const expandedIdsCell = Cell(expandedIds);\n const computedChildrenComponents = visible => children.map(item => {\n return item.type === 'leaf' ? renderLeafLabel({\n leaf: item,\n selectedId,\n onLeafAction,\n visible,\n treeId,\n backstage\n }) : renderDirectory({\n directory: item,\n expandedIds: expandedIdsCell.get(),\n selectedId,\n onLeafAction,\n labelTabstopping: visible,\n treeId,\n backstage\n });\n });\n const childrenVisible = expandedIds.includes(directory.id);\n return {\n dom: {\n tag: 'div',\n classes: ['tox-tree--directory'],\n attributes: { role: 'treeitem' }\n },\n components: [\n renderDirectoryLabel({\n directory,\n visible: labelTabstopping,\n noChildren: directory.children.length === 0,\n backstage\n }),\n renderDirectoryChildren({\n children,\n expandedIds,\n selectedId,\n onLeafAction,\n visible: childrenVisible,\n treeId,\n backstage\n })\n ],\n behaviours: derive$1([\n config(directoryEventsId, [\n runOnAttached((comp, _se) => {\n Toggling.set(comp, childrenVisible);\n }),\n run$1('expand-tree-node', (_cmp, se) => {\n const {expanded, node} = se.event;\n expandedIdsCell.set(expanded ? [\n ...expandedIdsCell.get(),\n node\n ] : expandedIdsCell.get().filter(id => id !== node));\n })\n ]),\n Toggling.config({\n ...directory.children.length > 0 ? { aria: { mode: 'expanded' } } : {},\n toggleClass: 'tox-tree--directory--expanded',\n onToggled: (comp, childrenVisible) => {\n const childrenComp = comp.components()[1];\n const newChildren = computedChildrenComponents(childrenVisible);\n if (childrenVisible) {\n Sliding.grow(childrenComp);\n } else {\n Sliding.shrink(childrenComp);\n }\n Replacing.set(childrenComp, newChildren);\n }\n })\n ])\n };\n };\n const treeEventsId = generate$6('tree-event-id');\n const renderTree = (spec, backstage) => {\n const onLeafAction = spec.onLeafAction.getOr(noop);\n const onToggleExpand = spec.onToggleExpand.getOr(noop);\n const defaultExpandedIds = spec.defaultExpandedIds;\n const expandedIds = Cell(defaultExpandedIds);\n const selectedIdCell = Cell(spec.defaultSelectedId);\n const treeId = generate$6('tree-id');\n const children = (selectedId, expandedIds) => spec.items.map(item => {\n return item.type === 'leaf' ? renderLeafLabel({\n leaf: item,\n selectedId,\n onLeafAction,\n visible: true,\n treeId,\n backstage\n }) : renderDirectory({\n directory: item,\n selectedId,\n onLeafAction,\n expandedIds,\n labelTabstopping: true,\n treeId,\n backstage\n });\n });\n return {\n dom: {\n tag: 'div',\n classes: ['tox-tree'],\n attributes: { role: 'tree' }\n },\n components: children(selectedIdCell.get(), expandedIds.get()),\n behaviours: derive$1([\n Keying.config({\n mode: 'flow',\n selector: '.tox-tree--leaf__label--visible, .tox-tree--directory__label--visible',\n cycles: false\n }),\n config(treeEventsId, [run$1('expand-tree-node', (_cmp, se) => {\n const {expanded, node} = se.event;\n expandedIds.set(expanded ? [\n ...expandedIds.get(),\n node\n ] : expandedIds.get().filter(id => id !== node));\n onToggleExpand(expandedIds.get(), {\n expanded,\n node\n });\n })]),\n Receiving.config({\n channels: {\n [`update-active-item-${ treeId }`]: {\n onReceive: (comp, message) => {\n selectedIdCell.set(Optional.some(message.value));\n Replacing.set(comp, children(Optional.some(message.value), expandedIds.get()));\n }\n }\n }\n }),\n Replacing.config({})\n ])\n };\n };\n\n const events$5 = (streamConfig, streamState) => {\n const streams = streamConfig.stream.streams;\n const processor = streams.setup(streamConfig, streamState);\n return derive$2([\n run$1(streamConfig.event, processor),\n runOnDetached(() => streamState.cancel())\n ].concat(streamConfig.cancelEvent.map(e => [run$1(e, () => streamState.cancel())]).getOr([])));\n };\n\n var ActiveStreaming = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$5\n });\n\n const throttle = _config => {\n const state = Cell(null);\n const readState = () => ({ timer: state.get() !== null ? 'set' : 'unset' });\n const setTimer = t => {\n state.set(t);\n };\n const cancel = () => {\n const t = state.get();\n if (t !== null) {\n t.cancel();\n }\n };\n return nu$8({\n readState,\n setTimer,\n cancel\n });\n };\n const init$8 = spec => spec.stream.streams.state(spec);\n\n var StreamingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n throttle: throttle,\n init: init$8\n });\n\n const setup$c = (streamInfo, streamState) => {\n const sInfo = streamInfo.stream;\n const throttler = last(streamInfo.onStream, sInfo.delay);\n streamState.setTimer(throttler);\n return (component, simulatedEvent) => {\n throttler.throttle(component, simulatedEvent);\n if (sInfo.stopEvent) {\n simulatedEvent.stop();\n }\n };\n };\n var StreamingSchema = [\n requiredOf('stream', choose$1('mode', {\n throttle: [\n required$1('delay'),\n defaulted('stopEvent', true),\n output$1('streams', {\n setup: setup$c,\n state: throttle\n })\n ]\n })),\n defaulted('event', 'input'),\n option$3('cancelEvent'),\n onStrictHandler('onStream')\n ];\n\n const Streaming = create$4({\n fields: StreamingSchema,\n name: 'streaming',\n active: ActiveStreaming,\n state: StreamingState\n });\n\n const setValueFromItem = (model, input, item) => {\n const itemData = Representing.getValue(item);\n Representing.setValue(input, itemData);\n setCursorAtEnd(input);\n };\n const setSelectionOn = (input, f) => {\n const el = input.element;\n const value = get$6(el);\n const node = el.dom;\n if (get$f(el, 'type') !== 'number') {\n f(node, value);\n }\n };\n const setCursorAtEnd = input => {\n setSelectionOn(input, (node, value) => node.setSelectionRange(value.length, value.length));\n };\n const setSelectionToEnd = (input, startOffset) => {\n setSelectionOn(input, (node, value) => node.setSelectionRange(startOffset, value.length));\n };\n const attemptSelectOver = (model, input, item) => {\n if (!model.selectsOver) {\n return Optional.none();\n } else {\n const currentValue = Representing.getValue(input);\n const inputDisplay = model.getDisplayText(currentValue);\n const itemValue = Representing.getValue(item);\n const itemDisplay = model.getDisplayText(itemValue);\n return itemDisplay.indexOf(inputDisplay) === 0 ? Optional.some(() => {\n setValueFromItem(model, input, item);\n setSelectionToEnd(input, inputDisplay.length);\n }) : Optional.none();\n }\n };\n\n const itemExecute = constant$1('alloy.typeahead.itemexecute');\n\n const make$3 = (detail, components, spec, externals) => {\n const navigateList = (comp, simulatedEvent, highlighter) => {\n detail.previewing.set(false);\n const sandbox = Coupling.getCoupled(comp, 'sandbox');\n if (Sandboxing.isOpen(sandbox)) {\n Composing.getCurrent(sandbox).each(menu => {\n Highlighting.getHighlighted(menu).fold(() => {\n highlighter(menu);\n }, () => {\n dispatchEvent(sandbox, menu.element, 'keydown', simulatedEvent);\n });\n });\n } else {\n const onOpenSync = sandbox => {\n Composing.getCurrent(sandbox).each(highlighter);\n };\n open(detail, mapFetch(comp), comp, sandbox, externals, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n }\n };\n const focusBehaviours$1 = focusBehaviours(detail);\n const mapFetch = comp => tdata => tdata.map(data => {\n const menus = values(data.menus);\n const items = bind$3(menus, menu => filter$2(menu.items, item => item.type === 'item'));\n const repState = Representing.getState(comp);\n repState.update(map$2(items, item => item.data));\n return data;\n });\n const getActiveMenu = sandboxComp => Composing.getCurrent(sandboxComp);\n const typeaheadCustomEvents = 'typeaheadevents';\n const behaviours = [\n Focusing.config({}),\n Representing.config({\n onSetValue: detail.onSetValue,\n store: {\n mode: 'dataset',\n getDataKey: comp => get$6(comp.element),\n getFallbackEntry: itemString => ({\n value: itemString,\n meta: {}\n }),\n setValue: (comp, data) => {\n set$5(comp.element, detail.model.getDisplayText(data));\n },\n ...detail.initialData.map(d => wrap$1('initialValue', d)).getOr({})\n }\n }),\n Streaming.config({\n stream: {\n mode: 'throttle',\n delay: detail.responseTime,\n stopEvent: false\n },\n onStream: (component, _simulatedEvent) => {\n const sandbox = Coupling.getCoupled(component, 'sandbox');\n const focusInInput = Focusing.isFocused(component);\n if (focusInInput) {\n if (get$6(component.element).length >= detail.minChars) {\n const previousValue = getActiveMenu(sandbox).bind(activeMenu => Highlighting.getHighlighted(activeMenu).map(Representing.getValue));\n detail.previewing.set(true);\n const onOpenSync = _sandbox => {\n getActiveMenu(sandbox).each(activeMenu => {\n previousValue.fold(() => {\n if (detail.model.selectsOver) {\n Highlighting.highlightFirst(activeMenu);\n }\n }, pv => {\n Highlighting.highlightBy(activeMenu, item => {\n const itemData = Representing.getValue(item);\n return itemData.value === pv.value;\n });\n Highlighting.getHighlighted(activeMenu).orThunk(() => {\n Highlighting.highlightFirst(activeMenu);\n return Optional.none();\n });\n });\n });\n };\n open(detail, mapFetch(component), component, sandbox, externals, onOpenSync, HighlightOnOpen.HighlightJustMenu).get(noop);\n }\n }\n },\n cancelEvent: typeaheadCancel()\n }),\n Keying.config({\n mode: 'special',\n onDown: (comp, simulatedEvent) => {\n navigateList(comp, simulatedEvent, Highlighting.highlightFirst);\n return Optional.some(true);\n },\n onEscape: comp => {\n const sandbox = Coupling.getCoupled(comp, 'sandbox');\n if (Sandboxing.isOpen(sandbox)) {\n Sandboxing.close(sandbox);\n return Optional.some(true);\n }\n return Optional.none();\n },\n onUp: (comp, simulatedEvent) => {\n navigateList(comp, simulatedEvent, Highlighting.highlightLast);\n return Optional.some(true);\n },\n onEnter: comp => {\n const sandbox = Coupling.getCoupled(comp, 'sandbox');\n const sandboxIsOpen = Sandboxing.isOpen(sandbox);\n if (sandboxIsOpen && !detail.previewing.get()) {\n return getActiveMenu(sandbox).bind(activeMenu => Highlighting.getHighlighted(activeMenu)).map(item => {\n emitWith(comp, itemExecute(), { item });\n return true;\n });\n } else {\n const currentValue = Representing.getValue(comp);\n emit(comp, typeaheadCancel());\n detail.onExecute(sandbox, comp, currentValue);\n if (sandboxIsOpen) {\n Sandboxing.close(sandbox);\n }\n return Optional.some(true);\n }\n }\n }),\n Toggling.config({\n toggleClass: detail.markers.openClass,\n aria: { mode: 'expanded' }\n }),\n Coupling.config({\n others: {\n sandbox: hotspot => {\n return makeSandbox$1(detail, hotspot, {\n onOpen: () => Toggling.on(hotspot),\n onClose: () => {\n detail.lazyTypeaheadComp.get().each(input => remove$7(input.element, 'aria-activedescendant'));\n Toggling.off(hotspot);\n }\n });\n }\n }\n }),\n config(typeaheadCustomEvents, [\n runOnAttached(typeaheadComp => {\n detail.lazyTypeaheadComp.set(Optional.some(typeaheadComp));\n }),\n runOnDetached(_typeaheadComp => {\n detail.lazyTypeaheadComp.set(Optional.none());\n }),\n runOnExecute$1(comp => {\n const onOpenSync = noop;\n togglePopup(detail, mapFetch(comp), comp, externals, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n }),\n run$1(itemExecute(), (comp, se) => {\n const sandbox = Coupling.getCoupled(comp, 'sandbox');\n setValueFromItem(detail.model, comp, se.event.item);\n emit(comp, typeaheadCancel());\n detail.onItemExecute(comp, sandbox, se.event.item, Representing.getValue(comp));\n Sandboxing.close(sandbox);\n setCursorAtEnd(comp);\n })\n ].concat(detail.dismissOnBlur ? [run$1(postBlur(), typeahead => {\n const sandbox = Coupling.getCoupled(typeahead, 'sandbox');\n if (search(sandbox.element).isNone()) {\n Sandboxing.close(sandbox);\n }\n })] : []))\n ];\n const eventOrder = {\n [detachedFromDom()]: [\n Representing.name(),\n Streaming.name(),\n typeaheadCustomEvents\n ],\n ...detail.eventOrder\n };\n return {\n uid: detail.uid,\n dom: dom(deepMerge(detail, {\n inputAttributes: {\n 'role': 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-haspopup': 'true'\n }\n })),\n behaviours: {\n ...focusBehaviours$1,\n ...augment(detail.typeaheadBehaviours, behaviours)\n },\n eventOrder\n };\n };\n\n const schema$g = constant$1([\n option$3('lazySink'),\n required$1('fetch'),\n defaulted('minChars', 5),\n defaulted('responseTime', 1000),\n onHandler('onOpen'),\n defaulted('getHotspot', Optional.some),\n defaulted('getAnchorOverrides', constant$1({})),\n defaulted('layouts', Optional.none()),\n defaulted('eventOrder', {}),\n defaultedObjOf('model', {}, [\n defaulted('getDisplayText', itemData => itemData.meta !== undefined && itemData.meta.text !== undefined ? itemData.meta.text : itemData.value),\n defaulted('selectsOver', true),\n defaulted('populateFromBrowse', true)\n ]),\n onHandler('onSetValue'),\n onKeyboardHandler('onExecute'),\n onHandler('onItemExecute'),\n defaulted('inputClasses', []),\n defaulted('inputAttributes', {}),\n defaulted('inputStyles', {}),\n defaulted('matchWidth', true),\n defaulted('useMinWidth', false),\n defaulted('dismissOnBlur', true),\n markers$1(['openClass']),\n option$3('initialData'),\n field('typeaheadBehaviours', [\n Focusing,\n Representing,\n Streaming,\n Keying,\n Toggling,\n Coupling\n ]),\n customField('lazyTypeaheadComp', () => Cell(Optional.none)),\n customField('previewing', () => Cell(true))\n ].concat(schema$l()).concat(sandboxFields()));\n const parts$b = constant$1([external({\n schema: [tieredMenuMarkers()],\n name: 'menu',\n overrides: detail => {\n return {\n fakeFocus: true,\n onHighlightItem: (_tmenu, menu, item) => {\n if (!detail.previewing.get()) {\n detail.lazyTypeaheadComp.get().each(input => {\n if (detail.model.populateFromBrowse) {\n setValueFromItem(detail.model, input, item);\n }\n getOpt(item.element, 'id').each(id => set$9(input.element, 'aria-activedescendant', id));\n });\n } else {\n detail.lazyTypeaheadComp.get().each(input => {\n attemptSelectOver(detail.model, input, item).fold(() => {\n if (detail.model.selectsOver) {\n Highlighting.dehighlight(menu, item);\n detail.previewing.set(true);\n } else {\n detail.previewing.set(false);\n }\n }, selectOverTextInInput => {\n selectOverTextInInput();\n detail.previewing.set(false);\n });\n });\n }\n },\n onExecute: (_menu, item) => {\n return detail.lazyTypeaheadComp.get().map(typeahead => {\n emitWith(typeahead, itemExecute(), { item });\n return true;\n });\n },\n onHover: (menu, item) => {\n detail.previewing.set(false);\n detail.lazyTypeaheadComp.get().each(input => {\n if (detail.model.populateFromBrowse) {\n setValueFromItem(detail.model, input, item);\n }\n });\n }\n };\n }\n })]);\n\n const Typeahead = composite({\n name: 'Typeahead',\n configFields: schema$g(),\n partFields: parts$b(),\n factory: make$3\n });\n\n const wrap = delegate => {\n const toCached = () => {\n return wrap(delegate.toCached());\n };\n const bindFuture = f => {\n return wrap(delegate.bind(resA => resA.fold(err => Future.pure(Result.error(err)), a => f(a))));\n };\n const bindResult = f => {\n return wrap(delegate.map(resA => resA.bind(f)));\n };\n const mapResult = f => {\n return wrap(delegate.map(resA => resA.map(f)));\n };\n const mapError = f => {\n return wrap(delegate.map(resA => resA.mapError(f)));\n };\n const foldResult = (whenError, whenValue) => {\n return delegate.map(res => res.fold(whenError, whenValue));\n };\n const withTimeout = (timeout, errorThunk) => {\n return wrap(Future.nu(callback => {\n let timedOut = false;\n const timer = setTimeout(() => {\n timedOut = true;\n callback(Result.error(errorThunk()));\n }, timeout);\n delegate.get(result => {\n if (!timedOut) {\n clearTimeout(timer);\n callback(result);\n }\n });\n }));\n };\n return {\n ...delegate,\n toCached,\n bindFuture,\n bindResult,\n mapResult,\n mapError,\n foldResult,\n withTimeout\n };\n };\n const nu$1 = worker => {\n return wrap(Future.nu(worker));\n };\n const value = value => {\n return wrap(Future.pure(Result.value(value)));\n };\n const error = error => {\n return wrap(Future.pure(Result.error(error)));\n };\n const fromResult = result => {\n return wrap(Future.pure(result));\n };\n const fromFuture = future => {\n return wrap(future.map(Result.value));\n };\n const fromPromise = promise => {\n return nu$1(completer => {\n promise.then(value => {\n completer(Result.value(value));\n }, error => {\n completer(Result.error(error));\n });\n });\n };\n const FutureResult = {\n nu: nu$1,\n wrap,\n pure: value,\n value,\n error,\n fromResult,\n fromFuture,\n fromPromise\n };\n\n const renderCommonSpec = (spec, actionOpt, extraBehaviours = [], dom, components, providersBackstage) => {\n const action = actionOpt.fold(() => ({}), action => ({ action }));\n const common = {\n buttonBehaviours: derive$1([\n DisablingConfigs.button(() => !spec.enabled || providersBackstage.isDisabled()),\n receivingConfig(),\n Tabstopping.config({}),\n config('button press', [\n preventDefault('click'),\n preventDefault('mousedown')\n ])\n ].concat(extraBehaviours)),\n eventOrder: {\n click: [\n 'button press',\n 'alloy.base.behaviour'\n ],\n mousedown: [\n 'button press',\n 'alloy.base.behaviour'\n ]\n },\n ...action\n };\n const domFinal = deepMerge(common, { dom });\n return deepMerge(domFinal, { components });\n };\n const renderIconButtonSpec = (spec, action, providersBackstage, extraBehaviours = []) => {\n const tooltipAttributes = spec.tooltip.map(tooltip => ({\n 'aria-label': providersBackstage.translate(tooltip),\n 'title': providersBackstage.translate(tooltip)\n })).getOr({});\n const dom = {\n tag: 'button',\n classes: ['tox-tbtn'],\n attributes: tooltipAttributes\n };\n const icon = spec.icon.map(iconName => renderIconFromPack$1(iconName, providersBackstage.icons));\n const components = componentRenderPipeline([icon]);\n return renderCommonSpec(spec, action, extraBehaviours, dom, components, providersBackstage);\n };\n const calculateClassesFromButtonType = buttonType => {\n switch (buttonType) {\n case 'primary':\n return ['tox-button'];\n case 'toolbar':\n return ['tox-tbtn'];\n case 'secondary':\n default:\n return [\n 'tox-button',\n 'tox-button--secondary'\n ];\n }\n };\n const renderButtonSpec = (spec, action, providersBackstage, extraBehaviours = [], extraClasses = []) => {\n const translatedText = providersBackstage.translate(spec.text);\n const icon = spec.icon.map(iconName => renderIconFromPack$1(iconName, providersBackstage.icons));\n const components = [icon.getOrThunk(() => text$2(translatedText))];\n const buttonType = spec.buttonType.getOr(!spec.primary && !spec.borderless ? 'secondary' : 'primary');\n const baseClasses = calculateClassesFromButtonType(buttonType);\n const classes = [\n ...baseClasses,\n ...icon.isSome() ? ['tox-button--icon'] : [],\n ...spec.borderless ? ['tox-button--naked'] : [],\n ...extraClasses\n ];\n const dom = {\n tag: 'button',\n classes,\n attributes: { title: translatedText }\n };\n return renderCommonSpec(spec, action, extraBehaviours, dom, components, providersBackstage);\n };\n const renderButton$1 = (spec, action, providersBackstage, extraBehaviours = [], extraClasses = []) => {\n const buttonSpec = renderButtonSpec(spec, Optional.some(action), providersBackstage, extraBehaviours, extraClasses);\n return Button.sketch(buttonSpec);\n };\n const getAction = (name, buttonType) => comp => {\n if (buttonType === 'custom') {\n emitWith(comp, formActionEvent, {\n name,\n value: {}\n });\n } else if (buttonType === 'submit') {\n emit(comp, formSubmitEvent);\n } else if (buttonType === 'cancel') {\n emit(comp, formCancelEvent);\n } else {\n console.error('Unknown button type: ', buttonType);\n }\n };\n const isMenuFooterButtonSpec = (spec, buttonType) => buttonType === 'menu';\n const isNormalFooterButtonSpec = (spec, buttonType) => buttonType === 'custom' || buttonType === 'cancel' || buttonType === 'submit';\n const isToggleButtonSpec = (spec, buttonType) => buttonType === 'togglebutton';\n const renderToggleButton = (spec, providers) => {\n var _a, _b;\n const optMemIcon = spec.icon.map(memIcon => renderReplaceableIconFromPack(memIcon, providers.icons)).map(record);\n const action = comp => {\n emitWith(comp, formActionEvent, {\n name: spec.name,\n value: {\n setIcon: newIcon => {\n optMemIcon.map(memIcon => memIcon.getOpt(comp).each(displayIcon => {\n Replacing.set(displayIcon, [renderReplaceableIconFromPack(newIcon, providers.icons)]);\n }));\n }\n }\n });\n };\n const buttonType = spec.buttonType.getOr(!spec.primary ? 'secondary' : 'primary');\n const buttonSpec = {\n ...spec,\n name: (_a = spec.name) !== null && _a !== void 0 ? _a : '',\n primary: buttonType === 'primary',\n tooltip: Optional.from(spec.tooltip),\n enabled: (_b = spec.enabled) !== null && _b !== void 0 ? _b : false,\n borderless: false\n };\n const tooltipAttributes = buttonSpec.tooltip.map(tooltip => ({\n 'aria-label': providers.translate(tooltip),\n 'title': providers.translate(tooltip)\n })).getOr({});\n const buttonTypeClasses = calculateClassesFromButtonType(buttonType !== null && buttonType !== void 0 ? buttonType : 'secondary');\n const showIconAndText = spec.icon.isSome() && spec.text.isSome();\n const dom = {\n tag: 'button',\n classes: [\n ...buttonTypeClasses.concat(spec.icon.isSome() ? ['tox-button--icon'] : []),\n ...spec.active ? ['tox-button--enabled'] : [],\n ...showIconAndText ? ['tox-button--icon-and-text'] : []\n ],\n attributes: tooltipAttributes\n };\n const extraBehaviours = [];\n const translatedText = providers.translate(spec.text.getOr(''));\n const translatedTextComponed = text$2(translatedText);\n const iconComp = componentRenderPipeline([optMemIcon.map(memIcon => memIcon.asSpec())]);\n const components = [\n ...iconComp,\n ...spec.text.isSome() ? [translatedTextComponed] : []\n ];\n const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, providers);\n return Button.sketch(iconButtonSpec);\n };\n const renderFooterButton = (spec, buttonType, backstage) => {\n if (isMenuFooterButtonSpec(spec, buttonType)) {\n const getButton = () => memButton;\n const menuButtonSpec = spec;\n const fixedSpec = {\n ...spec,\n type: 'menubutton',\n search: Optional.none(),\n onSetup: api => {\n api.setEnabled(spec.enabled);\n return noop;\n },\n fetch: getFetch(menuButtonSpec.items, getButton, backstage)\n };\n const memButton = record(renderMenuButton(fixedSpec, 'tox-tbtn', backstage, Optional.none()));\n return memButton.asSpec();\n } else if (isNormalFooterButtonSpec(spec, buttonType)) {\n const action = getAction(spec.name, buttonType);\n const buttonSpec = {\n ...spec,\n borderless: false\n };\n return renderButton$1(buttonSpec, action, backstage.shared.providers, []);\n } else if (isToggleButtonSpec(spec, buttonType)) {\n return renderToggleButton(spec, backstage.shared.providers);\n } else {\n console.error('Unknown footer button type: ', buttonType);\n throw new Error('Unknown footer button type');\n }\n };\n const renderDialogButton = (spec, providersBackstage) => {\n const action = getAction(spec.name, 'custom');\n return renderFormField(Optional.none(), FormField.parts.field({\n factory: Button,\n ...renderButtonSpec(spec, Optional.some(action), providersBackstage, [\n memory(''),\n ComposingConfigs.self()\n ])\n }));\n };\n\n const separator$1 = { type: 'separator' };\n const toMenuItem = target => ({\n type: 'menuitem',\n value: target.url,\n text: target.title,\n meta: { attach: target.attach },\n onAction: noop\n });\n const staticMenuItem = (title, url) => ({\n type: 'menuitem',\n value: url,\n text: title,\n meta: { attach: undefined },\n onAction: noop\n });\n const toMenuItems = targets => map$2(targets, toMenuItem);\n const filterLinkTargets = (type, targets) => filter$2(targets, target => target.type === type);\n const filteredTargets = (type, targets) => toMenuItems(filterLinkTargets(type, targets));\n const headerTargets = linkInfo => filteredTargets('header', linkInfo.targets);\n const anchorTargets = linkInfo => filteredTargets('anchor', linkInfo.targets);\n const anchorTargetTop = linkInfo => Optional.from(linkInfo.anchorTop).map(url => staticMenuItem('<top>', url)).toArray();\n const anchorTargetBottom = linkInfo => Optional.from(linkInfo.anchorBottom).map(url => staticMenuItem('<bottom>', url)).toArray();\n const historyTargets = history => map$2(history, url => staticMenuItem(url, url));\n const joinMenuLists = items => {\n return foldl(items, (a, b) => {\n const bothEmpty = a.length === 0 || b.length === 0;\n return bothEmpty ? a.concat(b) : a.concat(separator$1, b);\n }, []);\n };\n const filterByQuery = (term, menuItems) => {\n const lowerCaseTerm = term.toLowerCase();\n return filter$2(menuItems, item => {\n var _a;\n const text = item.meta !== undefined && item.meta.text !== undefined ? item.meta.text : item.text;\n const value = (_a = item.value) !== null && _a !== void 0 ? _a : '';\n return contains$1(text.toLowerCase(), lowerCaseTerm) || contains$1(value.toLowerCase(), lowerCaseTerm);\n });\n };\n\n const getItems = (fileType, input, urlBackstage) => {\n var _a, _b;\n const urlInputValue = Representing.getValue(input);\n const term = (_b = (_a = urlInputValue === null || urlInputValue === void 0 ? void 0 : urlInputValue.meta) === null || _a === void 0 ? void 0 : _a.text) !== null && _b !== void 0 ? _b : urlInputValue.value;\n const info = urlBackstage.getLinkInformation();\n return info.fold(() => [], linkInfo => {\n const history = filterByQuery(term, historyTargets(urlBackstage.getHistory(fileType)));\n return fileType === 'file' ? joinMenuLists([\n history,\n filterByQuery(term, headerTargets(linkInfo)),\n filterByQuery(term, flatten([\n anchorTargetTop(linkInfo),\n anchorTargets(linkInfo),\n anchorTargetBottom(linkInfo)\n ]))\n ]) : history;\n });\n };\n const errorId = generate$6('aria-invalid');\n const renderUrlInput = (spec, backstage, urlBackstage, initialData) => {\n const providersBackstage = backstage.shared.providers;\n const updateHistory = component => {\n const urlEntry = Representing.getValue(component);\n urlBackstage.addToHistory(urlEntry.value, spec.filetype);\n };\n const typeaheadSpec = {\n ...initialData.map(initialData => ({ initialData })).getOr({}),\n dismissOnBlur: true,\n inputClasses: ['tox-textfield'],\n sandboxClasses: ['tox-dialog__popups'],\n inputAttributes: {\n 'aria-errormessage': errorId,\n 'type': 'url'\n },\n minChars: 0,\n responseTime: 0,\n fetch: input => {\n const items = getItems(spec.filetype, input, urlBackstage);\n const tdata = build(items, ItemResponse$1.BUBBLE_TO_SANDBOX, backstage, {\n isHorizontalMenu: false,\n search: Optional.none()\n });\n return Future.pure(tdata);\n },\n getHotspot: comp => memUrlBox.getOpt(comp),\n onSetValue: (comp, _newValue) => {\n if (comp.hasConfigured(Invalidating)) {\n Invalidating.run(comp).get(noop);\n }\n },\n typeaheadBehaviours: derive$1([\n ...urlBackstage.getValidationHandler().map(handler => Invalidating.config({\n getRoot: comp => parentElement(comp.element),\n invalidClass: 'tox-control-wrap--status-invalid',\n notify: {\n onInvalid: (comp, err) => {\n memInvalidIcon.getOpt(comp).each(invalidComp => {\n set$9(invalidComp.element, 'title', providersBackstage.translate(err));\n });\n }\n },\n validator: {\n validate: input => {\n const urlEntry = Representing.getValue(input);\n return FutureResult.nu(completer => {\n handler({\n type: spec.filetype,\n url: urlEntry.value\n }, validation => {\n if (validation.status === 'invalid') {\n const err = Result.error(validation.message);\n completer(err);\n } else {\n const val = Result.value(validation.message);\n completer(val);\n }\n });\n });\n },\n validateOnLoad: false\n }\n })).toArray(),\n Disabling.config({ disabled: () => !spec.enabled || providersBackstage.isDisabled() }),\n Tabstopping.config({}),\n config('urlinput-events', [\n run$1(input(), comp => {\n const currentValue = get$6(comp.element);\n const trimmedValue = currentValue.trim();\n if (trimmedValue !== currentValue) {\n set$5(comp.element, trimmedValue);\n }\n if (spec.filetype === 'file') {\n emitWith(comp, formChangeEvent, { name: spec.name });\n }\n }),\n run$1(change(), comp => {\n emitWith(comp, formChangeEvent, { name: spec.name });\n updateHistory(comp);\n }),\n run$1(postPaste(), comp => {\n emitWith(comp, formChangeEvent, { name: spec.name });\n updateHistory(comp);\n })\n ])\n ]),\n eventOrder: {\n [input()]: [\n 'streaming',\n 'urlinput-events',\n 'invalidating'\n ]\n },\n model: {\n getDisplayText: itemData => itemData.value,\n selectsOver: false,\n populateFromBrowse: false\n },\n markers: { openClass: 'tox-textfield--popup-open' },\n lazySink: backstage.shared.getSink,\n parts: { menu: part(false, 1, 'normal') },\n onExecute: (_menu, component, _entry) => {\n emitWith(component, formSubmitEvent, {});\n },\n onItemExecute: (typeahead, _sandbox, _item, _value) => {\n updateHistory(typeahead);\n emitWith(typeahead, formChangeEvent, { name: spec.name });\n }\n };\n const pField = FormField.parts.field({\n ...typeaheadSpec,\n factory: Typeahead\n });\n const pLabel = spec.label.map(label => renderLabel$3(label, providersBackstage));\n const makeIcon = (name, errId, icon = name, label = name) => render$3(icon, {\n tag: 'div',\n classes: [\n 'tox-icon',\n 'tox-control-wrap__status-icon-' + name\n ],\n attributes: {\n 'title': providersBackstage.translate(label),\n 'aria-live': 'polite',\n ...errId.fold(() => ({}), id => ({ id }))\n }\n }, providersBackstage.icons);\n const memInvalidIcon = record(makeIcon('invalid', Optional.some(errorId), 'warning'));\n const memStatus = record({\n dom: {\n tag: 'div',\n classes: ['tox-control-wrap__status-icon-wrap']\n },\n components: [memInvalidIcon.asSpec()]\n });\n const optUrlPicker = urlBackstage.getUrlPicker(spec.filetype);\n const browseUrlEvent = generate$6('browser.url.event');\n const memUrlBox = record({\n dom: {\n tag: 'div',\n classes: ['tox-control-wrap']\n },\n components: [\n pField,\n memStatus.asSpec()\n ],\n behaviours: derive$1([Disabling.config({ disabled: () => !spec.enabled || providersBackstage.isDisabled() })])\n });\n const memUrlPickerButton = record(renderButton$1({\n name: spec.name,\n icon: Optional.some('browse'),\n text: spec.picker_text.or(spec.label).getOr(''),\n enabled: spec.enabled,\n primary: false,\n buttonType: Optional.none(),\n borderless: true\n }, component => emit(component, browseUrlEvent), providersBackstage, [], ['tox-browse-url']));\n const controlHWrapper = () => ({\n dom: {\n tag: 'div',\n classes: ['tox-form__controls-h-stack']\n },\n components: flatten([\n [memUrlBox.asSpec()],\n optUrlPicker.map(() => memUrlPickerButton.asSpec()).toArray()\n ])\n });\n const openUrlPicker = comp => {\n Composing.getCurrent(comp).each(field => {\n const componentData = Representing.getValue(field);\n const urlData = {\n fieldname: spec.name,\n ...componentData\n };\n optUrlPicker.each(picker => {\n picker(urlData).get(chosenData => {\n Representing.setValue(field, chosenData);\n emitWith(comp, formChangeEvent, { name: spec.name });\n });\n });\n });\n };\n return FormField.sketch({\n dom: renderFormFieldDom(),\n components: pLabel.toArray().concat([controlHWrapper()]),\n fieldBehaviours: derive$1([\n Disabling.config({\n disabled: () => !spec.enabled || providersBackstage.isDisabled(),\n onDisabled: comp => {\n FormField.getField(comp).each(Disabling.disable);\n memUrlPickerButton.getOpt(comp).each(Disabling.disable);\n },\n onEnabled: comp => {\n FormField.getField(comp).each(Disabling.enable);\n memUrlPickerButton.getOpt(comp).each(Disabling.enable);\n }\n }),\n receivingConfig(),\n config('url-input-events', [run$1(browseUrlEvent, openUrlPicker)])\n ])\n });\n };\n\n const renderAlertBanner = (spec, providersBackstage) => {\n const icon = get$2(spec.icon, providersBackstage.icons);\n return Container.sketch({\n dom: {\n tag: 'div',\n attributes: { role: 'alert' },\n classes: [\n 'tox-notification',\n 'tox-notification--in',\n `tox-notification--${ spec.level }`\n ]\n },\n components: [\n {\n dom: {\n tag: 'div',\n classes: ['tox-notification__icon'],\n innerHtml: !spec.url ? icon : undefined\n },\n components: spec.url ? [Button.sketch({\n dom: {\n tag: 'button',\n classes: [\n 'tox-button',\n 'tox-button--naked',\n 'tox-button--icon'\n ],\n innerHtml: icon,\n attributes: { title: providersBackstage.translate(spec.iconTooltip) }\n },\n action: comp => emitWith(comp, formActionEvent, {\n name: 'alert-banner',\n value: spec.url\n }),\n buttonBehaviours: derive$1([addFocusableBehaviour()])\n })] : undefined\n },\n {\n dom: {\n tag: 'div',\n classes: ['tox-notification__body'],\n innerHtml: providersBackstage.translate(spec.text)\n }\n }\n ]\n });\n };\n\n const set$1 = (element, status) => {\n element.dom.checked = status;\n };\n const get$1 = element => element.dom.checked;\n\n const renderCheckbox = (spec, providerBackstage, initialData) => {\n const toggleCheckboxHandler = comp => {\n comp.element.dom.click();\n return Optional.some(true);\n };\n const pField = FormField.parts.field({\n factory: { sketch: identity },\n dom: {\n tag: 'input',\n classes: ['tox-checkbox__input'],\n attributes: { type: 'checkbox' }\n },\n behaviours: derive$1([\n ComposingConfigs.self(),\n Disabling.config({\n disabled: () => !spec.enabled || providerBackstage.isDisabled(),\n onDisabled: component => {\n parentElement(component.element).each(element => add$2(element, 'tox-checkbox--disabled'));\n },\n onEnabled: component => {\n parentElement(component.element).each(element => remove$2(element, 'tox-checkbox--disabled'));\n }\n }),\n Tabstopping.config({}),\n Focusing.config({}),\n withElement(initialData, get$1, set$1),\n Keying.config({\n mode: 'special',\n onEnter: toggleCheckboxHandler,\n onSpace: toggleCheckboxHandler,\n stopSpaceKeyup: true\n }),\n config('checkbox-events', [run$1(change(), (component, _) => {\n emitWith(component, formChangeEvent, { name: spec.name });\n })])\n ])\n });\n const pLabel = FormField.parts.label({\n dom: {\n tag: 'span',\n classes: ['tox-checkbox__label']\n },\n components: [text$2(providerBackstage.translate(spec.label))],\n behaviours: derive$1([Unselecting.config({})])\n });\n const makeIcon = className => {\n const iconName = className === 'checked' ? 'selected' : 'unselected';\n return render$3(iconName, {\n tag: 'span',\n classes: [\n 'tox-icon',\n 'tox-checkbox-icon__' + className\n ]\n }, providerBackstage.icons);\n };\n const memIcons = record({\n dom: {\n tag: 'div',\n classes: ['tox-checkbox__icons']\n },\n components: [\n makeIcon('checked'),\n makeIcon('unchecked')\n ]\n });\n return FormField.sketch({\n dom: {\n tag: 'label',\n classes: ['tox-checkbox']\n },\n components: [\n pField,\n memIcons.asSpec(),\n pLabel\n ],\n fieldBehaviours: derive$1([\n Disabling.config({ disabled: () => !spec.enabled || providerBackstage.isDisabled() }),\n receivingConfig()\n ])\n });\n };\n\n const renderHtmlPanel = spec => {\n if (spec.presets === 'presentation') {\n return Container.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-form__group'],\n innerHtml: spec.html\n }\n });\n } else {\n return Container.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-form__group'],\n innerHtml: spec.html,\n attributes: { role: 'document' }\n },\n containerBehaviours: derive$1([\n Tabstopping.config({}),\n Focusing.config({})\n ])\n });\n }\n };\n\n const make$2 = render => {\n return (parts, spec, dialogData, backstage) => get$g(spec, 'name').fold(() => render(spec, backstage, Optional.none()), fieldName => parts.field(fieldName, render(spec, backstage, get$g(dialogData, fieldName))));\n };\n const makeIframe = render => (parts, spec, dialogData, backstage) => {\n const iframeSpec = deepMerge(spec, { source: 'dynamic' });\n return make$2(render)(parts, iframeSpec, dialogData, backstage);\n };\n const factories = {\n bar: make$2((spec, backstage) => renderBar(spec, backstage.shared)),\n collection: make$2((spec, backstage, data) => renderCollection(spec, backstage.shared.providers, data)),\n alertbanner: make$2((spec, backstage) => renderAlertBanner(spec, backstage.shared.providers)),\n input: make$2((spec, backstage, data) => renderInput(spec, backstage.shared.providers, data)),\n textarea: make$2((spec, backstage, data) => renderTextarea(spec, backstage.shared.providers, data)),\n label: make$2((spec, backstage) => renderLabel$2(spec, backstage.shared)),\n iframe: makeIframe((spec, backstage, data) => renderIFrame(spec, backstage.shared.providers, data)),\n button: make$2((spec, backstage) => renderDialogButton(spec, backstage.shared.providers)),\n checkbox: make$2((spec, backstage, data) => renderCheckbox(spec, backstage.shared.providers, data)),\n colorinput: make$2((spec, backstage, data) => renderColorInput(spec, backstage.shared, backstage.colorinput, data)),\n colorpicker: make$2((spec, backstage, data) => renderColorPicker(spec, backstage.shared.providers, data)),\n dropzone: make$2((spec, backstage, data) => renderDropZone(spec, backstage.shared.providers, data)),\n grid: make$2((spec, backstage) => renderGrid(spec, backstage.shared)),\n listbox: make$2((spec, backstage, data) => renderListBox(spec, backstage, data)),\n selectbox: make$2((spec, backstage, data) => renderSelectBox(spec, backstage.shared.providers, data)),\n sizeinput: make$2((spec, backstage) => renderSizeInput(spec, backstage.shared.providers)),\n slider: make$2((spec, backstage, data) => renderSlider(spec, backstage.shared.providers, data)),\n urlinput: make$2((spec, backstage, data) => renderUrlInput(spec, backstage, backstage.urlinput, data)),\n customeditor: make$2(renderCustomEditor),\n htmlpanel: make$2(renderHtmlPanel),\n imagepreview: make$2((spec, _, data) => renderImagePreview(spec, data)),\n table: make$2((spec, backstage) => renderTable(spec, backstage.shared.providers)),\n tree: make$2((spec, backstage) => renderTree(spec, backstage)),\n panel: make$2((spec, backstage) => renderPanel(spec, backstage))\n };\n const noFormParts = {\n field: (_name, spec) => spec,\n record: constant$1([])\n };\n const interpretInForm = (parts, spec, dialogData, oldBackstage) => {\n const newBackstage = deepMerge(oldBackstage, { shared: { interpreter: childSpec => interpretParts(parts, childSpec, dialogData, newBackstage) } });\n return interpretParts(parts, spec, dialogData, newBackstage);\n };\n const interpretParts = (parts, spec, dialogData, backstage) => get$g(factories, spec.type).fold(() => {\n console.error(`Unknown factory type \"${ spec.type }\", defaulting to container: `, spec);\n return spec;\n }, factory => factory(parts, spec, dialogData, backstage));\n const interpretWithoutForm = (spec, dialogData, backstage) => interpretParts(noFormParts, spec, dialogData, backstage);\n\n const labelPrefix = 'layout-inset';\n const westEdgeX = anchor => anchor.x;\n const middleX = (anchor, element) => anchor.x + anchor.width / 2 - element.width / 2;\n const eastEdgeX = (anchor, element) => anchor.x + anchor.width - element.width;\n const northY = anchor => anchor.y;\n const southY = (anchor, element) => anchor.y + anchor.height - element.height;\n const centreY = (anchor, element) => anchor.y + anchor.height / 2 - element.height / 2;\n const southwest = (anchor, element, bubbles) => nu$6(eastEdgeX(anchor, element), southY(anchor, element), bubbles.insetSouthwest(), northwest$3(), 'southwest', boundsRestriction(anchor, {\n right: 0,\n bottom: 3\n }), labelPrefix);\n const southeast = (anchor, element, bubbles) => nu$6(westEdgeX(anchor), southY(anchor, element), bubbles.insetSoutheast(), northeast$3(), 'southeast', boundsRestriction(anchor, {\n left: 1,\n bottom: 3\n }), labelPrefix);\n const northwest = (anchor, element, bubbles) => nu$6(eastEdgeX(anchor, element), northY(anchor), bubbles.insetNorthwest(), southwest$3(), 'northwest', boundsRestriction(anchor, {\n right: 0,\n top: 2\n }), labelPrefix);\n const northeast = (anchor, element, bubbles) => nu$6(westEdgeX(anchor), northY(anchor), bubbles.insetNortheast(), southeast$3(), 'northeast', boundsRestriction(anchor, {\n left: 1,\n top: 2\n }), labelPrefix);\n const north = (anchor, element, bubbles) => nu$6(middleX(anchor, element), northY(anchor), bubbles.insetNorth(), south$3(), 'north', boundsRestriction(anchor, { top: 2 }), labelPrefix);\n const south = (anchor, element, bubbles) => nu$6(middleX(anchor, element), southY(anchor, element), bubbles.insetSouth(), north$3(), 'south', boundsRestriction(anchor, { bottom: 3 }), labelPrefix);\n const east = (anchor, element, bubbles) => nu$6(eastEdgeX(anchor, element), centreY(anchor, element), bubbles.insetEast(), west$3(), 'east', boundsRestriction(anchor, { right: 0 }), labelPrefix);\n const west = (anchor, element, bubbles) => nu$6(westEdgeX(anchor), centreY(anchor, element), bubbles.insetWest(), east$3(), 'west', boundsRestriction(anchor, { left: 1 }), labelPrefix);\n const lookupPreserveLayout = lastPlacement => {\n switch (lastPlacement) {\n case 'north':\n return north;\n case 'northeast':\n return northeast;\n case 'northwest':\n return northwest;\n case 'south':\n return south;\n case 'southeast':\n return southeast;\n case 'southwest':\n return southwest;\n case 'east':\n return east;\n case 'west':\n return west;\n }\n };\n const preserve = (anchor, element, bubbles, placee, bounds) => {\n const layout = getPlacement(placee).map(lookupPreserveLayout).getOr(north);\n return layout(anchor, element, bubbles, placee, bounds);\n };\n const lookupFlippedLayout = lastPlacement => {\n switch (lastPlacement) {\n case 'north':\n return south;\n case 'northeast':\n return southeast;\n case 'northwest':\n return southwest;\n case 'south':\n return north;\n case 'southeast':\n return northeast;\n case 'southwest':\n return northwest;\n case 'east':\n return west;\n case 'west':\n return east;\n }\n };\n const flip = (anchor, element, bubbles, placee, bounds) => {\n const layout = getPlacement(placee).map(lookupFlippedLayout).getOr(north);\n return layout(anchor, element, bubbles, placee, bounds);\n };\n\n const bubbleAlignments$2 = {\n valignCentre: [],\n alignCentre: [],\n alignLeft: [],\n alignRight: [],\n right: [],\n left: [],\n bottom: [],\n top: []\n };\n const getInlineDialogAnchor = (contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor) => {\n const bubbleSize = 12;\n const overrides = { maxHeightFunction: expandable$1() };\n const editableAreaAnchor = () => ({\n type: 'node',\n root: getContentContainer(getRootNode(contentAreaElement())),\n node: Optional.from(contentAreaElement()),\n bubble: nu$5(bubbleSize, bubbleSize, bubbleAlignments$2),\n layouts: {\n onRtl: () => [northeast],\n onLtr: () => [northwest]\n },\n overrides\n });\n const standardAnchor = () => ({\n type: 'hotspot',\n hotspot: lazyAnchorbar(),\n bubble: nu$5(-bubbleSize, bubbleSize, bubbleAlignments$2),\n layouts: {\n onRtl: () => [\n southeast$2,\n southwest$2,\n south$2\n ],\n onLtr: () => [\n southwest$2,\n southeast$2,\n south$2\n ]\n },\n overrides\n });\n return () => lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();\n };\n const getInlineBottomDialogAnchor = (inline, contentAreaElement, lazyBottomAnchorBar, lazyUseEditableAreaAnchor) => {\n const bubbleSize = 12;\n const overrides = { maxHeightFunction: expandable$1() };\n const editableAreaAnchor = () => ({\n type: 'node',\n root: getContentContainer(getRootNode(contentAreaElement())),\n node: Optional.from(contentAreaElement()),\n bubble: nu$5(bubbleSize, bubbleSize, bubbleAlignments$2),\n layouts: {\n onRtl: () => [north],\n onLtr: () => [north]\n },\n overrides\n });\n const standardAnchor = () => inline ? {\n type: 'node',\n root: getContentContainer(getRootNode(contentAreaElement())),\n node: Optional.from(contentAreaElement()),\n bubble: nu$5(0, -getOuter$2(contentAreaElement()), bubbleAlignments$2),\n layouts: {\n onRtl: () => [north$2],\n onLtr: () => [north$2]\n },\n overrides\n } : {\n type: 'hotspot',\n hotspot: lazyBottomAnchorBar(),\n bubble: nu$5(0, 0, bubbleAlignments$2),\n layouts: {\n onRtl: () => [north$2],\n onLtr: () => [north$2]\n },\n overrides\n };\n return () => lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();\n };\n const getBannerAnchor = (contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor) => {\n const editableAreaAnchor = () => ({\n type: 'node',\n root: getContentContainer(getRootNode(contentAreaElement())),\n node: Optional.from(contentAreaElement()),\n layouts: {\n onRtl: () => [north],\n onLtr: () => [north]\n }\n });\n const standardAnchor = () => ({\n type: 'hotspot',\n hotspot: lazyAnchorbar(),\n layouts: {\n onRtl: () => [south$2],\n onLtr: () => [south$2]\n }\n });\n return () => lazyUseEditableAreaAnchor() ? editableAreaAnchor() : standardAnchor();\n };\n const getCursorAnchor = (editor, bodyElement) => () => ({\n type: 'selection',\n root: bodyElement(),\n getSelection: () => {\n const rng = editor.selection.getRng();\n const selectedCells = editor.model.table.getSelectedCells();\n if (selectedCells.length > 1) {\n const firstCell = selectedCells[0];\n const lastCell = selectedCells[selectedCells.length - 1];\n const selectionTableCellRange = {\n firstCell: SugarElement.fromDom(firstCell),\n lastCell: SugarElement.fromDom(lastCell)\n };\n return Optional.some(selectionTableCellRange);\n }\n return Optional.some(SimSelection.range(SugarElement.fromDom(rng.startContainer), rng.startOffset, SugarElement.fromDom(rng.endContainer), rng.endOffset));\n }\n });\n const getNodeAnchor$1 = bodyElement => element => ({\n type: 'node',\n root: bodyElement(),\n node: element\n });\n const getAnchors = (editor, lazyAnchorbar, lazyBottomAnchorBar, isToolbarTop) => {\n const useFixedToolbarContainer = useFixedContainer(editor);\n const bodyElement = () => SugarElement.fromDom(editor.getBody());\n const contentAreaElement = () => SugarElement.fromDom(editor.getContentAreaContainer());\n const lazyUseEditableAreaAnchor = () => useFixedToolbarContainer || !isToolbarTop();\n return {\n inlineDialog: getInlineDialogAnchor(contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor),\n inlineBottomDialog: getInlineBottomDialogAnchor(editor.inline, contentAreaElement, lazyBottomAnchorBar, lazyUseEditableAreaAnchor),\n banner: getBannerAnchor(contentAreaElement, lazyAnchorbar, lazyUseEditableAreaAnchor),\n cursor: getCursorAnchor(editor, bodyElement),\n node: getNodeAnchor$1(bodyElement)\n };\n };\n\n const colorPicker = editor => (callback, value) => {\n const dialog = colorPickerDialog(editor);\n dialog(callback, value);\n };\n const hasCustomColors = editor => () => hasCustomColors$1(editor);\n const getColors = editor => id => getColors$2(editor, id);\n const getColorCols = editor => id => getColorCols$1(editor, id);\n const ColorInputBackstage = editor => ({\n colorPicker: colorPicker(editor),\n hasCustomColors: hasCustomColors(editor),\n getColors: getColors(editor),\n getColorCols: getColorCols(editor)\n });\n\n const isDraggableModal = editor => () => isDraggableModal$1(editor);\n const DialogBackstage = editor => ({ isDraggableModal: isDraggableModal(editor) });\n\n const HeaderBackstage = editor => {\n const mode = Cell(isToolbarLocationBottom(editor) ? 'bottom' : 'top');\n return {\n isPositionedAtTop: () => mode.get() === 'top',\n getDockingMode: mode.get,\n setDockingMode: mode.set\n };\n };\n\n const isNestedFormat = format => hasNonNullableKey(format, 'items');\n const isFormatReference = format => hasNonNullableKey(format, 'format');\n const defaultStyleFormats = [\n {\n title: 'Headings',\n items: [\n {\n title: 'Heading 1',\n format: 'h1'\n },\n {\n title: 'Heading 2',\n format: 'h2'\n },\n {\n title: 'Heading 3',\n format: 'h3'\n },\n {\n title: 'Heading 4',\n format: 'h4'\n },\n {\n title: 'Heading 5',\n format: 'h5'\n },\n {\n title: 'Heading 6',\n format: 'h6'\n }\n ]\n },\n {\n title: 'Inline',\n items: [\n {\n title: 'Bold',\n format: 'bold'\n },\n {\n title: 'Italic',\n format: 'italic'\n },\n {\n title: 'Underline',\n format: 'underline'\n },\n {\n title: 'Strikethrough',\n format: 'strikethrough'\n },\n {\n title: 'Superscript',\n format: 'superscript'\n },\n {\n title: 'Subscript',\n format: 'subscript'\n },\n {\n title: 'Code',\n format: 'code'\n }\n ]\n },\n {\n title: 'Blocks',\n items: [\n {\n title: 'Paragraph',\n format: 'p'\n },\n {\n title: 'Blockquote',\n format: 'blockquote'\n },\n {\n title: 'Div',\n format: 'div'\n },\n {\n title: 'Pre',\n format: 'pre'\n }\n ]\n },\n {\n title: 'Align',\n items: [\n {\n title: 'Left',\n format: 'alignleft'\n },\n {\n title: 'Center',\n format: 'aligncenter'\n },\n {\n title: 'Right',\n format: 'alignright'\n },\n {\n title: 'Justify',\n format: 'alignjustify'\n }\n ]\n }\n ];\n const isNestedFormats = format => has$2(format, 'items');\n const isBlockFormat = format => has$2(format, 'block');\n const isInlineFormat = format => has$2(format, 'inline');\n const isSelectorFormat = format => has$2(format, 'selector');\n const mapFormats = userFormats => foldl(userFormats, (acc, fmt) => {\n if (isNestedFormats(fmt)) {\n const result = mapFormats(fmt.items);\n return {\n customFormats: acc.customFormats.concat(result.customFormats),\n formats: acc.formats.concat([{\n title: fmt.title,\n items: result.formats\n }])\n };\n } else if (isInlineFormat(fmt) || isBlockFormat(fmt) || isSelectorFormat(fmt)) {\n const formatName = isString(fmt.name) ? fmt.name : fmt.title.toLowerCase();\n const formatNameWithPrefix = `custom-${ formatName }`;\n return {\n customFormats: acc.customFormats.concat([{\n name: formatNameWithPrefix,\n format: fmt\n }]),\n formats: acc.formats.concat([{\n title: fmt.title,\n format: formatNameWithPrefix,\n icon: fmt.icon\n }])\n };\n } else {\n return {\n ...acc,\n formats: acc.formats.concat(fmt)\n };\n }\n }, {\n customFormats: [],\n formats: []\n });\n const registerCustomFormats = (editor, userFormats) => {\n const result = mapFormats(userFormats);\n const registerFormats = customFormats => {\n each$1(customFormats, fmt => {\n if (!editor.formatter.has(fmt.name)) {\n editor.formatter.register(fmt.name, fmt.format);\n }\n });\n };\n if (editor.formatter) {\n registerFormats(result.customFormats);\n } else {\n editor.on('init', () => {\n registerFormats(result.customFormats);\n });\n }\n return result.formats;\n };\n const getStyleFormats = editor => getUserStyleFormats(editor).map(userFormats => {\n const registeredUserFormats = registerCustomFormats(editor, userFormats);\n return shouldMergeStyleFormats(editor) ? defaultStyleFormats.concat(registeredUserFormats) : registeredUserFormats;\n }).getOr(defaultStyleFormats);\n\n const isSeparator$1 = format => {\n const keys$1 = keys(format);\n return keys$1.length === 1 && contains$2(keys$1, 'title');\n };\n const processBasic = (item, isSelectedFor, getPreviewFor) => ({\n ...item,\n type: 'formatter',\n isSelected: isSelectedFor(item.format),\n getStylePreview: getPreviewFor(item.format)\n });\n const register$a = (editor, formats, isSelectedFor, getPreviewFor) => {\n const enrichSupported = item => processBasic(item, isSelectedFor, getPreviewFor);\n const enrichMenu = item => {\n const newItems = doEnrich(item.items);\n return {\n ...item,\n type: 'submenu',\n getStyleItems: constant$1(newItems)\n };\n };\n const enrichCustom = item => {\n const formatName = isString(item.name) ? item.name : generate$6(item.title);\n const formatNameWithPrefix = `custom-${ formatName }`;\n const newItem = {\n ...item,\n type: 'formatter',\n format: formatNameWithPrefix,\n isSelected: isSelectedFor(formatNameWithPrefix),\n getStylePreview: getPreviewFor(formatNameWithPrefix)\n };\n editor.formatter.register(formatName, newItem);\n return newItem;\n };\n const doEnrich = items => map$2(items, item => {\n if (isNestedFormat(item)) {\n return enrichMenu(item);\n } else if (isFormatReference(item)) {\n return enrichSupported(item);\n } else if (isSeparator$1(item)) {\n return {\n ...item,\n type: 'separator'\n };\n } else {\n return enrichCustom(item);\n }\n });\n return doEnrich(formats);\n };\n\n const init$7 = editor => {\n const isSelectedFor = format => () => editor.formatter.match(format);\n const getPreviewFor = format => () => {\n const fmt = editor.formatter.get(format);\n return fmt !== undefined ? Optional.some({\n tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',\n styles: editor.dom.parseStyle(editor.formatter.getCssText(format))\n }) : Optional.none();\n };\n const settingsFormats = Cell([]);\n const eventsFormats = Cell([]);\n const replaceSettings = Cell(false);\n editor.on('PreInit', _e => {\n const formats = getStyleFormats(editor);\n const enriched = register$a(editor, formats, isSelectedFor, getPreviewFor);\n settingsFormats.set(enriched);\n });\n editor.on('addStyleModifications', e => {\n const modifications = register$a(editor, e.items, isSelectedFor, getPreviewFor);\n eventsFormats.set(modifications);\n replaceSettings.set(e.replace);\n });\n const getData = () => {\n const fromSettings = replaceSettings.get() ? [] : settingsFormats.get();\n const fromEvents = eventsFormats.get();\n return fromSettings.concat(fromEvents);\n };\n return { getData };\n };\n\n const isElement = node => isNonNullable(node) && node.nodeType === 1;\n const trim = global$1.trim;\n const hasContentEditableState = value => {\n return node => {\n if (isElement(node)) {\n if (node.contentEditable === value) {\n return true;\n }\n if (node.getAttribute('data-mce-contenteditable') === value) {\n return true;\n }\n }\n return false;\n };\n };\n const isContentEditableTrue = hasContentEditableState('true');\n const isContentEditableFalse = hasContentEditableState('false');\n const create = (type, title, url, level, attach) => ({\n type,\n title,\n url,\n level,\n attach\n });\n const isChildOfContentEditableTrue = node => {\n let tempNode = node;\n while (tempNode = tempNode.parentNode) {\n const value = tempNode.contentEditable;\n if (value && value !== 'inherit') {\n return isContentEditableTrue(tempNode);\n }\n }\n return false;\n };\n const select = (selector, root) => {\n return map$2(descendants(SugarElement.fromDom(root), selector), element => {\n return element.dom;\n });\n };\n const getElementText = elm => {\n return elm.innerText || elm.textContent;\n };\n const getOrGenerateId = elm => {\n return elm.id ? elm.id : generate$6('h');\n };\n const isAnchor = elm => {\n return elm && elm.nodeName === 'A' && (elm.id || elm.name) !== undefined;\n };\n const isValidAnchor = elm => {\n return isAnchor(elm) && isEditable(elm);\n };\n const isHeader = elm => {\n return elm && /^(H[1-6])$/.test(elm.nodeName);\n };\n const isEditable = elm => {\n return isChildOfContentEditableTrue(elm) && !isContentEditableFalse(elm);\n };\n const isValidHeader = elm => {\n return isHeader(elm) && isEditable(elm);\n };\n const getLevel = elm => {\n return isHeader(elm) ? parseInt(elm.nodeName.substr(1), 10) : 0;\n };\n const headerTarget = elm => {\n var _a;\n const headerId = getOrGenerateId(elm);\n const attach = () => {\n elm.id = headerId;\n };\n return create('header', (_a = getElementText(elm)) !== null && _a !== void 0 ? _a : '', '#' + headerId, getLevel(elm), attach);\n };\n const anchorTarget = elm => {\n const anchorId = elm.id || elm.name;\n const anchorText = getElementText(elm);\n return create('anchor', anchorText ? anchorText : '#' + anchorId, '#' + anchorId, 0, noop);\n };\n const getHeaderTargets = elms => {\n return map$2(filter$2(elms, isValidHeader), headerTarget);\n };\n const getAnchorTargets = elms => {\n return map$2(filter$2(elms, isValidAnchor), anchorTarget);\n };\n const getTargetElements = elm => {\n const elms = select('h1,h2,h3,h4,h5,h6,a:not([href])', elm);\n return elms;\n };\n const hasTitle = target => {\n return trim(target.title).length > 0;\n };\n const find = elm => {\n const elms = getTargetElements(elm);\n return filter$2(getHeaderTargets(elms).concat(getAnchorTargets(elms)), hasTitle);\n };\n const LinkTargets = { find };\n\n const STORAGE_KEY = 'tinymce-url-history';\n const HISTORY_LENGTH = 5;\n const isHttpUrl = url => isString(url) && /^https?/.test(url);\n const isArrayOfUrl = a => isArray(a) && a.length <= HISTORY_LENGTH && forall(a, isHttpUrl);\n const isRecordOfUrlArray = r => isObject(r) && find$4(r, value => !isArrayOfUrl(value)).isNone();\n const getAllHistory = () => {\n const unparsedHistory = global$4.getItem(STORAGE_KEY);\n if (unparsedHistory === null) {\n return {};\n }\n let history;\n try {\n history = JSON.parse(unparsedHistory);\n } catch (e) {\n if (e instanceof SyntaxError) {\n console.log('Local storage ' + STORAGE_KEY + ' was not valid JSON', e);\n return {};\n }\n throw e;\n }\n if (!isRecordOfUrlArray(history)) {\n console.log('Local storage ' + STORAGE_KEY + ' was not valid format', history);\n return {};\n }\n return history;\n };\n const setAllHistory = history => {\n if (!isRecordOfUrlArray(history)) {\n throw new Error('Bad format for history:\\n' + JSON.stringify(history));\n }\n global$4.setItem(STORAGE_KEY, JSON.stringify(history));\n };\n const getHistory = fileType => {\n const history = getAllHistory();\n return get$g(history, fileType).getOr([]);\n };\n const addToHistory = (url, fileType) => {\n if (!isHttpUrl(url)) {\n return;\n }\n const history = getAllHistory();\n const items = get$g(history, fileType).getOr([]);\n const itemsWithoutUrl = filter$2(items, item => item !== url);\n history[fileType] = [url].concat(itemsWithoutUrl).slice(0, HISTORY_LENGTH);\n setAllHistory(history);\n };\n\n const isTruthy = value => !!value;\n const makeMap = value => map$1(global$1.makeMap(value, /[, ]/), isTruthy);\n const getPicker = editor => Optional.from(getFilePickerCallback(editor));\n const getPickerTypes = editor => {\n const optFileTypes = Optional.from(getFilePickerTypes(editor)).filter(isTruthy).map(makeMap);\n return getPicker(editor).fold(never, _picker => optFileTypes.fold(always, types => keys(types).length > 0 ? types : false));\n };\n const getPickerSetting = (editor, filetype) => {\n const pickerTypes = getPickerTypes(editor);\n if (isBoolean(pickerTypes)) {\n return pickerTypes ? getPicker(editor) : Optional.none();\n } else {\n return pickerTypes[filetype] ? getPicker(editor) : Optional.none();\n }\n };\n const getUrlPicker = (editor, filetype) => getPickerSetting(editor, filetype).map(picker => entry => Future.nu(completer => {\n const handler = (value, meta) => {\n if (!isString(value)) {\n throw new Error('Expected value to be string');\n }\n if (meta !== undefined && !isObject(meta)) {\n throw new Error('Expected meta to be a object');\n }\n const r = {\n value,\n meta\n };\n completer(r);\n };\n const meta = {\n filetype,\n fieldname: entry.fieldname,\n ...Optional.from(entry.meta).getOr({})\n };\n picker.call(editor, handler, entry.value, meta);\n }));\n const getTextSetting = value => Optional.from(value).filter(isString).getOrUndefined();\n const getLinkInformation = editor => {\n if (!useTypeaheadUrls(editor)) {\n return Optional.none();\n }\n return Optional.some({\n targets: LinkTargets.find(editor.getBody()),\n anchorTop: getTextSetting(getAnchorTop(editor)),\n anchorBottom: getTextSetting(getAnchorBottom(editor))\n });\n };\n const getValidationHandler = editor => Optional.from(getFilePickerValidatorHandler(editor));\n const UrlInputBackstage = editor => ({\n getHistory,\n addToHistory,\n getLinkInformation: () => getLinkInformation(editor),\n getValidationHandler: () => getValidationHandler(editor),\n getUrlPicker: filetype => getUrlPicker(editor, filetype)\n });\n\n const init$6 = (lazySinks, editor, lazyAnchorbar, lazyBottomAnchorBar) => {\n const contextMenuState = Cell(false);\n const toolbar = HeaderBackstage(editor);\n const providers = {\n icons: () => editor.ui.registry.getAll().icons,\n menuItems: () => editor.ui.registry.getAll().menuItems,\n translate: global$8.translate,\n isDisabled: () => editor.mode.isReadOnly() || !editor.ui.isEnabled(),\n getOption: editor.options.get\n };\n const urlinput = UrlInputBackstage(editor);\n const styles = init$7(editor);\n const colorinput = ColorInputBackstage(editor);\n const dialogSettings = DialogBackstage(editor);\n const isContextMenuOpen = () => contextMenuState.get();\n const setContextMenuState = state => contextMenuState.set(state);\n const commonBackstage = {\n shared: {\n providers,\n anchors: getAnchors(editor, lazyAnchorbar, lazyBottomAnchorBar, toolbar.isPositionedAtTop),\n header: toolbar\n },\n urlinput,\n styles,\n colorinput,\n dialog: dialogSettings,\n isContextMenuOpen,\n setContextMenuState\n };\n const popupBackstage = {\n ...commonBackstage,\n shared: {\n ...commonBackstage.shared,\n interpreter: s => interpretWithoutForm(s, {}, popupBackstage),\n getSink: lazySinks.popup\n }\n };\n const dialogBackstage = {\n ...commonBackstage,\n shared: {\n ...commonBackstage.shared,\n interpreter: s => interpretWithoutForm(s, {}, dialogBackstage),\n getSink: lazySinks.dialog\n }\n };\n return {\n popup: popupBackstage,\n dialog: dialogBackstage\n };\n };\n\n const setup$b = (editor, mothership, uiMotherships) => {\n const broadcastEvent = (name, evt) => {\n each$1([\n mothership,\n ...uiMotherships\n ], m => {\n m.broadcastEvent(name, evt);\n });\n };\n const broadcastOn = (channel, message) => {\n each$1([\n mothership,\n ...uiMotherships\n ], m => {\n m.broadcastOn([channel], message);\n });\n };\n const fireDismissPopups = evt => broadcastOn(dismissPopups(), { target: evt.target });\n const doc = getDocument();\n const onTouchstart = bind(doc, 'touchstart', fireDismissPopups);\n const onTouchmove = bind(doc, 'touchmove', evt => broadcastEvent(documentTouchmove(), evt));\n const onTouchend = bind(doc, 'touchend', evt => broadcastEvent(documentTouchend(), evt));\n const onMousedown = bind(doc, 'mousedown', fireDismissPopups);\n const onMouseup = bind(doc, 'mouseup', evt => {\n if (evt.raw.button === 0) {\n broadcastOn(mouseReleased(), { target: evt.target });\n }\n });\n const onContentClick = raw => broadcastOn(dismissPopups(), { target: SugarElement.fromDom(raw.target) });\n const onContentMouseup = raw => {\n if (raw.button === 0) {\n broadcastOn(mouseReleased(), { target: SugarElement.fromDom(raw.target) });\n }\n };\n const onContentMousedown = () => {\n each$1(editor.editorManager.get(), loopEditor => {\n if (editor !== loopEditor) {\n loopEditor.dispatch('DismissPopups', { relatedTarget: editor });\n }\n });\n };\n const onWindowScroll = evt => broadcastEvent(windowScroll(), fromRawEvent(evt));\n const onWindowResize = evt => {\n broadcastOn(repositionPopups(), {});\n broadcastEvent(windowResize(), fromRawEvent(evt));\n };\n const dos = getRootNode(SugarElement.fromDom(editor.getElement()));\n const onElementScroll = capture(dos, 'scroll', evt => {\n requestAnimationFrame(() => {\n const c = editor.getContainer();\n if (c !== undefined && c !== null) {\n const optScrollingContext = detectWhenSplitUiMode(editor, mothership.element);\n const scrollers = optScrollingContext.map(sc => [\n sc.element,\n ...sc.others\n ]).getOr([]);\n if (exists(scrollers, s => eq(s, evt.target))) {\n editor.dispatch('ElementScroll', { target: evt.target.dom });\n broadcastEvent(externalElementScroll(), evt);\n }\n }\n });\n });\n const onEditorResize = () => broadcastOn(repositionPopups(), {});\n const onEditorProgress = evt => {\n if (evt.state) {\n broadcastOn(dismissPopups(), { target: SugarElement.fromDom(editor.getContainer()) });\n }\n };\n const onDismissPopups = event => {\n broadcastOn(dismissPopups(), { target: SugarElement.fromDom(event.relatedTarget.getContainer()) });\n };\n editor.on('PostRender', () => {\n editor.on('click', onContentClick);\n editor.on('tap', onContentClick);\n editor.on('mouseup', onContentMouseup);\n editor.on('mousedown', onContentMousedown);\n editor.on('ScrollWindow', onWindowScroll);\n editor.on('ResizeWindow', onWindowResize);\n editor.on('ResizeEditor', onEditorResize);\n editor.on('AfterProgressState', onEditorProgress);\n editor.on('DismissPopups', onDismissPopups);\n });\n editor.on('remove', () => {\n editor.off('click', onContentClick);\n editor.off('tap', onContentClick);\n editor.off('mouseup', onContentMouseup);\n editor.off('mousedown', onContentMousedown);\n editor.off('ScrollWindow', onWindowScroll);\n editor.off('ResizeWindow', onWindowResize);\n editor.off('ResizeEditor', onEditorResize);\n editor.off('AfterProgressState', onEditorProgress);\n editor.off('DismissPopups', onDismissPopups);\n onMousedown.unbind();\n onTouchstart.unbind();\n onTouchmove.unbind();\n onTouchend.unbind();\n onMouseup.unbind();\n onElementScroll.unbind();\n });\n editor.on('detach', () => {\n each$1([\n mothership,\n ...uiMotherships\n ], detachSystem);\n each$1([\n mothership,\n ...uiMotherships\n ], m => m.destroy());\n });\n };\n\n const parts$a = AlloyParts;\n const partType = PartType;\n\n const schema$f = constant$1([\n defaulted('shell', false),\n required$1('makeItem'),\n defaulted('setupItem', noop),\n SketchBehaviours.field('listBehaviours', [Replacing])\n ]);\n const customListDetail = () => ({ behaviours: derive$1([Replacing.config({})]) });\n const itemsPart = optional({\n name: 'items',\n overrides: customListDetail\n });\n const parts$9 = constant$1([itemsPart]);\n const name = constant$1('CustomList');\n\n const factory$f = (detail, components, _spec, _external) => {\n const setItems = (list, items) => {\n getListContainer(list).fold(() => {\n console.error('Custom List was defined to not be a shell, but no item container was specified in components');\n throw new Error('Custom List was defined to not be a shell, but no item container was specified in components');\n }, container => {\n const itemComps = Replacing.contents(container);\n const numListsRequired = items.length;\n const numListsToAdd = numListsRequired - itemComps.length;\n const itemsToAdd = numListsToAdd > 0 ? range$2(numListsToAdd, () => detail.makeItem()) : [];\n const itemsToRemove = itemComps.slice(numListsRequired);\n each$1(itemsToRemove, item => Replacing.remove(container, item));\n each$1(itemsToAdd, item => Replacing.append(container, item));\n const builtLists = Replacing.contents(container);\n each$1(builtLists, (item, i) => {\n detail.setupItem(list, item, items[i], i);\n });\n });\n };\n const extra = detail.shell ? {\n behaviours: [Replacing.config({})],\n components: []\n } : {\n behaviours: [],\n components\n };\n const getListContainer = component => detail.shell ? Optional.some(component) : getPart(component, detail, 'items');\n return {\n uid: detail.uid,\n dom: detail.dom,\n components: extra.components,\n behaviours: augment(detail.listBehaviours, extra.behaviours),\n apis: { setItems }\n };\n };\n const CustomList = composite({\n name: name(),\n configFields: schema$f(),\n partFields: parts$9(),\n factory: factory$f,\n apis: {\n setItems: (apis, list, items) => {\n apis.setItems(list, items);\n }\n }\n });\n\n const schema$e = constant$1([\n required$1('dom'),\n defaulted('shell', true),\n field('toolbarBehaviours', [Replacing])\n ]);\n const enhanceGroups = () => ({ behaviours: derive$1([Replacing.config({})]) });\n const parts$8 = constant$1([optional({\n name: 'groups',\n overrides: enhanceGroups\n })]);\n\n const factory$e = (detail, components, _spec, _externals) => {\n const setGroups = (toolbar, groups) => {\n getGroupContainer(toolbar).fold(() => {\n console.error('Toolbar was defined to not be a shell, but no groups container was specified in components');\n throw new Error('Toolbar was defined to not be a shell, but no groups container was specified in components');\n }, container => {\n Replacing.set(container, groups);\n });\n };\n const getGroupContainer = component => detail.shell ? Optional.some(component) : getPart(component, detail, 'groups');\n const extra = detail.shell ? {\n behaviours: [Replacing.config({})],\n components: []\n } : {\n behaviours: [],\n components\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components: extra.components,\n behaviours: augment(detail.toolbarBehaviours, extra.behaviours),\n apis: {\n setGroups,\n refresh: noop\n },\n domModification: { attributes: { role: 'group' } }\n };\n };\n const Toolbar = composite({\n name: 'Toolbar',\n configFields: schema$e(),\n partFields: parts$8(),\n factory: factory$e,\n apis: {\n setGroups: (apis, toolbar, groups) => {\n apis.setGroups(toolbar, groups);\n }\n }\n });\n\n const setup$a = noop;\n const isDocked$2 = never;\n const getBehaviours$1 = constant$1([]);\n\n var StaticHeader = /*#__PURE__*/Object.freeze({\n __proto__: null,\n setup: setup$a,\n isDocked: isDocked$2,\n getBehaviours: getBehaviours$1\n });\n\n const getOffsetParent = element => {\n const isFixed = is$1(getRaw(element, 'position'), 'fixed');\n const offsetParent$1 = isFixed ? Optional.none() : offsetParent(element);\n return offsetParent$1.orThunk(() => {\n const marker = SugarElement.fromTag('span');\n return parent(element).bind(parent => {\n append$2(parent, marker);\n const offsetParent$1 = offsetParent(marker);\n remove$5(marker);\n return offsetParent$1;\n });\n });\n };\n const getOrigin = element => getOffsetParent(element).map(absolute$3).getOrThunk(() => SugarPosition(0, 0));\n\n const appear = (component, contextualInfo) => {\n const elem = component.element;\n add$2(elem, contextualInfo.transitionClass);\n remove$2(elem, contextualInfo.fadeOutClass);\n add$2(elem, contextualInfo.fadeInClass);\n contextualInfo.onShow(component);\n };\n const disappear = (component, contextualInfo) => {\n const elem = component.element;\n add$2(elem, contextualInfo.transitionClass);\n remove$2(elem, contextualInfo.fadeInClass);\n add$2(elem, contextualInfo.fadeOutClass);\n contextualInfo.onHide(component);\n };\n const isPartiallyVisible = (box, bounds) => box.y < bounds.bottom && box.bottom > bounds.y;\n const isTopCompletelyVisible = (box, bounds) => box.y >= bounds.y;\n const isBottomCompletelyVisible = (box, bounds) => box.bottom <= bounds.bottom;\n const forceTopPosition = (winBox, leftX, viewport) => ({\n location: 'top',\n leftX,\n topY: viewport.bounds.y - winBox.y\n });\n const forceBottomPosition = (winBox, leftX, viewport) => ({\n location: 'bottom',\n leftX,\n bottomY: winBox.bottom - viewport.bounds.bottom\n });\n const getDockedLeftPosition = bounds => {\n return bounds.box.x - bounds.win.x;\n };\n const tryDockingPosition = (modes, bounds, viewport) => {\n const winBox = bounds.win;\n const box = bounds.box;\n const leftX = getDockedLeftPosition(bounds);\n return findMap(modes, mode => {\n switch (mode) {\n case 'bottom':\n return !isBottomCompletelyVisible(box, viewport.bounds) ? Optional.some(forceBottomPosition(winBox, leftX, viewport)) : Optional.none();\n case 'top':\n return !isTopCompletelyVisible(box, viewport.bounds) ? Optional.some(forceTopPosition(winBox, leftX, viewport)) : Optional.none();\n default:\n return Optional.none();\n }\n }).getOr({ location: 'no-dock' });\n };\n const isVisibleForModes = (modes, box, viewport) => forall(modes, mode => {\n switch (mode) {\n case 'bottom':\n return isBottomCompletelyVisible(box, viewport.bounds);\n case 'top':\n return isTopCompletelyVisible(box, viewport.bounds);\n }\n });\n const getXYForRestoring = (pos, viewport) => {\n const priorY = viewport.optScrollEnv.fold(constant$1(pos.bounds.y), scrollEnv => scrollEnv.scrollElmTop + (pos.bounds.y - scrollEnv.currentScrollTop));\n return SugarPosition(pos.bounds.x, priorY);\n };\n const getXYForSaving = (box, viewport) => {\n const priorY = viewport.optScrollEnv.fold(constant$1(box.y), scrollEnv => box.y + scrollEnv.currentScrollTop - scrollEnv.scrollElmTop);\n return SugarPosition(box.x, priorY);\n };\n const getPrior = (elem, viewport, state) => state.getInitialPos().map(pos => {\n const xy = getXYForRestoring(pos, viewport);\n return {\n box: bounds(xy.left, xy.top, get$c(elem), get$d(elem)),\n location: pos.location\n };\n });\n const storePrior = (elem, box, viewport, state, decision) => {\n const xy = getXYForSaving(box, viewport);\n const bounds$1 = bounds(xy.left, xy.top, box.width, box.height);\n state.setInitialPos({\n style: getAllRaw(elem),\n position: get$e(elem, 'position') || 'static',\n bounds: bounds$1,\n location: decision.location\n });\n };\n const storePriorIfNone = (elem, box, viewport, state, decision) => {\n state.getInitialPos().fold(() => storePrior(elem, box, viewport, state, decision), () => noop);\n };\n const revertToOriginal = (elem, box, state) => state.getInitialPos().bind(position => {\n var _a;\n state.clearInitialPos();\n switch (position.position) {\n case 'static':\n return Optional.some({ morph: 'static' });\n case 'absolute':\n const offsetParent = getOffsetParent(elem).getOr(body());\n const offsetBox = box$1(offsetParent);\n const scrollDelta = (_a = offsetParent.dom.scrollTop) !== null && _a !== void 0 ? _a : 0;\n return Optional.some({\n morph: 'absolute',\n positionCss: NuPositionCss('absolute', get$g(position.style, 'left').map(_left => box.x - offsetBox.x), get$g(position.style, 'top').map(_top => box.y - offsetBox.y + scrollDelta), get$g(position.style, 'right').map(_right => offsetBox.right - box.right), get$g(position.style, 'bottom').map(_bottom => offsetBox.bottom - box.bottom))\n });\n default:\n return Optional.none();\n }\n });\n const tryMorphToOriginal = (elem, viewport, state) => getPrior(elem, viewport, state).filter(({box}) => isVisibleForModes(state.getModes(), box, viewport)).bind(({box}) => revertToOriginal(elem, box, state));\n const tryDecisionToFixedMorph = decision => {\n switch (decision.location) {\n case 'top': {\n return Optional.some({\n morph: 'fixed',\n positionCss: NuPositionCss('fixed', Optional.some(decision.leftX), Optional.some(decision.topY), Optional.none(), Optional.none())\n });\n }\n case 'bottom': {\n return Optional.some({\n morph: 'fixed',\n positionCss: NuPositionCss('fixed', Optional.some(decision.leftX), Optional.none(), Optional.none(), Optional.some(decision.bottomY))\n });\n }\n default:\n return Optional.none();\n }\n };\n const tryMorphToFixed = (elem, viewport, state) => {\n const box = box$1(elem);\n const winBox = win();\n const decision = tryDockingPosition(state.getModes(), {\n win: winBox,\n box\n }, viewport);\n if (decision.location === 'top' || decision.location === 'bottom') {\n storePrior(elem, box, viewport, state, decision);\n return tryDecisionToFixedMorph(decision);\n } else {\n return Optional.none();\n }\n };\n const tryMorphToOriginalOrUpdateFixed = (elem, viewport, state) => {\n return tryMorphToOriginal(elem, viewport, state).orThunk(() => {\n return viewport.optScrollEnv.bind(_ => getPrior(elem, viewport, state)).bind(({box, location}) => {\n const winBox = win();\n const leftX = getDockedLeftPosition({\n win: winBox,\n box\n });\n const decision = location === 'top' ? forceTopPosition(winBox, leftX, viewport) : forceBottomPosition(winBox, leftX, viewport);\n return tryDecisionToFixedMorph(decision);\n });\n });\n };\n const tryMorph = (component, viewport, state) => {\n const elem = component.element;\n const isDocked = is$1(getRaw(elem, 'position'), 'fixed');\n return isDocked ? tryMorphToOriginalOrUpdateFixed(elem, viewport, state) : tryMorphToFixed(elem, viewport, state);\n };\n const calculateMorphToOriginal = (component, viewport, state) => {\n const elem = component.element;\n return getPrior(elem, viewport, state).bind(({box}) => revertToOriginal(elem, box, state));\n };\n const forceDockWith = (elem, viewport, state, getDecision) => {\n const box = box$1(elem);\n const winBox = win();\n const leftX = getDockedLeftPosition({\n win: winBox,\n box\n });\n const decision = getDecision(winBox, leftX, viewport);\n if (decision.location === 'bottom' || decision.location === 'top') {\n storePriorIfNone(elem, box, viewport, state, decision);\n return tryDecisionToFixedMorph(decision);\n } else {\n return Optional.none();\n }\n };\n\n const morphToStatic = (component, config, state) => {\n state.setDocked(false);\n each$1([\n 'left',\n 'right',\n 'top',\n 'bottom',\n 'position'\n ], prop => remove$6(component.element, prop));\n config.onUndocked(component);\n };\n const morphToCoord = (component, config, state, position) => {\n const isDocked = position.position === 'fixed';\n state.setDocked(isDocked);\n applyPositionCss(component.element, position);\n const method = isDocked ? config.onDocked : config.onUndocked;\n method(component);\n };\n const updateVisibility = (component, config, state, viewport, morphToDocked = false) => {\n config.contextual.each(contextInfo => {\n contextInfo.lazyContext(component).each(box => {\n const isVisible = isPartiallyVisible(box, viewport.bounds);\n if (isVisible !== state.isVisible()) {\n state.setVisible(isVisible);\n if (morphToDocked && !isVisible) {\n add$1(component.element, [contextInfo.fadeOutClass]);\n contextInfo.onHide(component);\n } else {\n const method = isVisible ? appear : disappear;\n method(component, contextInfo);\n }\n }\n });\n });\n };\n const applyFixedMorph = (component, config, state, viewport, morph) => {\n updateVisibility(component, config, state, viewport, true);\n morphToCoord(component, config, state, morph.positionCss);\n };\n const applyMorph = (component, config, state, viewport, morph) => {\n switch (morph.morph) {\n case 'static': {\n return morphToStatic(component, config, state);\n }\n case 'absolute': {\n return morphToCoord(component, config, state, morph.positionCss);\n }\n case 'fixed': {\n return applyFixedMorph(component, config, state, viewport, morph);\n }\n }\n };\n const refreshInternal = (component, config, state) => {\n const viewport = config.lazyViewport(component);\n updateVisibility(component, config, state, viewport);\n tryMorph(component, viewport, state).each(morph => {\n applyMorph(component, config, state, viewport, morph);\n });\n };\n const resetInternal = (component, config, state) => {\n const elem = component.element;\n state.setDocked(false);\n const viewport = config.lazyViewport(component);\n calculateMorphToOriginal(component, viewport, state).each(staticOrAbsoluteMorph => {\n switch (staticOrAbsoluteMorph.morph) {\n case 'static': {\n morphToStatic(component, config, state);\n break;\n }\n case 'absolute': {\n morphToCoord(component, config, state, staticOrAbsoluteMorph.positionCss);\n break;\n }\n }\n });\n state.setVisible(true);\n config.contextual.each(contextInfo => {\n remove$1(elem, [\n contextInfo.fadeInClass,\n contextInfo.fadeOutClass,\n contextInfo.transitionClass\n ]);\n contextInfo.onShow(component);\n });\n refresh$3(component, config, state);\n };\n const refresh$3 = (component, config, state) => {\n if (component.getSystem().isConnected()) {\n refreshInternal(component, config, state);\n }\n };\n const reset = (component, config, state) => {\n if (state.isDocked()) {\n resetInternal(component, config, state);\n }\n };\n const forceDockWithDecision = getDecision => (component, config, state) => {\n const viewport = config.lazyViewport(component);\n const optMorph = forceDockWith(component.element, viewport, state, getDecision);\n optMorph.each(morph => {\n applyFixedMorph(component, config, state, viewport, morph);\n });\n };\n const forceDockToTop = forceDockWithDecision(forceTopPosition);\n const forceDockToBottom = forceDockWithDecision(forceBottomPosition);\n const isDocked$1 = (component, config, state) => state.isDocked();\n const setModes = (component, config, state, modes) => state.setModes(modes);\n const getModes = (component, config, state) => state.getModes();\n\n var DockingApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n refresh: refresh$3,\n reset: reset,\n isDocked: isDocked$1,\n getModes: getModes,\n setModes: setModes,\n forceDockToTop: forceDockToTop,\n forceDockToBottom: forceDockToBottom\n });\n\n const events$4 = (dockInfo, dockState) => derive$2([\n runOnSource(transitionend(), (component, simulatedEvent) => {\n dockInfo.contextual.each(contextInfo => {\n if (has(component.element, contextInfo.transitionClass)) {\n remove$1(component.element, [\n contextInfo.transitionClass,\n contextInfo.fadeInClass\n ]);\n const notify = dockState.isVisible() ? contextInfo.onShown : contextInfo.onHidden;\n notify(component);\n }\n simulatedEvent.stop();\n });\n }),\n run$1(windowScroll(), (component, _) => {\n refresh$3(component, dockInfo, dockState);\n }),\n run$1(externalElementScroll(), (component, _) => {\n refresh$3(component, dockInfo, dockState);\n }),\n run$1(windowResize(), (component, _) => {\n reset(component, dockInfo, dockState);\n })\n ]);\n\n var ActiveDocking = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events$4\n });\n\n var DockingSchema = [\n optionObjOf('contextual', [\n requiredString('fadeInClass'),\n requiredString('fadeOutClass'),\n requiredString('transitionClass'),\n requiredFunction('lazyContext'),\n onHandler('onShow'),\n onHandler('onShown'),\n onHandler('onHide'),\n onHandler('onHidden')\n ]),\n defaultedFunction('lazyViewport', () => ({\n bounds: win(),\n optScrollEnv: Optional.none()\n })),\n defaultedArrayOf('modes', [\n 'top',\n 'bottom'\n ], string),\n onHandler('onDocked'),\n onHandler('onUndocked')\n ];\n\n const init$5 = spec => {\n const docked = Cell(false);\n const visible = Cell(true);\n const initialBounds = value$2();\n const modes = Cell(spec.modes);\n const readState = () => `docked: ${ docked.get() }, visible: ${ visible.get() }, modes: ${ modes.get().join(',') }`;\n return nu$8({\n isDocked: docked.get,\n setDocked: docked.set,\n getInitialPos: initialBounds.get,\n setInitialPos: initialBounds.set,\n clearInitialPos: initialBounds.clear,\n isVisible: visible.get,\n setVisible: visible.set,\n getModes: modes.get,\n setModes: modes.set,\n readState\n });\n };\n\n var DockingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$5\n });\n\n const Docking = create$4({\n fields: DockingSchema,\n name: 'docking',\n active: ActiveDocking,\n apis: DockingApis,\n state: DockingState\n });\n\n const toolbarHeightChange = constant$1(generate$6('toolbar-height-change'));\n\n const visibility = {\n fadeInClass: 'tox-editor-dock-fadein',\n fadeOutClass: 'tox-editor-dock-fadeout',\n transitionClass: 'tox-editor-dock-transition'\n };\n const editorStickyOnClass = 'tox-tinymce--toolbar-sticky-on';\n const editorStickyOffClass = 'tox-tinymce--toolbar-sticky-off';\n const scrollFromBehindHeader = (e, containerHeader) => {\n const doc = owner$4(containerHeader);\n const win = defaultView(containerHeader);\n const viewHeight = win.dom.innerHeight;\n const scrollPos = get$b(doc);\n const markerElement = SugarElement.fromDom(e.elm);\n const markerPos = absolute$2(markerElement);\n const markerHeight = get$d(markerElement);\n const markerTop = markerPos.y;\n const markerBottom = markerTop + markerHeight;\n const editorHeaderPos = absolute$3(containerHeader);\n const editorHeaderHeight = get$d(containerHeader);\n const editorHeaderTop = editorHeaderPos.top;\n const editorHeaderBottom = editorHeaderTop + editorHeaderHeight;\n const editorHeaderDockedAtTop = Math.abs(editorHeaderTop - scrollPos.top) < 2;\n const editorHeaderDockedAtBottom = Math.abs(editorHeaderBottom - (scrollPos.top + viewHeight)) < 2;\n if (editorHeaderDockedAtTop && markerTop < editorHeaderBottom) {\n to(scrollPos.left, markerTop - editorHeaderHeight, doc);\n } else if (editorHeaderDockedAtBottom && markerBottom > editorHeaderTop) {\n const y = markerTop - viewHeight + markerHeight + editorHeaderHeight;\n to(scrollPos.left, y, doc);\n }\n };\n const isDockedMode = (header, mode) => contains$2(Docking.getModes(header), mode);\n const updateIframeContentFlow = header => {\n const getOccupiedHeight = elm => getOuter$2(elm) + (parseInt(get$e(elm, 'margin-top'), 10) || 0) + (parseInt(get$e(elm, 'margin-bottom'), 10) || 0);\n const elm = header.element;\n parentElement(elm).each(parentElem => {\n const padding = 'padding-' + Docking.getModes(header)[0];\n if (Docking.isDocked(header)) {\n const parentWidth = get$c(parentElem);\n set$8(elm, 'width', parentWidth + 'px');\n set$8(parentElem, padding, getOccupiedHeight(elm) + 'px');\n } else {\n remove$6(elm, 'width');\n remove$6(parentElem, padding);\n }\n });\n };\n const updateSinkVisibility = (sinkElem, visible) => {\n if (visible) {\n remove$2(sinkElem, visibility.fadeOutClass);\n add$1(sinkElem, [\n visibility.transitionClass,\n visibility.fadeInClass\n ]);\n } else {\n remove$2(sinkElem, visibility.fadeInClass);\n add$1(sinkElem, [\n visibility.fadeOutClass,\n visibility.transitionClass\n ]);\n }\n };\n const updateEditorClasses = (editor, docked) => {\n const editorContainer = SugarElement.fromDom(editor.getContainer());\n if (docked) {\n add$2(editorContainer, editorStickyOnClass);\n remove$2(editorContainer, editorStickyOffClass);\n } else {\n add$2(editorContainer, editorStickyOffClass);\n remove$2(editorContainer, editorStickyOnClass);\n }\n };\n const restoreFocus = (headerElem, focusedElem) => {\n const ownerDoc = owner$4(focusedElem);\n active$1(ownerDoc).filter(activeElm => !eq(focusedElem, activeElm)).filter(activeElm => eq(activeElm, SugarElement.fromDom(ownerDoc.dom.body)) || contains(headerElem, activeElm)).each(() => focus$3(focusedElem));\n };\n const findFocusedElem = (rootElm, lazySink) => search(rootElm).orThunk(() => lazySink().toOptional().bind(sink => search(sink.element)));\n const setup$9 = (editor, sharedBackstage, lazyHeader) => {\n if (!editor.inline) {\n if (!sharedBackstage.header.isPositionedAtTop()) {\n editor.on('ResizeEditor', () => {\n lazyHeader().each(Docking.reset);\n });\n }\n editor.on('ResizeWindow ResizeEditor', () => {\n lazyHeader().each(updateIframeContentFlow);\n });\n editor.on('SkinLoaded', () => {\n lazyHeader().each(comp => {\n Docking.isDocked(comp) ? Docking.reset(comp) : Docking.refresh(comp);\n });\n });\n editor.on('FullscreenStateChanged', () => {\n lazyHeader().each(Docking.reset);\n });\n }\n editor.on('AfterScrollIntoView', e => {\n lazyHeader().each(header => {\n Docking.refresh(header);\n const headerElem = header.element;\n if (isVisible(headerElem)) {\n scrollFromBehindHeader(e, headerElem);\n }\n });\n });\n editor.on('PostRender', () => {\n updateEditorClasses(editor, false);\n });\n };\n const isDocked = lazyHeader => lazyHeader().map(Docking.isDocked).getOr(false);\n const getIframeBehaviours = () => [Receiving.config({ channels: { [toolbarHeightChange()]: { onReceive: updateIframeContentFlow } } })];\n const getBehaviours = (editor, sharedBackstage) => {\n const focusedElm = value$2();\n const lazySink = sharedBackstage.getSink;\n const runOnSinkElement = f => {\n lazySink().each(sink => f(sink.element));\n };\n const onDockingSwitch = comp => {\n if (!editor.inline) {\n updateIframeContentFlow(comp);\n }\n updateEditorClasses(editor, Docking.isDocked(comp));\n comp.getSystem().broadcastOn([repositionPopups()], {});\n lazySink().each(sink => sink.getSystem().broadcastOn([repositionPopups()], {}));\n };\n const additionalBehaviours = editor.inline ? [] : getIframeBehaviours();\n return [\n Focusing.config({}),\n Docking.config({\n contextual: {\n lazyContext: comp => {\n const headerHeight = getOuter$2(comp.element);\n const container = editor.inline ? editor.getContentAreaContainer() : editor.getContainer();\n return Optional.from(container).map(c => {\n const box = box$1(SugarElement.fromDom(c));\n const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n return optScrollingContext.fold(() => {\n const boxHeight = box.height - headerHeight;\n const topBound = box.y + (isDockedMode(comp, 'top') ? 0 : headerHeight);\n return bounds(box.x, topBound, box.width, boxHeight);\n }, scrollEnv => {\n const constrainedBounds = constrain(box, getBoundsFrom(scrollEnv));\n const constrainedBoundsY = isDockedMode(comp, 'top') ? constrainedBounds.y : constrainedBounds.y + headerHeight;\n return bounds(constrainedBounds.x, constrainedBoundsY, constrainedBounds.width, constrainedBounds.height - headerHeight);\n });\n });\n },\n onShow: () => {\n runOnSinkElement(elem => updateSinkVisibility(elem, true));\n },\n onShown: comp => {\n runOnSinkElement(elem => remove$1(elem, [\n visibility.transitionClass,\n visibility.fadeInClass\n ]));\n focusedElm.get().each(elem => {\n restoreFocus(comp.element, elem);\n focusedElm.clear();\n });\n },\n onHide: comp => {\n findFocusedElem(comp.element, lazySink).fold(focusedElm.clear, focusedElm.set);\n runOnSinkElement(elem => updateSinkVisibility(elem, false));\n },\n onHidden: () => {\n runOnSinkElement(elem => remove$1(elem, [visibility.transitionClass]));\n },\n ...visibility\n },\n lazyViewport: comp => {\n const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n return optScrollingContext.fold(() => {\n const boundsWithoutOffset = win();\n const offset = getStickyToolbarOffset(editor);\n const top = boundsWithoutOffset.y + (isDockedMode(comp, 'top') ? offset : 0);\n const height = boundsWithoutOffset.height - (isDockedMode(comp, 'bottom') ? offset : 0);\n return {\n bounds: bounds(boundsWithoutOffset.x, top, boundsWithoutOffset.width, height),\n optScrollEnv: Optional.none()\n };\n }, sc => {\n const combinedBounds = getBoundsFrom(sc);\n return {\n bounds: combinedBounds,\n optScrollEnv: Optional.some({\n currentScrollTop: sc.element.dom.scrollTop,\n scrollElmTop: absolute$3(sc.element).top\n })\n };\n });\n },\n modes: [sharedBackstage.header.getDockingMode()],\n onDocked: onDockingSwitch,\n onUndocked: onDockingSwitch\n }),\n ...additionalBehaviours\n ];\n };\n\n var StickyHeader = /*#__PURE__*/Object.freeze({\n __proto__: null,\n setup: setup$9,\n isDocked: isDocked,\n getBehaviours: getBehaviours\n });\n\n const renderHeader = spec => {\n const editor = spec.editor;\n const getBehaviours$2 = spec.sticky ? getBehaviours : getBehaviours$1;\n return {\n uid: spec.uid,\n dom: spec.dom,\n components: spec.components,\n behaviours: derive$1(getBehaviours$2(editor, spec.sharedBackstage))\n };\n };\n\n const groupToolbarButtonSchema = objOf([\n type,\n requiredOf('items', oneOf([\n arrOfObj([\n name$1,\n requiredArrayOf('items', string)\n ]),\n string\n ]))\n ].concat(baseToolbarButtonFields));\n const createGroupToolbarButton = spec => asRaw('GroupToolbarButton', groupToolbarButtonSchema, spec);\n\n const baseMenuButtonFields = [\n optionString('text'),\n optionString('tooltip'),\n optionString('icon'),\n defaultedOf('search', false, oneOf([\n boolean,\n objOf([optionString('placeholder')])\n ], x => {\n if (isBoolean(x)) {\n return x ? Optional.some({ placeholder: Optional.none() }) : Optional.none();\n } else {\n return Optional.some(x);\n }\n })),\n requiredFunction('fetch'),\n defaultedFunction('onSetup', () => noop)\n ];\n\n const MenuButtonSchema = objOf([\n type,\n ...baseMenuButtonFields\n ]);\n const createMenuButton = spec => asRaw('menubutton', MenuButtonSchema, spec);\n\n const splitButtonSchema = objOf([\n type,\n optionalTooltip,\n optionalIcon,\n optionalText,\n optionalSelect,\n fetch$1,\n onSetup,\n defaultedStringEnum('presets', 'normal', [\n 'normal',\n 'color',\n 'listpreview'\n ]),\n defaultedColumns(1),\n onAction,\n onItemAction\n ]);\n const createSplitButton = spec => asRaw('SplitButton', splitButtonSchema, spec);\n\n const factory$d = (detail, spec) => {\n const setMenus = (comp, menus) => {\n const newMenus = map$2(menus, m => {\n const buttonSpec = {\n type: 'menubutton',\n text: m.text,\n fetch: callback => {\n callback(m.getItems());\n }\n };\n const internal = createMenuButton(buttonSpec).mapError(errInfo => formatError(errInfo)).getOrDie();\n return renderMenuButton(internal, 'tox-mbtn', spec.backstage, Optional.some('menuitem'));\n });\n Replacing.set(comp, newMenus);\n };\n const apis = {\n focus: Keying.focusIn,\n setMenus\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components: [],\n behaviours: derive$1([\n Replacing.config({}),\n config('menubar-events', [\n runOnAttached(component => {\n detail.onSetup(component);\n }),\n run$1(mouseover(), (comp, se) => {\n descendant(comp.element, '.' + 'tox-mbtn--active').each(activeButton => {\n closest$1(se.event.target, '.' + 'tox-mbtn').each(hoveredButton => {\n if (!eq(activeButton, hoveredButton)) {\n comp.getSystem().getByDom(activeButton).each(activeComp => {\n comp.getSystem().getByDom(hoveredButton).each(hoveredComp => {\n Dropdown.expand(hoveredComp);\n Dropdown.close(activeComp);\n Focusing.focus(hoveredComp);\n });\n });\n }\n });\n });\n }),\n run$1(focusShifted(), (comp, se) => {\n se.event.prevFocus.bind(prev => comp.getSystem().getByDom(prev).toOptional()).each(prev => {\n se.event.newFocus.bind(nu => comp.getSystem().getByDom(nu).toOptional()).each(nu => {\n if (Dropdown.isOpen(prev)) {\n Dropdown.expand(nu);\n Dropdown.close(prev);\n }\n });\n });\n })\n ]),\n Keying.config({\n mode: 'flow',\n selector: '.' + 'tox-mbtn',\n onEscape: comp => {\n detail.onEscape(comp);\n return Optional.some(true);\n }\n }),\n Tabstopping.config({})\n ]),\n apis,\n domModification: { attributes: { role: 'menubar' } }\n };\n };\n var SilverMenubar = single({\n factory: factory$d,\n name: 'silver.Menubar',\n configFields: [\n required$1('dom'),\n required$1('uid'),\n required$1('onEscape'),\n required$1('backstage'),\n defaulted('onSetup', noop)\n ],\n apis: {\n focus: (apis, comp) => {\n apis.focus(comp);\n },\n setMenus: (apis, comp, menus) => {\n apis.setMenus(comp, menus);\n }\n }\n });\n\n const promotionMessage = '\\u26A1\\ufe0fUpgrade';\n const promotionLink = 'https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral';\n const renderPromotion = spec => {\n return {\n uid: spec.uid,\n dom: spec.dom,\n components: [{\n dom: {\n tag: 'a',\n attributes: {\n 'href': promotionLink,\n 'rel': 'noopener',\n 'target': '_blank',\n 'aria-hidden': 'true'\n },\n classes: ['tox-promotion-link'],\n innerHtml: promotionMessage\n }\n }]\n };\n };\n\n const owner = 'container';\n const schema$d = [field('slotBehaviours', [])];\n const getPartName = name => '<alloy.field.' + name + '>';\n const sketch = sSpec => {\n const parts = (() => {\n const record = [];\n const slot = (name, config) => {\n record.push(name);\n return generateOne$1(owner, getPartName(name), config);\n };\n return {\n slot,\n record: constant$1(record)\n };\n })();\n const spec = sSpec(parts);\n const partNames = parts.record();\n const fieldParts = map$2(partNames, n => required({\n name: n,\n pname: getPartName(n)\n }));\n return composite$1(owner, schema$d, fieldParts, make$1, spec);\n };\n const make$1 = (detail, components) => {\n const getSlotNames = _ => getAllPartNames(detail);\n const getSlot = (container, key) => getPart(container, detail, key);\n const onSlot = (f, def) => (container, key) => getPart(container, detail, key).map(slot => f(slot, key)).getOr(def);\n const onSlots = f => (container, keys) => {\n each$1(keys, key => f(container, key));\n };\n const doShowing = (comp, _key) => get$f(comp.element, 'aria-hidden') !== 'true';\n const doShow = (comp, key) => {\n if (!doShowing(comp)) {\n const element = comp.element;\n remove$6(element, 'display');\n remove$7(element, 'aria-hidden');\n emitWith(comp, slotVisibility(), {\n name: key,\n visible: true\n });\n }\n };\n const doHide = (comp, key) => {\n if (doShowing(comp)) {\n const element = comp.element;\n set$8(element, 'display', 'none');\n set$9(element, 'aria-hidden', 'true');\n emitWith(comp, slotVisibility(), {\n name: key,\n visible: false\n });\n }\n };\n const isShowing = onSlot(doShowing, false);\n const hideSlot = onSlot(doHide);\n const hideSlots = onSlots(hideSlot);\n const hideAllSlots = container => hideSlots(container, getSlotNames());\n const showSlot = onSlot(doShow);\n const apis = {\n getSlotNames,\n getSlot,\n isShowing,\n hideSlot,\n hideAllSlots,\n showSlot\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: get$3(detail.slotBehaviours),\n apis\n };\n };\n const slotApis = map$1({\n getSlotNames: (apis, c) => apis.getSlotNames(c),\n getSlot: (apis, c, key) => apis.getSlot(c, key),\n isShowing: (apis, c, key) => apis.isShowing(c, key),\n hideSlot: (apis, c, key) => apis.hideSlot(c, key),\n hideAllSlots: (apis, c) => apis.hideAllSlots(c),\n showSlot: (apis, c, key) => apis.showSlot(c, key)\n }, value => makeApi(value));\n const SlotContainer = {\n ...slotApis,\n ...{ sketch }\n };\n\n const sidebarSchema = objOf([\n optionalIcon,\n optionalTooltip,\n defaultedFunction('onShow', noop),\n defaultedFunction('onHide', noop),\n onSetup\n ]);\n const createSidebar = spec => asRaw('sidebar', sidebarSchema, spec);\n\n const setup$8 = editor => {\n const {sidebars} = editor.ui.registry.getAll();\n each$1(keys(sidebars), name => {\n const spec = sidebars[name];\n const isActive = () => is$1(Optional.from(editor.queryCommandValue('ToggleSidebar')), name);\n editor.ui.registry.addToggleButton(name, {\n icon: spec.icon,\n tooltip: spec.tooltip,\n onAction: buttonApi => {\n editor.execCommand('ToggleSidebar', false, name);\n buttonApi.setActive(isActive());\n },\n onSetup: buttonApi => {\n buttonApi.setActive(isActive());\n const handleToggle = () => buttonApi.setActive(isActive());\n editor.on('ToggleSidebar', handleToggle);\n return () => {\n editor.off('ToggleSidebar', handleToggle);\n };\n }\n });\n });\n };\n const getApi = comp => ({ element: () => comp.element.dom });\n const makePanels = (parts, panelConfigs) => {\n const specs = map$2(keys(panelConfigs), name => {\n const spec = panelConfigs[name];\n const bridged = getOrDie(createSidebar(spec));\n return {\n name,\n getApi,\n onSetup: bridged.onSetup,\n onShow: bridged.onShow,\n onHide: bridged.onHide\n };\n });\n return map$2(specs, spec => {\n const editorOffCell = Cell(noop);\n return parts.slot(spec.name, {\n dom: {\n tag: 'div',\n classes: ['tox-sidebar__pane']\n },\n behaviours: SimpleBehaviours.unnamedEvents([\n onControlAttached(spec, editorOffCell),\n onControlDetached(spec, editorOffCell),\n run$1(slotVisibility(), (sidepanel, se) => {\n const data = se.event;\n const optSidePanelSpec = find$5(specs, config => config.name === data.name);\n optSidePanelSpec.each(sidePanelSpec => {\n const handler = data.visible ? sidePanelSpec.onShow : sidePanelSpec.onHide;\n handler(sidePanelSpec.getApi(sidepanel));\n });\n })\n ])\n });\n });\n };\n const makeSidebar = panelConfigs => SlotContainer.sketch(parts => ({\n dom: {\n tag: 'div',\n classes: ['tox-sidebar__pane-container']\n },\n components: makePanels(parts, panelConfigs),\n slotBehaviours: SimpleBehaviours.unnamedEvents([runOnAttached(slotContainer => SlotContainer.hideAllSlots(slotContainer))])\n }));\n const setSidebar = (sidebar, panelConfigs, showSidebar) => {\n const optSlider = Composing.getCurrent(sidebar);\n optSlider.each(slider => {\n Replacing.set(slider, [makeSidebar(panelConfigs)]);\n const configKey = showSidebar === null || showSidebar === void 0 ? void 0 : showSidebar.toLowerCase();\n if (isString(configKey) && has$2(panelConfigs, configKey)) {\n Composing.getCurrent(slider).each(slotContainer => {\n SlotContainer.showSlot(slotContainer, configKey);\n Sliding.immediateGrow(slider);\n remove$6(slider.element, 'width');\n updateSidebarRoleOnToggle(sidebar.element, 'region');\n });\n }\n });\n };\n const updateSidebarRoleOnToggle = (sidebar, sidebarState) => {\n set$9(sidebar, 'role', sidebarState);\n };\n const toggleSidebar = (sidebar, name) => {\n const optSlider = Composing.getCurrent(sidebar);\n optSlider.each(slider => {\n const optSlotContainer = Composing.getCurrent(slider);\n optSlotContainer.each(slotContainer => {\n if (Sliding.hasGrown(slider)) {\n if (SlotContainer.isShowing(slotContainer, name)) {\n Sliding.shrink(slider);\n updateSidebarRoleOnToggle(sidebar.element, 'presentation');\n } else {\n SlotContainer.hideAllSlots(slotContainer);\n SlotContainer.showSlot(slotContainer, name);\n updateSidebarRoleOnToggle(sidebar.element, 'region');\n }\n } else {\n SlotContainer.hideAllSlots(slotContainer);\n SlotContainer.showSlot(slotContainer, name);\n Sliding.grow(slider);\n updateSidebarRoleOnToggle(sidebar.element, 'region');\n }\n });\n });\n };\n const whichSidebar = sidebar => {\n const optSlider = Composing.getCurrent(sidebar);\n return optSlider.bind(slider => {\n const sidebarOpen = Sliding.isGrowing(slider) || Sliding.hasGrown(slider);\n if (sidebarOpen) {\n const optSlotContainer = Composing.getCurrent(slider);\n return optSlotContainer.bind(slotContainer => find$5(SlotContainer.getSlotNames(slotContainer), name => SlotContainer.isShowing(slotContainer, name)));\n } else {\n return Optional.none();\n }\n });\n };\n const fixSize = generate$6('FixSizeEvent');\n const autoSize = generate$6('AutoSizeEvent');\n const renderSidebar = spec => ({\n uid: spec.uid,\n dom: {\n tag: 'div',\n classes: ['tox-sidebar'],\n attributes: { role: 'presentation' }\n },\n components: [{\n dom: {\n tag: 'div',\n classes: ['tox-sidebar__slider']\n },\n components: [],\n behaviours: derive$1([\n Tabstopping.config({}),\n Focusing.config({}),\n Sliding.config({\n dimension: { property: 'width' },\n closedClass: 'tox-sidebar--sliding-closed',\n openClass: 'tox-sidebar--sliding-open',\n shrinkingClass: 'tox-sidebar--sliding-shrinking',\n growingClass: 'tox-sidebar--sliding-growing',\n onShrunk: slider => {\n const optSlotContainer = Composing.getCurrent(slider);\n optSlotContainer.each(SlotContainer.hideAllSlots);\n emit(slider, autoSize);\n },\n onGrown: slider => {\n emit(slider, autoSize);\n },\n onStartGrow: slider => {\n emitWith(slider, fixSize, { width: getRaw(slider.element, 'width').getOr('') });\n },\n onStartShrink: slider => {\n emitWith(slider, fixSize, { width: get$c(slider.element) + 'px' });\n }\n }),\n Replacing.config({}),\n Composing.config({\n find: comp => {\n const children = Replacing.contents(comp);\n return head(children);\n }\n })\n ])\n }],\n behaviours: derive$1([\n ComposingConfigs.childAt(0),\n config('sidebar-sliding-events', [\n run$1(fixSize, (comp, se) => {\n set$8(comp.element, 'width', se.event.width);\n }),\n run$1(autoSize, (comp, _se) => {\n remove$6(comp.element, 'width');\n })\n ])\n ])\n });\n\n const block = (component, config, state, getBusySpec) => {\n set$9(component.element, 'aria-busy', true);\n const root = config.getRoot(component).getOr(component);\n const blockerBehaviours = derive$1([\n Keying.config({\n mode: 'special',\n onTab: () => Optional.some(true),\n onShiftTab: () => Optional.some(true)\n }),\n Focusing.config({})\n ]);\n const blockSpec = getBusySpec(root, blockerBehaviours);\n const blocker = root.getSystem().build(blockSpec);\n Replacing.append(root, premade(blocker));\n if (blocker.hasConfigured(Keying) && config.focus) {\n Keying.focusIn(blocker);\n }\n if (!state.isBlocked()) {\n config.onBlock(component);\n }\n state.blockWith(() => Replacing.remove(root, blocker));\n };\n const unblock = (component, config, state) => {\n remove$7(component.element, 'aria-busy');\n if (state.isBlocked()) {\n config.onUnblock(component);\n }\n state.clear();\n };\n const isBlocked = (component, blockingConfig, blockingState) => blockingState.isBlocked();\n\n var BlockingApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n block: block,\n unblock: unblock,\n isBlocked: isBlocked\n });\n\n var BlockingSchema = [\n defaultedFunction('getRoot', Optional.none),\n defaultedBoolean('focus', true),\n onHandler('onBlock'),\n onHandler('onUnblock')\n ];\n\n const init$4 = () => {\n const blocker = destroyable();\n const blockWith = destroy => {\n blocker.set({ destroy });\n };\n return nu$8({\n readState: blocker.isSet,\n blockWith,\n clear: blocker.clear,\n isBlocked: blocker.isSet\n });\n };\n\n var BlockingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$4\n });\n\n const Blocking = create$4({\n fields: BlockingSchema,\n name: 'blocking',\n apis: BlockingApis,\n state: BlockingState\n });\n\n const getBusySpec$1 = providerBackstage => (_root, _behaviours) => ({\n dom: {\n tag: 'div',\n attributes: {\n 'aria-label': providerBackstage.translate('Loading...'),\n 'tabindex': '0'\n },\n classes: ['tox-throbber__busy-spinner']\n },\n components: [{ dom: fromHtml('<div class=\"tox-spinner\"><div></div><div></div><div></div></div>') }]\n });\n const focusBusyComponent = throbber => Composing.getCurrent(throbber).each(comp => focus$3(comp.element, true));\n const toggleEditorTabIndex = (editor, state) => {\n const tabIndexAttr = 'tabindex';\n const dataTabIndexAttr = `data-mce-${ tabIndexAttr }`;\n Optional.from(editor.iframeElement).map(SugarElement.fromDom).each(iframe => {\n if (state) {\n getOpt(iframe, tabIndexAttr).each(tabIndex => set$9(iframe, dataTabIndexAttr, tabIndex));\n set$9(iframe, tabIndexAttr, -1);\n } else {\n remove$7(iframe, tabIndexAttr);\n getOpt(iframe, dataTabIndexAttr).each(tabIndex => {\n set$9(iframe, tabIndexAttr, tabIndex);\n remove$7(iframe, dataTabIndexAttr);\n });\n }\n });\n };\n const toggleThrobber = (editor, comp, state, providerBackstage) => {\n const element = comp.element;\n toggleEditorTabIndex(editor, state);\n if (state) {\n Blocking.block(comp, getBusySpec$1(providerBackstage));\n remove$6(element, 'display');\n remove$7(element, 'aria-hidden');\n if (editor.hasFocus()) {\n focusBusyComponent(comp);\n }\n } else {\n const throbberFocus = Composing.getCurrent(comp).exists(busyComp => hasFocus(busyComp.element));\n Blocking.unblock(comp);\n set$8(element, 'display', 'none');\n set$9(element, 'aria-hidden', 'true');\n if (throbberFocus) {\n editor.focus();\n }\n }\n };\n const renderThrobber = spec => ({\n uid: spec.uid,\n dom: {\n tag: 'div',\n attributes: { 'aria-hidden': 'true' },\n classes: ['tox-throbber'],\n styles: { display: 'none' }\n },\n behaviours: derive$1([\n Replacing.config({}),\n Blocking.config({ focus: false }),\n Composing.config({ find: comp => head(comp.components()) })\n ]),\n components: []\n });\n const isFocusEvent = event => event.type === 'focusin';\n const isPasteBinTarget = event => {\n if (isFocusEvent(event)) {\n const node = event.composed ? head(event.composedPath()) : Optional.from(event.target);\n return node.map(SugarElement.fromDom).filter(isElement$1).exists(targetElm => has(targetElm, 'mce-pastebin'));\n } else {\n return false;\n }\n };\n const setup$7 = (editor, lazyThrobber, sharedBackstage) => {\n const throbberState = Cell(false);\n const timer = value$2();\n const stealFocus = e => {\n if (throbberState.get() && !isPasteBinTarget(e)) {\n e.preventDefault();\n focusBusyComponent(lazyThrobber());\n editor.editorManager.setActive(editor);\n }\n };\n if (!editor.inline) {\n editor.on('PreInit', () => {\n editor.dom.bind(editor.getWin(), 'focusin', stealFocus);\n editor.on('BeforeExecCommand', e => {\n if (e.command.toLowerCase() === 'mcefocus' && e.value !== true) {\n stealFocus(e);\n }\n });\n });\n }\n const toggle = state => {\n if (state !== throbberState.get()) {\n throbberState.set(state);\n toggleThrobber(editor, lazyThrobber(), state, sharedBackstage.providers);\n fireAfterProgressState(editor, state);\n }\n };\n editor.on('ProgressState', e => {\n timer.on(clearTimeout);\n if (isNumber(e.time)) {\n const timerId = global$9.setEditorTimeout(editor, () => toggle(e.state), e.time);\n timer.set(timerId);\n } else {\n toggle(e.state);\n timer.clear();\n }\n });\n };\n\n const generate$1 = (xs, f) => {\n const init = {\n len: 0,\n list: []\n };\n const r = foldl(xs, (b, a) => {\n const value = f(a, b.len);\n return value.fold(constant$1(b), v => ({\n len: v.finish,\n list: b.list.concat([v])\n }));\n }, init);\n return r.list;\n };\n\n const output = (within, extra, withinWidth) => ({\n within,\n extra,\n withinWidth\n });\n const apportion = (units, total, len) => {\n const parray = generate$1(units, (unit, current) => {\n const width = len(unit);\n return Optional.some({\n element: unit,\n start: current,\n finish: current + width,\n width\n });\n });\n const within = filter$2(parray, unit => unit.finish <= total);\n const withinWidth = foldr(within, (acc, el) => acc + el.width, 0);\n const extra = parray.slice(within.length);\n return {\n within,\n extra,\n withinWidth\n };\n };\n const toUnit = parray => map$2(parray, unit => unit.element);\n const fitLast = (within, extra, withinWidth) => {\n const fits = toUnit(within.concat(extra));\n return output(fits, [], withinWidth);\n };\n const overflow = (within, extra, overflower, withinWidth) => {\n const fits = toUnit(within).concat([overflower]);\n return output(fits, toUnit(extra), withinWidth);\n };\n const fitAll = (within, extra, withinWidth) => output(toUnit(within), [], withinWidth);\n const tryFit = (total, units, len) => {\n const divide = apportion(units, total, len);\n return divide.extra.length === 0 ? Optional.some(divide) : Optional.none();\n };\n const partition = (total, units, len, overflower) => {\n const divide = tryFit(total, units, len).getOrThunk(() => apportion(units, total - len(overflower), len));\n const within = divide.within;\n const extra = divide.extra;\n const withinWidth = divide.withinWidth;\n if (extra.length === 1 && extra[0].width <= len(overflower)) {\n return fitLast(within, extra, withinWidth);\n } else if (extra.length >= 1) {\n return overflow(within, extra, overflower, withinWidth);\n } else {\n return fitAll(within, extra, withinWidth);\n }\n };\n\n const setGroups$1 = (toolbar, storedGroups) => {\n const bGroups = map$2(storedGroups, g => premade(g));\n Toolbar.setGroups(toolbar, bGroups);\n };\n const findFocusedComp = comps => findMap(comps, comp => search(comp.element).bind(focusedElm => comp.getSystem().getByDom(focusedElm).toOptional()));\n const refresh$2 = (toolbar, detail, setOverflow) => {\n const builtGroups = detail.builtGroups.get();\n if (builtGroups.length === 0) {\n return;\n }\n const primary = getPartOrDie(toolbar, detail, 'primary');\n const overflowGroup = Coupling.getCoupled(toolbar, 'overflowGroup');\n set$8(primary.element, 'visibility', 'hidden');\n const groups = builtGroups.concat([overflowGroup]);\n const focusedComp = findFocusedComp(groups);\n setOverflow([]);\n setGroups$1(primary, groups);\n const availableWidth = get$c(primary.element);\n const overflows = partition(availableWidth, detail.builtGroups.get(), comp => get$c(comp.element), overflowGroup);\n if (overflows.extra.length === 0) {\n Replacing.remove(primary, overflowGroup);\n setOverflow([]);\n } else {\n setGroups$1(primary, overflows.within);\n setOverflow(overflows.extra);\n }\n remove$6(primary.element, 'visibility');\n reflow(primary.element);\n focusedComp.each(Focusing.focus);\n };\n\n const schema$c = constant$1([\n field('splitToolbarBehaviours', [Coupling]),\n customField('builtGroups', () => Cell([]))\n ]);\n\n const schema$b = constant$1([\n markers$1(['overflowToggledClass']),\n optionFunction('getOverflowBounds'),\n required$1('lazySink'),\n customField('overflowGroups', () => Cell([])),\n onHandler('onOpened'),\n onHandler('onClosed')\n ].concat(schema$c()));\n const parts$7 = constant$1([\n required({\n factory: Toolbar,\n schema: schema$e(),\n name: 'primary'\n }),\n external({\n schema: schema$e(),\n name: 'overflow'\n }),\n external({ name: 'overflow-button' }),\n external({ name: 'overflow-group' })\n ]);\n\n const expandable = constant$1((element, available) => {\n setMax(element, Math.floor(available));\n });\n\n const schema$a = constant$1([\n markers$1(['toggledClass']),\n required$1('lazySink'),\n requiredFunction('fetch'),\n optionFunction('getBounds'),\n optionObjOf('fireDismissalEventInstead', [defaulted('event', dismissRequested())]),\n schema$y(),\n onHandler('onToggled')\n ]);\n const parts$6 = constant$1([\n external({\n name: 'button',\n overrides: detail => ({\n dom: { attributes: { 'aria-haspopup': 'true' } },\n buttonBehaviours: derive$1([Toggling.config({\n toggleClass: detail.markers.toggledClass,\n aria: { mode: 'expanded' },\n toggleOnExecute: false,\n onToggled: detail.onToggled\n })])\n })\n }),\n external({\n factory: Toolbar,\n schema: schema$e(),\n name: 'toolbar',\n overrides: detail => {\n return {\n toolbarBehaviours: derive$1([Keying.config({\n mode: 'cyclic',\n onEscape: comp => {\n getPart(comp, detail, 'button').each(Focusing.focus);\n return Optional.none();\n }\n })])\n };\n }\n })\n ]);\n\n const shouldSkipFocus = value$2();\n const toggleWithoutFocusing = (button, externals) => {\n shouldSkipFocus.set(true);\n toggle(button, externals);\n shouldSkipFocus.clear();\n };\n const toggle = (button, externals) => {\n const toolbarSandbox = Coupling.getCoupled(button, 'toolbarSandbox');\n if (Sandboxing.isOpen(toolbarSandbox)) {\n Sandboxing.close(toolbarSandbox);\n } else {\n Sandboxing.open(toolbarSandbox, externals.toolbar());\n }\n };\n const position = (button, toolbar, detail, layouts) => {\n const bounds = detail.getBounds.map(bounder => bounder());\n const sink = detail.lazySink(button).getOrDie();\n Positioning.positionWithinBounds(sink, toolbar, {\n anchor: {\n type: 'hotspot',\n hotspot: button,\n layouts,\n overrides: { maxWidthFunction: expandable() }\n }\n }, bounds);\n };\n const setGroups = (button, toolbar, detail, layouts, groups) => {\n Toolbar.setGroups(toolbar, groups);\n position(button, toolbar, detail, layouts);\n Toggling.on(button);\n };\n const makeSandbox = (button, spec, detail) => {\n const ariaControls = manager();\n const onOpen = (sandbox, toolbar) => {\n const skipFocus = shouldSkipFocus.get().getOr(false);\n detail.fetch().get(groups => {\n setGroups(button, toolbar, detail, spec.layouts, groups);\n ariaControls.link(button.element);\n if (!skipFocus) {\n Keying.focusIn(toolbar);\n }\n });\n };\n const onClose = () => {\n Toggling.off(button);\n if (!shouldSkipFocus.get().getOr(false)) {\n Focusing.focus(button);\n }\n ariaControls.unlink(button.element);\n };\n return {\n dom: {\n tag: 'div',\n attributes: { id: ariaControls.id }\n },\n behaviours: derive$1([\n Keying.config({\n mode: 'special',\n onEscape: comp => {\n Sandboxing.close(comp);\n return Optional.some(true);\n }\n }),\n Sandboxing.config({\n onOpen,\n onClose,\n isPartOf: (container, data, queryElem) => {\n return isPartOf$1(data, queryElem) || isPartOf$1(button, queryElem);\n },\n getAttachPoint: () => {\n return detail.lazySink(button).getOrDie();\n }\n }),\n Receiving.config({\n channels: {\n ...receivingChannel$1({\n isExtraPart: never,\n ...detail.fireDismissalEventInstead.map(fe => ({ fireEventInstead: { event: fe.event } })).getOr({})\n }),\n ...receivingChannel({\n doReposition: () => {\n Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each(toolbar => {\n position(button, toolbar, detail, spec.layouts);\n });\n }\n })\n }\n })\n ])\n };\n };\n const factory$c = (detail, components, spec, externals) => ({\n ...Button.sketch({\n ...externals.button(),\n action: button => {\n toggle(button, externals);\n },\n buttonBehaviours: SketchBehaviours.augment({ dump: externals.button().buttonBehaviours }, [Coupling.config({\n others: {\n toolbarSandbox: button => {\n return makeSandbox(button, spec, detail);\n }\n }\n })])\n }),\n apis: {\n setGroups: (button, groups) => {\n Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each(toolbar => {\n setGroups(button, toolbar, detail, spec.layouts, groups);\n });\n },\n reposition: button => {\n Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox')).each(toolbar => {\n position(button, toolbar, detail, spec.layouts);\n });\n },\n toggle: button => {\n toggle(button, externals);\n },\n toggleWithoutFocusing: button => {\n toggleWithoutFocusing(button, externals);\n },\n getToolbar: button => {\n return Sandboxing.getState(Coupling.getCoupled(button, 'toolbarSandbox'));\n },\n isOpen: button => {\n return Sandboxing.isOpen(Coupling.getCoupled(button, 'toolbarSandbox'));\n }\n }\n });\n const FloatingToolbarButton = composite({\n name: 'FloatingToolbarButton',\n factory: factory$c,\n configFields: schema$a(),\n partFields: parts$6(),\n apis: {\n setGroups: (apis, button, groups) => {\n apis.setGroups(button, groups);\n },\n reposition: (apis, button) => {\n apis.reposition(button);\n },\n toggle: (apis, button) => {\n apis.toggle(button);\n },\n toggleWithoutFocusing: (apis, button) => {\n apis.toggleWithoutFocusing(button);\n },\n getToolbar: (apis, button) => apis.getToolbar(button),\n isOpen: (apis, button) => apis.isOpen(button)\n }\n });\n\n const schema$9 = constant$1([\n required$1('items'),\n markers$1(['itemSelector']),\n field('tgroupBehaviours', [Keying])\n ]);\n const parts$5 = constant$1([group({\n name: 'items',\n unit: 'item'\n })]);\n\n const factory$b = (detail, components, _spec, _externals) => ({\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: augment(detail.tgroupBehaviours, [Keying.config({\n mode: 'flow',\n selector: detail.markers.itemSelector\n })]),\n domModification: { attributes: { role: 'toolbar' } }\n });\n const ToolbarGroup = composite({\n name: 'ToolbarGroup',\n configFields: schema$9(),\n partFields: parts$5(),\n factory: factory$b\n });\n\n const buildGroups = comps => map$2(comps, g => premade(g));\n const refresh$1 = (toolbar, memFloatingToolbarButton, detail) => {\n refresh$2(toolbar, detail, overflowGroups => {\n detail.overflowGroups.set(overflowGroups);\n memFloatingToolbarButton.getOpt(toolbar).each(floatingToolbarButton => {\n FloatingToolbarButton.setGroups(floatingToolbarButton, buildGroups(overflowGroups));\n });\n });\n };\n const factory$a = (detail, components, spec, externals) => {\n const memFloatingToolbarButton = record(FloatingToolbarButton.sketch({\n fetch: () => Future.nu(resolve => {\n resolve(buildGroups(detail.overflowGroups.get()));\n }),\n layouts: {\n onLtr: () => [\n southwest$2,\n southeast$2\n ],\n onRtl: () => [\n southeast$2,\n southwest$2\n ],\n onBottomLtr: () => [\n northwest$2,\n northeast$2\n ],\n onBottomRtl: () => [\n northeast$2,\n northwest$2\n ]\n },\n getBounds: spec.getOverflowBounds,\n lazySink: detail.lazySink,\n fireDismissalEventInstead: {},\n markers: { toggledClass: detail.markers.overflowToggledClass },\n parts: {\n button: externals['overflow-button'](),\n toolbar: externals.overflow()\n },\n onToggled: (comp, state) => detail[state ? 'onOpened' : 'onClosed'](comp)\n }));\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: augment(detail.splitToolbarBehaviours, [Coupling.config({\n others: {\n overflowGroup: () => {\n return ToolbarGroup.sketch({\n ...externals['overflow-group'](),\n items: [memFloatingToolbarButton.asSpec()]\n });\n }\n }\n })]),\n apis: {\n setGroups: (toolbar, groups) => {\n detail.builtGroups.set(map$2(groups, toolbar.getSystem().build));\n refresh$1(toolbar, memFloatingToolbarButton, detail);\n },\n refresh: toolbar => refresh$1(toolbar, memFloatingToolbarButton, detail),\n toggle: toolbar => {\n memFloatingToolbarButton.getOpt(toolbar).each(floatingToolbarButton => {\n FloatingToolbarButton.toggle(floatingToolbarButton);\n });\n },\n toggleWithoutFocusing: toolbar => {\n memFloatingToolbarButton.getOpt(toolbar).each(FloatingToolbarButton.toggleWithoutFocusing);\n },\n isOpen: toolbar => memFloatingToolbarButton.getOpt(toolbar).map(FloatingToolbarButton.isOpen).getOr(false),\n reposition: toolbar => {\n memFloatingToolbarButton.getOpt(toolbar).each(floatingToolbarButton => {\n FloatingToolbarButton.reposition(floatingToolbarButton);\n });\n },\n getOverflow: toolbar => memFloatingToolbarButton.getOpt(toolbar).bind(FloatingToolbarButton.getToolbar)\n },\n domModification: { attributes: { role: 'group' } }\n };\n };\n const SplitFloatingToolbar = composite({\n name: 'SplitFloatingToolbar',\n configFields: schema$b(),\n partFields: parts$7(),\n factory: factory$a,\n apis: {\n setGroups: (apis, toolbar, groups) => {\n apis.setGroups(toolbar, groups);\n },\n refresh: (apis, toolbar) => {\n apis.refresh(toolbar);\n },\n reposition: (apis, toolbar) => {\n apis.reposition(toolbar);\n },\n toggle: (apis, toolbar) => {\n apis.toggle(toolbar);\n },\n toggleWithoutFocusing: (apis, toolbar) => {\n apis.toggle(toolbar);\n },\n isOpen: (apis, toolbar) => apis.isOpen(toolbar),\n getOverflow: (apis, toolbar) => apis.getOverflow(toolbar)\n }\n });\n\n const schema$8 = constant$1([\n markers$1([\n 'closedClass',\n 'openClass',\n 'shrinkingClass',\n 'growingClass',\n 'overflowToggledClass'\n ]),\n onHandler('onOpened'),\n onHandler('onClosed')\n ].concat(schema$c()));\n const parts$4 = constant$1([\n required({\n factory: Toolbar,\n schema: schema$e(),\n name: 'primary'\n }),\n required({\n factory: Toolbar,\n schema: schema$e(),\n name: 'overflow',\n overrides: detail => {\n return {\n toolbarBehaviours: derive$1([\n Sliding.config({\n dimension: { property: 'height' },\n closedClass: detail.markers.closedClass,\n openClass: detail.markers.openClass,\n shrinkingClass: detail.markers.shrinkingClass,\n growingClass: detail.markers.growingClass,\n onShrunk: comp => {\n getPart(comp, detail, 'overflow-button').each(button => {\n Toggling.off(button);\n Focusing.focus(button);\n });\n detail.onClosed(comp);\n },\n onGrown: comp => {\n Keying.focusIn(comp);\n detail.onOpened(comp);\n },\n onStartGrow: comp => {\n getPart(comp, detail, 'overflow-button').each(Toggling.on);\n }\n }),\n Keying.config({\n mode: 'acyclic',\n onEscape: comp => {\n getPart(comp, detail, 'overflow-button').each(Focusing.focus);\n return Optional.some(true);\n }\n })\n ])\n };\n }\n }),\n external({\n name: 'overflow-button',\n overrides: detail => ({\n buttonBehaviours: derive$1([Toggling.config({\n toggleClass: detail.markers.overflowToggledClass,\n aria: { mode: 'pressed' },\n toggleOnExecute: false\n })])\n })\n }),\n external({ name: 'overflow-group' })\n ]);\n\n const isOpen = (toolbar, detail) => getPart(toolbar, detail, 'overflow').map(Sliding.hasGrown).getOr(false);\n const toggleToolbar = (toolbar, detail) => {\n getPart(toolbar, detail, 'overflow-button').bind(() => getPart(toolbar, detail, 'overflow')).each(overf => {\n refresh(toolbar, detail);\n Sliding.toggleGrow(overf);\n });\n };\n const refresh = (toolbar, detail) => {\n getPart(toolbar, detail, 'overflow').each(overflow => {\n refresh$2(toolbar, detail, groups => {\n const builtGroups = map$2(groups, g => premade(g));\n Toolbar.setGroups(overflow, builtGroups);\n });\n getPart(toolbar, detail, 'overflow-button').each(button => {\n if (Sliding.hasGrown(overflow)) {\n Toggling.on(button);\n }\n });\n Sliding.refresh(overflow);\n });\n };\n const factory$9 = (detail, components, spec, externals) => {\n const toolbarToggleEvent = 'alloy.toolbar.toggle';\n const doSetGroups = (toolbar, groups) => {\n const built = map$2(groups, toolbar.getSystem().build);\n detail.builtGroups.set(built);\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: augment(detail.splitToolbarBehaviours, [\n Coupling.config({\n others: {\n overflowGroup: toolbar => {\n return ToolbarGroup.sketch({\n ...externals['overflow-group'](),\n items: [Button.sketch({\n ...externals['overflow-button'](),\n action: _button => {\n emit(toolbar, toolbarToggleEvent);\n }\n })]\n });\n }\n }\n }),\n config('toolbar-toggle-events', [run$1(toolbarToggleEvent, toolbar => {\n toggleToolbar(toolbar, detail);\n })])\n ]),\n apis: {\n setGroups: (toolbar, groups) => {\n doSetGroups(toolbar, groups);\n refresh(toolbar, detail);\n },\n refresh: toolbar => refresh(toolbar, detail),\n toggle: toolbar => toggleToolbar(toolbar, detail),\n isOpen: toolbar => isOpen(toolbar, detail)\n },\n domModification: { attributes: { role: 'group' } }\n };\n };\n const SplitSlidingToolbar = composite({\n name: 'SplitSlidingToolbar',\n configFields: schema$8(),\n partFields: parts$4(),\n factory: factory$9,\n apis: {\n setGroups: (apis, toolbar, groups) => {\n apis.setGroups(toolbar, groups);\n },\n refresh: (apis, toolbar) => {\n apis.refresh(toolbar);\n },\n toggle: (apis, toolbar) => {\n apis.toggle(toolbar);\n },\n isOpen: (apis, toolbar) => apis.isOpen(toolbar)\n }\n });\n\n const renderToolbarGroupCommon = toolbarGroup => {\n const attributes = toolbarGroup.title.fold(() => ({}), title => ({ attributes: { title } }));\n return {\n dom: {\n tag: 'div',\n classes: ['tox-toolbar__group'],\n ...attributes\n },\n components: [ToolbarGroup.parts.items({})],\n items: toolbarGroup.items,\n markers: { itemSelector: '*:not(.tox-split-button) > .tox-tbtn:not([disabled]), ' + '.tox-split-button:not([disabled]), ' + '.tox-toolbar-nav-js:not([disabled]), ' + '.tox-number-input:not([disabled])' },\n tgroupBehaviours: derive$1([\n Tabstopping.config({}),\n Focusing.config({})\n ])\n };\n };\n const renderToolbarGroup = toolbarGroup => ToolbarGroup.sketch(renderToolbarGroupCommon(toolbarGroup));\n const getToolbarBehaviours = (toolbarSpec, modeName) => {\n const onAttached = runOnAttached(component => {\n const groups = map$2(toolbarSpec.initGroups, renderToolbarGroup);\n Toolbar.setGroups(component, groups);\n });\n return derive$1([\n DisablingConfigs.toolbarButton(toolbarSpec.providers.isDisabled),\n receivingConfig(),\n Keying.config({\n mode: modeName,\n onEscape: toolbarSpec.onEscape,\n selector: '.tox-toolbar__group'\n }),\n config('toolbar-events', [onAttached])\n ]);\n };\n const renderMoreToolbarCommon = toolbarSpec => {\n const modeName = toolbarSpec.cyclicKeying ? 'cyclic' : 'acyclic';\n return {\n uid: toolbarSpec.uid,\n dom: {\n tag: 'div',\n classes: ['tox-toolbar-overlord']\n },\n parts: {\n 'overflow-group': renderToolbarGroupCommon({\n title: Optional.none(),\n items: []\n }),\n 'overflow-button': renderIconButtonSpec({\n name: 'more',\n icon: Optional.some('more-drawer'),\n enabled: true,\n tooltip: Optional.some('Reveal or hide additional toolbar items'),\n primary: false,\n buttonType: Optional.none(),\n borderless: false\n }, Optional.none(), toolbarSpec.providers)\n },\n splitToolbarBehaviours: getToolbarBehaviours(toolbarSpec, modeName)\n };\n };\n const renderFloatingMoreToolbar = toolbarSpec => {\n const baseSpec = renderMoreToolbarCommon(toolbarSpec);\n const overflowXOffset = 4;\n const primary = SplitFloatingToolbar.parts.primary({\n dom: {\n tag: 'div',\n classes: ['tox-toolbar__primary']\n }\n });\n return SplitFloatingToolbar.sketch({\n ...baseSpec,\n lazySink: toolbarSpec.getSink,\n getOverflowBounds: () => {\n const headerElem = toolbarSpec.moreDrawerData.lazyHeader().element;\n const headerBounds = absolute$2(headerElem);\n const docElem = documentElement(headerElem);\n const docBounds = absolute$2(docElem);\n const height = Math.max(docElem.dom.scrollHeight, docBounds.height);\n return bounds(headerBounds.x + overflowXOffset, docBounds.y, headerBounds.width - overflowXOffset * 2, height);\n },\n parts: {\n ...baseSpec.parts,\n overflow: {\n dom: {\n tag: 'div',\n classes: ['tox-toolbar__overflow'],\n attributes: toolbarSpec.attributes\n }\n }\n },\n components: [primary],\n markers: { overflowToggledClass: 'tox-tbtn--enabled' },\n onOpened: comp => toolbarSpec.onToggled(comp, true),\n onClosed: comp => toolbarSpec.onToggled(comp, false)\n });\n };\n const renderSlidingMoreToolbar = toolbarSpec => {\n const primary = SplitSlidingToolbar.parts.primary({\n dom: {\n tag: 'div',\n classes: ['tox-toolbar__primary']\n }\n });\n const overflow = SplitSlidingToolbar.parts.overflow({\n dom: {\n tag: 'div',\n classes: ['tox-toolbar__overflow']\n }\n });\n const baseSpec = renderMoreToolbarCommon(toolbarSpec);\n return SplitSlidingToolbar.sketch({\n ...baseSpec,\n components: [\n primary,\n overflow\n ],\n markers: {\n openClass: 'tox-toolbar__overflow--open',\n closedClass: 'tox-toolbar__overflow--closed',\n growingClass: 'tox-toolbar__overflow--growing',\n shrinkingClass: 'tox-toolbar__overflow--shrinking',\n overflowToggledClass: 'tox-tbtn--enabled'\n },\n onOpened: comp => {\n comp.getSystem().broadcastOn([toolbarHeightChange()], { type: 'opened' });\n toolbarSpec.onToggled(comp, true);\n },\n onClosed: comp => {\n comp.getSystem().broadcastOn([toolbarHeightChange()], { type: 'closed' });\n toolbarSpec.onToggled(comp, false);\n }\n });\n };\n const renderToolbar = toolbarSpec => {\n const modeName = toolbarSpec.cyclicKeying ? 'cyclic' : 'acyclic';\n return Toolbar.sketch({\n uid: toolbarSpec.uid,\n dom: {\n tag: 'div',\n classes: ['tox-toolbar'].concat(toolbarSpec.type === ToolbarMode$1.scrolling ? ['tox-toolbar--scrolling'] : [])\n },\n components: [Toolbar.parts.groups({})],\n toolbarBehaviours: getToolbarBehaviours(toolbarSpec, modeName)\n });\n };\n\n const baseButtonFields = [\n optionalText,\n optionalIcon,\n optionString('tooltip'),\n defaultedStringEnum('buttonType', 'secondary', [\n 'primary',\n 'secondary'\n ]),\n defaultedBoolean('borderless', false),\n requiredFunction('onAction')\n ];\n const normalButtonFields = [\n ...baseButtonFields,\n text,\n requiredStringEnum('type', ['button'])\n ];\n const toggleButtonFields = [\n ...baseButtonFields,\n defaultedBoolean('active', false),\n requiredStringEnum('type', ['togglebutton'])\n ];\n const schemaWithoutGroupButton = {\n button: normalButtonFields,\n togglebutton: toggleButtonFields\n };\n const groupFields = [\n requiredStringEnum('type', ['group']),\n defaultedArrayOf('buttons', [], choose$1('type', schemaWithoutGroupButton))\n ];\n const viewButtonSchema = choose$1('type', {\n ...schemaWithoutGroupButton,\n group: groupFields\n });\n\n const viewSchema = objOf([\n defaultedArrayOf('buttons', [], viewButtonSchema),\n requiredFunction('onShow'),\n requiredFunction('onHide')\n ]);\n const createView = spec => asRaw('view', viewSchema, spec);\n\n const renderButton = (spec, providers) => {\n var _a, _b;\n const isToggleButton = spec.type === 'togglebutton';\n const optMemIcon = spec.icon.map(memIcon => renderReplaceableIconFromPack(memIcon, providers.icons)).map(record);\n const getAction = () => comp => {\n const setIcon = newIcon => {\n optMemIcon.map(memIcon => memIcon.getOpt(comp).each(displayIcon => {\n Replacing.set(displayIcon, [renderReplaceableIconFromPack(newIcon, providers.icons)]);\n }));\n };\n const setActive = state => {\n const elm = comp.element;\n if (state) {\n add$2(elm, 'tox-button--enabled');\n set$9(elm, 'aria-pressed', true);\n } else {\n remove$2(elm, 'tox-button--enabled');\n remove$7(elm, 'aria-pressed');\n }\n };\n const isActive = () => has(comp.element, 'tox-button--enabled');\n if (isToggleButton) {\n return spec.onAction({\n setIcon,\n setActive,\n isActive\n });\n }\n if (spec.type === 'button') {\n return spec.onAction({ setIcon });\n }\n };\n const action = getAction();\n const buttonSpec = {\n ...spec,\n name: isToggleButton ? spec.text.getOr(spec.icon.getOr('')) : (_a = spec.text) !== null && _a !== void 0 ? _a : spec.icon.getOr(''),\n primary: spec.buttonType === 'primary',\n buttonType: Optional.from(spec.buttonType),\n tooltip: spec.tooltip,\n icon: spec.icon,\n enabled: true,\n borderless: spec.borderless\n };\n const buttonTypeClasses = calculateClassesFromButtonType((_b = spec.buttonType) !== null && _b !== void 0 ? _b : 'secondary');\n const optTranslatedText = isToggleButton ? spec.text.map(providers.translate) : Optional.some(providers.translate(spec.text));\n const optTranslatedTextComponed = optTranslatedText.map(text$2);\n const tooltipAttributes = buttonSpec.tooltip.or(optTranslatedText).map(tooltip => ({\n 'aria-label': providers.translate(tooltip),\n 'title': providers.translate(tooltip)\n })).getOr({});\n const optIconSpec = optMemIcon.map(memIcon => memIcon.asSpec());\n const components = componentRenderPipeline([\n optIconSpec,\n optTranslatedTextComponed\n ]);\n const hasIconAndText = spec.icon.isSome() && optTranslatedTextComponed.isSome();\n const dom = {\n tag: 'button',\n classes: buttonTypeClasses.concat(...spec.icon.isSome() && !hasIconAndText ? ['tox-button--icon'] : []).concat(...hasIconAndText ? ['tox-button--icon-and-text'] : []).concat(...spec.borderless ? ['tox-button--naked'] : []).concat(...spec.type === 'togglebutton' && spec.active ? ['tox-button--enabled'] : []),\n attributes: tooltipAttributes\n };\n const extraBehaviours = [];\n const iconButtonSpec = renderCommonSpec(buttonSpec, Optional.some(action), extraBehaviours, dom, components, providers);\n return Button.sketch(iconButtonSpec);\n };\n\n const renderViewButton = (spec, providers) => renderButton(spec, providers);\n const renderButtonsGroup = (spec, providers) => {\n return {\n dom: {\n tag: 'div',\n classes: ['tox-view__toolbar__group']\n },\n components: map$2(spec.buttons, button => renderViewButton(button, providers))\n };\n };\n const deviceDetection = detect$2().deviceType;\n const isPhone = deviceDetection.isPhone();\n const isTablet = deviceDetection.isTablet();\n const renderViewHeader = spec => {\n let hasGroups = false;\n const endButtons = map$2(spec.buttons, btnspec => {\n if (btnspec.type === 'group') {\n hasGroups = true;\n return renderButtonsGroup(btnspec, spec.providers);\n } else {\n return renderViewButton(btnspec, spec.providers);\n }\n });\n return {\n uid: spec.uid,\n dom: {\n tag: 'div',\n classes: [\n !hasGroups ? 'tox-view__header' : 'tox-view__toolbar',\n ...isPhone || isTablet ? [\n 'tox-view--mobile',\n 'tox-view--scrolling'\n ] : []\n ]\n },\n behaviours: derive$1([\n Focusing.config({}),\n Keying.config({\n mode: 'flow',\n selector: 'button, .tox-button',\n focusInside: FocusInsideModes.OnEnterOrSpaceMode\n })\n ]),\n components: hasGroups ? endButtons : [\n Container.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-view__header-start']\n },\n components: []\n }),\n Container.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-view__header-end']\n },\n components: endButtons\n })\n ]\n };\n };\n const renderViewPane = spec => {\n return {\n uid: spec.uid,\n dom: {\n tag: 'div',\n classes: ['tox-view__pane']\n }\n };\n };\n const factory$8 = (detail, components, _spec, _externals) => {\n const apis = {\n getPane: comp => parts$a.getPart(comp, detail, 'pane'),\n getOnShow: _comp => detail.viewConfig.onShow,\n getOnHide: _comp => detail.viewConfig.onHide\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n apis\n };\n };\n var View = composite({\n name: 'silver.View',\n configFields: [required$1('viewConfig')],\n partFields: [\n optional({\n factory: { sketch: renderViewHeader },\n schema: [\n required$1('buttons'),\n required$1('providers')\n ],\n name: 'header'\n }),\n optional({\n factory: { sketch: renderViewPane },\n schema: [],\n name: 'pane'\n })\n ],\n factory: factory$8,\n apis: {\n getPane: (apis, comp) => apis.getPane(comp),\n getOnShow: (apis, comp) => apis.getOnShow(comp),\n getOnHide: (apis, comp) => apis.getOnHide(comp)\n }\n });\n\n const makeViews = (parts, viewConfigs, providers) => {\n return mapToArray(viewConfigs, (config, name) => {\n const internalViewConfig = getOrDie(createView(config));\n return parts.slot(name, View.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-view']\n },\n viewConfig: internalViewConfig,\n components: [\n ...internalViewConfig.buttons.length > 0 ? [View.parts.header({\n buttons: internalViewConfig.buttons,\n providers\n })] : [],\n View.parts.pane({})\n ]\n }));\n });\n };\n const makeSlotContainer = (viewConfigs, providers) => SlotContainer.sketch(parts => ({\n dom: {\n tag: 'div',\n classes: ['tox-view-wrap__slot-container']\n },\n components: makeViews(parts, viewConfigs, providers),\n slotBehaviours: SimpleBehaviours.unnamedEvents([runOnAttached(slotContainer => SlotContainer.hideAllSlots(slotContainer))])\n }));\n const getCurrentName = slotContainer => {\n return find$5(SlotContainer.getSlotNames(slotContainer), name => SlotContainer.isShowing(slotContainer, name));\n };\n const hideContainer = comp => {\n const element = comp.element;\n set$8(element, 'display', 'none');\n set$9(element, 'aria-hidden', 'true');\n };\n const showContainer = comp => {\n const element = comp.element;\n remove$6(element, 'display');\n remove$7(element, 'aria-hidden');\n };\n const makeViewInstanceApi = slot => ({ getContainer: constant$1(slot) });\n const runOnPaneWithInstanceApi = (slotContainer, name, get) => {\n SlotContainer.getSlot(slotContainer, name).each(view => {\n View.getPane(view).each(pane => {\n const onCallback = get(view);\n onCallback(makeViewInstanceApi(pane.element.dom));\n });\n });\n };\n const runOnShow = (slotContainer, name) => runOnPaneWithInstanceApi(slotContainer, name, View.getOnShow);\n const runOnHide = (slotContainer, name) => runOnPaneWithInstanceApi(slotContainer, name, View.getOnHide);\n const factory$7 = (detail, spec) => {\n const setViews = (comp, viewConfigs) => {\n Replacing.set(comp, [makeSlotContainer(viewConfigs, spec.backstage.shared.providers)]);\n };\n const whichView = comp => {\n return Composing.getCurrent(comp).bind(getCurrentName);\n };\n const toggleView = (comp, showMainView, hideMainView, name) => {\n return Composing.getCurrent(comp).exists(slotContainer => {\n const optCurrentSlotName = getCurrentName(slotContainer);\n const isTogglingCurrentView = optCurrentSlotName.exists(current => name === current);\n const exists = SlotContainer.getSlot(slotContainer, name).isSome();\n if (exists) {\n SlotContainer.hideAllSlots(slotContainer);\n if (!isTogglingCurrentView) {\n hideMainView();\n showContainer(comp);\n SlotContainer.showSlot(slotContainer, name);\n runOnShow(slotContainer, name);\n } else {\n hideContainer(comp);\n showMainView();\n }\n optCurrentSlotName.each(prevName => runOnHide(slotContainer, prevName));\n }\n return exists;\n });\n };\n const apis = {\n setViews,\n whichView,\n toggleView\n };\n return {\n uid: detail.uid,\n dom: {\n tag: 'div',\n classes: ['tox-view-wrap'],\n attributes: { 'aria-hidden': 'true' },\n styles: { display: 'none' }\n },\n components: [],\n behaviours: derive$1([\n Replacing.config({}),\n Composing.config({\n find: comp => {\n const children = Replacing.contents(comp);\n return head(children);\n }\n })\n ]),\n apis\n };\n };\n var ViewWrapper = single({\n factory: factory$7,\n name: 'silver.ViewWrapper',\n configFields: [required$1('backstage')],\n apis: {\n setViews: (apis, comp, views) => apis.setViews(comp, views),\n toggleView: (apis, comp, outerContainer, editorCont, name) => apis.toggleView(comp, outerContainer, editorCont, name),\n whichView: (apis, comp) => apis.whichView(comp)\n }\n });\n\n const factory$6 = (detail, components, _spec) => {\n let toolbarDrawerOpenState = false;\n const apis = {\n getSocket: comp => {\n return parts$a.getPart(comp, detail, 'socket');\n },\n setSidebar: (comp, panelConfigs, showSidebar) => {\n parts$a.getPart(comp, detail, 'sidebar').each(sidebar => setSidebar(sidebar, panelConfigs, showSidebar));\n },\n toggleSidebar: (comp, name) => {\n parts$a.getPart(comp, detail, 'sidebar').each(sidebar => toggleSidebar(sidebar, name));\n },\n whichSidebar: comp => {\n return parts$a.getPart(comp, detail, 'sidebar').bind(whichSidebar).getOrNull();\n },\n getHeader: comp => {\n return parts$a.getPart(comp, detail, 'header');\n },\n getToolbar: comp => {\n return parts$a.getPart(comp, detail, 'toolbar');\n },\n setToolbar: (comp, groups) => {\n parts$a.getPart(comp, detail, 'toolbar').each(toolbar => {\n const renderedGroups = map$2(groups, renderToolbarGroup);\n toolbar.getApis().setGroups(toolbar, renderedGroups);\n });\n },\n setToolbars: (comp, toolbars) => {\n parts$a.getPart(comp, detail, 'multiple-toolbar').each(mToolbar => {\n const renderedToolbars = map$2(toolbars, g => map$2(g, renderToolbarGroup));\n CustomList.setItems(mToolbar, renderedToolbars);\n });\n },\n refreshToolbar: comp => {\n const toolbar = parts$a.getPart(comp, detail, 'toolbar');\n toolbar.each(toolbar => toolbar.getApis().refresh(toolbar));\n },\n toggleToolbarDrawer: comp => {\n parts$a.getPart(comp, detail, 'toolbar').each(toolbar => {\n mapFrom(toolbar.getApis().toggle, toggle => toggle(toolbar));\n });\n },\n toggleToolbarDrawerWithoutFocusing: comp => {\n parts$a.getPart(comp, detail, 'toolbar').each(toolbar => {\n mapFrom(toolbar.getApis().toggleWithoutFocusing, toggleWithoutFocusing => toggleWithoutFocusing(toolbar));\n });\n },\n isToolbarDrawerToggled: comp => {\n return parts$a.getPart(comp, detail, 'toolbar').bind(toolbar => Optional.from(toolbar.getApis().isOpen).map(isOpen => isOpen(toolbar))).getOr(false);\n },\n getThrobber: comp => {\n return parts$a.getPart(comp, detail, 'throbber');\n },\n focusToolbar: comp => {\n const optToolbar = parts$a.getPart(comp, detail, 'toolbar').orThunk(() => parts$a.getPart(comp, detail, 'multiple-toolbar'));\n optToolbar.each(toolbar => {\n Keying.focusIn(toolbar);\n });\n },\n setMenubar: (comp, menus) => {\n parts$a.getPart(comp, detail, 'menubar').each(menubar => {\n SilverMenubar.setMenus(menubar, menus);\n });\n },\n focusMenubar: comp => {\n parts$a.getPart(comp, detail, 'menubar').each(menubar => {\n SilverMenubar.focus(menubar);\n });\n },\n setViews: (comp, viewConfigs) => {\n parts$a.getPart(comp, detail, 'viewWrapper').each(wrapper => {\n ViewWrapper.setViews(wrapper, viewConfigs);\n });\n },\n toggleView: (comp, name) => {\n return parts$a.getPart(comp, detail, 'viewWrapper').exists(wrapper => ViewWrapper.toggleView(wrapper, () => apis.showMainView(comp), () => apis.hideMainView(comp), name));\n },\n whichView: comp => {\n return parts$a.getPart(comp, detail, 'viewWrapper').bind(ViewWrapper.whichView).getOrNull();\n },\n hideMainView: comp => {\n toolbarDrawerOpenState = apis.isToolbarDrawerToggled(comp);\n if (toolbarDrawerOpenState) {\n apis.toggleToolbarDrawer(comp);\n }\n parts$a.getPart(comp, detail, 'editorContainer').each(editorContainer => {\n const element = editorContainer.element;\n set$8(element, 'display', 'none');\n set$9(element, 'aria-hidden', 'true');\n });\n },\n showMainView: comp => {\n if (toolbarDrawerOpenState) {\n apis.toggleToolbarDrawer(comp);\n }\n parts$a.getPart(comp, detail, 'editorContainer').each(editorContainer => {\n const element = editorContainer.element;\n remove$6(element, 'display');\n remove$7(element, 'aria-hidden');\n });\n }\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n apis,\n behaviours: detail.behaviours\n };\n };\n const partMenubar = partType.optional({\n factory: SilverMenubar,\n name: 'menubar',\n schema: [required$1('backstage')]\n });\n const toolbarFactory = spec => {\n if (spec.type === ToolbarMode$1.sliding) {\n return renderSlidingMoreToolbar;\n } else if (spec.type === ToolbarMode$1.floating) {\n return renderFloatingMoreToolbar;\n } else {\n return renderToolbar;\n }\n };\n const partMultipleToolbar = partType.optional({\n factory: {\n sketch: spec => CustomList.sketch({\n uid: spec.uid,\n dom: spec.dom,\n listBehaviours: derive$1([Keying.config({\n mode: 'acyclic',\n selector: '.tox-toolbar'\n })]),\n makeItem: () => renderToolbar({\n type: spec.type,\n uid: generate$6('multiple-toolbar-item'),\n cyclicKeying: false,\n initGroups: [],\n providers: spec.providers,\n onEscape: () => {\n spec.onEscape();\n return Optional.some(true);\n }\n }),\n setupItem: (_mToolbar, tc, data, _index) => {\n Toolbar.setGroups(tc, data);\n },\n shell: true\n })\n },\n name: 'multiple-toolbar',\n schema: [\n required$1('dom'),\n required$1('onEscape')\n ]\n });\n const partToolbar = partType.optional({\n factory: {\n sketch: spec => {\n const renderer = toolbarFactory(spec);\n const toolbarSpec = {\n type: spec.type,\n uid: spec.uid,\n onEscape: () => {\n spec.onEscape();\n return Optional.some(true);\n },\n onToggled: (_comp, state) => spec.onToolbarToggled(state),\n cyclicKeying: false,\n initGroups: [],\n getSink: spec.getSink,\n providers: spec.providers,\n moreDrawerData: {\n lazyToolbar: spec.lazyToolbar,\n lazyMoreButton: spec.lazyMoreButton,\n lazyHeader: spec.lazyHeader\n },\n attributes: spec.attributes\n };\n return renderer(toolbarSpec);\n }\n },\n name: 'toolbar',\n schema: [\n required$1('dom'),\n required$1('onEscape'),\n required$1('getSink')\n ]\n });\n const partHeader = partType.optional({\n factory: { sketch: renderHeader },\n name: 'header',\n schema: [required$1('dom')]\n });\n const partPromotion = partType.optional({\n factory: { sketch: renderPromotion },\n name: 'promotion',\n schema: [required$1('dom')]\n });\n const partSocket = partType.optional({\n name: 'socket',\n schema: [required$1('dom')]\n });\n const partSidebar = partType.optional({\n factory: { sketch: renderSidebar },\n name: 'sidebar',\n schema: [required$1('dom')]\n });\n const partThrobber = partType.optional({\n factory: { sketch: renderThrobber },\n name: 'throbber',\n schema: [required$1('dom')]\n });\n const partViewWrapper = partType.optional({\n factory: ViewWrapper,\n name: 'viewWrapper',\n schema: [required$1('backstage')]\n });\n const renderEditorContainer = spec => ({\n uid: spec.uid,\n dom: {\n tag: 'div',\n classes: ['tox-editor-container']\n },\n components: spec.components\n });\n const partEditorContainer = partType.optional({\n factory: { sketch: renderEditorContainer },\n name: 'editorContainer',\n schema: []\n });\n var OuterContainer = composite({\n name: 'OuterContainer',\n factory: factory$6,\n configFields: [\n required$1('dom'),\n required$1('behaviours')\n ],\n partFields: [\n partHeader,\n partMenubar,\n partToolbar,\n partMultipleToolbar,\n partSocket,\n partSidebar,\n partPromotion,\n partThrobber,\n partViewWrapper,\n partEditorContainer\n ],\n apis: {\n getSocket: (apis, comp) => {\n return apis.getSocket(comp);\n },\n setSidebar: (apis, comp, panelConfigs, showSidebar) => {\n apis.setSidebar(comp, panelConfigs, showSidebar);\n },\n toggleSidebar: (apis, comp, name) => {\n apis.toggleSidebar(comp, name);\n },\n whichSidebar: (apis, comp) => {\n return apis.whichSidebar(comp);\n },\n getHeader: (apis, comp) => {\n return apis.getHeader(comp);\n },\n getToolbar: (apis, comp) => {\n return apis.getToolbar(comp);\n },\n setToolbar: (apis, comp, groups) => {\n apis.setToolbar(comp, groups);\n },\n setToolbars: (apis, comp, toolbars) => {\n apis.setToolbars(comp, toolbars);\n },\n refreshToolbar: (apis, comp) => {\n return apis.refreshToolbar(comp);\n },\n toggleToolbarDrawer: (apis, comp) => {\n apis.toggleToolbarDrawer(comp);\n },\n toggleToolbarDrawerWithoutFocusing: (apis, comp) => {\n apis.toggleToolbarDrawerWithoutFocusing(comp);\n },\n isToolbarDrawerToggled: (apis, comp) => {\n return apis.isToolbarDrawerToggled(comp);\n },\n getThrobber: (apis, comp) => {\n return apis.getThrobber(comp);\n },\n setMenubar: (apis, comp, menus) => {\n apis.setMenubar(comp, menus);\n },\n focusMenubar: (apis, comp) => {\n apis.focusMenubar(comp);\n },\n focusToolbar: (apis, comp) => {\n apis.focusToolbar(comp);\n },\n setViews: (apis, comp, views) => {\n apis.setViews(comp, views);\n },\n toggleView: (apis, comp, name) => {\n return apis.toggleView(comp, name);\n },\n whichView: (apis, comp) => {\n return apis.whichView(comp);\n }\n }\n });\n\n const defaultMenubar = 'file edit view insert format tools table help';\n const defaultMenus = {\n file: {\n title: 'File',\n items: 'newdocument restoredraft | preview | export print | deleteallconversations'\n },\n edit: {\n title: 'Edit',\n items: 'undo redo | cut copy paste pastetext | selectall | searchreplace'\n },\n view: {\n title: 'View',\n items: 'code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments'\n },\n insert: {\n title: 'Insert',\n items: 'image link media addcomment pageembed template inserttemplate codesample inserttable accordion | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime'\n },\n format: {\n title: 'Format',\n items: 'bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat'\n },\n tools: {\n title: 'Tools',\n items: 'aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate'\n },\n table: {\n title: 'Table',\n items: 'inserttable | cell row column | advtablesort | tableprops deletetable'\n },\n help: {\n title: 'Help',\n items: 'help'\n }\n };\n const make = (menu, registry, editor) => {\n const removedMenuItems = getRemovedMenuItems(editor).split(/[ ,]/);\n return {\n text: menu.title,\n getItems: () => bind$3(menu.items, i => {\n const itemName = i.toLowerCase();\n if (itemName.trim().length === 0) {\n return [];\n } else if (exists(removedMenuItems, removedMenuItem => removedMenuItem === itemName)) {\n return [];\n } else if (itemName === 'separator' || itemName === '|') {\n return [{ type: 'separator' }];\n } else if (registry.menuItems[itemName]) {\n return [registry.menuItems[itemName]];\n } else {\n return [];\n }\n })\n };\n };\n const parseItemsString = items => {\n return items.split(' ');\n };\n const identifyMenus = (editor, registry) => {\n const rawMenuData = {\n ...defaultMenus,\n ...registry.menus\n };\n const userDefinedMenus = keys(registry.menus).length > 0;\n const menubar = registry.menubar === undefined || registry.menubar === true ? parseItemsString(defaultMenubar) : parseItemsString(registry.menubar === false ? '' : registry.menubar);\n const validMenus = filter$2(menubar, menuName => {\n const isDefaultMenu = has$2(defaultMenus, menuName);\n if (userDefinedMenus) {\n return isDefaultMenu || get$g(registry.menus, menuName).exists(menu => has$2(menu, 'items'));\n } else {\n return isDefaultMenu;\n }\n });\n const menus = map$2(validMenus, menuName => {\n const menuData = rawMenuData[menuName];\n return make({\n title: menuData.title,\n items: parseItemsString(menuData.items)\n }, registry, editor);\n });\n return filter$2(menus, menu => {\n const isNotSeparator = item => isString(item) || item.type !== 'separator';\n return menu.getItems().length > 0 && exists(menu.getItems(), isNotSeparator);\n });\n };\n\n const fireSkinLoaded = editor => {\n const done = () => {\n editor._skinLoaded = true;\n fireSkinLoaded$1(editor);\n };\n return () => {\n if (editor.initialized) {\n done();\n } else {\n editor.on('init', done);\n }\n };\n };\n const fireSkinLoadError = (editor, err) => () => fireSkinLoadError$1(editor, { message: err });\n\n const loadStylesheet = (editor, stylesheetUrl, styleSheetLoader) => {\n editor.on('remove', () => styleSheetLoader.unload(stylesheetUrl));\n return styleSheetLoader.load(stylesheetUrl);\n };\n const loadRawCss = (editor, key, css, styleSheetLoader) => {\n editor.on('remove', () => styleSheetLoader.unloadRawCss(key));\n return styleSheetLoader.loadRawCss(key, css);\n };\n const loadUiSkins = async (editor, skinUrl) => {\n const skinResourceIdentifier = getSkinUrlOption(editor).getOr('default');\n const skinUiCss = 'ui/' + skinResourceIdentifier + '/skin.css';\n const css = tinymce.Resource.get(skinUiCss);\n if (isString(css)) {\n return Promise.resolve(loadRawCss(editor, skinUiCss, css, editor.ui.styleSheetLoader));\n } else {\n const skinUiCss = skinUrl + '/skin.min.css';\n return loadStylesheet(editor, skinUiCss, editor.ui.styleSheetLoader);\n }\n };\n const loadShadowDomUiSkins = async (editor, skinUrl) => {\n const isInShadowRoot$1 = isInShadowRoot(SugarElement.fromDom(editor.getElement()));\n if (isInShadowRoot$1) {\n const skinResourceIdentifier = getSkinUrlOption(editor).getOr('default');\n const shadowDomSkinCss = 'ui/' + skinResourceIdentifier + '/skin.shadowdom.css';\n const css = tinymce.Resource.get(shadowDomSkinCss);\n if (isString(css)) {\n loadRawCss(editor, shadowDomSkinCss, css, global$7.DOM.styleSheetLoader);\n return Promise.resolve();\n } else {\n const shadowDomSkinCss = skinUrl + '/skin.shadowdom.min.css';\n return loadStylesheet(editor, shadowDomSkinCss, global$7.DOM.styleSheetLoader);\n }\n }\n };\n const loadUrlSkin = async (isInline, editor) => {\n getSkinUrlOption(editor).fold(() => {\n const skinResourceIdentifier = getSkinUrl(editor);\n if (skinResourceIdentifier) {\n editor.contentCSS.push(skinResourceIdentifier + (isInline ? '/content.inline' : '/content') + '.min.css');\n }\n }, skinUrl => {\n const skinContentCss = 'ui/' + skinUrl + (isInline ? '/content.inline' : '/content') + '.css';\n const css = tinymce.Resource.get(skinContentCss);\n if (isString(css)) {\n loadRawCss(editor, skinContentCss, css, editor.ui.styleSheetLoader);\n } else {\n const skinResourceIdentifier = getSkinUrl(editor);\n if (skinResourceIdentifier) {\n editor.contentCSS.push(skinResourceIdentifier + (isInline ? '/content.inline' : '/content') + '.min.css');\n }\n }\n });\n const skinUrl = getSkinUrl(editor);\n if (!isSkinDisabled(editor) && isString(skinUrl)) {\n return Promise.all([\n loadUiSkins(editor, skinUrl),\n loadShadowDomUiSkins(editor, skinUrl)\n ]).then();\n }\n };\n const loadSkin = (isInline, editor) => {\n return loadUrlSkin(isInline, editor).then(fireSkinLoaded(editor), fireSkinLoadError(editor, 'Skin could not be loaded'));\n };\n const iframe = curry(loadSkin, false);\n const inline = curry(loadSkin, true);\n\n const makeTooltipText = (editor, labelWithPlaceholder, value) => editor.translate([\n labelWithPlaceholder,\n editor.translate(value)\n ]);\n\n const generateSelectItems = (backstage, spec) => {\n const generateItem = (rawItem, response, invalid, value) => {\n const translatedText = backstage.shared.providers.translate(rawItem.title);\n if (rawItem.type === 'separator') {\n return Optional.some({\n type: 'separator',\n text: translatedText\n });\n } else if (rawItem.type === 'submenu') {\n const items = bind$3(rawItem.getStyleItems(), si => validate(si, response, value));\n if (response === 0 && items.length <= 0) {\n return Optional.none();\n } else {\n return Optional.some({\n type: 'nestedmenuitem',\n text: translatedText,\n enabled: items.length > 0,\n getSubmenuItems: () => bind$3(rawItem.getStyleItems(), si => validate(si, response, value))\n });\n }\n } else {\n return Optional.some({\n type: 'togglemenuitem',\n text: translatedText,\n icon: rawItem.icon,\n active: rawItem.isSelected(value),\n enabled: !invalid,\n onAction: spec.onAction(rawItem),\n ...rawItem.getStylePreview().fold(() => ({}), preview => ({ meta: { style: preview } }))\n });\n }\n };\n const validate = (item, response, value) => {\n const invalid = item.type === 'formatter' && spec.isInvalid(item);\n if (response === 0) {\n return invalid ? [] : generateItem(item, response, false, value).toArray();\n } else {\n return generateItem(item, response, invalid, value).toArray();\n }\n };\n const validateItems = preItems => {\n const value = spec.getCurrentValue();\n const response = spec.shouldHide ? 0 : 1;\n return bind$3(preItems, item => validate(item, response, value));\n };\n const getFetch = (backstage, getStyleItems) => (comp, callback) => {\n const preItems = getStyleItems();\n const items = validateItems(preItems);\n const menu = build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n isHorizontalMenu: false,\n search: Optional.none()\n });\n callback(menu);\n };\n return {\n validateItems,\n getFetch\n };\n };\n const createMenuItems = (editor, backstage, spec) => {\n const dataset = spec.dataset;\n const getStyleItems = dataset.type === 'basic' ? () => map$2(dataset.data, d => processBasic(d, spec.isSelectedFor, spec.getPreviewFor)) : dataset.getData;\n return {\n items: generateSelectItems(backstage, spec),\n getStyleItems\n };\n };\n const createSelectButton = (editor, backstage, spec, tooltipWithPlaceholder, textUpdateEventName) => {\n const {items, getStyleItems} = createMenuItems(editor, backstage, spec);\n const getApi = comp => ({\n getComponent: constant$1(comp),\n setTooltip: tooltip => {\n const translatedTooltip = backstage.shared.providers.translate(tooltip);\n setAll$1(comp.element, {\n 'aria-label': translatedTooltip,\n 'title': translatedTooltip\n });\n }\n });\n const onSetup = api => {\n const handler = e => api.setTooltip(makeTooltipText(editor, tooltipWithPlaceholder, e.value));\n editor.on(textUpdateEventName, handler);\n return composeUnbinders(onSetupEvent(editor, 'NodeChange', api => {\n const comp = api.getComponent();\n spec.updateText(comp);\n Disabling.set(api.getComponent(), !editor.selection.isEditable());\n })(api), () => editor.off(textUpdateEventName, handler));\n };\n return renderCommonDropdown({\n text: spec.icon.isSome() ? Optional.none() : spec.text,\n icon: spec.icon,\n tooltip: Optional.from(spec.tooltip),\n role: Optional.none(),\n fetch: items.getFetch(backstage, getStyleItems),\n onSetup,\n getApi,\n columns: 1,\n presets: 'normal',\n classes: spec.icon.isSome() ? [] : ['bespoke'],\n dropdownBehaviours: []\n }, 'tox-tbtn', backstage.shared);\n };\n\n const process = rawFormats => map$2(rawFormats, item => {\n let title = item, format = item;\n const values = item.split('=');\n if (values.length > 1) {\n title = values[0];\n format = values[1];\n }\n return {\n title,\n format\n };\n });\n const buildBasicStaticDataset = data => ({\n type: 'basic',\n data\n });\n var Delimiter;\n (function (Delimiter) {\n Delimiter[Delimiter['SemiColon'] = 0] = 'SemiColon';\n Delimiter[Delimiter['Space'] = 1] = 'Space';\n }(Delimiter || (Delimiter = {})));\n const split = (rawFormats, delimiter) => {\n if (delimiter === Delimiter.SemiColon) {\n return rawFormats.replace(/;$/, '').split(';');\n } else {\n return rawFormats.split(' ');\n }\n };\n const buildBasicSettingsDataset = (editor, settingName, delimiter) => {\n const rawFormats = editor.options.get(settingName);\n const data = process(split(rawFormats, delimiter));\n return {\n type: 'basic',\n data\n };\n };\n\n const menuTitle$4 = 'Align';\n const btnTooltip$4 = 'Alignment {0}';\n const fallbackAlignment = 'left';\n const alignMenuItems = [\n {\n title: 'Left',\n icon: 'align-left',\n format: 'alignleft',\n command: 'JustifyLeft'\n },\n {\n title: 'Center',\n icon: 'align-center',\n format: 'aligncenter',\n command: 'JustifyCenter'\n },\n {\n title: 'Right',\n icon: 'align-right',\n format: 'alignright',\n command: 'JustifyRight'\n },\n {\n title: 'Justify',\n icon: 'align-justify',\n format: 'alignjustify',\n command: 'JustifyFull'\n }\n ];\n const getSpec$4 = editor => {\n const getMatchingValue = () => find$5(alignMenuItems, item => editor.formatter.match(item.format));\n const isSelectedFor = format => () => editor.formatter.match(format);\n const getPreviewFor = _format => Optional.none;\n const updateSelectMenuIcon = comp => {\n const match = getMatchingValue();\n const alignment = match.fold(constant$1(fallbackAlignment), item => item.title.toLowerCase());\n emitWith(comp, updateMenuIcon, { icon: `align-${ alignment }` });\n fireAlignTextUpdate(editor, { value: alignment });\n };\n const dataset = buildBasicStaticDataset(alignMenuItems);\n const onAction = rawItem => () => find$5(alignMenuItems, item => item.format === rawItem.format).each(item => editor.execCommand(item.command));\n return {\n tooltip: makeTooltipText(editor, btnTooltip$4, fallbackAlignment),\n text: Optional.none(),\n icon: Optional.some('align-left'),\n isSelectedFor,\n getCurrentValue: Optional.none,\n getPreviewFor,\n onAction,\n updateText: updateSelectMenuIcon,\n dataset,\n shouldHide: false,\n isInvalid: item => !editor.formatter.canApply(item.format)\n };\n };\n const createAlignButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$4(editor), btnTooltip$4, 'AlignTextUpdate');\n const createAlignMenu = (editor, backstage) => {\n const menuItems = createMenuItems(editor, backstage, getSpec$4(editor));\n editor.ui.registry.addNestedMenuItem('align', {\n text: backstage.shared.providers.translate(menuTitle$4),\n onSetup: onSetupEditableToggle(editor),\n getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n });\n };\n\n const findNearest = (editor, getStyles) => {\n const styles = getStyles();\n const formats = map$2(styles, style => style.format);\n return Optional.from(editor.formatter.closest(formats)).bind(fmt => find$5(styles, data => data.format === fmt)).orThunk(() => someIf(editor.formatter.match('p'), {\n title: 'Paragraph',\n format: 'p'\n }));\n };\n\n const menuTitle$3 = 'Blocks';\n const btnTooltip$3 = 'Block {0}';\n const fallbackFormat = 'Paragraph';\n const getSpec$3 = editor => {\n const isSelectedFor = format => () => editor.formatter.match(format);\n const getPreviewFor = format => () => {\n const fmt = editor.formatter.get(format);\n if (fmt) {\n return Optional.some({\n tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',\n styles: editor.dom.parseStyle(editor.formatter.getCssText(format))\n });\n } else {\n return Optional.none();\n }\n };\n const updateSelectMenuText = comp => {\n const detectedFormat = findNearest(editor, () => dataset.data);\n const text = detectedFormat.fold(constant$1(fallbackFormat), fmt => fmt.title);\n emitWith(comp, updateMenuText, { text });\n fireBlocksTextUpdate(editor, { value: text });\n };\n const dataset = buildBasicSettingsDataset(editor, 'block_formats', Delimiter.SemiColon);\n return {\n tooltip: makeTooltipText(editor, btnTooltip$3, fallbackFormat),\n text: Optional.some(fallbackFormat),\n icon: Optional.none(),\n isSelectedFor,\n getCurrentValue: Optional.none,\n getPreviewFor,\n onAction: onActionToggleFormat$1(editor),\n updateText: updateSelectMenuText,\n dataset,\n shouldHide: false,\n isInvalid: item => !editor.formatter.canApply(item.format)\n };\n };\n const createBlocksButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$3(editor), btnTooltip$3, 'BlocksTextUpdate');\n const createBlocksMenu = (editor, backstage) => {\n const menuItems = createMenuItems(editor, backstage, getSpec$3(editor));\n editor.ui.registry.addNestedMenuItem('blocks', {\n text: menuTitle$3,\n onSetup: onSetupEditableToggle(editor),\n getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n });\n };\n\n const menuTitle$2 = 'Fonts';\n const btnTooltip$2 = 'Font {0}';\n const systemFont = 'System Font';\n const systemStackFonts = [\n '-apple-system',\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n 'sans-serif'\n ];\n const splitFonts = fontFamily => {\n const fonts = fontFamily.split(/\\s*,\\s*/);\n return map$2(fonts, font => font.replace(/^['\"]+|['\"]+$/g, ''));\n };\n const matchesStack = (fonts, stack) => stack.length > 0 && forall(stack, font => fonts.indexOf(font.toLowerCase()) > -1);\n const isSystemFontStack = (fontFamily, userStack) => {\n if (fontFamily.indexOf('-apple-system') === 0 || userStack.length > 0) {\n const fonts = splitFonts(fontFamily.toLowerCase());\n return matchesStack(fonts, systemStackFonts) || matchesStack(fonts, userStack);\n } else {\n return false;\n }\n };\n const getSpec$2 = editor => {\n const getMatchingValue = () => {\n const getFirstFont = fontFamily => fontFamily ? splitFonts(fontFamily)[0] : '';\n const fontFamily = editor.queryCommandValue('FontName');\n const items = dataset.data;\n const font = fontFamily ? fontFamily.toLowerCase() : '';\n const userStack = getDefaultFontStack(editor);\n const matchOpt = find$5(items, item => {\n const format = item.format;\n return format.toLowerCase() === font || getFirstFont(format).toLowerCase() === getFirstFont(font).toLowerCase();\n }).orThunk(() => {\n return someIf(isSystemFontStack(font, userStack), {\n title: systemFont,\n format: font\n });\n });\n return {\n matchOpt,\n font: fontFamily\n };\n };\n const isSelectedFor = item => valueOpt => valueOpt.exists(value => value.format === item);\n const getCurrentValue = () => {\n const {matchOpt} = getMatchingValue();\n return matchOpt;\n };\n const getPreviewFor = item => () => Optional.some({\n tag: 'div',\n styles: item.indexOf('dings') === -1 ? { 'font-family': item } : {}\n });\n const onAction = rawItem => () => {\n editor.undoManager.transact(() => {\n editor.focus();\n editor.execCommand('FontName', false, rawItem.format);\n });\n };\n const updateSelectMenuText = comp => {\n const {matchOpt, font} = getMatchingValue();\n const text = matchOpt.fold(constant$1(font), item => item.title);\n emitWith(comp, updateMenuText, { text });\n fireFontFamilyTextUpdate(editor, { value: text });\n };\n const dataset = buildBasicSettingsDataset(editor, 'font_family_formats', Delimiter.SemiColon);\n return {\n tooltip: makeTooltipText(editor, btnTooltip$2, systemFont),\n text: Optional.some(systemFont),\n icon: Optional.none(),\n isSelectedFor,\n getCurrentValue,\n getPreviewFor,\n onAction,\n updateText: updateSelectMenuText,\n dataset,\n shouldHide: false,\n isInvalid: never\n };\n };\n const createFontFamilyButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$2(editor), btnTooltip$2, 'FontFamilyTextUpdate');\n const createFontFamilyMenu = (editor, backstage) => {\n const menuItems = createMenuItems(editor, backstage, getSpec$2(editor));\n editor.ui.registry.addNestedMenuItem('fontfamily', {\n text: backstage.shared.providers.translate(menuTitle$2),\n onSetup: onSetupEditableToggle(editor),\n getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n });\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 const normalise = (input, accepted) => parse(input, accepted).map(({value, unit}) => value + unit);\n\n const Keys = {\n tab: constant$1(9),\n escape: constant$1(27),\n enter: constant$1(13),\n backspace: constant$1(8),\n delete: constant$1(46),\n left: constant$1(37),\n up: constant$1(38),\n right: constant$1(39),\n down: constant$1(40),\n space: constant$1(32),\n home: constant$1(36),\n end: constant$1(35),\n pageUp: constant$1(33),\n pageDown: constant$1(34)\n };\n\n const createBespokeNumberInput = (editor, backstage, spec) => {\n let currentComp = Optional.none();\n const getValueFromCurrentComp = comp => comp.map(alloyComp => Representing.getValue(alloyComp)).getOr('');\n const onSetup = onSetupEvent(editor, 'NodeChange SwitchMode', api => {\n const comp = api.getComponent();\n currentComp = Optional.some(comp);\n spec.updateInputValue(comp);\n Disabling.set(comp, !editor.selection.isEditable());\n });\n const getApi = comp => ({ getComponent: constant$1(comp) });\n const editorOffCell = Cell(noop);\n const customEvents = generate$6('custom-number-input-events');\n const changeValue = (f, fromInput, focusBack) => {\n const text = getValueFromCurrentComp(currentComp);\n const newValue = spec.getNewValue(text, f);\n const lenghtDelta = text.length - `${ newValue }`.length;\n const oldStart = currentComp.map(comp => comp.element.dom.selectionStart - lenghtDelta);\n const oldEnd = currentComp.map(comp => comp.element.dom.selectionEnd - lenghtDelta);\n spec.onAction(newValue, focusBack);\n currentComp.each(comp => {\n Representing.setValue(comp, newValue);\n if (fromInput) {\n oldStart.each(oldStart => comp.element.dom.selectionStart = oldStart);\n oldEnd.each(oldEnd => comp.element.dom.selectionEnd = oldEnd);\n }\n });\n };\n const decrease = (fromInput, focusBack) => changeValue((n, s) => n - s, fromInput, focusBack);\n const increase = (fromInput, focusBack) => changeValue((n, s) => n + s, fromInput, focusBack);\n const goToParent = comp => parentElement(comp.element).fold(Optional.none, parent => {\n focus$3(parent);\n return Optional.some(true);\n });\n const focusInput = comp => {\n if (hasFocus(comp.element)) {\n firstChild(comp.element).each(input => focus$3(input));\n return Optional.some(true);\n } else {\n return Optional.none();\n }\n };\n const makeStepperButton = (action, title, tooltip, classes) => {\n const editorOffCellStepButton = Cell(noop);\n const translatedTooltip = backstage.shared.providers.translate(tooltip);\n const altExecuting = generate$6('altExecuting');\n const onSetup = onSetupEvent(editor, 'NodeChange SwitchMode', api => {\n Disabling.set(api.getComponent(), !editor.selection.isEditable());\n });\n const onClick = comp => {\n if (!Disabling.isDisabled(comp)) {\n action(true);\n }\n };\n return Button.sketch({\n dom: {\n tag: 'button',\n attributes: {\n 'title': translatedTooltip,\n 'aria-label': translatedTooltip\n },\n classes: classes.concat(title)\n },\n components: [renderIconFromPack$1(title, backstage.shared.providers.icons)],\n buttonBehaviours: derive$1([\n Disabling.config({}),\n config(altExecuting, [\n onControlAttached({\n onSetup,\n getApi\n }, editorOffCellStepButton),\n onControlDetached({ getApi }, editorOffCellStepButton),\n run$1(keydown(), (comp, se) => {\n if (se.event.raw.keyCode === Keys.space() || se.event.raw.keyCode === Keys.enter()) {\n if (!Disabling.isDisabled(comp)) {\n action(false);\n }\n }\n }),\n run$1(click(), onClick),\n run$1(touchend(), onClick)\n ])\n ]),\n eventOrder: {\n [keydown()]: [\n altExecuting,\n 'keying'\n ],\n [click()]: [\n altExecuting,\n 'alloy.base.behaviour'\n ],\n [touchend()]: [\n altExecuting,\n 'alloy.base.behaviour'\n ]\n }\n });\n };\n const memMinus = record(makeStepperButton(focusBack => decrease(false, focusBack), 'minus', 'Decrease font size', []));\n const memPlus = record(makeStepperButton(focusBack => increase(false, focusBack), 'plus', 'Increase font size', []));\n const memInput = record({\n dom: {\n tag: 'div',\n classes: ['tox-input-wrapper']\n },\n components: [Input.sketch({\n inputBehaviours: derive$1([\n Disabling.config({}),\n config(customEvents, [\n onControlAttached({\n onSetup,\n getApi\n }, editorOffCell),\n onControlDetached({ getApi }, editorOffCell)\n ]),\n config('input-update-display-text', [\n run$1(updateMenuText, (comp, se) => {\n Representing.setValue(comp, se.event.text);\n }),\n run$1(focusout(), comp => {\n spec.onAction(Representing.getValue(comp));\n }),\n run$1(change(), comp => {\n spec.onAction(Representing.getValue(comp));\n })\n ]),\n Keying.config({\n mode: 'special',\n onEnter: _comp => {\n changeValue(identity, true, true);\n return Optional.some(true);\n },\n onEscape: goToParent,\n onUp: _comp => {\n increase(true, false);\n return Optional.some(true);\n },\n onDown: _comp => {\n decrease(true, false);\n return Optional.some(true);\n },\n onLeft: (_comp, se) => {\n se.cut();\n return Optional.none();\n },\n onRight: (_comp, se) => {\n se.cut();\n return Optional.none();\n }\n })\n ])\n })],\n behaviours: derive$1([\n Focusing.config({}),\n Keying.config({\n mode: 'special',\n onEnter: focusInput,\n onSpace: focusInput,\n onEscape: goToParent\n }),\n config('input-wrapper-events', [run$1(mouseover(), comp => {\n each$1([\n memMinus,\n memPlus\n ], button => {\n const buttonNode = SugarElement.fromDom(button.get(comp).element.dom);\n if (hasFocus(buttonNode)) {\n blur$1(buttonNode);\n }\n });\n })])\n ])\n });\n return {\n dom: {\n tag: 'div',\n classes: ['tox-number-input']\n },\n components: [\n memMinus.asSpec(),\n memInput.asSpec(),\n memPlus.asSpec()\n ],\n behaviours: derive$1([\n Focusing.config({}),\n Keying.config({\n mode: 'flow',\n focusInside: FocusInsideModes.OnEnterOrSpaceMode,\n cycles: false,\n selector: 'button, .tox-input-wrapper',\n onEscape: wrapperComp => {\n if (hasFocus(wrapperComp.element)) {\n return Optional.none();\n } else {\n focus$3(wrapperComp.element);\n return Optional.some(true);\n }\n }\n })\n ])\n };\n };\n\n const menuTitle$1 = 'Font sizes';\n const btnTooltip$1 = 'Font size {0}';\n const fallbackFontSize = '12pt';\n const legacyFontSizes = {\n '8pt': '1',\n '10pt': '2',\n '12pt': '3',\n '14pt': '4',\n '18pt': '5',\n '24pt': '6',\n '36pt': '7'\n };\n const keywordFontSizes = {\n 'xx-small': '7pt',\n 'x-small': '8pt',\n 'small': '10pt',\n 'medium': '12pt',\n 'large': '14pt',\n 'x-large': '18pt',\n 'xx-large': '24pt'\n };\n const round = (number, precision) => {\n const factor = Math.pow(10, precision);\n return Math.round(number * factor) / factor;\n };\n const toPt = (fontSize, precision) => {\n if (/[0-9.]+px$/.test(fontSize)) {\n return round(parseInt(fontSize, 10) * 72 / 96, precision || 0) + 'pt';\n } else {\n return get$g(keywordFontSizes, fontSize).getOr(fontSize);\n }\n };\n const toLegacy = fontSize => get$g(legacyFontSizes, fontSize).getOr('');\n const getSpec$1 = editor => {\n const getMatchingValue = () => {\n let matchOpt = Optional.none();\n const items = dataset.data;\n const fontSize = editor.queryCommandValue('FontSize');\n if (fontSize) {\n for (let precision = 3; matchOpt.isNone() && precision >= 0; precision--) {\n const pt = toPt(fontSize, precision);\n const legacy = toLegacy(pt);\n matchOpt = find$5(items, item => item.format === fontSize || item.format === pt || item.format === legacy);\n }\n }\n return {\n matchOpt,\n size: fontSize\n };\n };\n const isSelectedFor = item => valueOpt => valueOpt.exists(value => value.format === item);\n const getCurrentValue = () => {\n const {matchOpt} = getMatchingValue();\n return matchOpt;\n };\n const getPreviewFor = constant$1(Optional.none);\n const onAction = rawItem => () => {\n editor.undoManager.transact(() => {\n editor.focus();\n editor.execCommand('FontSize', false, rawItem.format);\n });\n };\n const updateSelectMenuText = comp => {\n const {matchOpt, size} = getMatchingValue();\n const text = matchOpt.fold(constant$1(size), match => match.title);\n emitWith(comp, updateMenuText, { text });\n fireFontSizeTextUpdate(editor, { value: text });\n };\n const dataset = buildBasicSettingsDataset(editor, 'font_size_formats', Delimiter.Space);\n return {\n tooltip: makeTooltipText(editor, btnTooltip$1, fallbackFontSize),\n text: Optional.some(fallbackFontSize),\n icon: Optional.none(),\n isSelectedFor,\n getPreviewFor,\n getCurrentValue,\n onAction,\n updateText: updateSelectMenuText,\n dataset,\n shouldHide: false,\n isInvalid: never\n };\n };\n const createFontSizeButton = (editor, backstage) => createSelectButton(editor, backstage, getSpec$1(editor), btnTooltip$1, 'FontSizeTextUpdate');\n const getConfigFromUnit = unit => {\n var _a;\n const baseConfig = { step: 1 };\n const configs = {\n em: { step: 0.1 },\n cm: { step: 0.1 },\n in: { step: 0.1 },\n pc: { step: 0.1 },\n ch: { step: 0.1 },\n rem: { step: 0.1 }\n };\n return (_a = configs[unit]) !== null && _a !== void 0 ? _a : baseConfig;\n };\n const defaultValue = 16;\n const isValidValue = value => value >= 0;\n const getNumberInputSpec = editor => {\n const getCurrentValue = () => editor.queryCommandValue('FontSize');\n const updateInputValue = comp => emitWith(comp, updateMenuText, { text: getCurrentValue() });\n return {\n updateInputValue,\n onAction: (format, focusBack) => editor.execCommand('FontSize', false, format, { skip_focus: !focusBack }),\n getNewValue: (text, updateFunction) => {\n parse(text, [\n 'unsupportedLength',\n 'empty'\n ]);\n const currentValue = getCurrentValue();\n const parsedText = parse(text, [\n 'unsupportedLength',\n 'empty'\n ]).or(parse(currentValue, [\n 'unsupportedLength',\n 'empty'\n ]));\n const value = parsedText.map(res => res.value).getOr(defaultValue);\n const defaultUnit = getFontSizeInputDefaultUnit(editor);\n const unit = parsedText.map(res => res.unit).filter(u => u !== '').getOr(defaultUnit);\n const newValue = updateFunction(value, getConfigFromUnit(unit).step);\n const res = `${ isValidValue(newValue) ? newValue : value }${ unit }`;\n if (res !== currentValue) {\n fireFontSizeInputTextUpdate(editor, { value: res });\n }\n return res;\n }\n };\n };\n const createFontSizeInputButton = (editor, backstage) => createBespokeNumberInput(editor, backstage, getNumberInputSpec(editor));\n const createFontSizeMenu = (editor, backstage) => {\n const menuItems = createMenuItems(editor, backstage, getSpec$1(editor));\n editor.ui.registry.addNestedMenuItem('fontsize', {\n text: menuTitle$1,\n onSetup: onSetupEditableToggle(editor),\n getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n });\n };\n\n const menuTitle = 'Formats';\n const btnTooltip = 'Format {0}';\n const getSpec = (editor, dataset) => {\n const fallbackFormat = 'Paragraph';\n const isSelectedFor = format => () => editor.formatter.match(format);\n const getPreviewFor = format => () => {\n const fmt = editor.formatter.get(format);\n return fmt !== undefined ? Optional.some({\n tag: fmt.length > 0 ? fmt[0].inline || fmt[0].block || 'div' : 'div',\n styles: editor.dom.parseStyle(editor.formatter.getCssText(format))\n }) : Optional.none();\n };\n const updateSelectMenuText = comp => {\n const getFormatItems = fmt => {\n if (isNestedFormat(fmt)) {\n return bind$3(fmt.items, getFormatItems);\n } else if (isFormatReference(fmt)) {\n return [{\n title: fmt.title,\n format: fmt.format\n }];\n } else {\n return [];\n }\n };\n const flattenedItems = bind$3(getStyleFormats(editor), getFormatItems);\n const detectedFormat = findNearest(editor, constant$1(flattenedItems));\n const text = detectedFormat.fold(constant$1(fallbackFormat), fmt => fmt.title);\n emitWith(comp, updateMenuText, { text });\n fireStylesTextUpdate(editor, { value: text });\n };\n return {\n tooltip: makeTooltipText(editor, btnTooltip, fallbackFormat),\n text: Optional.some(fallbackFormat),\n icon: Optional.none(),\n isSelectedFor,\n getCurrentValue: Optional.none,\n getPreviewFor,\n onAction: onActionToggleFormat$1(editor),\n updateText: updateSelectMenuText,\n shouldHide: shouldAutoHideStyleFormats(editor),\n isInvalid: item => !editor.formatter.canApply(item.format),\n dataset\n };\n };\n const createStylesButton = (editor, backstage) => {\n const dataset = {\n type: 'advanced',\n ...backstage.styles\n };\n return createSelectButton(editor, backstage, getSpec(editor, dataset), btnTooltip, 'StylesTextUpdate');\n };\n const createStylesMenu = (editor, backstage) => {\n const dataset = {\n type: 'advanced',\n ...backstage.styles\n };\n const menuItems = createMenuItems(editor, backstage, getSpec(editor, dataset));\n editor.ui.registry.addNestedMenuItem('styles', {\n text: menuTitle,\n onSetup: onSetupEditableToggle(editor),\n getSubmenuItems: () => menuItems.items.validateItems(menuItems.getStyleItems())\n });\n };\n\n const schema$7 = constant$1([\n required$1('toggleClass'),\n required$1('fetch'),\n onStrictHandler('onExecute'),\n defaulted('getHotspot', Optional.some),\n defaulted('getAnchorOverrides', constant$1({})),\n schema$y(),\n onStrictHandler('onItemExecute'),\n option$3('lazySink'),\n required$1('dom'),\n onHandler('onOpen'),\n field('splitDropdownBehaviours', [\n Coupling,\n Keying,\n Focusing\n ]),\n defaulted('matchWidth', false),\n defaulted('useMinWidth', false),\n defaulted('eventOrder', {}),\n option$3('role')\n ].concat(sandboxFields()));\n const arrowPart = required({\n factory: Button,\n schema: [required$1('dom')],\n name: 'arrow',\n defaults: () => {\n return { buttonBehaviours: derive$1([Focusing.revoke()]) };\n },\n overrides: detail => {\n return {\n dom: {\n tag: 'span',\n attributes: { role: 'presentation' }\n },\n action: arrow => {\n arrow.getSystem().getByUid(detail.uid).each(emitExecute);\n },\n buttonBehaviours: derive$1([Toggling.config({\n toggleOnExecute: false,\n toggleClass: detail.toggleClass\n })])\n };\n }\n });\n const buttonPart = required({\n factory: Button,\n schema: [required$1('dom')],\n name: 'button',\n defaults: () => {\n return { buttonBehaviours: derive$1([Focusing.revoke()]) };\n },\n overrides: detail => {\n return {\n dom: {\n tag: 'span',\n attributes: { role: 'presentation' }\n },\n action: btn => {\n btn.getSystem().getByUid(detail.uid).each(splitDropdown => {\n detail.onExecute(splitDropdown, btn);\n });\n }\n };\n }\n });\n const parts$3 = constant$1([\n arrowPart,\n buttonPart,\n optional({\n factory: {\n sketch: spec => {\n return {\n uid: spec.uid,\n dom: {\n tag: 'span',\n styles: { display: 'none' },\n attributes: { 'aria-hidden': 'true' },\n innerHtml: spec.text\n }\n };\n }\n },\n schema: [required$1('text')],\n name: 'aria-descriptor'\n }),\n external({\n schema: [tieredMenuMarkers()],\n name: 'menu',\n defaults: detail => {\n return {\n onExecute: (tmenu, item) => {\n tmenu.getSystem().getByUid(detail.uid).each(splitDropdown => {\n detail.onItemExecute(splitDropdown, tmenu, item);\n });\n }\n };\n }\n }),\n partType$1()\n ]);\n\n const factory$5 = (detail, components, spec, externals) => {\n const switchToMenu = sandbox => {\n Composing.getCurrent(sandbox).each(current => {\n Highlighting.highlightFirst(current);\n Keying.focusIn(current);\n });\n };\n const action = component => {\n const onOpenSync = switchToMenu;\n togglePopup(detail, identity, component, externals, onOpenSync, HighlightOnOpen.HighlightMenuAndItem).get(noop);\n };\n const openMenu = comp => {\n action(comp);\n return Optional.some(true);\n };\n const executeOnButton = comp => {\n const button = getPartOrDie(comp, detail, 'button');\n emitExecute(button);\n return Optional.some(true);\n };\n const buttonEvents = {\n ...derive$2([runOnAttached((component, _simulatedEvent) => {\n const ariaDescriptor = getPart(component, detail, 'aria-descriptor');\n ariaDescriptor.each(descriptor => {\n const descriptorId = generate$6('aria');\n set$9(descriptor.element, 'id', descriptorId);\n set$9(component.element, 'aria-describedby', descriptorId);\n });\n })]),\n ...events$a(Optional.some(action))\n };\n const apis = {\n repositionMenus: comp => {\n if (Toggling.isOn(comp)) {\n repositionMenus(comp);\n }\n }\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n apis,\n eventOrder: {\n ...detail.eventOrder,\n [execute$5()]: [\n 'disabling',\n 'toggling',\n 'alloy.base.behaviour'\n ]\n },\n events: buttonEvents,\n behaviours: augment(detail.splitDropdownBehaviours, [\n Coupling.config({\n others: {\n sandbox: hotspot => {\n const arrow = getPartOrDie(hotspot, detail, 'arrow');\n const extras = {\n onOpen: () => {\n Toggling.on(arrow);\n Toggling.on(hotspot);\n },\n onClose: () => {\n Toggling.off(arrow);\n Toggling.off(hotspot);\n }\n };\n return makeSandbox$1(detail, hotspot, extras);\n }\n }\n }),\n Keying.config({\n mode: 'special',\n onSpace: executeOnButton,\n onEnter: executeOnButton,\n onDown: openMenu\n }),\n Focusing.config({}),\n Toggling.config({\n toggleOnExecute: false,\n aria: { mode: 'expanded' }\n })\n ]),\n domModification: {\n attributes: {\n 'role': detail.role.getOr('button'),\n 'aria-haspopup': true\n }\n }\n };\n };\n const SplitDropdown = composite({\n name: 'SplitDropdown',\n configFields: schema$7(),\n partFields: parts$3(),\n factory: factory$5,\n apis: { repositionMenus: (apis, comp) => apis.repositionMenus(comp) }\n });\n\n const getButtonApi = component => ({\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => Disabling.set(component, !state),\n setText: text => emitWith(component, updateMenuText, { text }),\n setIcon: icon => emitWith(component, updateMenuIcon, { icon })\n });\n const getToggleApi = component => ({\n setActive: state => {\n Toggling.set(component, state);\n },\n isActive: () => Toggling.isOn(component),\n isEnabled: () => !Disabling.isDisabled(component),\n setEnabled: state => Disabling.set(component, !state),\n setText: text => emitWith(component, updateMenuText, { text }),\n setIcon: icon => emitWith(component, updateMenuIcon, { icon })\n });\n const getTooltipAttributes = (tooltip, providersBackstage) => tooltip.map(tooltip => ({\n 'aria-label': providersBackstage.translate(tooltip),\n 'title': providersBackstage.translate(tooltip)\n })).getOr({});\n const focusButtonEvent = generate$6('focus-button');\n const renderCommonStructure = (optIcon, optText, tooltip, behaviours, providersBackstage) => {\n const optMemDisplayText = optText.map(text => record(renderLabel$1(text, 'tox-tbtn', providersBackstage)));\n const optMemDisplayIcon = optIcon.map(icon => record(renderReplaceableIconFromPack(icon, providersBackstage.icons)));\n return {\n dom: {\n tag: 'button',\n classes: ['tox-tbtn'].concat(optText.isSome() ? ['tox-tbtn--select'] : []),\n attributes: getTooltipAttributes(tooltip, providersBackstage)\n },\n components: componentRenderPipeline([\n optMemDisplayIcon.map(mem => mem.asSpec()),\n optMemDisplayText.map(mem => mem.asSpec())\n ]),\n eventOrder: {\n [mousedown()]: [\n 'focusing',\n 'alloy.base.behaviour',\n commonButtonDisplayEvent\n ],\n [attachedToDom()]: [\n commonButtonDisplayEvent,\n 'toolbar-group-button-events'\n ]\n },\n buttonBehaviours: derive$1([\n DisablingConfigs.toolbarButton(providersBackstage.isDisabled),\n receivingConfig(),\n config(commonButtonDisplayEvent, [\n runOnAttached((comp, _se) => forceInitialSize(comp)),\n run$1(updateMenuText, (comp, se) => {\n optMemDisplayText.bind(mem => mem.getOpt(comp)).each(displayText => {\n Replacing.set(displayText, [text$2(providersBackstage.translate(se.event.text))]);\n });\n }),\n run$1(updateMenuIcon, (comp, se) => {\n optMemDisplayIcon.bind(mem => mem.getOpt(comp)).each(displayIcon => {\n Replacing.set(displayIcon, [renderReplaceableIconFromPack(se.event.icon, providersBackstage.icons)]);\n });\n }),\n run$1(mousedown(), (button, se) => {\n se.event.prevent();\n emit(button, focusButtonEvent);\n })\n ])\n ].concat(behaviours.getOr([])))\n };\n };\n const renderFloatingToolbarButton = (spec, backstage, identifyButtons, attributes) => {\n const sharedBackstage = backstage.shared;\n const editorOffCell = Cell(noop);\n const specialisation = {\n toolbarButtonBehaviours: [],\n getApi: getButtonApi,\n onSetup: spec.onSetup\n };\n const behaviours = [config('toolbar-group-button-events', [\n onControlAttached(specialisation, editorOffCell),\n onControlDetached(specialisation, editorOffCell)\n ])];\n return FloatingToolbarButton.sketch({\n lazySink: sharedBackstage.getSink,\n fetch: () => Future.nu(resolve => {\n resolve(map$2(identifyButtons(spec.items), renderToolbarGroup));\n }),\n markers: { toggledClass: 'tox-tbtn--enabled' },\n parts: {\n button: renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.some(behaviours), sharedBackstage.providers),\n toolbar: {\n dom: {\n tag: 'div',\n classes: ['tox-toolbar__overflow'],\n attributes\n }\n }\n }\n });\n };\n const renderCommonToolbarButton = (spec, specialisation, providersBackstage) => {\n var _d;\n const editorOffCell = Cell(noop);\n const structure = renderCommonStructure(spec.icon, spec.text, spec.tooltip, Optional.none(), providersBackstage);\n return Button.sketch({\n dom: structure.dom,\n components: structure.components,\n eventOrder: toolbarButtonEventOrder,\n buttonBehaviours: {\n ...derive$1([\n config('toolbar-button-events', [\n onToolbarButtonExecute({\n onAction: spec.onAction,\n getApi: specialisation.getApi\n }),\n onControlAttached(specialisation, editorOffCell),\n onControlDetached(specialisation, editorOffCell)\n ]),\n DisablingConfigs.toolbarButton(() => !spec.enabled || providersBackstage.isDisabled()),\n receivingConfig()\n ].concat(specialisation.toolbarButtonBehaviours)),\n [commonButtonDisplayEvent]: (_d = structure.buttonBehaviours) === null || _d === void 0 ? void 0 : _d[commonButtonDisplayEvent]\n }\n });\n };\n const renderToolbarButton = (spec, providersBackstage) => renderToolbarButtonWith(spec, providersBackstage, []);\n const renderToolbarButtonWith = (spec, providersBackstage, bonusEvents) => renderCommonToolbarButton(spec, {\n toolbarButtonBehaviours: bonusEvents.length > 0 ? [config('toolbarButtonWith', bonusEvents)] : [],\n getApi: getButtonApi,\n onSetup: spec.onSetup\n }, providersBackstage);\n const renderToolbarToggleButton = (spec, providersBackstage) => renderToolbarToggleButtonWith(spec, providersBackstage, []);\n const renderToolbarToggleButtonWith = (spec, providersBackstage, bonusEvents) => renderCommonToolbarButton(spec, {\n toolbarButtonBehaviours: [\n Replacing.config({}),\n Toggling.config({\n toggleClass: 'tox-tbtn--enabled',\n aria: { mode: 'pressed' },\n toggleOnExecute: false\n })\n ].concat(bonusEvents.length > 0 ? [config('toolbarToggleButtonWith', bonusEvents)] : []),\n getApi: getToggleApi,\n onSetup: spec.onSetup\n }, providersBackstage);\n const fetchChoices = (getApi, spec, providersBackstage) => comp => Future.nu(callback => spec.fetch(callback)).map(items => Optional.from(createTieredDataFrom(deepMerge(createPartialChoiceMenu(generate$6('menu-value'), items, value => {\n spec.onItemAction(getApi(comp), value);\n }, spec.columns, spec.presets, ItemResponse$1.CLOSE_ON_EXECUTE, spec.select.getOr(never), providersBackstage), {\n movement: deriveMenuMovement(spec.columns, spec.presets),\n menuBehaviours: SimpleBehaviours.unnamedEvents(spec.columns !== 'auto' ? [] : [runOnAttached((comp, _se) => {\n detectSize(comp, 4, classForPreset(spec.presets)).each(({numRows, numColumns}) => {\n Keying.setGridSize(comp, numRows, numColumns);\n });\n })])\n }))));\n const renderSplitButton = (spec, sharedBackstage) => {\n const getApi = comp => ({\n isEnabled: () => !Disabling.isDisabled(comp),\n setEnabled: state => Disabling.set(comp, !state),\n setIconFill: (id, value) => {\n descendant(comp.element, `svg path[class=\"${ id }\"], rect[class=\"${ id }\"]`).each(underlinePath => {\n set$9(underlinePath, 'fill', value);\n });\n },\n setActive: state => {\n set$9(comp.element, 'aria-pressed', state);\n descendant(comp.element, 'span').each(button => {\n comp.getSystem().getByDom(button).each(buttonComp => Toggling.set(buttonComp, state));\n });\n },\n isActive: () => descendant(comp.element, 'span').exists(button => comp.getSystem().getByDom(button).exists(Toggling.isOn)),\n setText: text => descendant(comp.element, 'span').each(button => comp.getSystem().getByDom(button).each(buttonComp => emitWith(buttonComp, updateMenuText, { text }))),\n setIcon: icon => descendant(comp.element, 'span').each(button => comp.getSystem().getByDom(button).each(buttonComp => emitWith(buttonComp, updateMenuIcon, { icon }))),\n setTooltip: tooltip => {\n const translatedTooltip = sharedBackstage.providers.translate(tooltip);\n setAll$1(comp.element, {\n 'aria-label': translatedTooltip,\n 'title': translatedTooltip\n });\n }\n });\n const editorOffCell = Cell(noop);\n const specialisation = {\n getApi,\n onSetup: spec.onSetup\n };\n return SplitDropdown.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-split-button'],\n attributes: {\n 'aria-pressed': false,\n ...getTooltipAttributes(spec.tooltip, sharedBackstage.providers)\n }\n },\n onExecute: button => {\n const api = getApi(button);\n if (api.isEnabled()) {\n spec.onAction(api);\n }\n },\n onItemExecute: (_a, _b, _c) => {\n },\n splitDropdownBehaviours: derive$1([\n DisablingConfigs.splitButton(sharedBackstage.providers.isDisabled),\n receivingConfig(),\n config('split-dropdown-events', [\n runOnAttached((comp, _se) => forceInitialSize(comp)),\n run$1(focusButtonEvent, Focusing.focus),\n onControlAttached(specialisation, editorOffCell),\n onControlDetached(specialisation, editorOffCell)\n ]),\n Unselecting.config({})\n ]),\n eventOrder: {\n [attachedToDom()]: [\n 'alloy.base.behaviour',\n 'split-dropdown-events'\n ]\n },\n toggleClass: 'tox-tbtn--enabled',\n lazySink: sharedBackstage.getSink,\n fetch: fetchChoices(getApi, spec, sharedBackstage.providers),\n parts: { menu: part(false, spec.columns, spec.presets) },\n components: [\n SplitDropdown.parts.button(renderCommonStructure(spec.icon, spec.text, Optional.none(), Optional.some([Toggling.config({\n toggleClass: 'tox-tbtn--enabled',\n toggleOnExecute: false\n })]), sharedBackstage.providers)),\n SplitDropdown.parts.arrow({\n dom: {\n tag: 'button',\n classes: [\n 'tox-tbtn',\n 'tox-split-button__chevron'\n ],\n innerHtml: get$2('chevron-down', sharedBackstage.providers.icons)\n },\n buttonBehaviours: derive$1([\n DisablingConfigs.splitButton(sharedBackstage.providers.isDisabled),\n receivingConfig(),\n addFocusableBehaviour()\n ])\n }),\n SplitDropdown.parts['aria-descriptor']({ text: sharedBackstage.providers.translate('To open the popup, press Shift+Enter') })\n ]\n });\n };\n\n const defaultToolbar = [\n {\n name: 'history',\n items: [\n 'undo',\n 'redo'\n ]\n },\n {\n name: 'ai',\n items: [\n 'aidialog',\n 'aishortcuts'\n ]\n },\n {\n name: 'styles',\n items: ['styles']\n },\n {\n name: 'formatting',\n items: [\n 'bold',\n 'italic'\n ]\n },\n {\n name: 'alignment',\n items: [\n 'alignleft',\n 'aligncenter',\n 'alignright',\n 'alignjustify'\n ]\n },\n {\n name: 'indentation',\n items: [\n 'outdent',\n 'indent'\n ]\n },\n {\n name: 'permanent pen',\n items: ['permanentpen']\n },\n {\n name: 'comments',\n items: ['addcomment']\n }\n ];\n const renderFromBridge = (bridgeBuilder, render) => (spec, backstage, editor) => {\n const internal = bridgeBuilder(spec).mapError(errInfo => formatError(errInfo)).getOrDie();\n return render(internal, backstage, editor);\n };\n const types = {\n button: renderFromBridge(createToolbarButton, (s, backstage) => renderToolbarButton(s, backstage.shared.providers)),\n togglebutton: renderFromBridge(createToggleButton, (s, backstage) => renderToolbarToggleButton(s, backstage.shared.providers)),\n menubutton: renderFromBridge(createMenuButton, (s, backstage) => renderMenuButton(s, 'tox-tbtn', backstage, Optional.none(), false)),\n splitbutton: renderFromBridge(createSplitButton, (s, backstage) => renderSplitButton(s, backstage.shared)),\n grouptoolbarbutton: renderFromBridge(createGroupToolbarButton, (s, backstage, editor) => {\n const buttons = editor.ui.registry.getAll().buttons;\n const identify = toolbar => identifyButtons(editor, {\n buttons,\n toolbar,\n allowToolbarGroups: false\n }, backstage, Optional.none());\n const attributes = { [Attribute]: backstage.shared.header.isPositionedAtTop() ? AttributeValue.TopToBottom : AttributeValue.BottomToTop };\n switch (getToolbarMode(editor)) {\n case ToolbarMode$1.floating:\n return renderFloatingToolbarButton(s, backstage, identify, attributes);\n default:\n throw new Error('Toolbar groups are only supported when using floating toolbar mode');\n }\n })\n };\n const extractFrom = (spec, backstage, editor) => get$g(types, spec.type).fold(() => {\n console.error('skipping button defined by', spec);\n return Optional.none();\n }, render => Optional.some(render(spec, backstage, editor)));\n const bespokeButtons = {\n styles: createStylesButton,\n fontsize: createFontSizeButton,\n fontsizeinput: createFontSizeInputButton,\n fontfamily: createFontFamilyButton,\n blocks: createBlocksButton,\n align: createAlignButton\n };\n const removeUnusedDefaults = buttons => {\n const filteredItemGroups = map$2(defaultToolbar, group => {\n const items = filter$2(group.items, subItem => has$2(buttons, subItem) || has$2(bespokeButtons, subItem));\n return {\n name: group.name,\n items\n };\n });\n return filter$2(filteredItemGroups, group => group.items.length > 0);\n };\n const convertStringToolbar = strToolbar => {\n const groupsStrings = strToolbar.split('|');\n return map$2(groupsStrings, g => ({ items: g.trim().split(' ') }));\n };\n const isToolbarGroupSettingArray = toolbar => isArrayOf(toolbar, t => has$2(t, 'name') && has$2(t, 'items'));\n const createToolbar = toolbarConfig => {\n const toolbar = toolbarConfig.toolbar;\n const buttons = toolbarConfig.buttons;\n if (toolbar === false) {\n return [];\n } else if (toolbar === undefined || toolbar === true) {\n return removeUnusedDefaults(buttons);\n } else if (isString(toolbar)) {\n return convertStringToolbar(toolbar);\n } else if (isToolbarGroupSettingArray(toolbar)) {\n return toolbar;\n } else {\n console.error('Toolbar type should be string, string[], boolean or ToolbarGroup[]');\n return [];\n }\n };\n const lookupButton = (editor, buttons, toolbarItem, allowToolbarGroups, backstage, prefixes) => get$g(buttons, toolbarItem.toLowerCase()).orThunk(() => prefixes.bind(ps => findMap(ps, prefix => get$g(buttons, prefix + toolbarItem.toLowerCase())))).fold(() => get$g(bespokeButtons, toolbarItem.toLowerCase()).map(r => r(editor, backstage)), spec => {\n if (spec.type === 'grouptoolbarbutton' && !allowToolbarGroups) {\n console.warn(`Ignoring the '${ toolbarItem }' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`);\n return Optional.none();\n } else {\n return extractFrom(spec, backstage, editor);\n }\n });\n const identifyButtons = (editor, toolbarConfig, backstage, prefixes) => {\n const toolbarGroups = createToolbar(toolbarConfig);\n const groups = map$2(toolbarGroups, group => {\n const items = bind$3(group.items, toolbarItem => {\n return toolbarItem.trim().length === 0 ? [] : lookupButton(editor, toolbarConfig.buttons, toolbarItem, toolbarConfig.allowToolbarGroups, backstage, prefixes).toArray();\n });\n return {\n title: Optional.from(editor.translate(group.name)),\n items\n };\n });\n return filter$2(groups, group => group.items.length > 0);\n };\n\n const setToolbar = (editor, uiRefs, rawUiConfig, backstage) => {\n const outerContainer = uiRefs.mainUi.outerContainer;\n const toolbarConfig = rawUiConfig.toolbar;\n const toolbarButtonsConfig = rawUiConfig.buttons;\n if (isArrayOf(toolbarConfig, isString)) {\n const toolbars = toolbarConfig.map(t => {\n const config = {\n toolbar: t,\n buttons: toolbarButtonsConfig,\n allowToolbarGroups: rawUiConfig.allowToolbarGroups\n };\n return identifyButtons(editor, config, backstage, Optional.none());\n });\n OuterContainer.setToolbars(outerContainer, toolbars);\n } else {\n OuterContainer.setToolbar(outerContainer, identifyButtons(editor, rawUiConfig, backstage, Optional.none()));\n }\n };\n\n const detection = detect$2();\n const isiOS12 = detection.os.isiOS() && detection.os.version.major <= 12;\n const setupEvents$1 = (editor, uiRefs) => {\n const {uiMotherships} = uiRefs;\n const dom = editor.dom;\n let contentWindow = editor.getWin();\n const initialDocEle = editor.getDoc().documentElement;\n const lastWindowDimensions = Cell(SugarPosition(contentWindow.innerWidth, contentWindow.innerHeight));\n const lastDocumentDimensions = Cell(SugarPosition(initialDocEle.offsetWidth, initialDocEle.offsetHeight));\n const resizeWindow = () => {\n const outer = lastWindowDimensions.get();\n if (outer.left !== contentWindow.innerWidth || outer.top !== contentWindow.innerHeight) {\n lastWindowDimensions.set(SugarPosition(contentWindow.innerWidth, contentWindow.innerHeight));\n fireResizeContent(editor);\n }\n };\n const resizeDocument = () => {\n const docEle = editor.getDoc().documentElement;\n const inner = lastDocumentDimensions.get();\n if (inner.left !== docEle.offsetWidth || inner.top !== docEle.offsetHeight) {\n lastDocumentDimensions.set(SugarPosition(docEle.offsetWidth, docEle.offsetHeight));\n fireResizeContent(editor);\n }\n };\n const scroll = e => {\n fireScrollContent(editor, e);\n };\n dom.bind(contentWindow, 'resize', resizeWindow);\n dom.bind(contentWindow, 'scroll', scroll);\n const elementLoad = capture(SugarElement.fromDom(editor.getBody()), 'load', resizeDocument);\n editor.on('hide', () => {\n each$1(uiMotherships, m => {\n set$8(m.element, 'display', 'none');\n });\n });\n editor.on('show', () => {\n each$1(uiMotherships, m => {\n remove$6(m.element, 'display');\n });\n });\n editor.on('NodeChange', resizeDocument);\n editor.on('remove', () => {\n elementLoad.unbind();\n dom.unbind(contentWindow, 'resize', resizeWindow);\n dom.unbind(contentWindow, 'scroll', scroll);\n contentWindow = null;\n });\n };\n const attachUiMotherships = (editor, uiRoot, uiRefs) => {\n if (isSplitUiMode(editor)) {\n attachSystemAfter(uiRefs.mainUi.mothership.element, uiRefs.popupUi.mothership);\n }\n attachSystem(uiRoot, uiRefs.dialogUi.mothership);\n };\n const render$1 = (editor, uiRefs, rawUiConfig, backstage, args) => {\n const {mainUi, uiMotherships} = uiRefs;\n const lastToolbarWidth = Cell(0);\n const outerContainer = mainUi.outerContainer;\n iframe(editor);\n const eTargetNode = SugarElement.fromDom(args.targetNode);\n const uiRoot = getContentContainer(getRootNode(eTargetNode));\n attachSystemAfter(eTargetNode, mainUi.mothership);\n attachUiMotherships(editor, uiRoot, uiRefs);\n editor.on('SkinLoaded', () => {\n OuterContainer.setSidebar(outerContainer, rawUiConfig.sidebar, getSidebarShow(editor));\n setToolbar(editor, uiRefs, rawUiConfig, backstage);\n lastToolbarWidth.set(editor.getWin().innerWidth);\n OuterContainer.setMenubar(outerContainer, identifyMenus(editor, rawUiConfig));\n OuterContainer.setViews(outerContainer, rawUiConfig.views);\n setupEvents$1(editor, uiRefs);\n });\n const socket = OuterContainer.getSocket(outerContainer).getOrDie('Could not find expected socket element');\n if (isiOS12) {\n setAll(socket.element, {\n 'overflow': 'scroll',\n '-webkit-overflow-scrolling': 'touch'\n });\n const limit = first(() => {\n editor.dispatch('ScrollContent');\n }, 20);\n const unbinder = bind(socket.element, 'scroll', limit.throttle);\n editor.on('remove', unbinder.unbind);\n }\n setupReadonlyModeSwitch(editor, uiRefs);\n editor.addCommand('ToggleSidebar', (_ui, value) => {\n OuterContainer.toggleSidebar(outerContainer, value);\n editor.dispatch('ToggleSidebar');\n });\n editor.addQueryValueHandler('ToggleSidebar', () => {\n var _a;\n return (_a = OuterContainer.whichSidebar(outerContainer)) !== null && _a !== void 0 ? _a : '';\n });\n editor.addCommand('ToggleView', (_ui, value) => {\n if (OuterContainer.toggleView(outerContainer, value)) {\n const target = outerContainer.element;\n mainUi.mothership.broadcastOn([dismissPopups()], { target });\n each$1(uiMotherships, m => {\n m.broadcastOn([dismissPopups()], { target });\n });\n if (isNull(OuterContainer.whichView(outerContainer))) {\n editor.focus();\n editor.nodeChanged();\n OuterContainer.refreshToolbar(outerContainer);\n }\n }\n });\n editor.addQueryValueHandler('ToggleView', () => {\n var _a;\n return (_a = OuterContainer.whichView(outerContainer)) !== null && _a !== void 0 ? _a : '';\n });\n const toolbarMode = getToolbarMode(editor);\n const refreshDrawer = () => {\n OuterContainer.refreshToolbar(uiRefs.mainUi.outerContainer);\n };\n if (toolbarMode === ToolbarMode$1.sliding || toolbarMode === ToolbarMode$1.floating) {\n editor.on('ResizeWindow ResizeEditor ResizeContent', () => {\n const width = editor.getWin().innerWidth;\n if (width !== lastToolbarWidth.get()) {\n refreshDrawer();\n lastToolbarWidth.set(width);\n }\n });\n }\n const api = {\n setEnabled: state => {\n broadcastReadonly(uiRefs, !state);\n },\n isEnabled: () => !Disabling.isDisabled(outerContainer)\n };\n return {\n iframeContainer: socket.element.dom,\n editorContainer: outerContainer.element.dom,\n api\n };\n };\n\n var Iframe = /*#__PURE__*/Object.freeze({\n __proto__: null,\n render: render$1\n });\n\n const parseToInt = val => {\n const re = /^[0-9\\.]+(|px)$/i;\n if (re.test('' + val)) {\n return Optional.some(parseInt('' + val, 10));\n }\n return Optional.none();\n };\n const numToPx = val => isNumber(val) ? val + 'px' : val;\n const calcCappedSize = (size, minSize, maxSize) => {\n const minOverride = minSize.filter(min => size < min);\n const maxOverride = maxSize.filter(max => size > max);\n return minOverride.or(maxOverride).getOr(size);\n };\n\n const getHeight = editor => {\n const baseHeight = getHeightOption(editor);\n const minHeight = getMinHeightOption(editor);\n const maxHeight = getMaxHeightOption(editor);\n return parseToInt(baseHeight).map(height => calcCappedSize(height, minHeight, maxHeight));\n };\n const getHeightWithFallback = editor => {\n const height = getHeight(editor);\n return height.getOr(getHeightOption(editor));\n };\n const getWidth = editor => {\n const baseWidth = getWidthOption(editor);\n const minWidth = getMinWidthOption(editor);\n const maxWidth = getMaxWidthOption(editor);\n return parseToInt(baseWidth).map(width => calcCappedSize(width, minWidth, maxWidth));\n };\n const getWidthWithFallback = editor => {\n const width = getWidth(editor);\n return width.getOr(getWidthOption(editor));\n };\n\n const {ToolbarLocation, ToolbarMode} = Options;\n const maximumDistanceToEdge = 40;\n const InlineHeader = (editor, targetElm, uiRefs, backstage, floatContainer) => {\n const {mainUi, uiMotherships} = uiRefs;\n const DOM = global$7.DOM;\n const useFixedToolbarContainer = useFixedContainer(editor);\n const isSticky = isStickyToolbar(editor);\n const editorMaxWidthOpt = getMaxWidthOption(editor).or(getWidth(editor));\n const headerBackstage = backstage.shared.header;\n const isPositionedAtTop = headerBackstage.isPositionedAtTop;\n const toolbarMode = getToolbarMode(editor);\n const isSplitToolbar = toolbarMode === ToolbarMode.sliding || toolbarMode === ToolbarMode.floating;\n const visible = Cell(false);\n const isVisible = () => visible.get() && !editor.removed;\n const calcToolbarOffset = toolbar => isSplitToolbar ? toolbar.fold(constant$1(0), tbar => tbar.components().length > 1 ? get$d(tbar.components()[1].element) : 0) : 0;\n const calcMode = container => {\n switch (getToolbarLocation(editor)) {\n case ToolbarLocation.auto:\n const toolbar = OuterContainer.getToolbar(mainUi.outerContainer);\n const offset = calcToolbarOffset(toolbar);\n const toolbarHeight = get$d(container.element) - offset;\n const targetBounds = box$1(targetElm);\n const roomAtTop = targetBounds.y > toolbarHeight;\n if (roomAtTop) {\n return 'top';\n } else {\n const doc = documentElement(targetElm);\n const docHeight = Math.max(doc.dom.scrollHeight, get$d(doc));\n const roomAtBottom = targetBounds.bottom < docHeight - toolbarHeight;\n if (roomAtBottom) {\n return 'bottom';\n } else {\n const winBounds = win();\n const isRoomAtBottomViewport = winBounds.bottom < targetBounds.bottom - toolbarHeight;\n return isRoomAtBottomViewport ? 'bottom' : 'top';\n }\n }\n case ToolbarLocation.bottom:\n return 'bottom';\n case ToolbarLocation.top:\n default:\n return 'top';\n }\n };\n const setupMode = mode => {\n floatContainer.on(container => {\n Docking.setModes(container, [mode]);\n headerBackstage.setDockingMode(mode);\n const verticalDir = isPositionedAtTop() ? AttributeValue.TopToBottom : AttributeValue.BottomToTop;\n set$9(container.element, Attribute, verticalDir);\n });\n };\n const updateChromeWidth = () => {\n floatContainer.on(container => {\n const maxWidth = editorMaxWidthOpt.getOrThunk(() => {\n const bodyMargin = parseToInt(get$e(body(), 'margin-left')).getOr(0);\n return get$c(body()) - absolute$3(targetElm).left + bodyMargin;\n });\n set$8(container.element, 'max-width', maxWidth + 'px');\n });\n };\n const updateChromePosition = optToolbarWidth => {\n floatContainer.on(container => {\n const toolbar = OuterContainer.getToolbar(mainUi.outerContainer);\n const offset = calcToolbarOffset(toolbar);\n const targetBounds = box$1(targetElm);\n const {top, left} = getOffsetParent$1(editor, mainUi.outerContainer.element).fold(() => {\n return {\n top: isPositionedAtTop() ? Math.max(targetBounds.y - get$d(container.element) + offset, 0) : targetBounds.bottom,\n left: targetBounds.x\n };\n }, offsetParent => {\n var _a;\n const offsetBox = box$1(offsetParent);\n const scrollDelta = (_a = offsetParent.dom.scrollTop) !== null && _a !== void 0 ? _a : 0;\n const isOffsetParentBody = eq(offsetParent, body());\n const topValue = isOffsetParentBody ? Math.max(targetBounds.y - get$d(container.element) + offset, 0) : targetBounds.y - offsetBox.y + scrollDelta - get$d(container.element) + offset;\n return {\n top: isPositionedAtTop() ? topValue : targetBounds.bottom,\n left: isOffsetParentBody ? targetBounds.x : targetBounds.x - offsetBox.x\n };\n });\n const baseProperties = {\n position: 'absolute',\n left: Math.round(left) + 'px',\n top: Math.round(top) + 'px'\n };\n const widthProperties = optToolbarWidth.map(toolbarWidth => {\n const scroll = get$b();\n const minimumToolbarWidth = 150;\n const availableWidth = window.innerWidth - (left - scroll.left);\n const width = Math.max(Math.min(toolbarWidth, availableWidth), minimumToolbarWidth);\n return { width: width + 'px' };\n }).getOr({});\n setAll(mainUi.outerContainer.element, {\n ...baseProperties,\n ...widthProperties\n });\n });\n };\n const getOffsetParent$1 = (editor, element) => isSplitUiMode(editor) ? getOffsetParent(element) : Optional.none();\n const repositionPopups$1 = () => {\n each$1(uiMotherships, m => {\n m.broadcastOn([repositionPopups()], {});\n });\n };\n const restoreAndGetCompleteOuterContainerWidth = () => {\n if (!useFixedToolbarContainer) {\n const toolbarCurrentRightsidePosition = absolute$3(mainUi.outerContainer.element).left + getOuter$1(mainUi.outerContainer.element);\n if (toolbarCurrentRightsidePosition >= window.innerWidth - maximumDistanceToEdge || getRaw(mainUi.outerContainer.element, 'width').isSome()) {\n set$8(mainUi.outerContainer.element, 'position', 'absolute');\n set$8(mainUi.outerContainer.element, 'left', '0px');\n remove$6(mainUi.outerContainer.element, 'width');\n const w = getOuter$1(mainUi.outerContainer.element);\n return Optional.some(w);\n } else {\n return Optional.none();\n }\n } else {\n return Optional.none();\n }\n };\n const update = stickyAction => {\n if (!isVisible()) {\n return;\n }\n if (!useFixedToolbarContainer) {\n updateChromeWidth();\n }\n const optToolbarWidth = useFixedToolbarContainer ? Optional.none() : restoreAndGetCompleteOuterContainerWidth();\n if (isSplitToolbar) {\n OuterContainer.refreshToolbar(mainUi.outerContainer);\n }\n if (!useFixedToolbarContainer) {\n updateChromePosition(optToolbarWidth);\n }\n if (isSticky) {\n floatContainer.on(stickyAction);\n }\n repositionPopups$1();\n };\n const doUpdateMode = () => {\n if (useFixedToolbarContainer || !isSticky || !isVisible()) {\n return false;\n }\n return floatContainer.get().exists(fc => {\n const currentMode = headerBackstage.getDockingMode();\n const newMode = calcMode(fc);\n if (newMode !== currentMode) {\n setupMode(newMode);\n return true;\n } else {\n return false;\n }\n });\n };\n const show = () => {\n visible.set(true);\n set$8(mainUi.outerContainer.element, 'display', 'flex');\n DOM.addClass(editor.getBody(), 'mce-edit-focus');\n each$1(uiMotherships, m => {\n remove$6(m.element, 'display');\n });\n doUpdateMode();\n if (isSplitUiMode(editor)) {\n update(elem => Docking.isDocked(elem) ? Docking.reset(elem) : Docking.refresh(elem));\n } else {\n update(Docking.refresh);\n }\n };\n const hide = () => {\n visible.set(false);\n set$8(mainUi.outerContainer.element, 'display', 'none');\n DOM.removeClass(editor.getBody(), 'mce-edit-focus');\n each$1(uiMotherships, m => {\n set$8(m.element, 'display', 'none');\n });\n };\n const updateMode = () => {\n const changedMode = doUpdateMode();\n if (changedMode) {\n update(Docking.reset);\n }\n };\n return {\n isVisible,\n isPositionedAtTop,\n show,\n hide,\n update,\n updateMode,\n repositionPopups: repositionPopups$1\n };\n };\n\n const getTargetPosAndBounds = (targetElm, isToolbarTop) => {\n const bounds = box$1(targetElm);\n return {\n pos: isToolbarTop ? bounds.y : bounds.bottom,\n bounds\n };\n };\n const setupEvents = (editor, targetElm, ui, toolbarPersist) => {\n const prevPosAndBounds = Cell(getTargetPosAndBounds(targetElm, ui.isPositionedAtTop()));\n const resizeContent = e => {\n const {pos, bounds} = getTargetPosAndBounds(targetElm, ui.isPositionedAtTop());\n const {\n pos: prevPos,\n bounds: prevBounds\n } = prevPosAndBounds.get();\n const hasResized = bounds.height !== prevBounds.height || bounds.width !== prevBounds.width;\n prevPosAndBounds.set({\n pos,\n bounds\n });\n if (hasResized) {\n fireResizeContent(editor, e);\n }\n if (ui.isVisible()) {\n if (prevPos !== pos) {\n ui.update(Docking.reset);\n } else if (hasResized) {\n ui.updateMode();\n ui.repositionPopups();\n }\n }\n };\n if (!toolbarPersist) {\n editor.on('activate', ui.show);\n editor.on('deactivate', ui.hide);\n }\n editor.on('SkinLoaded ResizeWindow', () => ui.update(Docking.reset));\n editor.on('NodeChange keydown', e => {\n requestAnimationFrame(() => resizeContent(e));\n });\n let lastScrollX = 0;\n const updateUi = last(() => ui.update(Docking.refresh), 33);\n editor.on('ScrollWindow', () => {\n const newScrollX = get$b().left;\n if (newScrollX !== lastScrollX) {\n lastScrollX = newScrollX;\n updateUi.throttle();\n }\n ui.updateMode();\n });\n if (isSplitUiMode(editor)) {\n editor.on('ElementScroll', _args => {\n ui.update(Docking.refresh);\n });\n }\n const elementLoad = unbindable();\n elementLoad.set(capture(SugarElement.fromDom(editor.getBody()), 'load', e => resizeContent(e.raw)));\n editor.on('remove', () => {\n elementLoad.clear();\n });\n };\n const render = (editor, uiRefs, rawUiConfig, backstage, args) => {\n const {mainUi} = uiRefs;\n const floatContainer = value$2();\n const targetElm = SugarElement.fromDom(args.targetNode);\n const ui = InlineHeader(editor, targetElm, uiRefs, backstage, floatContainer);\n const toolbarPersist = isToolbarPersist(editor);\n inline(editor);\n const render = () => {\n if (floatContainer.isSet()) {\n ui.show();\n return;\n }\n floatContainer.set(OuterContainer.getHeader(mainUi.outerContainer).getOrDie());\n const uiContainer = getUiContainer(editor);\n if (isSplitUiMode(editor)) {\n attachSystemAfter(targetElm, mainUi.mothership);\n attachSystemAfter(targetElm, uiRefs.popupUi.mothership);\n } else {\n attachSystem(uiContainer, mainUi.mothership);\n }\n attachSystem(uiContainer, uiRefs.dialogUi.mothership);\n setToolbar(editor, uiRefs, rawUiConfig, backstage);\n OuterContainer.setMenubar(mainUi.outerContainer, identifyMenus(editor, rawUiConfig));\n ui.show();\n setupEvents(editor, targetElm, ui, toolbarPersist);\n editor.nodeChanged();\n };\n editor.on('show', render);\n editor.on('hide', ui.hide);\n if (!toolbarPersist) {\n editor.on('focus', render);\n editor.on('blur', ui.hide);\n }\n editor.on('init', () => {\n if (editor.hasFocus() || toolbarPersist) {\n render();\n }\n });\n setupReadonlyModeSwitch(editor, uiRefs);\n const api = {\n show: render,\n hide: ui.hide,\n setEnabled: state => {\n broadcastReadonly(uiRefs, !state);\n },\n isEnabled: () => !Disabling.isDisabled(mainUi.outerContainer)\n };\n return {\n editorContainer: mainUi.outerContainer.element.dom,\n api\n };\n };\n\n var Inline = /*#__PURE__*/Object.freeze({\n __proto__: null,\n render: render\n });\n\n const LazyUiReferences = () => {\n const dialogUi = value$2();\n const popupUi = value$2();\n const mainUi = value$2();\n const lazyGetInOuterOrDie = (label, f) => () => mainUi.get().bind(oc => f(oc.outerContainer)).getOrDie(`Could not find ${ label } element in OuterContainer`);\n const getUiMotherships = () => {\n const optDialogMothership = dialogUi.get().map(ui => ui.mothership);\n const optPopupMothership = popupUi.get().map(ui => ui.mothership);\n return optDialogMothership.fold(() => optPopupMothership.toArray(), dm => optPopupMothership.fold(() => [dm], pm => eq(dm.element, pm.element) ? [dm] : [\n dm,\n pm\n ]));\n };\n return {\n dialogUi,\n popupUi,\n mainUi,\n getUiMotherships,\n lazyGetInOuterOrDie\n };\n };\n\n const showContextToolbarEvent = 'contexttoolbar-show';\n const hideContextToolbarEvent = 'contexttoolbar-hide';\n\n const getFormApi = input => ({\n hide: () => emit(input, sandboxClose()),\n getValue: () => Representing.getValue(input)\n });\n const runOnExecute = (memInput, original) => run$1(internalToolbarButtonExecute, (comp, se) => {\n const input = memInput.get(comp);\n const formApi = getFormApi(input);\n original.onAction(formApi, se.event.buttonApi);\n });\n const renderContextButton = (memInput, button, providers) => {\n const {primary, ...rest} = button.original;\n const bridged = getOrDie(createToolbarButton({\n ...rest,\n type: 'button',\n onAction: noop\n }));\n return renderToolbarButtonWith(bridged, providers, [runOnExecute(memInput, button)]);\n };\n const renderContextToggleButton = (memInput, button, providers) => {\n const {primary, ...rest} = button.original;\n const bridged = getOrDie(createToggleButton({\n ...rest,\n type: 'togglebutton',\n onAction: noop\n }));\n return renderToolbarToggleButtonWith(bridged, providers, [runOnExecute(memInput, button)]);\n };\n const isToggleButton = button => button.type === 'contextformtogglebutton';\n const generateOne = (memInput, button, providersBackstage) => {\n if (isToggleButton(button)) {\n return renderContextToggleButton(memInput, button, providersBackstage);\n } else {\n return renderContextButton(memInput, button, providersBackstage);\n }\n };\n const generate = (memInput, buttons, providersBackstage) => {\n const mementos = map$2(buttons, button => record(generateOne(memInput, button, providersBackstage)));\n const asSpecs = () => map$2(mementos, mem => mem.asSpec());\n const findPrimary = compInSystem => findMap(buttons, (button, i) => {\n if (button.primary) {\n return Optional.from(mementos[i]).bind(mem => mem.getOpt(compInSystem)).filter(not(Disabling.isDisabled));\n } else {\n return Optional.none();\n }\n });\n return {\n asSpecs,\n findPrimary\n };\n };\n\n const buildInitGroups = (ctx, providers) => {\n const inputAttributes = ctx.label.fold(() => ({}), label => ({ 'aria-label': label }));\n const memInput = record(Input.sketch({\n inputClasses: [\n 'tox-toolbar-textfield',\n 'tox-toolbar-nav-js'\n ],\n data: ctx.initValue(),\n inputAttributes,\n selectOnFocus: true,\n inputBehaviours: derive$1([Keying.config({\n mode: 'special',\n onEnter: input => commands.findPrimary(input).map(primary => {\n emitExecute(primary);\n return true;\n }),\n onLeft: (comp, se) => {\n se.cut();\n return Optional.none();\n },\n onRight: (comp, se) => {\n se.cut();\n return Optional.none();\n }\n })])\n }));\n const commands = generate(memInput, ctx.commands, providers);\n return [\n {\n title: Optional.none(),\n items: [memInput.asSpec()]\n },\n {\n title: Optional.none(),\n items: commands.asSpecs()\n }\n ];\n };\n const renderContextForm = (toolbarType, ctx, providers) => renderToolbar({\n type: toolbarType,\n uid: generate$6('context-toolbar'),\n initGroups: buildInitGroups(ctx, providers),\n onEscape: Optional.none,\n cyclicKeying: true,\n providers\n });\n const ContextForm = {\n renderContextForm,\n buildInitGroups\n };\n\n const isVerticalOverlap = (a, b, threshold) => b.bottom - a.y >= threshold && a.bottom - b.y >= threshold;\n const getRangeRect = rng => {\n const rect = rng.getBoundingClientRect();\n if (rect.height <= 0 && rect.width <= 0) {\n const leaf$1 = leaf(SugarElement.fromDom(rng.startContainer), rng.startOffset).element;\n const elm = isText(leaf$1) ? parent(leaf$1) : Optional.some(leaf$1);\n return elm.filter(isElement$1).map(e => e.dom.getBoundingClientRect()).getOr(rect);\n } else {\n return rect;\n }\n };\n const getSelectionBounds = editor => {\n const rng = editor.selection.getRng();\n const rect = getRangeRect(rng);\n if (editor.inline) {\n const scroll = get$b();\n return bounds(scroll.left + rect.left, scroll.top + rect.top, rect.width, rect.height);\n } else {\n const bodyPos = absolute$2(SugarElement.fromDom(editor.getBody()));\n return bounds(bodyPos.x + rect.left, bodyPos.y + rect.top, rect.width, rect.height);\n }\n };\n const getAnchorElementBounds = (editor, lastElement) => lastElement.filter(elem => inBody(elem) && isHTMLElement(elem)).map(absolute$2).getOrThunk(() => getSelectionBounds(editor));\n const getHorizontalBounds = (contentAreaBox, viewportBounds, margin) => {\n const x = Math.max(contentAreaBox.x + margin, viewportBounds.x);\n const right = Math.min(contentAreaBox.right - margin, viewportBounds.right);\n return {\n x,\n width: right - x\n };\n };\n const getVerticalBounds = (editor, contentAreaBox, viewportBounds, isToolbarLocationTop, toolbarType, margin) => {\n const container = SugarElement.fromDom(editor.getContainer());\n const header = descendant(container, '.tox-editor-header').getOr(container);\n const headerBox = box$1(header);\n const isToolbarBelowContentArea = headerBox.y >= contentAreaBox.bottom;\n const isToolbarAbove = isToolbarLocationTop && !isToolbarBelowContentArea;\n if (editor.inline && isToolbarAbove) {\n return {\n y: Math.max(headerBox.bottom + margin, viewportBounds.y),\n bottom: viewportBounds.bottom\n };\n }\n if (editor.inline && !isToolbarAbove) {\n return {\n y: viewportBounds.y,\n bottom: Math.min(headerBox.y - margin, viewportBounds.bottom)\n };\n }\n const containerBounds = toolbarType === 'line' ? box$1(container) : contentAreaBox;\n if (isToolbarAbove) {\n return {\n y: Math.max(headerBox.bottom + margin, viewportBounds.y),\n bottom: Math.min(containerBounds.bottom - margin, viewportBounds.bottom)\n };\n }\n return {\n y: Math.max(containerBounds.y + margin, viewportBounds.y),\n bottom: Math.min(headerBox.y - margin, viewportBounds.bottom)\n };\n };\n const getContextToolbarBounds = (editor, sharedBackstage, toolbarType, margin = 0) => {\n const viewportBounds = getBounds$3(window);\n const contentAreaBox = box$1(SugarElement.fromDom(editor.getContentAreaContainer()));\n const toolbarOrMenubarEnabled = isMenubarEnabled(editor) || isToolbarEnabled(editor) || isMultipleToolbars(editor);\n const {x, width} = getHorizontalBounds(contentAreaBox, viewportBounds, margin);\n if (editor.inline && !toolbarOrMenubarEnabled) {\n return bounds(x, viewportBounds.y, width, viewportBounds.height);\n } else {\n const isToolbarTop = sharedBackstage.header.isPositionedAtTop();\n const {y, bottom} = getVerticalBounds(editor, contentAreaBox, viewportBounds, isToolbarTop, toolbarType, margin);\n return bounds(x, y, width, bottom - y);\n }\n };\n\n const bubbleSize$1 = 12;\n const bubbleAlignments$1 = {\n valignCentre: [],\n alignCentre: [],\n alignLeft: ['tox-pop--align-left'],\n alignRight: ['tox-pop--align-right'],\n right: ['tox-pop--right'],\n left: ['tox-pop--left'],\n bottom: ['tox-pop--bottom'],\n top: ['tox-pop--top'],\n inset: ['tox-pop--inset']\n };\n const anchorOverrides = {\n maxHeightFunction: expandable$1(),\n maxWidthFunction: expandable()\n };\n const isEntireElementSelected = (editor, elem) => {\n const rng = editor.selection.getRng();\n const leaf$1 = leaf(SugarElement.fromDom(rng.startContainer), rng.startOffset);\n return rng.startContainer === rng.endContainer && rng.startOffset === rng.endOffset - 1 && eq(leaf$1.element, elem);\n };\n const preservePosition = (elem, position, f) => {\n const currentPosition = getRaw(elem, 'position');\n set$8(elem, 'position', position);\n const result = f(elem);\n currentPosition.each(pos => set$8(elem, 'position', pos));\n return result;\n };\n const shouldUseInsetLayouts = position => position === 'node';\n const determineInsetLayout = (editor, contextbar, elem, data, bounds) => {\n const selectionBounds = getSelectionBounds(editor);\n const isSameAnchorElement = data.lastElement().exists(prev => eq(elem, prev));\n if (isEntireElementSelected(editor, elem)) {\n return isSameAnchorElement ? preserve : north;\n } else if (isSameAnchorElement) {\n return preservePosition(contextbar, data.getMode(), () => {\n const isOverlapping = isVerticalOverlap(selectionBounds, box$1(contextbar), -20);\n return isOverlapping && !data.isReposition() ? flip : preserve;\n });\n } else {\n const yBounds = data.getMode() === 'fixed' ? bounds.y + get$b().top : bounds.y;\n const contextbarHeight = get$d(contextbar) + bubbleSize$1;\n return yBounds + contextbarHeight <= selectionBounds.y ? north : south;\n }\n };\n const getAnchorSpec$2 = (editor, mobile, data, position) => {\n const smartInsetLayout = elem => (anchor, element, bubbles, placee, bounds) => {\n const layout = determineInsetLayout(editor, placee, elem, data, bounds);\n const newAnchor = {\n ...anchor,\n y: bounds.y,\n height: bounds.height\n };\n return {\n ...layout(newAnchor, element, bubbles, placee, bounds),\n alwaysFit: true\n };\n };\n const getInsetLayouts = elem => shouldUseInsetLayouts(position) ? [smartInsetLayout(elem)] : [];\n const desktopAnchorSpecLayouts = {\n onLtr: elem => [\n north$2,\n south$2,\n northeast$2,\n southeast$2,\n northwest$2,\n southwest$2\n ].concat(getInsetLayouts(elem)),\n onRtl: elem => [\n north$2,\n south$2,\n northwest$2,\n southwest$2,\n northeast$2,\n southeast$2\n ].concat(getInsetLayouts(elem))\n };\n const mobileAnchorSpecLayouts = {\n onLtr: elem => [\n south$2,\n southeast$2,\n southwest$2,\n northeast$2,\n northwest$2,\n north$2\n ].concat(getInsetLayouts(elem)),\n onRtl: elem => [\n south$2,\n southwest$2,\n southeast$2,\n northwest$2,\n northeast$2,\n north$2\n ].concat(getInsetLayouts(elem))\n };\n return mobile ? mobileAnchorSpecLayouts : desktopAnchorSpecLayouts;\n };\n const getAnchorLayout = (editor, position, isTouch, data) => {\n if (position === 'line') {\n return {\n bubble: nu$5(bubbleSize$1, 0, bubbleAlignments$1),\n layouts: {\n onLtr: () => [east$2],\n onRtl: () => [west$2]\n },\n overrides: anchorOverrides\n };\n } else {\n return {\n bubble: nu$5(0, bubbleSize$1, bubbleAlignments$1, 1 / bubbleSize$1),\n layouts: getAnchorSpec$2(editor, isTouch, data, position),\n overrides: anchorOverrides\n };\n }\n };\n\n const matchTargetWith = (elem, candidates) => {\n const ctxs = filter$2(candidates, toolbarApi => toolbarApi.predicate(elem.dom));\n const {pass, fail} = partition$3(ctxs, t => t.type === 'contexttoolbar');\n return {\n contextToolbars: pass,\n contextForms: fail\n };\n };\n const filterByPositionForStartNode = toolbars => {\n if (toolbars.length <= 1) {\n return toolbars;\n } else {\n const doesPositionExist = value => exists(toolbars, t => t.position === value);\n const filterToolbarsByPosition = value => filter$2(toolbars, t => t.position === value);\n const hasSelectionToolbars = doesPositionExist('selection');\n const hasNodeToolbars = doesPositionExist('node');\n if (hasSelectionToolbars || hasNodeToolbars) {\n if (hasNodeToolbars && hasSelectionToolbars) {\n const nodeToolbars = filterToolbarsByPosition('node');\n const selectionToolbars = map$2(filterToolbarsByPosition('selection'), t => ({\n ...t,\n position: 'node'\n }));\n return nodeToolbars.concat(selectionToolbars);\n } else {\n return hasSelectionToolbars ? filterToolbarsByPosition('selection') : filterToolbarsByPosition('node');\n }\n } else {\n return filterToolbarsByPosition('line');\n }\n }\n };\n const filterByPositionForAncestorNode = toolbars => {\n if (toolbars.length <= 1) {\n return toolbars;\n } else {\n const findPosition = value => find$5(toolbars, t => t.position === value);\n const basePosition = findPosition('selection').orThunk(() => findPosition('node')).orThunk(() => findPosition('line')).map(t => t.position);\n return basePosition.fold(() => [], pos => filter$2(toolbars, t => t.position === pos));\n }\n };\n const matchStartNode = (elem, nodeCandidates, editorCandidates) => {\n const nodeMatches = matchTargetWith(elem, nodeCandidates);\n if (nodeMatches.contextForms.length > 0) {\n return Optional.some({\n elem,\n toolbars: [nodeMatches.contextForms[0]]\n });\n } else {\n const editorMatches = matchTargetWith(elem, editorCandidates);\n if (editorMatches.contextForms.length > 0) {\n return Optional.some({\n elem,\n toolbars: [editorMatches.contextForms[0]]\n });\n } else if (nodeMatches.contextToolbars.length > 0 || editorMatches.contextToolbars.length > 0) {\n const toolbars = filterByPositionForStartNode(nodeMatches.contextToolbars.concat(editorMatches.contextToolbars));\n return Optional.some({\n elem,\n toolbars\n });\n } else {\n return Optional.none();\n }\n }\n };\n const matchAncestor = (isRoot, startNode, scopes) => {\n if (isRoot(startNode)) {\n return Optional.none();\n } else {\n return ancestor$2(startNode, ancestorElem => {\n if (isElement$1(ancestorElem)) {\n const {contextToolbars, contextForms} = matchTargetWith(ancestorElem, scopes.inNodeScope);\n const toolbars = contextForms.length > 0 ? contextForms : filterByPositionForAncestorNode(contextToolbars);\n return toolbars.length > 0 ? Optional.some({\n elem: ancestorElem,\n toolbars\n }) : Optional.none();\n } else {\n return Optional.none();\n }\n }, isRoot);\n }\n };\n const lookup$1 = (scopes, editor) => {\n const rootElem = SugarElement.fromDom(editor.getBody());\n const isRoot = elem => eq(elem, rootElem);\n const isOutsideRoot = startNode => !isRoot(startNode) && !contains(rootElem, startNode);\n const startNode = SugarElement.fromDom(editor.selection.getNode());\n if (isOutsideRoot(startNode)) {\n return Optional.none();\n }\n return matchStartNode(startNode, scopes.inNodeScope, scopes.inEditorScope).orThunk(() => matchAncestor(isRoot, startNode, scopes));\n };\n\n const categorise = (contextToolbars, navigate) => {\n const forms = {};\n const inNodeScope = [];\n const inEditorScope = [];\n const formNavigators = {};\n const lookupTable = {};\n const registerForm = (key, toolbarSpec) => {\n const contextForm = getOrDie(createContextForm(toolbarSpec));\n forms[key] = contextForm;\n contextForm.launch.map(launch => {\n formNavigators['form:' + key + ''] = {\n ...toolbarSpec.launch,\n type: launch.type === 'contextformtogglebutton' ? 'togglebutton' : 'button',\n onAction: () => {\n navigate(contextForm);\n }\n };\n });\n if (contextForm.scope === 'editor') {\n inEditorScope.push(contextForm);\n } else {\n inNodeScope.push(contextForm);\n }\n lookupTable[key] = contextForm;\n };\n const registerToolbar = (key, toolbarSpec) => {\n createContextToolbar(toolbarSpec).each(contextToolbar => {\n if (toolbarSpec.scope === 'editor') {\n inEditorScope.push(contextToolbar);\n } else {\n inNodeScope.push(contextToolbar);\n }\n lookupTable[key] = contextToolbar;\n });\n };\n const keys$1 = keys(contextToolbars);\n each$1(keys$1, key => {\n const toolbarApi = contextToolbars[key];\n if (toolbarApi.type === 'contextform') {\n registerForm(key, toolbarApi);\n } else if (toolbarApi.type === 'contexttoolbar') {\n registerToolbar(key, toolbarApi);\n }\n });\n return {\n forms,\n inNodeScope,\n inEditorScope,\n lookupTable,\n formNavigators\n };\n };\n\n const forwardSlideEvent = generate$6('forward-slide');\n const backSlideEvent = generate$6('backward-slide');\n const changeSlideEvent = generate$6('change-slide-event');\n const resizingClass = 'tox-pop--resizing';\n const renderContextToolbar = spec => {\n const stack = Cell([]);\n return InlineView.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-pop']\n },\n fireDismissalEventInstead: { event: 'doNotDismissYet' },\n onShow: comp => {\n stack.set([]);\n InlineView.getContent(comp).each(c => {\n remove$6(c.element, 'visibility');\n });\n remove$2(comp.element, resizingClass);\n remove$6(comp.element, 'width');\n },\n inlineBehaviours: derive$1([\n config('context-toolbar-events', [\n runOnSource(transitionend(), (comp, se) => {\n if (se.event.raw.propertyName === 'width') {\n remove$2(comp.element, resizingClass);\n remove$6(comp.element, 'width');\n }\n }),\n run$1(changeSlideEvent, (comp, se) => {\n const elem = comp.element;\n remove$6(elem, 'width');\n const currentWidth = get$c(elem);\n InlineView.setContent(comp, se.event.contents);\n add$2(elem, resizingClass);\n const newWidth = get$c(elem);\n set$8(elem, 'width', currentWidth + 'px');\n InlineView.getContent(comp).each(newContents => {\n se.event.focus.bind(f => {\n focus$3(f);\n return search(elem);\n }).orThunk(() => {\n Keying.focusIn(newContents);\n return active$1(getRootNode(elem));\n });\n });\n setTimeout(() => {\n set$8(comp.element, 'width', newWidth + 'px');\n }, 0);\n }),\n run$1(forwardSlideEvent, (comp, se) => {\n InlineView.getContent(comp).each(oldContents => {\n stack.set(stack.get().concat([{\n bar: oldContents,\n focus: active$1(getRootNode(comp.element))\n }]));\n });\n emitWith(comp, changeSlideEvent, {\n contents: se.event.forwardContents,\n focus: Optional.none()\n });\n }),\n run$1(backSlideEvent, (comp, _se) => {\n last$1(stack.get()).each(last => {\n stack.set(stack.get().slice(0, stack.get().length - 1));\n emitWith(comp, changeSlideEvent, {\n contents: premade(last.bar),\n focus: last.focus\n });\n });\n })\n ]),\n Keying.config({\n mode: 'special',\n onEscape: comp => last$1(stack.get()).fold(() => spec.onEscape(), _ => {\n emit(comp, backSlideEvent);\n return Optional.some(true);\n })\n })\n ]),\n lazySink: () => Result.value(spec.sink)\n });\n };\n\n const transitionClass = 'tox-pop--transition';\n const register$9 = (editor, registryContextToolbars, sink, extras) => {\n const backstage = extras.backstage;\n const sharedBackstage = backstage.shared;\n const isTouch = detect$2().deviceType.isTouch;\n const lastElement = value$2();\n const lastTrigger = value$2();\n const lastContextPosition = value$2();\n const contextbar = build$1(renderContextToolbar({\n sink,\n onEscape: () => {\n editor.focus();\n return Optional.some(true);\n }\n }));\n const getBounds = () => {\n const position = lastContextPosition.get().getOr('node');\n const margin = shouldUseInsetLayouts(position) ? 1 : 0;\n return getContextToolbarBounds(editor, sharedBackstage, position, margin);\n };\n const canLaunchToolbar = () => {\n return !editor.removed && !(isTouch() && backstage.isContextMenuOpen());\n };\n const isSameLaunchElement = elem => is$1(lift2(elem, lastElement.get(), eq), true);\n const shouldContextToolbarHide = () => {\n if (!canLaunchToolbar()) {\n return true;\n } else {\n const contextToolbarBounds = getBounds();\n const anchorBounds = is$1(lastContextPosition.get(), 'node') ? getAnchorElementBounds(editor, lastElement.get()) : getSelectionBounds(editor);\n return contextToolbarBounds.height <= 0 || !isVerticalOverlap(anchorBounds, contextToolbarBounds, 0.01);\n }\n };\n const close = () => {\n lastElement.clear();\n lastTrigger.clear();\n lastContextPosition.clear();\n InlineView.hide(contextbar);\n };\n const hideOrRepositionIfNecessary = () => {\n if (InlineView.isOpen(contextbar)) {\n const contextBarEle = contextbar.element;\n remove$6(contextBarEle, 'display');\n if (shouldContextToolbarHide()) {\n set$8(contextBarEle, 'display', 'none');\n } else {\n lastTrigger.set(0);\n InlineView.reposition(contextbar);\n }\n }\n };\n const wrapInPopDialog = toolbarSpec => ({\n dom: {\n tag: 'div',\n classes: ['tox-pop__dialog']\n },\n components: [toolbarSpec],\n behaviours: derive$1([\n Keying.config({ mode: 'acyclic' }),\n config('pop-dialog-wrap-events', [\n runOnAttached(comp => {\n editor.shortcuts.add('ctrl+F9', 'focus statusbar', () => Keying.focusIn(comp));\n }),\n runOnDetached(_comp => {\n editor.shortcuts.remove('ctrl+F9');\n })\n ])\n ])\n });\n const getScopes = cached(() => categorise(registryContextToolbars, toolbarApi => {\n const alloySpec = buildToolbar([toolbarApi]);\n emitWith(contextbar, forwardSlideEvent, { forwardContents: wrapInPopDialog(alloySpec) });\n }));\n const buildContextToolbarGroups = (allButtons, ctx) => identifyButtons(editor, {\n buttons: allButtons,\n toolbar: ctx.items,\n allowToolbarGroups: false\n }, extras.backstage, Optional.some(['form:']));\n const buildContextFormGroups = (ctx, providers) => ContextForm.buildInitGroups(ctx, providers);\n const buildToolbar = toolbars => {\n const {buttons} = editor.ui.registry.getAll();\n const scopes = getScopes();\n const allButtons = {\n ...buttons,\n ...scopes.formNavigators\n };\n const toolbarType = getToolbarMode(editor) === ToolbarMode$1.scrolling ? ToolbarMode$1.scrolling : ToolbarMode$1.default;\n const initGroups = flatten(map$2(toolbars, ctx => ctx.type === 'contexttoolbar' ? buildContextToolbarGroups(allButtons, ctx) : buildContextFormGroups(ctx, sharedBackstage.providers)));\n return renderToolbar({\n type: toolbarType,\n uid: generate$6('context-toolbar'),\n initGroups,\n onEscape: Optional.none,\n cyclicKeying: true,\n providers: sharedBackstage.providers\n });\n };\n const getAnchor = (position, element) => {\n const anchorage = position === 'node' ? sharedBackstage.anchors.node(element) : sharedBackstage.anchors.cursor();\n const anchorLayout = getAnchorLayout(editor, position, isTouch(), {\n lastElement: lastElement.get,\n isReposition: () => is$1(lastTrigger.get(), 0),\n getMode: () => Positioning.getMode(sink)\n });\n return deepMerge(anchorage, anchorLayout);\n };\n const launchContext = (toolbarApi, elem) => {\n launchContextToolbar.cancel();\n if (!canLaunchToolbar()) {\n return;\n }\n const toolbarSpec = buildToolbar(toolbarApi);\n const position = toolbarApi[0].position;\n const anchor = getAnchor(position, elem);\n lastContextPosition.set(position);\n lastTrigger.set(1);\n const contextBarEle = contextbar.element;\n remove$6(contextBarEle, 'display');\n if (!isSameLaunchElement(elem)) {\n remove$2(contextBarEle, transitionClass);\n Positioning.reset(sink, contextbar);\n }\n InlineView.showWithinBounds(contextbar, wrapInPopDialog(toolbarSpec), {\n anchor,\n transition: {\n classes: [transitionClass],\n mode: 'placement'\n }\n }, () => Optional.some(getBounds()));\n elem.fold(lastElement.clear, lastElement.set);\n if (shouldContextToolbarHide()) {\n set$8(contextBarEle, 'display', 'none');\n }\n };\n let isDragging = false;\n const launchContextToolbar = last(() => {\n if (!editor.hasFocus() || editor.removed || isDragging) {\n return;\n }\n if (has(contextbar.element, transitionClass)) {\n launchContextToolbar.throttle();\n } else {\n const scopes = getScopes();\n lookup$1(scopes, editor).fold(close, info => {\n launchContext(info.toolbars, Optional.some(info.elem));\n });\n }\n }, 17);\n editor.on('init', () => {\n editor.on('remove', close);\n editor.on('ScrollContent ScrollWindow ObjectResized ResizeEditor longpress', hideOrRepositionIfNecessary);\n editor.on('click keyup focus SetContent', launchContextToolbar.throttle);\n editor.on(hideContextToolbarEvent, close);\n editor.on(showContextToolbarEvent, e => {\n const scopes = getScopes();\n get$g(scopes.lookupTable, e.toolbarKey).each(ctx => {\n launchContext([ctx], someIf(e.target !== editor, e.target));\n InlineView.getContent(contextbar).each(Keying.focusIn);\n });\n });\n editor.on('focusout', _e => {\n global$9.setEditorTimeout(editor, () => {\n if (search(sink.element).isNone() && search(contextbar.element).isNone()) {\n close();\n }\n }, 0);\n });\n editor.on('SwitchMode', () => {\n if (editor.mode.isReadOnly()) {\n close();\n }\n });\n editor.on('AfterProgressState', event => {\n if (event.state) {\n close();\n } else if (editor.hasFocus()) {\n launchContextToolbar.throttle();\n }\n });\n editor.on('dragstart', () => {\n isDragging = true;\n });\n editor.on('dragend drop', () => {\n isDragging = false;\n });\n editor.on('NodeChange', _e => {\n search(contextbar.element).fold(launchContextToolbar.throttle, noop);\n });\n });\n };\n\n const register$8 = editor => {\n const alignToolbarButtons = [\n {\n name: 'alignleft',\n text: 'Align left',\n cmd: 'JustifyLeft',\n icon: 'align-left'\n },\n {\n name: 'aligncenter',\n text: 'Align center',\n cmd: 'JustifyCenter',\n icon: 'align-center'\n },\n {\n name: 'alignright',\n text: 'Align right',\n cmd: 'JustifyRight',\n icon: 'align-right'\n },\n {\n name: 'alignjustify',\n text: 'Justify',\n cmd: 'JustifyFull',\n icon: 'align-justify'\n }\n ];\n each$1(alignToolbarButtons, item => {\n editor.ui.registry.addToggleButton(item.name, {\n tooltip: item.text,\n icon: item.icon,\n onAction: onActionExecCommand(editor, item.cmd),\n onSetup: onSetupStateToggle(editor, item.name)\n });\n });\n editor.ui.registry.addButton('alignnone', {\n tooltip: 'No alignment',\n icon: 'align-none',\n onSetup: onSetupEditableToggle(editor),\n onAction: onActionExecCommand(editor, 'JustifyNone')\n });\n };\n\n const registerController = (editor, spec) => {\n const getMenuItems = () => {\n const options = spec.getOptions(editor);\n const initial = spec.getCurrent(editor).map(spec.hash);\n const current = value$2();\n return map$2(options, value => ({\n type: 'togglemenuitem',\n text: spec.display(value),\n onSetup: api => {\n const setActive = active => {\n if (active) {\n current.on(oldApi => oldApi.setActive(false));\n current.set(api);\n }\n api.setActive(active);\n };\n setActive(is$1(initial, spec.hash(value)));\n const unbindWatcher = spec.watcher(editor, value, setActive);\n return () => {\n current.clear();\n unbindWatcher();\n };\n },\n onAction: () => spec.setCurrent(editor, value)\n }));\n };\n editor.ui.registry.addMenuButton(spec.name, {\n tooltip: spec.text,\n icon: spec.icon,\n fetch: callback => callback(getMenuItems()),\n onSetup: spec.onToolbarSetup\n });\n editor.ui.registry.addNestedMenuItem(spec.name, {\n type: 'nestedmenuitem',\n text: spec.text,\n getSubmenuItems: getMenuItems,\n onSetup: spec.onMenuSetup\n });\n };\n const lineHeightSpec = editor => ({\n name: 'lineheight',\n text: 'Line height',\n icon: 'line-height',\n getOptions: getLineHeightFormats,\n hash: input => normalise(input, [\n 'fixed',\n 'relative',\n 'empty'\n ]).getOr(input),\n display: identity,\n watcher: (editor, value, callback) => editor.formatter.formatChanged('lineheight', callback, false, { value }).unbind,\n getCurrent: editor => Optional.from(editor.queryCommandValue('LineHeight')),\n setCurrent: (editor, value) => editor.execCommand('LineHeight', false, value),\n onToolbarSetup: onSetupEditableToggle(editor),\n onMenuSetup: onSetupEditableToggle(editor)\n });\n const languageSpec = editor => {\n const settingsOpt = Optional.from(getContentLanguages(editor));\n return settingsOpt.map(settings => ({\n name: 'language',\n text: 'Language',\n icon: 'language',\n getOptions: constant$1(settings),\n hash: input => isUndefined(input.customCode) ? input.code : `${ input.code }/${ input.customCode }`,\n display: input => input.title,\n watcher: (editor, value, callback) => {\n var _a;\n return editor.formatter.formatChanged('lang', callback, false, {\n value: value.code,\n customValue: (_a = value.customCode) !== null && _a !== void 0 ? _a : null\n }).unbind;\n },\n getCurrent: editor => {\n const node = SugarElement.fromDom(editor.selection.getNode());\n return closest$4(node, n => Optional.some(n).filter(isElement$1).bind(ele => {\n const codeOpt = getOpt(ele, 'lang');\n return codeOpt.map(code => {\n const customCode = getOpt(ele, 'data-mce-lang').getOrUndefined();\n return {\n code,\n customCode,\n title: ''\n };\n });\n }));\n },\n setCurrent: (editor, lang) => editor.execCommand('Lang', false, lang),\n onToolbarSetup: api => {\n const unbinder = unbindable();\n api.setActive(editor.formatter.match('lang', {}, undefined, true));\n unbinder.set(editor.formatter.formatChanged('lang', api.setActive, true));\n return composeUnbinders(unbinder.clear, onSetupEditableToggle(editor)(api));\n },\n onMenuSetup: onSetupEditableToggle(editor)\n }));\n };\n const register$7 = editor => {\n registerController(editor, lineHeightSpec(editor));\n languageSpec(editor).each(spec => registerController(editor, spec));\n };\n\n const register$6 = (editor, backstage) => {\n createAlignMenu(editor, backstage);\n createFontFamilyMenu(editor, backstage);\n createStylesMenu(editor, backstage);\n createBlocksMenu(editor, backstage);\n createFontSizeMenu(editor, backstage);\n };\n\n const onSetupOutdentState = editor => onSetupEvent(editor, 'NodeChange', api => {\n api.setEnabled(editor.queryCommandState('outdent') && editor.selection.isEditable());\n });\n const registerButtons$2 = editor => {\n editor.ui.registry.addButton('outdent', {\n tooltip: 'Decrease indent',\n icon: 'outdent',\n onSetup: onSetupOutdentState(editor),\n onAction: onActionExecCommand(editor, 'outdent')\n });\n editor.ui.registry.addButton('indent', {\n tooltip: 'Increase indent',\n icon: 'indent',\n onSetup: onSetupEditableToggle(editor),\n onAction: onActionExecCommand(editor, 'indent')\n });\n };\n const register$5 = editor => {\n registerButtons$2(editor);\n };\n\n const makeSetupHandler = (editor, pasteAsText) => api => {\n api.setActive(pasteAsText.get());\n const pastePlainTextToggleHandler = e => {\n pasteAsText.set(e.state);\n api.setActive(e.state);\n };\n editor.on('PastePlainTextToggle', pastePlainTextToggleHandler);\n return composeUnbinders(() => editor.off('PastePlainTextToggle', pastePlainTextToggleHandler), onSetupEditableToggle(editor)(api));\n };\n const register$4 = editor => {\n const pasteAsText = Cell(getPasteAsText(editor));\n const onAction = () => editor.execCommand('mceTogglePlainTextPaste');\n editor.ui.registry.addToggleButton('pastetext', {\n active: false,\n icon: 'paste-text',\n tooltip: 'Paste as text',\n onAction,\n onSetup: makeSetupHandler(editor, pasteAsText)\n });\n editor.ui.registry.addToggleMenuItem('pastetext', {\n text: 'Paste as text',\n icon: 'paste-text',\n onAction,\n onSetup: makeSetupHandler(editor, pasteAsText)\n });\n };\n\n const onActionToggleFormat = (editor, fmt) => () => {\n editor.execCommand('mceToggleFormat', false, fmt);\n };\n const registerFormatButtons = editor => {\n global$1.each([\n {\n name: 'bold',\n text: 'Bold',\n icon: 'bold'\n },\n {\n name: 'italic',\n text: 'Italic',\n icon: 'italic'\n },\n {\n name: 'underline',\n text: 'Underline',\n icon: 'underline'\n },\n {\n name: 'strikethrough',\n text: 'Strikethrough',\n icon: 'strike-through'\n },\n {\n name: 'subscript',\n text: 'Subscript',\n icon: 'subscript'\n },\n {\n name: 'superscript',\n text: 'Superscript',\n icon: 'superscript'\n }\n ], (btn, _idx) => {\n editor.ui.registry.addToggleButton(btn.name, {\n tooltip: btn.text,\n icon: btn.icon,\n onSetup: onSetupStateToggle(editor, btn.name),\n onAction: onActionToggleFormat(editor, btn.name)\n });\n });\n for (let i = 1; i <= 6; i++) {\n const name = 'h' + i;\n editor.ui.registry.addToggleButton(name, {\n text: name.toUpperCase(),\n tooltip: 'Heading ' + i,\n onSetup: onSetupStateToggle(editor, name),\n onAction: onActionToggleFormat(editor, name)\n });\n }\n };\n const registerCommandButtons = editor => {\n global$1.each([\n {\n name: 'copy',\n text: 'Copy',\n action: 'Copy',\n icon: 'copy'\n },\n {\n name: 'help',\n text: 'Help',\n action: 'mceHelp',\n icon: 'help'\n },\n {\n name: 'selectall',\n text: 'Select all',\n action: 'SelectAll',\n icon: 'select-all'\n },\n {\n name: 'newdocument',\n text: 'New document',\n action: 'mceNewDocument',\n icon: 'new-document'\n },\n {\n name: 'print',\n text: 'Print',\n action: 'mcePrint',\n icon: 'print'\n }\n ], btn => {\n editor.ui.registry.addButton(btn.name, {\n tooltip: btn.text,\n icon: btn.icon,\n onAction: onActionExecCommand(editor, btn.action)\n });\n });\n global$1.each([\n {\n name: 'cut',\n text: 'Cut',\n action: 'Cut',\n icon: 'cut'\n },\n {\n name: 'paste',\n text: 'Paste',\n action: 'Paste',\n icon: 'paste'\n },\n {\n name: 'removeformat',\n text: 'Clear formatting',\n action: 'RemoveFormat',\n icon: 'remove-formatting'\n },\n {\n name: 'remove',\n text: 'Remove',\n action: 'Delete',\n icon: 'remove'\n },\n {\n name: 'hr',\n text: 'Horizontal line',\n action: 'InsertHorizontalRule',\n icon: 'horizontal-rule'\n }\n ], btn => {\n editor.ui.registry.addButton(btn.name, {\n tooltip: btn.text,\n icon: btn.icon,\n onSetup: onSetupEditableToggle(editor),\n onAction: onActionExecCommand(editor, btn.action)\n });\n });\n };\n const registerCommandToggleButtons = editor => {\n global$1.each([{\n name: 'blockquote',\n text: 'Blockquote',\n action: 'mceBlockQuote',\n icon: 'quote'\n }], btn => {\n editor.ui.registry.addToggleButton(btn.name, {\n tooltip: btn.text,\n icon: btn.icon,\n onAction: onActionExecCommand(editor, btn.action),\n onSetup: onSetupStateToggle(editor, btn.name)\n });\n });\n };\n const registerButtons$1 = editor => {\n registerFormatButtons(editor);\n registerCommandButtons(editor);\n registerCommandToggleButtons(editor);\n };\n const registerMenuItems$2 = editor => {\n global$1.each([\n {\n name: 'newdocument',\n text: 'New document',\n action: 'mceNewDocument',\n icon: 'new-document'\n },\n {\n name: 'copy',\n text: 'Copy',\n action: 'Copy',\n icon: 'copy',\n shortcut: 'Meta+C'\n },\n {\n name: 'selectall',\n text: 'Select all',\n action: 'SelectAll',\n icon: 'select-all',\n shortcut: 'Meta+A'\n },\n {\n name: 'print',\n text: 'Print...',\n action: 'mcePrint',\n icon: 'print',\n shortcut: 'Meta+P'\n }\n ], menuitem => {\n editor.ui.registry.addMenuItem(menuitem.name, {\n text: menuitem.text,\n icon: menuitem.icon,\n shortcut: menuitem.shortcut,\n onAction: onActionExecCommand(editor, menuitem.action)\n });\n });\n global$1.each([\n {\n name: 'bold',\n text: 'Bold',\n action: 'Bold',\n icon: 'bold',\n shortcut: 'Meta+B'\n },\n {\n name: 'italic',\n text: 'Italic',\n action: 'Italic',\n icon: 'italic',\n shortcut: 'Meta+I'\n },\n {\n name: 'underline',\n text: 'Underline',\n action: 'Underline',\n icon: 'underline',\n shortcut: 'Meta+U'\n },\n {\n name: 'strikethrough',\n text: 'Strikethrough',\n action: 'Strikethrough',\n icon: 'strike-through'\n },\n {\n name: 'subscript',\n text: 'Subscript',\n action: 'Subscript',\n icon: 'subscript'\n },\n {\n name: 'superscript',\n text: 'Superscript',\n action: 'Superscript',\n icon: 'superscript'\n },\n {\n name: 'removeformat',\n text: 'Clear formatting',\n action: 'RemoveFormat',\n icon: 'remove-formatting'\n },\n {\n name: 'cut',\n text: 'Cut',\n action: 'Cut',\n icon: 'cut',\n shortcut: 'Meta+X'\n },\n {\n name: 'paste',\n text: 'Paste',\n action: 'Paste',\n icon: 'paste',\n shortcut: 'Meta+V'\n },\n {\n name: 'hr',\n text: 'Horizontal line',\n action: 'InsertHorizontalRule',\n icon: 'horizontal-rule'\n }\n ], menuitem => {\n editor.ui.registry.addMenuItem(menuitem.name, {\n text: menuitem.text,\n icon: menuitem.icon,\n shortcut: menuitem.shortcut,\n onSetup: onSetupEditableToggle(editor),\n onAction: onActionExecCommand(editor, menuitem.action)\n });\n });\n editor.ui.registry.addMenuItem('codeformat', {\n text: 'Code',\n icon: 'sourcecode',\n onSetup: onSetupEditableToggle(editor),\n onAction: onActionToggleFormat(editor, 'code')\n });\n };\n const register$3 = editor => {\n registerButtons$1(editor);\n registerMenuItems$2(editor);\n };\n\n const onSetupUndoRedoState = (editor, type) => onSetupEvent(editor, 'Undo Redo AddUndo TypingUndo ClearUndos SwitchMode', api => {\n api.setEnabled(!editor.mode.isReadOnly() && editor.undoManager[type]());\n });\n const registerMenuItems$1 = editor => {\n editor.ui.registry.addMenuItem('undo', {\n text: 'Undo',\n icon: 'undo',\n shortcut: 'Meta+Z',\n onSetup: onSetupUndoRedoState(editor, 'hasUndo'),\n onAction: onActionExecCommand(editor, 'undo')\n });\n editor.ui.registry.addMenuItem('redo', {\n text: 'Redo',\n icon: 'redo',\n shortcut: 'Meta+Y',\n onSetup: onSetupUndoRedoState(editor, 'hasRedo'),\n onAction: onActionExecCommand(editor, 'redo')\n });\n };\n const registerButtons = editor => {\n editor.ui.registry.addButton('undo', {\n tooltip: 'Undo',\n icon: 'undo',\n enabled: false,\n onSetup: onSetupUndoRedoState(editor, 'hasUndo'),\n onAction: onActionExecCommand(editor, 'undo')\n });\n editor.ui.registry.addButton('redo', {\n tooltip: 'Redo',\n icon: 'redo',\n enabled: false,\n onSetup: onSetupUndoRedoState(editor, 'hasRedo'),\n onAction: onActionExecCommand(editor, 'redo')\n });\n };\n const register$2 = editor => {\n registerMenuItems$1(editor);\n registerButtons(editor);\n };\n\n const onSetupVisualAidState = editor => onSetupEvent(editor, 'VisualAid', api => {\n api.setActive(editor.hasVisual);\n });\n const registerMenuItems = editor => {\n editor.ui.registry.addToggleMenuItem('visualaid', {\n text: 'Visual aids',\n onSetup: onSetupVisualAidState(editor),\n onAction: onActionExecCommand(editor, 'mceToggleVisualAid')\n });\n };\n const registerToolbarButton = editor => {\n editor.ui.registry.addButton('visualaid', {\n tooltip: 'Visual aids',\n text: 'Visual aids',\n onAction: onActionExecCommand(editor, 'mceToggleVisualAid')\n });\n };\n const register$1 = editor => {\n registerToolbarButton(editor);\n registerMenuItems(editor);\n };\n\n const setup$6 = (editor, backstage) => {\n register$8(editor);\n register$3(editor);\n register$6(editor, backstage);\n register$2(editor);\n register$c(editor);\n register$1(editor);\n register$5(editor);\n register$7(editor);\n register$4(editor);\n };\n\n const patchPipeConfig = config => isString(config) ? config.split(/[ ,]/) : config;\n const option = name => editor => editor.options.get(name);\n const register = editor => {\n const registerOption = editor.options.register;\n registerOption('contextmenu_avoid_overlap', {\n processor: 'string',\n default: ''\n });\n registerOption('contextmenu_never_use_native', {\n processor: 'boolean',\n default: false\n });\n registerOption('contextmenu', {\n processor: value => {\n if (value === false) {\n return {\n value: [],\n valid: true\n };\n } else if (isString(value) || isArrayOf(value, isString)) {\n return {\n value: patchPipeConfig(value),\n valid: true\n };\n } else {\n return {\n valid: false,\n message: 'Must be false or a string.'\n };\n }\n },\n default: 'link linkchecker image editimage table spellchecker configurepermanentpen'\n });\n };\n const shouldNeverUseNative = option('contextmenu_never_use_native');\n const getAvoidOverlapSelector = option('contextmenu_avoid_overlap');\n const isContextMenuDisabled = editor => getContextMenu(editor).length === 0;\n const getContextMenu = editor => {\n const contextMenus = editor.ui.registry.getAll().contextMenus;\n const contextMenu = editor.options.get('contextmenu');\n if (editor.options.isSet('contextmenu')) {\n return contextMenu;\n } else {\n return filter$2(contextMenu, item => has$2(contextMenus, item));\n }\n };\n\n const nu = (x, y) => ({\n type: 'makeshift',\n x,\n y\n });\n const transpose = (pos, dx, dy) => {\n return nu(pos.x + dx, pos.y + dy);\n };\n const isTouchEvent$1 = e => e.type === 'longpress' || e.type.indexOf('touch') === 0;\n const fromPageXY = e => {\n if (isTouchEvent$1(e)) {\n const touch = e.touches[0];\n return nu(touch.pageX, touch.pageY);\n } else {\n return nu(e.pageX, e.pageY);\n }\n };\n const fromClientXY = e => {\n if (isTouchEvent$1(e)) {\n const touch = e.touches[0];\n return nu(touch.clientX, touch.clientY);\n } else {\n return nu(e.clientX, e.clientY);\n }\n };\n const transposeContentAreaContainer = (element, pos) => {\n const containerPos = global$7.DOM.getPos(element);\n return transpose(pos, containerPos.x, containerPos.y);\n };\n const getPointAnchor = (editor, e) => {\n if (e.type === 'contextmenu' || e.type === 'longpress') {\n if (editor.inline) {\n return fromPageXY(e);\n } else {\n return transposeContentAreaContainer(editor.getContentAreaContainer(), fromClientXY(e));\n }\n } else {\n return getSelectionAnchor(editor);\n }\n };\n const getSelectionAnchor = editor => {\n return {\n type: 'selection',\n root: SugarElement.fromDom(editor.selection.getNode())\n };\n };\n const getNodeAnchor = editor => ({\n type: 'node',\n node: Optional.some(SugarElement.fromDom(editor.selection.getNode())),\n root: SugarElement.fromDom(editor.getBody())\n });\n const getAnchorSpec$1 = (editor, e, anchorType) => {\n switch (anchorType) {\n case 'node':\n return getNodeAnchor(editor);\n case 'point':\n return getPointAnchor(editor, e);\n case 'selection':\n return getSelectionAnchor(editor);\n }\n };\n\n const initAndShow$1 = (editor, e, buildMenu, backstage, contextmenu, anchorType) => {\n const items = buildMenu();\n const anchorSpec = getAnchorSpec$1(editor, e, anchorType);\n build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n isHorizontalMenu: false,\n search: Optional.none()\n }).map(menuData => {\n e.preventDefault();\n InlineView.showMenuAt(contextmenu, { anchor: anchorSpec }, {\n menu: { markers: markers('normal') },\n data: menuData\n });\n });\n };\n\n const layouts = {\n onLtr: () => [\n south$2,\n southeast$2,\n southwest$2,\n northeast$2,\n northwest$2,\n north$2,\n north,\n south,\n northeast,\n southeast,\n northwest,\n southwest\n ],\n onRtl: () => [\n south$2,\n southwest$2,\n southeast$2,\n northwest$2,\n northeast$2,\n north$2,\n north,\n south,\n northwest,\n southwest,\n northeast,\n southeast\n ]\n };\n const bubbleSize = 12;\n const bubbleAlignments = {\n valignCentre: [],\n alignCentre: [],\n alignLeft: ['tox-pop--align-left'],\n alignRight: ['tox-pop--align-right'],\n right: ['tox-pop--right'],\n left: ['tox-pop--left'],\n bottom: ['tox-pop--bottom'],\n top: ['tox-pop--top']\n };\n const isTouchWithinSelection = (editor, e) => {\n const selection = editor.selection;\n if (selection.isCollapsed() || e.touches.length < 1) {\n return false;\n } else {\n const touch = e.touches[0];\n const rng = selection.getRng();\n const rngRectOpt = getFirstRect(editor.getWin(), SimSelection.domRange(rng));\n return rngRectOpt.exists(rngRect => rngRect.left <= touch.clientX && rngRect.right >= touch.clientX && rngRect.top <= touch.clientY && rngRect.bottom >= touch.clientY);\n }\n };\n const setupiOSOverrides = editor => {\n const originalSelection = editor.selection.getRng();\n const selectionReset = () => {\n global$9.setEditorTimeout(editor, () => {\n editor.selection.setRng(originalSelection);\n }, 10);\n unbindEventListeners();\n };\n editor.once('touchend', selectionReset);\n const preventMousedown = e => {\n e.preventDefault();\n e.stopImmediatePropagation();\n };\n editor.on('mousedown', preventMousedown, true);\n const clearSelectionReset = () => unbindEventListeners();\n editor.once('longpresscancel', clearSelectionReset);\n const unbindEventListeners = () => {\n editor.off('touchend', selectionReset);\n editor.off('longpresscancel', clearSelectionReset);\n editor.off('mousedown', preventMousedown);\n };\n };\n const getAnchorSpec = (editor, e, anchorType) => {\n const anchorSpec = getAnchorSpec$1(editor, e, anchorType);\n const bubbleYOffset = anchorType === 'point' ? bubbleSize : 0;\n return {\n bubble: nu$5(0, bubbleYOffset, bubbleAlignments),\n layouts,\n overrides: {\n maxWidthFunction: expandable(),\n maxHeightFunction: expandable$1()\n },\n ...anchorSpec\n };\n };\n const show = (editor, e, items, backstage, contextmenu, anchorType, highlightImmediately) => {\n const anchorSpec = getAnchorSpec(editor, e, anchorType);\n build(items, ItemResponse$1.CLOSE_ON_EXECUTE, backstage, {\n isHorizontalMenu: true,\n search: Optional.none()\n }).map(menuData => {\n e.preventDefault();\n const highlightOnOpen = highlightImmediately ? HighlightOnOpen.HighlightMenuAndItem : HighlightOnOpen.HighlightNone;\n InlineView.showMenuWithinBounds(contextmenu, { anchor: anchorSpec }, {\n menu: {\n markers: markers('normal'),\n highlightOnOpen\n },\n data: menuData,\n type: 'horizontal'\n }, () => Optional.some(getContextToolbarBounds(editor, backstage.shared, anchorType === 'node' ? 'node' : 'selection')));\n editor.dispatch(hideContextToolbarEvent);\n });\n };\n const initAndShow = (editor, e, buildMenu, backstage, contextmenu, anchorType) => {\n const detection = detect$2();\n const isiOS = detection.os.isiOS();\n const isMacOS = detection.os.isMacOS();\n const isAndroid = detection.os.isAndroid();\n const isTouch = detection.deviceType.isTouch();\n const shouldHighlightImmediately = () => !(isAndroid || isiOS || isMacOS && isTouch);\n const open = () => {\n const items = buildMenu();\n show(editor, e, items, backstage, contextmenu, anchorType, shouldHighlightImmediately());\n };\n if ((isMacOS || isiOS) && anchorType !== 'node') {\n const openiOS = () => {\n setupiOSOverrides(editor);\n open();\n };\n if (isTouchWithinSelection(editor, e)) {\n openiOS();\n } else {\n editor.once('selectionchange', openiOS);\n editor.once('touchend', () => editor.off('selectionchange', openiOS));\n }\n } else {\n open();\n }\n };\n\n const isSeparator = item => isString(item) ? item === '|' : item.type === 'separator';\n const separator = { type: 'separator' };\n const makeContextItem = item => {\n const commonMenuItem = item => ({\n text: item.text,\n icon: item.icon,\n enabled: item.enabled,\n shortcut: item.shortcut\n });\n if (isString(item)) {\n return item;\n } else {\n switch (item.type) {\n case 'separator':\n return separator;\n case 'submenu':\n return {\n type: 'nestedmenuitem',\n ...commonMenuItem(item),\n getSubmenuItems: () => {\n const items = item.getSubmenuItems();\n if (isString(items)) {\n return items;\n } else {\n return map$2(items, makeContextItem);\n }\n }\n };\n default:\n const commonItem = item;\n return {\n type: 'menuitem',\n ...commonMenuItem(commonItem),\n onAction: noarg(commonItem.onAction)\n };\n }\n }\n };\n const addContextMenuGroup = (xs, groupItems) => {\n if (groupItems.length === 0) {\n return xs;\n }\n const lastMenuItem = last$1(xs).filter(item => !isSeparator(item));\n const before = lastMenuItem.fold(() => [], _ => [separator]);\n return xs.concat(before).concat(groupItems).concat([separator]);\n };\n const generateContextMenu = (contextMenus, menuConfig, selectedElement) => {\n const sections = foldl(menuConfig, (acc, name) => {\n return get$g(contextMenus, name.toLowerCase()).map(menu => {\n const items = menu.update(selectedElement);\n if (isString(items) && isNotEmpty(trim$1(items))) {\n return addContextMenuGroup(acc, items.split(' '));\n } else if (isArray(items) && items.length > 0) {\n const allItems = map$2(items, makeContextItem);\n return addContextMenuGroup(acc, allItems);\n } else {\n return acc;\n }\n }).getOrThunk(() => acc.concat([name]));\n }, []);\n if (sections.length > 0 && isSeparator(sections[sections.length - 1])) {\n sections.pop();\n }\n return sections;\n };\n const isNativeOverrideKeyEvent = (editor, e) => e.ctrlKey && !shouldNeverUseNative(editor);\n const isTouchEvent = e => e.type === 'longpress' || has$2(e, 'touches');\n const isTriggeredByKeyboard = (editor, e) => !isTouchEvent(e) && (e.button !== 2 || e.target === editor.getBody() && e.pointerType === '');\n const getSelectedElement = (editor, e) => isTriggeredByKeyboard(editor, e) ? editor.selection.getStart(true) : e.target;\n const getAnchorType = (editor, e) => {\n const selector = getAvoidOverlapSelector(editor);\n const anchorType = isTriggeredByKeyboard(editor, e) ? 'selection' : 'point';\n if (isNotEmpty(selector)) {\n const target = getSelectedElement(editor, e);\n const selectorExists = closest(SugarElement.fromDom(target), selector);\n return selectorExists ? 'node' : anchorType;\n } else {\n return anchorType;\n }\n };\n const setup$5 = (editor, lazySink, backstage) => {\n const detection = detect$2();\n const isTouch = detection.deviceType.isTouch;\n const contextmenu = build$1(InlineView.sketch({\n dom: { tag: 'div' },\n lazySink,\n onEscape: () => editor.focus(),\n onShow: () => backstage.setContextMenuState(true),\n onHide: () => backstage.setContextMenuState(false),\n fireDismissalEventInstead: {},\n inlineBehaviours: derive$1([config('dismissContextMenu', [run$1(dismissRequested(), (comp, _se) => {\n Sandboxing.close(comp);\n editor.focus();\n })])])\n }));\n const hideContextMenu = () => InlineView.hide(contextmenu);\n const showContextMenu = e => {\n if (shouldNeverUseNative(editor)) {\n e.preventDefault();\n }\n if (isNativeOverrideKeyEvent(editor, e) || isContextMenuDisabled(editor)) {\n return;\n }\n const anchorType = getAnchorType(editor, e);\n const buildMenu = () => {\n const selectedElement = getSelectedElement(editor, e);\n const registry = editor.ui.registry.getAll();\n const menuConfig = getContextMenu(editor);\n return generateContextMenu(registry.contextMenus, menuConfig, selectedElement);\n };\n const initAndShow$2 = isTouch() ? initAndShow : initAndShow$1;\n initAndShow$2(editor, e, buildMenu, backstage, contextmenu, anchorType);\n };\n editor.on('init', () => {\n const hideEvents = 'ResizeEditor ScrollContent ScrollWindow longpresscancel' + (isTouch() ? '' : ' ResizeWindow');\n editor.on(hideEvents, hideContextMenu);\n editor.on('longpress contextmenu', showContextMenu);\n });\n };\n\n const adt = Adt.generate([\n {\n offset: [\n 'x',\n 'y'\n ]\n },\n {\n absolute: [\n 'x',\n 'y'\n ]\n },\n {\n fixed: [\n 'x',\n 'y'\n ]\n }\n ]);\n const subtract = change => point => point.translate(-change.left, -change.top);\n const add = change => point => point.translate(change.left, change.top);\n const transform = changes => (x, y) => foldl(changes, (rest, f) => f(rest), SugarPosition(x, y));\n const asFixed = (coord, scroll, origin) => coord.fold(transform([\n add(origin),\n subtract(scroll)\n ]), transform([subtract(scroll)]), transform([]));\n const asAbsolute = (coord, scroll, origin) => coord.fold(transform([add(origin)]), transform([]), transform([add(scroll)]));\n const asOffset = (coord, scroll, origin) => coord.fold(transform([]), transform([subtract(origin)]), transform([\n add(scroll),\n subtract(origin)\n ]));\n const withinRange = (coord1, coord2, xRange, yRange, scroll, origin) => {\n const a1 = asAbsolute(coord1, scroll, origin);\n const a2 = asAbsolute(coord2, scroll, origin);\n return Math.abs(a1.left - a2.left) <= xRange && Math.abs(a1.top - a2.top) <= yRange;\n };\n const getDeltas = (coord1, coord2, xRange, yRange, scroll, origin) => {\n const a1 = asAbsolute(coord1, scroll, origin);\n const a2 = asAbsolute(coord2, scroll, origin);\n const left = Math.abs(a1.left - a2.left);\n const top = Math.abs(a1.top - a2.top);\n return SugarPosition(left, top);\n };\n const toStyles = (coord, scroll, origin) => {\n const stylesOpt = coord.fold((x, y) => ({\n position: Optional.some('absolute'),\n left: Optional.some(x + 'px'),\n top: Optional.some(y + 'px')\n }), (x, y) => ({\n position: Optional.some('absolute'),\n left: Optional.some(x - origin.left + 'px'),\n top: Optional.some(y - origin.top + 'px')\n }), (x, y) => ({\n position: Optional.some('fixed'),\n left: Optional.some(x + 'px'),\n top: Optional.some(y + 'px')\n }));\n return {\n right: Optional.none(),\n bottom: Optional.none(),\n ...stylesOpt\n };\n };\n const translate = (coord, deltaX, deltaY) => coord.fold((x, y) => offset(x + deltaX, y + deltaY), (x, y) => absolute(x + deltaX, y + deltaY), (x, y) => fixed(x + deltaX, y + deltaY));\n const absorb = (partialCoord, originalCoord, scroll, origin) => {\n const absorbOne = (stencil, nu) => (optX, optY) => {\n const original = stencil(originalCoord, scroll, origin);\n return nu(optX.getOr(original.left), optY.getOr(original.top));\n };\n return partialCoord.fold(absorbOne(asOffset, offset), absorbOne(asAbsolute, absolute), absorbOne(asFixed, fixed));\n };\n const offset = adt.offset;\n const absolute = adt.absolute;\n const fixed = adt.fixed;\n\n const parseAttrToInt = (element, name) => {\n const value = get$f(element, name);\n return isUndefined(value) ? NaN : parseInt(value, 10);\n };\n const get = (component, snapsInfo) => {\n const element = component.element;\n const x = parseAttrToInt(element, snapsInfo.leftAttr);\n const y = parseAttrToInt(element, snapsInfo.topAttr);\n return isNaN(x) || isNaN(y) ? Optional.none() : Optional.some(SugarPosition(x, y));\n };\n const set = (component, snapsInfo, pt) => {\n const element = component.element;\n set$9(element, snapsInfo.leftAttr, pt.left + 'px');\n set$9(element, snapsInfo.topAttr, pt.top + 'px');\n };\n const clear = (component, snapsInfo) => {\n const element = component.element;\n remove$7(element, snapsInfo.leftAttr);\n remove$7(element, snapsInfo.topAttr);\n };\n\n const getCoords = (component, snapInfo, coord, delta) => get(component, snapInfo).fold(() => coord, fixed$1 => fixed(fixed$1.left + delta.left, fixed$1.top + delta.top));\n const moveOrSnap = (component, snapInfo, coord, delta, scroll, origin) => {\n const newCoord = getCoords(component, snapInfo, coord, delta);\n const snap = snapInfo.mustSnap ? findClosestSnap(component, snapInfo, newCoord, scroll, origin) : findSnap(component, snapInfo, newCoord, scroll, origin);\n const fixedCoord = asFixed(newCoord, scroll, origin);\n set(component, snapInfo, fixedCoord);\n return snap.fold(() => ({\n coord: fixed(fixedCoord.left, fixedCoord.top),\n extra: Optional.none()\n }), spanned => ({\n coord: spanned.output,\n extra: spanned.extra\n }));\n };\n const stopDrag = (component, snapInfo) => {\n clear(component, snapInfo);\n };\n const findMatchingSnap = (snaps, newCoord, scroll, origin) => findMap(snaps, snap => {\n const sensor = snap.sensor;\n const inRange = withinRange(newCoord, sensor, snap.range.left, snap.range.top, scroll, origin);\n return inRange ? Optional.some({\n output: absorb(snap.output, newCoord, scroll, origin),\n extra: snap.extra\n }) : Optional.none();\n });\n const findClosestSnap = (component, snapInfo, newCoord, scroll, origin) => {\n const snaps = snapInfo.getSnapPoints(component);\n const matchSnap = findMatchingSnap(snaps, newCoord, scroll, origin);\n return matchSnap.orThunk(() => {\n const bestSnap = foldl(snaps, (acc, snap) => {\n const sensor = snap.sensor;\n const deltas = getDeltas(newCoord, sensor, snap.range.left, snap.range.top, scroll, origin);\n return acc.deltas.fold(() => ({\n deltas: Optional.some(deltas),\n snap: Optional.some(snap)\n }), bestDeltas => {\n const currAvg = (deltas.left + deltas.top) / 2;\n const bestAvg = (bestDeltas.left + bestDeltas.top) / 2;\n if (currAvg <= bestAvg) {\n return {\n deltas: Optional.some(deltas),\n snap: Optional.some(snap)\n };\n } else {\n return acc;\n }\n });\n }, {\n deltas: Optional.none(),\n snap: Optional.none()\n });\n return bestSnap.snap.map(snap => ({\n output: absorb(snap.output, newCoord, scroll, origin),\n extra: snap.extra\n }));\n });\n };\n const findSnap = (component, snapInfo, newCoord, scroll, origin) => {\n const snaps = snapInfo.getSnapPoints(component);\n return findMatchingSnap(snaps, newCoord, scroll, origin);\n };\n const snapTo$1 = (snap, scroll, origin) => ({\n coord: absorb(snap.output, snap.output, scroll, origin),\n extra: snap.extra\n });\n\n const snapTo = (component, dragConfig, _state, snap) => {\n const target = dragConfig.getTarget(component.element);\n if (dragConfig.repositionTarget) {\n const doc = owner$4(component.element);\n const scroll = get$b(doc);\n const origin = getOrigin(target);\n const snapPin = snapTo$1(snap, scroll, origin);\n const styles = toStyles(snapPin.coord, scroll, origin);\n setOptions(target, styles);\n }\n };\n\n var DraggingApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n snapTo: snapTo\n });\n\n const initialAttribute = 'data-initial-z-index';\n const resetZIndex = blocker => {\n parent(blocker.element).filter(isElement$1).each(root => {\n getOpt(root, initialAttribute).fold(() => remove$6(root, 'z-index'), zIndex => set$8(root, 'z-index', zIndex));\n remove$7(root, initialAttribute);\n });\n };\n const changeZIndex = blocker => {\n parent(blocker.element).filter(isElement$1).each(root => {\n getRaw(root, 'z-index').each(zindex => {\n set$9(root, initialAttribute, zindex);\n });\n set$8(root, 'z-index', get$e(blocker.element, 'z-index'));\n });\n };\n const instigate = (anyComponent, blocker) => {\n anyComponent.getSystem().addToGui(blocker);\n changeZIndex(blocker);\n };\n const discard = blocker => {\n resetZIndex(blocker);\n blocker.getSystem().removeFromGui(blocker);\n };\n const createComponent = (component, blockerClass, blockerEvents) => component.getSystem().build(Container.sketch({\n dom: {\n styles: {\n 'left': '0px',\n 'top': '0px',\n 'width': '100%',\n 'height': '100%',\n 'position': 'fixed',\n 'z-index': '1000000000000000'\n },\n classes: [blockerClass]\n },\n events: blockerEvents\n }));\n\n var SnapSchema = optionObjOf('snaps', [\n required$1('getSnapPoints'),\n onHandler('onSensor'),\n required$1('leftAttr'),\n required$1('topAttr'),\n defaulted('lazyViewport', win),\n defaulted('mustSnap', false)\n ]);\n\n const schema$6 = [\n defaulted('useFixed', never),\n required$1('blockerClass'),\n defaulted('getTarget', identity),\n defaulted('onDrag', noop),\n defaulted('repositionTarget', true),\n defaulted('onDrop', noop),\n defaultedFunction('getBounds', win),\n SnapSchema\n ];\n\n const getCurrentCoord = target => lift3(getRaw(target, 'left'), getRaw(target, 'top'), getRaw(target, 'position'), (left, top, position) => {\n const nu = position === 'fixed' ? fixed : offset;\n return nu(parseInt(left, 10), parseInt(top, 10));\n }).getOrThunk(() => {\n const location = absolute$3(target);\n return absolute(location.left, location.top);\n });\n const clampCoords = (component, coords, scroll, origin, startData) => {\n const bounds = startData.bounds;\n const absoluteCoord = asAbsolute(coords, scroll, origin);\n const newX = clamp(absoluteCoord.left, bounds.x, bounds.x + bounds.width - startData.width);\n const newY = clamp(absoluteCoord.top, bounds.y, bounds.y + bounds.height - startData.height);\n const newCoords = absolute(newX, newY);\n return coords.fold(() => {\n const offset$1 = asOffset(newCoords, scroll, origin);\n return offset(offset$1.left, offset$1.top);\n }, constant$1(newCoords), () => {\n const fixed$1 = asFixed(newCoords, scroll, origin);\n return fixed(fixed$1.left, fixed$1.top);\n });\n };\n const calcNewCoord = (component, optSnaps, currentCoord, scroll, origin, delta, startData) => {\n const newCoord = optSnaps.fold(() => {\n const translated = translate(currentCoord, delta.left, delta.top);\n const fixedCoord = asFixed(translated, scroll, origin);\n return fixed(fixedCoord.left, fixedCoord.top);\n }, snapInfo => {\n const snapping = moveOrSnap(component, snapInfo, currentCoord, delta, scroll, origin);\n snapping.extra.each(extra => {\n snapInfo.onSensor(component, extra);\n });\n return snapping.coord;\n });\n return clampCoords(component, newCoord, scroll, origin, startData);\n };\n const dragBy = (component, dragConfig, startData, delta) => {\n const target = dragConfig.getTarget(component.element);\n if (dragConfig.repositionTarget) {\n const doc = owner$4(component.element);\n const scroll = get$b(doc);\n const origin = getOrigin(target);\n const currentCoord = getCurrentCoord(target);\n const newCoord = calcNewCoord(component, dragConfig.snaps, currentCoord, scroll, origin, delta, startData);\n const styles = toStyles(newCoord, scroll, origin);\n setOptions(target, styles);\n }\n dragConfig.onDrag(component, target, delta);\n };\n\n const calcStartData = (dragConfig, comp) => ({\n bounds: dragConfig.getBounds(),\n height: getOuter$2(comp.element),\n width: getOuter$1(comp.element)\n });\n const move = (component, dragConfig, dragState, dragMode, event) => {\n const delta = dragState.update(dragMode, event);\n const dragStartData = dragState.getStartData().getOrThunk(() => calcStartData(dragConfig, component));\n delta.each(dlt => {\n dragBy(component, dragConfig, dragStartData, dlt);\n });\n };\n const stop = (component, blocker, dragConfig, dragState) => {\n blocker.each(discard);\n dragConfig.snaps.each(snapInfo => {\n stopDrag(component, snapInfo);\n });\n const target = dragConfig.getTarget(component.element);\n dragState.reset();\n dragConfig.onDrop(component, target);\n };\n const handlers = events => (dragConfig, dragState) => {\n const updateStartState = comp => {\n dragState.setStartData(calcStartData(dragConfig, comp));\n };\n return derive$2([\n run$1(windowScroll(), comp => {\n dragState.getStartData().each(() => updateStartState(comp));\n }),\n ...events(dragConfig, dragState, updateStartState)\n ]);\n };\n\n const init$3 = dragApi => derive$2([\n run$1(mousedown(), dragApi.forceDrop),\n run$1(mouseup(), dragApi.drop),\n run$1(mousemove(), (comp, simulatedEvent) => {\n dragApi.move(simulatedEvent.event);\n }),\n run$1(mouseout(), dragApi.delayDrop)\n ]);\n\n const getData$1 = event => Optional.from(SugarPosition(event.x, event.y));\n const getDelta$1 = (old, nu) => SugarPosition(nu.left - old.left, nu.top - old.top);\n\n var MouseData = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getData: getData$1,\n getDelta: getDelta$1\n });\n\n const events$3 = (dragConfig, dragState, updateStartState) => [run$1(mousedown(), (component, simulatedEvent) => {\n const raw = simulatedEvent.event.raw;\n if (raw.button !== 0) {\n return;\n }\n simulatedEvent.stop();\n const stop$1 = () => stop(component, Optional.some(blocker), dragConfig, dragState);\n const delayDrop = DelayedFunction(stop$1, 200);\n const dragApi = {\n drop: stop$1,\n delayDrop: delayDrop.schedule,\n forceDrop: stop$1,\n move: event => {\n delayDrop.cancel();\n move(component, dragConfig, dragState, MouseData, event);\n }\n };\n const blocker = createComponent(component, dragConfig.blockerClass, init$3(dragApi));\n const start = () => {\n updateStartState(component);\n instigate(component, blocker);\n };\n start();\n })];\n const schema$5 = [\n ...schema$6,\n output$1('dragger', { handlers: handlers(events$3) })\n ];\n\n const init$2 = dragApi => derive$2([\n run$1(touchstart(), dragApi.forceDrop),\n run$1(touchend(), dragApi.drop),\n run$1(touchcancel(), dragApi.drop),\n run$1(touchmove(), (comp, simulatedEvent) => {\n dragApi.move(simulatedEvent.event);\n })\n ]);\n\n const getDataFrom = touches => {\n const touch = touches[0];\n return Optional.some(SugarPosition(touch.clientX, touch.clientY));\n };\n const getData = event => {\n const raw = event.raw;\n const touches = raw.touches;\n return touches.length === 1 ? getDataFrom(touches) : Optional.none();\n };\n const getDelta = (old, nu) => SugarPosition(nu.left - old.left, nu.top - old.top);\n\n var TouchData = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getData: getData,\n getDelta: getDelta\n });\n\n const events$2 = (dragConfig, dragState, updateStartState) => {\n const blockerSingleton = value$2();\n const stopBlocking = component => {\n stop(component, blockerSingleton.get(), dragConfig, dragState);\n blockerSingleton.clear();\n };\n return [\n run$1(touchstart(), (component, simulatedEvent) => {\n simulatedEvent.stop();\n const stop = () => stopBlocking(component);\n const dragApi = {\n drop: stop,\n delayDrop: noop,\n forceDrop: stop,\n move: event => {\n move(component, dragConfig, dragState, TouchData, event);\n }\n };\n const blocker = createComponent(component, dragConfig.blockerClass, init$2(dragApi));\n blockerSingleton.set(blocker);\n const start = () => {\n updateStartState(component);\n instigate(component, blocker);\n };\n start();\n }),\n run$1(touchmove(), (component, simulatedEvent) => {\n simulatedEvent.stop();\n move(component, dragConfig, dragState, TouchData, simulatedEvent.event);\n }),\n run$1(touchend(), (component, simulatedEvent) => {\n simulatedEvent.stop();\n stopBlocking(component);\n }),\n run$1(touchcancel(), stopBlocking)\n ];\n };\n const schema$4 = [\n ...schema$6,\n output$1('dragger', { handlers: handlers(events$2) })\n ];\n\n const events$1 = (dragConfig, dragState, updateStartState) => [\n ...events$3(dragConfig, dragState, updateStartState),\n ...events$2(dragConfig, dragState, updateStartState)\n ];\n const schema$3 = [\n ...schema$6,\n output$1('dragger', { handlers: handlers(events$1) })\n ];\n\n const mouse = schema$5;\n const touch = schema$4;\n const mouseOrTouch = schema$3;\n\n var DraggingBranches = /*#__PURE__*/Object.freeze({\n __proto__: null,\n mouse: mouse,\n touch: touch,\n mouseOrTouch: mouseOrTouch\n });\n\n const init$1 = () => {\n let previous = Optional.none();\n let startData = Optional.none();\n const reset = () => {\n previous = Optional.none();\n startData = Optional.none();\n };\n const calculateDelta = (mode, nu) => {\n const result = previous.map(old => mode.getDelta(old, nu));\n previous = Optional.some(nu);\n return result;\n };\n const update = (mode, dragEvent) => mode.getData(dragEvent).bind(nuData => calculateDelta(mode, nuData));\n const setStartData = data => {\n startData = Optional.some(data);\n };\n const getStartData = () => startData;\n const readState = constant$1({});\n return nu$8({\n readState,\n reset,\n update,\n getStartData,\n setStartData\n });\n };\n\n var DragState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init$1\n });\n\n const Dragging = createModes({\n branchKey: 'mode',\n branches: DraggingBranches,\n name: 'dragging',\n active: {\n events: (dragConfig, dragState) => {\n const dragger = dragConfig.dragger;\n return dragger.handlers(dragConfig, dragState);\n }\n },\n extra: {\n snap: sConfig => ({\n sensor: sConfig.sensor,\n range: sConfig.range,\n output: sConfig.output,\n extra: Optional.from(sConfig.extra)\n })\n },\n state: DragState,\n apis: DraggingApis\n });\n\n const snapWidth = 40;\n const snapOffset = snapWidth / 2;\n const calcSnap = (selectorOpt, td, x, y, width, height) => selectorOpt.fold(() => Dragging.snap({\n sensor: absolute(x - snapOffset, y - snapOffset),\n range: SugarPosition(width, height),\n output: absolute(Optional.some(x), Optional.some(y)),\n extra: { td }\n }), selectorHandle => {\n const sensorLeft = x - snapOffset;\n const sensorTop = y - snapOffset;\n const sensorWidth = snapWidth;\n const sensorHeight = snapWidth;\n const rect = selectorHandle.element.dom.getBoundingClientRect();\n return Dragging.snap({\n sensor: absolute(sensorLeft, sensorTop),\n range: SugarPosition(sensorWidth, sensorHeight),\n output: absolute(Optional.some(x - rect.width / 2), Optional.some(y - rect.height / 2)),\n extra: { td }\n });\n });\n const getSnapsConfig = (getSnapPoints, cell, onChange) => {\n const isSameCell = (cellOpt, td) => cellOpt.exists(currentTd => eq(currentTd, td));\n return {\n getSnapPoints,\n leftAttr: 'data-drag-left',\n topAttr: 'data-drag-top',\n onSensor: (component, extra) => {\n const td = extra.td;\n if (!isSameCell(cell.get(), td)) {\n cell.set(td);\n onChange(td);\n }\n },\n mustSnap: true\n };\n };\n const createSelector = snaps => record(Button.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-selector']\n },\n buttonBehaviours: derive$1([\n Dragging.config({\n mode: 'mouseOrTouch',\n blockerClass: 'blocker',\n snaps\n }),\n Unselecting.config({})\n ]),\n eventOrder: {\n mousedown: [\n 'dragging',\n 'alloy.base.behaviour'\n ],\n touchstart: [\n 'dragging',\n 'alloy.base.behaviour'\n ]\n }\n }));\n const setup$4 = (editor, sink) => {\n const tlTds = Cell([]);\n const brTds = Cell([]);\n const isVisible = Cell(false);\n const startCell = value$2();\n const finishCell = value$2();\n const getTopLeftSnap = td => {\n const box = absolute$2(td);\n return calcSnap(memTopLeft.getOpt(sink), td, box.x, box.y, box.width, box.height);\n };\n const getTopLeftSnaps = () => map$2(tlTds.get(), td => getTopLeftSnap(td));\n const getBottomRightSnap = td => {\n const box = absolute$2(td);\n return calcSnap(memBottomRight.getOpt(sink), td, box.right, box.bottom, box.width, box.height);\n };\n const getBottomRightSnaps = () => map$2(brTds.get(), td => getBottomRightSnap(td));\n const topLeftSnaps = getSnapsConfig(getTopLeftSnaps, startCell, start => {\n finishCell.get().each(finish => {\n editor.dispatch('TableSelectorChange', {\n start,\n finish\n });\n });\n });\n const bottomRightSnaps = getSnapsConfig(getBottomRightSnaps, finishCell, finish => {\n startCell.get().each(start => {\n editor.dispatch('TableSelectorChange', {\n start,\n finish\n });\n });\n });\n const memTopLeft = createSelector(topLeftSnaps);\n const memBottomRight = createSelector(bottomRightSnaps);\n const topLeft = build$1(memTopLeft.asSpec());\n const bottomRight = build$1(memBottomRight.asSpec());\n const showOrHideHandle = (selector, cell, isAbove, isBelow) => {\n const cellRect = cell.dom.getBoundingClientRect();\n remove$6(selector.element, 'display');\n const viewportHeight = defaultView(SugarElement.fromDom(editor.getBody())).dom.innerHeight;\n const aboveViewport = isAbove(cellRect);\n const belowViewport = isBelow(cellRect, viewportHeight);\n if (aboveViewport || belowViewport) {\n set$8(selector.element, 'display', 'none');\n }\n };\n const snapTo = (selector, cell, getSnapConfig, pos) => {\n const snap = getSnapConfig(cell);\n Dragging.snapTo(selector, snap);\n const isAbove = rect => rect[pos] < 0;\n const isBelow = (rect, viewportHeight) => rect[pos] > viewportHeight;\n showOrHideHandle(selector, cell, isAbove, isBelow);\n };\n const snapTopLeft = cell => snapTo(topLeft, cell, getTopLeftSnap, 'top');\n const snapLastTopLeft = () => startCell.get().each(snapTopLeft);\n const snapBottomRight = cell => snapTo(bottomRight, cell, getBottomRightSnap, 'bottom');\n const snapLastBottomRight = () => finishCell.get().each(snapBottomRight);\n if (detect$2().deviceType.isTouch()) {\n editor.on('TableSelectionChange', e => {\n if (!isVisible.get()) {\n attach(sink, topLeft);\n attach(sink, bottomRight);\n isVisible.set(true);\n }\n startCell.set(e.start);\n finishCell.set(e.finish);\n e.otherCells.each(otherCells => {\n tlTds.set(otherCells.upOrLeftCells);\n brTds.set(otherCells.downOrRightCells);\n snapTopLeft(e.start);\n snapBottomRight(e.finish);\n });\n });\n editor.on('ResizeEditor ResizeWindow ScrollContent', () => {\n snapLastTopLeft();\n snapLastBottomRight();\n });\n editor.on('TableSelectionClear', () => {\n if (isVisible.get()) {\n detach(topLeft);\n detach(bottomRight);\n isVisible.set(false);\n }\n startCell.clear();\n finishCell.clear();\n });\n }\n };\n\n var Logo = \"<svg width=\\\"50px\\\" height=\\\"16px\\\" viewBox=\\\"0 0 50 16\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n <path fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M10.143 0c2.608.015 5.186 2.178 5.186 5.331 0 0 .077 3.812-.084 4.87-.361 2.41-2.164 4.074-4.65 4.496-1.453.284-2.523.49-3.212.623-.373.071-.634.122-.785.152-.184.038-.997.145-1.35.145-2.732 0-5.21-2.04-5.248-5.33 0 0 0-3.514.03-4.442.093-2.4 1.758-4.342 4.926-4.963 0 0 3.875-.752 4.036-.782.368-.07.775-.1 1.15-.1Zm1.826 2.8L5.83 3.989v2.393l-2.455.475v5.968l6.137-1.189V9.243l2.456-.476V2.8ZM5.83 6.382l3.682-.713v3.574l-3.682.713V6.382Zm27.173-1.64-.084-1.066h-2.226v9.132h2.456V7.743c-.008-1.151.998-2.064 2.149-2.072 1.15-.008 1.987.92 1.995 2.072v5.065h2.455V7.359c-.015-2.18-1.657-3.929-3.837-3.913a3.993 3.993 0 0 0-2.908 1.296Zm-6.3-4.266L29.16 0v2.387l-2.456.475V.476Zm0 3.2v9.132h2.456V3.676h-2.456Zm18.179 11.787L49.11 3.676H46.58l-1.612 4.527-.46 1.382-.384-1.382-1.611-4.527H39.98l3.3 9.132L42.15 16l2.732-.537ZM22.867 9.738c0 .752.568 1.075.921 1.075.353 0 .668-.047.998-.154l.537 1.765c-.23.154-.92.537-2.225.537-1.305 0-2.655-.997-2.686-2.686a136.877 136.877 0 0 1 0-4.374H18.8V3.676h1.612v-1.98l2.455-.476v2.456h2.302V5.9h-2.302v3.837Z\\\"/>\\n</svg>\\n\";\n\n const isHidden = elm => elm.nodeName === 'BR' || !!elm.getAttribute('data-mce-bogus') || elm.getAttribute('data-mce-type') === 'bookmark';\n const renderElementPath = (editor, settings, providersBackstage) => {\n var _a;\n const delimiter = (_a = settings.delimiter) !== null && _a !== void 0 ? _a : '\\u203A';\n const renderElement = (name, element, index) => Button.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-statusbar__path-item'],\n attributes: {\n 'data-index': index,\n 'aria-level': index + 1\n }\n },\n components: [text$2(name)],\n action: _btn => {\n editor.focus();\n editor.selection.select(element);\n editor.nodeChanged();\n },\n buttonBehaviours: derive$1([\n DisablingConfigs.button(providersBackstage.isDisabled),\n receivingConfig()\n ])\n });\n const renderDivider = () => ({\n dom: {\n tag: 'div',\n classes: ['tox-statusbar__path-divider'],\n attributes: { 'aria-hidden': true }\n },\n components: [text$2(` ${ delimiter } `)]\n });\n const renderPathData = data => foldl(data, (acc, path, index) => {\n const element = renderElement(path.name, path.element, index);\n if (index === 0) {\n return acc.concat([element]);\n } else {\n return acc.concat([\n renderDivider(),\n element\n ]);\n }\n }, []);\n const updatePath = parents => {\n const newPath = [];\n let i = parents.length;\n while (i-- > 0) {\n const parent = parents[i];\n if (parent.nodeType === 1 && !isHidden(parent)) {\n const args = fireResolveName(editor, parent);\n if (!args.isDefaultPrevented()) {\n newPath.push({\n name: args.name,\n element: parent\n });\n }\n if (args.isPropagationStopped()) {\n break;\n }\n }\n }\n return newPath;\n };\n return {\n dom: {\n tag: 'div',\n classes: ['tox-statusbar__path'],\n attributes: { role: 'navigation' }\n },\n behaviours: derive$1([\n Keying.config({\n mode: 'flow',\n selector: 'div[role=button]'\n }),\n Disabling.config({ disabled: providersBackstage.isDisabled }),\n receivingConfig(),\n Tabstopping.config({}),\n Replacing.config({}),\n config('elementPathEvents', [runOnAttached((comp, _e) => {\n editor.shortcuts.add('alt+F11', 'focus statusbar elementpath', () => Keying.focusIn(comp));\n editor.on('NodeChange', e => {\n const newPath = updatePath(e.parents);\n const newChildren = newPath.length > 0 ? renderPathData(newPath) : [];\n Replacing.set(comp, newChildren);\n });\n })])\n ]),\n components: []\n };\n };\n\n var ResizeTypes;\n (function (ResizeTypes) {\n ResizeTypes[ResizeTypes['None'] = 0] = 'None';\n ResizeTypes[ResizeTypes['Both'] = 1] = 'Both';\n ResizeTypes[ResizeTypes['Vertical'] = 2] = 'Vertical';\n }(ResizeTypes || (ResizeTypes = {})));\n const getDimensions = (editor, deltas, resizeType, originalHeight, originalWidth) => {\n const dimensions = { height: calcCappedSize(originalHeight + deltas.top, getMinHeightOption(editor), getMaxHeightOption(editor)) };\n if (resizeType === ResizeTypes.Both) {\n dimensions.width = calcCappedSize(originalWidth + deltas.left, getMinWidthOption(editor), getMaxWidthOption(editor));\n }\n return dimensions;\n };\n const resize = (editor, deltas, resizeType) => {\n const container = SugarElement.fromDom(editor.getContainer());\n const dimensions = getDimensions(editor, deltas, resizeType, get$d(container), get$c(container));\n each(dimensions, (val, dim) => {\n if (isNumber(val)) {\n set$8(container, dim, numToPx(val));\n }\n });\n fireResizeEditor(editor);\n };\n\n const getResizeType = editor => {\n const resize = getResize(editor);\n if (resize === false) {\n return ResizeTypes.None;\n } else if (resize === 'both') {\n return ResizeTypes.Both;\n } else {\n return ResizeTypes.Vertical;\n }\n };\n const keyboardHandler = (editor, resizeType, x, y) => {\n const scale = 20;\n const delta = SugarPosition(x * scale, y * scale);\n resize(editor, delta, resizeType);\n return Optional.some(true);\n };\n const renderResizeHandler = (editor, providersBackstage) => {\n const resizeType = getResizeType(editor);\n if (resizeType === ResizeTypes.None) {\n return Optional.none();\n }\n const resizeLabel = resizeType === ResizeTypes.Both ? 'Press the arrow keys to resize the editor.' : 'Press the Up and Down arrow keys to resize the editor.';\n return Optional.some(render$3('resize-handle', {\n tag: 'div',\n classes: ['tox-statusbar__resize-handle'],\n attributes: {\n 'title': providersBackstage.translate('Resize'),\n 'aria-label': providersBackstage.translate(resizeLabel)\n },\n behaviours: [\n Dragging.config({\n mode: 'mouse',\n repositionTarget: false,\n onDrag: (_comp, _target, delta) => resize(editor, delta, resizeType),\n blockerClass: 'tox-blocker'\n }),\n Keying.config({\n mode: 'special',\n onLeft: () => keyboardHandler(editor, resizeType, -1, 0),\n onRight: () => keyboardHandler(editor, resizeType, 1, 0),\n onUp: () => keyboardHandler(editor, resizeType, 0, -1),\n onDown: () => keyboardHandler(editor, resizeType, 0, 1)\n }),\n Tabstopping.config({}),\n Focusing.config({})\n ]\n }, providersBackstage.icons));\n };\n\n const renderWordCount = (editor, providersBackstage) => {\n const replaceCountText = (comp, count, mode) => Replacing.set(comp, [text$2(providersBackstage.translate([\n '{0} ' + mode,\n count[mode]\n ]))]);\n return Button.sketch({\n dom: {\n tag: 'button',\n classes: ['tox-statusbar__wordcount']\n },\n components: [],\n buttonBehaviours: derive$1([\n DisablingConfigs.button(providersBackstage.isDisabled),\n receivingConfig(),\n Tabstopping.config({}),\n Replacing.config({}),\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: {\n mode: 'words',\n count: {\n words: 0,\n characters: 0\n }\n }\n }\n }),\n config('wordcount-events', [\n runOnExecute$1(comp => {\n const currentVal = Representing.getValue(comp);\n const newMode = currentVal.mode === 'words' ? 'characters' : 'words';\n Representing.setValue(comp, {\n mode: newMode,\n count: currentVal.count\n });\n replaceCountText(comp, currentVal.count, newMode);\n }),\n runOnAttached(comp => {\n editor.on('wordCountUpdate', e => {\n const {mode} = Representing.getValue(comp);\n Representing.setValue(comp, {\n mode,\n count: e.wordCount\n });\n replaceCountText(comp, e.wordCount, mode);\n });\n })\n ])\n ]),\n eventOrder: {\n [execute$5()]: [\n 'disabling',\n 'alloy.base.behaviour',\n 'wordcount-events'\n ]\n }\n });\n };\n\n const renderStatusbar = (editor, providersBackstage) => {\n const renderBranding = () => {\n return {\n dom: {\n tag: 'span',\n classes: ['tox-statusbar__branding']\n },\n components: [{\n dom: {\n tag: 'a',\n attributes: {\n 'href': 'https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v6',\n 'rel': 'noopener',\n 'target': '_blank',\n 'aria-label': global$8.translate([\n 'Powered by {0}',\n 'Tiny'\n ])\n },\n innerHtml: Logo.trim()\n },\n behaviours: derive$1([Focusing.config({})])\n }]\n };\n };\n const renderHelpAccessibility = () => {\n const shortcutText = convertText('Alt+0');\n const text = `Press {0} for help`;\n return {\n dom: {\n tag: 'div',\n classes: ['tox-statusbar__help-text']\n },\n components: [text$2(global$8.translate([\n text,\n shortcutText\n ]))]\n };\n };\n const renderRightContainer = () => {\n const components = [];\n if (editor.hasPlugin('wordcount')) {\n components.push(renderWordCount(editor, providersBackstage));\n }\n if (useBranding(editor)) {\n components.push(renderBranding());\n }\n return {\n dom: {\n tag: 'div',\n classes: ['tox-statusbar__right-container']\n },\n components\n };\n };\n const getTextComponents = () => {\n const components = [];\n const shouldRenderHelp = useHelpAccessibility(editor);\n const shouldRenderElementPath = useElementPath(editor);\n const shouldRenderRightContainer = useBranding(editor) || editor.hasPlugin('wordcount');\n const getTextComponentClasses = () => {\n const flexStart = 'tox-statusbar__text-container--flex-start';\n const flexEnd = 'tox-statusbar__text-container--flex-end';\n const spaceAround = 'tox-statusbar__text-container--space-around';\n if (shouldRenderHelp) {\n const container3Columns = 'tox-statusbar__text-container-3-cols';\n if (!shouldRenderRightContainer && !shouldRenderElementPath) {\n return [\n container3Columns,\n spaceAround\n ];\n }\n if (shouldRenderRightContainer && !shouldRenderElementPath) {\n return [\n container3Columns,\n flexEnd\n ];\n }\n return [\n container3Columns,\n flexStart\n ];\n }\n return [shouldRenderRightContainer && !shouldRenderElementPath ? flexEnd : flexStart];\n };\n if (shouldRenderElementPath) {\n components.push(renderElementPath(editor, {}, providersBackstage));\n }\n if (shouldRenderHelp) {\n components.push(renderHelpAccessibility());\n }\n if (shouldRenderRightContainer) {\n components.push(renderRightContainer());\n }\n if (components.length > 0) {\n return [{\n dom: {\n tag: 'div',\n classes: [\n 'tox-statusbar__text-container',\n ...getTextComponentClasses()\n ]\n },\n components\n }];\n }\n return [];\n };\n const getComponents = () => {\n const components = getTextComponents();\n const resizeHandler = renderResizeHandler(editor, providersBackstage);\n return components.concat(resizeHandler.toArray());\n };\n return {\n dom: {\n tag: 'div',\n classes: ['tox-statusbar']\n },\n components: getComponents()\n };\n };\n\n const getLazyMothership = (label, singleton) => singleton.get().getOrDie(`UI for ${ label } has not been rendered`);\n const setup$3 = (editor, setupForTheme) => {\n const isInline = editor.inline;\n const mode = isInline ? Inline : Iframe;\n const header = isStickyToolbar(editor) ? StickyHeader : StaticHeader;\n const lazyUiRefs = LazyUiReferences();\n const lazyMothership = value$2();\n const lazyDialogMothership = value$2();\n const lazyPopupMothership = value$2();\n const platform = detect$2();\n const isTouch = platform.deviceType.isTouch();\n const touchPlatformClass = 'tox-platform-touch';\n const deviceClasses = isTouch ? [touchPlatformClass] : [];\n const isToolbarBottom = isToolbarLocationBottom(editor);\n const toolbarMode = getToolbarMode(editor);\n const memAnchorBar = record({\n dom: {\n tag: 'div',\n classes: ['tox-anchorbar']\n }\n });\n const memBottomAnchorBar = record({\n dom: {\n tag: 'div',\n classes: ['tox-bottom-anchorbar']\n }\n });\n const lazyHeader = () => lazyUiRefs.mainUi.get().map(ui => ui.outerContainer).bind(OuterContainer.getHeader);\n const lazyDialogSinkResult = () => Result.fromOption(lazyUiRefs.dialogUi.get().map(ui => ui.sink), 'UI has not been rendered');\n const lazyPopupSinkResult = () => Result.fromOption(lazyUiRefs.popupUi.get().map(ui => ui.sink), '(popup) UI has not been rendered');\n const lazyAnchorBar = lazyUiRefs.lazyGetInOuterOrDie('anchor bar', memAnchorBar.getOpt);\n const lazyBottomAnchorBar = lazyUiRefs.lazyGetInOuterOrDie('bottom anchor bar', memBottomAnchorBar.getOpt);\n const lazyToolbar = lazyUiRefs.lazyGetInOuterOrDie('toolbar', OuterContainer.getToolbar);\n const lazyThrobber = lazyUiRefs.lazyGetInOuterOrDie('throbber', OuterContainer.getThrobber);\n const backstages = init$6({\n popup: lazyPopupSinkResult,\n dialog: lazyDialogSinkResult\n }, editor, lazyAnchorBar, lazyBottomAnchorBar);\n const makeHeaderPart = () => {\n const verticalDirAttributes = { attributes: { [Attribute]: isToolbarBottom ? AttributeValue.BottomToTop : AttributeValue.TopToBottom } };\n const partMenubar = OuterContainer.parts.menubar({\n dom: {\n tag: 'div',\n classes: ['tox-menubar']\n },\n backstage: backstages.popup,\n onEscape: () => {\n editor.focus();\n }\n });\n const partToolbar = OuterContainer.parts.toolbar({\n dom: {\n tag: 'div',\n classes: ['tox-toolbar']\n },\n getSink: backstages.popup.shared.getSink,\n providers: backstages.popup.shared.providers,\n onEscape: () => {\n editor.focus();\n },\n onToolbarToggled: state => {\n fireToggleToolbarDrawer(editor, state);\n },\n type: toolbarMode,\n lazyToolbar,\n lazyHeader: () => lazyHeader().getOrDie('Could not find header element'),\n ...verticalDirAttributes\n });\n const partMultipleToolbar = OuterContainer.parts['multiple-toolbar']({\n dom: {\n tag: 'div',\n classes: ['tox-toolbar-overlord']\n },\n providers: backstages.popup.shared.providers,\n onEscape: () => {\n editor.focus();\n },\n type: toolbarMode\n });\n const hasMultipleToolbar = isMultipleToolbars(editor);\n const hasToolbar = isToolbarEnabled(editor);\n const hasMenubar = isMenubarEnabled(editor);\n const shouldHavePromotion = promotionEnabled(editor);\n const partPromotion = makePromotion();\n const hasAnyContents = hasMultipleToolbar || hasToolbar || hasMenubar;\n const getPartToolbar = () => {\n if (hasMultipleToolbar) {\n return [partMultipleToolbar];\n } else if (hasToolbar) {\n return [partToolbar];\n } else {\n return [];\n }\n };\n const menubarCollection = shouldHavePromotion ? [\n partPromotion,\n partMenubar\n ] : [partMenubar];\n return OuterContainer.parts.header({\n dom: {\n tag: 'div',\n classes: ['tox-editor-header'].concat(hasAnyContents ? [] : ['tox-editor-header--empty']),\n ...verticalDirAttributes\n },\n components: flatten([\n hasMenubar ? menubarCollection : [],\n getPartToolbar(),\n useFixedContainer(editor) ? [] : [memAnchorBar.asSpec()]\n ]),\n sticky: isStickyToolbar(editor),\n editor,\n sharedBackstage: backstages.popup.shared\n });\n };\n const makePromotion = () => {\n return OuterContainer.parts.promotion({\n dom: {\n tag: 'div',\n classes: ['tox-promotion']\n }\n });\n };\n const makeSidebarDefinition = () => {\n const partSocket = OuterContainer.parts.socket({\n dom: {\n tag: 'div',\n classes: ['tox-edit-area']\n }\n });\n const partSidebar = OuterContainer.parts.sidebar({\n dom: {\n tag: 'div',\n classes: ['tox-sidebar']\n }\n });\n return {\n dom: {\n tag: 'div',\n classes: ['tox-sidebar-wrap']\n },\n components: [\n partSocket,\n partSidebar\n ]\n };\n };\n const renderDialogUi = () => {\n const uiContainer = getUiContainer(editor);\n const isGridUiContainer = eq(body(), uiContainer) && get$e(uiContainer, 'display') === 'grid';\n const sinkSpec = {\n dom: {\n tag: 'div',\n classes: [\n 'tox',\n 'tox-silver-sink',\n 'tox-tinymce-aux'\n ].concat(deviceClasses),\n attributes: { ...global$8.isRtl() ? { dir: 'rtl' } : {} }\n },\n behaviours: derive$1([Positioning.config({ useFixed: () => header.isDocked(lazyHeader) })])\n };\n const reactiveWidthSpec = {\n dom: { styles: { width: document.body.clientWidth + 'px' } },\n events: derive$2([run$1(windowResize(), comp => {\n set$8(comp.element, 'width', document.body.clientWidth + 'px');\n })])\n };\n const sink = build$1(deepMerge(sinkSpec, isGridUiContainer ? reactiveWidthSpec : {}));\n const uiMothership = takeover(sink);\n lazyDialogMothership.set(uiMothership);\n return {\n sink,\n mothership: uiMothership\n };\n };\n const renderPopupUi = () => {\n const sinkSpec = {\n dom: {\n tag: 'div',\n classes: [\n 'tox',\n 'tox-silver-sink',\n 'tox-silver-popup-sink',\n 'tox-tinymce-aux'\n ].concat(deviceClasses),\n attributes: { ...global$8.isRtl() ? { dir: 'rtl' } : {} }\n },\n behaviours: derive$1([Positioning.config({\n useFixed: () => header.isDocked(lazyHeader),\n getBounds: () => setupForTheme.getPopupSinkBounds()\n })])\n };\n const sink = build$1(sinkSpec);\n const uiMothership = takeover(sink);\n lazyPopupMothership.set(uiMothership);\n return {\n sink,\n mothership: uiMothership\n };\n };\n const renderMainUi = () => {\n const partHeader = makeHeaderPart();\n const sidebarContainer = makeSidebarDefinition();\n const partThrobber = OuterContainer.parts.throbber({\n dom: {\n tag: 'div',\n classes: ['tox-throbber']\n },\n backstage: backstages.popup\n });\n const partViewWrapper = OuterContainer.parts.viewWrapper({ backstage: backstages.popup });\n const statusbar = useStatusBar(editor) && !isInline ? Optional.some(renderStatusbar(editor, backstages.popup.shared.providers)) : Optional.none();\n const editorComponents = flatten([\n isToolbarBottom ? [] : [partHeader],\n isInline ? [] : [sidebarContainer],\n isToolbarBottom ? [partHeader] : []\n ]);\n const editorContainer = OuterContainer.parts.editorContainer({\n components: flatten([\n editorComponents,\n isInline ? [] : [\n memBottomAnchorBar.asSpec(),\n ...statusbar.toArray()\n ]\n ])\n });\n const isHidden = isDistractionFree(editor);\n const attributes = {\n role: 'application',\n ...global$8.isRtl() ? { dir: 'rtl' } : {},\n ...isHidden ? { 'aria-hidden': 'true' } : {}\n };\n const outerContainer = build$1(OuterContainer.sketch({\n dom: {\n tag: 'div',\n classes: [\n 'tox',\n 'tox-tinymce'\n ].concat(isInline ? ['tox-tinymce-inline'] : []).concat(isToolbarBottom ? ['tox-tinymce--toolbar-bottom'] : []).concat(deviceClasses),\n styles: {\n visibility: 'hidden',\n ...isHidden ? {\n opacity: '0',\n border: '0'\n } : {}\n },\n attributes\n },\n components: [\n editorContainer,\n ...isInline ? [] : [partViewWrapper],\n partThrobber\n ],\n behaviours: derive$1([\n receivingConfig(),\n Disabling.config({ disableClass: 'tox-tinymce--disabled' }),\n Keying.config({\n mode: 'cyclic',\n selector: '.tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle'\n })\n ])\n }));\n const mothership = takeover(outerContainer);\n lazyMothership.set(mothership);\n return {\n mothership,\n outerContainer\n };\n };\n const setEditorSize = outerContainer => {\n const parsedHeight = numToPx(getHeightWithFallback(editor));\n const parsedWidth = numToPx(getWidthWithFallback(editor));\n if (!editor.inline) {\n if (isValidValue$1('div', 'width', parsedWidth)) {\n set$8(outerContainer.element, 'width', parsedWidth);\n }\n if (isValidValue$1('div', 'height', parsedHeight)) {\n set$8(outerContainer.element, 'height', parsedHeight);\n } else {\n set$8(outerContainer.element, 'height', '400px');\n }\n }\n return parsedHeight;\n };\n const setupShortcutsAndCommands = outerContainer => {\n editor.addShortcut('alt+F9', 'focus menubar', () => {\n OuterContainer.focusMenubar(outerContainer);\n });\n editor.addShortcut('alt+F10', 'focus toolbar', () => {\n OuterContainer.focusToolbar(outerContainer);\n });\n editor.addCommand('ToggleToolbarDrawer', (_ui, options) => {\n if (options === null || options === void 0 ? void 0 : options.skipFocus) {\n OuterContainer.toggleToolbarDrawerWithoutFocusing(outerContainer);\n } else {\n OuterContainer.toggleToolbarDrawer(outerContainer);\n }\n });\n editor.addQueryStateHandler('ToggleToolbarDrawer', () => OuterContainer.isToolbarDrawerToggled(outerContainer));\n };\n const renderUIWithRefs = uiRefs => {\n const {mainUi, popupUi, uiMotherships} = uiRefs;\n map$1(getToolbarGroups(editor), (toolbarGroupButtonConfig, name) => {\n editor.ui.registry.addGroupToolbarButton(name, toolbarGroupButtonConfig);\n });\n const {buttons, menuItems, contextToolbars, sidebars, views} = editor.ui.registry.getAll();\n const toolbarOpt = getMultipleToolbarsOption(editor);\n const rawUiConfig = {\n menuItems,\n menus: getMenus(editor),\n menubar: getMenubar(editor),\n toolbar: toolbarOpt.getOrThunk(() => getToolbar(editor)),\n allowToolbarGroups: toolbarMode === ToolbarMode$1.floating,\n buttons,\n sidebar: sidebars,\n views\n };\n setupShortcutsAndCommands(mainUi.outerContainer);\n setup$b(editor, mainUi.mothership, uiMotherships);\n header.setup(editor, backstages.popup.shared, lazyHeader);\n setup$6(editor, backstages.popup);\n setup$5(editor, backstages.popup.shared.getSink, backstages.popup);\n setup$8(editor);\n setup$7(editor, lazyThrobber, backstages.popup.shared);\n register$9(editor, contextToolbars, popupUi.sink, { backstage: backstages.popup });\n setup$4(editor, popupUi.sink);\n const elm = editor.getElement();\n const height = setEditorSize(mainUi.outerContainer);\n const args = {\n targetNode: elm,\n height\n };\n return mode.render(editor, uiRefs, rawUiConfig, backstages.popup, args);\n };\n const reuseDialogUiForPopuUi = dialogUi => {\n lazyPopupMothership.set(dialogUi.mothership);\n return dialogUi;\n };\n const renderUI = () => {\n const mainUi = renderMainUi();\n const dialogUi = renderDialogUi();\n const popupUi = isSplitUiMode(editor) ? renderPopupUi() : reuseDialogUiForPopuUi(dialogUi);\n lazyUiRefs.dialogUi.set(dialogUi);\n lazyUiRefs.popupUi.set(popupUi);\n lazyUiRefs.mainUi.set(mainUi);\n const uiRefs = {\n popupUi,\n dialogUi,\n mainUi,\n uiMotherships: lazyUiRefs.getUiMotherships()\n };\n return renderUIWithRefs(uiRefs);\n };\n return {\n popups: {\n backstage: backstages.popup,\n getMothership: () => getLazyMothership('popups', lazyPopupMothership)\n },\n dialogs: {\n backstage: backstages.dialog,\n getMothership: () => getLazyMothership('dialogs', lazyDialogMothership)\n },\n renderUI\n };\n };\n\n const labelledBy = (labelledElement, labelElement) => {\n const labelId = getOpt(labelledElement, 'id').fold(() => {\n const id = generate$6('dialog-label');\n set$9(labelElement, 'id', id);\n return id;\n }, identity);\n set$9(labelledElement, 'aria-labelledby', labelId);\n };\n\n const schema$2 = constant$1([\n required$1('lazySink'),\n option$3('dragBlockClass'),\n defaultedFunction('getBounds', win),\n defaulted('useTabstopAt', always),\n defaulted('firstTabstop', 0),\n defaulted('eventOrder', {}),\n field('modalBehaviours', [Keying]),\n onKeyboardHandler('onExecute'),\n onStrictKeyboardHandler('onEscape')\n ]);\n const basic = { sketch: identity };\n const parts$2 = constant$1([\n optional({\n name: 'draghandle',\n overrides: (detail, spec) => {\n return {\n behaviours: derive$1([Dragging.config({\n mode: 'mouse',\n getTarget: handle => {\n return ancestor(handle, '[role=\"dialog\"]').getOr(handle);\n },\n blockerClass: detail.dragBlockClass.getOrDie(new Error('The drag blocker class was not specified for a dialog with a drag handle: \\n' + JSON.stringify(spec, null, 2)).message),\n getBounds: detail.getDragBounds\n })])\n };\n }\n }),\n required({\n schema: [required$1('dom')],\n name: 'title'\n }),\n required({\n factory: basic,\n schema: [required$1('dom')],\n name: 'close'\n }),\n required({\n factory: basic,\n schema: [required$1('dom')],\n name: 'body'\n }),\n optional({\n factory: basic,\n schema: [required$1('dom')],\n name: 'footer'\n }),\n external({\n factory: {\n sketch: (spec, detail) => ({\n ...spec,\n dom: detail.dom,\n components: detail.components\n })\n },\n schema: [\n defaulted('dom', {\n tag: 'div',\n styles: {\n position: 'fixed',\n left: '0px',\n top: '0px',\n right: '0px',\n bottom: '0px'\n }\n }),\n defaulted('components', [])\n ],\n name: 'blocker'\n })\n ]);\n\n const factory$4 = (detail, components, spec, externals) => {\n const dialogComp = value$2();\n const showDialog = dialog => {\n dialogComp.set(dialog);\n const sink = detail.lazySink(dialog).getOrDie();\n const externalBlocker = externals.blocker();\n const blocker = sink.getSystem().build({\n ...externalBlocker,\n components: externalBlocker.components.concat([premade(dialog)]),\n behaviours: derive$1([\n Focusing.config({}),\n config('dialog-blocker-events', [runOnSource(focusin(), () => {\n Blocking.isBlocked(dialog) ? noop() : Keying.focusIn(dialog);\n })])\n ])\n });\n attach(sink, blocker);\n Keying.focusIn(dialog);\n };\n const hideDialog = dialog => {\n dialogComp.clear();\n parent(dialog.element).each(blockerDom => {\n dialog.getSystem().getByDom(blockerDom).each(blocker => {\n detach(blocker);\n });\n });\n };\n const getDialogBody = dialog => getPartOrDie(dialog, detail, 'body');\n const getDialogFooter = dialog => getPart(dialog, detail, 'footer');\n const setBusy = (dialog, getBusySpec) => {\n Blocking.block(dialog, getBusySpec);\n };\n const setIdle = dialog => {\n Blocking.unblock(dialog);\n };\n const modalEventsId = generate$6('modal-events');\n const eventOrder = {\n ...detail.eventOrder,\n [attachedToDom()]: [modalEventsId].concat(detail.eventOrder['alloy.system.attached'] || [])\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n apis: {\n show: showDialog,\n hide: hideDialog,\n getBody: getDialogBody,\n getFooter: getDialogFooter,\n setIdle,\n setBusy\n },\n eventOrder,\n domModification: {\n attributes: {\n 'role': 'dialog',\n 'aria-modal': 'true'\n }\n },\n behaviours: augment(detail.modalBehaviours, [\n Replacing.config({}),\n Keying.config({\n mode: 'cyclic',\n onEnter: detail.onExecute,\n onEscape: detail.onEscape,\n useTabstopAt: detail.useTabstopAt,\n firstTabstop: detail.firstTabstop\n }),\n Blocking.config({ getRoot: dialogComp.get }),\n config(modalEventsId, [runOnAttached(c => {\n labelledBy(c.element, getPartOrDie(c, detail, 'title').element);\n })])\n ])\n };\n };\n const ModalDialog = composite({\n name: 'ModalDialog',\n configFields: schema$2(),\n partFields: parts$2(),\n factory: factory$4,\n apis: {\n show: (apis, dialog) => {\n apis.show(dialog);\n },\n hide: (apis, dialog) => {\n apis.hide(dialog);\n },\n getBody: (apis, dialog) => apis.getBody(dialog),\n getFooter: (apis, dialog) => apis.getFooter(dialog),\n setBusy: (apis, dialog, getBusySpec) => {\n apis.setBusy(dialog, getBusySpec);\n },\n setIdle: (apis, dialog) => {\n apis.setIdle(dialog);\n }\n }\n });\n\n const dialogToggleMenuItemSchema = objOf([\n type,\n name$1\n ].concat(commonMenuItemFields));\n const dialogToggleMenuItemDataProcessor = boolean;\n\n const baseFooterButtonFields = [\n generatedName('button'),\n optionalIcon,\n defaultedStringEnum('align', 'end', [\n 'start',\n 'end'\n ]),\n primary,\n enabled,\n optionStringEnum('buttonType', [\n 'primary',\n 'secondary'\n ])\n ];\n const dialogFooterButtonFields = [\n ...baseFooterButtonFields,\n text\n ];\n const normalFooterButtonFields = [\n requiredStringEnum('type', [\n 'submit',\n 'cancel',\n 'custom'\n ]),\n ...dialogFooterButtonFields\n ];\n const menuFooterButtonFields = [\n requiredStringEnum('type', ['menu']),\n optionalText,\n optionalTooltip,\n optionalIcon,\n requiredArrayOf('items', dialogToggleMenuItemSchema),\n ...baseFooterButtonFields\n ];\n const toggleButtonSpecFields = [\n ...baseFooterButtonFields,\n requiredStringEnum('type', ['togglebutton']),\n requiredString('tooltip'),\n optionalIcon,\n optionalText,\n defaultedBoolean('active', false)\n ];\n const dialogFooterButtonSchema = choose$1('type', {\n submit: normalFooterButtonFields,\n cancel: normalFooterButtonFields,\n custom: normalFooterButtonFields,\n menu: menuFooterButtonFields,\n togglebutton: toggleButtonSpecFields\n });\n\n const alertBannerFields = [\n type,\n text,\n requiredStringEnum('level', [\n 'info',\n 'warn',\n 'error',\n 'success'\n ]),\n icon,\n defaulted('url', '')\n ];\n const alertBannerSchema = objOf(alertBannerFields);\n\n const createBarFields = itemsField => [\n type,\n itemsField\n ];\n\n const buttonFields = [\n type,\n text,\n enabled,\n generatedName('button'),\n optionalIcon,\n borderless,\n optionStringEnum('buttonType', [\n 'primary',\n 'secondary',\n 'toolbar'\n ]),\n primary\n ];\n const buttonSchema = objOf(buttonFields);\n\n const formComponentFields = [\n type,\n name$1\n ];\n const formComponentWithLabelFields = formComponentFields.concat([optionalLabel]);\n\n const checkboxFields = formComponentFields.concat([\n label,\n enabled\n ]);\n const checkboxSchema = objOf(checkboxFields);\n const checkboxDataProcessor = boolean;\n\n const collectionFields = formComponentWithLabelFields.concat([defaultedColumns('auto')]);\n const collectionSchema = objOf(collectionFields);\n const collectionDataProcessor = arrOfObj([\n value$1,\n text,\n icon\n ]);\n\n const colorInputFields = formComponentWithLabelFields.concat([defaultedString('storageKey', 'default')]);\n const colorInputSchema = objOf(colorInputFields);\n const colorInputDataProcessor = string;\n\n const colorPickerFields = formComponentWithLabelFields;\n const colorPickerSchema = objOf(colorPickerFields);\n const colorPickerDataProcessor = string;\n\n const customEditorFields = formComponentFields.concat([\n defaultedString('tag', 'textarea'),\n requiredString('scriptId'),\n requiredString('scriptUrl'),\n defaultedPostMsg('settings', undefined)\n ]);\n const customEditorFieldsOld = formComponentFields.concat([\n defaultedString('tag', 'textarea'),\n requiredFunction('init')\n ]);\n const customEditorSchema = valueOf(v => asRaw('customeditor.old', objOfOnly(customEditorFieldsOld), v).orThunk(() => asRaw('customeditor.new', objOfOnly(customEditorFields), v)));\n const customEditorDataProcessor = string;\n\n const dropZoneFields = formComponentWithLabelFields;\n const dropZoneSchema = objOf(dropZoneFields);\n const dropZoneDataProcessor = arrOfVal();\n\n const createGridFields = itemsField => [\n type,\n requiredNumber('columns'),\n itemsField\n ];\n\n const htmlPanelFields = [\n type,\n requiredString('html'),\n defaultedStringEnum('presets', 'presentation', [\n 'presentation',\n 'document'\n ])\n ];\n const htmlPanelSchema = objOf(htmlPanelFields);\n\n const iframeFields = formComponentWithLabelFields.concat([\n defaultedBoolean('border', false),\n defaultedBoolean('sandboxed', true),\n defaultedBoolean('streamContent', false),\n defaultedBoolean('transparent', true)\n ]);\n const iframeSchema = objOf(iframeFields);\n const iframeDataProcessor = string;\n\n const imagePreviewSchema = objOf(formComponentFields.concat([optionString('height')]));\n const imagePreviewDataProcessor = objOf([\n requiredString('url'),\n optionNumber('zoom'),\n optionNumber('cachedWidth'),\n optionNumber('cachedHeight')\n ]);\n\n const inputFields = formComponentWithLabelFields.concat([\n optionString('inputMode'),\n optionString('placeholder'),\n defaultedBoolean('maximized', false),\n enabled\n ]);\n const inputSchema = objOf(inputFields);\n const inputDataProcessor = string;\n\n const createLabelFields = itemsField => [\n type,\n label,\n itemsField,\n defaultedStringEnum('align', 'start', [\n 'start',\n 'center',\n 'end'\n ])\n ];\n\n const listBoxSingleItemFields = [\n text,\n value$1\n ];\n const listBoxNestedItemFields = [\n text,\n requiredArrayOf('items', thunkOf('items', () => listBoxItemSchema))\n ];\n const listBoxItemSchema = oneOf([\n objOf(listBoxSingleItemFields),\n objOf(listBoxNestedItemFields)\n ]);\n const listBoxFields = formComponentWithLabelFields.concat([\n requiredArrayOf('items', listBoxItemSchema),\n enabled\n ]);\n const listBoxSchema = objOf(listBoxFields);\n const listBoxDataProcessor = string;\n\n const selectBoxFields = formComponentWithLabelFields.concat([\n requiredArrayOfObj('items', [\n text,\n value$1\n ]),\n defaultedNumber('size', 1),\n enabled\n ]);\n const selectBoxSchema = objOf(selectBoxFields);\n const selectBoxDataProcessor = string;\n\n const sizeInputFields = formComponentWithLabelFields.concat([\n defaultedBoolean('constrain', true),\n enabled\n ]);\n const sizeInputSchema = objOf(sizeInputFields);\n const sizeInputDataProcessor = objOf([\n requiredString('width'),\n requiredString('height')\n ]);\n\n const sliderFields = formComponentFields.concat([\n label,\n defaultedNumber('min', 0),\n defaultedNumber('max', 0)\n ]);\n const sliderSchema = objOf(sliderFields);\n const sliderInputDataProcessor = number;\n\n const tableFields = [\n type,\n requiredArrayOf('header', string),\n requiredArrayOf('cells', arrOf(string))\n ];\n const tableSchema = objOf(tableFields);\n\n const textAreaFields = formComponentWithLabelFields.concat([\n optionString('placeholder'),\n defaultedBoolean('maximized', false),\n enabled\n ]);\n const textAreaSchema = objOf(textAreaFields);\n const textAreaDataProcessor = string;\n\n const baseTreeItemFields = [\n requiredStringEnum('type', [\n 'directory',\n 'leaf'\n ]),\n title,\n requiredString('id'),\n optionOf('menu', MenuButtonSchema)\n ];\n const treeItemLeafFields = baseTreeItemFields;\n const treeItemLeafSchema = objOf(treeItemLeafFields);\n const treeItemDirectoryFields = baseTreeItemFields.concat([requiredArrayOf('children', thunkOf('children', () => {\n return choose$2('type', {\n directory: treeItemDirectorySchema,\n leaf: treeItemLeafSchema\n });\n }))]);\n const treeItemDirectorySchema = objOf(treeItemDirectoryFields);\n const treeItemSchema = choose$2('type', {\n directory: treeItemDirectorySchema,\n leaf: treeItemLeafSchema\n });\n const treeFields = [\n type,\n requiredArrayOf('items', treeItemSchema),\n optionFunction('onLeafAction'),\n optionFunction('onToggleExpand'),\n defaultedArrayOf('defaultExpandedIds', [], string),\n optionString('defaultSelectedId')\n ];\n const treeSchema = objOf(treeFields);\n\n const urlInputFields = formComponentWithLabelFields.concat([\n defaultedStringEnum('filetype', 'file', [\n 'image',\n 'media',\n 'file'\n ]),\n enabled,\n optionString('picker_text')\n ]);\n const urlInputSchema = objOf(urlInputFields);\n const urlInputDataProcessor = objOf([\n value$1,\n defaultedMeta\n ]);\n\n const createItemsField = name => field$1('items', 'items', required$2(), arrOf(valueOf(v => asRaw(`Checking item of ${ name }`, itemSchema, v).fold(sErr => Result.error(formatError(sErr)), passValue => Result.value(passValue)))));\n const itemSchema = valueThunk(() => choose$2('type', {\n alertbanner: alertBannerSchema,\n bar: objOf(createBarFields(createItemsField('bar'))),\n button: buttonSchema,\n checkbox: checkboxSchema,\n colorinput: colorInputSchema,\n colorpicker: colorPickerSchema,\n dropzone: dropZoneSchema,\n grid: objOf(createGridFields(createItemsField('grid'))),\n iframe: iframeSchema,\n input: inputSchema,\n listbox: listBoxSchema,\n selectbox: selectBoxSchema,\n sizeinput: sizeInputSchema,\n slider: sliderSchema,\n textarea: textAreaSchema,\n urlinput: urlInputSchema,\n customeditor: customEditorSchema,\n htmlpanel: htmlPanelSchema,\n imagepreview: imagePreviewSchema,\n collection: collectionSchema,\n label: objOf(createLabelFields(createItemsField('label'))),\n table: tableSchema,\n tree: treeSchema,\n panel: panelSchema\n }));\n const panelFields = [\n type,\n defaulted('classes', []),\n requiredArrayOf('items', itemSchema)\n ];\n const panelSchema = objOf(panelFields);\n\n const tabFields = [\n generatedName('tab'),\n title,\n requiredArrayOf('items', itemSchema)\n ];\n const tabPanelFields = [\n type,\n requiredArrayOfObj('tabs', tabFields)\n ];\n const tabPanelSchema = objOf(tabPanelFields);\n\n const dialogButtonFields = dialogFooterButtonFields;\n const dialogButtonSchema = dialogFooterButtonSchema;\n const dialogSchema = objOf([\n requiredString('title'),\n requiredOf('body', choose$2('type', {\n panel: panelSchema,\n tabpanel: tabPanelSchema\n })),\n defaultedString('size', 'normal'),\n defaultedArrayOf('buttons', [], dialogButtonSchema),\n defaulted('initialData', {}),\n defaultedFunction('onAction', noop),\n defaultedFunction('onChange', noop),\n defaultedFunction('onSubmit', noop),\n defaultedFunction('onClose', noop),\n defaultedFunction('onCancel', noop),\n defaultedFunction('onTabChange', noop)\n ]);\n const createDialog = spec => asRaw('dialog', dialogSchema, spec);\n\n const urlDialogButtonSchema = objOf([\n requiredStringEnum('type', [\n 'cancel',\n 'custom'\n ]),\n ...dialogButtonFields\n ]);\n const urlDialogSchema = objOf([\n requiredString('title'),\n requiredString('url'),\n optionNumber('height'),\n optionNumber('width'),\n optionArrayOf('buttons', urlDialogButtonSchema),\n defaultedFunction('onAction', noop),\n defaultedFunction('onCancel', noop),\n defaultedFunction('onClose', noop),\n defaultedFunction('onMessage', noop)\n ]);\n const createUrlDialog = spec => asRaw('dialog', urlDialogSchema, spec);\n\n const getAllObjects = obj => {\n if (isObject(obj)) {\n return [obj].concat(bind$3(values(obj), getAllObjects));\n } else if (isArray(obj)) {\n return bind$3(obj, getAllObjects);\n } else {\n return [];\n }\n };\n\n const isNamedItem = obj => isString(obj.type) && isString(obj.name);\n const dataProcessors = {\n checkbox: checkboxDataProcessor,\n colorinput: colorInputDataProcessor,\n colorpicker: colorPickerDataProcessor,\n dropzone: dropZoneDataProcessor,\n input: inputDataProcessor,\n iframe: iframeDataProcessor,\n imagepreview: imagePreviewDataProcessor,\n selectbox: selectBoxDataProcessor,\n sizeinput: sizeInputDataProcessor,\n slider: sliderInputDataProcessor,\n listbox: listBoxDataProcessor,\n size: sizeInputDataProcessor,\n textarea: textAreaDataProcessor,\n urlinput: urlInputDataProcessor,\n customeditor: customEditorDataProcessor,\n collection: collectionDataProcessor,\n togglemenuitem: dialogToggleMenuItemDataProcessor\n };\n const getDataProcessor = item => Optional.from(dataProcessors[item.type]);\n const getNamedItems = structure => filter$2(getAllObjects(structure), isNamedItem);\n\n const createDataValidator = structure => {\n const namedItems = getNamedItems(structure);\n const fields = bind$3(namedItems, item => getDataProcessor(item).fold(() => [], schema => [requiredOf(item.name, schema)]));\n return objOf(fields);\n };\n\n const extract = structure => {\n var _a;\n const internalDialog = getOrDie(createDialog(structure));\n const dataValidator = createDataValidator(structure);\n const initialData = (_a = structure.initialData) !== null && _a !== void 0 ? _a : {};\n return {\n internalDialog,\n dataValidator,\n initialData\n };\n };\n const DialogManager = {\n open: (factory, structure) => {\n const extraction = extract(structure);\n return factory(extraction.internalDialog, extraction.initialData, extraction.dataValidator);\n },\n openUrl: (factory, structure) => {\n const internalDialog = getOrDie(createUrlDialog(structure));\n return factory(internalDialog);\n },\n redial: structure => extract(structure)\n };\n\n const events = (reflectingConfig, reflectingState) => {\n const update = (component, data) => {\n reflectingConfig.updateState.each(updateState => {\n const newState = updateState(component, data);\n reflectingState.set(newState);\n });\n reflectingConfig.renderComponents.each(renderComponents => {\n const newComponents = renderComponents(data, reflectingState.get());\n const replacer = reflectingConfig.reuseDom ? withReuse : withoutReuse;\n replacer(component, newComponents);\n });\n };\n return derive$2([\n run$1(receive(), (component, message) => {\n const receivingData = message;\n if (!receivingData.universal) {\n const channel = reflectingConfig.channel;\n if (contains$2(receivingData.channels, channel)) {\n update(component, receivingData.data);\n }\n }\n }),\n runOnAttached((comp, _se) => {\n reflectingConfig.initialData.each(rawData => {\n update(comp, rawData);\n });\n })\n ]);\n };\n\n var ActiveReflecting = /*#__PURE__*/Object.freeze({\n __proto__: null,\n events: events\n });\n\n const getState = (component, replaceConfig, reflectState) => reflectState;\n\n var ReflectingApis = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getState: getState\n });\n\n var ReflectingSchema = [\n required$1('channel'),\n option$3('renderComponents'),\n option$3('updateState'),\n option$3('initialData'),\n defaultedBoolean('reuseDom', true)\n ];\n\n const init = () => {\n const cell = Cell(Optional.none());\n const clear = () => cell.set(Optional.none());\n const readState = () => cell.get().getOr('none');\n return {\n readState,\n get: cell.get,\n set: cell.set,\n clear\n };\n };\n\n var ReflectingState = /*#__PURE__*/Object.freeze({\n __proto__: null,\n init: init\n });\n\n const Reflecting = create$4({\n fields: ReflectingSchema,\n name: 'reflecting',\n active: ActiveReflecting,\n apis: ReflectingApis,\n state: ReflectingState\n });\n\n const toValidValues = values => {\n const errors = [];\n const result = {};\n each(values, (value, name) => {\n value.fold(() => {\n errors.push(name);\n }, v => {\n result[name] = v;\n });\n });\n return errors.length > 0 ? Result.error(errors) : Result.value(result);\n };\n\n const renderBodyPanel = (spec, dialogData, backstage) => {\n const memForm = record(Form.sketch(parts => ({\n dom: {\n tag: 'div',\n classes: ['tox-form'].concat(spec.classes)\n },\n components: map$2(spec.items, item => interpretInForm(parts, item, dialogData, backstage))\n })));\n return {\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body']\n },\n components: [{\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body-content']\n },\n components: [memForm.asSpec()]\n }],\n behaviours: derive$1([\n Keying.config({\n mode: 'acyclic',\n useTabstopAt: not(isPseudoStop)\n }),\n ComposingConfigs.memento(memForm),\n memento(memForm, {\n postprocess: formValue => toValidValues(formValue).fold(err => {\n console.error(err);\n return {};\n }, identity)\n }),\n config('dialog-body-panel', [run$1(focusin(), (comp, se) => {\n comp.getSystem().broadcastOn([dialogFocusShiftedChannel], { newFocus: Optional.some(se.event.target) });\n })])\n ])\n };\n };\n\n const factory$3 = (detail, _spec) => ({\n uid: detail.uid,\n dom: detail.dom,\n components: detail.components,\n events: events$a(detail.action),\n behaviours: augment(detail.tabButtonBehaviours, [\n Focusing.config({}),\n Keying.config({\n mode: 'execution',\n useSpace: true,\n useEnter: true\n }),\n Representing.config({\n store: {\n mode: 'memory',\n initialValue: detail.value\n }\n })\n ]),\n domModification: detail.domModification\n });\n const TabButton = single({\n name: 'TabButton',\n configFields: [\n defaulted('uid', undefined),\n required$1('value'),\n field$1('dom', 'dom', mergeWithThunk(() => ({\n attributes: {\n 'role': 'tab',\n 'id': generate$6('aria'),\n 'aria-selected': 'false'\n }\n })), anyValue()),\n option$3('action'),\n defaulted('domModification', {}),\n field('tabButtonBehaviours', [\n Focusing,\n Keying,\n Representing\n ]),\n required$1('view')\n ],\n factory: factory$3\n });\n\n const schema$1 = constant$1([\n required$1('tabs'),\n required$1('dom'),\n defaulted('clickToDismiss', false),\n field('tabbarBehaviours', [\n Highlighting,\n Keying\n ]),\n markers$1([\n 'tabClass',\n 'selectedClass'\n ])\n ]);\n const tabsPart = group({\n factory: TabButton,\n name: 'tabs',\n unit: 'tab',\n overrides: barDetail => {\n const dismissTab$1 = (tabbar, button) => {\n Highlighting.dehighlight(tabbar, button);\n emitWith(tabbar, dismissTab(), {\n tabbar,\n button\n });\n };\n const changeTab$1 = (tabbar, button) => {\n Highlighting.highlight(tabbar, button);\n emitWith(tabbar, changeTab(), {\n tabbar,\n button\n });\n };\n return {\n action: button => {\n const tabbar = button.getSystem().getByUid(barDetail.uid).getOrDie();\n const activeButton = Highlighting.isHighlighted(tabbar, button);\n const response = (() => {\n if (activeButton && barDetail.clickToDismiss) {\n return dismissTab$1;\n } else if (!activeButton) {\n return changeTab$1;\n } else {\n return noop;\n }\n })();\n response(tabbar, button);\n },\n domModification: { classes: [barDetail.markers.tabClass] }\n };\n }\n });\n const parts$1 = constant$1([tabsPart]);\n\n const factory$2 = (detail, components, _spec, _externals) => ({\n 'uid': detail.uid,\n 'dom': detail.dom,\n components,\n 'debug.sketcher': 'Tabbar',\n 'domModification': { attributes: { role: 'tablist' } },\n 'behaviours': augment(detail.tabbarBehaviours, [\n Highlighting.config({\n highlightClass: detail.markers.selectedClass,\n itemClass: detail.markers.tabClass,\n onHighlight: (tabbar, tab) => {\n set$9(tab.element, 'aria-selected', 'true');\n },\n onDehighlight: (tabbar, tab) => {\n set$9(tab.element, 'aria-selected', 'false');\n }\n }),\n Keying.config({\n mode: 'flow',\n getInitial: tabbar => {\n return Highlighting.getHighlighted(tabbar).map(tab => tab.element);\n },\n selector: '.' + detail.markers.tabClass,\n executeOnMove: true\n })\n ])\n });\n const Tabbar = composite({\n name: 'Tabbar',\n configFields: schema$1(),\n partFields: parts$1(),\n factory: factory$2\n });\n\n const factory$1 = (detail, _spec) => ({\n uid: detail.uid,\n dom: detail.dom,\n behaviours: augment(detail.tabviewBehaviours, [Replacing.config({})]),\n domModification: { attributes: { role: 'tabpanel' } }\n });\n const Tabview = single({\n name: 'Tabview',\n configFields: [field('tabviewBehaviours', [Replacing])],\n factory: factory$1\n });\n\n const schema = constant$1([\n defaulted('selectFirst', true),\n onHandler('onChangeTab'),\n onHandler('onDismissTab'),\n defaulted('tabs', []),\n field('tabSectionBehaviours', [])\n ]);\n const barPart = required({\n factory: Tabbar,\n schema: [\n required$1('dom'),\n requiredObjOf('markers', [\n required$1('tabClass'),\n required$1('selectedClass')\n ])\n ],\n name: 'tabbar',\n defaults: detail => {\n return { tabs: detail.tabs };\n }\n });\n const viewPart = required({\n factory: Tabview,\n name: 'tabview'\n });\n const parts = constant$1([\n barPart,\n viewPart\n ]);\n\n const factory = (detail, components, _spec, _externals) => {\n const changeTab$1 = button => {\n const tabValue = Representing.getValue(button);\n getPart(button, detail, 'tabview').each(tabview => {\n const tabWithValue = find$5(detail.tabs, t => t.value === tabValue);\n tabWithValue.each(tabData => {\n const panel = tabData.view();\n getOpt(button.element, 'id').each(id => {\n set$9(tabview.element, 'aria-labelledby', id);\n });\n Replacing.set(tabview, panel);\n detail.onChangeTab(tabview, button, panel);\n });\n });\n };\n const changeTabBy = (section, byPred) => {\n getPart(section, detail, 'tabbar').each(tabbar => {\n byPred(tabbar).each(emitExecute);\n });\n };\n return {\n uid: detail.uid,\n dom: detail.dom,\n components,\n behaviours: get$3(detail.tabSectionBehaviours),\n events: derive$2(flatten([\n detail.selectFirst ? [runOnAttached((section, _simulatedEvent) => {\n changeTabBy(section, Highlighting.getFirst);\n })] : [],\n [\n run$1(changeTab(), (section, simulatedEvent) => {\n const button = simulatedEvent.event.button;\n changeTab$1(button);\n }),\n run$1(dismissTab(), (section, simulatedEvent) => {\n const button = simulatedEvent.event.button;\n detail.onDismissTab(section, button);\n })\n ]\n ])),\n apis: {\n getViewItems: section => {\n return getPart(section, detail, 'tabview').map(tabview => Replacing.contents(tabview)).getOr([]);\n },\n showTab: (section, tabKey) => {\n const getTabIfNotActive = tabbar => {\n const candidates = Highlighting.getCandidates(tabbar);\n const optTab = find$5(candidates, c => Representing.getValue(c) === tabKey);\n return optTab.filter(tab => !Highlighting.isHighlighted(tabbar, tab));\n };\n changeTabBy(section, getTabIfNotActive);\n }\n }\n };\n };\n const TabSection = composite({\n name: 'TabSection',\n configFields: schema(),\n partFields: parts(),\n factory,\n apis: {\n getViewItems: (apis, component) => apis.getViewItems(component),\n showTab: (apis, component, tabKey) => {\n apis.showTab(component, tabKey);\n }\n }\n });\n\n const measureHeights = (allTabs, tabview, tabviewComp) => map$2(allTabs, (_tab, i) => {\n Replacing.set(tabviewComp, allTabs[i].view());\n const rect = tabview.dom.getBoundingClientRect();\n Replacing.set(tabviewComp, []);\n return rect.height;\n });\n const getMaxHeight = heights => head(sort(heights, (a, b) => {\n if (a > b) {\n return -1;\n } else if (a < b) {\n return +1;\n } else {\n return 0;\n }\n }));\n const getMaxTabviewHeight = (dialog, tabview, tablist) => {\n const documentElement$1 = documentElement(dialog).dom;\n const rootElm = ancestor(dialog, '.tox-dialog-wrap').getOr(dialog);\n const isFixed = get$e(rootElm, 'position') === 'fixed';\n let maxHeight;\n if (isFixed) {\n maxHeight = Math.max(documentElement$1.clientHeight, window.innerHeight);\n } else {\n maxHeight = Math.max(documentElement$1.offsetHeight, documentElement$1.scrollHeight);\n }\n const tabviewHeight = get$d(tabview);\n const isTabListBeside = tabview.dom.offsetLeft >= tablist.dom.offsetLeft + get$c(tablist);\n const currentTabHeight = isTabListBeside ? Math.max(get$d(tablist), tabviewHeight) : tabviewHeight;\n const dialogTopMargin = parseInt(get$e(dialog, 'margin-top'), 10) || 0;\n const dialogBottomMargin = parseInt(get$e(dialog, 'margin-bottom'), 10) || 0;\n const dialogHeight = get$d(dialog) + dialogTopMargin + dialogBottomMargin;\n const chromeHeight = dialogHeight - currentTabHeight;\n return maxHeight - chromeHeight;\n };\n const showTab = (allTabs, comp) => {\n head(allTabs).each(tab => TabSection.showTab(comp, tab.value));\n };\n const setTabviewHeight = (tabview, height) => {\n set$8(tabview, 'height', height + 'px');\n set$8(tabview, 'flex-basis', height + 'px');\n };\n const updateTabviewHeight = (dialogBody, tabview, maxTabHeight) => {\n ancestor(dialogBody, '[role=\"dialog\"]').each(dialog => {\n descendant(dialog, '[role=\"tablist\"]').each(tablist => {\n maxTabHeight.get().map(height => {\n set$8(tabview, 'height', '0');\n set$8(tabview, 'flex-basis', '0');\n return Math.min(height, getMaxTabviewHeight(dialog, tabview, tablist));\n }).each(height => {\n setTabviewHeight(tabview, height);\n });\n });\n });\n };\n const getTabview = dialog => descendant(dialog, '[role=\"tabpanel\"]');\n const smartMode = allTabs => {\n const maxTabHeight = value$2();\n const extraEvents = [\n runOnAttached(comp => {\n const dialog = comp.element;\n getTabview(dialog).each(tabview => {\n set$8(tabview, 'visibility', 'hidden');\n comp.getSystem().getByDom(tabview).toOptional().each(tabviewComp => {\n const heights = measureHeights(allTabs, tabview, tabviewComp);\n const maxTabHeightOpt = getMaxHeight(heights);\n maxTabHeightOpt.fold(maxTabHeight.clear, maxTabHeight.set);\n });\n updateTabviewHeight(dialog, tabview, maxTabHeight);\n remove$6(tabview, 'visibility');\n showTab(allTabs, comp);\n requestAnimationFrame(() => {\n updateTabviewHeight(dialog, tabview, maxTabHeight);\n });\n });\n }),\n run$1(windowResize(), comp => {\n const dialog = comp.element;\n getTabview(dialog).each(tabview => {\n updateTabviewHeight(dialog, tabview, maxTabHeight);\n });\n }),\n run$1(formResizeEvent, (comp, _se) => {\n const dialog = comp.element;\n getTabview(dialog).each(tabview => {\n const oldFocus = active$1(getRootNode(tabview));\n set$8(tabview, 'visibility', 'hidden');\n const oldHeight = getRaw(tabview, 'height').map(h => parseInt(h, 10));\n remove$6(tabview, 'height');\n remove$6(tabview, 'flex-basis');\n const newHeight = tabview.dom.getBoundingClientRect().height;\n const hasGrown = oldHeight.forall(h => newHeight > h);\n if (hasGrown) {\n maxTabHeight.set(newHeight);\n updateTabviewHeight(dialog, tabview, maxTabHeight);\n } else {\n oldHeight.each(h => {\n setTabviewHeight(tabview, h);\n });\n }\n remove$6(tabview, 'visibility');\n oldFocus.each(focus$3);\n });\n })\n ];\n const selectFirst = false;\n return {\n extraEvents,\n selectFirst\n };\n };\n\n const SendDataToSectionChannel = 'send-data-to-section';\n const SendDataToViewChannel = 'send-data-to-view';\n const renderTabPanel = (spec, dialogData, backstage) => {\n const storedValue = Cell({});\n const updateDataWithForm = form => {\n const formData = Representing.getValue(form);\n const validData = toValidValues(formData).getOr({});\n const currentData = storedValue.get();\n const newData = deepMerge(currentData, validData);\n storedValue.set(newData);\n };\n const setDataOnForm = form => {\n const tabData = storedValue.get();\n Representing.setValue(form, tabData);\n };\n const oldTab = Cell(null);\n const allTabs = map$2(spec.tabs, tab => {\n return {\n value: tab.name,\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body-nav-item']\n },\n components: [text$2(backstage.shared.providers.translate(tab.title))],\n view: () => {\n return [Form.sketch(parts => ({\n dom: {\n tag: 'div',\n classes: ['tox-form']\n },\n components: map$2(tab.items, item => interpretInForm(parts, item, dialogData, backstage)),\n formBehaviours: derive$1([\n Keying.config({\n mode: 'acyclic',\n useTabstopAt: not(isPseudoStop)\n }),\n config('TabView.form.events', [\n runOnAttached(setDataOnForm),\n runOnDetached(updateDataWithForm)\n ]),\n Receiving.config({\n channels: wrapAll([\n {\n key: SendDataToSectionChannel,\n value: { onReceive: updateDataWithForm }\n },\n {\n key: SendDataToViewChannel,\n value: { onReceive: setDataOnForm }\n }\n ])\n })\n ])\n }))];\n }\n };\n });\n const tabMode = smartMode(allTabs);\n return TabSection.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body']\n },\n onChangeTab: (section, button, _viewItems) => {\n const name = Representing.getValue(button);\n emitWith(section, formTabChangeEvent, {\n name,\n oldName: oldTab.get()\n });\n oldTab.set(name);\n },\n tabs: allTabs,\n components: [\n TabSection.parts.tabbar({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body-nav']\n },\n components: [Tabbar.parts.tabs({})],\n markers: {\n tabClass: 'tox-tab',\n selectedClass: 'tox-dialog__body-nav-item--active'\n },\n tabbarBehaviours: derive$1([Tabstopping.config({})])\n }),\n TabSection.parts.tabview({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body-content']\n }\n })\n ],\n selectFirst: tabMode.selectFirst,\n tabSectionBehaviours: derive$1([\n config('tabpanel', tabMode.extraEvents),\n Keying.config({ mode: 'acyclic' }),\n Composing.config({ find: comp => head(TabSection.getViewItems(comp)) }),\n withComp(Optional.none(), tsection => {\n tsection.getSystem().broadcastOn([SendDataToSectionChannel], {});\n return storedValue.get();\n }, (tsection, value) => {\n storedValue.set(value);\n tsection.getSystem().broadcastOn([SendDataToViewChannel], {});\n })\n ])\n });\n };\n\n const renderBody = (spec, dialogId, contentId, backstage, ariaAttrs) => {\n const renderComponents = incoming => {\n const body = incoming.body;\n switch (body.type) {\n case 'tabpanel': {\n return [renderTabPanel(body, incoming.initialData, backstage)];\n }\n default: {\n return [renderBodyPanel(body, incoming.initialData, backstage)];\n }\n }\n };\n const updateState = (_comp, incoming) => Optional.some({ isTabPanel: () => incoming.body.type === 'tabpanel' });\n const ariaAttributes = { 'aria-live': 'polite' };\n return {\n dom: {\n tag: 'div',\n classes: ['tox-dialog__content-js'],\n attributes: {\n ...contentId.map(x => ({ id: x })).getOr({}),\n ...ariaAttrs ? ariaAttributes : {}\n }\n },\n components: [],\n behaviours: derive$1([\n ComposingConfigs.childAt(0),\n Reflecting.config({\n channel: `${ bodyChannel }-${ dialogId }`,\n updateState,\n renderComponents,\n initialData: spec\n })\n ])\n };\n };\n const renderInlineBody = (spec, dialogId, contentId, backstage, ariaAttrs) => renderBody(spec, dialogId, Optional.some(contentId), backstage, ariaAttrs);\n const renderModalBody = (spec, dialogId, backstage) => {\n const bodySpec = renderBody(spec, dialogId, Optional.none(), backstage, false);\n return ModalDialog.parts.body(bodySpec);\n };\n const renderIframeBody = spec => {\n const bodySpec = {\n dom: {\n tag: 'div',\n classes: ['tox-dialog__content-js']\n },\n components: [{\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body-iframe']\n },\n components: [craft(Optional.none(), {\n dom: {\n tag: 'iframe',\n attributes: { src: spec.url }\n },\n behaviours: derive$1([\n Tabstopping.config({}),\n Focusing.config({})\n ])\n })]\n }],\n behaviours: derive$1([Keying.config({\n mode: 'acyclic',\n useTabstopAt: not(isPseudoStop)\n })])\n };\n return ModalDialog.parts.body(bodySpec);\n };\n\n const isTouch = global$5.deviceType.isTouch();\n const hiddenHeader = (title, close) => ({\n dom: {\n tag: 'div',\n styles: { display: 'none' },\n classes: ['tox-dialog__header']\n },\n components: [\n title,\n close\n ]\n });\n const pClose = (onClose, providersBackstage) => ModalDialog.parts.close(Button.sketch({\n dom: {\n tag: 'button',\n classes: [\n 'tox-button',\n 'tox-button--icon',\n 'tox-button--naked'\n ],\n attributes: {\n 'type': 'button',\n 'aria-label': providersBackstage.translate('Close')\n }\n },\n action: onClose,\n buttonBehaviours: derive$1([Tabstopping.config({})])\n }));\n const pUntitled = () => ModalDialog.parts.title({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__title'],\n innerHtml: '',\n styles: { display: 'none' }\n }\n });\n const pBodyMessage = (message, providersBackstage) => ModalDialog.parts.body({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body']\n },\n components: [{\n dom: {\n tag: 'div',\n classes: ['tox-dialog__body-content']\n },\n components: [{ dom: fromHtml(`<p>${ sanitizeHtmlString(providersBackstage.translate(message)) }</p>`) }]\n }]\n });\n const pFooter = buttons => ModalDialog.parts.footer({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__footer']\n },\n components: buttons\n });\n const pFooterGroup = (startButtons, endButtons) => [\n Container.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__footer-start']\n },\n components: startButtons\n }),\n Container.sketch({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__footer-end']\n },\n components: endButtons\n })\n ];\n const renderDialog$1 = spec => {\n const dialogClass = 'tox-dialog';\n const blockerClass = dialogClass + '-wrap';\n const blockerBackdropClass = blockerClass + '__backdrop';\n const scrollLockClass = dialogClass + '__disable-scroll';\n return ModalDialog.sketch({\n lazySink: spec.lazySink,\n onEscape: comp => {\n spec.onEscape(comp);\n return Optional.some(true);\n },\n useTabstopAt: elem => !isPseudoStop(elem),\n firstTabstop: spec.firstTabstop,\n dom: {\n tag: 'div',\n classes: [dialogClass].concat(spec.extraClasses),\n styles: {\n position: 'relative',\n ...spec.extraStyles\n }\n },\n components: [\n spec.header,\n spec.body,\n ...spec.footer.toArray()\n ],\n parts: {\n blocker: {\n dom: fromHtml(`<div class=\"${ blockerClass }\"></div>`),\n components: [{\n dom: {\n tag: 'div',\n classes: isTouch ? [\n blockerBackdropClass,\n blockerBackdropClass + '--opaque'\n ] : [blockerBackdropClass]\n }\n }]\n }\n },\n dragBlockClass: blockerClass,\n modalBehaviours: derive$1([\n Focusing.config({}),\n config('dialog-events', spec.dialogEvents.concat([\n runOnSource(focusin(), (comp, _se) => {\n Blocking.isBlocked(comp) ? noop() : Keying.focusIn(comp);\n }),\n run$1(focusShifted(), (comp, se) => {\n comp.getSystem().broadcastOn([dialogFocusShiftedChannel], { newFocus: se.event.newFocus });\n })\n ])),\n config('scroll-lock', [\n runOnAttached(() => {\n add$2(body(), scrollLockClass);\n }),\n runOnDetached(() => {\n remove$2(body(), scrollLockClass);\n })\n ]),\n ...spec.extraBehaviours\n ]),\n eventOrder: {\n [execute$5()]: ['dialog-events'],\n [attachedToDom()]: [\n 'scroll-lock',\n 'dialog-events',\n 'alloy.base.behaviour'\n ],\n [detachedFromDom()]: [\n 'alloy.base.behaviour',\n 'dialog-events',\n 'scroll-lock'\n ],\n ...spec.eventOrder\n }\n });\n };\n\n const renderClose = providersBackstage => Button.sketch({\n dom: {\n tag: 'button',\n classes: [\n 'tox-button',\n 'tox-button--icon',\n 'tox-button--naked'\n ],\n attributes: {\n 'type': 'button',\n 'aria-label': providersBackstage.translate('Close'),\n 'title': providersBackstage.translate('Close')\n }\n },\n buttonBehaviours: derive$1([Tabstopping.config({})]),\n components: [render$3('close', {\n tag: 'span',\n classes: ['tox-icon']\n }, providersBackstage.icons)],\n action: comp => {\n emit(comp, formCancelEvent);\n }\n });\n const renderTitle = (spec, dialogId, titleId, providersBackstage) => {\n const renderComponents = data => [text$2(providersBackstage.translate(data.title))];\n return {\n dom: {\n tag: 'div',\n classes: ['tox-dialog__title'],\n attributes: { ...titleId.map(x => ({ id: x })).getOr({}) }\n },\n components: [],\n behaviours: derive$1([Reflecting.config({\n channel: `${ titleChannel }-${ dialogId }`,\n initialData: spec,\n renderComponents\n })])\n };\n };\n const renderDragHandle = () => ({ dom: fromHtml('<div class=\"tox-dialog__draghandle\"></div>') });\n const renderInlineHeader = (spec, dialogId, titleId, providersBackstage) => Container.sketch({\n dom: fromHtml('<div class=\"tox-dialog__header\"></div>'),\n components: [\n renderTitle(spec, dialogId, Optional.some(titleId), providersBackstage),\n renderDragHandle(),\n renderClose(providersBackstage)\n ],\n containerBehaviours: derive$1([Dragging.config({\n mode: 'mouse',\n blockerClass: 'blocker',\n getTarget: handle => {\n return closest$1(handle, '[role=\"dialog\"]').getOrDie();\n },\n snaps: {\n getSnapPoints: () => [],\n leftAttr: 'data-drag-left',\n topAttr: 'data-drag-top'\n }\n })])\n });\n const renderModalHeader = (spec, dialogId, providersBackstage) => {\n const pTitle = ModalDialog.parts.title(renderTitle(spec, dialogId, Optional.none(), providersBackstage));\n const pHandle = ModalDialog.parts.draghandle(renderDragHandle());\n const pClose = ModalDialog.parts.close(renderClose(providersBackstage));\n const components = [pTitle].concat(spec.draggable ? [pHandle] : []).concat([pClose]);\n return Container.sketch({\n dom: fromHtml('<div class=\"tox-dialog__header\"></div>'),\n components\n });\n };\n\n const getHeader = (title, dialogId, backstage) => renderModalHeader({\n title: backstage.shared.providers.translate(title),\n draggable: backstage.dialog.isDraggableModal()\n }, dialogId, backstage.shared.providers);\n const getBusySpec = (message, bs, providers, headerHeight) => ({\n dom: {\n tag: 'div',\n classes: ['tox-dialog__busy-spinner'],\n attributes: { 'aria-label': providers.translate(message) },\n styles: {\n left: '0px',\n right: '0px',\n bottom: '0px',\n top: `${ headerHeight.getOr(0) }px`,\n position: 'absolute'\n }\n },\n behaviours: bs,\n components: [{ dom: fromHtml('<div class=\"tox-spinner\"><div></div><div></div><div></div></div>') }]\n });\n const getEventExtras = (lazyDialog, providers, extra) => ({\n onClose: () => extra.closeWindow(),\n onBlock: blockEvent => {\n const headerHeight = descendant(lazyDialog().element, '.tox-dialog__header').map(header => get$d(header));\n ModalDialog.setBusy(lazyDialog(), (_comp, bs) => getBusySpec(blockEvent.message, bs, providers, headerHeight));\n },\n onUnblock: () => {\n ModalDialog.setIdle(lazyDialog());\n }\n });\n const fullscreenClass = 'tox-dialog--fullscreen';\n const largeDialogClass = 'tox-dialog--width-lg';\n const mediumDialogClass = 'tox-dialog--width-md';\n const getDialogSizeClass = size => {\n switch (size) {\n case 'large':\n return Optional.some(largeDialogClass);\n case 'medium':\n return Optional.some(mediumDialogClass);\n default:\n return Optional.none();\n }\n };\n const updateDialogSizeClass = (size, component) => {\n const dialogBody = SugarElement.fromDom(component.element.dom);\n if (!has(dialogBody, fullscreenClass)) {\n remove$1(dialogBody, [\n largeDialogClass,\n mediumDialogClass\n ]);\n getDialogSizeClass(size).each(dialogSizeClass => add$2(dialogBody, dialogSizeClass));\n }\n };\n const toggleFullscreen = (comp, currentSize) => {\n const dialogBody = SugarElement.fromDom(comp.element.dom);\n const classes = get$7(dialogBody);\n const currentSizeClass = find$5(classes, c => c === largeDialogClass || c === mediumDialogClass).or(getDialogSizeClass(currentSize));\n toggle$3(dialogBody, [\n fullscreenClass,\n ...currentSizeClass.toArray()\n ]);\n };\n const renderModalDialog = (spec, dialogEvents, backstage) => build$1(renderDialog$1({\n ...spec,\n firstTabstop: 1,\n lazySink: backstage.shared.getSink,\n extraBehaviours: [\n memory({}),\n ...spec.extraBehaviours\n ],\n onEscape: comp => {\n emit(comp, formCancelEvent);\n },\n dialogEvents,\n eventOrder: {\n [receive()]: [\n Reflecting.name(),\n Receiving.name()\n ],\n [attachedToDom()]: [\n 'scroll-lock',\n Reflecting.name(),\n 'messages',\n 'dialog-events',\n 'alloy.base.behaviour'\n ],\n [detachedFromDom()]: [\n 'alloy.base.behaviour',\n 'dialog-events',\n 'messages',\n Reflecting.name(),\n 'scroll-lock'\n ]\n }\n }));\n const mapMenuButtons = (buttons, menuItemStates = {}) => {\n const mapItems = button => {\n const items = map$2(button.items, item => {\n const cell = get$g(menuItemStates, item.name).getOr(Cell(false));\n return {\n ...item,\n storage: cell\n };\n });\n return {\n ...button,\n items\n };\n };\n return map$2(buttons, button => {\n return button.type === 'menu' ? mapItems(button) : button;\n });\n };\n const extractCellsToObject = buttons => foldl(buttons, (acc, button) => {\n if (button.type === 'menu') {\n const menuButton = button;\n return foldl(menuButton.items, (innerAcc, item) => {\n innerAcc[item.name] = item.storage;\n return innerAcc;\n }, acc);\n }\n return acc;\n }, {});\n\n const initCommonEvents = (fireApiEvent, extras) => [\n runWithTarget(focusin(), onFocus),\n fireApiEvent(formCloseEvent, (_api, spec, _event, self) => {\n active$1(getRootNode(self.element)).fold(noop, blur$1);\n extras.onClose();\n spec.onClose();\n }),\n fireApiEvent(formCancelEvent, (api, spec, _event, self) => {\n spec.onCancel(api);\n emit(self, formCloseEvent);\n }),\n run$1(formUnblockEvent, (_c, _se) => extras.onUnblock()),\n run$1(formBlockEvent, (_c, se) => extras.onBlock(se.event))\n ];\n const initUrlDialog = (getInstanceApi, extras) => {\n const fireApiEvent = (eventName, f) => run$1(eventName, (c, se) => {\n withSpec(c, (spec, _c) => {\n f(getInstanceApi(), spec, se.event, c);\n });\n });\n const withSpec = (c, f) => {\n Reflecting.getState(c).get().each(currentDialog => {\n f(currentDialog, c);\n });\n };\n return [\n ...initCommonEvents(fireApiEvent, extras),\n fireApiEvent(formActionEvent, (api, spec, event) => {\n spec.onAction(api, { name: event.name });\n })\n ];\n };\n const initDialog = (getInstanceApi, extras, getSink) => {\n const fireApiEvent = (eventName, f) => run$1(eventName, (c, se) => {\n withSpec(c, (spec, _c) => {\n f(getInstanceApi(), spec, se.event, c);\n });\n });\n const withSpec = (c, f) => {\n Reflecting.getState(c).get().each(currentDialogInit => {\n f(currentDialogInit.internalDialog, c);\n });\n };\n return [\n ...initCommonEvents(fireApiEvent, extras),\n fireApiEvent(formSubmitEvent, (api, spec) => spec.onSubmit(api)),\n fireApiEvent(formChangeEvent, (api, spec, event) => {\n spec.onChange(api, { name: event.name });\n }),\n fireApiEvent(formActionEvent, (api, spec, event, component) => {\n const focusIn = () => component.getSystem().isConnected() ? Keying.focusIn(component) : undefined;\n const isDisabled = focused => has$1(focused, 'disabled') || getOpt(focused, 'aria-disabled').exists(val => val === 'true');\n const rootNode = getRootNode(component.element);\n const current = active$1(rootNode);\n spec.onAction(api, {\n name: event.name,\n value: event.value\n });\n active$1(rootNode).fold(focusIn, focused => {\n if (isDisabled(focused)) {\n focusIn();\n } else if (current.exists(cur => contains(focused, cur) && isDisabled(cur))) {\n focusIn();\n } else {\n getSink().toOptional().filter(sink => !contains(sink.element, focused)).each(focusIn);\n }\n });\n }),\n fireApiEvent(formTabChangeEvent, (api, spec, event) => {\n spec.onTabChange(api, {\n newTabName: event.name,\n oldTabName: event.oldName\n });\n }),\n runOnDetached(component => {\n const api = getInstanceApi();\n Representing.setValue(component, api.getData());\n })\n ];\n };\n\n const makeButton = (button, backstage) => renderFooterButton(button, button.type, backstage);\n const lookup = (compInSystem, footerButtons, buttonName) => find$5(footerButtons, button => button.name === buttonName).bind(memButton => memButton.memento.getOpt(compInSystem));\n const renderComponents = (_data, state) => {\n const footerButtons = state.map(s => s.footerButtons).getOr([]);\n const buttonGroups = partition$3(footerButtons, button => button.align === 'start');\n const makeGroup = (edge, buttons) => Container.sketch({\n dom: {\n tag: 'div',\n classes: [`tox-dialog__footer-${ edge }`]\n },\n components: map$2(buttons, button => button.memento.asSpec())\n });\n const startButtons = makeGroup('start', buttonGroups.pass);\n const endButtons = makeGroup('end', buttonGroups.fail);\n return [\n startButtons,\n endButtons\n ];\n };\n const renderFooter = (initSpec, dialogId, backstage) => {\n const updateState = (comp, data) => {\n const footerButtons = map$2(data.buttons, button => {\n const memButton = record(makeButton(button, backstage));\n return {\n name: button.name,\n align: button.align,\n memento: memButton\n };\n });\n const lookupByName = buttonName => lookup(comp, footerButtons, buttonName);\n return Optional.some({\n lookupByName,\n footerButtons\n });\n };\n return {\n dom: fromHtml('<div class=\"tox-dialog__footer\"></div>'),\n components: [],\n behaviours: derive$1([Reflecting.config({\n channel: `${ footerChannel }-${ dialogId }`,\n initialData: initSpec,\n updateState,\n renderComponents\n })])\n };\n };\n const renderInlineFooter = (initSpec, dialogId, backstage) => renderFooter(initSpec, dialogId, backstage);\n const renderModalFooter = (initSpec, dialogId, backstage) => ModalDialog.parts.footer(renderFooter(initSpec, dialogId, backstage));\n\n const getCompByName = (access, name) => {\n const root = access.getRoot();\n if (root.getSystem().isConnected()) {\n const form = Composing.getCurrent(access.getFormWrapper()).getOr(access.getFormWrapper());\n return Form.getField(form, name).orThunk(() => {\n const footer = access.getFooter();\n const footerState = footer.bind(f => Reflecting.getState(f).get());\n return footerState.bind(f => f.lookupByName(name));\n });\n } else {\n return Optional.none();\n }\n };\n const validateData$1 = (access, data) => {\n const root = access.getRoot();\n return Reflecting.getState(root).get().map(dialogState => getOrDie(asRaw('data', dialogState.dataValidator, data))).getOr(data);\n };\n const getDialogApi = (access, doRedial, menuItemStates) => {\n const withRoot = f => {\n const root = access.getRoot();\n if (root.getSystem().isConnected()) {\n f(root);\n }\n };\n const getData = () => {\n const root = access.getRoot();\n const valueComp = root.getSystem().isConnected() ? access.getFormWrapper() : root;\n const representedValues = Representing.getValue(valueComp);\n const menuItemCurrentState = map$1(menuItemStates, cell => cell.get());\n return {\n ...representedValues,\n ...menuItemCurrentState\n };\n };\n const setData = newData => {\n withRoot(_ => {\n const prevData = instanceApi.getData();\n const mergedData = deepMerge(prevData, newData);\n const newInternalData = validateData$1(access, mergedData);\n const form = access.getFormWrapper();\n Representing.setValue(form, newInternalData);\n each(menuItemStates, (v, k) => {\n if (has$2(mergedData, k)) {\n v.set(mergedData[k]);\n }\n });\n });\n };\n const setEnabled = (name, state) => {\n getCompByName(access, name).each(state ? Disabling.enable : Disabling.disable);\n };\n const focus = name => {\n getCompByName(access, name).each(Focusing.focus);\n };\n const block = message => {\n if (!isString(message)) {\n throw new Error('The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument');\n }\n withRoot(root => {\n emitWith(root, formBlockEvent, { message });\n });\n };\n const unblock = () => {\n withRoot(root => {\n emit(root, formUnblockEvent);\n });\n };\n const showTab = name => {\n withRoot(_ => {\n const body = access.getBody();\n const bodyState = Reflecting.getState(body);\n if (bodyState.get().exists(b => b.isTabPanel())) {\n Composing.getCurrent(body).each(tabSection => {\n TabSection.showTab(tabSection, name);\n });\n }\n });\n };\n const redial = d => {\n withRoot(root => {\n const id = access.getId();\n const dialogInit = doRedial(d);\n const storedMenuButtons = mapMenuButtons(dialogInit.internalDialog.buttons, menuItemStates);\n root.getSystem().broadcastOn([`${ dialogChannel }-${ id }`], dialogInit);\n root.getSystem().broadcastOn([`${ titleChannel }-${ id }`], dialogInit.internalDialog);\n root.getSystem().broadcastOn([`${ bodyChannel }-${ id }`], dialogInit.internalDialog);\n root.getSystem().broadcastOn([`${ footerChannel }-${ id }`], {\n ...dialogInit.internalDialog,\n buttons: storedMenuButtons\n });\n instanceApi.setData(dialogInit.initialData);\n });\n };\n const close = () => {\n withRoot(root => {\n emit(root, formCloseEvent);\n });\n };\n const instanceApi = {\n getData,\n setData,\n setEnabled,\n focus,\n block,\n unblock,\n showTab,\n redial,\n close,\n toggleFullscreen: access.toggleFullscreen\n };\n return instanceApi;\n };\n\n const renderDialog = (dialogInit, extra, backstage) => {\n const dialogId = generate$6('dialog');\n const internalDialog = dialogInit.internalDialog;\n const header = getHeader(internalDialog.title, dialogId, backstage);\n const dialogSize = Cell(internalDialog.size);\n const dialogSizeClasses = getDialogSizeClass(dialogSize.get()).toArray();\n const updateState = (comp, incoming) => {\n dialogSize.set(incoming.internalDialog.size);\n updateDialogSizeClass(incoming.internalDialog.size, comp);\n return Optional.some(incoming);\n };\n const body = renderModalBody({\n body: internalDialog.body,\n initialData: internalDialog.initialData\n }, dialogId, backstage);\n const storedMenuButtons = mapMenuButtons(internalDialog.buttons);\n const objOfCells = extractCellsToObject(storedMenuButtons);\n const footer = someIf(storedMenuButtons.length !== 0, renderModalFooter({ buttons: storedMenuButtons }, dialogId, backstage));\n const dialogEvents = initDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra), backstage.shared.getSink);\n const spec = {\n id: dialogId,\n header,\n body,\n footer,\n extraClasses: dialogSizeClasses,\n extraBehaviours: [Reflecting.config({\n channel: `${ dialogChannel }-${ dialogId }`,\n updateState,\n initialData: dialogInit\n })],\n extraStyles: {}\n };\n const dialog = renderModalDialog(spec, dialogEvents, backstage);\n const modalAccess = (() => {\n const getForm = () => {\n const outerForm = ModalDialog.getBody(dialog);\n return Composing.getCurrent(outerForm).getOr(outerForm);\n };\n const toggleFullscreen$1 = () => {\n toggleFullscreen(dialog, dialogSize.get());\n };\n return {\n getId: constant$1(dialogId),\n getRoot: constant$1(dialog),\n getBody: () => ModalDialog.getBody(dialog),\n getFooter: () => ModalDialog.getFooter(dialog),\n getFormWrapper: getForm,\n toggleFullscreen: toggleFullscreen$1\n };\n })();\n const instanceApi = getDialogApi(modalAccess, extra.redial, objOfCells);\n return {\n dialog,\n instanceApi\n };\n };\n\n const renderInlineDialog = (dialogInit, extra, backstage, ariaAttrs = false, refreshDocking) => {\n const dialogId = generate$6('dialog');\n const dialogLabelId = generate$6('dialog-label');\n const dialogContentId = generate$6('dialog-content');\n const internalDialog = dialogInit.internalDialog;\n const dialogSize = Cell(internalDialog.size);\n const dialogSizeClass = getDialogSizeClass(dialogSize.get()).toArray();\n const updateState = (comp, incoming) => {\n dialogSize.set(incoming.internalDialog.size);\n updateDialogSizeClass(incoming.internalDialog.size, comp);\n refreshDocking();\n return Optional.some(incoming);\n };\n const memHeader = record(renderInlineHeader({\n title: internalDialog.title,\n draggable: true\n }, dialogId, dialogLabelId, backstage.shared.providers));\n const memBody = record(renderInlineBody({\n body: internalDialog.body,\n initialData: internalDialog.initialData\n }, dialogId, dialogContentId, backstage, ariaAttrs));\n const storagedMenuButtons = mapMenuButtons(internalDialog.buttons);\n const objOfCells = extractCellsToObject(storagedMenuButtons);\n const optMemFooter = someIf(storagedMenuButtons.length !== 0, record(renderInlineFooter({ buttons: storagedMenuButtons }, dialogId, backstage)));\n const dialogEvents = initDialog(() => instanceApi, {\n onBlock: event => {\n Blocking.block(dialog, (_comp, bs) => {\n const headerHeight = memHeader.getOpt(dialog).map(dialog => get$d(dialog.element));\n return getBusySpec(event.message, bs, backstage.shared.providers, headerHeight);\n });\n },\n onUnblock: () => {\n Blocking.unblock(dialog);\n },\n onClose: () => extra.closeWindow()\n }, backstage.shared.getSink);\n const inlineClass = 'tox-dialog-inline';\n const dialog = build$1({\n dom: {\n tag: 'div',\n classes: [\n 'tox-dialog',\n inlineClass,\n ...dialogSizeClass\n ],\n attributes: {\n role: 'dialog',\n ['aria-labelledby']: dialogLabelId\n }\n },\n eventOrder: {\n [receive()]: [\n Reflecting.name(),\n Receiving.name()\n ],\n [execute$5()]: ['execute-on-form'],\n [attachedToDom()]: [\n 'reflecting',\n 'execute-on-form'\n ]\n },\n behaviours: derive$1([\n Keying.config({\n mode: 'cyclic',\n onEscape: c => {\n emit(c, formCloseEvent);\n return Optional.some(true);\n },\n useTabstopAt: elem => !isPseudoStop(elem) && (name$3(elem) !== 'button' || get$f(elem, 'disabled') !== 'disabled'),\n firstTabstop: 1\n }),\n Reflecting.config({\n channel: `${ dialogChannel }-${ dialogId }`,\n updateState,\n initialData: dialogInit\n }),\n Focusing.config({}),\n config('execute-on-form', dialogEvents.concat([\n runOnSource(focusin(), (comp, _se) => {\n Keying.focusIn(comp);\n }),\n run$1(focusShifted(), (comp, se) => {\n comp.getSystem().broadcastOn([dialogFocusShiftedChannel], { newFocus: se.event.newFocus });\n })\n ])),\n Blocking.config({ getRoot: () => Optional.some(dialog) }),\n Replacing.config({}),\n memory({})\n ]),\n components: [\n memHeader.asSpec(),\n memBody.asSpec(),\n ...optMemFooter.map(memFooter => memFooter.asSpec()).toArray()\n ]\n });\n const toggleFullscreen$1 = () => {\n toggleFullscreen(dialog, dialogSize.get());\n };\n const instanceApi = getDialogApi({\n getId: constant$1(dialogId),\n getRoot: constant$1(dialog),\n getFooter: () => optMemFooter.map(memFooter => memFooter.get(dialog)),\n getBody: () => memBody.get(dialog),\n getFormWrapper: () => {\n const body = memBody.get(dialog);\n return Composing.getCurrent(body).getOr(body);\n },\n toggleFullscreen: toggleFullscreen$1\n }, extra.redial, objOfCells);\n return {\n dialog,\n instanceApi\n };\n };\n\n var global = tinymce.util.Tools.resolve('tinymce.util.URI');\n\n const getUrlDialogApi = root => {\n const withRoot = f => {\n if (root.getSystem().isConnected()) {\n f(root);\n }\n };\n const block = message => {\n if (!isString(message)) {\n throw new Error('The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument');\n }\n withRoot(root => {\n emitWith(root, formBlockEvent, { message });\n });\n };\n const unblock = () => {\n withRoot(root => {\n emit(root, formUnblockEvent);\n });\n };\n const close = () => {\n withRoot(root => {\n emit(root, formCloseEvent);\n });\n };\n const sendMessage = data => {\n withRoot(root => {\n root.getSystem().broadcastOn([bodySendMessageChannel], data);\n });\n };\n return {\n block,\n unblock,\n close,\n sendMessage\n };\n };\n\n const SUPPORTED_MESSAGE_ACTIONS = [\n 'insertContent',\n 'setContent',\n 'execCommand',\n 'close',\n 'block',\n 'unblock'\n ];\n const isSupportedMessage = data => isObject(data) && SUPPORTED_MESSAGE_ACTIONS.indexOf(data.mceAction) !== -1;\n const isCustomMessage = data => !isSupportedMessage(data) && isObject(data) && has$2(data, 'mceAction');\n const handleMessage = (editor, api, data) => {\n switch (data.mceAction) {\n case 'insertContent':\n editor.insertContent(data.content);\n break;\n case 'setContent':\n editor.setContent(data.content);\n break;\n case 'execCommand':\n const ui = isBoolean(data.ui) ? data.ui : false;\n editor.execCommand(data.cmd, ui, data.value);\n break;\n case 'close':\n api.close();\n break;\n case 'block':\n api.block(data.message);\n break;\n case 'unblock':\n api.unblock();\n break;\n }\n };\n const renderUrlDialog = (internalDialog, extra, editor, backstage) => {\n const dialogId = generate$6('dialog');\n const header = getHeader(internalDialog.title, dialogId, backstage);\n const body = renderIframeBody(internalDialog);\n const footer = internalDialog.buttons.bind(buttons => {\n if (buttons.length === 0) {\n return Optional.none();\n } else {\n return Optional.some(renderModalFooter({ buttons }, dialogId, backstage));\n }\n });\n const dialogEvents = initUrlDialog(() => instanceApi, getEventExtras(() => dialog, backstage.shared.providers, extra));\n const styles = {\n ...internalDialog.height.fold(() => ({}), height => ({\n 'height': height + 'px',\n 'max-height': height + 'px'\n })),\n ...internalDialog.width.fold(() => ({}), width => ({\n 'width': width + 'px',\n 'max-width': width + 'px'\n }))\n };\n const classes = internalDialog.width.isNone() && internalDialog.height.isNone() ? ['tox-dialog--width-lg'] : [];\n const iframeUri = new global(internalDialog.url, { base_uri: new global(window.location.href) });\n const iframeDomain = `${ iframeUri.protocol }://${ iframeUri.host }${ iframeUri.port ? ':' + iframeUri.port : '' }`;\n const messageHandlerUnbinder = unbindable();\n const updateState = (_comp, incoming) => Optional.some(incoming);\n const extraBehaviours = [\n Reflecting.config({\n channel: `${ dialogChannel }-${ dialogId }`,\n updateState,\n initialData: internalDialog\n }),\n config('messages', [\n runOnAttached(() => {\n const unbind = bind(SugarElement.fromDom(window), 'message', e => {\n if (iframeUri.isSameOrigin(new global(e.raw.origin))) {\n const data = e.raw.data;\n if (isSupportedMessage(data)) {\n handleMessage(editor, instanceApi, data);\n } else if (isCustomMessage(data)) {\n internalDialog.onMessage(instanceApi, data);\n }\n }\n });\n messageHandlerUnbinder.set(unbind);\n }),\n runOnDetached(messageHandlerUnbinder.clear)\n ]),\n Receiving.config({\n channels: {\n [bodySendMessageChannel]: {\n onReceive: (comp, data) => {\n descendant(comp.element, 'iframe').each(iframeEle => {\n const iframeWin = iframeEle.dom.contentWindow;\n if (isNonNullable(iframeWin)) {\n iframeWin.postMessage(data, iframeDomain);\n }\n });\n }\n }\n }\n })\n ];\n const spec = {\n id: dialogId,\n header,\n body,\n footer,\n extraClasses: classes,\n extraBehaviours,\n extraStyles: styles\n };\n const dialog = renderModalDialog(spec, dialogEvents, backstage);\n const instanceApi = getUrlDialogApi(dialog);\n return {\n dialog,\n instanceApi\n };\n };\n\n const setup$2 = backstage => {\n const sharedBackstage = backstage.shared;\n const open = (message, callback) => {\n const closeDialog = () => {\n ModalDialog.hide(alertDialog);\n callback();\n };\n const memFooterClose = record(renderFooterButton({\n name: 'close-alert',\n text: 'OK',\n primary: true,\n buttonType: Optional.some('primary'),\n align: 'end',\n enabled: true,\n icon: Optional.none()\n }, 'cancel', backstage));\n const titleSpec = pUntitled();\n const closeSpec = pClose(closeDialog, sharedBackstage.providers);\n const alertDialog = build$1(renderDialog$1({\n lazySink: () => sharedBackstage.getSink(),\n header: hiddenHeader(titleSpec, closeSpec),\n body: pBodyMessage(message, sharedBackstage.providers),\n footer: Optional.some(pFooter(pFooterGroup([], [memFooterClose.asSpec()]))),\n onEscape: closeDialog,\n extraClasses: ['tox-alert-dialog'],\n extraBehaviours: [],\n extraStyles: {},\n dialogEvents: [run$1(formCancelEvent, closeDialog)],\n eventOrder: {}\n }));\n ModalDialog.show(alertDialog);\n const footerCloseButton = memFooterClose.get(alertDialog);\n Focusing.focus(footerCloseButton);\n };\n return { open };\n };\n\n const setup$1 = backstage => {\n const sharedBackstage = backstage.shared;\n const open = (message, callback) => {\n const closeDialog = state => {\n ModalDialog.hide(confirmDialog);\n callback(state);\n };\n const memFooterYes = record(renderFooterButton({\n name: 'yes',\n text: 'Yes',\n primary: true,\n buttonType: Optional.some('primary'),\n align: 'end',\n enabled: true,\n icon: Optional.none()\n }, 'submit', backstage));\n const footerNo = renderFooterButton({\n name: 'no',\n text: 'No',\n primary: false,\n buttonType: Optional.some('secondary'),\n align: 'end',\n enabled: true,\n icon: Optional.none()\n }, 'cancel', backstage);\n const titleSpec = pUntitled();\n const closeSpec = pClose(() => closeDialog(false), sharedBackstage.providers);\n const confirmDialog = build$1(renderDialog$1({\n lazySink: () => sharedBackstage.getSink(),\n header: hiddenHeader(titleSpec, closeSpec),\n body: pBodyMessage(message, sharedBackstage.providers),\n footer: Optional.some(pFooter(pFooterGroup([], [\n footerNo,\n memFooterYes.asSpec()\n ]))),\n onEscape: () => closeDialog(false),\n extraClasses: ['tox-confirm-dialog'],\n extraBehaviours: [],\n extraStyles: {},\n dialogEvents: [\n run$1(formCancelEvent, () => closeDialog(false)),\n run$1(formSubmitEvent, () => closeDialog(true))\n ],\n eventOrder: {}\n }));\n ModalDialog.show(confirmDialog);\n const footerYesButton = memFooterYes.get(confirmDialog);\n Focusing.focus(footerYesButton);\n };\n return { open };\n };\n\n const validateData = (data, validator) => getOrDie(asRaw('data', validator, data));\n const isAlertOrConfirmDialog = target => closest(target, '.tox-alert-dialog') || closest(target, '.tox-confirm-dialog');\n const inlineAdditionalBehaviours = (editor, isStickyToolbar, isToolbarLocationTop) => {\n if (isStickyToolbar && isToolbarLocationTop) {\n return [];\n } else {\n return [Docking.config({\n contextual: {\n lazyContext: () => Optional.some(box$1(SugarElement.fromDom(editor.getContentAreaContainer()))),\n fadeInClass: 'tox-dialog-dock-fadein',\n fadeOutClass: 'tox-dialog-dock-fadeout',\n transitionClass: 'tox-dialog-dock-transition'\n },\n modes: ['top'],\n lazyViewport: comp => {\n const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n return optScrollingContext.map(sc => {\n const combinedBounds = getBoundsFrom(sc);\n return {\n bounds: combinedBounds,\n optScrollEnv: Optional.some({\n currentScrollTop: sc.element.dom.scrollTop,\n scrollElmTop: absolute$3(sc.element).top\n })\n };\n }).getOrThunk(() => ({\n bounds: win(),\n optScrollEnv: Optional.none()\n }));\n }\n })];\n }\n };\n const setup = extras => {\n const editor = extras.editor;\n const isStickyToolbar$1 = isStickyToolbar(editor);\n const alertDialog = setup$2(extras.backstages.dialog);\n const confirmDialog = setup$1(extras.backstages.dialog);\n const open = (config, params, closeWindow) => {\n if (!isUndefined(params)) {\n if (params.inline === 'toolbar') {\n return openInlineDialog(config, extras.backstages.popup.shared.anchors.inlineDialog(), closeWindow, params);\n } else if (params.inline === 'bottom') {\n return openBottomInlineDialog(config, extras.backstages.popup.shared.anchors.inlineBottomDialog(), closeWindow, params);\n } else if (params.inline === 'cursor') {\n return openInlineDialog(config, extras.backstages.popup.shared.anchors.cursor(), closeWindow, params);\n }\n }\n return openModalDialog(config, closeWindow);\n };\n const openUrl = (config, closeWindow) => openModalUrlDialog(config, closeWindow);\n const openModalUrlDialog = (config, closeWindow) => {\n const factory = contents => {\n const dialog = renderUrlDialog(contents, {\n closeWindow: () => {\n ModalDialog.hide(dialog.dialog);\n closeWindow(dialog.instanceApi);\n }\n }, editor, extras.backstages.dialog);\n ModalDialog.show(dialog.dialog);\n return dialog.instanceApi;\n };\n return DialogManager.openUrl(factory, config);\n };\n const openModalDialog = (config, closeWindow) => {\n const factory = (contents, internalInitialData, dataValidator) => {\n const initialData = internalInitialData;\n const dialogInit = {\n dataValidator,\n initialData,\n internalDialog: contents\n };\n const dialog = renderDialog(dialogInit, {\n redial: DialogManager.redial,\n closeWindow: () => {\n ModalDialog.hide(dialog.dialog);\n closeWindow(dialog.instanceApi);\n }\n }, extras.backstages.dialog);\n ModalDialog.show(dialog.dialog);\n dialog.instanceApi.setData(initialData);\n return dialog.instanceApi;\n };\n return DialogManager.open(factory, config);\n };\n const openInlineDialog = (config$1, anchor, closeWindow, windowParams) => {\n const factory = (contents, internalInitialData, dataValidator) => {\n const initialData = validateData(internalInitialData, dataValidator);\n const inlineDialog = value$2();\n const isToolbarLocationTop = extras.backstages.popup.shared.header.isPositionedAtTop();\n const dialogInit = {\n dataValidator,\n initialData,\n internalDialog: contents\n };\n const refreshDocking = () => inlineDialog.on(dialog => {\n InlineView.reposition(dialog);\n if (!isStickyToolbar$1 || !isToolbarLocationTop) {\n Docking.refresh(dialog);\n }\n });\n const dialogUi = renderInlineDialog(dialogInit, {\n redial: DialogManager.redial,\n closeWindow: () => {\n inlineDialog.on(InlineView.hide);\n editor.off('ResizeEditor', refreshDocking);\n inlineDialog.clear();\n closeWindow(dialogUi.instanceApi);\n }\n }, extras.backstages.popup, windowParams.ariaAttrs, refreshDocking);\n const inlineDialogComp = build$1(InlineView.sketch({\n lazySink: extras.backstages.popup.shared.getSink,\n dom: {\n tag: 'div',\n classes: []\n },\n fireDismissalEventInstead: windowParams.persistent ? { event: 'doNotDismissYet' } : {},\n ...isToolbarLocationTop ? {} : { fireRepositionEventInstead: {} },\n inlineBehaviours: derive$1([\n config('window-manager-inline-events', [run$1(dismissRequested(), (_comp, _se) => {\n emit(dialogUi.dialog, formCancelEvent);\n })]),\n ...inlineAdditionalBehaviours(editor, isStickyToolbar$1, isToolbarLocationTop)\n ]),\n isExtraPart: (_comp, target) => isAlertOrConfirmDialog(target)\n }));\n inlineDialog.set(inlineDialogComp);\n const getInlineDialogBounds = () => {\n const elem = editor.inline ? body() : SugarElement.fromDom(editor.getContainer());\n const bounds = box$1(elem);\n return Optional.some(bounds);\n };\n InlineView.showWithinBounds(inlineDialogComp, premade(dialogUi.dialog), { anchor }, getInlineDialogBounds);\n if (!isStickyToolbar$1 || !isToolbarLocationTop) {\n Docking.refresh(inlineDialogComp);\n editor.on('ResizeEditor', refreshDocking);\n }\n dialogUi.instanceApi.setData(initialData);\n Keying.focusIn(dialogUi.dialog);\n return dialogUi.instanceApi;\n };\n return DialogManager.open(factory, config$1);\n };\n const openBottomInlineDialog = (config$1, anchor, closeWindow, windowParams) => {\n const factory = (contents, internalInitialData, dataValidator) => {\n const initialData = validateData(internalInitialData, dataValidator);\n const inlineDialog = value$2();\n const isToolbarLocationTop = extras.backstages.popup.shared.header.isPositionedAtTop();\n const dialogInit = {\n dataValidator,\n initialData,\n internalDialog: contents\n };\n const refreshDocking = () => inlineDialog.on(dialog => {\n InlineView.reposition(dialog);\n Docking.refresh(dialog);\n });\n const dialogUi = renderInlineDialog(dialogInit, {\n redial: DialogManager.redial,\n closeWindow: () => {\n inlineDialog.on(InlineView.hide);\n editor.off('ResizeEditor ScrollWindow ElementScroll', refreshDocking);\n inlineDialog.clear();\n closeWindow(dialogUi.instanceApi);\n }\n }, extras.backstages.popup, windowParams.ariaAttrs, refreshDocking);\n const inlineDialogComp = build$1(InlineView.sketch({\n lazySink: extras.backstages.popup.shared.getSink,\n dom: {\n tag: 'div',\n classes: []\n },\n fireDismissalEventInstead: windowParams.persistent ? { event: 'doNotDismissYet' } : {},\n ...isToolbarLocationTop ? {} : { fireRepositionEventInstead: {} },\n inlineBehaviours: derive$1([\n config('window-manager-inline-events', [run$1(dismissRequested(), (_comp, _se) => {\n emit(dialogUi.dialog, formCancelEvent);\n })]),\n Docking.config({\n contextual: {\n lazyContext: () => Optional.some(box$1(SugarElement.fromDom(editor.getContentAreaContainer()))),\n fadeInClass: 'tox-dialog-dock-fadein',\n fadeOutClass: 'tox-dialog-dock-fadeout',\n transitionClass: 'tox-dialog-dock-transition'\n },\n modes: [\n 'top',\n 'bottom'\n ],\n lazyViewport: comp => {\n const optScrollingContext = detectWhenSplitUiMode(editor, comp.element);\n return optScrollingContext.map(sc => {\n const combinedBounds = getBoundsFrom(sc);\n return {\n bounds: combinedBounds,\n optScrollEnv: Optional.some({\n currentScrollTop: sc.element.dom.scrollTop,\n scrollElmTop: absolute$3(sc.element).top\n })\n };\n }).getOrThunk(() => ({\n bounds: win(),\n optScrollEnv: Optional.none()\n }));\n }\n })\n ]),\n isExtraPart: (_comp, target) => isAlertOrConfirmDialog(target)\n }));\n inlineDialog.set(inlineDialogComp);\n const getInlineDialogBounds = () => {\n return extras.backstages.popup.shared.getSink().toOptional().bind(s => {\n const optScrollingContext = detectWhenSplitUiMode(editor, s.element);\n const margin = 15;\n const bounds$1 = optScrollingContext.map(sc => getBoundsFrom(sc)).getOr(win());\n const contentAreaContainer = box$1(SugarElement.fromDom(editor.getContentAreaContainer()));\n const constrainedBounds = constrain(contentAreaContainer, bounds$1);\n return Optional.some(bounds(constrainedBounds.x, constrainedBounds.y, constrainedBounds.width, constrainedBounds.height - margin));\n });\n };\n InlineView.showWithinBounds(inlineDialogComp, premade(dialogUi.dialog), { anchor }, getInlineDialogBounds);\n Docking.refresh(inlineDialogComp);\n editor.on('ResizeEditor ScrollWindow ElementScroll ResizeWindow', refreshDocking);\n dialogUi.instanceApi.setData(initialData);\n Keying.focusIn(dialogUi.dialog);\n return dialogUi.instanceApi;\n };\n return DialogManager.open(factory, config$1);\n };\n const confirm = (message, callback) => {\n confirmDialog.open(message, callback);\n };\n const alert = (message, callback) => {\n alertDialog.open(message, callback);\n };\n const close = instanceApi => {\n instanceApi.close();\n };\n return {\n open,\n openUrl,\n alert,\n close,\n confirm\n };\n };\n\n const registerOptions = editor => {\n register$e(editor);\n register$d(editor);\n register(editor);\n };\n var Theme = () => {\n global$a.add('silver', editor => {\n registerOptions(editor);\n let popupSinkBounds = () => win();\n const {\n dialogs,\n popups,\n renderUI: renderModeUI\n } = setup$3(editor, { getPopupSinkBounds: () => popupSinkBounds() });\n const renderUI = () => {\n const renderResult = renderModeUI();\n const optScrollingContext = detectWhenSplitUiMode(editor, popups.getMothership().element);\n optScrollingContext.each(sc => {\n popupSinkBounds = () => {\n return getBoundsFrom(sc);\n };\n });\n return renderResult;\n };\n Autocompleter.register(editor, popups.backstage.shared);\n const windowMgr = setup({\n editor,\n backstages: {\n popup: popups.backstage,\n dialog: dialogs.backstage\n }\n });\n const getNotificationManagerImpl = () => NotificationManagerImpl(editor, { backstage: popups.backstage }, popups.getMothership());\n return {\n renderUI,\n getWindowManagerImpl: constant$1(windowMgr),\n getNotificationManagerImpl\n };\n });\n };\n\n Theme();\n\n})();\n"],"names":["getPrototypeOf$2","Object","getPrototypeOf","hasProto","v","constructor","predicate","_a","prototype","name","isType$1","type","value","x","t","Array","isArray","String","o","proto","isPrototypeOf","typeOf","isSimpleType","eq$1","a","isString","isObject","isPlainObject","is$2","isNull","isBoolean","isUndefined","undefined","isNullable","isNonNullable","isFunction","isNumber","isArrayOf","pred","i","len","length","noop","noarg","f","compose","fa","fb","args","apply","constant$1","identity","tripleEquals","b","curry","fn","initialArgs","restArgs","all","concat","not","die","msg","Error","apply$1","never","always","Optional","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","from","getOrNull","getOrUndefined","each","worker","toArray","toString","nativeSlice","slice","nativeIndexOf","indexOf","nativePush","push","rawIndexOf","ts","call","xs","r","contains$2","range$2","num","chunk$1","array","size","s","map$2","each$1","partition$3","pass","fail","filter$2","foldr","acc","eachr","foldl","find$5","until","findUntil","findIndex$1","flatten","bind$3","reverse","difference","a1","a2","mapToObject","pure$2","sort","comparator","copy","get$h","head","last$1","findMap","arr","keys","hasOwnProperty","obj","props","k","map$1","tupleMap","tuple","objAcc","internalFilter","onTrue","onFalse","filter$1","mapToArray","find$4","values","get$g","key","has$2","hasNonNullableKey","is$1","lhs","rhs","left","cat","lift2","oa","ob","mapFrom","someIf","checkRange","str","substr","start","removeLeading","prefix","startsWith","numChars","substring","removeFromStart","contains$1","end","idx","endsWith","suffix","trim$1","replace","blank","isNotEmpty","isEmpty","isSupported$1","dom","style","getPropertyValue","fromDom","node","SugarElement","fromHtml","html","scope","div","document","createElement","innerHTML","hasChildNodes","childNodes","console","error","fromTag","fromText","text","createTextNode","fromPoint","docElm","y","elementFromPoint","Global","window","Function","resolve","p","parts","path$1","split","getOrDie$1","actual","unsafe","getPrototypeOf$1","sandHTMLElement","test","name$3","element","nodeName","toLowerCase","isType","nodeType","type$1","isHTMLElement","isElement$1","isText","isDocument","isDocumentFragment","isTag","e","is","selector","elem","matches","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","bypassSelector","childElementCount","eq","e1","e2","contains","d1","d2","owner$4","ownerDocument","documentOrOwner","dos","documentElement","defaultView","parent","parentNode","parentElement","offsetParent","children","child$2","index","cs","firstChild","spot","offset","leaf","isShadowRoot","host","supported","Element","attachShadow","Node","getRootNode","isSupported","getContentContainer","body","getShadowRoot","getShadowHost","isOpenShadowHost","shadowRoot","inBody","doc","fbc","fab","getBody","rawSet","setAttribute","set$9","setAll$1","attrs","get$f","getAttribute","getOpt","has$1","hasAttribute","remove$7","removeAttribute","internalSet","property","setProperty","internalRemove","removeProperty","set$8","setAll","css","setOptions","get$e","getComputedStyle","getUnsafeProperty","getRaw","raw","getAllRaw","ruleName","item","isValidValue$1","remove$6","reflow","offsetWidth","Dimension","getOffset","get","parseFloat","aggregate","properties","val","parseInt","isNaN","set","h","match","getOuter","max","cumulativeInclusions","api$2","getBoundingClientRect","height","offsetHeight","get$d","getOuter$2","r$1","top","translate","SugarPosition","firstDefinedOrZero","absolute$3","win","offsetLeft","offsetTop","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","viewport$1","box","boxPosition","api$1","get$c","getOuter$1","cached","called","unknown$3","nu$d","major","minor","Version","nu","detect","versionRegexes","agent","cleanedAgent","regexes","firstMatch","group","Number","find$3","unknown","detect$4","candidates","userAgent","candidate","search","normalVersionRegex","checkContains","target","uastring","browsers","brand","oses","PlatformInfo","edge","chromium","opera","firefox","safari","nu$c","info","current","version","isBrowser","isEdge","isChromium","isIE","isOpera","isFirefox","isSafari","Browser","ie","windows","android","linux","macos","solaris","freebsd","chromeos","nu$b","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","fromRawEvent$1","rawEvent","event","el","composed","composedPath","getOriginalEventTarget","stop","stopPropagation","prevent","preventDefault","kill","mkEvent","clientX","clientY","handler","useCapture","wrapped","handle","addEventListener","unbind","removeEventListener","before$1","marker","insertBefore","after$2","sibling","nextSibling","append$2","prepend$1","appendChild","append$1","elements","empty","textContent","rogue","remove$5","removeChild","get$b","_DOC","to","scrollTo","bounds$1","width","right","bottom","getBounds$3","_win","scroll","visualViewport","get$a","clientWidth","clientHeight","Math","pageLeft","pageTop","getDocument","walkUp","navigation","view","owner","rest","Navigation","freeze","__proto__","frameElement","find$2","path","d","paths","pathTo","frames","loc","bounds","box$1","xy","w","absolute$2","position","constrain","original","constraint","min","global$a","tinymce","util","Tools","value$4","applyHelper","constHelper","outputHelper","output","inner","_onError","onValue","isValue","isError","Result","mapError","toOptional","error$1","onError","_onValue","fromOption","optional","err","SimpleResultType","fold$1","res","stype","serror","svalue","Value","SimpleResult","results","errors","field$2","newKey","presence","prop","ifField","ifCustom","instantiator","baseMerge","merger","objects","ret","j","curObject","deepMerge","old","merge$1","defaultedThunk","fallbackThunk","process","defaulted$1","fallback","mergeWithThunk","baseThunk","mergeErrors$1","ResultCombine","partitions","formatObj","input","JSON","stringify","nu$a","getErrorInfo","value$3","validator","extract","custom","anyValue$1","requiredAccess","bundle","missingRequired","fallbackAccess","extractField","field","av","bundleAsOption","optValue","ov","result","optionAccess","optionDefaultedAccess","valueThunk","getDelegate","getSetKeys","objOfOnly","fields","delegate","objOf","fieldNames","extra","unsupported","join","unsupportedFields","success","extractFields","fieldStrings","_okey","_presence","_instantiator","arrOf","oneOf","rawF","setOf$1","keys$1","validatedKeys","validateKeys","validKeys","schema","vk","arrOfObj","anyValue","typedValue","expectedType","actualType","number","string","boolean","functionProcessor","isPostMessageable","every","postMessageable","chooseFrom","branches","ch","branch","missingBranch","vp","choose$2","missingKey","chosen","valueOf","setOf","asRaw","label","errs","extractValue","extraction","errInfo","formatError","asRawOrDie$1","es","formatErrors","choose$1","thunkOf","desc","_desc","processor","getP","field$1","customField","validateEnum","required$1","requiredOf","requiredNumber","requiredString","requiredStringEnum","requiredFunction","requiredObjOf","objSchema","requiredArrayOfObj","objFields","requiredArrayOf","option$3","optionOf","optionNumber","optionString","optionStringEnum","optionFunction","optionArrayOf","optionObjOf","defaulted","defaultedOf","defaultedNumber","defaultedString","defaultedStringEnum","defaultedBoolean","defaultedFunction","defaultedArrayOf","defaultedObjOf","Cell","initial","Adt","cases","constructors","adt","acase","count","argLength","foldArgs","branchKeys","reqKey","log","params","bothErrors","firstError","secondError","bothValues","exclude","exclude$1","wrap$1","wrap$2","wrapAll","keyvalues","kv","wrapAll$1","consolidate","objs","base","partition$1","mergeValues","ensureIsRoot","isRoot","ancestor$2","transform","transformed","closest$4","isSource","component","simulatedEvent","defaultEventHandler","can","abort","run","nu$9","fuse$1","handlers","all$2","any","constant","touchstart","touchmove","touchend","touchcancel","mousedown","mousemove","mouseout","mouseup","mouseover","focusin","focusout","keydown","keyup","change","click","transitioncancel","transitionend","transitionstart","selectstart","prefixName","alloy","tap","focus$4","postBlur","postPaste","receive","execute$5","focusItem","longpress","sandboxClose","typeaheadCancel","systemInit","documentTouchmove","documentTouchend","windowScroll","windowResize","attachedToDom","detachedFromDom","dismissRequested","repositionRequested","focusShifted","slotVisibility","externalElementScroll","changeTab","dismissTab","highlight$1","dehighlight$1","emit","dispatchWith","emitWith","emitExecute","dispatch","data","getSystem","triggerEvent","dispatchEvent","derive$2","configs","run$1","runActionExtra","action","runOnSourceName","redirectToPart","detail","partName","uid","getByUid","redirectee","redirectToUid","partUids","runWithTarget","ev","getByDom","cutter","cut","stopper","runOnSource","runOnAttached","runOnDetached","runOnInit","runOnExecute$1","runOnName","get$9","set$6","content","docDom","fragment","createDocumentFragment","contentElements","fromHtml$1","clone$1","isDeep","cloneNode","getHtml","clone","shallow","container","events$i","originator","isRecursive","warn","DefaultEvents","events","unique","generate$6","time","Date","getTime","random","floor","prefix$1","idAttr$1","idAttr","writeOnly","defineProperty","writable","read$1","id","generate$5","make$8","NoContextApi","getComp","getMessage","debugInfo","triggerFocus","triggerEscape","broadcast","broadcastOn","broadcastEvent","build","buildOrPatch","addToWorld","removeFromWorld","addToGui","removeFromGui","isConnected","singleton$1","cleanParameters","parameters","markAsExtraApi","extraName","endIndex","openBracketIndex","toFunctionAnnotation","premadeTag","premade$1","comp","getPremade","spec","makeApi","apiFunction","markAsSketchApi","getApis","NoState","init","nu$8","readState","byInnerKey","indexKey","chain","nu$7","classes","attributes","styles","getCurried","descHandler","cHandler","behaviourTuple","nameToHandlers","behaviours","behaviour","combine$1","eventOrder","byEventName","behaviourEvents","groupByEvents","combineGroups","assemble","rawHandler","read$2","fuse","tuples","eventName","order","keyName","sorted","aKey","bKey","aIndex","bIndex","sortKeys","sortedTuples","c","missingOrderError","assembled","purpose","uncurried","baseBehaviour","schema$z","mergeWith","toEvents","read","attr","supports","classList","get$8","add$3","clazz","add$4","remove$3","remove$4","add$2","add","cleanClass","remove$2","remove","toggle$4","toggle","toggle$5","has","add$1","remove$1","get$7","getNative","get$6","set$5","ensureInDom","child","obsoleted","obs","patchChildrenWith","builtChildren","currentChildren","patchSpecChild","oldObsoleted","childComp","newObs","oldTag","determineObsoleted","diffKeyValueSet","newObj","oldObj","newKeys","oldKeys","toRemove","toSet","bifilter","reconcileToDom","definition","class","existingAttributes","clone$2","attrsToSet","attrsToRemove","existingStyles","stylesToSet","stylesToRemove","existingClasses","classesToRemove","classesToAdd","innerHtml","domChildren","nodes","optObsoleted","patchDomChildren","valueElement","updateValue","renderToDom","hasMixedChildren","isPremade","attemptPatch","subject","introduceToDom","generateFrom","validated","list","optBlobThunk","blob","config","state","generateFrom$1","generate$4","me","getBehaviours$2","getDomDefinition","bList","bData","components","infoModification","domModification","toModification","baseModification","modification","baseMod","modsByBehaviour","exhibit","byAspect","combineObjects","combinedClasses","combinedAttributes","combinedStyles","combine$2","defnA","mod","build$2","getMe","systemApi","toInfo","bBlob","getBehaviours$3","getData$2","modDefinition","baseEvents","getEvents","subcomponents","hasConfigured","behaviourName","apis","connect","newApi","disconnect","syncComponents","children$1","subs","buildFromSpec","userSpec","specEvents","build$1","buildSubcomponents","completeSpec","text$2","external$1","extSpec","uids","userSpecWithUid","isSketchSpec$1","premade","ClosestOrAncestor","ancestor","ancestor$1","closest$3","closest$2","child$1","descendant","querySelector","one","closest$1","attribute","manager","ariaId","link","unlink","isAriaPartOf","queryElem","dep","find$1","isPartOf$1","EventConfiguration","eventConfig","processEvent","initialTarget","patterns","NORMAL","noLogger","LOGGING","logger","sequence","startTime","logEventCut","_name","outcome","logEventStopped","logNoParent","logEventNoHandlers","logEventResponse","write","finishTime","makeEventLogger","STOP","monitorEvent","menuFields","itemFields","itemSchema$3","_initSize","tieredMenuMarkers","markers$1","required","onPresenceHandler","fieldName","stack","lines","line","getTrace","onHandler","onKeyboardHandler","onStrictHandler","onStrictKeyboardHandler","output$1","snapshot","initSize","nu$6","bubble","direction","placement","boundsRestriction","labelPrefix","alwaysFit","restriction","adt$a","southeast","southwest","northeast","northwest","south","north","east","west","southeast$3","southwest$3","northeast$3","northwest$3","south$3","north$3","east$3","west$3","cycleBy","delta","clamp","anchor","restrictions","dir","getRestriction","labelPrefix$2","eastX$1","middleX$1","westX$1","northY$2","southY$2","centreY$1","southeast$2","bubbles","southwest$2","northeast$2","northwest$2","north$2","south$2","east$2","eastEdgeX$1","west$2","westEdgeX$1","all$1","allRtl$1","aboveOrBelow","aboveOrBelowRtl","belowOrAbove","belowOrAboveRtl","ActiveReceiving","receiveConfig","channelMap","channels","receivingData","targetChannels","universal","chooseChannels","channelInfo","channelSchema","onReceive","ReceivingSchema","loadEvent","bConfig","bState","_simulatedEvent","wrapApi","bName","apiName","markAsBehaviourApi","revokeBehaviour","doCreate","configSchema","schemaSchema","active","getConfig","wrappedApis","apiF","extraF","revoke","prepared","configAsRaw","initialConfig","behaviourInfo","exhibitor","derive$1","capabilities","simpleSchema","create$4","create$5","modeSchema","createModes","modes","createModes$1","branchKey","Receiving","ActivePosition","posConfig","useFixed","focus$3","preventScroll","focus","blur$1","blur","hasFocus","root","activeElement","active$1","preserve$1","refocus","focused","descend","descendant$1","oldFocus","newFocus","NuPositionCss","toPx","applyPositionCss","toOptions","adt$9","relative","fixed","positionWithDirection","posName","decision","decisionRect","rect","decisionX","decisionY","decisionRight","decisionBottom","cata$2","reposition","origin","toBox","rel","viewport","optBounds","pos","translate$2","outerScroll","relative$1","fixed$1","anchorBox","placementAttribute","getPlacement","adt$8","fit","nofit","attempt","bubbleOffset","adjustedBounds","applyRestriction","isVerticalAxis","newPos","adjustedLeft","adjustedTop","adjustedRight","adjustedBottom","adjustBounds","newX","newY","originInBounds","sizeInBounds","visibleW","visibleH","boundsX","boundsY","boundsRight","boundsBottom","determinePosition","fits","fittedBox","maxX","maxY","restrictedX","restrictedY","restrictedWidth","restrictedHeight","calcReposition","isPartlyVisible","maxWidth","maxHeight","upAvailable","downAvailable","middle","cataVertical","westAvailable","eastAvailable","cataHorizontal","calcMaxSizes","on","classesOn","off","classesOff","layout","testY","singleton","doRevoke","clear","isSet","unbindable","value$2","bind$2","capture","capture$1","fromRawEvent","timerAttr","isTransitioning$1","transition","hasAll","hasChanges","intermediate","round","toFixed","equals","setupTransitionListeners","transitionEnd","transitionCancel","timer","isSourceTransition","pseudoElement","propertyName","transitionDone","clearTimeout","transitionStart","duration","times","parse","delay","dur","getTransitionDuration","requestAnimationFrame","setTimeout","applyTransitionCss","lastPlacement","shouldTransition","placer","mode","shouldApplyTransitionCss","intermediatePosition","intermediateCssOptions","timerId","startTransitioning","options","elementBox","panelWidth","panelHeight","attemptBestFit","isVisible","next","attemptLayout","newReposition","newVisibleW","newVisibleH","newIsVisible","abc","bestNext","attempts","preference","setPlacement","setPlacement$1","setMaxHeight","absMax","setMax$1","anchored","available","expandable$1","defaultOr","dephault","go","positionCss","position$2","classInfo","setClasses","maxHeightFunction","setHeight","maxWidthFunction","setWidth","allAlignments","nu$5","xOffset","yOffset","insetModifier","insetXOffset","insetYOffset","getClasses","make","xDelta","yDelta","alignmentsOn","alignmentsOff","insetNortheast","insetNorthwest","insetNorth","insetSoutheast","insetSouthwest","insetSouth","insetEast","insetWest","nu$4","onDirection","isLtr","isRtl","getDirection","AttributeValue","Attribute","isBottomToTopDir","BottomToTop","schema$y","get$5","defaultLtr","defaultRtl","defaultBottomLtr","defaultBottomRtl","dirElement","isBottomToTop","customLtr","layouts","ls","onLtr","customRtl","onRtl","ltr","onBottomLtr","rtl","onBottomRtl","HotspotAnchor","anchorInfo","hotspot","overrides","MakeshiftAnchor","adt$7","screen","absolute","point","toAbsolute","sum","points","sumAsAbsolute","positions","absolute$1","getRootPoint","frame","frameOwner","compOwner","getBox","pointed","calcNewAnchor","optBox","rootPoint","topLeft","onRelative","onFixed","sumAsFixed","layoutsLtr","showAbove","layoutsRtl","NodeAnchor","nodeBox","SimRange","soffset","finish","foffset","adt$6","before","after","Situ","situ","adt$5","domRange","exact","SimSelection","exactFromRange","simRange","getWin","selection","rng","startContainer","startSitu","_finishSitu","_soffset","_finish","_foffset","getStart","range","relativeToNative","finishSitu","createRange","setStartBefore","setStart","setStartAfter","setEndBefore","setEnd","setEndAfter","setFinish","exactToNative","toRect","adt$4","fromRange","startOffset","endContainer","endOffset","diagnose","ranges","getRanges","collapsed","rev","doDiagnose","asLtrRange","ancestors","rawParent","parents","descendants","querySelectorAll","all$3","makeRange","same","readRange","rangeCount","firstRng","getRangeAt","lastRng","doGetExact","anchorNode","focusNode","anchorOffset","focusOffset","getExact","getSelection","getNativeSelection","sel","getFirstRect","rects","getClientRects","getFirstRect$1","getBounds$1","getBounds$2","api","getOption","nodeValue","NodeValue","descendOnce$1","last","get$4","descendOnce","isSimRange","getAnchorSelection","modStart","modFinish","SelectionAnchor","selectionBox","optRect","zeroWidth$1","rawRect","selectionRect","cell","firstCell","lastCell","labelPrefix$1","eastX","westX","northY$1","southY$1","southeast$1","southwest$1","northeast$1","northwest$1","allRtl","SubmenuAnchor","submenuInfo","AnchorSchema","submenu","makeshift","TransitionSchema","PositionSchema","PlacementSchema","place","anchoring","placee","lastPlace","overrideOptions","simple","positionWithinBounds","posState","placementSpec","optWithinBounds","placeeDetail","anchorage","placeeState","oldVisibility","getFixedOrigin","getRelativeOrigin","getBounds","newState","vis","PositionApis","getMode","pConfig","_pState","reset","reset$2","Positioning","fireDetaching","fireAttaching","virtualAttach","virtualDetach","attach$1","replaceChildren","newSpecs","buildNewChildren","detachChildren$1","newChildren","deleted","attach","attachWith","insertion","doDetach","detach","parent$1","detachChildren","attachSystem","guiSystem","attachSystemWith","attachSystemAfter","inserter","detachSystem","rebuild","sandbox","sConfig","sState","_data","getAttachPoint","built","open$1","onOpen","close$1","onClose","isOpen$1","_sandbox","_sConfig","isOpen","cloak","_sState","sink","cssKey","newValue","store","cloakVisibilityAttr","decloak","hasPosition","oldValue","restore","SandboxApis","open","openWhileCloaked","transaction","close","isPartOf","getState","setContent","ActiveSandbox","sandboxConfig","sandboxState","SandboxSchema","SandboxState","contents","Sandboxing","dismissPopups","repositionPopups","mouseReleased","schema$x","receivingChannel$1","rawSpec","isExtraPart","fireEventInstead","fe","schema$w","receivingChannel","doReposition","onLoad$5","repConfig","repState","onLoad","onUnload$2","onUnload","RepresentApis","setValue","getValue","ActiveRepresenting","resetOnDom","_se","memory$1","isNotSet","dataset","dataByValue","dataByText","lookup","itemString","update","items","currentDataByValue","currentDataByText","newDataByValue","newDataByText","meta","RepresentState","memory","manual","setValue$2","onSetValue","DatasetStore","getDataKey","getFallbackEntry","initialValue","ManualStore","_repState","MemoryStore","initVal","RepresentSchema","Representing","setValueFrom","source","forbidden","forbid","_v","get$3","dump","augment","SketchBehaviours","_placeholder","adt$3","single","multiple","isSubstituted","scan","compSpec","placeholders","uiType","newSpec","subPlaceholder","substitute","req","childSpecs","substituted","valuesThunk","preprocess","preprocessor","substitutePlaces","ps","ph","replacements","_","used","oneReplace","substituteAll","single$2","placeholder","adt$2","external","fFactory","sketch","fSchema","fName","fPname","typeSpec","fGroupSchema","fDefaults","fOverrides","requiredSpec","externalSpec","optionalSpec","groupSpec","asNamedPart","part","name$2","convert","adtConstructor","partSchema","PartType","asCommon","combine","partSpec","partValidated","defaults","generate$3","np","g","doGenerateOne","pname","generateOne$1","schemas","names","substitutes","internals","externals","factory","_partSpec","_partValidated","units","u","components$1","getPart","partKey","getPartOrDie","getParts","partKeys","system","pk","getAllParts","pUid","_k","getAllPartNames","getPartsOrDie","defaultUids","baseUid","partTypes","partNames","pn","defaultUidsSchema","AlloyParts","generate","generateOne","asRawOrDie","partSchemas","partUidsSchemas","baseS","composite$1","specWithUid","supplyUid","partUidsSchema","hasUid","singleSchema","compositeSchema","rawConfig","extraApis","configFields","single$1","composite","partFields","inside","ComposeApis","getCurrent","composeConfig","_composeState","find","ComposeSchema","Composing","nativeDisabled","onLoad$1","disableConfig","disableState","disabled","disable","enable","hasNative","useNative","nativeDisable","nativeEnable","ariaDisable","ariaEnable","_disableState","disableClass","onDisabled","onEnabled","isDisabled","nativeIsDisabled","ariaIsDisabled","DisableApis","ActiveDisable","DisableSchema","Disabling","dehighlightAllExcept","hConfig","hState","skip","highlighted","highlightClass","skipComp","onDehighlight","highlight","isHighlighted","onHighlight","queryTarget","getByIndex","itemClass","getFirst","_hState","getLast","getDelta$2","selected","dest","getCandidates","HighlightApis","dehighlightAll","dehighlight","highlightFirst","firstComp","highlightLast","lastComp","highlightAt","highlightBy","getHighlighted","getPrevious","getNext","HighlightSchema","Highlighting","BACKSPACE","TAB","ENTER","ESCAPE","SPACE","LEFT","UP","RIGHT","DOWN","cyclePrev","tryPrev","cycleNext","tryNext","inSet","which","and","preds","isShift$1","shiftKey","isControl","ctrlKey","isNotShift","rule","classification","reportFocusShifting","prevFocus","n","dom$2","focusee","highlights","FocusInsideModes","typical","infoSchema","stateInit","getKeydownRules","getKeyupRules","optFocusIn","processKey","getRules","keyingConfig","keyingState","transitions","choose","onFocusHandler","focusInside","OnFocusMode","focusIn","keyboardEvents","isEnterOrSpace","OnEnterOrSpaceMode","tryGoInsideComponent","create$2","cyclicField","tabbingConfig","visibilitySelector","findCurrent","focusManager","_tabbingState","tabstops","visibles","firstTabstop","findInitial","goFromTabstop","stopIndex","cycle","useTabstopAt","isTabstop","cyclic","tabstop","goBackwards","navigate","goForwards","isFirstChild","onEnter","onEscape","AcyclicType","CyclicType","defaultExecute","doDefaultExecute","stopEventForFirefox","_component","schema$v","execute$4","executeConfig","execute","ExecutionType","_executeState","spaceExec","useSpace","enterExec","useEnter","downExec","useDown","execKeys","useControlEnter","flatgrid$1","dimensions","numRows","numColumns","setGridSize","getNumRows","getNumColumns","KeyingState","flatgrid","useH","movement","move","use","west$1","moveLeft","moveRight","east$1","useV","north$1","south$1","move$1","isHidden$1","locateVisible","locate","findIndex","withGrid","numCols","address","newIndex","row","column","cycleHorizontal$1","oldRow","oldColumn","colsInRow","newColumn","cycleVertical$1","newRow","newCol","schema$u","focusIn$3","gridConfig","_gridState","first","doMove$2","gridState","identified","handleTab","captureTab","moveLeft$3","moveRight$3","moveNorth$1","moveSouth$1","getKeydownRules$4","findCurrent$1","getKeyupRules$4","FlatgridType","getNewIndex","tryNewIndex","isDisabledButton","horizontalWithoutCycles","prevIndex","oldCandidate","onNewIndex","horizontal","_oldCandidate","schema$t","execute$2","flowConfig","focusIn$2","_state","getInitial","moveLeft$2","cycles","moveRight$2","doMove$1","flowState","executeOnMove","getKeyupRules$3","FlowType","_flowState","westMovers","allowHorizontal","allowVertical","eastMovers","toCell","matrix","rowIndex","columnIndex","cycleHorizontal","startCol","deltaCol","newColIndex","cycleVertical","colIndex","startRow","deltaRow","nextRowIndex","colsInNextRow","nextColIndex","moveHorizontal","moveVertical","schema$s","focusIn$1","matrixConfig","previousSelector","selectors","doMove","ifCycle","ifMove","inRow","cellsInRow","allRows","rows","toMatrix","moveNorth","moveSouth","getKeydownRules$2","getKeyupRules$2","MatrixType","schema$r","menuConfig","moveUp","moveDown","getKeydownRules$1","menuState","moveOnTab","getKeyupRules$1","MenuType","schema$q","SpecialType","specialInfo","onSpace","onShiftEnter","onShiftTab","onTab","onUp","onDown","onLeft","onRight","stopSpaceKeyup","acyclic","flow","execution","menu","special","Keying","keyConfig","keyState","sendFocusIn","isFlatgridState","withoutReuse","withReuse","existingComps","deletedComp","virtualReplaceChildren","specs","patchSpecChildren","virtualReplace","replacee","replaceeIndex","childSpec","insert","appendAt","_replaceConfig","replaceAt","replaceConfig","replaceState","replacer","reuseDom","ReplaceApis","append","appendee","prepend","prependee","removee","foundChild","replaceBy","replaceePred","Replacing","eventHandlers","events$d","focus$2","focusConfig","ignore","onFocus","FocusApis","isFocused","ActiveFocus","tabindex","stopMousedown","FocusSchema","Focusing","set$2","toggleConfig","toggleState","initialState","toggleClass","updateClass","ariaInfo","aria","updateAriaState","onToggled","toggle$2","ToggleApis","isOn","ActiveToggle","executor","load","toggleOnExecute","updateExpanded","status","ToggleSchema","pressed","syncWithExpanded","checked","expanded","Toggling","pointerEvents","onClick","events$a","optAction","hoverEvent","focusEvent","toggledEvent","onHover","onFocus$1","hover","focus$1","toggled","getItemRole","toggling","exclusive","getTogglingSpec","tConfig","_value","schema$p","role","hasSubmenu","itemBehaviours","ignoreFocus","schema$o","owner$2","parts$h","schema$n","focusWidget","widget","onHorizontalArrow","autofocus","setSource","_widget","widgetBehaviours","itemSchema$2","separator","parts$g","itemInfo","builder","unit","fakeFocus","markers","schema$m","grid","movementInfo","rowSelector","Menu","_spec","_externals","menuBehaviours","selectedItem","checkedRadioItems","ele","deselectOtherRadioItems","trace","byItem","byMenu","triggerItem","triggerMenu","generate$2","menus","expansions","menuItems","menuPaths","_triggerItem","extractPreparedMenu","prep","LayeredState","primary","directory","getTriggerData","menuValue","getItemByValue","getPreparedMenu","getTriggeringItem","triggeringItemValue","triggeredItem","triggeredMenu","triggeringItem","triggeringPath","lookupMenu","lookupItem","itemValue","setMenuBuilt","menuName","setContents","sPrimary","sMenus","sExpansions","sPaths","expand","refresh","collapse","otherMenus","menuValues","getPrimary","getMenus","isClear","getTriggeringPath","extraPath","revPath","menuIndex","onMenuItemHighlightedEvent","onMenuItemDehighlightedEvent","HighlightOnOpen","collapseItem$1","tieredMenu","HighlightMenuAndItem","collapseMenu","tmenu","highlightPrimary","repositionMenus","_rawUiSpec","submenuParentItems","layeredState","setup","componentMap","primaryName","makeSketch","menuComp","itemComp","nbMenu","buildMenus","toDirectory","getItemValue","_container","_menuName","setActiveMenu","setActiveMenuAndItem","mv","closeOthers","others","backgroundMenu","stayInDom","updateAriaExpansions","parentItems","getSubmenuParents","updateMenuPath","latestMenuName","menuPrep","activeMenu","ExpandHighlightDecision","expandRight","HighlightSubmenu","activeMenuPrep","buildIfRequired","onOpenSubmenu","collapseLeft","onCollapseMenu","keyOnItem","getSource","onExecute","onOpenMenu","highlightOnOpen","HighlightJustMenu","tmenuComp","se","onHighlightItem","onDehighlightItem","navigateOnHover","updateView","HighlightParent","getActiveItem","currentItem","maybeActivePrimary","allMenus","preparedMenus","extractMenuFromContainer","primaryMenu","onRepositionMenu","tmenuBehaviours","_keyInfo","selectedMenu","tieredData","singleData","collapseItem","InlineView","showWithinBounds","thing","lazySink","showMenuWithinBounds","menuSpec","menuSandbox","getSubmenuLayouts","triggeringPaths","isFirstTierSubmenu","submenuTriggers","st","submenuLayouts","makeMenu","showAt","showMenuAt","hide","getContent","inlineBehaviours","getRelated","isPartOfRelated","onShow","onHide","fireDismissalEventInstead","fireRepositionEventInstead","global$9","Button","lookupAttr","buttonBehaviours","getModAttributes","getAttrs","record","isSketchSpec","anyInSystem","asSpec","entries","setPrototypeOf","isFrozen","getOwnPropertyDescriptor","seal","create","create$1","construct","Reflect","fun","thisValue","Func","arrayForEach","unapply","forEach","arrayPop","pop","arrayPush","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","trim","objectHasOwnProperty","regExpTest","RegExp","typeErrorCreate","func","TypeError","_len2","arguments","_key2","thisArg","_len","_key","addToSet","transformCaseFunc","l","lcElement","cleanArray","object","newObject","lookupGetter","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","text$1","svg","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","EXPRESSIONS","NODE_TYPE","getGlobal","purify","createDOMPurify","DOMPurify","removed","originalDocument","currentScript","DocumentFragment","HTMLTemplateElement","NodeFilter","NamedNodeMap","MozNamedAttrMap","HTMLFormElement","DOMParser","trustedTypes","ElementPrototype","getNextSibling","getChildNodes","getParentNode","template","trustedTypesPolicy","emptyHTML","implementation","createNodeIterator","getElementsByTagName","importNode","hooks","createHTMLDocument","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","tagNameCheck","configurable","enumerable","attributeNameCheck","allowCustomizedBuiltInElements","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","cfg","ADD_URI_SAFE_ATTR","ADD_DATA_URI_TAGS","ALLOWED_URI_REGEXP","ADD_TAGS","ADD_ATTR","table","tbody","TRUSTED_TYPES_POLICY","createHTML","createScriptURL","purifyHostElement","createPolicy","ATTR_NAME","policyName","scriptUrl","_createTrustedTypesPolicy","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","ALL_SVG_TAGS","ALL_MATHML_TAGS","_forceRemove","_removeAttribute","getAttributeNode","_initDocument","dirty","leadingWhitespace","dirtyPayload","parseFromString","createDocument","_createNodeIterator","SHOW_ELEMENT","SHOW_COMMENT","SHOW_TEXT","SHOW_PROCESSING_INSTRUCTION","SHOW_CDATA_SECTION","_isClobbered","elm","namespaceURI","_isNode","_executeHook","entryPoint","currentNode","hook","_sanitizeElements","tagName","allowedTags","firstElementChild","_isBasicCustomElement","childClone","__removalCount","parentTagName","Boolean","_checkValidNamespace","expr","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","hookEvent","attrName","attrValue","keepAttr","allowedAttributes","initValue","forceKeepAttr","getAttributeType","setAttributeNS","_sanitizeShadowDOM","shadowNode","shadowIterator","nextNode","sanitize","importedNode","returnNode","nodeIterator","shadowroot","shadowrootmode","serializedHTML","outerHTML","doctype","setConfig","clearConfig","isValidAttribute","addHook","hookFunction","removeHook","removeHooks","removeAllHooks","sanitizeHtmlString","global$8","rtlTransform","indent","outdent","defaultIconName","defaultIcon","icons","getIconName","rtlName","addToEnd","ensureTrailing","lookupIcon","get$2","iconProvider","addFocusableBehaviour","renderIcon$3","iconName","fallbackIcon","_b","rtlIconClasses","needsRtlTransform","iconHtml","render$3","notificationIconMap","warning","Notification","memBannerText","translationProvider","renderPercentBar","percent","renderPercentText","memBannerProgress","progress","updateProgress","updateText","banner","iconChoices","icon","level","memButton","onAction","notificationIconSpec","iconNames","renderFirst","closeButton","ToolbarMode$1","ToolbarLocation$1","global$7","global$6","global$5","ToolbarMode","ToolbarLocation","option$2","editor","wrapOptional","register$e","registerOption","register","stringOrFalseProcessor","stringOrNumberProcessor","default","getElement","DOM","getStyle","valid","auto","inline","hasPlugin","isReadOnly","getHeightOption","getWidthOption","getMinWidthOption","getMinHeightOption","getMaxWidthOption","getMaxHeightOption","getUserStyleFormats","shouldMergeStyleFormats","shouldAutoHideStyleFormats","getContentLanguages","getRemovedMenuItems","getToolbarMode","getToolbarGroups","getToolbarLocation","fixedContainerSelector","fixedToolbarContainerTarget","isToolbarPersist","getStickyToolbarOffset","getMenubar","getToolbar","getFilePickerCallback","getFilePickerValidatorHandler","getFontSizeInputDefaultUnit","getFilePickerTypes","useTypeaheadUrls","getAnchorTop","getAnchorBottom","isDraggableModal$1","useStatusBar","useElementPath","useBranding","getResize","getPasteAsText","getSidebarShow","promotionEnabled","useHelpAccessibility","getDefaultFontStack","isSkinDisabled","isMenubarEnabled","getSkinUrl","skinUrl","documentBaseURI","skin","baseURL","getSkinUrlOption","getLineHeightFormats","isToolbarEnabled","toolbar","isToolbarString","isToolbarObjectArray","isMultipleToolbars","getMultipleToolbarsOption","toolbars","toolbarArray","isToolbarLocationBottom","fixedContainerTarget","useFixedContainer","getUiContainer","isDistractionFree","isStickyToolbar","isSplitUiMode","Options","isDraggableModal","autocompleteSelector","detect$1","AutocompleterEditorEvents","redirectKeyToItem","getItem","getMenu","keyCode","isActive","isMenuOpen","stopImmediatePropagation","cancelIfNecessary","isProcessingAction","ItemResponse","ItemResponse$1","navClass","selectableClass","colorClass","presetClasses","normal","color","tickedClass","iconClass","textClass","caretClass","activeClass","containerClass","containerRowClass","classForPreset","presets","forMenu","hasIcons","menuClasses","dom$1","columns","schema$l","focusBehaviours","selectOnFocus","setSelectionRange","inputBehaviours","inputAttributes","inputStyles","inputClasses","Input","refetchTriggerEvent","redirectMenuItemInteractionEvent","menuSearcherClass","findWithinSandbox","sandboxComp","inputElem","findWithinMenu","saveState","inputComp","fetchPattern","selectionStart","selectionEnd","renderMenuSearcher","handleByBrowser","handleByHighlightedItem","eventData","interactionEvent","eventType","customSearcherEventsName","i18n","searchResultsClass","augmentWithAria","chunk","rowDom","chunks","preprocessCollection","isSeparator","allSplits","currentSplit","insertItemsPlaceholder","initItems","onItem","rawItems","enrichedItems","_item","forCollection","_hasIcons","menuHasIcons","handleError","createHorizontalPartialMenuWithAlloyItems","_columns","_menuLayout","structure","createPartialMenuWithAlloyItems","menuLayout","getNormalStructure","menuType","searchMode","searchField","ariaControlsSearchResults","forCollectionWithSearchField","forCollectionWithSearchResults","forSwatch","forToolbar","name$1","title","value$1","fetch$1","getSubmenuItems","onItemAction","onSetup","optionalName","optionalText","optionalIcon","optionalTooltip","optionalLabel","optionalShortcut","optionalSelect","borderless","enabled","defaultedColumns","defaultedMeta","defaultedOnAction","defaultedType","generatedName","namePrefix","separatorMenuItemSchema","autocompleterItemSchema","baseToolbarButtonFields","toolbarButtonSchema","createToolbarButton","baseToolbarToggleButtonFields","toggleButtonSchema","createToggleButton","contextBarFields","contextButtonFields","contextToggleButtonFields","launchButtonFields","launchToggleButtonFields","toggleOrNormal","contextformbutton","contextformtogglebutton","contextFormSchema","contextToolbarSchema","cardImageFields","cardImageSchema","cardTextFields","cardTextSchema","itemSchema$1","cardimage","cardtext","cardcontainer","cardContainerSchema","commonMenuItemFields","valuePrefix","cardMenuItemSchema","choiceMenuItemSchema","baseFields","insertTableFields","colorSwatchFields","fancyMenuItemSchema","inserttable","colorswatch","menuItemSchema","nestedMenuItemSchema","toggleMenuItemSchema","detectSize","margin","selectorClass","descendants$1","columnLength","thisTop","cTop","abs","ceil","namedEvents","SimpleBehaviours","ExclusivityChannel","ShowTooltipEvent","HideTooltipEvent","hideAllExclusive","_tConfig","_tState","TooltippingApis","setComponents","tState","getTooltip","tooltip","ActiveTooltipping","tooltipConfig","clearTooltip","clearTimer","resetTimer","isShowing","popup","tooltipDom","tooltipComponents","setTooltip","show","TooltippingSchema","TooltippingState","Tooltipping","ReadOnlyChannel","ReadOnlyDataSchema","broadcastReadonly","uiRefs","readonly","mainUi","outerContainer","motherships","mothership","uiMotherships","m","setupReadonlyModeSwitch","receivingConfig","DisablingConfigs","runWithApi","getApi","onControlAttached","editorOffCell","onDestroy","onControlDetached","onMenuItemExecute","itemResponse","triggersSubmenu","CLOSE_ON_EXECUTE","menuItemEventOrder","componentRenderPipeline","renderCommonItem","providersBackstage","optComponents","buildData","convertText","isMac","alt","ctrl","shift","access","shortcut","updated","segment","renderIcon$2","renderText","renderHtml","renderStyledText","renderShortcut","renderCheckmark","renderColorStructure","providerBackstage","itemText","ariaLabel","iconSvg","iconContent","common","baseDom","getDom","renderItemDomStructure","domTitle","renderItemStructure","renderIcons","iconSpec","leftIcon","checkmark","checkMark","textRender","htmlContent","shortcutContent","caret","renderNormalItemStructure","tooltipBehaviour","sharedBackstage","tooltipWorker","getSink","_tooltip","replaceText","matchText","encoded","encode","encodeText","escapedMatchRegex","escape","render$2","extras","directionClass","alignClass","align","valign","getValignClass","renderContainer","src","renderImage","shouldHighlight","cardText","highlightOn","parts$f","hexColour","normalizeHex","shorthandRegex","longformRegex","isHexString","hex","toUpperCase","extractValues","longForm","hexString","getLongForm","splitForm","exec","toHex","fromRgba","rgbaColour","red","green","blue","round$1","rgbRegex","rgbaRegex","alpha","isRgbaComponent","fromHsv","hsv","hue","saturation","brightness","side","chroma","fromHex","fromStringValues","fromString","rgbaString","rgbMatch","rgbaMatch","rgba","fireResizeContent","fireTextColorChange","fireResolveName","composeUnbinders","onSetupEditableToggle","onSetupEvent","setEnabled","isEditable","onSetupStateToggle","unbindEditableToogle","unbindFormatToggle","boundFormatChangeCallback","setActive","formatter","binding","formatChanged","initialized","once","onSetupFormatToggle","handleEvent","onActionToggleFormat$1","rawItem","undoManager","transact","execCommand","format","onActionExecCommand","command","global$4","cacheStorage","getCacheForId","storageId","currentData","legacyDefault","setItem","storage","storageString","localstorage","cache","splice","unshift","ColorCache","addColor","hsvColour","fromRgb","minRGB","maxRGB","hsvToHex","anyToHex","fromString$1","canvas","canvasContext","getContext","clearRect","fillStyle","fillRect","getImageData","foregroundId","backgroundId","mapColors","colorMap","colors","option$1","fallbackColor","getColors$2","calcCols","sqrt","defaultCols","calculatedCols","getColorCols$1","hasCustomColors$1","getDefaultForegroundColor","getDefaultBackgroundColor","getClosestCssBackgroundColorValue","isValidBackgroundColor","getCurrentColor","cssRgbValue","getAdditionalColors","hasCustom","applyColor","onChoice","colorPickerDialog","dialog","colorOpt","getColors$1","getCurrentColors","getFetch$1","callback","setIconColor","splitButtonApi","newColor","setIconFill","buttonApi","select$1","optCurrentHex","getToolTipText","lastColor","tooltipPrefix","colorText","registerTextColorButton","ui","registry","addSplitButton","select","fetch","_splitButtonApi","registerTextColorMenuItem","addNestedMenuItem","fancytype","initData","storageKey","isValid","initialData","colorpicker","windowManager","buttons","_api","details","onSubmit","getData","alert","onCancel","createPartialChoiceMenu","onItemValueHandler","alloyItems","createChoiceItems","itemPresets","useText","isSelected","isEnabled","renderChoiceItem","deriveMenuMovement","menuMarkers","getColorItems","backstage","useCustomColors","allowCustomColors","colorinput","hasCustomColors","getColors","cellOverEvent","cellExecuteEvent","makeCell","col","makeComponents","cells","cellRow","makeLabelText","fancyMenuItems","getCellLabel","shared","providers","makeAnnouncementText","makeCells","emptyLabelText","memLabel","selectedRow","selectedColumn","selectCells","getColorCols","widgetSpec","autocomplete","separator$3","nested","downwardsCaret","renderSubmenuCaret","underlinePath","translatedTooltip","toggle$1","fancy","render","card","CouplingApis","getCoupled","coupleConfig","coupleState","getOrCreate","getExistingCoupled","getExisting","CouplingSchema","CouplingState","coupled","lookupCoupled","coupledName","Coupling","nu$3","baseFn","callbacks","nCallback","isReady","cbs","cb","LazyValue","pure","errorReporter","make$5","then","aFutureB","toPromise","anonBind","futureB","toLazy","toCached","Future","Promise","partType$1","getAnchor","getHotspot","getAnchorOverrides","mapFetch","onOpenSync","processed","futureData","fetcher","getLazySink","tdata","openF","_onOpenSync","_highlightOnOpen","togglePopup","matchWidth","useMinWidth","buttonWidth","set$7","sinkDetail","internalSink","lazySinkFn","doRepositionMenus","makeSandbox$1","ariaControls","sandboxClasses","sandboxBehaviours","sandboxFields","schema$k","parts$e","Dropdown","switchToMenu","togglePopup$1","dropdownComp","HighlightNone","refetch","triggerExecute","dropdownBehaviours","handleRefetchTrigger","originalSandboxComp","dropdown","optSearcherState","newSandboxComp","searcherState","restoreState","getActiveMenuItemFrom","updateAriaOnHighlight","setActiveDescendant","activeMenuComp","resultsElem","controlledId","updateAriaOnDehighlight","getSearchPattern","FocusMode","createMenuItemFromBridge","isHorizontalMenu","parseForHorizontalMenu","menuitem","createNestedMenuItem","createToggleMenuItem","createSeparatorMenuItem","createFancyMenuItem","createAutocompleteItems","createCardMenuItem","createAutocompleterItem","createPartialMenu","createItem","itemHasIcon","identifyMenuLayout","createTieredDataFrom","partialMenu","Autocompleter","autocompleterId","processingAction","activeState","autocompleter","hideIfNecessary","editorBody","ariaOwnsAttr","getCombinedItems","choices","itemMeta","nr","getRng","initRange","createRng","selectNode","getAutocompleterRange","autocompleterApi","reload","fetchOptions","BUBBLE_TO_SANDBOX","display","lookupData","ld","focusMode","ContentFocus","createInlineMenuFrom","updateDisplay","combinedItems","cloneAutocompleterToEditorDoc","getDoc","getNode","newElm","deep","border","clip","overflow","padding","autocompleterUiApi","nonScrollingOverflows","isScrollingOverflowValue","isScroller","overflowX","overflowY","detectWhenSplitUiMode","popupSinkElem","ancestorsScrollers","scrollers","getBoundsFrom","sc","scrollableBoxes","constraints","constrainByMany","closest","DelayedFunction","ref","cancel","schedule","getTouch","touches","monitor","settings","startData","longpressFired","longpress$1","touch","distX","distY","isFarEnough","fireIfReady","setup$d","rawSettings","stopBackspace","tapEvent","simpleEvents","tapStopped","pasteTimeout","onPaste","onKeydown","isDangerous","onFocusIn","focusoutTimeout","onFocusOut","derive","rawTarget","adt$1","stopped","resume","complete","doTriggerHandler","isStopped","isCut","fromSource","handlerInfo","eventHandler","doTriggerOnUntilStopped","listeners","_logger","fromExternal","listener","triggerOnUntilStopped","EventRegistry","registerId","extraArgs","curried","curryArgs","unregisterId","handlersById","_eventName","filterByType","broadcastHandler","isAboveRoot","findHandler","Registry","readOrTag","unregister","tagId","conflict","failOnDuplicate","getById","Container","domWithoutAttributes","containerBehaviours","takeover","domEvents","triggerUntilStopped","_alloyId","triggerHandler","broadcast$1","broadcastData","receivers","receiver","destroy","schema$j","parts$d","excludeFactory","FormField","fieldBehaviours","descriptor","descriptorId","getField","getLabel","ActiveTabstopping","tabConfig","tabAttr","TabstopSchema","Tabstopping","global$3","renderFormFieldWith","pLabel","pField","extraClasses","extraBehaviours","renderFormFieldSpecWith","renderFormFieldDomWith","renderLabel$3","formChangeEvent","formCloseEvent","formCancelEvent","formActionEvent","formSubmitEvent","formBlockEvent","formUnblockEvent","formTabChangeEvent","formResizeEvent","renderCollection","runOnItem","htmlLines","getIcon","mapItemName","encodeAllRaw","tgt","collectionEvents","currentActive","iterCollectionItems","applyAttributes","childElm","ariaElements","isAriaElement","markValid","invalidConfig","getRoot","invalidClass","notify","notifyInfo","getContainer","validHtml","onValid","markInvalid","invalidState","onInvalid","_invalidState","validatorInfo","validate","onValidate","InvalidateApis","isInvalid","ActiveInvalidate","onEvent","validateOnLoad","InvalidateSchema","Invalidating","validation","Unselecting","unselectable","colorInputChangeEvent","colorSwatchChangeEvent","colorPickerCancelEvent","renderColorInput","colorInputBackstage","inputValue","span","emitSwatchChange","colorBit","memColorButton","renderPanelButton","colorPicker","valueOpt","colorButton","_field","labelPart","edgePart","model","edgeActions","det","mouseIsDown","tlEdgePart","tedgePart","trEdgePart","redgePart","brEdgePart","bedgePart","blEdgePart","ledgePart","thumbPart","isShift","spectrumPart","getValueFromEvent","spectrum","SliderParts","sliderChangeEvent","getEventSource","evt","isTouchEvent$2","touchEvent","mouseEvent","minX","minY","min1X","min1Y","max1X","max1Y","xRange","yRange","halfX","halfY","step","useMultiplier","stepSize","speedMultiplier","snap","snapToGrid","snapStart","rounded","hasEdge","edgeName","hasLEdge","hasREdge","hasTEdge","hasBEdge","currentValue","xyValue","fireSliderChange$3","reduceBy","increaseBy","capValue","findValueOf","hasMinEdge","hasMaxEdge","minBound","maxBound","screenRange","capMin","capMax","findOffsetOf","extraValue","remainder","adjustment","rawSteps","maxSteps","snapValueOf","findOffsetOfValue$2","maxOffset","centerMinEdge","centerMaxEdge","getBoundsProperty","getMinXBounds","getMaxXBounds","getMinYBounds","getMaxYBounds","getXScreenRange","getYScreenRange","getCenterOffsetOf","componentMinEdge","componentMaxEdge","spectrumMinEdge","getXCenterOffSetOf","componentBounds","spectrumBounds","getYCenterOffSetOf","fireSliderChange$2","findValueOfOffset$1","handleMovement$2","xValue","moveBy$2","findPositionOfValue$1","slider","minEdge","maxEdge","minOffset","findOffsetOfValue$1","onLeft$2","onRight$2","onUp$2","onDown$2","edgeActions$2","HorizontalModel","setToMin","setToMax","findValueOfOffset","findPositionOfValue","setPositionFromValue","thumb","edges","getSpectrum","getLeftEdge","getRightEdge","thumbRadius","fireSliderChange$1","handleMovement$1","yValue","moveBy$1","findOffsetOfValue","onLeft$1","onRight$1","onUp$1","onDown$1","edgeActions$1","VerticalModel","getTopEdge","getBottomEdge","fireSliderChange","sliderValue","handleMovement","isVerticalMovement","moveBy","TwoDModel","mX","mY","xPos","yPos","thumbXRadius","thumbYRadius","Slider","getThumb","modelDetail","wasDown","onChoose","onDragStart","onDragEnd","sliderBehaviours","onChange","changeValue","getInitialValue","onInit","resetToMin","resetToMax","fieldsUpdate","sliderUpdate","paletteUpdate","owner$1","schema$i","getPartName$1","make$4","formBehaviours","form","resPs","resPThunk","pName","opt","wrapper","Form","fSpec","fieldParts","validInput","invalidInput","validatingInput","translatePrefix","rgbFormFactory","getClass","onValidHexx","onInvalidHexx","invalidation","renderTextField","description","helptext","comps","concats","copyRgbToForm","rgb","memPreview","updatePreview","preview","rgbFormSketcher","setValueRgb","onInvalidInput","onValidRgb","hexField","copyRgbToHex","onValidInput","isHexInputEvent","onValidHex","formPartStrings","redStrings","greenStrings","blueStrings","hexStrings","updateHex","copyHexToRgb","paletteFactory","setColour","ctx","grdWhite","createLinearGradient","addColorStop","grdBlack","saturationBrightnessPaletteSketcher","_detail","_thumb","_slider","setHue","_apis","setPaletteHue","setThumb","setPaletteThumb","makeFactory","colourPickerSketcher","rgbForm","onInvalidHex","sbPalette","paletteRgba","paletteHue","memSlider","sliderFactory","memPalette","memRgb","updatePalette","_hex","palette","updateFields","updateSlider","hueDegreesToSlider","updatePaletteThumb","runUpdates","updates","updateState","hexToHsv","onFieldsUpdate","oldHue","newHsv","newHex","onPaletteUpdate","hueSliderToDegrees","oldRgb","oldHsv","onSliderUpdate","ComposingConfigs","mem","processors","memento","rawProcessors","other","rawValue","postprocess","withComp","optInitialValue","getter","setter","withElement","english","renderColorPicker","colourPickerFactory","translate$1","memPicker","picker","valOpt","global$2","global$1","renderDropZone","actions","onDrop","transferEvent","handleFiles","dataTransfer","files","onSelect","allowedImageFileTypes","explode","file","filterByExtension","memInput","accept","rate","throttle","beforeObject","afterObject","craftWithClasses","outline","craft","containerClasses","triggerTab","targetComp","isPseudoStop","dialogChannel","titleChannel","bodyChannel","footerChannel","bodySendMessageChannel","dialogFocusShiftedChannel","isSafariOrFirefox","isElementScrollAtBottom","scrollHeight","scrollToY","writeValue","iframeElement","fallbackFn","iframe","contentDocument","lastScrollTop","isScrollAtBottom","getScrollingElement","scrollAfterWrite","contentWindow","writeValueThrottler","interval","newArgs","tempArgs","adaptable","renderIFrame","baseClass","opaqueClass","transparent","containerBorderedClass","srcdoc","sandboxed","sourcing","stream","cachedValue","_frameComponent","frameComponent","setSrcdocValue","throttler","getDynamicSource","streamContent","renderImagePreview","cachedData","url","memImage","memContainer","fakeValidatedData","zoom","cachedWidth","cachedHeight","translatedData","z","applyFramePositioning","panel","panelW","panelH","zoomToFit","imageWidth","imageHeight","calculateImagePosition","imageComponent","img","image","reject","loaded","naturalWidth","naturalHeight","internalToolbarButtonExecute","commonButtonDisplayEvent","toolbarButtonEventOrder","forceInitialSize","renderIcon$1","iconsProvider","renderIconFromPack$1","renderReplaceableIconFromPack","renderLabel$1","updateMenuText","updateMenuIcon","renderCommonDropdown","optMemDisplayText","optMemDisplayIcon","onLeftOrRightInMenu","tooltipAttributes","fixWidthBehaviourName","memDropdown","searchable","searcherComp","focusSearchField","displayText","displayIcon","activeItem","retargetAndDispatchWith","handleRedirectToMenuItem","itemCompCausingCollapse","nowActiveMenuComp","isSeparator$2","separator$2","unwrapReferences","realItems","isMenuItemReference","isExpandingMenuItem","itemWithValue","generateValueIfRequired","newData","submenuItems","getFromExpandingItem","mainMenuSearchMode","searchSettings","getSearchModeForField","mainMenu","submenuSearchMode","getSearchModeForResults","submenus","isSingleListItem","dataAttribute","fetchItems","selectedValue","findItemByValue","HtmlSelect","option","initialValues","selectClasses","selectAttributes","selectBehaviours","firstOption","selectedIndex","schema$h","coupledPart","selfName","otherName","lock","onLockedChange","parts$c","locked","lockClass","FormCoupledInputs","coupledFieldBehaviours","field1Name","field1","field2Name","field2","getField1","getField2","getLock","parseSize","sizeText","convertUnit","inInch","px","pt","cm","pc","mm","in","noSizeConversion","_input","makeRatioConverter","currentFieldText","otherFieldText","cValue","oValue","cSize","oSize","ratioSizeConversion","scale","baseInputBehaviours","multiline","validatingBehaviours","vl","inputMode","inputmode","classname","pTextField","extraClasses2","flex","maximized","getAnimationRoot","slideConfig","getDimensionProperty","dimension","getDimension","disableTransitions","shrinkingClass","growingClass","setShrunk","openClass","closedClass","setGrown","doImmediateShrink","slideState","_calculatedSize","setCollapsed","onStartShrink","onShrunk","doStartShrink","calculatedSize","doStartSmartShrink","doStartGrow","wasShrinking","beforeSize","fullSize","setExpanded","onStartGrow","isGrowing","_slideState","isShrinking","SlidingApis","isExpanded","grow","shrink","immediateShrink","hasGrown","hasShrunk","isCollapsed","isTransitioning","toggleGrow","immediateGrow","onGrown","ActiveSliding","SlidingSchema","Sliding","getMenuButtonApi","setText","setIcon","renderMenuButton","tabstopping","fetchContext","pattern","getFetch","getButton","getMenuItemAction","orig","getMenuItemSetup","renderLabel","leafLabelEventsId","renderLeafLabel","onLeafAction","visible","treeId","selectedId","internalMenuButton","btn","button","isLeftArrowKey","code","isRightArrowKey","dirComp","dirLabelElement","renderIconFromPack","renderIcon","directoryLabelEventsId","renderDirectoryLabel","noChildren","toggleExpandChildren","directoryEle","directoryComp","willExpand","parentDirElement","parentDirLabelElement","renderDirectoryChildren","expandedIds","renderDirectory","labelTabstopping","directoryEventsId","expandedIdsCell","childrenVisible","includes","_cmp","childrenComp","treeEventsId","ActiveStreaming","streamConfig","streamState","streams","cancelEvent","_config","setTimer","StreamingState","StreamingSchema","streamInfo","sInfo","onStream","stopEvent","Streaming","setValueFromItem","itemData","setCursorAtEnd","setSelectionOn","attemptSelectOver","selectsOver","inputDisplay","getDisplayText","setSelectionToEnd","itemExecute","schema$g","parts$b","_tmenu","previewing","lazyTypeaheadComp","selectOverTextInInput","populateFromBrowse","_menu","typeahead","Typeahead","navigateList","highlighter","focusBehaviours$1","getActiveMenu","typeaheadCustomEvents","responseTime","minChars","previousValue","pv","sandboxIsOpen","typeaheadComp","_typeaheadComp","onItemExecute","dismissOnBlur","typeaheadBehaviours","wrap","bindFuture","resA","bindResult","mapResult","foldResult","whenError","whenValue","withTimeout","timeout","errorThunk","timedOut","nu$1","FutureResult","renderCommonSpec","actionOpt","domFinal","renderIconButtonSpec","calculateClassesFromButtonType","buttonType","renderButtonSpec","translatedText","renderButton$1","buttonSpec","getAction","renderFooterButton","isMenuFooterButtonSpec","menuButtonSpec","fixedSpec","isNormalFooterButtonSpec","isToggleButtonSpec","optMemIcon","memIcon","buttonTypeClasses","showIconAndText","translatedTextComponed","iconButtonSpec","newIcon","renderToggleButton","renderDialogButton","separator$1","toMenuItem","staticMenuItem","filteredTargets","targets","toMenuItems","filterLinkTargets","headerTargets","linkInfo","anchorTargets","anchorTargetTop","anchorTop","anchorTargetBottom","anchorBottom","filterByQuery","term","lowerCaseTerm","getItems","fileType","urlBackstage","urlInputValue","getLinkInformation","history","historyTargets","getHistory","errorId","set$1","get$1","make$2","dialogData","factories","bar","interpreter","renderBar","collection","alertbanner","iconTooltip","renderAlertBanner","renderInput","textarea","renderTextarea","backstageShared","renderLabel$2","iframeSpec","makeIframe","checkbox","toggleCheckboxHandler","makeIcon","className","memIcons","renderCheckbox","dropzone","renderGrid","listbox","initialItem","sketchSpec","listBoxWrap","renderListBox","selectbox","translatedOptions","chevron","selectWrap","renderSelectBox","sizeinput","converter","ratioEvent","pLock","formGroup","getFieldPart","isField1","widthField","heightField","_lock","newSize","unitDec","ex","em","rem","numText","formatSize","optCurrent","optOther","value1","value2","renderSizeInput","renderSlider","urlinput","updateHistory","urlEntry","addToHistory","filetype","typeaheadSpec","memUrlBox","_newValue","getValidationHandler","memInvalidIcon","invalidComp","completer","trimmedValue","_entry","errId","memStatus","optUrlPicker","getUrlPicker","browseUrlEvent","memUrlPickerButton","picker_text","componentData","urlData","fieldname","chosenData","renderUrlInput","customeditor","editorApi","memReplaced","ta","isOldCustomEditor","scriptId","ea","cvalue","ed","htmlpanel","imagepreview","renderTh","renderTd","renderTr","header","renderTable","tree","onToggleExpand","defaultExpandedIds","selectedIdCell","defaultSelectedId","renderTree","renderPanel","noFormParts","interpretInForm","oldBackstage","newBackstage","interpretParts","interpretWithoutForm","westEdgeX","middleX","eastEdgeX","northY","southY","centreY","lookupPreserveLayout","preserve","lookupFlippedLayout","flip","bubbleAlignments$2","valignCentre","alignCentre","alignLeft","alignRight","getInlineDialogAnchor","contentAreaElement","lazyAnchorbar","lazyUseEditableAreaAnchor","getInlineBottomDialogAnchor","lazyBottomAnchorBar","getBannerAnchor","getCursorAnchor","bodyElement","selectedCells","getSelectedCells","selectionTableCellRange","getNodeAnchor$1","getAnchors","isToolbarTop","useFixedToolbarContainer","getContentAreaContainer","inlineDialog","inlineBottomDialog","cursor","isNestedFormat","isFormatReference","defaultStyleFormats","mapFormats","userFormats","fmt","customFormats","formats","isInlineFormat","isBlockFormat","isSelectorFormat","formatNameWithPrefix","getStyleFormats","registeredUserFormats","registerFormats","registerCustomFormats","processBasic","isSelectedFor","getPreviewFor","getStylePreview","register$a","doEnrich","newItems","getStyleItems","enrichMenu","enrichSupported","isSeparator$1","formatName","newItem","enrichCustom","hasContentEditableState","isElement","contentEditable","isContentEditableTrue","isContentEditableFalse","getElementText","innerText","isValidAnchor","isAnchor","isHeader","tempNode","isChildOfContentEditableTrue","isValidHeader","headerTarget","headerId","getOrGenerateId","getLevel","anchorTarget","anchorId","anchorText","getTargetElements","elms","hasTitle","LinkTargets","getHeaderTargets","getAnchorTargets","STORAGE_KEY","isHttpUrl","isRecordOfUrlArray","getAllHistory","unparsedHistory","SyntaxError","itemsWithoutUrl","setAllHistory","isTruthy","makeMap","getPicker","getPickerSetting","pickerTypes","optFileTypes","_picker","types","getPickerTypes","getTextSetting","UrlInputBackstage","entry","init$6","lazySinks","contextMenuState","isPositionedAtTop","getDockingMode","setDockingMode","HeaderBackstage","getAll","block","parseStyle","getCssText","settingsFormats","eventsFormats","replaceSettings","_e","enriched","modifications","fromSettings","fromEvents","init$7","ColorInputBackstage","dialogSettings","DialogBackstage","commonBackstage","anchors","isContextMenuOpen","setContextMenuState","popupBackstage","dialogBackstage","parts$a","partType","schema$f","itemsPart","parts$9","CustomList","_external","shell","getListContainer","listBehaviours","setItems","itemComps","numListsRequired","numListsToAdd","itemsToAdd","makeItem","itemsToRemove","builtLists","setupItem","schema$e","parts$8","Toolbar","getGroupContainer","toolbarBehaviours","setGroups","groups","setup$a","isDocked$2","getBehaviours$1","StaticHeader","isDocked","getBehaviours","getOffsetParent","offsetParent$1","getOrigin","appear","contextualInfo","transitionClass","fadeOutClass","fadeInClass","disappear","isTopCompletelyVisible","isBottomCompletelyVisible","forceTopPosition","winBox","leftX","location","topY","forceBottomPosition","bottomY","getDockedLeftPosition","getPrior","getInitialPos","priorY","optScrollEnv","scrollEnv","scrollElmTop","currentScrollTop","getXYForRestoring","storePrior","getXYForSaving","setInitialPos","revertToOriginal","clearInitialPos","morph","offsetBox","scrollDelta","_left","_top","_right","_bottom","tryMorphToOriginal","isVisibleForModes","getModes","tryDecisionToFixedMorph","tryMorphToFixed","tryDockingPosition","tryMorph","tryMorphToOriginalOrUpdateFixed","forceDockWith","getDecision","storePriorIfNone","morphToStatic","setDocked","onUndocked","morphToCoord","onDocked","updateVisibility","morphToDocked","contextual","contextInfo","lazyContext","isPartiallyVisible","setVisible","applyFixedMorph","refreshInternal","lazyViewport","applyMorph","resetInternal","calculateMorphToOriginal","staticOrAbsoluteMorph","refresh$3","forceDockWithDecision","forceDockToTop","forceDockToBottom","DockingApis","setModes","ActiveDocking","dockInfo","dockState","onShown","onHidden","DockingSchema","Docking","docked","initialBounds","toolbarHeightChange","visibility","editorStickyOnClass","editorStickyOffClass","isDockedMode","updateIframeContentFlow","parentElem","parentWidth","getOccupiedHeight","updateSinkVisibility","sinkElem","updateEditorClasses","editorContainer","focusedElm","runOnSinkElement","onDockingSwitch","additionalBehaviours","headerHeight","boxHeight","topBound","constrainedBounds","constrainedBoundsY","headerElem","focusedElem","ownerDoc","activeElm","restoreFocus","rootElm","findFocusedElem","boundsWithoutOffset","StickyHeader","lazyHeader","containerHeader","viewHeight","innerHeight","scrollPos","markerElement","markerPos","markerHeight","markerTop","markerBottom","editorHeaderPos","editorHeaderHeight","editorHeaderTop","editorHeaderBottom","editorHeaderDockedAtTop","editorHeaderDockedAtBottom","scrollFromBehindHeader","groupToolbarButtonSchema","baseMenuButtonFields","MenuButtonSchema","createMenuButton","splitButtonSchema","SilverMenubar","setMenus","newMenus","internal","activeButton","hoveredButton","activeComp","hoveredComp","prev","schema$d","getPartName","make$1","getSlotNames","onSlot","def","slot","doShowing","hideSlot","hideSlots","onSlots","showSlot","getSlot","hideAllSlots","slotBehaviours","slotApis","SlotContainer","sSpec","sidebarSchema","makePanels","panelConfigs","bridged","createSidebar","sidepanel","optSidePanelSpec","sidePanelSpec","makeSidebar","slotContainer","updateSidebarRoleOnToggle","sidebar","sidebarState","whichSidebar","fixSize","autoSize","BlockingApis","getBusySpec","blockerBehaviours","blockSpec","blocker","isBlocked","onBlock","blockWith","unblock","onUnblock","blockingConfig","blockingState","BlockingSchema","Blocking","focusBusyComponent","throbber","toggleThrobber","tabIndexAttr","dataTabIndexAttr","tabIndex","toggleEditorTabIndex","_root","_behaviours","getBusySpec$1","throbberFocus","busyComp","setup$7","lazyThrobber","throbberState","stealFocus","isFocusEvent","targetElm","isPasteBinTarget","editorManager","fireAfterProgressState","setEditorTimeout","within","withinWidth","apportion","total","parray","generate$1","toUnit","partition","overflower","divide","tryFit","fitLast","fitAll","setGroups$1","storedGroups","bGroups","refresh$2","setOverflow","builtGroups","overflowGroup","focusedComp","availableWidth","overflows","schema$c","schema$b","parts$7","expandable","setMax","schema$a","parts$6","toggledClass","shouldSkipFocus","toolbarSandbox","bounder","FloatingToolbarButton","skipFocus","makeSandbox","toggleWithoutFocusing","schema$9","parts$5","ToolbarGroup","tgroupBehaviours","itemSelector","buildGroups","refresh$1","memFloatingToolbarButton","overflowGroups","floatingToolbarButton","SplitFloatingToolbar","getOverflowBounds","overflowToggledClass","splitToolbarBehaviours","getOverflow","schema$8","parts$4","onClosed","onOpened","toggleToolbar","overf","SplitSlidingToolbar","toolbarToggleEvent","_button","doSetGroups","renderToolbarGroupCommon","toolbarGroup","renderToolbarGroup","getToolbarBehaviours","toolbarSpec","modeName","onAttached","initGroups","renderMoreToolbarCommon","cyclicKeying","renderFloatingMoreToolbar","baseSpec","moreDrawerData","headerBounds","docElem","docBounds","overflowXOffset","renderSlidingMoreToolbar","renderToolbar","scrolling","baseButtonFields","schemaWithoutGroupButton","togglebutton","groupFields","viewButtonSchema","viewSchema","renderViewButton","isToggleButton","optTranslatedText","optTranslatedTextComponed","optIconSpec","hasIconAndText","renderButton","deviceDetection","View","hasGroups","endButtons","btnspec","renderButtonsGroup","getPane","getOnShow","_comp","viewConfig","getOnHide","makeViews","viewConfigs","internalViewConfig","pane","makeSlotContainer","getCurrentName","runOnPaneWithInstanceApi","onCallback","ViewWrapper","setViews","whichView","toggleView","showMainView","hideMainView","optCurrentSlotName","isTogglingCurrentView","hideContainer","showContainer","runOnShow","prevName","runOnHide","views","editorCont","partMenubar","partMultipleToolbar","_mToolbar","tc","_index","partToolbar","renderer","sliding","floating","toolbarFactory","onToolbarToggled","lazyToolbar","lazyMoreButton","partHeader","sticky","partPromotion","href","partSocket","partSidebar","partThrobber","partViewWrapper","partEditorContainer","OuterContainer","toolbarDrawerOpenState","getSocket","setSidebar","showSidebar","configKey","toggleSidebar","getHeader","setToolbar","renderedGroups","setToolbars","mToolbar","renderedToolbars","refreshToolbar","toggleToolbarDrawer","toggleToolbarDrawerWithoutFocusing","isToolbarDrawerToggled","getThrobber","focusToolbar","setMenubar","menubar","focusMenubar","defaultMenus","edit","tools","help","parseItemsString","identifyMenus","rawMenuData","userDefinedMenus","validMenus","isDefaultMenu","menuData","removedMenuItems","itemName","removedMenuItem","loadStylesheet","stylesheetUrl","styleSheetLoader","unload","loadRawCss","unloadRawCss","loadUiSkins","async","skinUiCss","Resource","loadShadowDomUiSkins","shadowDomSkinCss","loadSkin","isInline","skinResourceIdentifier","contentCSS","skinContentCss","loadUrlSkin","done","_skinLoaded","fireSkinLoaded$1","fireSkinLoaded","fireSkinLoadError$1","fireSkinLoadError","makeTooltipText","labelWithPlaceholder","generateSelectItems","generateItem","response","invalid","si","validateItems","preItems","getCurrentValue","shouldHide","createMenuItems","createSelectButton","tooltipWithPlaceholder","textUpdateEventName","getComponent","Delimiter","buildBasicSettingsDataset","settingName","delimiter","rawFormats","SemiColon","btnTooltip$4","fallbackAlignment","alignMenuItems","getSpec$4","_format","alignment","fireAlignTextUpdate","canApply","findNearest","getStyles","btnTooltip$3","fallbackFormat","getSpec$3","fireBlocksTextUpdate","btnTooltip$2","systemFont","systemStackFonts","splitFonts","fontFamily","fonts","font","matchesStack","getSpec$2","getMatchingValue","getFirstFont","queryCommandValue","userStack","matchOpt","isSystemFontStack","fireFontFamilyTextUpdate","unsupportedLength","decimalDigits","exponentPart","unsignedDecimalLiteral","accepted","unitRaw","check","isUnit","Keys","tab","enter","backspace","delete","up","down","space","home","pageUp","pageDown","createBespokeNumberInput","currentComp","updateInputValue","customEvents","fromInput","focusBack","alloyComp","getNewValue","lenghtDelta","oldStart","oldEnd","decrease","increase","goToParent","focusInput","makeStepperButton","editorOffCellStepButton","altExecuting","memMinus","memPlus","buttonNode","wrapperComp","btnTooltip$1","fallbackFontSize","legacyFontSizes","keywordFontSizes","small","medium","large","toPt","fontSize","precision","factor","pow","toLegacy","getSpec$1","legacy","Space","fireFontSizeTextUpdate","btnTooltip","getSpec","getFormatItems","flattenedItems","fireStylesTextUpdate","schema$7","arrowPart","arrow","buttonPart","splitDropdown","parts$3","SplitDropdown","executeOnButton","buttonEvents","splitDropdownBehaviours","getButtonApi","getToggleApi","getTooltipAttributes","focusButtonEvent","renderCommonStructure","optIcon","optText","renderCommonToolbarButton","specialisation","_d","itemApi","toolbarButtonBehaviours","renderToolbarButtonWith","bonusEvents","renderToolbarToggleButtonWith","fetchChoices","defaultToolbar","renderFromBridge","bridgeBuilder","renderToolbarButton","renderToolbarToggleButton","menubutton","splitbutton","buttonComp","_c","renderSplitButton","grouptoolbarbutton","identify","identifyButtons","allowToolbarGroups","TopToBottom","renderFloatingToolbarButton","bespokeButtons","fontsize","fontsizeinput","skip_focus","updateFunction","parsedText","defaultUnit","getConfigFromUnit","isValidValue","fireFontSizeInputTextUpdate","getNumberInputSpec","fontfamily","blocks","createToolbar","toolbarConfig","filteredItemGroups","subItem","removeUnusedDefaults","strToolbar","groupsStrings","convertStringToolbar","isToolbarGroupSettingArray","lookupButton","toolbarItem","prefixes","extractFrom","toolbarGroups","rawUiConfig","toolbarButtonsConfig","detection","isiOS12","Iframe","lastToolbarWidth","eTargetNode","targetNode","uiRoot","popupUi","dialogUi","attachUiMotherships","innerWidth","initialDocEle","lastWindowDimensions","lastDocumentDimensions","resizeWindow","outer","resizeDocument","docEle","fireScrollContent","elementLoad","setupEvents$1","socket","limit","unbinder","addCommand","_ui","addQueryValueHandler","nodeChanged","toolbarMode","iframeContainer","parseToInt","numToPx","calcCappedSize","minSize","maxSize","minOverride","maxOverride","getHeightWithFallback","baseHeight","minHeight","getHeight","getWidth","baseWidth","minWidth","InlineHeader","floatContainer","isSticky","editorMaxWidthOpt","headerBackstage","isSplitToolbar","calcToolbarOffset","tbar","getOffsetParent$1","repositionPopups$1","stickyAction","bodyMargin","optToolbarWidth","restoreAndGetCompleteOuterContainerWidth","targetBounds","isOffsetParentBody","topValue","baseProperties","widthProperties","toolbarWidth","updateChromePosition","doUpdateMode","fc","currentMode","newMode","toolbarHeight","docHeight","calcMode","verticalDir","addClass","removeClass","updateMode","getTargetPosAndBounds","Inline","toolbarPersist","uiContainer","prevPosAndBounds","resizeContent","prevPos","prevBounds","hasResized","lastScrollX","updateUi","newScrollX","_args","setupEvents","hideContextToolbarEvent","runOnExecute","formApi","getFormApi","renderContextToggleButton","renderContextButton","buildInitGroups","commands","findPrimary","mementos","asSpecs","compInSystem","ContextForm","isVerticalOverlap","threshold","getSelectionBounds","leaf$1","getRangeRect","bodyPos","getContextToolbarBounds","toolbarType","viewportBounds","contentAreaBox","toolbarOrMenubarEnabled","getHorizontalBounds","isToolbarLocationTop","headerBox","isToolbarBelowContentArea","isToolbarAbove","containerBounds","getVerticalBounds","bubbleAlignments$1","inset","anchorOverrides","shouldUseInsetLayouts","determineInsetLayout","contextbar","selectionBounds","isSameAnchorElement","lastElement","isEntireElementSelected","currentPosition","preservePosition","isReposition","getAnchorSpec$2","mobile","smartInsetLayout","getInsetLayouts","matchTargetWith","ctxs","toolbarApi","contextToolbars","contextForms","matchStartNode","nodeCandidates","editorCandidates","nodeMatches","editorMatches","doesPositionExist","filterToolbarsByPosition","hasSelectionToolbars","hasNodeToolbars","nodeToolbars","selectionToolbars","filterByPositionForStartNode","matchAncestor","startNode","scopes","ancestorElem","inNodeScope","findPosition","basePosition","filterByPositionForAncestorNode","categorise","forms","inEditorScope","formNavigators","lookupTable","registerForm","contextForm","launch","registerToolbar","contextToolbar","forwardSlideEvent","backSlideEvent","changeSlideEvent","resizingClass","register$9","registryContextToolbars","lastTrigger","lastContextPosition","currentWidth","newWidth","newContents","oldContents","forwardContents","renderContextToolbar","canLaunchToolbar","shouldContextToolbarHide","contextToolbarBounds","anchorBounds","getAnchorElementBounds","hideOrRepositionIfNecessary","contextBarEle","wrapInPopDialog","shortcuts","getScopes","alloySpec","buildToolbar","allButtons","buildContextToolbarGroups","buildContextFormGroups","anchorLayout","getAnchorLayout","launchContext","launchContextToolbar","isSameLaunchElement","isDragging","rootElem","isOutsideRoot","lookup$1","toolbarKey","registerController","getMenuItems","getOptions","hash","oldApi","unbindWatcher","watcher","setCurrent","addMenuButton","onToolbarSetup","onMenuSetup","lineHeightSpec","normalise","register$7","customCode","customValue","lang","languageSpec","register$6","createAlignMenu","createFontFamilyMenu","createStylesMenu","createBlocksMenu","createFontSizeMenu","onSetupOutdentState","queryCommandState","register$5","addButton","registerButtons$2","makeSetupHandler","pasteAsText","pastePlainTextToggleHandler","onActionToggleFormat","registerButtons$1","_idx","addToggleButton","registerFormatButtons","registerCommandButtons","registerCommandToggleButtons","register$3","addMenuItem","registerMenuItems$2","onSetupUndoRedoState","register$2","registerMenuItems$1","registerButtons","onSetupVisualAidState","hasVisual","register$1","registerToolbarButton","addToggleMenuItem","registerMenuItems","setup$6","cmd","register$8","applyFormat","removeFormat","registerCommands","fallbackColorForeground","fallbackColorBackground","lastForeColor","lastBackColor","register$c","register$4","patchPipeConfig","shouldNeverUseNative","getAvoidOverlapSelector","getContextMenu","contextMenus","contextMenu","isTouchEvent$1","transposeContentAreaContainer","containerPos","getPos","dx","dy","transpose","getPointAnchor","pageX","pageY","fromPageXY","fromClientXY","getSelectionAnchor","getAnchorSpec$1","anchorType","getNodeAnchor","initAndShow$1","buildMenu","contextmenu","anchorSpec","bubbleAlignments","highlightImmediately","getAnchorSpec","initAndShow","openiOS","originalSelection","selectionReset","setRng","unbindEventListeners","preventMousedown","clearSelectionReset","setupiOSOverrides","rngRect","isTouchWithinSelection","makeContextItem","commonMenuItem","commonItem","addContextMenuGroup","groupItems","lastMenuItem","isTriggeredByKeyboard","isTouchEvent","pointerType","getSelectedElement","setup$5","hideContextMenu","showContextMenu","isNativeOverrideKeyEvent","isContextMenuDisabled","getAnchorType","selectedElement","sections","allItems","generateContextMenu","hideEvents","subtract","changes","asFixed","coord","asAbsolute","asOffset","toStyles","stylesOpt","absorb","partialCoord","originalCoord","absorbOne","stencil","optX","optY","parseAttrToInt","NaN","getCoords","snapInfo","snapsInfo","leftAttr","topAttr","moveOrSnap","newCoord","mustSnap","findClosestSnap","findSnap","fixedCoord","spanned","stopDrag","findMatchingSnap","snaps","sensor","inRange","coord1","coord2","withinRange","getSnapPoints","bestSnap","deltas","getDeltas","bestDeltas","DraggingApis","snapTo","dragConfig","getTarget","repositionTarget","snapPin","snapTo$1","initialAttribute","instigate","anyComponent","zindex","changeZIndex","discard","zIndex","resetZIndex","createComponent","blockerClass","blockerEvents","SnapSchema","schema$6","getCurrentCoord","oc","lift3","calcNewCoord","optSnaps","currentCoord","coords","absoluteCoord","newCoords","offset$1","clampCoords","translated","deltaX","deltaY","snapping","onSensor","calcStartData","dragState","dragMode","dragStartData","getStartData","dlt","onDrag","dragBy","updateStartState","setStartData","MouseData","getDelta","events$3","stop$1","delayDrop","dragApi","drop","forceDrop","init$3","schema$5","TouchData","getDataFrom","events$2","blockerSingleton","stopBlocking","init$2","mouse","mouseOrTouch","DraggingBranches","DragState","previous","dragEvent","nuData","calculateDelta","Dragging","dragger","calcSnap","selectorOpt","td","snapWidth","selectorHandle","sensorLeft","sensorTop","getSnapsConfig","cellOpt","currentTd","isSameCell","createSelector","setup$4","tlTds","brTds","startCell","finishCell","getTopLeftSnap","memTopLeft","getBottomRightSnap","memBottomRight","topLeftSnaps","bottomRightSnaps","bottomRight","getSnapConfig","isAbove","isBelow","cellRect","viewportHeight","aboveViewport","belowViewport","showOrHideHandle","snapTopLeft","snapBottomRight","otherCells","upOrLeftCells","downOrRightCells","renderElementPath","renderPathData","_btn","renderElement","newPath","isDefaultPrevented","isPropagationStopped","updatePath","ResizeTypes","resize","resizeType","originalHeight","originalWidth","Both","getDimensions","dim","fireResizeEditor","keyboardHandler","renderResizeHandler","None","Vertical","getResizeType","resizeLabel","_target","renderStatusbar","renderRightContainer","replaceCountText","words","characters","currentVal","wordCount","renderWordCount","getTextComponents","shouldRenderHelp","shouldRenderElementPath","shouldRenderRightContainer","getTextComponentClasses","flexStart","flexEnd","container3Columns","shortcutText","renderHelpAccessibility","resizeHandler","getComponents","getLazyMothership","setup$3","setupForTheme","lazyUiRefs","getUiMotherships","optDialogMothership","optPopupMothership","dm","pm","lazyGetInOuterOrDie","LazyUiReferences","lazyMothership","lazyDialogMothership","lazyPopupMothership","deviceClasses","isToolbarBottom","memAnchorBar","memBottomAnchorBar","lazyAnchorBar","backstages","makePromotion","promotion","renderMainUi","verticalDirAttributes","fireToggleToolbarDrawer","hasMultipleToolbar","hasToolbar","hasMenubar","shouldHavePromotion","hasAnyContents","menubarCollection","makeHeaderPart","sidebarContainer","viewWrapper","statusbar","editorComponents","isHidden","opacity","setEditorSize","parsedHeight","parsedWidth","getWidthWithFallback","renderUIWithRefs","toolbarGroupButtonConfig","addGroupToolbarButton","sidebars","toolbarOpt","addShortcut","addQueryStateHandler","channel","fireDismissPopups","onTouchstart","onTouchmove","onTouchend","onMousedown","onMouseup","onContentClick","onContentMouseup","onContentMousedown","loopEditor","relatedTarget","onWindowScroll","onWindowResize","onElementScroll","onEditorResize","onEditorProgress","onDismissPopups","setup$b","handleToggle","setup$8","popups","getMothership","dialogs","renderUI","isGridUiContainer","sinkSpec","reactiveWidthSpec","uiMothership","renderDialogUi","getPopupSinkBounds","renderPopupUi","reuseDialogUiForPopuUi","schema$2","basic","parts$2","dragBlockClass","getDragBounds","ModalDialog","dialogComp","modalEventsId","externalBlocker","blockerDom","getFooter","setIdle","setBusy","modalBehaviours","labelledElement","labelElement","labelId","labelledBy","dialogToggleMenuItemSchema","dialogToggleMenuItemDataProcessor","baseFooterButtonFields","dialogFooterButtonFields","normalFooterButtonFields","menuFooterButtonFields","toggleButtonSpecFields","dialogFooterButtonSchema","submit","alertBannerFields","alertBannerSchema","buttonFields","buttonSchema","formComponentFields","formComponentWithLabelFields","checkboxFields","checkboxSchema","checkboxDataProcessor","collectionFields","collectionSchema","collectionDataProcessor","colorInputFields","colorInputSchema","colorInputDataProcessor","colorPickerSchema","colorPickerDataProcessor","customEditorFields","defaultedPostMsg","customEditorFieldsOld","customEditorSchema","customEditorDataProcessor","dropZoneSchema","dropZoneDataProcessor","createGridFields","itemsField","htmlPanelFields","htmlPanelSchema","iframeFields","iframeSchema","iframeDataProcessor","imagePreviewSchema","imagePreviewDataProcessor","inputFields","inputSchema","inputDataProcessor","createLabelFields","listBoxSingleItemFields","listBoxNestedItemFields","listBoxItemSchema","listBoxFields","listBoxSchema","listBoxDataProcessor","selectBoxFields","selectBoxSchema","selectBoxDataProcessor","sizeInputFields","sizeInputSchema","sizeInputDataProcessor","sliderFields","sliderSchema","sliderInputDataProcessor","tableFields","tableSchema","textAreaFields","textAreaSchema","textAreaDataProcessor","baseTreeItemFields","treeItemLeafSchema","treeItemDirectoryFields","treeItemDirectorySchema","treeItemSchema","treeFields","treeSchema","urlInputFields","urlInputSchema","urlInputDataProcessor","createItemsField","itemSchema","sErr","passValue","panelSchema","panelFields","tabFields","tabPanelFields","tabPanelSchema","dialogButtonFields","dialogButtonSchema","dialogSchema","tabpanel","urlDialogButtonSchema","urlDialogSchema","getAllObjects","isNamedItem","dataProcessors","togglemenuitem","createDataValidator","namedItems","getNamedItems","getDataProcessor","internalDialog","dataValidator","DialogManager","openUrl","redial","ActiveReflecting","reflectingConfig","reflectingState","renderComponents","newComponents","rawData","ReflectingApis","reflectState","ReflectingSchema","Reflecting","toValidValues","renderBodyPanel","memForm","formValue","TabButton","tabButtonBehaviours","schema$1","tabsPart","barDetail","dismissTab$1","tabbar","changeTab$1","clickToDismiss","tabClass","parts$1","Tabbar","tabbarBehaviours","selectedClass","Tabview","tabviewBehaviours","barPart","tabs","viewPart","TabSection","changeTabBy","section","byPred","tabSectionBehaviours","selectFirst","tabValue","tabview","tabWithValue","tabData","onChangeTab","onDismissTab","getViewItems","showTab","tabKey","setTabviewHeight","updateTabviewHeight","dialogBody","maxTabHeight","tablist","documentElement$1","tabviewHeight","currentTabHeight","dialogTopMargin","dialogBottomMargin","getMaxTabviewHeight","getTabview","smartMode","allTabs","extraEvents","tabviewComp","heights","_tab","measureHeights","maxTabHeightOpt","getMaxHeight","oldHeight","newHeight","SendDataToSectionChannel","SendDataToViewChannel","renderTabPanel","storedValue","updateDataWithForm","formData","validData","setDataOnForm","oldTab","tabMode","_viewItems","oldName","tsection","renderBody","dialogId","contentId","ariaAttrs","incoming","isTabPanel","hiddenHeader","pClose","pUntitled","pBodyMessage","pFooter","footer","pFooterGroup","startButtons","renderDialog$1","dialogClass","blockerBackdropClass","scrollLockClass","extraStyles","dialogEvents","renderClose","renderTitle","titleId","renderDragHandle","pTitle","pHandle","draghandle","draggable","renderModalHeader","bs","getEventExtras","lazyDialog","closeWindow","blockEvent","fullscreenClass","largeDialogClass","mediumDialogClass","getDialogSizeClass","updateDialogSizeClass","dialogSizeClass","toggleFullscreen","currentSize","currentSizeClass","toggle$3","renderModalDialog","mapMenuButtons","menuItemStates","mapItems","extractCellsToObject","innerAcc","initCommonEvents","fireApiEvent","_event","self","initDialog","getInstanceApi","withSpec","currentDialogInit","rootNode","cur","onTabChange","newTabName","oldTabName","footerButtons","buttonGroups","makeGroup","renderFooter","initSpec","makeButton","lookupByName","buttonName","renderModalFooter","getCompByName","getFormWrapper","footerState","getDialogApi","doRedial","withRoot","instanceApi","valueComp","setData","prevData","mergedData","newInternalData","dialogState","validateData$1","tabSection","getId","dialogInit","storedMenuButtons","renderDialog","dialogSize","dialogSizeClasses","bodySpec","renderModalBody","objOfCells","modalAccess","outerForm","renderInlineDialog","refreshDocking","dialogLabelId","dialogContentId","memHeader","renderInlineHeader","memBody","renderInlineBody","storagedMenuButtons","optMemFooter","renderInlineFooter","memFooter","global","SUPPORTED_MESSAGE_ACTIONS","isSupportedMessage","mceAction","renderUrlDialog","renderIframeBody","currentDialog","initUrlDialog","iframeUri","base_uri","iframeDomain","protocol","port","messageHandlerUnbinder","isSameOrigin","insertContent","handleMessage","isCustomMessage","onMessage","iframeEle","iframeWin","postMessage","sendMessage","getUrlDialogApi","validateData","isAlertOrConfirmDialog","inlineAdditionalBehaviours","isStickyToolbar$1","alertDialog","closeDialog","memFooterClose","titleSpec","closeSpec","footerCloseButton","setup$2","confirmDialog","memFooterYes","footerNo","footerYesButton","setup$1","openModalUrlDialog","openModalDialog","internalInitialData","openInlineDialog","config$1","windowParams","inlineDialogComp","persistent","openBottomInlineDialog","contentAreaContainer","confirm","registerOptions","colorProcessor","colorColsProcessor","register$d","popupSinkBounds","renderModeUI","windowMgr","renderResult","getWindowManagerImpl","getNotificationManagerImpl","contentArea","win$1","closeCallback","notificationWrapper","notification","progressBar","thisNotification","notificationSpec","allNotifications","notificationManager","getNotifications","previousNotification","getEl","nodeAnchor","nuText","getArgs","NotificationManagerImpl"],"mappings":"6FAIA,WAGI,MAAMA,EAAmBC,OAAOC,eAC1BC,EAAW,CAACC,EAAGC,EAAaC,KAChC,IAAIC,EACJ,QAAID,EAAUF,EAAGC,EAAYG,aAGM,QAAxBD,EAAKH,EAAEC,mBAAgC,IAAPE,OAAgB,EAASA,EAAGE,QAAUJ,EAAYI,IACnG,EAcUC,EAAWC,GAAQC,GAZVC,KACb,MAAMC,SAAWD,EACjB,OAAU,OAANA,EACK,OACQ,WAANC,GAAkBC,MAAMC,QAAQH,GAClC,QACQ,WAANC,GAAkBX,EAASU,EAAGI,QAAQ,CAACC,EAAGC,IAAUA,EAAMC,cAAcF,KAC1E,SAEAJ,CACf,EAEsCO,CAAOT,KAAWD,EAC9CW,EAAeX,GAAQC,UAAgBA,IAAUD,EACjDY,EAAOT,GAAKU,GAAKV,IAAMU,EAEvBC,EAAWf,EAAS,UAC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