@lotte-innovate/ui-component-test 0.0.115 → 0.0.116
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/globals.css +3 -3
- package/dist/lib/color/alpha.mjs.map +1 -0
- package/dist/lib/color/constants.mjs.map +1 -0
- package/dist/lib/color/light.mjs.map +1 -0
- package/dist/lib/components/AlertDialog/index.mjs.map +1 -0
- package/dist/lib/components/BarChart/index.mjs.map +1 -0
- package/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -0
- package/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -0
- package/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -0
- package/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -0
- package/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -0
- package/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -0
- package/dist/lib/components/Breadcrumb/index.mjs.map +1 -0
- package/dist/lib/components/BubbleChart/index.mjs.map +1 -0
- package/dist/lib/components/Callout/index.mjs.map +1 -0
- package/dist/lib/components/CheckboxGroup/index.mjs.map +1 -0
- package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -0
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -0
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -0
- package/dist/lib/components/ContextMenu/index.mjs.map +1 -0
- package/dist/lib/components/DataList/index.mjs.map +1 -0
- package/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -0
- package/dist/lib/components/Dialog/index.mjs.map +1 -0
- package/dist/lib/components/DoughnutChart/index.mjs.map +1 -0
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -0
- package/dist/lib/components/DropdownMenu/index.mjs.map +1 -0
- package/dist/lib/components/Editor/index.d.ts +15 -14
- package/dist/lib/components/Editor/index.js +50 -34
- package/dist/lib/components/Editor/index.mjs +3 -0
- package/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -0
- package/dist/lib/components/Gnb/index.mjs.map +1 -0
- package/dist/lib/components/Grid/Pagination.mjs.map +1 -0
- package/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -0
- package/dist/lib/components/HoverCard/index.mjs.map +1 -0
- package/dist/lib/components/LineChart/index.mjs.map +1 -0
- package/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -0
- package/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -0
- package/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -0
- package/dist/lib/components/Menubar/index.mjs.map +1 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -0
- package/dist/lib/components/NavigationMenu/index.mjs.map +1 -0
- package/dist/lib/components/PieChart/index.mjs.map +1 -0
- package/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -0
- package/dist/lib/components/Popover/index.mjs.map +1 -0
- package/dist/lib/components/RadarChart/index.mjs.map +1 -0
- package/dist/lib/components/RadioCards/index.mjs.map +1 -0
- package/dist/lib/components/RadioGroup/index.mjs.map +1 -0
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -0
- package/dist/lib/components/SegmentedControl/index.mjs.map +1 -0
- package/dist/lib/components/Select/index.d.ts +1 -1
- package/dist/lib/components/Select/index.js +2 -2
- package/dist/lib/components/Select/index.mjs +3 -0
- package/dist/lib/components/Toast/index.mjs.map +1 -0
- package/dist/lib/components/ToggleGroup/index.mjs.map +1 -0
- package/dist/lib/constants.mjs.map +1 -0
- package/dist/lib/utils/utils.mjs.map +1 -0
- package/dist/public/tinymce/icons/default/index.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -1
- package/public/tinymce/CHANGELOG.md +3453 -0
- package/public/tinymce/README.md +73 -0
- package/public/tinymce/bower.json +27 -0
- package/public/tinymce/composer.json +52 -0
- package/public/tinymce/icons/default/icons.js +194 -0
- package/{dist/lib/public/tinymce/icons/default/icons.mjs → public/tinymce/icons/default/icons.min.js} +1 -3
- package/public/tinymce/icons/default/index.js +7 -0
- package/public/tinymce/license.txt +21 -0
- package/public/tinymce/models/dom/index.js +7 -0
- package/public/tinymce/models/dom/model.js +8040 -0
- package/public/tinymce/models/dom/model.min.js +4 -0
- package/public/tinymce/package.json +32 -0
- package/public/tinymce/plugins/advlist/index.js +7 -0
- package/public/tinymce/plugins/advlist/plugin.js +259 -0
- package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
- package/{dist/public → public}/tinymce/plugins/autolink/index.js +1 -2
- package/public/tinymce/plugins/autolink/plugin.js +228 -0
- package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
- package/public/tinymce/plugins/code/index.js +7 -0
- package/public/tinymce/plugins/code/plugin.js +85 -0
- package/public/tinymce/plugins/code/plugin.min.js +4 -0
- package/public/tinymce/plugins/codesample/index.js +7 -0
- package/public/tinymce/plugins/codesample/plugin.js +2463 -0
- package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
- package/public/tinymce/plugins/image/index.js +7 -0
- package/public/tinymce/plugins/image/plugin.js +1505 -0
- package/public/tinymce/plugins/image/plugin.min.js +4 -0
- package/public/tinymce/plugins/link/index.js +7 -0
- package/public/tinymce/plugins/link/plugin.js +1242 -0
- package/public/tinymce/plugins/link/plugin.min.js +4 -0
- package/public/tinymce/plugins/lists/index.js +7 -0
- package/public/tinymce/plugins/lists/plugin.js +2172 -0
- package/public/tinymce/plugins/lists/plugin.min.js +4 -0
- package/public/tinymce/plugins/table/index.js +7 -0
- package/public/tinymce/plugins/table/plugin.js +3462 -0
- package/public/tinymce/plugins/table/plugin.min.js +4 -0
- package/public/tinymce/skins/content/default/content.css +61 -0
- package/public/tinymce/skins/content/default/content.js +2 -0
- package/public/tinymce/skins/content/default/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/content.css +785 -0
- package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
- package/{dist/public → public}/tinymce/skins/ui/oxide/content.inline.js +1 -2
- package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/content.js +2 -0
- package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
- package/public/tinymce/skins/ui/oxide/skin.js +2 -0
- package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/{dist/public → public}/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -2
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
- package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
- package/{dist/public → public}/tinymce/skins/ui/oxide-dark/content.inline.js +1 -2
- package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
- package/{dist/public → public}/tinymce/skins/ui/oxide-dark/content.js +1 -2
- package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
- package/{dist/public → public}/tinymce/skins/ui/oxide-dark/skin.js +1 -2
- package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/{dist/public → public}/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -2
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/public/tinymce/themes/silver/index.js +7 -0
- package/public/tinymce/themes/silver/theme.js +30775 -0
- package/public/tinymce/themes/silver/theme.min.js +384 -0
- package/public/tinymce/tinymce.d.ts +3238 -0
- package/public/tinymce/tinymce.js +31779 -0
- package/public/tinymce/tinymce.min.js +384 -0
- package/dist/lib/_virtual/index.mjs +0 -2
- package/dist/lib/_virtual/index10.mjs +0 -2
- package/dist/lib/_virtual/index10.mjs.map +0 -1
- package/dist/lib/_virtual/index11.mjs +0 -2
- package/dist/lib/_virtual/index11.mjs.map +0 -1
- package/dist/lib/_virtual/index12.mjs +0 -2
- package/dist/lib/_virtual/index12.mjs.map +0 -1
- package/dist/lib/_virtual/index13.mjs +0 -2
- package/dist/lib/_virtual/index13.mjs.map +0 -1
- package/dist/lib/_virtual/index14.mjs +0 -2
- package/dist/lib/_virtual/index14.mjs.map +0 -1
- package/dist/lib/_virtual/index2.mjs +0 -2
- package/dist/lib/_virtual/index2.mjs.map +0 -1
- package/dist/lib/_virtual/index3.mjs +0 -2
- package/dist/lib/_virtual/index3.mjs.map +0 -1
- package/dist/lib/_virtual/index4.mjs +0 -2
- package/dist/lib/_virtual/index4.mjs.map +0 -1
- package/dist/lib/_virtual/index5.mjs +0 -2
- package/dist/lib/_virtual/index5.mjs.map +0 -1
- package/dist/lib/_virtual/index6.mjs +0 -2
- package/dist/lib/_virtual/index6.mjs.map +0 -1
- package/dist/lib/_virtual/index7.mjs +0 -2
- package/dist/lib/_virtual/index7.mjs.map +0 -1
- package/dist/lib/_virtual/index8.mjs +0 -2
- package/dist/lib/_virtual/index8.mjs.map +0 -1
- package/dist/lib/_virtual/index9.mjs +0 -2
- package/dist/lib/_virtual/index9.mjs.map +0 -1
- package/dist/lib/_virtual/model.mjs +0 -2
- package/dist/lib/_virtual/model.mjs.map +0 -1
- package/dist/lib/_virtual/plugin.mjs +0 -2
- package/dist/lib/_virtual/plugin.mjs.map +0 -1
- package/dist/lib/_virtual/plugin2.mjs +0 -2
- package/dist/lib/_virtual/plugin2.mjs.map +0 -1
- package/dist/lib/_virtual/plugin3.mjs +0 -2
- package/dist/lib/_virtual/plugin3.mjs.map +0 -1
- package/dist/lib/_virtual/plugin4.mjs +0 -2
- package/dist/lib/_virtual/plugin4.mjs.map +0 -1
- package/dist/lib/_virtual/plugin5.mjs +0 -2
- package/dist/lib/_virtual/plugin5.mjs.map +0 -1
- package/dist/lib/_virtual/theme.mjs +0 -2
- package/dist/lib/_virtual/theme.mjs.map +0 -1
- package/dist/lib/lib/color/alpha.mjs.map +0 -1
- package/dist/lib/lib/color/constants.mjs.map +0 -1
- package/dist/lib/lib/color/light.mjs.map +0 -1
- package/dist/lib/lib/components/AlertDialog/index.mjs.map +0 -1
- package/dist/lib/lib/components/BarChart/index.mjs.map +0 -1
- package/dist/lib/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +0 -1
- package/dist/lib/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +0 -1
- package/dist/lib/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +0 -1
- package/dist/lib/lib/components/Breadcrumb/BreadcrumbList.mjs.map +0 -1
- package/dist/lib/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +0 -1
- package/dist/lib/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +0 -1
- package/dist/lib/lib/components/Breadcrumb/index.mjs.map +0 -1
- package/dist/lib/lib/components/BubbleChart/index.mjs.map +0 -1
- package/dist/lib/lib/components/Callout/index.mjs.map +0 -1
- package/dist/lib/lib/components/CheckboxGroup/index.mjs.map +0 -1
- package/dist/lib/lib/components/ContextMenu/ContextMenuGroup.mjs.map +0 -1
- package/dist/lib/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +0 -1
- package/dist/lib/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +0 -1
- package/dist/lib/lib/components/ContextMenu/index.mjs.map +0 -1
- package/dist/lib/lib/components/DataList/index.mjs.map +0 -1
- package/dist/lib/lib/components/Dialog/DialogTrigger.mjs.map +0 -1
- package/dist/lib/lib/components/Dialog/index.mjs.map +0 -1
- package/dist/lib/lib/components/DoughnutChart/index.mjs.map +0 -1
- package/dist/lib/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +0 -1
- package/dist/lib/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +0 -1
- package/dist/lib/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +0 -1
- package/dist/lib/lib/components/DropdownMenu/index.mjs.map +0 -1
- package/dist/lib/lib/components/Editor/index.mjs +0 -3
- package/dist/lib/lib/components/Gnb/GnbLogo.mjs.map +0 -1
- package/dist/lib/lib/components/Gnb/index.mjs.map +0 -1
- package/dist/lib/lib/components/Grid/Pagination.mjs.map +0 -1
- package/dist/lib/lib/components/HoverCard/HoverCardTrigger.mjs.map +0 -1
- package/dist/lib/lib/components/HoverCard/index.mjs.map +0 -1
- package/dist/lib/lib/components/LineChart/index.mjs.map +0 -1
- package/dist/lib/lib/components/Menubar/MenubarMenu.mjs.map +0 -1
- package/dist/lib/lib/components/Menubar/MenubarSeparator.mjs.map +0 -1
- package/dist/lib/lib/components/Menubar/MenubarSub.mjs.map +0 -1
- package/dist/lib/lib/components/Menubar/index.mjs.map +0 -1
- package/dist/lib/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +0 -1
- package/dist/lib/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +0 -1
- package/dist/lib/lib/components/NavigationMenu/index.mjs.map +0 -1
- package/dist/lib/lib/components/PieChart/index.mjs.map +0 -1
- package/dist/lib/lib/components/Popover/PopoverTrigger.mjs.map +0 -1
- package/dist/lib/lib/components/Popover/index.mjs.map +0 -1
- package/dist/lib/lib/components/RadarChart/index.mjs.map +0 -1
- package/dist/lib/lib/components/RadioCards/index.mjs.map +0 -1
- package/dist/lib/lib/components/RadioGroup/index.mjs.map +0 -1
- package/dist/lib/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +0 -1
- package/dist/lib/lib/components/SegmentedControl/index.mjs.map +0 -1
- package/dist/lib/lib/components/Select/index.mjs +0 -3
- package/dist/lib/lib/components/Toast/index.mjs.map +0 -1
- package/dist/lib/lib/components/ToggleGroup/index.mjs.map +0 -1
- package/dist/lib/lib/constants.mjs.map +0 -1
- package/dist/lib/lib/index.mjs.map +0 -1
- package/dist/lib/lib/utils/utils.mjs.map +0 -1
- package/dist/lib/public/tinymce/icons/default/icons.mjs.map +0 -1
- package/dist/lib/public/tinymce/models/dom/index.mjs +0 -2
- package/dist/lib/public/tinymce/models/dom/index.mjs.map +0 -1
- package/dist/lib/public/tinymce/models/dom/model.mjs +0 -2
- package/dist/lib/public/tinymce/models/dom/model.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/advlist/index.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/advlist/index.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/advlist/plugin.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/advlist/plugin.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/code/index.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/code/index.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/code/plugin.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/code/plugin.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/link/index.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/link/index.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/link/plugin.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/link/plugin.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/lists/index.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/lists/index.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/lists/plugin.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/lists/plugin.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/table/index.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/table/index.mjs.map +0 -1
- package/dist/lib/public/tinymce/plugins/table/plugin.mjs +0 -2
- package/dist/lib/public/tinymce/plugins/table/plugin.mjs.map +0 -1
- package/dist/lib/public/tinymce/skins/content/default/content.mjs +0 -3
- package/dist/lib/public/tinymce/skins/content/default/content.mjs.map +0 -1
- package/dist/lib/public/tinymce/skins/ui/oxide/content.mjs +0 -3
- package/dist/lib/public/tinymce/skins/ui/oxide/content.mjs.map +0 -1
- package/dist/lib/public/tinymce/skins/ui/oxide/skin.mjs +0 -3
- package/dist/lib/public/tinymce/skins/ui/oxide/skin.mjs.map +0 -1
- package/dist/lib/public/tinymce/themes/silver/index.mjs +0 -2
- package/dist/lib/public/tinymce/themes/silver/index.mjs.map +0 -1
- package/dist/lib/public/tinymce/themes/silver/theme.mjs +0 -2
- package/dist/lib/public/tinymce/themes/silver/theme.mjs.map +0 -1
- package/dist/lib/tailwind.config.d.ts +0 -3
- package/dist/lib/tsconfig.tsbuildinfo +0 -1
- package/dist/public/tinymce/plugins/autolink/index.d.ts +0 -1
- package/dist/public/tinymce/plugins/autolink/plugin.d.ts +0 -0
- package/dist/public/tinymce/plugins/autolink/plugin.js +0 -221
- package/dist/public/tinymce/skins/ui/oxide/content.inline.d.ts +0 -0
- package/dist/public/tinymce/skins/ui/oxide/skin.shadowdom.d.ts +0 -0
- package/dist/public/tinymce/skins/ui/oxide-dark/content.d.ts +0 -0
- package/dist/public/tinymce/skins/ui/oxide-dark/content.inline.d.ts +0 -0
- package/dist/public/tinymce/skins/ui/oxide-dark/skin.d.ts +0 -0
- package/dist/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.d.ts +0 -0
- package/dist/public/tinymce/tinymce.d.ts +0 -1
- package/dist/public/tinymce/tinymce.js +0 -31974
- /package/dist/lib/{lib/Typography → Typography}/Header/index.mjs +0 -0
- /package/dist/lib/{lib/Typography → Typography}/Header/index.mjs.map +0 -0
- /package/dist/lib/{lib/Typography → Typography}/Text/index.mjs +0 -0
- /package/dist/lib/{lib/Typography → Typography}/Text/index.mjs.map +0 -0
- /package/dist/lib/{lib/color → color}/alpha.mjs +0 -0
- /package/dist/lib/{lib/color → color}/constants.mjs +0 -0
- /package/dist/lib/{lib/color → color}/light.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Accordion/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Accordion/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogAction.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogAction.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogCancel.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogCancel.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogDescription.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogDescription.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogTitle.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogTitle.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/AlertDialogTrigger.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/AlertDialog/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AspectRatio/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/AspectRatio/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Avatar/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Avatar/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Badge/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Badge/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/BarChart/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbEllipsis.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbLink.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbList.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbPage.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/BreadcrumbSeparator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Breadcrumb/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/BubbleChart/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Button/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Button/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Callout/CalloutIcon.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Callout/CalloutIcon.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Callout/CalloutRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Callout/CalloutRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Callout/CalloutText.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Callout/CalloutText.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Callout/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Card/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Card/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Checkbox/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Checkbox/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/CheckboxCard/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/CheckboxCard/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/CheckboxGroup/CheckboxGroupItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/CheckboxGroup/CheckboxGroupItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/CheckboxGroup/CheckboxGroupRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/CheckboxGroup/CheckboxGroupRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/CheckboxGroup/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Collapsible/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Collapsible/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuCheckboxItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuCheckboxItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuGroup.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuItemIndicator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuItemIndicator.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuLabel.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuLabel.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuRadioGroup.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuRadioGroup.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuRadioItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuRadioItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuSeparator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuSubContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuSubContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuSubTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuSubTrigger.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/ContextMenuTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ContextMenu/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListLabel.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListLabel.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListValue.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DataList/DataListValue.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DataList/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogAction.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogAction.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogCancel.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogCancel.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogDescription.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogDescription.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogSlot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogSlot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogTitle.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogTitle.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/DialogTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Dialog/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DoughnutChart/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdonMenuRadioGroup.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdonMenuSubContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdonMenuSubContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuCheckboxItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuCheckboxItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuItemIndicator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuItemIndicator.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuLable.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuLable.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuRadioItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuRadioItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuSeparator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuSub.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuSubTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuSubTrigger.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/DropdownMenuTrigger.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/DropdownMenu/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Editor/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Footer/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Footer/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/GnbInfo.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/GnbInfo.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/GnbLogo.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/GnbMenu.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/GnbMenu.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/GnbRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/GnbRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Gnb/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Grid/Pagination.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Grid/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Grid/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Grid/useGrid.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Grid/useGrid.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/HoverCard/HoverCardContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/HoverCard/HoverCardContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/HoverCard/HoverCardRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/HoverCard/HoverCardRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/HoverCard/HoverCardTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/HoverCard/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/IconButton/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/IconButton/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Inset/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Inset/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Label/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Label/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/LineChart/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarCheckboxItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarCheckboxItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarItemIndicator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarItemIndicator.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarMenu.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarRadioGroup.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarRadioGroup.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarRadioItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarRadioItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarSeparator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarSub.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarSubContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarSubContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarSubTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarSubTrigger.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/MenubarTrigger.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Menubar/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuIndicator.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuLink.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuLink.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuList.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuList.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuTrigger.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuViewport.mjs +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/NavigationMenuViewport.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/NavigationMenu/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/PieChart/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Popover/PopoverClose.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Popover/PopoverClose.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Popover/PopoverContent.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Popover/PopoverContent.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Popover/PopoverRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Popover/PopoverRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Popover/PopoverTrigger.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Popover/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Progress/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Progress/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/RadarChart/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Radio/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Radio/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/RadioCards/RadioCardsItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/RadioCards/RadioCardsItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/RadioCards/RadioCardsRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/RadioCards/RadioCardsRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/RadioCards/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/RadioGroup/RadioGroupItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/RadioGroup/RadioGroupItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/RadioGroup/RadioGroupRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/RadioGroup/RadioGroupRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/RadioGroup/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ScrollArea/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ScrollArea/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/SegmentedControl/SegmentedControlItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/SegmentedControl/SegmentedControlRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/SegmentedControl/SegmentedControlRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/SegmentedControl/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Select/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Separator/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Separator/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Skeleton/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Skeleton/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Slider/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Slider/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Spinner/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Spinner/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/TabNav/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/TabNav/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Table/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Table/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Tabs/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Tabs/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/TextArea/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/TextArea/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/TextField/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/TextField/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastActionButton.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastActionButton.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastDescription.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastDescription.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastTitle.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Toast/ToastTitle.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Toast/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Toggle/ToggleWithText.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Toggle/ToggleWithText.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Toggle/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Toggle/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ToggleGroup/ToggleGroupItem.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ToggleGroup/ToggleGroupItem.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ToggleGroup/ToggleGroupRoot.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ToggleGroup/ToggleGroupRoot.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/ToggleGroup/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ToggleSwitch/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/ToggleSwitch/index.mjs.map +0 -0
- /package/dist/lib/{lib/components → components}/Tooltip/index.mjs +0 -0
- /package/dist/lib/{lib/components → components}/Tooltip/index.mjs.map +0 -0
- /package/dist/lib/{lib/constants.mjs → constants.mjs} +0 -0
- /package/dist/lib/{lib/index.mjs → index.mjs} +0 -0
- /package/dist/lib/{_virtual/index.mjs.map → index.mjs.map} +0 -0
- /package/dist/lib/{lib/theme → theme}/ThemeProvider.mjs +0 -0
- /package/dist/lib/{lib/theme → theme}/ThemeProvider.mjs.map +0 -0
- /package/dist/lib/{lib/utils → utils}/useDarkMode.mjs +0 -0
- /package/dist/lib/{lib/utils → utils}/useDarkMode.mjs.map +0 -0
- /package/dist/lib/{lib/utils → utils}/utils.mjs +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
import{__exports as t}from"../../../../_virtual/theme.mjs";var n;function e(){if(n)return t;n=1;var e=t&&t.__assign||function(){return e=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},e.apply(this,arguments)},o=t&&t.__awaiter||function(t,n,e,o){return new(e||(e=Promise))((function(r,i){function u(t){try{c(o.next(t))}catch(t){i(t)}}function a(t){try{c(o.throw(t))}catch(t){i(t)}}function c(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,a)}c((o=o.apply(t,n||[])).next())}))},r=t&&t.__generator||function(t,n){var e,o,r,i,u={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(e)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(e=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,o=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(r=u.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){u.label=a[1];break}if(6===a[0]&&u.label<r[1]){u.label=r[1],r=a;break}if(r&&u.label<r[2]){u.label=r[2],u.ops.push(a);break}r[2]&&u.ops.pop(),u.trys.pop();continue}a=n.call(t,u)}catch(t){a=[6,t],o=0}finally{e=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}},i=t&&t.__rest||function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)n.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(e[o[r]]=t[o[r]])}return e},u=t&&t.__spreadArray||function(t,n,e){if(e||2===arguments.length)for(var o,r=0,i=n.length;r<i;r++)!o&&r in n||(o||(o=Array.prototype.slice.call(n,0,r)),o[r]=n[r]);return t.concat(o||Array.prototype.slice.call(n))};return function(){var t,n,a,c=this,s=Object.getPrototypeOf,l=function(t,n,e){var o;return!!e(t,n.prototype)||(null===(o=t.constructor)||void 0===o?void 0:o.name)===n.name},f=function(t){return function(n){return function(t){var n=typeof t;return null===t?"null":"object"===n&&Array.isArray(t)?"array":"object"===n&&l(t,String,(function(t,n){return n.isPrototypeOf(t)}))?"string":n}(n)===t}},d=function(t){return function(n){return typeof n===t}},m=function(t){return function(n){return t===n}},g=f("string"),p=f("object"),h=function(t){return function(t,n){return p(t)&&l(t,n,(function(t,n){return s(t)===n}))}(t,Object)},v=f("array"),b=m(null),y=d("boolean"),x=m(void 0),w=function(t){return null==t},S=function(t){return!w(t)},k=d("function"),O=d("number"),C=function(t,n){if(v(t)){for(var e=0,o=t.length;e<o;++e)if(!n(t[e]))return!1;return!0}return!1},_=function(){},T=function(t){return function(){return t()}},E=function(t,n){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return t(n.apply(null,e))}},D=function(t){return function(){return t}},A=function(t){return t},M=function(t,n){return t===n};function B(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var r=n.concat(e);return t.apply(null,r)}}var I=function(t){return function(n){return!t(n)}},F=function(t){return function(){throw new Error(t)}},R=function(t){return t()},N=D(!1),V=D(!0),z=function(){function t(t,n){this.tag=t,this.value=n}return t.some=function(n){return new t(!0,n)},t.none=function(){return t.singletonNone},t.prototype.fold=function(t,n){return this.tag?n(this.value):t()},t.prototype.isSome=function(){return this.tag},t.prototype.isNone=function(){return!this.tag},t.prototype.map=function(n){return this.tag?t.some(n(this.value)):t.none()},t.prototype.bind=function(n){return this.tag?n(this.value):t.none()},t.prototype.exists=function(t){return this.tag&&t(this.value)},t.prototype.forall=function(t){return!this.tag||t(this.value)},t.prototype.filter=function(n){return!this.tag||n(this.value)?this:t.none()},t.prototype.getOr=function(t){return this.tag?this.value:t},t.prototype.or=function(t){return this.tag?this:t},t.prototype.getOrThunk=function(t){return this.tag?this.value:t()},t.prototype.orThunk=function(t){return this.tag?this:t()},t.prototype.getOrDie=function(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")},t.from=function(n){return S(n)?t.some(n):t.none()},t.prototype.getOrNull=function(){return this.tag?this.value:null},t.prototype.getOrUndefined=function(){return this.value},t.prototype.each=function(t){this.tag&&t(this.value)},t.prototype.toArray=function(){return this.tag?[this.value]:[]},t.prototype.toString=function(){return this.tag?"some(".concat(this.value,")"):"none()"},t}();z.singletonNone=new z(!1);var L,H=Array.prototype.slice,P=Array.prototype.indexOf,U=Array.prototype.push,W=function(t,n){return P.call(t,n)},j=function(t,n){var e=W(t,n);return-1===e?z.none():z.some(e)},G=function(t,n){return W(t,n)>-1},q=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return!0}return!1},Y=function(t,n){for(var e=[],o=0;o<t;o++)e.push(n(o));return e},X=function(t,n){for(var e=[],o=0;o<t.length;o+=n){var r=H.call(t,o,o+n);e.push(r)}return e},K=function(t,n){for(var e=t.length,o=new Array(e),r=0;r<e;r++){var i=t[r];o[r]=n(i,r)}return o},J=function(t,n){for(var e=0,o=t.length;e<o;e++){n(t[e],e)}},$=function(t,n){for(var e=[],o=[],r=0,i=t.length;r<i;r++){var u=t[r];(n(u,r)?e:o).push(u)}return{pass:e,fail:o}},Z=function(t,n){for(var e=[],o=0,r=t.length;o<r;o++){var i=t[o];n(i,o)&&e.push(i)}return e},Q=function(t,n,e){return function(t,n){for(var e=t.length-1;e>=0;e--)n(t[e],e)}(t,(function(t,o){e=n(e,t,o)})),e},tt=function(t,n,e){return J(t,(function(t,o){e=n(e,t,o)})),e},nt=function(t,n){return function(t,n,e){for(var o=0,r=t.length;o<r;o++){var i=t[o];if(n(i,o))return z.some(i);if(e(i,o))break}return z.none()}(t,n,N)},et=function(t,n){for(var e=0,o=t.length;e<o;e++){if(n(t[e],e))return z.some(e)}return z.none()},ot=function(t){for(var n=[],e=0,o=t.length;e<o;++e){if(!v(t[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+t);U.apply(n,t[e])}return n},rt=function(t,n){return ot(K(t,n))},it=function(t,n){for(var e=0,o=t.length;e<o;++e){if(!0!==n(t[e],e))return!1}return!0},ut=function(t){var n=H.call(t,0);return n.reverse(),n},at=function(t,n){return Z(t,(function(t){return!G(n,t)}))},ct=function(t,n){for(var e={},o=0,r=t.length;o<r;o++){var i=t[o];e[String(i)]=n(i,o)}return e},st=function(t){return[t]},lt=function(t,n){var e=H.call(t,0);return e.sort(n),e},ft=function(t,n){return n>=0&&n<t.length?z.some(t[n]):z.none()},dt=function(t){return ft(t,0)},mt=function(t){return ft(t,t.length-1)},gt=k(Array.from)?Array.from:function(t){return H.call(t)},pt=function(t,n){for(var e=0;e<t.length;e++){var o=n(t[e],e);if(o.isSome())return o}return z.none()},ht=Object.keys,vt=Object.hasOwnProperty,bt=function(t,n){for(var e=ht(t),o=0,r=e.length;o<r;o++){var i=e[o];n(t[i],i)}},yt=function(t,n){return xt(t,(function(t,e){return{k:e,v:n(t,e)}}))},xt=function(t,n){var e={};return bt(t,(function(t,o){var r=n(t,o);e[r.k]=r.v})),e},wt=function(t){return function(n,e){t[e]=n}},St=function(t,n,e,o){bt(t,(function(t,r){(n(t,r)?e:o)(t,r)}))},kt=function(t,n){var e={};return St(t,n,wt(e),_),e},Ot=function(t,n){var e=[];return bt(t,(function(t,o){e.push(n(t,o))})),e},Ct=function(t,n){for(var e=ht(t),o=0,r=e.length;o<r;o++){var i=e[o],u=t[i];if(n(u,i,t))return z.some(u)}return z.none()},_t=function(t){return Ot(t,A)},Tt=function(t,n){return Et(t,n)?z.from(t[n]):z.none()},Et=function(t,n){return vt.call(t,n)},Dt=function(t,n){return Et(t,n)&&void 0!==t[n]&&null!==t[n]},At=function(t,n,e){return void 0===e&&(e=M),t.exists((function(t){return e(t,n)}))},Mt=function(t){for(var n=[],e=function(t){n.push(t)},o=0;o<t.length;o++)t[o].each(e);return n},Bt=function(t,n,e){return t.isSome()&&n.isSome()?z.some(e(t.getOrDie(),n.getOrDie())):z.none()},It=function(t,n){return null!=t?z.some(n(t)):z.none()},Ft=function(t,n){return t?z.some(n):z.none()},Rt=function(t,n,e){return""===n||t.length>=n.length&&t.substr(e,e+n.length)===n},Nt=function(t,n){return zt(t,n)?function(t,n){return t.substring(n)}(t,n.length):t},Vt=function(t,n,e,o){void 0===e&&(e=0);var r=t.indexOf(n,e);return-1!==r&&(!!x(o)||r+n.length<=o)},zt=function(t,n){return Rt(t,n,0)},Lt=function(t,n){return Rt(t,n,t.length-n.length)},Ht=function(t){return function(n){return n.replace(t,"")}}(/^\s+|\s+$/g),Pt=function(t){return t.length>0},Ut=function(t){return!Pt(t)},Wt=function(t){return void 0!==t.style&&k(t.style.getPropertyValue)},jt=function(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},Gt={fromHtml:function(t,n){var e=(n||document).createElement("div");if(e.innerHTML=t,!e.hasChildNodes()||e.childNodes.length>1){var o="HTML does not have a single root node";throw console.error(o,t),new Error(o)}return jt(e.childNodes[0])},fromTag:function(t,n){var e=(n||document).createElement(t);return jt(e)},fromText:function(t,n){var e=(n||document).createTextNode(t);return jt(e)},fromDom:jt,fromPoint:function(t,n,e){return z.from(t.dom.elementFromPoint(n,e)).map(jt)}},qt="undefined"!=typeof window?window:Function("return this;")(),Yt=function(t,n){return function(t,n){for(var e=null!=n?n:qt,o=0;o<t.length&&null!=e;++o)e=e[t[o]];return e}(t.split("."),n)},Xt=function(t,n){var e=function(t,n){return Yt(t,n)}(t,n);if(null==e)throw new Error(t+" not available on this browser");return e},Kt=Object.getPrototypeOf,Jt=function(t){var n=Yt("ownerDocument.defaultView",t);return p(t)&&(function(t){return Xt("HTMLElement",t)}(n).prototype.isPrototypeOf(t)||/^HTML\w*Element$/.test(Kt(t).constructor.name))},$t=function(t){return t.dom.nodeName.toLowerCase()},Zt=function(t){return function(n){return function(t){return t.dom.nodeType}(n)===t}},Qt=function(t){return tn(t)&&Jt(t.dom)},tn=Zt(1),nn=Zt(3),en=Zt(9),on=Zt(11),rn=function(t){return function(n){return tn(n)&&$t(n)===t}},un=function(t,n){var e=t.dom;if(1!==e.nodeType)return!1;var o=e;if(void 0!==o.matches)return o.matches(n);if(void 0!==o.msMatchesSelector)return o.msMatchesSelector(n);if(void 0!==o.webkitMatchesSelector)return o.webkitMatchesSelector(n);if(void 0!==o.mozMatchesSelector)return o.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},an=function(t){return 1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType||0===t.childElementCount},cn=function(t,n){return t.dom===n.dom},sn=function(t,n){var e=t.dom,o=n.dom;return e!==o&&e.contains(o)},ln=function(t){return Gt.fromDom(t.dom.ownerDocument)},fn=function(t){return en(t)?t:ln(t)},dn=function(t){return Gt.fromDom(fn(t).dom.documentElement)},mn=function(t){return Gt.fromDom(fn(t).dom.defaultView)},gn=function(t){return z.from(t.dom.parentNode).map(Gt.fromDom)},pn=function(t){return z.from(t.dom.parentElement).map(Gt.fromDom)},hn=function(t){return z.from(t.dom.offsetParent).map(Gt.fromDom)},vn=function(t){return K(t.dom.childNodes,Gt.fromDom)},bn=function(t,n){var e=t.dom.childNodes;return z.from(e[n]).map(Gt.fromDom)},yn=function(t){return bn(t,0)},xn=function(t,n){return{element:t,offset:n}},wn=function(t,n){var e=vn(t);return e.length>0&&n<e.length?xn(e[n],0):xn(t,n)},Sn=function(t){return on(t)&&S(t.dom.host)},kn=k(Element.prototype.attachShadow)&&k(Node.prototype.getRootNode),On=D(kn),Cn=kn?function(t){return Gt.fromDom(t.dom.getRootNode())}:fn,_n=function(t){return Sn(t)?t:Gt.fromDom(fn(t).dom.body)},Tn=function(t){var n=Cn(t);return Sn(n)?z.some(n):z.none()},En=function(t){return Gt.fromDom(t.dom.host)},Dn=function(t){return S(t.dom.shadowRoot)},An=function(t){var n=nn(t)?t.dom.parentNode:t.dom;if(null==n||null===n.ownerDocument)return!1;var e,o,r=n.ownerDocument;return Tn(Gt.fromDom(n)).fold((function(){return r.body.contains(n)}),(e=An,o=En,function(t){return e(o(t))}))},Mn=function(){return Bn(Gt.fromDom(document))},Bn=function(t){var n=t.dom.body;if(null==n)throw new Error("Body is not available yet");return Gt.fromDom(n)},In=function(t,n,e){if(!(g(e)||y(e)||O(e)))throw console.error("Invalid call to Attribute.set. Key ",n,":: Value ",e,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(n,e+"")},Fn=function(t,n,e){In(t.dom,n,e)},Rn=function(t,n){var e=t.dom;bt(n,(function(t,n){In(e,n,t)}))},Nn=function(t,n){var e=t.dom.getAttribute(n);return null===e?void 0:e},Vn=function(t,n){return z.from(Nn(t,n))},zn=function(t,n){var e=t.dom;return!(!e||!e.hasAttribute)&&e.hasAttribute(n)},Ln=function(t,n){t.dom.removeAttribute(n)},Hn=function(t,n,e){if(!g(e))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",e,":: Element ",t),new Error("CSS value must be a string: "+e);Wt(t)&&t.style.setProperty(n,e)},Pn=function(t,n){Wt(t)&&t.style.removeProperty(n)},Un=function(t,n,e){var o=t.dom;Hn(o,n,e)},Wn=function(t,n){var e=t.dom;bt(n,(function(t,n){Hn(e,n,t)}))},jn=function(t,n){var e=t.dom;bt(n,(function(t,n){t.fold((function(){Pn(e,n)}),(function(t){Hn(e,n,t)}))}))},Gn=function(t,n){var e=t.dom,o=window.getComputedStyle(e).getPropertyValue(n);return""!==o||An(t)?o:qn(e,n)},qn=function(t,n){return Wt(t)?t.style.getPropertyValue(n):""},Yn=function(t,n){var e=t.dom,o=qn(e,n);return z.from(o).filter((function(t){return t.length>0}))},Xn=function(t){var n={},e=t.dom;if(Wt(e))for(var o=0;o<e.style.length;o++){var r=e.style.item(o);n[r]=e.style[r]}return n},Kn=function(t,n,e){var o=Gt.fromTag(t);return Un(o,n,e),Yn(o,n).isSome()},Jn=function(t,n){var e=t.dom;Pn(e,n),At(Vn(t,"style").map(Ht),"")&&Ln(t,"style")},$n=function(t){return t.dom.offsetWidth},Zn=function(t,n){var e=function(e){var o=n(e);if(o<=0||null===o){var r=Gn(e,t);return parseFloat(r)||0}return o},o=function(t,n){return tt(n,(function(n,e){var o=Gn(t,e),r=void 0===o?0:parseInt(o,10);return isNaN(r)?n:n+r}),0)};return{set:function(n,e){if(!O(e)&&!e.match(/^[0-9]+$/))throw new Error(t+".set accepts only positive integer values. Value was "+e);var o=n.dom;Wt(o)&&(o.style[t]=e+"px")},get:e,getOuter:e,aggregate:o,max:function(t,n,e){var r=o(t,e);return n>r?n-r:0}}},Qn=Zn("height",(function(t){var n=t.dom;return An(t)?n.getBoundingClientRect().height:n.offsetHeight})),te=function(t){return Qn.get(t)},ne=function(t){return Qn.getOuter(t)},ee=function(t,n){return{left:t,top:n,translate:function(e,o){return ee(t+e,n+o)}}},oe=ee,re=function(t,n){return void 0!==t?t:void 0!==n?n:0},ie=function(t){var n=t.dom.ownerDocument,e=n.body,o=n.defaultView,r=n.documentElement;if(e===t.dom)return oe(e.offsetLeft,e.offsetTop);var i=re(null==o?void 0:o.pageYOffset,r.scrollTop),u=re(null==o?void 0:o.pageXOffset,r.scrollLeft),a=re(r.clientTop,e.clientTop),c=re(r.clientLeft,e.clientLeft);return ue(t).translate(u-c,i-a)},ue=function(t){var n=t.dom,e=n.ownerDocument.body;return e===n?oe(e.offsetLeft,e.offsetTop):An(t)?function(t){var n=t.getBoundingClientRect();return oe(n.left,n.top)}(n):oe(0,0)},ae=Zn("width",(function(t){return t.dom.offsetWidth})),ce=function(t){return ae.get(t)},se=function(t){return ae.getOuter(t)},le=function(t){var n,e=!1;return function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return e||(e=!0,n=t.apply(null,o)),n}},fe=function(){return de(0,0)},de=function(t,n){return{major:t,minor:n}},me={nu:de,detect:function(t,n){var e=String(n).toLowerCase();return 0===t.length?fe():function(t,n){var e=function(t,n){for(var e=0;e<t.length;e++){var o=t[e];if(o.test(n))return o}}(t,n);if(!e)return{major:0,minor:0};var o=function(t){return Number(n.replace(e,"$"+t))};return de(o(1),o(2))}(t,e)},unknown:fe},ge=function(t,n){var e=String(n).toLowerCase();return nt(t,(function(t){return t.search(e)}))},pe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,he=function(t){return function(n){return Vt(n,t)}},ve=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Vt(t,"edge/")&&Vt(t,"chrome")&&Vt(t,"safari")&&Vt(t,"applewebkit")}},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,pe],search:function(t){return Vt(t,"chrome")&&!Vt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Vt(t,"msie")||Vt(t,"trident")}},{name:"Opera",versionRegexes:[pe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:he("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:he("firefox")},{name:"Safari",versionRegexes:[pe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Vt(t,"safari")||Vt(t,"mobile/"))&&Vt(t,"applewebkit")}}],be=[{name:"Windows",search:he("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Vt(t,"iphone")||Vt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:he("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:he("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:he("linux"),versionRegexes:[]},{name:"Solaris",search:he("sunos"),versionRegexes:[]},{name:"FreeBSD",search:he("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:he("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ye={browsers:D(ve),oses:D(be)},xe="Edge",we="Chromium",Se="Opera",ke="Firefox",Oe="Safari",Ce=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isEdge:o(xe),isChromium:o(we),isIE:o("IE"),isOpera:o(Se),isFirefox:o(ke),isSafari:o(Oe)}},_e={unknown:function(){return Ce({current:void 0,version:me.unknown()})},nu:Ce,edge:D(xe),chromium:D(we),ie:D("IE"),opera:D(Se),firefox:D(ke),safari:D(Oe)},Te="Windows",Ee="Android",De="Linux",Ae="macOS",Me="Solaris",Be="FreeBSD",Ie="ChromeOS",Fe=function(t){var n=t.current,e=t.version,o=function(t){return function(){return n===t}};return{current:n,version:e,isWindows:o(Te),isiOS:o("iOS"),isAndroid:o(Ee),isMacOS:o(Ae),isLinux:o(De),isSolaris:o(Me),isFreeBSD:o(Be),isChromeOS:o(Ie)}},Re={unknown:function(){return Fe({current:void 0,version:me.unknown()})},nu:Fe,windows:D(Te),ios:D("iOS"),android:D(Ee),linux:D(De),macos:D(Ae),solaris:D(Me),freebsd:D(Be),chromeos:D(Ie)},Ne=function(t,n,e){var o=ye.browsers(),r=ye.oses(),i=n.bind((function(t){return function(t,n){return pt(n.brands,(function(n){var e=n.brand.toLowerCase();return nt(t,(function(t){var n;return e===(null===(n=t.brand)||void 0===n?void 0:n.toLowerCase())})).map((function(t){return{current:t.name,version:me.nu(parseInt(n.version,10),0)}}))}))}(o,t)})).orThunk((function(){return function(t,n){return ge(t,n).map((function(t){var e=me.detect(t.versionRegexes,n);return{current:t.name,version:e}}))}(o,t)})).fold(_e.unknown,_e.nu),u=function(t,n){return ge(t,n).map((function(t){var e=me.detect(t.versionRegexes,n);return{current:t.name,version:e}}))}(r,t).fold(Re.unknown,Re.nu),a=function(t,n,e,o){var r=t.isiOS()&&!0===/ipad/i.test(e),i=t.isiOS()&&!r,u=t.isiOS()||t.isAndroid(),a=u||o("(pointer:coarse)"),c=r||!i&&u&&o("(min-device-width:768px)"),s=i||u&&!c,l=n.isSafari()&&t.isiOS()&&!1===/safari/i.test(e),f=!s&&!c&&!l;return{isiPad:D(r),isiPhone:D(i),isTablet:D(c),isPhone:D(s),isTouch:D(a),isAndroid:t.isAndroid,isiOS:t.isiOS,isWebView:D(l),isDesktop:D(f)}}(u,i,t,e);return{browser:i,os:u,deviceType:a}},Ve=function(t){return window.matchMedia(t).matches},ze=le((function(){return Ne(navigator.userAgent,z.from(navigator.userAgentData),Ve)})),Le=function(){return ze()},He=function(t){var n=Gt.fromDom(function(t){if(On()&&S(t.target)){var n=Gt.fromDom(t.target);if(tn(n)&&Dn(n)&&t.composed&&t.composedPath){var e=t.composedPath();if(e)return dt(e)}}return z.from(t.target)}(t).getOr(t.target)),e=function(){return t.stopPropagation()},o=function(){return t.preventDefault()},r=E(o,e);return function(t,n,e,o,r,i,u){return{target:t,x:n,y:e,stop:o,prevent:r,kill:i,raw:u}}(n,t.clientX,t.clientY,e,o,r,t)},Pe=function(t,n,e,o,r){var i=function(t,n){return function(e){t(e)&&n(He(e))}}(e,o);return t.dom.addEventListener(n,i,r),{unbind:B(Ue,t,n,i,r)}},Ue=function(t,n,e,o){t.dom.removeEventListener(n,e,o)},We=function(t,n){gn(t).each((function(e){e.dom.insertBefore(n.dom,t.dom)}))},je=function(t,n){var e=function(t){return z.from(t.dom.nextSibling).map(Gt.fromDom)}(t);e.fold((function(){gn(t).each((function(t){qe(t,n)}))}),(function(t){We(t,n)}))},Ge=function(t,n){yn(t).fold((function(){qe(t,n)}),(function(e){t.dom.insertBefore(n.dom,e.dom)}))},qe=function(t,n){t.dom.appendChild(n.dom)},Ye=function(t,n){J(n,(function(n){qe(t,n)}))},Xe=function(t){t.dom.textContent="",J(vn(t),(function(t){Ke(t)}))},Ke=function(t){var n=t.dom;null!==n.parentNode&&n.parentNode.removeChild(n)},Je=function(t){var n=void 0!==t?t.dom:document,e=n.body.scrollLeft||n.documentElement.scrollLeft,o=n.body.scrollTop||n.documentElement.scrollTop;return oe(e,o)},$e=function(t,n,e){var o=(void 0!==e?e.dom:document).defaultView;o&&o.scrollTo(t,n)},Ze=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},Qe=function(t){var n=void 0===t?window:t,e=n.document,o=Je(Gt.fromDom(e));return function(t){var n=void 0===t?window:t;return Le().browser.isFirefox()?z.none():z.from(n.visualViewport)}(n).fold((function(){var t=n.document.documentElement,e=t.clientWidth,r=t.clientHeight;return Ze(o.left,o.top,e,r)}),(function(t){return Ze(Math.max(t.pageLeft,o.left),Math.max(t.pageTop,o.top),t.width,t.height)}))},to=function(){return Gt.fromDom(document)},no=function(t,n){return t.view(n).fold(D([]),(function(n){var e=t.owner(n),o=no(t,e);return[n].concat(o)}))},eo=Object.freeze({__proto__:null,view:function(t){var n;return(t.dom===document?z.none():z.from(null===(n=t.dom.defaultView)||void 0===n?void 0:n.frameElement)).map(Gt.fromDom)},owner:function(t){return ln(t)}}),oo=function(t){var n=to(),e=Je(n),o=function(t,n){var e=n.owner(t),o=no(n,e);return z.some(o)}(t,eo);return o.fold(B(ie,t),(function(n){var o=ue(t),r=Q(n,(function(t,n){var e=ue(n);return{left:t.left+e.left,top:t.top+e.top}}),{left:0,top:0});return oe(r.left+o.left+e.left,r.top+o.top+e.top)}))},ro=function(t,n,e,o){return{x:t,y:n,width:e,height:o,right:t+e,bottom:n+o}},io=function(t){var n=ie(t),e=se(t),o=ne(t);return ro(n.left,n.top,e,o)},uo=function(t){var n=oo(t),e=se(t),o=ne(t);return ro(n.left,n.top,e,o)},ao=function(t,n){var e=Math.max(t.x,n.x),o=Math.max(t.y,n.y),r=Math.min(t.right,n.right),i=Math.min(t.bottom,n.bottom);return ro(e,o,r-e,i-o)},co=function(){return Qe(window)},so=tinymce.util.Tools.resolve("tinymce.ThemeManager"),lo=function(t){var n=function(n){return n(t)},e=D(t),o=function(){return r},r={tag:!0,inner:t,fold:function(n,e){return e(t)},isValue:V,isError:N,map:function(n){return mo.value(n(t))},mapError:o,bind:n,exists:n,forall:n,getOr:e,or:o,getOrThunk:e,orThunk:o,getOrDie:e,each:function(n){n(t)},toOptional:function(){return z.some(t)}};return r},fo=function(t){var n=function(){return e},e={tag:!1,inner:t,fold:function(n,e){return n(t)},isValue:N,isError:V,map:n,mapError:function(n){return mo.error(n(t))},bind:n,exists:N,forall:V,getOr:A,or:A,getOrThunk:R,orThunk:R,getOrDie:F(String(t)),each:_,toOptional:z.none};return e},mo={value:lo,error:fo,fromOption:function(t,n){return t.fold((function(){return fo(n)}),lo)}};!function(t){t[t.Error=0]="Error",t[t.Value=1]="Value"}(L||(L={}));var go=function(t,n,e){return t.stype===L.Error?n(t.serror):e(t.svalue)},po=function(t){return{stype:L.Value,svalue:t}},ho=function(t){return{stype:L.Error,serror:t}},vo=function(t){return t.fold(ho,po)},bo=function(t){return go(t,mo.error,mo.value)},yo=po,xo=function(t){var n=[],e=[];return J(t,(function(t){go(t,(function(t){return e.push(t)}),(function(t){return n.push(t)}))})),{values:n,errors:e}},wo=ho,So=function(t,n){return t.stype===L.Value?n(t.svalue):t},ko=function(t,n){return t.stype===L.Error?n(t.serror):t},Oo=function(t,n){return t.stype===L.Value?{stype:L.Value,svalue:n(t.svalue)}:t},Co=function(t,n){return t.stype===L.Error?{stype:L.Error,serror:n(t.serror)}:t},_o=go,To=function(t,n,e,o){return{tag:"field",key:t,newKey:n,presence:e,prop:o}},Eo=function(t,n,e){switch(t.tag){case"field":return n(t.key,t.newKey,t.presence,t.prop);case"custom":return e(t.newKey,t.instantiator)}},Do=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var o={},r=0;r<n.length;r++){var i=n[r];for(var u in i)Et(i,u)&&(o[u]=t(o[u],i[u]))}return o}},Ao=Do((function(t,n){return h(t)&&h(n)?Ao(t,n):n})),Mo=Do((function(t,n){return n})),Bo=function(t){return{tag:"defaultedThunk",process:t}},Io=function(t){return Bo(D(t))},Fo=function(t){return{tag:"mergeWithThunk",process:t}},Ro=function(t){return E(wo,ot)(t)},No=function(t){var n=xo(t);return n.errors.length>0?Ro(n.errors):yo(n.values)},Vo=function(t){return p(t)&&ht(t).length>100?" removed due to size":JSON.stringify(t,null,2)},zo=function(t,n){return wo([{path:t,getErrorInfo:n}])},Lo=function(t){return{extract:function(n,e){return ko(t(e),(function(t){return function(t,n){return zo(t,D(n))}(n,t)}))},toString:D("val")}},Ho=Lo(yo),Po=function(t,n,e,o){return Tt(n,e).fold((function(){return function(t,n,e){return zo(t,(function(){return'Could not find valid *required* value for "'+n+'" in '+Vo(e)}))}(t,e,n)}),o)},Uo=function(t,n,e,o){return o(Tt(t,n).getOrThunk((function(){return e(t)})))},Wo=function(t,n,e,o,r){var i=function(t){return r.extract(n.concat([o]),t)},u=function(t){return t.fold((function(){return yo(z.none())}),(function(t){var e=r.extract(n.concat([o]),t);return Oo(e,z.some)}))};switch(t.tag){case"required":return Po(n,e,o,i);case"defaultedThunk":return Uo(e,o,t.process,i);case"option":return function(t,n,e){return e(Tt(t,n))}(e,o,u);case"defaultedOptionThunk":return function(t,n,e,o){return o(Tt(t,n).map((function(n){return!0===n?e(t):n})))}(e,o,t.process,u);case"mergeWithThunk":return Uo(e,o,D({}),(function(n){var o=Ao(t.process(e),n);return i(o)}))}},jo=function(t){return{extract:function(n,e){return t().extract(n,e)},toString:function(){return t().toString()}}},Go=function(t){return ht(kt(t,S))},qo=function(t){var n=Yo(t),e=Q(t,(function(t,n){return Eo(n,(function(n){var e;return Ao(t,((e={})[n]=!0,e))}),D(t))}),{});return{extract:function(t,o){var r=y(o)?[]:Go(o),i=Z(r,(function(t){return!Dt(e,t)}));return 0===i.length?n.extract(t,o):function(t,n){return zo(t,(function(){return"There are unsupported fields: ["+n.join(", ")+"] specified"}))}(t,i)},toString:n.toString}},Yo=function(t){return{extract:function(n,e){return function(t,n,e){for(var o={},r=[],i=0,u=e;i<u.length;i++){var a=u[i];Eo(a,(function(e,i,u,a){var c=Wo(u,t,n,e,a);_o(c,(function(t){r.push.apply(r,t)}),(function(t){o[i]=t}))}),(function(t,e){o[t]=e(n)}))}return r.length>0?wo(r):yo(o)}(n,e,t)},toString:function(){var n=K(t,(function(t){return Eo(t,(function(t,n,e,o){return t+" -> "+o.toString()}),(function(t,n){return"state("+t+")"}))}));return"obj{\n"+n.join("\n")+"}"}}},Xo=function(t){return{extract:function(n,e){var o=K(e,(function(e,o){return t.extract(n.concat(["["+o+"]"]),e)}));return No(o)},toString:function(){return"array("+t.toString()+")"}}},Ko=function(t,n){var e=void 0!==n?n:A;return{extract:function(n,o){for(var r=[],i=0,u=t;i<u.length;i++){var a=u[i].extract(n,o);if(a.stype===L.Value)return{stype:L.Value,svalue:e(a.svalue)};r.push(a)}return No(r)},toString:function(){return"oneOf("+K(t,(function(t){return t.toString()})).join(", ")+")"}}},Jo=function(t,n){return{extract:function(e,o){var r=ht(o),i=function(n,e){return Xo(Lo(t)).extract(n,e)}(e,r);return So(i,(function(t){var r=K(t,(function(t){return To(t,t,{tag:"required",process:{}},n)}));return Yo(r).extract(e,o)}))},toString:function(){return"setOf("+n.toString()+")"}}},$o=E(Xo,Yo),Zo=D(Ho),Qo=function(t,n){return Lo((function(e){var o=typeof e;return t(e)?yo(e):wo("Expected type: ".concat(n," but got: ").concat(o))}))},tr=Qo(O,"number"),nr=Qo(g,"string"),er=Qo(y,"boolean"),or=Qo(k,"function"),rr=function(t){if(Object(t)!==t)return!0;switch({}.toString.call(t).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return!0;case"Array":case"Object":return Object.keys(t).every((function(n){return rr(t[n])}));default:return!1}},ir=Lo((function(t){return rr(t)?yo(t):wo("Expected value to be acceptable for sending via postMessage")})),ur=function(t,n,e,o){return Tt(e,o).fold((function(){return function(t,n,e){return zo(t,(function(){return'The chosen schema: "'+e+'" did not exist in branches: '+Vo(n)}))}(t,e,o)}),(function(e){return e.extract(t.concat(["branch: "+o]),n)}))},ar=function(t,n){return{extract:function(e,o){return Tt(o,t).fold((function(){return function(t,n){return zo(t,(function(){return'Choice schema did not contain choice key: "'+n+'"'}))}(e,t)}),(function(t){return ur(e,o,n,t)}))},toString:function(){return"chooseOn("+t+"). Possible values: "+ht(n)}}},cr=function(t){return Lo((function(n){return t(n).fold(wo,yo)}))},sr=function(t,n){return Jo((function(n){return vo(t(n))}),n)},lr=function(t,n,e){return bo(function(t,n,e){var o=n.extract([t],e);return Co(o,(function(t){return{input:e,errors:t}}))}(t,n,e))},fr=function(t){return t.fold((function(t){throw new Error(mr(t))}),A)},dr=function(t,n,e){return fr(lr(t,n,e))},mr=function(t){return"Errors: \n"+(n=t.errors,e=n.length>10?n.slice(0,10).concat([{path:[],getErrorInfo:D("... (only showing first ten failures)")}]):n,K(e,(function(t){return"Failed path: ("+t.path.join(" > ")+")\n"+t.getErrorInfo()}))).join("\n")+"\n\nInput object: "+Vo(t.input);var n,e},gr=function(t,n){return ar(t,yt(n,Yo))},pr=function(t,n){return e=le(n),{extract:function(t,n){return e().extract(t,n)},toString:function(){return e().toString()}};var e},hr=To,vr=function(t,n){return{tag:"custom",newKey:t,instantiator:n}},br=function(t){return cr((function(n){return G(t,n)?mo.value(n):mo.error('Unsupported value: "'.concat(n,'", choose one of "').concat(t.join(", "),'".'))}))},yr=function(t){return hr(t,t,{tag:"required",process:{}},Zo())},xr=function(t,n){return hr(t,t,{tag:"required",process:{}},n)},wr=function(t){return xr(t,tr)},Sr=function(t){return xr(t,nr)},kr=function(t,n){return hr(t,t,{tag:"required",process:{}},br(n))},Or=function(t){return xr(t,or)},Cr=function(t,n){return hr(t,t,{tag:"required",process:{}},Yo(n))},_r=function(t,n){return hr(t,t,{tag:"required",process:{}},$o(n))},Tr=function(t,n){return hr(t,t,{tag:"required",process:{}},Xo(n))},Er=function(t){return hr(t,t,{tag:"option",process:{}},Zo())},Dr=function(t,n){return hr(t,t,{tag:"option",process:{}},n)},Ar=function(t){return Dr(t,tr)},Mr=function(t){return Dr(t,nr)},Br=function(t,n){return Dr(t,br(n))},Ir=function(t){return Dr(t,or)},Fr=function(t,n){return Dr(t,Xo(n))},Rr=function(t,n){return Dr(t,Yo(n))},Nr=function(t,n){return hr(t,t,Io(n),Zo())},Vr=function(t,n,e){return hr(t,t,Io(n),e)},zr=function(t,n){return Vr(t,n,tr)},Lr=function(t,n){return Vr(t,n,nr)},Hr=function(t,n,e){return Vr(t,n,br(e))},Pr=function(t,n){return Vr(t,n,er)},Ur=function(t,n){return Vr(t,n,or)},Wr=function(t,n,e){return Vr(t,n,Xo(e))},jr=function(t,n,e){return Vr(t,n,Yo(e))},Gr=function(t){var n=t;return{get:function(){return n},set:function(t){n=t}}},qr=function(t){if(!v(t))throw new Error("cases must be an array");if(0===t.length)throw new Error("there must be at least one case");var n=[],e={};return J(t,(function(o,r){var i=ht(o);if(1!==i.length)throw new Error("one and only one name per case");var u=i[0],a=o[u];if(void 0!==e[u])throw new Error("duplicate key detected:"+u);if("cata"===u)throw new Error("cannot have a case named cata (sorry)");if(!v(a))throw new Error("case arguments must be an array");n.push(u),e[u]=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=e.length;if(i!==a.length)throw new Error("Wrong number of arguments to case "+u+". Expected "+a.length+" ("+a+"), got "+i);return{fold:function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(n.length!==t.length)throw new Error("Wrong number of arguments to fold. Expected "+t.length+", got "+n.length);return n[r].apply(null,e)},match:function(t){var o=ht(t);if(n.length!==o.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+"\nActual: "+o.join(","));if(!it(n,(function(t){return G(o,t)})))throw new Error("Not all branches were specified when using match. Specified: "+o.join(", ")+"\nRequired: "+n.join(", "));return t[u].apply(null,e)},log:function(t){console.log(t,{constructors:n,constructor:u,params:e})}}}})),e};qr([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);var Yr,Xr=function(t,n){return function(t,n){var e={};return bt(t,(function(t,o){G(n,o)||(e[o]=t)})),e}(t,n)},Kr=function(t,n){return function(t,n){var e;return(e={})[t]=n,e}(t,n)},Jr=function(t){return function(t){var n={};return J(t,(function(t){n[t.key]=t.value})),n}(t)},$r=function(t,n){var e,o=function(t){var n=[],e=[];return J(t,(function(t){t.fold((function(t){n.push(t)}),(function(t){e.push(t)}))})),{errors:n,values:e}}(t);return o.errors.length>0?(e=o.errors,mo.error(ot(e))):function(t,n){return 0===t.length?mo.value(n):mo.value(Ao(n,Mo.apply(void 0,t)))}(o.values,n)},Zr=function(t){return k(t)?t:N},Qr=function(t,n,e){for(var o=t.dom,r=Zr(e);o.parentNode;){o=o.parentNode;var i=Gt.fromDom(o),u=n(i);if(u.isSome())return u;if(r(i))break}return z.none()},ti=function(t,n,e){var o=n(t),r=Zr(e);return o.orThunk((function(){return r(t)?z.none():Qr(t,n,r)}))},ni=function(t,n){return cn(t.element,n.event.target)},ei={can:V,abort:N,run:_},oi=function(t){if(!Dt(t,"can")&&!Dt(t,"abort")&&!Dt(t,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(t,null,2)+" does not have can, abort, or run!");return e(e({},ei),t)},ri=function(t){var n=function(t,n){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return tt(t,(function(t,o){return t&&n(o).apply(void 0,e)}),!0)}}(t,(function(t){return t.can})),e=function(t,n){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return tt(t,(function(t,o){return t||n(o).apply(void 0,e)}),!1)}}(t,(function(t){return t.abort}));return{can:n,abort:e,run:function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];J(t,(function(t){t.run.apply(void 0,n)}))}}},ii=D,ui=ii("touchstart"),ai=ii("touchmove"),ci=ii("touchend"),si=ii("touchcancel"),li=ii("mousedown"),fi=ii("mousemove"),di=ii("mouseout"),mi=ii("mouseup"),gi=ii("mouseover"),pi=ii("focusin"),hi=ii("focusout"),vi=ii("keydown"),bi=ii("keyup"),yi=ii("input"),xi=ii("change"),wi=ii("click"),Si=ii("transitioncancel"),ki=ii("transitionend"),Oi=ii("transitionstart"),Ci=ii("selectstart"),_i=function(t){return D("alloy."+t)},Ti={tap:_i("tap")},Ei=_i("focus"),Di=_i("blur.post"),Ai=_i("paste.post"),Mi=_i("receive"),Bi=_i("execute"),Ii=_i("focus.item"),Fi=Ti.tap,Ri=_i("longpress"),Ni=_i("sandbox.close"),Vi=_i("typeahead.cancel"),zi=_i("system.init"),Li=_i("system.touchmove"),Hi=_i("system.touchend"),Pi=_i("system.scroll"),Ui=_i("system.resize"),Wi=_i("system.attached"),ji=_i("system.detached"),Gi=_i("system.dismissRequested"),qi=_i("system.repositionRequested"),Yi=_i("focusmanager.shifted"),Xi=_i("slotcontainer.visibility"),Ki=_i("system.external.element.scroll"),Ji=_i("change.tab"),$i=_i("dismiss.tab"),Zi=_i("highlight"),Qi=_i("dehighlight"),tu=function(t,n){ru(t,t.element,n,{})},nu=function(t,n,e){ru(t,t.element,n,e)},eu=function(t){tu(t,Bi())},ou=function(t,n,e){ru(t,n,e,{})},ru=function(t,n,o,r){var i=e({target:n},r);t.getSystem().triggerEvent(o,n,i)},iu=function(t,n,e,o){t.getSystem().triggerEvent(e,n,o.event)},uu=function(t){return Jr(t)},au=function(t,n){return{key:t,value:oi({abort:n})}},cu=function(t){return{key:t,value:oi({run:function(t,n){n.event.prevent()}})}},su=function(t,n){return{key:t,value:oi({run:n})}},lu=function(t,n,e){return{key:t,value:oi({run:function(t,o){n.apply(void 0,[t,o].concat(e))}})}},fu=function(t){return function(n){return{key:t,value:oi({run:function(t,e){ni(t,e)&&n(t,e)}})}}},du=function(t,n,e){return function(t,n){return su(t,(function(e,o){e.getSystem().getByUid(n).each((function(n){iu(n,n.element,t,o)}))}))}(t,n.partUids[e])},mu=function(t,n){return su(t,(function(t,e){var o=e.event,r=t.getSystem().getByDom(o.target).getOrThunk((function(){return ti(o.target,(function(n){return t.getSystem().getByDom(n).toOptional()}),N).getOr(t)}));n(t,r,e)}))},gu=function(t){return su(t,(function(t,n){n.cut()}))},pu=function(t){return su(t,(function(t,n){n.stop()}))},hu=function(t,n){return fu(t)(n)},vu=fu(Wi()),bu=fu(ji()),yu=fu(zi()),xu=function(t){return function(n){return su(t,n)}}(Bi()),wu=function(t){return t.dom.innerHTML},Su=function(t,n){var e=ln(t).dom,o=Gt.fromDom(e.createDocumentFragment()),r=function(t,n){var e=(n||document).createElement("div");return e.innerHTML=t,vn(Gt.fromDom(e))}(n,e);Ye(o,r),Xe(t),qe(t,o)},ku=function(t,n){return Gt.fromDom(t.dom.cloneNode(n))},Ou=function(t){if(Sn(t))return"#shadow-root";var n=function(t){return ku(t,!1)}(t);return function(t){var n=Gt.fromTag("div"),e=Gt.fromDom(t.dom.cloneNode(!0));return qe(n,e),wu(n)}(n)},Cu=function(t){return Ou(t)},_u=uu([function(t,n){return{key:t,value:oi({can:n})}}(Ei(),(function(t,n){var e=n.event,o=e.originator,r=e.target;return!function(t,n,e){return cn(n,t.element)&&!cn(n,e)}(t,o,r)||(console.warn(Ei()+" did not get interpreted by the desired target. \nOriginator: "+Cu(o)+"\nTarget: "+Cu(r)+"\nCheck the "+Ei()+" event handlers"),!1)}))]),Tu=Object.freeze({__proto__:null,events:_u}),Eu=0,Du=function(t){var n=(new Date).getTime();return t+"_"+Math.floor(1e9*Math.random())+ ++Eu+String(n)},Au=D("alloy-id-"),Mu=D("data-alloy-id"),Bu=Au(),Iu=Mu(),Fu=function(t,n){Object.defineProperty(t.dom,Iu,{value:n,writable:!0})},Ru=function(t){var n=tn(t)?t.dom[Iu]:null;return z.from(n)},Nu=function(t){return Du(t)},Vu=A,zu=function(t){var n=function(n){return"The component must be in a context to execute: ".concat(n)+(t?"\n"+Cu(t().element)+" is not in context.":"")},e=function(t){return function(){throw new Error(n(t))}},o=function(t){return function(){console.warn(n(t))}};return{debugInfo:D("fake"),triggerEvent:o("triggerEvent"),triggerFocus:o("triggerFocus"),triggerEscape:o("triggerEscape"),broadcast:o("broadcast"),broadcastOn:o("broadcastOn"),broadcastEvent:o("broadcastEvent"),build:e("build"),buildOrPatch:e("buildOrPatch"),addToWorld:e("addToWorld"),removeFromWorld:e("removeFromWorld"),addToGui:e("addToGui"),removeFromGui:e("removeFromGui"),getByUid:e("getByUid"),getByDom:e("getByDom"),isConnected:N}},Lu=zu(),Hu=function(t){return K(t,(function(t){return Lt(t,"/*")?t.substring(0,t.length-2):t}))},Pu=function(t,n){var e=t.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:Hu(i)}},t},Uu=Du("alloy-premade"),Wu=function(t){return Object.defineProperty(t.element.dom,Uu,{value:t.uid,writable:!0}),Kr(Uu,t)},ju=function(t){return Tt(t,Uu)},Gu=function(t){return function(t,n){var e=n.toString(),o=e.indexOf(")")+1,r=e.indexOf("("),i=e.substring(r+1,o-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:"OVERRIDE",parameters:Hu(i.slice(1))}},t}((function(n){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return t.apply(void 0,u([n.getApis(),n],e,!1))}),t)},qu={init:function(){return Yu({readState:D("No State required")})}},Yu=function(t){return t},Xu=function(t,n){var e={};return bt(t,(function(t,o){bt(t,(function(t,r){var i=Tt(e,r).getOr([]);e[r]=i.concat([n(o,t)])}))})),e},Ku=function(t){return{classes:x(t.classes)?[]:t.classes,attributes:x(t.attributes)?{}:t.attributes,styles:x(t.styles)?{}:t.styles}},Ju=function(t){return t.cHandler},$u=function(t,n){return{name:t,handler:n}},Zu=function(t,n,o){var r=e(e({},o),function(t,n){var e={};return J(t,(function(t){e[t.name()]=t.handlers(n)})),e}(n,t));return Xu(r,$u)},Qu=function(t){var n=function(t){return k(t)?{can:V,abort:N,run:t}:t}(t);return function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];var i=[t,e].concat(o);n.abort.apply(void 0,i)?e.stop():n.can.apply(void 0,i)&&n.run.apply(void 0,i)}},ta=function(t,n,e){var o=n[e];return o?function(t,n,e,o){try{var r=lt(e,(function(e,r){var i=e[n],u=r[n],a=o.indexOf(i),c=o.indexOf(u);if(-1===a)throw new Error("The ordering for "+t+" does not have an entry for "+i+".\nOrder specified: "+JSON.stringify(o,null,2));if(-1===c)throw new Error("The ordering for "+t+" does not have an entry for "+u+".\nOrder specified: "+JSON.stringify(o,null,2));return a<c?-1:c<a?1:0}));return mo.value(r)}catch(t){return mo.error([t])}}("Event: "+e,"name",t,o).map((function(t){var n=K(t,(function(t){return t.handler}));return ri(n)})):function(t,n){return mo.error(["The event ("+t+') 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(K(n,(function(t){return t.name})),null,2)])}(e,t)},na=function(t,n){var e=Ot(t,(function(t,e){return(1===t.length?mo.value(t[0].handler):ta(t,n,e)).map((function(o){var r=Qu(o),i=t.length>1?Z(n[e],(function(n){return q(t,(function(t){return t.name===n}))})).join(" > "):t[0].name;return Kr(e,function(t,n){return{handler:t,purpose:n}}(r,i))}))}));return $r(e,{})},ea="alloy.base.behaviour",oa=Yo([hr("dom","dom",{tag:"required",process:{}},Yo([yr("tag"),Nr("styles",{}),Nr("classes",[]),Nr("attributes",{}),Er("value"),Er("innerHtml")])),yr("components"),yr("uid"),Nr("events",{}),Nr("apis",{}),hr("eventOrder","eventOrder",function(t){return Fo(D(t))}((t={},t[Bi()]=["disabling",ea,"toggling","typeaheadevents"],t[Ei()]=[ea,"focusing","keying"],t[zi()]=[ea,"disabling","toggling","representing"],t[yi()]=[ea,"representing","streaming","invalidating"],t[ji()]=[ea,"representing","item-events","tooltipping"],t[li()]=["focusing",ea,"item-type-events"],t[ui()]=["focusing",ea,"item-type-events"],t[gi()]=["item-type-events","tooltipping"],t[Mi()]=["receiving","reflecting","tooltipping"],t)),Zo()),Er("domModification")]),ra=function(t){return t.events},ia=function(t,n){var e=Nn(t,n);return void 0===e||""===e?[]:e.split(" ")},ua=function(t){return void 0!==t.dom.classList},aa=function(t){return ia(t,"class")},ca=function(t,n){return function(t,n,e){var o=ia(t,n).concat([e]);return Fn(t,n,o.join(" ")),!0}(t,"class",n)},sa=function(t,n){return function(t,n,e){var o=Z(ia(t,n),(function(t){return t!==e}));return o.length>0?Fn(t,n,o.join(" ")):Ln(t,n),!1}(t,"class",n)},la=function(t,n){ua(t)?t.dom.classList.add(n):ca(t,n)},fa=function(t){0===(ua(t)?t.dom.classList:aa(t)).length&&Ln(t,"class")},da=function(t,n){ua(t)?t.dom.classList.remove(n):sa(t,n);fa(t)},ma=function(t,n){var e=ua(t)?t.dom.classList.toggle(n):function(t,n){return G(aa(t),n)?sa(t,n):ca(t,n)}(t,n);return fa(t),e},ga=function(t,n){return ua(t)&&t.dom.classList.contains(n)},pa=function(t,n){J(n,(function(n){la(t,n)}))},ha=function(t,n){J(n,(function(n){da(t,n)}))},va=function(t){return ua(t)?function(t){for(var n=t.dom.classList,e=new Array(n.length),o=0;o<n.length;o++){var r=n.item(o);null!==r&&(e[o]=r)}return e}(t):aa(t)},ba=function(t){return t.dom.value},ya=function(t,n){if(void 0===n)throw new Error("Value.set was undefined");t.dom.value=n},xa=function(t,n,e){e.fold((function(){return qe(t,n)}),(function(t){cn(t,n)||(We(t,n),Ke(t))}))},wa=function(t,n,e){var o=K(n,e),r=vn(t);return J(r.slice(o.length),Ke),o},Sa=function(t,n,e,o){var r=bn(t,n),i=o(e,r),u=function(t,n,e){return bn(t,n).map((function(t){if(e.exists((function(n){return!cn(n,t)}))){var n=e.map($t).getOr("span"),o=Gt.fromTag(n);return We(t,o),o}return t}))}(t,n,r);return xa(t,i.element,u),i},ka=function(t,n){var e=ht(t),o=ht(n),r=at(o,e),i=function(t,n){var e={},o={};return St(t,n,wt(e),wt(o)),{t:e,f:o}}(t,(function(t,e){return!Et(n,e)||t!==n[e]})).t;return{toRemove:r,toSet:i}},Oa=function(t,n){var e=function(t){return tt(t.dom.attributes,(function(t,n){return t[n.name]=n.value,t}),{})}(n);e.class,e.style;var o=i(e,["class","style"]),r=ka(t.attributes,o),u=r.toSet,a=r.toRemove,c=Xn(n),s=ka(t.styles,c),l=s.toSet,f=s.toRemove,d=va(n),m=at(d,t.classes),g=at(t.classes,d);return J(a,(function(t){return Ln(n,t)})),Rn(n,u),pa(n,g),ha(n,m),J(f,(function(t){return Jn(n,t)})),Wn(n,l),t.innerHtml.fold((function(){var e=t.domChildren;!function(t,n){wa(t,n,(function(n,e){var o=bn(t,e);return xa(t,n,o),n}))}(n,e)}),(function(t){Su(n,t)})),function(){var e=n,o=t.value.getOrUndefined();o!==ba(e)&&ya(e,null!=o?o:"")}(),n},Ca=function(t,n){var e=n.filter((function(n){return $t(n)===t.tag&&!function(t){return t.innerHtml.isSome()&&t.domChildren.length>0}(t)&&!function(t){return Et(t.dom,Uu)}(n)})).bind((function(n){return function(t,n){try{var e=Oa(t,n);return z.some(e)}catch(t){return z.none()}}(t,n)})).getOrThunk((function(){return function(t){var n=Gt.fromTag(t.tag);Rn(n,t.attributes),pa(n,t.classes),Wn(n,t.styles),t.innerHtml.each((function(t){return Su(n,t)}));var e=t.domChildren;return Ye(n,e),t.value.each((function(t){ya(n,t)})),n}(t)}));return Fu(e,t.uid),e},_a=function(t,n){return function(t,n){var e=K(n,(function(t){return Rr(t.name(),[yr("config"),Nr("state",qu)])})),o=lr("component.behaviours",Yo(e),t.behaviours).fold((function(n){throw new Error(mr(n)+"\nComplete spec:\n"+JSON.stringify(t,null,2))}),A);return{list:n,data:yt(o,(function(t){var n=t.map((function(t){return{config:t.config,state:t.state.init(t.config)}}));return D(n)}))}}(t,n)},Ta=function(t){var n=function(t){var n=Tt(t,"behaviours").getOr({});return rt(ht(n),(function(t){var e=n[t];return S(e)?[e.me]:[]}))}(t);return _a(t,n)},Ea=function(t,n,o){var r,i,u,a=e(e({},(r=t).dom),{uid:r.uid,domChildren:K(r.components,(function(t){return t.element}))}),c=function(t){return t.domModification.fold((function(){return Ku({})}),Ku)}(t),s={"alloy.base.modification":c},l=n.length>0?function(t,n,o,r){var i=e({},n);J(o,(function(n){i[n.name()]=n.exhibit(t,r)}));var u=Xu(i,(function(t,n){return{name:t,modification:n}})),a=function(t){return Q(t,(function(t,n){return e(e({},n.modification),t)}),{})},c=Q(u.classes,(function(t,n){return n.modification.concat(t)}),[]),s=a(u.attributes),l=a(u.styles);return Ku({classes:c,attributes:s,styles:l})}(o,s,n,a):c;return u=l,e(e({},i=a),{attributes:e(e({},i.attributes),u.attributes),styles:e(e({},i.styles),u.styles),classes:i.classes.concat(u.classes)})},Da=function(t,n,e){var o={"alloy.base.behaviour":ra(t)};return function(t,n,e,o){var r=Zu(t,e,o);return na(r,n)}(e,t.eventOrder,n,o).getOrDie()},Aa=function(t,n){var e=function(){return d},o=Gr(Lu),r=fr(function(t){return lr("custom.definition",oa,t)}(t)),i=Ta(t),u=function(t){return t.list}(i),a=function(t){return t.data}(i),c=Ea(r,u,a),s=Ca(c,n),l=Da(r,u,a),f=Gr(r.components),d={uid:t.uid,getSystem:o.get,config:function(n){var e=a;return(k(e[n.name()])?e[n.name()]:function(){throw new Error("Could not find "+n.name()+" in "+JSON.stringify(t,null,2))})()},hasConfigured:function(t){return k(a[t.name()])},spec:t,readState:function(t){return a[t]().map((function(t){return t.state.readState()})).getOr("not enabled")},getApis:function(){return r.apis},connect:function(t){o.set(t)},disconnect:function(){o.set(zu(e))},element:s,syncComponents:function(){var t=vn(s),n=rt(t,(function(t){return o.get().getByDom(t).fold((function(){return[]}),st)}));f.set(n)},components:f.get,events:l};return d},Ma=function(t,n){var o=Vu(t),r=o.events,u=i(o,["events"]),a=function(t,n){var e=Tt(t,"components").getOr([]);return n.fold((function(){return K(e,Na)}),(function(t){return K(e,(function(n,e){return Ra(n,bn(t,e))}))}))}(u,n),c=e(e({},u),{events:e(e({},Tu),r),components:a});return mo.value(Aa(c,n))},Ba=function(t){var n=Gt.fromText(t);return Ia({element:n})},Ia=function(t){var n=dr("external.component",qo([yr("element"),Er("uid")]),t),e=Gr(zu()),o=n.uid.getOrThunk((function(){return Nu("external")}));Fu(n.element,o);var r={uid:o,getSystem:e.get,config:z.none,hasConfigured:N,connect:function(t){e.set(t)},disconnect:function(){e.set(zu((function(){return r})))},getApis:function(){return{}},element:n.element,spec:t,readState:D("No state"),syncComponents:_,components:D([]),events:{}};return Wu(r)},Fa=Nu,Ra=function(t,n){return ju(t).getOrThunk((function(){var o=function(t){return Et(t,"uid")}(t)?t:e({uid:Fa("")},t);return Ma(o,n).getOrDie()}))},Na=function(t){return Ra(t,z.none())},Va=Wu,za=function(t,n,e,o,r){return t(e,o)?z.some(e):k(r)&&r(e)?z.none():n(e,o,r)},La=function(t,n,e){for(var o=t.dom,r=k(e)?e:N;o.parentNode;){o=o.parentNode;var i=Gt.fromDom(o);if(n(i))return z.some(i);if(r(i))break}return z.none()},Ha=function(t,n,e){return za((function(t,n){return n(t)}),La,t,n,e)},Pa=function(t,n,e){return Ha(t,n,e).isSome()},Ua=function(t,n,e){return La(t,(function(t){return un(t,n)}),e)},Wa=function(t,n){return function(t,n){return nt(t.dom.childNodes,(function(t){return n(Gt.fromDom(t))})).map(Gt.fromDom)}(t,(function(t){return un(t,n)}))},ja=function(t,n){return function(t,n){var e=void 0===n?document:n.dom;return an(e)?z.none():z.from(e.querySelector(t)).map(Gt.fromDom)}(n,t)},Ga=function(t,n,e){return za((function(t,n){return un(t,n)}),Ua,t,n,e)},qa="aria-controls",Ya=function(){var t=Du(qa);return{id:t,link:function(n){Fn(n,qa,t)},unlink:function(t){Ln(t,qa)}}},Xa=function(t,n){return function(t){return Ha(t,(function(t){if(!tn(t))return!1;var n=Nn(t,"id");return void 0!==n&&n.indexOf(qa)>-1})).bind((function(t){var n=Nn(t,"id"),e=Cn(t);return ja(e,"[".concat(qa,'="').concat(n,'"]'))}))}(n).exists((function(n){return Ka(t,n)}))},Ka=function(t,n){return Pa(n,(function(n){return cn(n,t.element)}),N)||Xa(t,n)},Ja="unknown";!function(t){t[t.STOP=0]="STOP",t[t.NORMAL=1]="NORMAL",t[t.LOGGING=2]="LOGGING"}(Yr||(Yr={}));var $a=Gr({}),Za=function(t,n,e){switch(Tt($a.get(),t).orThunk((function(){var n=ht($a.get());return pt(n,(function(n){return t.indexOf(n)>-1?z.some($a.get()[n]):z.none()}))})).getOr(Yr.NORMAL)){case Yr.NORMAL:return e(nc());case Yr.LOGGING:var o=function(t,n){var e=[],o=(new Date).getTime();return{logEventCut:function(t,n,o){e.push({outcome:"cut",target:n,purpose:o})},logEventStopped:function(t,n,o){e.push({outcome:"stopped",target:n,purpose:o})},logNoParent:function(t,n,o){e.push({outcome:"no-parent",target:n,purpose:o})},logEventNoHandlers:function(t,n){e.push({outcome:"no-handlers-left",target:n})},logEventResponse:function(t,n,o){e.push({outcome:"response",purpose:o,target:n})},write:function(){var r=(new Date).getTime();G(["mousemove","mouseover","mouseout",zi()],t)||console.log(t,{event:t,time:r-o,target:n.dom,sequence:K(e,(function(t){return G(["cut","stopped","response"],t.outcome)?"{"+t.purpose+"} "+t.outcome+" at ("+Cu(t.target)+")":t.outcome}))})}}}(t,n),r=e(o);return o.write(),r;case Yr.STOP:return!0}},Qa=["alloy/data/Fields","alloy/debugging/Debugging"],tc=function(t,n,e){return Za(t,n,e)},nc=D({logEventCut:_,logEventStopped:_,logNoParent:_,logEventNoHandlers:_,logEventResponse:_,write:_}),ec=D([yr("menu"),yr("selectedMenu")]),oc=D([yr("item"),yr("selectedItem")]);D(Yo(oc().concat(ec())));var rc=D(Yo(oc())),ic=Cr("initSize",[yr("numColumns"),yr("numRows")]),uc=function(){return Cr("markers",[yr("backgroundMenu")].concat(ec()).concat(oc()))},ac=function(t){return Cr("markers",K(t,yr))},cc=function(t,n,e){return function(){var t=new Error;if(void 0!==t.stack){var n=t.stack.split("\n");return nt(n,(function(t){return t.indexOf("alloy")>0&&!q(Qa,(function(n){return t.indexOf(n)>-1}))})).getOr(Ja)}}(),hr(n,n,e,cr((function(t){return mo.value((function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t.apply(void 0,n)}))})))},sc=function(t){return cc(0,t,Io(_))},lc=function(t){return cc(0,t,Io(z.none))},fc=function(t){return cc(0,t,{tag:"required",process:{}})},dc=function(t){return cc(0,t,{tag:"required",process:{}})},mc=function(t,n){return vr(t,D(n))},gc=function(t){return vr(t,A)},pc=D(ic),hc=function(t,n,e,o,r,i,u,a){return void 0===a&&(a=!1),{x:t,y:n,bubble:e,direction:o,placement:r,restriction:i,label:"".concat(u,"-").concat(r),alwaysFit:a}},vc=qr([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),bc=vc.southeast,yc=vc.southwest,xc=vc.northeast,wc=vc.northwest,Sc=vc.south,kc=vc.north,Oc=vc.east,Cc=vc.west,_c=function(t,n,e,o){var r=t+n;return r>o?e:r<e?o:r},Tc=function(t,n,e){return Math.min(Math.max(t,n),e)},Ec=function(t,n){return ct(["left","right","top","bottom"],(function(e){return Tt(n,e).map((function(n){return function(t,n){switch(n){case 1:return t.x;case 0:return t.x+t.width;case 2:return t.y;case 3:return t.y+t.height}}(t,n)}))}))},Dc="layout",Ac=function(t){return t.x},Mc=function(t,n){return t.x+t.width/2-n.width/2},Bc=function(t,n){return t.x+t.width-n.width},Ic=function(t,n){return t.y-n.height},Fc=function(t){return t.y+t.height},Rc=function(t,n){return t.y+t.height/2-n.height/2},Nc=function(t,n,e){return hc(Ac(t),Fc(t),e.southeast(),bc(),"southeast",Ec(t,{left:1,top:3}),Dc)},Vc=function(t,n,e){return hc(Bc(t,n),Fc(t),e.southwest(),yc(),"southwest",Ec(t,{right:0,top:3}),Dc)},zc=function(t,n,e){return hc(Ac(t),Ic(t,n),e.northeast(),xc(),"northeast",Ec(t,{left:1,bottom:2}),Dc)},Lc=function(t,n,e){return hc(Bc(t,n),Ic(t,n),e.northwest(),wc(),"northwest",Ec(t,{right:0,bottom:2}),Dc)},Hc=function(t,n,e){return hc(Mc(t,n),Ic(t,n),e.north(),kc(),"north",Ec(t,{bottom:2}),Dc)},Pc=function(t,n,e){return hc(Mc(t,n),Fc(t),e.south(),Sc(),"south",Ec(t,{top:3}),Dc)},Uc=function(t,n,e){return hc(function(t){return t.x+t.width}(t),Rc(t,n),e.east(),Oc(),"east",Ec(t,{left:0}),Dc)},Wc=function(t,n,e){return hc(function(t,n){return t.x-n.width}(t,n),Rc(t,n),e.west(),Cc(),"west",Ec(t,{right:1}),Dc)},jc=function(){return[Nc,Vc,zc,Lc,Pc,Hc,Uc,Wc]},Gc=function(){return[Vc,Nc,Lc,zc,Pc,Hc,Uc,Wc]},qc=function(){return[zc,Lc,Nc,Vc,Hc,Pc]},Yc=function(){return[Lc,zc,Vc,Nc,Hc,Pc]},Xc=function(){return[Nc,Vc,zc,Lc,Pc,Hc]},Kc=function(){return[Vc,Nc,Lc,zc,Pc,Hc]},Jc=Object.freeze({__proto__:null,events:function(t){return uu([su(Mi(),(function(n,e){var o=t.channels,r=ht(o),i=e,u=function(t,n){return n.universal?t:Z(t,(function(t){return G(n.channels,t)}))}(r,i);J(u,(function(t){var e=o[t],r=e.schema,u=dr("channel["+t+"] data\nReceiver: "+Cu(n.element),r,i.data);e.onReceive(n,u)}))}))])}}),$c=[xr("channels",sr(mo.value,qo([fc("onReceive"),Nr("schema",Zo())])))],Zc=function(t,n,e){return yu((function(o,r){e(o,t,n)}))},Qc=function(t,n,e){return function(t,n,e){var o=e.toString(),r=o.indexOf(")")+1,i=o.indexOf("("),u=o.substring(i+1,r-1).split(/,\s*/);return t.toFunctionAnnotation=function(){return{name:n,parameters:Hu(u.slice(0,1).concat(u.slice(3)))}},t}((function(o){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var u=[o].concat(r);return o.config({name:D(t)}).fold((function(){throw new Error("We could not find any behaviour configuration for: "+t+". Using API: "+e)}),(function(t){var e=Array.prototype.slice.call(u,1);return n.apply(void 0,[o,t.config,t.state].concat(e))}))}),e,n)},ts=function(t){return{key:t,value:void 0}},ns=function(t,n,o,r,i,u,a){var c=function(t){return Dt(t,o)?t[o]():z.none()},s=yt(i,(function(t,n){return Qc(o,t,n)})),l=yt(u,(function(t,n){return Pu(t,n)})),f=e(e(e({},l),s),{revoke:B(ts,o),config:function(n){var e=dr(o+"-config",t,n);return{key:o,value:{config:e,me:f,configAsRaw:le((function(){return dr(o+"-config",t,n)})),initialConfig:n,state:a}}},schema:D(n),exhibit:function(t,n){return Bt(c(t),Tt(r,"exhibit"),(function(t,e){return e(n,t.config,t.state)})).getOrThunk((function(){return Ku({})}))},name:D(o),handlers:function(t){return c(t).map((function(t){return Tt(r,"events").getOr((function(){return{}}))(t.config,t.state)})).getOr({})}});return f},es=function(t){return Jr(t)},os=qo([yr("fields"),yr("name"),Nr("active",{}),Nr("apis",{}),Nr("state",qu),Nr("extra",{})]),rs=function(t){var n=dr("Creating behaviour: "+t.name,os,t);return function(t,n,e,o,r,i){var u,a,c=qo(t),s=Rr(n,[(u="config",a=t,Dr(u,qo(a)))]);return ns(c,s,n,e,o,r,i)}(n.fields,n.name,n.active,n.apis,n.extra,n.state)},is=qo([yr("branchKey"),yr("branches"),yr("name"),Nr("active",{}),Nr("apis",{}),Nr("state",qu),Nr("extra",{})]),us=function(t){var n=dr("Creating behaviour: "+t.name,is,t);return function(t,n,e,o,r,i){var u=t,a=Rr(n,[Dr("config",t)]);return ns(u,a,n,e,o,r,i)}(gr(n.branchKey,n.branches),n.name,n.active,n.apis,n.extra,n.state)},as=D(void 0),cs=rs({fields:$c,name:"receiving",active:Jc}),ss=Object.freeze({__proto__:null,exhibit:function(t,n){return Ku({classes:[],styles:n.useFixed()?{}:{position:"relative"}})}}),ls=function(t,n){return void 0===n&&(n=!1),t.dom.focus({preventScroll:n})},fs=function(t){return t.dom.blur()},ds=function(t){var n=Cn(t).dom;return t.dom===n.activeElement},ms=function(t){return void 0===t&&(t=to()),z.from(t.dom.activeElement).map(Gt.fromDom)},gs=function(t){return ms(Cn(t)).filter((function(n){return t.dom.contains(n.dom)}))},ps=function(t,n){var e=Cn(n),o=ms(e).bind((function(t){var e,o,r=function(n){return cn(t,n)};return r(n)?z.some(n):(e=r,(o=function(t){for(var n=0;n<t.childNodes.length;n++){var r=Gt.fromDom(t.childNodes[n]);if(e(r))return z.some(r);var i=o(t.childNodes[n]);if(i.isSome())return i}return z.none()})(n.dom))})),r=t(n);return o.each((function(t){ms(e).filter((function(n){return cn(n,t)})).fold((function(){ls(t)}),_)})),r},hs=function(t,n,e,o,r){var i=function(t){return t+"px"};return{position:t,left:n.map(i),top:e.map(i),right:o.map(i),bottom:r.map(i)}},vs=function(t,n){jn(t,function(t){return e(e({},t),{position:z.some(t.position)})}(n))},bs=qr([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),ys=function(t,n,e,o,r,i){var u=n.rect,a=u.x-e,c=u.y-o,s=r-(a+u.width),l=i-(c+u.height),f=z.some(a),d=z.some(c),m=z.some(s),g=z.some(l),p=z.none();return function(t,n,e,o,r,i,u,a,c){return t.fold(n,e,o,r,i,u,a,c)}(n.direction,(function(){return hs(t,f,d,p,p)}),(function(){return hs(t,p,d,m,p)}),(function(){return hs(t,f,p,p,g)}),(function(){return hs(t,p,p,m,g)}),(function(){return hs(t,f,d,p,p)}),(function(){return hs(t,f,p,p,g)}),(function(){return hs(t,f,d,p,p)}),(function(){return hs(t,p,d,m,p)}))},xs=function(t,n){return t.fold((function(){var t=n.rect;return hs("absolute",z.some(t.x),z.some(t.y),z.none(),z.none())}),(function(t,e,o,r){return ys("absolute",n,t,e,o,r)}),(function(t,e,o,r){return ys("fixed",n,t,e,o,r)}))},ws=function(t,n){var e=B(oo,n),o=t.fold(e,e,(function(){var t=Je();return oo(n).translate(-t.left,-t.top)})),r=se(n),i=ne(n);return ro(o.left,o.top,r,i)},Ss=function(t,n){return n.fold((function(){return t.fold(co,co,ro)}),(function(n){return t.fold(D(n),D(n),(function(){var e=ks(t,n.x,n.y);return ro(e.left,e.top,n.width,n.height)}))}))},ks=function(t,n,e){var o=oe(n,e);return t.fold(D(o),D(o),(function(){var t=Je();return o.translate(-t.left,-t.top)}))};bs.none;var Os,Cs=bs.relative,_s=bs.fixed,Ts=function(t,n){return function(t,n){return{anchorBox:t,origin:n}}(t,n)},Es="data-alloy-placement",Ds=function(t){return Vn(t,Es)},As=qr([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Ms=function(t,n,e,o){var r=t.bubble,i=r.offset,u=function(t,n,e){var o=function(o,r){return n[o].map((function(n){var i="top"===o||"bottom"===o,u=i?e.top:e.left,a=("left"===o||"top"===o?Math.max:Math.min)(n,r)+u;return i?Tc(a,t.y,t.bottom):Tc(a,t.x,t.right)})).getOr(r)},r=o("left",t.x),i=o("top",t.y),u=o("right",t.right),a=o("bottom",t.bottom);return ro(r,i,u-r,a-i)}(o,t.restriction,i),a=t.x+i.left,c=t.y+i.top,s=ro(a,c,n,e),l=function(t,n){var e=n.x,o=n.y,r=n.right,i=n.bottom,u=t.x,a=t.y,c=t.right,s=t.bottom,l=t.width,f=t.height;return{originInBounds:u>=e&&u<=r&&a>=o&&a<=i,sizeInBounds:c<=r&&c>=e&&s<=i&&s>=o,visibleW:Math.min(l,u>=e?r-u:c-e),visibleH:Math.min(f,a>=o?i-a:s-o)}}(s,u),f=l.originInBounds,d=l.sizeInBounds,m=l.visibleW,g=l.visibleH,p=f&&d,h=p?s:function(t,n){var e=n.x,o=n.y,r=n.right,i=n.bottom,u=t.x,a=t.y,c=t.width,s=t.height,l=Math.max(e,r-c),f=Math.max(o,i-s),d=Tc(u,e,l),m=Tc(a,o,f),g=Math.min(d+c,r)-d,p=Math.min(m+s,i)-m;return ro(d,m,g,p)}(s,u),v=h.width>0&&h.height>0,b=function(t,n,e){var o=D(n.bottom-e.y),r=D(e.bottom-n.y),i=function(t,n,e,o){return t.fold(n,n,o,o,n,o,e,e)}(t,r,r,o),u=D(n.right-e.x),a=D(e.right-n.x),c=function(t,n,e,o){return t.fold(n,o,n,o,e,e,n,o)}(t,a,a,u);return{maxWidth:c,maxHeight:i}}(t.direction,h,o),y=b.maxWidth,x={rect:h,maxHeight:b.maxHeight,maxWidth:y,direction:t.direction,placement:t.placement,classes:{on:r.classesOn,off:r.classesOff},layout:t.label,testY:c};return p||t.alwaysFit?As.fit(x):As.nofit(x,m,g,v)},Bs=function(t){var n=Gr(z.none()),e=function(){return n.get().each(t)};return{clear:function(){e(),n.set(z.none())},isSet:function(){return n.get().isSome()},get:function(){return n.get()},set:function(t){e(),n.set(z.some(t))}}},Is=function(){return Bs((function(t){return t.unbind()}))},Fs=function(){var t=Bs(_);return e(e({},t),{on:function(n){return t.get().each(n)}})},Rs=V,Ns=function(t,n,e){return function(t,n,e,o){return Pe(t,n,e,o,!1)}(t,n,Rs,e)},Vs=function(t,n,e){return function(t,n,e,o){return Pe(t,n,e,o,!0)}(t,n,Rs,e)},zs=He,Ls=["top","bottom","right","left"],Hs="data-alloy-transition-timer",Ps=function(t,n){return function(t,n){return it(n,(function(n){return ga(t,n)}))}(t,n.classes)},Us=function(t,n){var e=function(t){return parseFloat(t).toFixed(3)};return Ct(n,(function(n,o){var r,i,u,a=t[o].map(e),c=n.map(e);return void 0===u&&(u=M),!Bt(r=a,i=c,u).getOr(r.isNone()&&i.isNone())})).isSome()},Ws=function(t,n){var e,o=Is(),r=Is(),i=function(n){var e,o=null!==(e=n.raw.pseudoElement)&&void 0!==e?e:"";return cn(n.target,t)&&Ut(o)&&G(Ls,n.raw.propertyName)},u=function(u){if(w(u)||i(u)){o.clear(),r.clear();var a=null==u?void 0:u.raw.type;(w(a)||a===ki())&&(clearTimeout(e),Ln(t,Hs),ha(t,n.classes))}},a=Ns(t,Oi(),(function(n){i(n)&&(a.unbind(),o.set(Ns(t,ki(),u)),r.set(Ns(t,Si(),u)))})),c=function(t){var n=function(n){var e=Gn(t,n).split(/\s*,\s*/);return Z(e,Pt)},e=function(t){if(g(t)&&/^[\d.]+/.test(t)){var n=parseFloat(t);return Lt(t,"ms")?n:1e3*n}return 0},o=n("transition-delay"),r=n("transition-duration");return tt(r,(function(t,n,r){var i=e(o[r])+e(n);return Math.max(t,i)}),0)}(t);requestAnimationFrame((function(){e=setTimeout(u,c+17),Fn(t,Hs,e)}))},js=function(t,n,o,r,i,u){var a=function(t,n,e){return e.exists((function(e){var o=t.mode;return"all"===o||e[o]!==n[o]}))}(r,i,u);if(a||Ps(t,r)){Un(t,"position",o.position);var c=ws(n,t),s=xs(n,e(e({},i),{rect:c})),l=ct(Ls,(function(t){return s[t]}));Us(o,l)&&(jn(t,l),a&&function(t,n){pa(t,n.classes),Vn(t,Hs).each((function(n){clearTimeout(parseInt(n,10)),Ln(t,Hs)})),Ws(t,n)}(t,r),$n(t))}else ha(t,r.classes)},Gs=function(t,n,e,o){Jn(n,"max-height"),Jn(n,"max-width");var r,i={width:se(r=n),height:ne(r)};return function(t,n,e,o,r,i){var u=o.width,a=o.height,c=function(n,c,s,l,f){var d=n(e,o,r,t,i),m=Ms(d,u,a,i);return m.fold(D(m),(function(t,n,e,o){return(f===o?e>l||n>s:!f&&o)?m:As.nofit(c,s,l,f)}))},s=tt(n,(function(t,n){var e=B(c,n);return t.fold(D(t),e)}),As.nofit({rect:e,maxHeight:o.height,maxWidth:o.width,direction:bc(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:e.y},-1,-1,!1));return s.fold(A,A)}(n,o.preference,t,i,e,o.bounds)},qs=function(t,n){!function(t,n){Fn(t,Es,n)}(t,n.placement)},Ys=function(t,n){!function(t,n){var e=Qn.max(t,n,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);Un(t,"max-height",e+"px")}(t,Math.floor(n))},Xs=D((function(t,n){Ys(t,n),Wn(t,{"overflow-x":"hidden","overflow-y":"auto"})})),Ks=D((function(t,n){Ys(t,n)})),Js=function(t,n,e){return void 0===t[n]?e:t[n]},$s=function(t,n,e,o){var r=Gs(t,n,e,o);return function(t,n,e){var o=xs(e.origin,n);e.transition.each((function(r){js(t,e.origin,o,r,n,e.lastPlacement)})),vs(t,o)}(n,r,o),qs(n,r),function(t,n){var e=n.classes;ha(t,e.off),pa(t,e.on)}(n,r),function(t,n,e){(0,e.maxHeightFunction)(t,n.maxHeight)}(n,r,o),function(t,n,e){(0,e.maxWidthFunction)(t,n.maxWidth)}(n,r,o),{layout:r.layout,placement:r.placement}},Zs=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],Qs=function(t,n,e,o){void 0===o&&(o=1);var r=t*o,i=n*o,u=function(t){return Tt(e,t).getOr([])},a=function(t,n,e){var o=at(Zs,e);return{offset:oe(t,n),classesOn:rt(e,u),classesOff:rt(o,u)}};return{southeast:function(){return a(-t,n,["top","alignLeft"])},southwest:function(){return a(t,n,["top","alignRight"])},south:function(){return a(-t/2,n,["top","alignCentre"])},northeast:function(){return a(-t,-n,["bottom","alignLeft"])},northwest:function(){return a(t,-n,["bottom","alignRight"])},north:function(){return a(-t/2,-n,["bottom","alignCentre"])},east:function(){return a(t,-n/2,["valignCentre","left"])},west:function(){return a(-t,-n/2,["valignCentre","right"])},insetNortheast:function(){return a(r,i,["top","alignLeft","inset"])},insetNorthwest:function(){return a(-r,i,["top","alignRight","inset"])},insetNorth:function(){return a(-r/2,i,["top","alignCentre","inset"])},insetSoutheast:function(){return a(r,-i,["bottom","alignLeft","inset"])},insetSouthwest:function(){return a(-r,-i,["bottom","alignRight","inset"])},insetSouth:function(){return a(-r/2,-i,["bottom","alignCentre","inset"])},insetEast:function(){return a(-r,-i/2,["valignCentre","right","inset"])},insetWest:function(){return a(r,-i/2,["valignCentre","left","inset"])}}},tl=function(){return Qs(0,0,{})},nl=A,el=function(t,n){return function(e){return"rtl"===ol(e)?n:t}},ol=function(t){return"rtl"===Gn(t,"direction")?"rtl":"ltr"};!function(t){t.TopToBottom="toptobottom",t.BottomToTop="bottomtotop"}(Os||(Os={}));var rl="data-alloy-vertical-dir",il=function(t){return Pa(t,(function(t){return tn(t)&&Nn(t,"data-alloy-vertical-dir")===Os.BottomToTop}))},ul=function(){return Rr("layouts",[yr("onLtr"),yr("onRtl"),Er("onBottomLtr"),Er("onBottomRtl")])},al=function(t,n,e,o,r,i,u){var a=u.map(il).getOr(!1),c=n.layouts.map((function(n){return n.onLtr(t)})),s=n.layouts.map((function(n){return n.onRtl(t)})),l=a?n.layouts.bind((function(n){return n.onBottomLtr.map((function(n){return n(t)}))})).or(c).getOr(r):c.getOr(e),f=a?n.layouts.bind((function(n){return n.onBottomRtl.map((function(n){return n(t)}))})).or(s).getOr(i):s.getOr(o);return el(l,f)(t)},cl=[yr("hotspot"),Er("bubble"),Nr("overrides",{}),ul(),mc("placement",(function(t,n,e){var o=n.hotspot,r=ws(e,o.element),i=al(t.element,n,Xc(),Kc(),qc(),Yc(),z.some(n.hotspot.element));return z.some(nl({anchorBox:r,bubble:n.bubble.getOr(tl()),overrides:n.overrides,layouts:i}))}))],sl=[yr("x"),yr("y"),Nr("height",0),Nr("width",0),Nr("bubble",tl()),Nr("overrides",{}),ul(),mc("placement",(function(t,n,e){var o=ks(e,n.x,n.y),r=ro(o.left,o.top,n.width,n.height),i=al(t.element,n,jc(),Gc(),jc(),Gc(),z.none());return z.some(nl({anchorBox:r,bubble:n.bubble,overrides:n.overrides,layouts:i}))}))],ll=qr([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),fl=function(t){return t.fold(A,(function(t,n,e){return t.translate(-n,-e)}))},dl=function(t){return t.fold(A,A)},ml=function(t){return tt(t,(function(t,n){return t.translate(n.left,n.top)}),oe(0,0))},gl=function(t){var n=K(t,dl);return ml(n)},pl=ll.screen,hl=ll.absolute,vl=function(t,n,e){var o=ln(t.element),r=Je(o),i=function(t,n,e){var o=mn(e.root).dom;return z.from(o.frameElement).map(Gt.fromDom).filter((function(n){var e=ln(n),o=ln(t.element);return cn(e,o)})).map(ie)}(t,0,e).getOr(r);return hl(i,r.left,r.top)},bl=function(t,n,e,o){var r=pl(oe(t,n));return z.some(function(t,n,e){return{point:t,width:n,height:e}}(r,e,o))},yl=function(t,n,e,o,r){return t.map((function(t){var i,u,a,c=[n,t.point],s=(i=function(){return gl(c)},u=function(){return gl(c)},a=function(){return function(t){var n=K(t,fl);return ml(n)}(c)},o.fold(i,u,a)),l=function(t,n,e,o){return{x:t,y:n,width:e,height:o}}(s.left,s.top,t.width,t.height),f=e.showAbove?qc():Xc(),d=e.showAbove?Yc():Kc(),m=al(r,e,f,d,f,d,z.none());return nl({anchorBox:l,bubble:e.bubble.getOr(tl()),overrides:e.overrides,layouts:m})}))},xl=[yr("node"),yr("root"),Er("bubble"),ul(),Nr("overrides",{}),Nr("showAbove",!1),mc("placement",(function(t,n,e){var o=vl(t,0,n);return n.node.filter(An).bind((function(r){var i=r.dom.getBoundingClientRect(),u=bl(i.left,i.top,i.width,i.height),a=n.node.getOr(t.element);return yl(u,o,n,e,a)}))}))],wl=function(t,n,e,o){return{start:t,soffset:n,finish:e,foffset:o}},Sl=qr([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),kl=(Sl.before,Sl.on,Sl.after,function(t){return t.fold(A,A,A)}),Ol=qr([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Cl={domRange:Ol.domRange,relative:Ol.relative,exact:Ol.exact,exactFromRange:function(t){return Ol.exact(t.start,t.soffset,t.finish,t.foffset)},getWin:function(t){var n=function(t){return t.match({domRange:function(t){return Gt.fromDom(t.startContainer)},relative:function(t,n){return kl(t)},exact:function(t,n,e,o){return t}})}(t);return mn(n)},range:wl},_l=function(t,n,e){var o,r=t.document.createRange();return o=r,n.fold((function(t){o.setStartBefore(t.dom)}),(function(t,n){o.setStart(t.dom,n)}),(function(t){o.setStartAfter(t.dom)})),function(t,n){n.fold((function(n){t.setEndBefore(n.dom)}),(function(n,e){t.setEnd(n.dom,e)}),(function(n){t.setEndAfter(n.dom)}))}(r,e),r},Tl=function(t,n,e,o,r){var i=t.document.createRange();return i.setStart(n.dom,e),i.setEnd(o.dom,r),i},El=function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height}},Dl=qr([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),Al=function(t,n,e){return n(Gt.fromDom(e.startContainer),e.startOffset,Gt.fromDom(e.endContainer),e.endOffset)},Ml=function(t,n){var e=function(t,n){return n.match({domRange:function(t){return{ltr:D(t),rtl:z.none}},relative:function(n,e){return{ltr:le((function(){return _l(t,n,e)})),rtl:le((function(){return z.some(_l(t,e,n))}))}},exact:function(n,e,o,r){return{ltr:le((function(){return Tl(t,n,e,o,r)})),rtl:le((function(){return z.some(Tl(t,o,r,n,e))}))}}})}(t,n);return function(t,n){var e=n.ltr();return e.collapsed?n.rtl().filter((function(t){return!1===t.collapsed})).map((function(t){return Dl.rtl(Gt.fromDom(t.endContainer),t.endOffset,Gt.fromDom(t.startContainer),t.startOffset)})).getOrThunk((function(){return Al(0,Dl.ltr,e)})):Al(0,Dl.ltr,e)}(0,e)},Bl=function(t,n){return Ml(t,n).match({ltr:function(n,e,o,r){var i=t.document.createRange();return i.setStart(n.dom,e),i.setEnd(o.dom,r),i},rtl:function(n,e,o,r){var i=t.document.createRange();return i.setStart(o.dom,r),i.setEnd(n.dom,e),i}})};Dl.ltr,Dl.rtl;var Il,Fl=function(t,n,e){return Z(function(t,n){for(var e=k(n)?n:N,o=t.dom,r=[];null!==o.parentNode&&void 0!==o.parentNode;){var i=o.parentNode,u=Gt.fromDom(i);if(r.push(u),!0===e(u))break;o=i}return r}(t,e),n)},Rl=function(t,n){return function(t,n){var e=void 0===n?document:n.dom;return an(e)?[]:K(e.querySelectorAll(t),Gt.fromDom)}(n,t)},Nl=function(t,n,e,o){var r=function(t,n,e,o){var r=ln(t).dom.createRange();return r.setStart(t.dom,n),r.setEnd(e.dom,o),r}(t,n,e,o),i=cn(t,e)&&n===o;return r.collapsed&&!i},Vl=function(t){if(t.rangeCount>0){var n=t.getRangeAt(0),e=t.getRangeAt(t.rangeCount-1);return z.some(wl(Gt.fromDom(n.startContainer),n.startOffset,Gt.fromDom(e.endContainer),e.endOffset))}return z.none()},zl=function(t){if(null===t.anchorNode||null===t.focusNode)return Vl(t);var n=Gt.fromDom(t.anchorNode),e=Gt.fromDom(t.focusNode);return Nl(n,t.anchorOffset,e,t.focusOffset)?z.some(wl(n,t.anchorOffset,e,t.focusOffset)):Vl(t)},Ll=function(t){return function(t){return z.from(t.getSelection())}(t).filter((function(t){return t.rangeCount>0})).bind(zl)},Hl=function(t,n){return function(t){var n=t.getClientRects(),e=n.length>0?n[0]:t.getBoundingClientRect();return e.width>0||e.height>0?z.some(e).map(El):z.none()}(Bl(t,n))},Pl=function(t,n){return function(t){var n=t.getBoundingClientRect();return n.width>0||n.height>0?z.some(n).map(El):z.none()}(Bl(t,n))},Ul=function(t,n){var e=function(n){return t(n)?z.from(n.dom.nodeValue):z.none()};return{get:function(o){if(!t(o))throw new Error("Can only get "+n+" value of a "+n+" node");return e(o).getOr("")},getOption:e,set:function(e,o){if(!t(e))throw new Error("Can only set raw "+n+" value of a "+n+" node");e.dom.nodeValue=o}}}(nn,"text"),Wl=function(t,n){return{element:t,offset:n}},jl=function(t,n){var e=vn(t);if(0===e.length)return Wl(t,n);if(n<e.length)return Wl(e[n],0);var o=e[e.length-1],r=nn(o)?function(t){return Ul.get(t)}(o).length:vn(o).length;return Wl(o,r)},Gl=function(t,n){return nn(t)?Wl(t,n):jl(t,n)},ql=function(t){return void 0!==t.foffset},Yl=function(t,n){return n.getSelection.getOrThunk((function(){return function(){return Ll(t)}}))().map((function(t){if(ql(t)){var n=Gl(t.start,t.soffset),e=Gl(t.finish,t.foffset);return Cl.range(n.element,n.offset,e.element,e.offset)}return t}))},Xl=[Er("getSelection"),yr("root"),Er("bubble"),ul(),Nr("overrides",{}),Nr("showAbove",!1),mc("placement",(function(t,n,e){var o=mn(n.root).dom,r=vl(t,0,n),i=Yl(o,n).bind((function(t){if(ql(t)){var n=Pl(o,Cl.exactFromRange(t)).orThunk((function(){var n=Gt.fromText("\ufeff");We(t.start,n);var e=Hl(o,Cl.exact(n,0,n,1));return Ke(n),e}));return n.bind((function(t){return bl(t.left,t.top,t.width,t.height)}))}var e=yt(t,(function(t){return t.dom.getBoundingClientRect()})),r={left:Math.min(e.firstCell.left,e.lastCell.left),right:Math.max(e.firstCell.right,e.lastCell.right),top:Math.min(e.firstCell.top,e.lastCell.top),bottom:Math.max(e.firstCell.bottom,e.lastCell.bottom)};return bl(r.left,r.top,r.right-r.left,r.bottom-r.top)})),u=Yl(o,n).bind((function(t){return ql(t)?tn(t.start)?z.some(t.start):pn(t.start):z.some(t.firstCell)})).getOr(t.element);return yl(i,r,n,e,u)}))],Kl="link-layout",Jl=function(t){return t.x+t.width},$l=function(t,n){return t.x-n.width},Zl=function(t,n){return t.y-n.height+t.height},Ql=function(t){return t.y},tf=function(t,n,e){return hc(Jl(t),Ql(t),e.southeast(),bc(),"southeast",Ec(t,{left:0,top:2}),Kl)},nf=function(t,n,e){return hc($l(t,n),Ql(t),e.southwest(),yc(),"southwest",Ec(t,{right:1,top:2}),Kl)},ef=function(t,n,e){return hc(Jl(t),Zl(t,n),e.northeast(),xc(),"northeast",Ec(t,{left:0,bottom:3}),Kl)},of=function(t,n,e){return hc($l(t,n),Zl(t,n),e.northwest(),wc(),"northwest",Ec(t,{right:1,bottom:3}),Kl)},rf=function(){return[tf,nf,ef,of]},uf=function(){return[nf,tf,of,ef]},af=[yr("item"),ul(),Nr("overrides",{}),mc("placement",(function(t,n,e){var o=ws(e,n.item.element),r=al(t.element,n,rf(),uf(),rf(),uf(),z.none());return z.some(nl({anchorBox:o,bubble:tl(),overrides:n.overrides,layouts:r}))}))],cf=gr("type",{selection:Xl,node:xl,hotspot:cl,submenu:af,makeshift:sl}),sf=[Tr("classes",nr),Hr("mode","all",["all","layout","placement"])],lf=[Nr("useFixed",N),Er("getBounds")],ff=[xr("anchor",cf),Rr("transition",sf)],df=function(t,n,e,o,r,i){return function(t,n,e,o,r,i,u,a){var c=Js(u,"maxHeightFunction",Xs()),s=Js(u,"maxWidthFunction",_),l=t.anchorBox,f=t.origin,d={bounds:Ss(f,i),origin:f,preference:o,maxHeightFunction:c,maxWidthFunction:s,lastPlacement:r,transition:a};return $s(l,n,e,d)}(Ts(n.anchorBox,t),o.element,n.bubble,n.layouts,r,e,n.overrides,i)},mf=function(t,n,e,o,r,i){var u=dr("placement.info",Yo(ff),r),a=u.anchor,c=o.element,s=e.get(o.uid);ps((function(){Un(c,"position","fixed");var r=Yn(c,"visibility");Un(c,"visibility","hidden");var l=n.useFixed()?function(){var t=document.documentElement;return _s(0,0,t.clientWidth,t.clientHeight)}():function(t){var n=ie(t.element),e=t.element.dom.getBoundingClientRect();return Cs(n.left,n.top,e.width,e.height)}(t);a.placement(t,a,l).each((function(t){var r=i.orThunk((function(){return n.getBounds.map(R)})),a=df(l,t,r,o,s,u.transition);e.set(o.uid,a)})),r.fold((function(){Jn(c,"visibility")}),(function(t){Un(c,"visibility",t)})),Yn(c,"left").isNone()&&Yn(c,"top").isNone()&&Yn(c,"right").isNone()&&Yn(c,"bottom").isNone()&&At(Yn(c,"position"),"fixed")&&Jn(c,"position")}),c)},gf=Object.freeze({__proto__:null,position:function(t,n,e,o,r){var i=z.none();mf(t,n,e,o,r,i)},positionWithinBounds:mf,getMode:function(t,n,e){return n.useFixed()?"fixed":"absolute"},reset:function(t,n,e,o){var r=o.element;J(["position","left","right","top","bottom"],(function(t){return Jn(r,t)})),function(t){Ln(t,Es)}(r),e.clear(o.uid)}}),pf=Object.freeze({__proto__:null,init:function(){var t={};return Yu({readState:function(){return t},clear:function(n){S(n)?delete t[n]:t={}},set:function(n,e){t[n]=e},get:function(n){return Tt(t,n)}})}}),hf=rs({fields:lf,name:"positioning",active:ss,apis:gf,state:pf}),vf=function(t){return t.getSystem().isConnected()},bf=function(t){tu(t,ji());var n=t.components();J(n,bf)},yf=function(t){var n=t.components();J(n,yf),tu(t,Wi())},xf=function(t,n){t.getSystem().addToWorld(n),An(t.element)&&yf(n)},wf=function(t){bf(t),t.getSystem().removeFromWorld(t)},Sf=function(t,n){qe(t.element,n.element)},kf=function(t,n,e){var o=t.components();!function(t){J(t.components(),(function(t){return Ke(t.element)})),Xe(t.element),t.syncComponents()}(t);var r=e(n),i=at(o,r);J(i,(function(n){bf(n),t.getSystem().removeFromWorld(n)})),J(r,(function(n){vf(n)?Sf(t,n):(t.getSystem().addToWorld(n),Sf(t,n),An(t.element)&&yf(n))})),t.syncComponents()},Of=function(t,n){Cf(t,n,qe)},Cf=function(t,n,e){t.getSystem().addToWorld(n),e(t.element,n.element),An(t.element)&&yf(n),t.syncComponents()},_f=function(t){bf(t),Ke(t.element),t.getSystem().removeFromWorld(t)},Tf=function(t){var n=gn(t.element).bind((function(n){return t.getSystem().getByDom(n).toOptional()}));_f(t),n.each((function(t){t.syncComponents()}))},Ef=function(t){var n=t.components();J(n,_f),Xe(t.element),t.syncComponents()},Df=function(t,n){Mf(t,n,qe)},Af=function(t,n){Mf(t,n,je)},Mf=function(t,n,e){e(t,n.element);var o=vn(n.element);J(o,(function(t){n.getByDom(t).each(yf)}))},Bf=function(t){var n=vn(t.element);J(n,(function(n){t.getByDom(n).each(bf)})),Ke(t.element)},If=function(t,n,e,o){e.get().each((function(n){Ef(t)}));var r=n.getAttachPoint(t);Of(r,t);var i=t.getSystem().build(o);return Of(t,i),e.set(i),i},Ff=function(t,n,e,o){var r=If(t,n,e,o);return n.onOpen(t,r),r},Rf=function(t,n,e){e.get().each((function(o){Ef(t),Tf(t),n.onClose(t,o),e.clear()}))},Nf=function(t,n,e){return e.isOpen()},Vf=function(t,n,e){var o=n.getAttachPoint(t);Un(t.element,"position",hf.getMode(o)),function(t,n,e,o){Yn(t.element,n).fold((function(){Ln(t.element,e)}),(function(n){Fn(t.element,e,n)})),Un(t.element,n,o)}(t,"visibility",n.cloakVisibilityAttr,"hidden")},zf=function(t,n,e){(function(t){return q(["top","left","right","bottom"],(function(n){return Yn(t,n).isSome()}))})(t.element)||Jn(t.element,"position"),function(t,n,e){Vn(t.element,e).fold((function(){return Jn(t.element,n)}),(function(e){return Un(t.element,n,e)}))}(t,"visibility",n.cloakVisibilityAttr)},Lf=Object.freeze({__proto__:null,cloak:Vf,decloak:zf,open:Ff,openWhileCloaked:function(t,n,e,o,r){Vf(t,n),Ff(t,n,e,o),r(),zf(t,n)},close:Rf,isOpen:Nf,isPartOf:function(t,n,e,o){return Nf(0,0,e)&&e.get().exists((function(e){return n.isPartOf(t,e,o)}))},getState:function(t,n,e){return e.get()},setContent:function(t,n,e,o){return e.get().map((function(){return If(t,n,e,o)}))}}),Hf=Object.freeze({__proto__:null,events:function(t,n){return uu([su(Ni(),(function(e,o){Rf(e,t,n)}))])}}),Pf=[sc("onOpen"),sc("onClose"),yr("isPartOf"),yr("getAttachPoint"),Nr("cloakVisibilityAttr","data-precloak-visibility")],Uf=Object.freeze({__proto__:null,init:function(){var t=Fs(),n=D("not-implemented");return Yu({readState:n,isOpen:t.isSet,clear:t.clear,set:t.set,get:t.get})}}),Wf=rs({fields:Pf,name:"sandboxing",active:Hf,apis:Lf,state:Uf}),jf=D("dismiss.popups"),Gf=D("reposition.popups"),qf=D("mouse.released"),Yf=qo([Nr("isExtraPart",N),Rr("fireEventInstead",[Nr("event",Gi())])]),Xf=function(t){var n,e=dr("Dismissal",Yf,t);return(n={})[jf()]={schema:qo([yr("target")]),onReceive:function(t,n){Wf.isOpen(t)&&(Wf.isPartOf(t,n.target)||e.isExtraPart(t,n.target)||e.fireEventInstead.fold((function(){return Wf.close(t)}),(function(n){return tu(t,n.event)})))}},n},Kf=qo([Rr("fireEventInstead",[Nr("event",qi())]),Or("doReposition")]),Jf=function(t){var n,e=dr("Reposition",Kf,t);return(n={})[Gf()]={onReceive:function(t){Wf.isOpen(t)&&e.fireEventInstead.fold((function(){return e.doReposition(t)}),(function(n){return tu(t,n.event)}))}},n},$f=function(t,n,e){n.store.manager.onLoad(t,n,e)},Zf=function(t,n,e){n.store.manager.onUnload(t,n,e)},Qf=Object.freeze({__proto__:null,onLoad:$f,onUnload:Zf,setValue:function(t,n,e,o){n.store.manager.setValue(t,n,e,o)},getValue:function(t,n,e){return n.store.manager.getValue(t,n,e)},getState:function(t,n,e){return e}}),td=Object.freeze({__proto__:null,events:function(t,n){var e=t.resetOnDom?[vu((function(e,o){$f(e,t,n)})),bu((function(e,o){Zf(e,t,n)}))]:[Zc(t,n,$f)];return uu(e)}}),nd=function(){var t=Gr(null);return Yu({set:t.set,get:t.get,isNotSet:function(){return null===t.get()},clear:function(){t.set(null)},readState:function(){return{mode:"memory",value:t.get()}}})},ed=function(){var t=Gr({}),n=Gr({});return Yu({readState:function(){return{mode:"dataset",dataByValue:t.get(),dataByText:n.get()}},lookup:function(e){return Tt(t.get(),e).orThunk((function(){return Tt(n.get(),e)}))},update:function(o){var r=t.get(),i=n.get(),u={},a={};J(o,(function(t){u[t.value]=t,Tt(t,"meta").each((function(n){Tt(n,"text").each((function(n){a[n]=t}))}))})),t.set(e(e({},r),u)),n.set(e(e({},i),a))},clear:function(){t.set({}),n.set({})}})},od=Object.freeze({__proto__:null,memory:nd,dataset:ed,manual:function(){return Yu({readState:_})},init:function(t){return t.store.manager.state(t)}}),rd=function(t,n,e,o){var r=n.store;e.update([o]),r.setValue(t,o),n.onSetValue(t,o)},id=[Er("initialValue"),yr("getFallbackEntry"),yr("getDataKey"),yr("setValue"),mc("manager",{setValue:rd,getValue:function(t,n,e){var o=n.store,r=o.getDataKey(t);return e.lookup(r).getOrThunk((function(){return o.getFallbackEntry(r)}))},onLoad:function(t,n,e){n.store.initialValue.each((function(o){rd(t,n,e,o)}))},onUnload:function(t,n,e){e.clear()},state:ed})],ud=[yr("getValue"),Nr("setValue",_),Er("initialValue"),mc("manager",{setValue:function(t,n,e,o){n.store.setValue(t,o),n.onSetValue(t,o)},getValue:function(t,n,e){return n.store.getValue(t)},onLoad:function(t,n,e){n.store.initialValue.each((function(e){n.store.setValue(t,e)}))},onUnload:_,state:qu.init})],ad=[Er("initialValue"),mc("manager",{setValue:function(t,n,e,o){e.set(o),n.onSetValue(t,o)},getValue:function(t,n,e){return e.get()},onLoad:function(t,n,e){n.store.initialValue.each((function(t){e.isNotSet()&&e.set(t)}))},onUnload:function(t,n,e){e.clear()},state:nd})],cd=[Vr("store",{mode:"memory"},gr("mode",{memory:ad,manual:ud,dataset:id})),sc("onSetValue"),Nr("resetOnDom",!1)],sd=rs({fields:cd,name:"representing",active:td,apis:Qf,extra:{setValueFrom:function(t,n){var e=sd.getValue(n);sd.setValue(t,e)}},state:od}),ld=function(t,n){return jr(t,{},K(n,(function(n){return e=n.name(),o="Cannot configure "+n.name()+" for "+t,hr(e,e,{tag:"option",process:{}},Lo((function(t){return wo("The field: "+e+" is forbidden. "+o)})));var e,o})).concat([vr("dump",A)]))},fd=function(t){return t.dump},dd=function(t,n){return e(e({},es(n)),t.dump)},md=ld,gd=dd,pd="placeholder",hd=qr([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),vd=function(t){return Et(t,"uiType")},bd=function(t,n,e,o){return vd(e)&&e.uiType===pd?function(t,n,e,o){return t.exists((function(t){return t!==e.owner}))?hd.single(!0,D(e)):Tt(o,e.name).fold((function(){throw new Error("Unknown placeholder component: "+e.name+"\nKnown: ["+ht(o)+"]\nNamespace: "+t.getOr("none")+"\nSpec: "+JSON.stringify(e,null,2))}),(function(t){return t.replace()}))}(t,0,e,o):hd.single(!1,D(e))},yd=function(t,n,o,r){return bd(t,0,o,r).fold((function(i,u){var a=vd(o)?u(n,o.config,o.validated):u(n),c=Tt(a,"components").getOr([]),s=rt(c,(function(e){return yd(t,n,e,r)}));return[e(e({},a),{components:s})]}),(function(t,e){if(vd(o)){var r=e(n,o.config,o.validated);return o.validated.preprocess.getOr(A)(r)}return e(n)}))},xd=function(t,n,e,o){var r=yt(o,(function(t,n){return function(t,n){var e=!1;return{name:D(t),required:function(){return n.fold((function(t,n){return t}),(function(t,n){return t}))},used:function(){return e},replace:function(){if(e)throw new Error("Trying to use the same placeholder more than once: "+t);return e=!0,n}}}(n,t)})),i=function(t,n,e,o){return rt(e,(function(e){return yd(t,n,e,o)}))}(t,n,e,r);return bt(r,(function(e){if(!1===e.used()&&e.required())throw new Error("Placeholder: "+e.name()+" was not found in components list\nNamespace: "+t.getOr("none")+"\nComponents: "+JSON.stringify(n.components,null,2))})),i},wd=hd.single,Sd=hd.multiple,kd=D(pd),Od=qr([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),Cd=Nr("factory",{sketch:A}),_d=Nr("schema",[]),Td=yr("name"),Ed=hr("pname","pname",Bo((function(t){return"<alloy."+Du(t.name)+">"})),Zo()),Dd=vr("schema",(function(){return[Er("preprocess")]})),Ad=Nr("defaults",D({})),Md=Nr("overrides",D({})),Bd=Yo([Cd,_d,Td,Ed,Ad,Md]),Id=Yo([Cd,_d,Td,Ad,Md]),Fd=Yo([Cd,_d,Td,Ed,Ad,Md]),Rd=Yo([Cd,Dd,Td,yr("unit"),Ed,Ad,Md]),Nd=function(t){return t.fold(z.some,z.none,z.some,z.some)},Vd=function(t){var n=function(t){return t.name};return t.fold(n,n,n,n)},zd=function(t,n){return function(e){var o=dr("Converting part type",n,e);return t(o)}},Ld=zd(Od.required,Bd),Hd=zd(Od.external,Id),Pd=zd(Od.optional,Fd),Ud=zd(Od.group,Rd),Wd=D("entirety"),jd=Object.freeze({__proto__:null,required:Ld,external:Hd,optional:Pd,group:Ud,asNamedPart:Nd,name:Vd,asCommon:function(t){return t.fold(A,A,A,A)},original:Wd}),Gd=function(t,n,e,o){return Ao(n.defaults(t,e,o),e,{uid:t.partUids[n.name]},n.overrides(t,e,o))},qd=function(t,n){var o={};return J(n,(function(n){Nd(n).each((function(n){var r=Yd(t,n.pname);o[n.name]=function(o){var i=dr("Part: "+n.name+" in "+t,Yo(n.schema),o);return e(e({},r),{config:o,validated:i})}}))})),o},Yd=function(t,n){return{uiType:kd(),owner:t,name:n}},Xd=function(t,n,e){return{uiType:kd(),owner:t,name:n,config:e,validated:{}}},Kd=function(t){return rt(t,(function(t){return t.fold(z.none,z.some,z.none,z.none).map((function(t){return Cr(t.name,t.schema.concat([gc(Wd())]))})).toArray()}))},Jd=function(t){return K(t,Vd)},$d=function(t,n,e){return function(t,n,e){var o={},r={};return J(e,(function(t){t.fold((function(t){o[t.pname]=wd(!0,(function(n,e,o){return t.factory.sketch(Gd(n,t,e,o))}))}),(function(t){var e=n.parts[t.name];r[t.name]=D(t.factory.sketch(Gd(n,t,e[Wd()]),e))}),(function(t){o[t.pname]=wd(!1,(function(n,e,o){return t.factory.sketch(Gd(n,t,e,o))}))}),(function(t){o[t.pname]=Sd(!0,(function(n,e,o){var r=n[t.name];return K(r,(function(e){return t.factory.sketch(Ao(t.defaults(n,e,o),e,t.overrides(n,e)))}))}))}))})),{internals:D(o),externals:D(r)}}(0,n,e)},Zd=function(t,n,e){return xd(z.some(t),n,n.components,e)},Qd=function(t,n,e){var o=n.partUids[e];return t.getSystem().getByUid(o).toOptional()},tm=function(t,n,e){return Qd(t,n,e).getOrDie("Could not find part: "+e)},nm=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return J(e,(function(t){o[t]=D(i.getByUid(r[t]))})),o},em=function(t,n){var e=t.getSystem();return yt(n.partUids,(function(t,n){return D(e.getByUid(t))}))},om=function(t){return ht(t.partUids)},rm=function(t,n,e){var o={},r=n.partUids,i=t.getSystem();return J(e,(function(t){o[t]=D(i.getByUid(r[t]).getOrDie())})),o},im=function(t,n){var e=Jd(n);return Jr(K(e,(function(n){return{key:n,value:t+"-"+n}})))},um=function(t){return hr("partUids","partUids",Fo((function(n){return im(n.uid,t)})),Zo())},am=Object.freeze({__proto__:null,generate:qd,generateOne:Xd,schemas:Kd,names:Jd,substitutes:$d,components:Zd,defaultUids:im,defaultUidsSchema:um,getAllParts:em,getAllPartNames:om,getPart:Qd,getPartOrDie:tm,getParts:nm,getPartsOrDie:rm}),cm=function(t,n,e,o,r){var i=function(t,n){return(t.length>0?[Cr("parts",t)]:[]).concat([yr("uid"),Nr("dom",{}),Nr("components",[]),gc("originalSpec"),Nr("debug.sketcher",{})]).concat(n)}(o,r);return dr(t+" [SpecSchema]",qo(i.concat(n)),e)},sm=function(t,n,e,o,r){var i=lm(r),u=Kd(e),a=um(e),c=cm(t,n,i,u,[a]),s=$d(0,c,e);return o(c,Zd(t,c,s.internals()),i,s.externals())},lm=function(t){return function(t){return Et(t,"uid")}(t)?t:e(e({},t),{uid:Nu("uid")})},fm=qo([yr("name"),yr("factory"),yr("configFields"),Nr("apis",{}),Nr("extraApis",{})]),dm=qo([yr("name"),yr("factory"),yr("configFields"),yr("partFields"),Nr("apis",{}),Nr("extraApis",{})]),mm=function(t){var n=dr("Sketcher for "+t.name,fm,t),o=yt(n.apis,Gu),r=yt(n.extraApis,(function(t,n){return Pu(t,n)}));return e(e({name:n.name,configFields:n.configFields,sketch:function(t){return function(t,n,e,o){var r=lm(o);return e(cm(t,n,r,[],[]),r)}(n.name,n.configFields,n.factory,t)}},o),r)},gm=function(t){var n=dr("Sketcher for "+t.name,dm,t),o=qd(n.name,n.partFields),r=yt(n.apis,Gu),i=yt(n.extraApis,(function(t,n){return Pu(t,n)}));return e(e({name:n.name,partFields:n.partFields,configFields:n.configFields,sketch:function(t){return sm(n.name,n.configFields,n.partFields,n.factory,t)},parts:o},r),i)},pm=function(t){return rn("input")(t)&&"radio"!==Nn(t,"type")||rn("textarea")(t)},hm=Object.freeze({__proto__:null,getCurrent:function(t,n,e){return n.find(t)}}),vm=[yr("find")],bm=rs({fields:vm,name:"composing",apis:hm}),ym=["input","button","textarea","select"],xm=function(t,n,e){(n.disabled()?_m:Tm)(t,n)},wm=function(t,n){return!0===n.useNative&&G(ym,$t(t.element))},Sm=function(t){Fn(t.element,"disabled","disabled")},km=function(t){Ln(t.element,"disabled")},Om=function(t){Fn(t.element,"aria-disabled","true")},Cm=function(t){Fn(t.element,"aria-disabled","false")},_m=function(t,n,e){n.disableClass.each((function(n){la(t.element,n)})),(wm(t,n)?Sm:Om)(t),n.onDisabled(t)},Tm=function(t,n,e){n.disableClass.each((function(n){da(t.element,n)})),(wm(t,n)?km:Cm)(t),n.onEnabled(t)},Em=function(t,n){return wm(t,n)?function(t){return zn(t.element,"disabled")}(t):function(t){return"true"===Nn(t.element,"aria-disabled")}(t)},Dm=Object.freeze({__proto__:null,enable:Tm,disable:_m,isDisabled:Em,onLoad:xm,set:function(t,n,e,o){(o?_m:Tm)(t,n)}}),Am=Object.freeze({__proto__:null,exhibit:function(t,n){return Ku({classes:n.disabled()?n.disableClass.toArray():[]})},events:function(t,n){return uu([au(Bi(),(function(n,e){return Em(n,t)})),Zc(t,n,xm)])}}),Mm=[Ur("disabled",N),Nr("useNative",!0),Er("disableClass"),sc("onDisabled"),sc("onEnabled")],Bm=rs({fields:Mm,name:"disabling",active:Am,apis:Dm}),Im=function(t,n,e,o){var r=Rl(t.element,"."+n.highlightClass);J(r,(function(e){q(o,(function(t){return cn(t.element,e)}))||(da(e,n.highlightClass),t.getSystem().getByDom(e).each((function(e){n.onDehighlight(t,e),tu(e,Qi())})))}))},Fm=function(t,n,e,o){Im(t,n,0,[o]),Rm(t,n,e,o)||(la(o.element,n.highlightClass),n.onHighlight(t,o),tu(o,Zi()))},Rm=function(t,n,e,o){return ga(o.element,n.highlightClass)},Nm=function(t,n,e,o){var r=Rl(t.element,"."+n.itemClass);return z.from(r[o]).fold((function(){return mo.error(new Error("No element found with index "+o))}),t.getSystem().getByDom)},Vm=function(t,n,e){return ja(t.element,"."+n.itemClass).bind((function(n){return t.getSystem().getByDom(n).toOptional()}))},zm=function(t,n,e){var o=Rl(t.element,"."+n.itemClass);return(o.length>0?z.some(o[o.length-1]):z.none()).bind((function(n){return t.getSystem().getByDom(n).toOptional()}))},Lm=function(t,n,e,o){var r=Rl(t.element,"."+n.itemClass),i=et(r,(function(t){return ga(t,n.highlightClass)}));return i.bind((function(n){var e=_c(n,o,0,r.length-1);return t.getSystem().getByDom(r[e]).toOptional()}))},Hm=function(t,n,e){var o=Rl(t.element,"."+n.itemClass);return Mt(K(o,(function(n){return t.getSystem().getByDom(n).toOptional()})))},Pm=Object.freeze({__proto__:null,dehighlightAll:function(t,n,e){return Im(t,n,0,[])},dehighlight:function(t,n,e,o){Rm(t,n,e,o)&&(da(o.element,n.highlightClass),n.onDehighlight(t,o),tu(o,Qi()))},highlight:Fm,highlightFirst:function(t,n,e){Vm(t,n).each((function(o){Fm(t,n,e,o)}))},highlightLast:function(t,n,e){zm(t,n).each((function(o){Fm(t,n,e,o)}))},highlightAt:function(t,n,e,o){Nm(t,n,e,o).fold((function(t){throw t}),(function(o){Fm(t,n,e,o)}))},highlightBy:function(t,n,e,o){var r=Hm(t,n);nt(r,o).each((function(o){Fm(t,n,e,o)}))},isHighlighted:Rm,getHighlighted:function(t,n,e){return ja(t.element,"."+n.highlightClass).bind((function(n){return t.getSystem().getByDom(n).toOptional()}))},getFirst:Vm,getLast:zm,getPrevious:function(t,n,e){return Lm(t,n,0,-1)},getNext:function(t,n,e){return Lm(t,n,0,1)},getCandidates:Hm}),Um=[yr("highlightClass"),yr("itemClass"),sc("onHighlight"),sc("onDehighlight")],Wm=rs({fields:Um,name:"highlighting",apis:Pm}),jm=[8],Gm=[9],qm=[13],Ym=[27],Xm=[32],Km=[37],Jm=[38],$m=[39],Zm=[40],Qm=function(t,n,e){var o=ut(t.slice(0,n)),r=ut(t.slice(n+1));return nt(o.concat(r),e)},tg=function(t,n,e){var o=ut(t.slice(0,n));return nt(o,e)},ng=function(t,n,e){var o=t.slice(0,n),r=t.slice(n+1);return nt(r.concat(o),e)},eg=function(t,n,e){var o=t.slice(n+1);return nt(o,e)},og=function(t){return function(n){var e=n.raw;return G(t,e.which)}},rg=function(t){return function(n){return it(t,(function(t){return t(n)}))}},ig=function(t){return!0===t.raw.shiftKey},ug=function(t){return!0===t.raw.ctrlKey},ag=I(ig),cg=function(t,n){return{matches:t,classification:n}},sg=function(t,n,e){n.exists((function(t){return e.exists((function(n){return cn(n,t)}))}))||nu(t,Yi(),{prevFocus:n,newFocus:e})},lg=function(){var t=function(t){return gs(t.element)};return{get:t,set:function(n,e){var o=t(n);n.getSystem().triggerFocus(e,n.element);var r=t(n);sg(n,o,r)}}},fg=function(){var t=function(t){return Wm.getHighlighted(t).map((function(t){return t.element}))};return{get:t,set:function(n,e){var o=t(n);n.getSystem().getByDom(e).fold(_,(function(t){Wm.highlight(n,t)}));var r=t(n);sg(n,o,r)}}};!function(t){t.OnFocusMode="onFocus",t.OnEnterOrSpaceMode="onEnterOrSpace",t.OnApiMode="onApi"}(Il||(Il={}));var dg,mg,gg=function(t,n,e,o,r){var i=function(t,n,e,o,r){var i,u,a,c=e(t,n,o,r);return(i=c,u=n.event,a=nt(i,(function(t){return t.matches(u)})),a.map((function(t){return t.classification}))).bind((function(e){return e(t,n,o,r)}))},u={schema:function(){return t.concat([Nr("focusManager",lg()),Vr("focusInside","onFocus",cr((function(t){return G(["onFocus","onEnterOrSpace","onApi"],t)?mo.value(t):mo.error("Invalid value for focusInside")}))),mc("handler",u),mc("state",n),mc("sendFocusIn",r)])},processKey:i,toEvents:function(t,n){var u=t.focusInside!==Il.OnFocusMode?z.none():r(t).map((function(e){return su(Ei(),(function(o,r){e(o,t,n),r.stop()}))})),a=[su(vi(),(function(o,u){i(o,u,e,t,n).fold((function(){!function(e,o){var i=og(Xm.concat(qm))(o.event);t.focusInside===Il.OnEnterOrSpaceMode&&i&&ni(e,o)&&r(t).each((function(r){r(e,t,n),o.stop()}))}(o,u)}),(function(t){u.stop()}))})),su(bi(),(function(e,r){i(e,r,o,t,n).each((function(t){r.stop()}))}))];return uu(u.toArray().concat(a))}};return u},pg=function(t){var n=[Er("onEscape"),Er("onEnter"),Nr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),Nr("firstTabstop",0),Nr("useTabstopAt",V),Er("visibilitySelector")].concat([t]),e=function(t,n){var e=t.visibilitySelector.bind((function(t){return Ga(n,t)})).getOr(n);return te(e)>0},o=function(t,n){return n.focusManager.get(t).bind((function(t){return Ga(t,n.selector)}))},r=function(t,n,o){(function(t,n){var o=Rl(t.element,n.selector),r=Z(o,(function(t){return e(n,t)}));return z.from(r[n.firstTabstop])})(t,n).each((function(e){n.focusManager.set(t,e)}))},i=function(t,n,o,r,i){return i(n,o,(function(t){return function(t,n){return e(t,n)&&t.useTabstopAt(n)}(r,t)})).fold((function(){return r.cyclic?z.some(!0):z.none()}),(function(n){return r.focusManager.set(t,n),z.some(!0)}))},u=function(t,n,e,r){var u=Rl(t.element,e.selector);return o(t,e).bind((function(n){return et(u,B(cn,n)).bind((function(n){return i(t,u,n,e,r)}))}))},a=function(t,n,e){var o=e.cyclic?Qm:tg;return u(t,0,e,o)},c=function(t,n,e){var o=e.cyclic?ng:eg;return u(t,0,e,o)},s=function(t){return function(t){return gn(t)}(t).bind(yn).exists((function(n){return cn(n,t)}))},l=D([cg(rg([ig,og(Gm)]),a),cg(og(Gm),c),cg(rg([ag,og(qm)]),(function(t,n,e){return e.onEnter.bind((function(e){return e(t,n)}))}))]),f=D([cg(og(Ym),(function(t,n,e){return e.onEscape.bind((function(e){return e(t,n)}))})),cg(og(Gm),(function(t,n,e){return o(t,e).filter((function(t){return!e.useTabstopAt(t)})).bind((function(o){return(s(o)?a:c)(t,n,e)}))}))]);return gg(n,qu.init,l,f,(function(){return z.some(r)}))},hg=pg(vr("cyclic",N)),vg=pg(vr("cyclic",V)),bg=function(t,n,e){return pm(e)&&og(Xm)(n.event)?z.none():function(t,n,e){return ou(t,e,Bi()),z.some(!0)}(t,0,e)},yg=function(t,n){return z.some(!0)},xg=[Nr("execute",bg),Nr("useSpace",!1),Nr("useEnter",!0),Nr("useControlEnter",!1),Nr("useDown",!1)],wg=function(t,n,e){return e.execute(t,n,t.element)},Sg=gg(xg,qu.init,(function(t,n,e,o){var r=e.useSpace&&!pm(t.element)?Xm:[],i=e.useEnter?qm:[],u=e.useDown?Zm:[],a=r.concat(i).concat(u);return[cg(og(a),wg)].concat(e.useControlEnter?[cg(rg([ug,og(qm)]),wg)]:[])}),(function(t,n,e,o){return e.useSpace&&!pm(t.element)?[cg(og(Xm),yg)]:[]}),(function(){return z.none()})),kg=function(){var t=Fs();return Yu({readState:function(){return t.get().map((function(t){return{numRows:String(t.numRows),numColumns:String(t.numColumns)}})).getOr({numRows:"?",numColumns:"?"})},setGridSize:function(n,e){t.set({numRows:n,numColumns:e})},getNumRows:function(){return t.get().map((function(t){return t.numRows}))},getNumColumns:function(){return t.get().map((function(t){return t.numColumns}))}})},Og=Object.freeze({__proto__:null,flatgrid:kg,init:function(t){return t.state(t)}}),Cg=function(t){return function(n,e,o,r){var i=t(n.element);return Dg(i,n,e,o,r)}},_g=function(t,n){var e=el(t,n);return Cg(e)},Tg=function(t,n){var e=el(n,t);return Cg(e)},Eg=function(t){return function(n,e,o,r){return Dg(t,n,e,o,r)}},Dg=function(t,n,e,o,r){return o.focusManager.get(n).bind((function(e){return t(n.element,e,o,r)})).map((function(t){return o.focusManager.set(n,t),!0}))},Ag=Eg,Mg=Eg,Bg=Eg,Ig=function(t){return!function(t){return t.offsetWidth<=0&&t.offsetHeight<=0}(t.dom)},Fg=function(t,n,e){var o=Rl(t,e);return function(t,n){return et(t,n).map((function(n){return{index:n,candidates:t}}))}(Z(o,Ig),(function(t){return cn(t,n)}))},Rg=function(t,n){return et(t,(function(t){return cn(n,t)}))},Ng=function(t,n,e,o){return o(Math.floor(n/e),n%e).bind((function(n){var o=n.row*e+n.column;return o>=0&&o<t.length?z.some(t[o]):z.none()}))},Vg=function(t,n,e,o,r){return Ng(t,n,o,(function(n,i){var u=n===e-1?t.length-n*o:o,a=_c(i,r,0,u-1);return z.some({row:n,column:a})}))},zg=function(t,n,e,o,r){return Ng(t,n,o,(function(n,i){var u=_c(n,r,0,e-1),a=u===e-1?t.length-u*o:o,c=Tc(i,0,a-1);return z.some({row:u,column:c})}))},Lg=[yr("selector"),Nr("execute",bg),lc("onEscape"),Nr("captureTab",!1),pc()],Hg=function(t,n,e){ja(t.element,n.selector).each((function(e){n.focusManager.set(t,e)}))},Pg=function(t){return function(n,e,o,r){return Fg(n,e,o.selector).bind((function(n){return t(n.candidates,n.index,r.getNumRows().getOr(o.initSize.numRows),r.getNumColumns().getOr(o.initSize.numColumns))}))}},Ug=function(t,n,e){return e.captureTab?z.some(!0):z.none()},Wg=Pg((function(t,n,e,o){return Vg(t,n,e,o,-1)})),jg=Pg((function(t,n,e,o){return Vg(t,n,e,o,1)})),Gg=Pg((function(t,n,e,o){return zg(t,n,e,o,-1)})),qg=Pg((function(t,n,e,o){return zg(t,n,e,o,1)})),Yg=D([cg(og(Km),_g(Wg,jg)),cg(og($m),Tg(Wg,jg)),cg(og(Jm),Ag(Gg)),cg(og(Zm),Mg(qg)),cg(rg([ig,og(Gm)]),Ug),cg(rg([ag,og(Gm)]),Ug),cg(og(Xm.concat(qm)),(function(t,n,e,o){return function(t,n){return n.focusManager.get(t).bind((function(t){return Ga(t,n.selector)}))}(t,e).bind((function(o){return e.execute(t,n,o)}))}))]),Xg=D([cg(og(Ym),(function(t,n,e){return e.onEscape(t,n)})),cg(og(Xm),yg)]),Kg=gg(Lg,kg,Yg,Xg,(function(){return z.some(Hg)})),Jg=function(t,n,e,o,r){var i=function(t,n,e){return r(t,n,o,0,e.length-1,e[n],(function(n){return o=e[n],"button"===$t(o)&&"disabled"===Nn(o,"disabled")?i(t,n,e):z.from(e[n]);var o}))};return Fg(t,e,n).bind((function(t){var n=t.index,e=t.candidates;return i(n,n,e)}))},$g=function(t,n,e,o){return Jg(t,n,e,o,(function(t,n,e,o,r,i,u){var a=Tc(n+e,o,r);return a===t?z.from(i):u(a)}))},Zg=function(t,n,e,o){return Jg(t,n,e,o,(function(t,n,e,o,r,i,u){var a=_c(n,e,o,r);return a===t?z.none():u(a)}))},Qg=[yr("selector"),Nr("getInitial",z.none),Nr("execute",bg),lc("onEscape"),Nr("executeOnMove",!1),Nr("allowVertical",!0),Nr("allowHorizontal",!0),Nr("cycles",!0)],tp=function(t,n,e){return function(t,n){return n.focusManager.get(t).bind((function(t){return Ga(t,n.selector)}))}(t,e).bind((function(o){return e.execute(t,n,o)}))},np=function(t,n,e){n.getInitial(t).orThunk((function(){return ja(t.element,n.selector)})).each((function(e){n.focusManager.set(t,e)}))},ep=function(t,n,e){return(e.cycles?Zg:$g)(t,e.selector,n,-1)},op=function(t,n,e){return(e.cycles?Zg:$g)(t,e.selector,n,1)},rp=function(t){return function(n,e,o,r){return t(n,e,o,r).bind((function(){return o.executeOnMove?tp(n,e,o):z.some(!0)}))}},ip=D([cg(og(Xm),yg),cg(og(Ym),(function(t,n,e){return e.onEscape(t,n)}))]),up=gg(Qg,qu.init,(function(t,n,e,o){var r=u([],e.allowHorizontal?Km:[],!0).concat(e.allowVertical?Jm:[]),i=u([],e.allowHorizontal?$m:[],!0).concat(e.allowVertical?Zm:[]);return[cg(og(r),rp(_g(ep,op))),cg(og(i),rp(Tg(ep,op))),cg(og(qm),tp),cg(og(Xm),tp)]}),ip,(function(){return z.some(np)})),ap=function(t,n,e){return z.from(t[n]).bind((function(t){return z.from(t[e]).map((function(t){return{rowIndex:n,columnIndex:e,cell:t}}))}))},cp=function(t,n,e,o){var r=t[n].length,i=_c(e,o,0,r-1);return ap(t,n,i)},sp=function(t,n,e,o){var r=_c(e,o,0,t.length-1),i=t[r].length,u=Tc(n,0,i-1);return ap(t,r,u)},lp=function(t,n,e,o){var r=t[n].length,i=Tc(e+o,0,r-1);return ap(t,n,i)},fp=function(t,n,e,o){var r=Tc(e+o,0,t.length-1),i=t[r].length,u=Tc(n,0,i-1);return ap(t,r,u)},dp=[Cr("selectors",[yr("row"),yr("cell")]),Nr("cycles",!0),Nr("previousSelector",z.none),Nr("execute",bg)],mp=function(t,n,e){n.previousSelector(t).orThunk((function(){var e=n.selectors;return ja(t.element,e.cell)})).each((function(e){n.focusManager.set(t,e)}))},gp=function(t,n){return function(e,o,r){var i=r.cycles?t:n;return Ga(o,r.selectors.row).bind((function(t){var n=Rl(t,r.selectors.cell);return Rg(n,o).bind((function(n){var o=Rl(e,r.selectors.row);return Rg(o,t).bind((function(t){var e=function(t,n){return K(t,(function(t){return Rl(t,n.selectors.cell)}))}(o,r);return i(e,t,n).map((function(t){return t.cell}))}))}))}))}},pp=gp((function(t,n,e){return cp(t,n,e,-1)}),(function(t,n,e){return lp(t,n,e,-1)})),hp=gp((function(t,n,e){return cp(t,n,e,1)}),(function(t,n,e){return lp(t,n,e,1)})),vp=gp((function(t,n,e){return sp(t,e,n,-1)}),(function(t,n,e){return fp(t,e,n,-1)})),bp=gp((function(t,n,e){return sp(t,e,n,1)}),(function(t,n,e){return fp(t,e,n,1)})),yp=D([cg(og(Km),_g(pp,hp)),cg(og($m),Tg(pp,hp)),cg(og(Jm),Ag(vp)),cg(og(Zm),Mg(bp)),cg(og(Xm.concat(qm)),(function(t,n,e){return gs(t.element).bind((function(o){return e.execute(t,n,o)}))}))]),xp=D([cg(og(Xm),yg)]),wp=gg(dp,qu.init,yp,xp,(function(){return z.some(mp)})),Sp=[yr("selector"),Nr("execute",bg),Nr("moveOnTab",!1)],kp=function(t,n,e){return e.focusManager.get(t).bind((function(o){return e.execute(t,n,o)}))},Op=function(t,n,e){ja(t.element,n.selector).each((function(e){n.focusManager.set(t,e)}))},Cp=function(t,n,e){return Zg(t,e.selector,n,-1)},_p=function(t,n,e){return Zg(t,e.selector,n,1)},Tp=D([cg(og(Jm),Bg(Cp)),cg(og(Zm),Bg(_p)),cg(rg([ig,og(Gm)]),(function(t,n,e,o){return e.moveOnTab?Bg(Cp)(t,n,e,o):z.none()})),cg(rg([ag,og(Gm)]),(function(t,n,e,o){return e.moveOnTab?Bg(_p)(t,n,e,o):z.none()})),cg(og(qm),kp),cg(og(Xm),kp)]),Ep=D([cg(og(Xm),yg)]),Dp=gg(Sp,qu.init,Tp,Ep,(function(){return z.some(Op)})),Ap=[lc("onSpace"),lc("onEnter"),lc("onShiftEnter"),lc("onLeft"),lc("onRight"),lc("onTab"),lc("onShiftTab"),lc("onUp"),lc("onDown"),lc("onEscape"),Nr("stopSpaceKeyup",!1),Er("focusIn")],Mp=gg(Ap,qu.init,(function(t,n,e){return[cg(og(Xm),e.onSpace),cg(rg([ag,og(qm)]),e.onEnter),cg(rg([ig,og(qm)]),e.onShiftEnter),cg(rg([ig,og(Gm)]),e.onShiftTab),cg(rg([ag,og(Gm)]),e.onTab),cg(og(Jm),e.onUp),cg(og(Zm),e.onDown),cg(og(Km),e.onLeft),cg(og($m),e.onRight),cg(og(Xm),e.onSpace)]}),(function(t,n,e){return u(u([],e.stopSpaceKeyup?[cg(og(Xm),yg)]:[],!0),[cg(og(Ym),e.onEscape)],!1)}),(function(t){return t.focusIn})),Bp=hg.schema(),Ip=vg.schema(),Fp=up.schema(),Rp=Kg.schema(),Np=wp.schema(),Vp=Sg.schema(),zp=Dp.schema(),Lp=Mp.schema(),Hp=us({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Bp,cyclic:Ip,flow:Fp,flatgrid:Rp,matrix:Np,execution:Vp,menu:zp,special:Lp}),name:"keying",active:{events:function(t,n){return t.handler.toEvents(t,n)}},apis:{focusIn:function(t,n,e){n.sendFocusIn(n).fold((function(){t.getSystem().triggerFocus(t.element,t.element)}),(function(o){o(t,n,e)}))},setGridSize:function(t,n,e,o,r){!function(t){return Dt(t,"setGridSize")}(e)?console.error("Layout does not support setGridSize"):e.setGridSize(o,r)}},state:Og}),Pp=function(t,n){ps((function(){kf(t,n,(function(){return K(n,t.getSystem().build)}))}),t.element)},Up=function(t,n){ps((function(){!function(t,n,e){var o=t.components(),r=rt(n,(function(t){return ju(t).toArray()}));J(o,(function(t){G(r,t)||wf(t)}));var i=e(n),u=at(o,i);J(u,(function(t){vf(t)&&wf(t)})),J(i,(function(n){vf(n)||xf(t,n)})),t.syncComponents()}(t,n,(function(){return function(t,n,e){return wa(t,n,(function(n,o){return Sa(t,o,n,e)}))}(t.element,n,t.getSystem().buildOrPatch)}))}),t.element)},Wp=function(t,n,e,o){wf(n);var r=Sa(t.element,e,o,t.getSystem().buildOrPatch);xf(t,r),t.syncComponents()},jp=function(t,n,e){var o=t.getSystem().build(e);Cf(t,o,n)},Gp=function(t,n,e,o){Tf(n),jp(t,(function(t,n){return function(t,n,e){bn(t,e).fold((function(){qe(t,n)}),(function(t){We(t,n)}))}(t,n,e)}),o)},qp=function(t,n){return t.components()},Yp=function(t,n,e,o,r){var i=qp(t);return z.from(i[o]).map((function(e){return r.fold((function(){return Tf(e)}),(function(r){(n.reuseDom?Wp:Gp)(t,e,o,r)})),e}))},Xp=Object.freeze({__proto__:null,append:function(t,n,e,o){jp(t,qe,o)},prepend:function(t,n,e,o){jp(t,Ge,o)},remove:function(t,n,e,o){var r=qp(t),i=nt(r,(function(t){return cn(o.element,t.element)}));i.each(Tf)},replaceAt:Yp,replaceBy:function(t,n,e,o,r){var i=qp(t);return et(i,o).bind((function(e){return Yp(t,n,0,e,r)}))},set:function(t,n,e,o){return(n.reuseDom?Up:Pp)(t,o)},contents:qp}),Kp=rs({fields:[Pr("reuseDom",!0)],name:"replacing",apis:Xp}),Jp=function(t,n){var e=function(t,n){var e=uu(n);return rs({fields:[yr("enabled")],name:t,active:{events:D(e)}})}(t,n);return{key:t,value:{config:{},me:e,configAsRaw:D({}),initialConfig:{},state:qu}}},$p=function(t,n){n.ignore||(ls(t.element),n.onFocus(t))},Zp=Object.freeze({__proto__:null,focus:$p,blur:function(t,n){n.ignore||fs(t.element)},isFocused:function(t){return ds(t.element)}}),Qp=Object.freeze({__proto__:null,exhibit:function(t,n){var e=n.ignore?{}:{attributes:{tabindex:"-1"}};return Ku(e)},events:function(t){return uu([su(Ei(),(function(n,e){$p(n,t),e.stop()}))].concat(t.stopMousedown?[su(li(),(function(t,n){n.event.prevent()}))]:[]))}}),th=[sc("onFocus"),Nr("stopMousedown",!1),Nr("ignore",!1)],nh=rs({fields:th,name:"focusing",active:Qp,apis:Zp}),eh=function(t,n,e,o){var r=e.get();e.set(o),function(t,n,e){n.toggleClass.each((function(n){e.get()?la(t.element,n):da(t.element,n)}))}(t,n,e),function(t,n,e){var o=n.aria;o.update(t,o,e.get())}(t,n,e),r!==o&&n.onToggled(t,o)},oh=function(t,n,e){eh(t,n,e,!e.get())},rh=function(t,n,e){eh(t,n,e,n.selected)},ih=Object.freeze({__proto__:null,onLoad:rh,toggle:oh,isOn:function(t,n,e){return e.get()},on:function(t,n,e){eh(t,n,e,!0)},off:function(t,n,e){eh(t,n,e,!1)},set:eh}),uh=Object.freeze({__proto__:null,exhibit:function(){return Ku({})},events:function(t,n){var e,o,r,i=(e=t,o=n,r=oh,xu((function(t){r(t,e,o)}))),u=Zc(t,n,rh);return uu(ot([t.toggleOnExecute?[i]:[],[u]]))}}),ah=function(t,n,e){Fn(t.element,"aria-expanded",e)},ch=[Nr("selected",!1),Er("toggleClass"),Nr("toggleOnExecute",!0),sc("onToggled"),Vr("aria",{mode:"none"},gr("mode",{pressed:[Nr("syncWithExpanded",!1),mc("update",(function(t,n,e){Fn(t.element,"aria-pressed",e),n.syncWithExpanded&&ah(t,n,e)}))],checked:[mc("update",(function(t,n,e){Fn(t.element,"aria-checked",e)}))],expanded:[mc("update",ah)],selected:[mc("update",(function(t,n,e){Fn(t.element,"aria-selected",e)}))],none:[mc("update",_)]}))],sh=rs({fields:ch,name:"toggling",active:uh,apis:ih,state:(dg=!1,{init:function(){var t=Gr(dg);return{get:function(){return t.get()},set:function(n){return t.set(n)},clear:function(){return t.set(dg)},readState:function(){return t.get()}}}})}),lh=function(){var t=function(t,n){n.stop(),eu(t)};return[su(wi(),t),su(Fi(),t),gu(ui()),gu(li())]},fh=function(t){return uu(ot([t.map((function(t){return xu((function(n,e){t(n),e.stop()}))})).toArray(),lh()]))},dh="alloy.item-hover",mh="alloy.item-focus",gh="alloy.item-toggled",ph=function(t){(gs(t.element).isNone()||nh.isFocused(t))&&(nh.isFocused(t)||nh.focus(t),nu(t,dh,{item:t}))},hh=function(t){nu(t,mh,{item:t})},vh=D(dh),bh=D(mh),yh=D(gh),xh=function(t){return t.toggling.map((function(t){return t.exclusive?"menuitemradio":"menuitemcheckbox"})).getOr("menuitem")},wh=function(t){return e(e({aria:{mode:"checked"}},kt(t,(function(t,n){return"exclusive"!==n}))),{onToggled:function(n,e){k(t.onToggled)&&t.onToggled(n,e),function(t,n){nu(t,gh,{item:t,state:n})}(n,e)}})},Sh=[yr("data"),yr("components"),yr("dom"),Nr("hasSubmenu",!1),Er("toggling"),md("itemBehaviours",[sh,nh,Hp,sd]),Nr("ignoreFocus",!1),Nr("domModification",{}),mc("builder",(function(t){return{dom:t.dom,domModification:e(e({},t.domModification),{attributes:e(e(e({role:xh(t)},t.domModification.attributes),{"aria-haspopup":t.hasSubmenu}),t.hasSubmenu?{"aria-expanded":!1}:{})}),behaviours:gd(t.itemBehaviours,[t.toggling.fold(sh.revoke,(function(t){return sh.config(wh(t))})),nh.config({ignore:t.ignoreFocus,stopMousedown:t.ignoreFocus,onFocus:function(t){hh(t)}}),Hp.config({mode:"execution"}),sd.config({store:{mode:"memory",initialValue:t.data}}),Jp("item-type-events",u(u([],lh(),!0),[su(gi(),ph),su(Ii(),nh.focus)],!1))]),components:t.components,eventOrder:t.eventOrder}})),Nr("eventOrder",{})],kh=[yr("dom"),yr("components"),mc("builder",(function(t){return{dom:t.dom,components:t.components,events:uu([pu(Ii())])}}))],Oh=D("item-widget"),Ch=D([Ld({name:"widget",overrides:function(t){return{behaviours:es([sd.config({store:{mode:"manual",getValue:function(n){return t.data},setValue:_}})])}}})]),_h=[yr("uid"),yr("data"),yr("components"),yr("dom"),Nr("autofocus",!1),Nr("ignoreFocus",!1),md("widgetBehaviours",[sd,nh,Hp]),Nr("domModification",{}),um(Ch()),mc("builder",(function(t){var n=$d(Oh(),t,Ch()),e=Zd(Oh(),t,n.internals()),o=function(n){return Qd(n,t,"widget").map((function(t){return Hp.focusIn(t),t}))},r=function(n,e){return pm(e.event.target)?z.none():t.autofocus?(e.setSource(n.element),z.none()):z.none()};return{dom:t.dom,components:e,domModification:t.domModification,events:uu([xu((function(t,n){o(t).each((function(t){n.stop()}))})),su(gi(),ph),su(Ii(),(function(n,e){t.autofocus?o(n):nh.focus(n)}))]),behaviours:gd(t.widgetBehaviours,[sd.config({store:{mode:"memory",initialValue:t.data}}),nh.config({ignore:t.ignoreFocus,onFocus:function(t){hh(t)}}),Hp.config({mode:"special",focusIn:t.autofocus?function(t){o(t)}:as(),onLeft:r,onRight:r,onEscape:function(n,e){return nh.isFocused(n)||t.autofocus?t.autofocus?(e.setSource(n.element),z.none()):z.none():(nh.focus(n),z.some(!0))}})])}}))],Th=gr("type",{widget:_h,item:Sh,separator:kh}),Eh=D([Ud({factory:{sketch:function(t){var n=dr("menu.spec item",Th,t);return n.builder(n)}},name:"items",unit:"item",defaults:function(t,n){return Et(n,"uid")?n:e(e({},n),{uid:Nu("item")})},overrides:function(t,n){return{type:n.type,ignoreFocus:t.fakeFocus,domModification:{classes:[t.markers.item]}}}})]),Dh=D([yr("value"),yr("items"),yr("dom"),yr("components"),Nr("eventOrder",{}),ld("menuBehaviours",[Wm,sd,bm,Hp]),Vr("movement",{mode:"menu",moveOnTab:!0},gr("mode",{grid:[pc(),mc("config",(function(t,n){return{mode:"flatgrid",selector:"."+t.markers.item,initSize:{numColumns:n.initSize.numColumns,numRows:n.initSize.numRows},focusManager:t.focusManager}}))],matrix:[mc("config",(function(t,n){return{mode:"matrix",selectors:{row:n.rowSelector,cell:"."+t.markers.item},previousSelector:n.previousSelector,focusManager:t.focusManager}})),yr("rowSelector"),Nr("previousSelector",z.none)],menu:[Nr("moveOnTab",!0),mc("config",(function(t,n){return{mode:"menu",selector:"."+t.markers.item,moveOnTab:n.moveOnTab,focusManager:t.focusManager}}))]})),xr("markers",rc()),Nr("fakeFocus",!1),Nr("focusManager",lg()),sc("onHighlight"),sc("onDehighlight")]),Ah=D("alloy.menu-focus"),Mh=gm({name:"Menu",configFields:Dh(),partFields:Eh(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:dd(t.menuBehaviours,[Wm.config({highlightClass:t.markers.selectedItem,itemClass:t.markers.item,onHighlight:t.onHighlight,onDehighlight:t.onDehighlight}),sd.config({store:{mode:"memory",initialValue:t.value}}),bm.config({find:z.some}),Hp.config(t.movement.config(t,t.movement))]),events:uu([su(bh(),(function(t,n){var e=n.event;t.getSystem().getByDom(e.target).each((function(e){Wm.highlight(t,e),n.stop(),nu(t,Ah(),{menu:t,item:e})}))})),su(vh(),(function(t,n){var e=n.event.item;Wm.highlight(t,e)})),su(yh(),(function(t,n){var e=n.event,o=e.item;e.state&&"menuitemradio"===Nn(o.element,"role")&&function(t,n){var e=Rl(t.element,'[role="menuitemradio"][aria-checked="true"]');J(e,(function(e){cn(e,n.element)||t.getSystem().getByDom(e).each((function(t){sh.off(t)}))}))}(t,o)}))]),components:n,eventOrder:t.eventOrder,domModification:{attributes:{role:"menu"}}}}}),Bh=function(t,n,e,o){return Tt(e,o).bind((function(o){return Tt(t,o).bind((function(o){var r=Bh(t,n,e,o);return z.some([o].concat(r))}))})).getOr([])},Ih=function(t,n){var e={};bt(t,(function(t,n){J(t,(function(t){e[t]=n}))}));var o=n,r=xt(n,(function(t,n){return{k:t,v:n}})),i=yt(r,(function(t,n){return[n].concat(Bh(e,o,r,n))}));return yt(e,(function(t){return Tt(i,t).getOr([t])}))},Fh=function(t){return"prepared"===t.type?z.some(t.menu):z.none()},Rh={init:function(){var t=Gr({}),n=Gr({}),o=Gr({}),r=Fs(),i=Gr({}),u=function(n,e,o){return a(n).bind((function(r){return function(n){return Ct(t.get(),(function(t,e){return t===n}))}(n).bind((function(t){return e(t).map((function(t){return{triggeredMenu:r,triggeringItem:t,triggeringPath:o}}))}))}))},a=function(t){return c(t).bind(Fh)},c=function(t){return Tt(n.get(),t)},s=function(n){return Tt(t.get(),n)};return{setMenuBuilt:function(t,o){var r;n.set(e(e({},n.get()),((r={})[t]={type:"prepared",menu:o},r)))},setContents:function(e,u,a,c){r.set(e),t.set(a),n.set(u),i.set(c);var s=Ih(c,a);o.set(s)},expand:function(n){return Tt(t.get(),n).map((function(t){var e=Tt(o.get(),n).getOr([]);return[t].concat(e)}))},refresh:function(t){return Tt(o.get(),t)},collapse:function(t){return Tt(o.get(),t).bind((function(t){return t.length>1?z.some(t.slice(1)):z.none()}))},lookupMenu:c,lookupItem:s,otherMenus:function(t){var n=i.get();return at(ht(n),t)},getPrimary:function(){return r.get().bind(a)},getMenus:function(){return n.get()},clear:function(){t.set({}),n.set({}),o.set({}),r.clear()},isClear:function(){return r.get().isNone()},getTriggeringPath:function(t,n){var e=Z(s(t).toArray(),(function(t){return a(t).isSome()}));return Tt(o.get(),t).bind((function(t){var o=ut(e.concat(t));return function(t){for(var n=[],e=0;e<t.length;e++){var o=t[e];if(!o.isSome())return z.none();n.push(o.getOrDie())}return z.some(n)}(rt(o,(function(t,e){return u(t,n,o.slice(0,e+1)).fold((function(){return At(r.get(),t)?[]:[z.none()]}),(function(t){return[z.some(t)]}))})))}))}}},extractPreparedMenu:Fh},Nh=Du("tiered-menu-item-highlight"),Vh=Du("tiered-menu-item-dehighlight");!function(t){t[t.HighlightMenuAndItem=0]="HighlightMenuAndItem",t[t.HighlightJustMenu=1]="HighlightJustMenu",t[t.HighlightNone=2]="HighlightNone"}(mg||(mg={}));var zh=D("collapse-item"),Lh=mm({name:"TieredMenu",configFields:[dc("onExecute"),dc("onEscape"),fc("onOpenMenu"),fc("onOpenSubmenu"),sc("onRepositionMenu"),sc("onCollapseMenu"),Nr("highlightOnOpen",mg.HighlightMenuAndItem),Cr("data",[yr("primary"),yr("menus"),yr("expansions")]),Nr("fakeFocus",!1),sc("onHighlightItem"),sc("onDehighlightItem"),sc("onHover"),uc(),yr("dom"),Nr("navigateOnHover",!0),Nr("stayInDom",!1),ld("tmenuBehaviours",[Hp,Wm,bm,Kp]),Nr("eventOrder",{})],apis:{collapseMenu:function(t,n){t.collapseMenu(n)},highlightPrimary:function(t,n){t.highlightPrimary(n)},repositionMenus:function(t,n){t.repositionMenus(n)}},factory:function(t,n){var o,r=Fs(),i=Rh.init(),a=function(n){var o=function(n,o,r){return yt(r,(function(r,i){var u=function(){return Mh.sketch(e(e({},r),{value:i,markers:t.markers,fakeFocus:t.fakeFocus,onHighlight:function(t,n){nu(t,Nh,{menuComp:t,itemComp:n})},onDehighlight:function(t,n){nu(t,Vh,{menuComp:t,itemComp:n})},focusManager:t.fakeFocus?fg():lg()}))};return i===o?{type:"prepared",menu:n.getSystem().build(u())}:{type:"notbuilt",nbMenu:u}}))}(n,t.data.primary,t.data.menus),r=s();return i.setContents(t.data.primary,o,t.data.expansions,r),i.getPrimary()},c=function(t){return sd.getValue(t).value},s=function(n){return yt(t.data.menus,(function(t,n){return rt(t.items,(function(t){return"separator"===t.type?[]:[t.data.value]}))}))},l=Wm.highlight,f=function(n,e){l(n,e),Wm.getHighlighted(e).orThunk((function(){return Wm.getFirst(e)})).each((function(o){t.fakeFocus?Wm.highlight(e,o):ou(n,o.element,Ii())}))},d=function(t,n){return Mt(K(n,(function(n){return t.lookupMenu(n).bind((function(t){return"prepared"===t.type?z.some(t.menu):z.none()}))})))},m=function(n,e,o){var r=d(e,e.otherMenus(o));J(r,(function(e){ha(e.element,[t.markers.backgroundMenu]),t.stayInDom||Kp.remove(n,e)}))},g=function(n,e){var o=function(n){return r.get().getOrThunk((function(){var e={},o=Rl(n.element,".".concat(t.markers.item)),i=Z(o,(function(t){return"true"===Nn(t,"aria-haspopup")}));return J(i,(function(t){n.getSystem().getByDom(t).each((function(t){var n=c(t);e[n]=t}))})),r.set(e),e}))}(n);bt(o,(function(t,n){var o=G(e,n);Fn(t.element,"aria-expanded",o)}))},p=function(n,e,o){return z.from(o[0]).bind((function(r){return e.lookupMenu(r).bind((function(r){if("notbuilt"===r.type)return z.none();var i=r.menu,u=d(e,o.slice(1));return J(u,(function(n){la(n.element,t.markers.backgroundMenu)})),An(i.element)||Kp.append(n,Va(i)),ha(i.element,[t.markers.backgroundMenu]),f(n,i),m(n,e,o),z.some(i)}))}))};!function(t){t[t.HighlightSubmenu=0]="HighlightSubmenu",t[t.HighlightParent=1]="HighlightParent"}(o||(o={}));var h=function(n,e,r){if(void 0===r&&(r=o.HighlightSubmenu),e.hasConfigured(Bm)&&Bm.isDisabled(e))return z.some(e);var u=c(e);return i.expand(u).bind((function(u){return g(n,u),z.from(u[0]).bind((function(a){return i.lookupMenu(a).bind((function(c){var s=function(t,n,e){if("notbuilt"===e.type){var o=t.getSystem().build(e.nbMenu());return i.setMenuBuilt(n,o),o}return e.menu}(n,a,c);return An(s.element)||Kp.append(n,Va(s)),t.onOpenSubmenu(n,e,s,ut(u)),r===o.HighlightSubmenu?(Wm.highlightFirst(s),p(n,i,u)):(Wm.dehighlightAll(s),z.some(e))}))}))}))},v=function(n,e){var o=c(e);return i.collapse(o).bind((function(o){return g(n,o),p(n,i,o).map((function(o){return t.onCollapseMenu(n,e,o),o}))}))},b=function(n){return function(e,o){return Ga(o.getSource(),".".concat(t.markers.item)).bind((function(t){return e.getSystem().getByDom(t).toOptional().bind((function(t){return n(e,t).map(V)}))}))}},y=uu(u([su(Ah(),(function(t,n){var e=n.event.item;i.lookupItem(c(e)).each((function(){var e=n.event.menu;Wm.highlight(t,e);var o=c(n.event.item);i.refresh(o).each((function(n){return m(t,i,n)}))}))})),xu((function(n,e){var r=e.event.target;n.getSystem().getByDom(r).each((function(e){0===c(e).indexOf("collapse-item")&&v(n,e),h(n,e,o.HighlightSubmenu).fold((function(){t.onExecute(n,e)}),_)}))})),vu((function(n,e){a(n).each((function(e){Kp.append(n,Va(e)),t.onOpenMenu(n,e),t.highlightOnOpen===mg.HighlightMenuAndItem?f(n,e):t.highlightOnOpen===mg.HighlightJustMenu&&l(n,e)}))})),su(Nh,(function(n,e){t.onHighlightItem(n,e.event.menuComp,e.event.itemComp)})),su(Vh,(function(n,e){t.onDehighlightItem(n,e.event.menuComp,e.event.itemComp)}))],t.navigateOnHover?[su(vh(),(function(n,e){var r=e.event.item;!function(t,n){var e=c(n);i.refresh(e).bind((function(n){return g(t,n),p(t,i,n)}))}(n,r),h(n,r,o.HighlightParent),t.onHover(n,r)}))]:[],!0)),x=function(t){return Wm.getHighlighted(t).bind(Wm.getHighlighted)},w={collapseMenu:function(t){x(t).each((function(n){v(t,n)}))},highlightPrimary:function(t){i.getPrimary().each((function(n){f(t,n)}))},repositionMenus:function(n){var e=i.getPrimary().bind((function(t){return x(n).bind((function(t){var n=c(t),e=_t(i.getMenus()),o=Mt(K(e,Rh.extractPreparedMenu));return i.getTriggeringPath(n,(function(t){return function(t,n,e){return pt(n,(function(t){if(!t.getSystem().isConnected())return z.none();var n=Wm.getCandidates(t);return nt(n,(function(t){return c(t)===e}))}))}(0,o,t)}))})).map((function(n){return{primary:t,triggeringPath:n}}))}));e.fold((function(){(function(t){return z.from(t.components()[0]).filter((function(t){return"menu"===Nn(t.element,"role")}))})(n).each((function(e){t.onRepositionMenu(n,e,[])}))}),(function(e){var o=e.primary,r=e.triggeringPath;t.onRepositionMenu(n,o,r)}))}};return{uid:t.uid,dom:t.dom,markers:t.markers,behaviours:dd(t.tmenuBehaviours,[Hp.config({mode:"special",onRight:b((function(t,n){return pm(n.element)?z.none():h(t,n,o.HighlightSubmenu)})),onLeft:b((function(t,n){return pm(n.element)?z.none():v(t,n)})),onEscape:b((function(n,e){return v(n,e).orThunk((function(){return t.onEscape(n,e).map((function(){return n}))}))})),focusIn:function(t,n){i.getPrimary().each((function(n){ou(t,n.element,Ii())}))}}),Wm.config({highlightClass:t.markers.selectedMenu,itemClass:t.markers.menu}),bm.config({find:function(t){return Wm.getHighlighted(t)}}),Kp.config({})]),eventOrder:t.eventOrder,apis:w,events:y}},extraApis:{tieredData:function(t,n,e){return{primary:t,menus:n,expansions:e}},singleData:function(t,n){return{primary:t,menus:Kr(t,n),expansions:{}}},collapseItem:function(t){return{value:Du(zh()),meta:{text:t}}}}}),Hh=mm({name:"InlineView",configFields:[yr("lazySink"),sc("onShow"),sc("onHide"),Ir("onEscape"),ld("inlineBehaviours",[Wf,sd,cs]),Rr("fireDismissalEventInstead",[Nr("event",Gi())]),Rr("fireRepositionEventInstead",[Nr("event",qi())]),Nr("getRelated",z.none),Nr("isExtraPart",N),Nr("eventOrder",z.none)],factory:function(t,n){var o=function(n,e,o,r){var i=t.lazySink(n).getOrDie();Wf.openWhileCloaked(n,e,(function(){return hf.positionWithinBounds(i,n,o,r())})),sd.setValue(n,z.some({mode:"position",config:o,getBounds:r}))},r=function(n,o,r,i){var u=function(t,n,o,r,i){var u=function(){return t.lazySink(n)},a="horizontal"===r.type?{layouts:{onLtr:function(){return Xc()},onRtl:function(){return Kc()}}}:{},c=function(t){return function(t){return 2===t.length}(t)?a:{}};return Lh.sketch({dom:{tag:"div"},data:r.data,markers:r.menu.markers,highlightOnOpen:r.menu.highlightOnOpen,fakeFocus:r.menu.fakeFocus,onEscape:function(){return Wf.close(n),t.onEscape.map((function(t){return t(n)})),z.some(!0)},onExecute:function(){return z.some(!0)},onOpenMenu:function(t,n){hf.positionWithinBounds(u().getOrDie(),n,o,i())},onOpenSubmenu:function(t,n,o,r){var i=u().getOrDie();hf.position(i,o,{anchor:e({type:"submenu",item:n},c(r))})},onRepositionMenu:function(t,n,r){var a=u().getOrDie();hf.positionWithinBounds(a,n,o,i()),J(r,(function(t){var n=c(t.triggeringPath);hf.position(a,t.triggeredMenu,{anchor:e({type:"submenu",item:t.triggeringItem},n)})}))}})}(t,n,o,r,i);Wf.open(n,u),sd.setValue(n,z.some({mode:"menu",menu:u}))},i=function(n){Wf.isOpen(n)&&sd.getValue(n).each((function(e){switch(e.mode){case"menu":Wf.getState(n).each(Lh.repositionMenus);break;case"position":var o=t.lazySink(n).getOrDie();hf.positionWithinBounds(o,n,e.config,e.getBounds())}}))},u={setContent:function(t,n){Wf.setContent(t,n)},showAt:function(t,n,e){var r=z.none;o(t,n,e,r)},showWithinBounds:o,showMenuAt:function(t,n,e){r(t,n,e,z.none)},showMenuWithinBounds:r,hide:function(t){Wf.isOpen(t)&&(sd.setValue(t,z.none()),Wf.close(t))},getContent:function(t){return Wf.getState(t)},reposition:i,isOpen:Wf.isOpen};return{uid:t.uid,dom:t.dom,behaviours:dd(t.inlineBehaviours,[Wf.config({isPartOf:function(n,e,o){return Ka(e,o)||function(n,e){return t.getRelated(n).exists((function(t){return Ka(t,e)}))}(n,o)},getAttachPoint:function(n){return t.lazySink(n).getOrDie()},onOpen:function(n){t.onShow(n)},onClose:function(n){t.onHide(n)}}),sd.config({store:{mode:"memory",initialValue:z.none()}}),cs.config({channels:e(e({},Xf(e({isExtraPart:n.isExtraPart},t.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Jf(e(e({},t.fireRepositionEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})),{doReposition:i})))})]),eventOrder:t.eventOrder,apis:u}},apis:{showAt:function(t,n,e,o){t.showAt(n,e,o)},showWithinBounds:function(t,n,e,o,r){t.showWithinBounds(n,e,o,r)},showMenuAt:function(t,n,e,o){t.showMenuAt(n,e,o)},showMenuWithinBounds:function(t,n,e,o,r){t.showMenuWithinBounds(n,e,o,r)},hide:function(t,n){t.hide(n)},isOpen:function(t,n){return t.isOpen(n)},getContent:function(t,n){return t.getContent(n)},setContent:function(t,n,e){t.setContent(n,e)},reposition:function(t,n){t.reposition(n)}}}),Ph=tinymce.util.Tools.resolve("tinymce.util.Delay"),Uh=mm({name:"Button",factory:function(t){var n=fh(t.action),o=t.dom.tag,r=function(n){return Tt(t.dom,"attributes").bind((function(t){return Tt(t,n)}))};return{uid:t.uid,dom:t.dom,components:t.components,events:n,behaviours:gd(t.buttonBehaviours,[nh.config({}),Hp.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:function(){if("button"===o){var n=r("type").getOr("button"),i=r("role").map((function(t){return{role:t}})).getOr({});return e({type:n},i)}return{role:t.role.getOr(r("role").getOr("button"))}}()},eventOrder:t.eventOrder}},configFields:[Nr("uid",void 0),yr("dom"),Nr("components",[]),md("buttonBehaviours",[nh,Hp]),Er("action"),Er("role"),Nr("eventOrder",{})]}),Wh=function(t){var n=Gt.fromHtml(t),o=vn(n),r=function(t){var n=void 0!==t.dom.attributes?t.dom.attributes:[];return tt(n,(function(t,n){var o;return"class"===n.name?t:e(e({},t),((o={})[n.name]=n.value,o))}),{})}(n),i=function(t){return Array.prototype.slice.call(t.dom.classList,0)}(n),u=0===o.length?{}:{innerHtml:wu(n)};return e({tag:$t(n),classes:i,attributes:r},u)},jh=function(t){var n=function(t){return void 0!==t.uid}(t)&&Dt(t,"uid")?t.uid:Nu("memento");return{get:function(t){return t.getSystem().getByUid(n).getOrDie()},getOpt:function(t){return t.getSystem().getByUid(n).toOptional()},asSpec:function(){return e(e({},t),{uid:n})}}},Gh=Object.entries,qh=Object.setPrototypeOf,Yh=Object.isFrozen,Xh=Object.getPrototypeOf,Kh=Object.getOwnPropertyDescriptor,Jh=Object.freeze,$h=Object.seal,Zh=Object.create,Qh="undefined"!=typeof Reflect&&Reflect,tv=Qh.apply,nv=Qh.construct;Jh||(Jh=function(t){return t}),$h||($h=function(t){return t}),tv||(tv=function(t,n,e){return t.apply(n,e)}),nv||(nv=function(t,n){return new(t.bind.apply(t,u([void 0],n,!1)))});var ev,ov=pv(Array.prototype.forEach),rv=pv(Array.prototype.pop),iv=pv(Array.prototype.push),uv=pv(String.prototype.toLowerCase),av=pv(String.prototype.toString),cv=pv(String.prototype.match),sv=pv(String.prototype.replace),lv=pv(String.prototype.indexOf),fv=pv(String.prototype.trim),dv=pv(Object.prototype.hasOwnProperty),mv=pv(RegExp.prototype.test),gv=(ev=TypeError,function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return nv(ev,n)});function pv(t){return function(n){for(var e=arguments.length,o=new Array(e>1?e-1:0),r=1;r<e;r++)o[r-1]=arguments[r];return tv(t,n,o)}}function hv(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:uv;qh&&qh(t,null);for(var o=n.length;o--;){var r=n[o];if("string"==typeof r){var i=e(r);i!==r&&(Yh(n)||(n[o]=i),r=i)}t[r]=!0}return t}function vv(t){for(var n=0;n<t.length;n++){dv(t,n)||(t[n]=null)}return t}function bv(t){for(var n=Zh(null),e=0,o=Gh(t);e<o.length;e++){var r=o[e],i=r[0],u=r[1];dv(t,i)&&(Array.isArray(u)?n[i]=vv(u):u&&"object"==typeof u&&u.constructor===Object?n[i]=bv(u):n[i]=u)}return n}function yv(t,n){for(;null!==t;){var e=Kh(t,n);if(e){if(e.get)return pv(e.get);if("function"==typeof e.value)return pv(e.value)}t=Xh(t)}return function(){return null}}var xv=Jh(["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"]),wv=Jh(["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"]),Sv=Jh(["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"]),kv=Jh(["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"]),Ov=Jh(["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"]),Cv=Jh(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_v=Jh(["#text"]),Tv=Jh(["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"]),Ev=Jh(["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"]),Dv=Jh(["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"]),Av=Jh(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mv=$h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Bv=$h(/<%[\w\W]*|[\w\W]*%>/gm),Iv=$h(/\${[\w\W]*}/gm),Fv=$h(/^data-[\-\w.\u00B7-\uFFFF]/),Rv=$h(/^aria-[\-\w]+$/),Nv=$h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vv=$h(/^(?:\w+script|data):/i),zv=$h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lv=$h(/^html$/i),Hv=$h(/^[a-z][.\w]*(-[.\w]+)+$/i),Pv=Object.freeze({__proto__:null,MUSTACHE_EXPR:Mv,ERB_EXPR:Bv,TMPLIT_EXPR:Iv,DATA_ATTR:Fv,ARIA_ATTR:Rv,IS_ALLOWED_URI:Nv,IS_SCRIPT_OR_DATA:Vv,ATTR_WHITESPACE:zv,DOCTYPE_NAME:Lv,CUSTOM_ELEMENT:Hv}),Uv=1,Wv=3,jv=7,Gv=8,qv=9,Yv=function(){return"undefined"==typeof window?null:window};var Xv,Kv,Jv=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yv(),e=function(n){return t(n)};if(e.version="3.1.7",e.removed=[],!n||!n.document||n.document.nodeType!==qv)return e.isSupported=!1,e;var o,r=n.document,i=r,a=i.currentScript,c=n.DocumentFragment,s=n.HTMLTemplateElement,l=n.Node,f=n.Element,d=n.NodeFilter,m=n.NamedNodeMap,g=void 0===m?n.NamedNodeMap||n.MozNamedAttrMap:m,p=n.HTMLFormElement,h=n.DOMParser,v=n.trustedTypes,b=f.prototype,y=yv(b,"cloneNode"),x=yv(b,"remove"),w=yv(b,"nextSibling"),S=yv(b,"childNodes"),k=yv(b,"parentNode");if("function"==typeof s){var O=r.createElement("template");O.content&&O.content.ownerDocument&&(r=O.content.ownerDocument)}var C="",_=r.implementation,T=r.createNodeIterator,E=r.createDocumentFragment,D=r.getElementsByTagName,A=i.importNode,M={};e.isSupported="function"==typeof Gh&&"function"==typeof k&&_&&void 0!==_.createHTMLDocument;var B=Pv.MUSTACHE_EXPR,I=Pv.ERB_EXPR,F=Pv.TMPLIT_EXPR,R=Pv.DATA_ATTR,N=Pv.ARIA_ATTR,V=Pv.IS_SCRIPT_OR_DATA,z=Pv.ATTR_WHITESPACE,L=Pv.CUSTOM_ELEMENT,H=Pv.IS_ALLOWED_URI,P=null,U=hv({},u(u(u(u(u([],xv,!0),wv,!0),Sv,!0),Ov,!0),_v,!0)),W=null,j=hv({},u(u(u(u([],Tv,!0),Ev,!0),Dv,!0),Av,!0)),G=Object.seal(Zh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,Y=null,X=!0,K=!0,J=!1,$=!0,Z=!1,Q=!0,tt=!1,nt=!1,et=!1,ot=!1,rt=!1,it=!1,ut=!0,at=!1,ct=!0,st=!1,lt={},ft=null,dt=hv({},["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"]),mt=null,gt=hv({},["audio","video","img","source","image","track"]),pt=null,ht=hv({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vt="http://www.w3.org/1998/Math/MathML",bt="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml",xt=yt,wt=!1,St=null,kt=hv({},[vt,bt,yt],av),Ot=null,Ct=["application/xhtml+xml","text/html"],_t=null,Tt=null,Et=r.createElement("form"),Dt=function(t){return t instanceof RegExp||t instanceof Function},At=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Tt||Tt!==t){if(t&&"object"==typeof t||(t={}),t=bv(t),Ot=-1===Ct.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,_t="application/xhtml+xml"===Ot?av:uv,P=dv(t,"ALLOWED_TAGS")?hv({},t.ALLOWED_TAGS,_t):U,W=dv(t,"ALLOWED_ATTR")?hv({},t.ALLOWED_ATTR,_t):j,St=dv(t,"ALLOWED_NAMESPACES")?hv({},t.ALLOWED_NAMESPACES,av):kt,pt=dv(t,"ADD_URI_SAFE_ATTR")?hv(bv(ht),t.ADD_URI_SAFE_ATTR,_t):ht,mt=dv(t,"ADD_DATA_URI_TAGS")?hv(bv(gt),t.ADD_DATA_URI_TAGS,_t):gt,ft=dv(t,"FORBID_CONTENTS")?hv({},t.FORBID_CONTENTS,_t):dt,q=dv(t,"FORBID_TAGS")?hv({},t.FORBID_TAGS,_t):{},Y=dv(t,"FORBID_ATTR")?hv({},t.FORBID_ATTR,_t):{},lt=!!dv(t,"USE_PROFILES")&&t.USE_PROFILES,X=!1!==t.ALLOW_ARIA_ATTR,K=!1!==t.ALLOW_DATA_ATTR,J=t.ALLOW_UNKNOWN_PROTOCOLS||!1,$=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Z=t.SAFE_FOR_TEMPLATES||!1,Q=!1!==t.SAFE_FOR_XML,tt=t.WHOLE_DOCUMENT||!1,ot=t.RETURN_DOM||!1,rt=t.RETURN_DOM_FRAGMENT||!1,it=t.RETURN_TRUSTED_TYPE||!1,et=t.FORCE_BODY||!1,ut=!1!==t.SANITIZE_DOM,at=t.SANITIZE_NAMED_PROPS||!1,ct=!1!==t.KEEP_CONTENT,st=t.IN_PLACE||!1,H=t.ALLOWED_URI_REGEXP||Nv,xt=t.NAMESPACE||yt,G=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&Dt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&Dt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(K=!1),rt&&(ot=!0),lt&&(P=hv({},_v),W=[],!0===lt.html&&(hv(P,xv),hv(W,Tv)),!0===lt.svg&&(hv(P,wv),hv(W,Ev),hv(W,Av)),!0===lt.svgFilters&&(hv(P,Sv),hv(W,Ev),hv(W,Av)),!0===lt.mathMl&&(hv(P,Ov),hv(W,Dv),hv(W,Av))),t.ADD_TAGS&&(P===U&&(P=bv(P)),hv(P,t.ADD_TAGS,_t)),t.ADD_ATTR&&(W===j&&(W=bv(W)),hv(W,t.ADD_ATTR,_t)),t.ADD_URI_SAFE_ATTR&&hv(pt,t.ADD_URI_SAFE_ATTR,_t),t.FORBID_CONTENTS&&(ft===dt&&(ft=bv(ft)),hv(ft,t.FORBID_CONTENTS,_t)),ct&&(P["#text"]=!0),tt&&hv(P,["html","head","body"]),P.table&&(hv(P,["tbody"]),delete q.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw gv('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw gv('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');o=t.TRUSTED_TYPES_POLICY,C=o.createHTML("")}else void 0===o&&(o=function(t,n){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;var e=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(e=n.getAttribute(o));var r="dompurify"+(e?"#"+e:"");try{return t.createPolicy(r,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(v,a)),null!==o&&"string"==typeof C&&(C=o.createHTML(""));Jh&&Jh(t),Tt=t}},Mt=hv({},["mi","mo","mn","ms","mtext"]),Bt=hv({},["annotation-xml"]),It=hv({},["title","style","font","a","script"]),Ft=hv({},u(u(u([],wv,!0),Sv,!0),kv,!0)),Rt=hv({},u(u([],Ov,!0),Cv,!0)),Nt=function(t){iv(e.removed,{element:t});try{k(t).removeChild(t)}catch(n){x(t)}},Vt=function(t,n){try{iv(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(t){iv(e.removed,{attribute:null,from:n})}if(n.removeAttribute(t),"is"===t&&!W[t])if(ot||rt)try{Nt(n)}catch(t){}else try{n.setAttribute(t,"")}catch(t){}},zt=function(t){var n=null,e=null;if(et)t="<remove></remove>"+t;else{var i=cv(t,/^[\r\n\t ]+/);e=i&&i[0]}"application/xhtml+xml"===Ot&&xt===yt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var u=o?o.createHTML(t):t;if(xt===yt)try{n=(new h).parseFromString(u,Ot)}catch(t){}if(!n||!n.documentElement){n=_.createDocument(xt,"template",null);try{n.documentElement.innerHTML=wt?C:u}catch(t){}}var a=n.body||n.documentElement;return t&&e&&a.insertBefore(r.createTextNode(e),a.childNodes[0]||null),xt===yt?D.call(n,tt?"html":"body")[0]:tt?n.documentElement:a},Lt=function(t){return T.call(t.ownerDocument||t,t,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Ht=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof g)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Pt=function(t){return"function"==typeof l&&t instanceof l},Ut=function(t,n,o){M[t]&&ov(M[t],(function(t){t.call(e,n,o,Tt)}))},Wt=function(t){var n=null;if(Ut("beforeSanitizeElements",t,null),Ht(t))return Nt(t),!0;var o=_t(t.nodeName);if(Ut("uponSanitizeElement",t,{tagName:o,allowedTags:P}),t.hasChildNodes()&&!Pt(t.firstElementChild)&&mv(/<[/\w]/g,t.innerHTML)&&mv(/<[/\w]/g,t.textContent))return Nt(t),!0;if(t.nodeType===jv)return Nt(t),!0;if(Q&&t.nodeType===Gv&&mv(/<[/\w]/g,t.data))return Nt(t),!0;if(!P[o]||q[o]){if(!q[o]&&Gt(o)){if(G.tagNameCheck instanceof RegExp&&mv(G.tagNameCheck,o))return!1;if(G.tagNameCheck instanceof Function&&G.tagNameCheck(o))return!1}if(ct&&!ft[o]){var r=k(t)||t.parentNode,i=S(t)||t.childNodes;if(i&&r)for(var u=i.length-1;u>=0;--u){var a=y(i[u],!0);a.__removalCount=(t.__removalCount||0)+1,r.insertBefore(a,w(t))}}return Nt(t),!0}return t instanceof f&&!function(t){var n=k(t);n&&n.tagName||(n={namespaceURI:xt,tagName:"template"});var e=uv(t.tagName),o=uv(n.tagName);return!!St[t.namespaceURI]&&(t.namespaceURI===bt?n.namespaceURI===yt?"svg"===e:n.namespaceURI===vt?"svg"===e&&("annotation-xml"===o||Mt[o]):Boolean(Ft[e]):t.namespaceURI===vt?n.namespaceURI===yt?"math"===e:n.namespaceURI===bt?"math"===e&&Bt[o]:Boolean(Rt[e]):t.namespaceURI===yt?!(n.namespaceURI===bt&&!Bt[o])&&!(n.namespaceURI===vt&&!Mt[o])&&!Rt[e]&&(It[e]||!Ft[e]):!("application/xhtml+xml"!==Ot||!St[t.namespaceURI]))}(t)?(Nt(t),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!mv(/<\/no(script|embed|frames)/i,t.innerHTML)?(Z&&t.nodeType===Wv&&(n=t.textContent,ov([B,I,F],(function(t){n=sv(n,t," ")})),t.textContent!==n&&(iv(e.removed,{element:t.cloneNode()}),t.textContent=n)),Ut("afterSanitizeElements",t,null),!1):(Nt(t),!0)},jt=function(t,n,e){if(ut&&("id"===n||"name"===n)&&(e in r||e in Et))return!1;if(K&&!Y[n]&&mv(R,n));else if(X&&mv(N,n));else if(!W[n]||Y[n]){if(!(Gt(t)&&(G.tagNameCheck instanceof RegExp&&mv(G.tagNameCheck,t)||G.tagNameCheck instanceof Function&&G.tagNameCheck(t))&&(G.attributeNameCheck instanceof RegExp&&mv(G.attributeNameCheck,n)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(n))||"is"===n&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&mv(G.tagNameCheck,e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(e))))return!1}else if(pt[n]);else if(mv(H,sv(e,z,"")));else if("src"!==n&&"xlink:href"!==n&&"href"!==n||"script"===t||0!==lv(e,"data:")||!mt[t]){if(J&&!mv(V,sv(e,z,"")));else if(e)return!1}else;return!0},Gt=function(t){return"annotation-xml"!==t&&cv(t,L)},qt=function(t){Ut("beforeSanitizeAttributes",t,null);var n=t.attributes;if(n){for(var r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W},i=n.length,u=function(){var u=n[i],a=u.name,c=u.namespaceURI,s=u.value,l=_t(a),f="value"===a?s:fv(s),d=f;if(r.attrName=l,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,Ut("uponSanitizeAttribute",t,r),f=r.attrValue,r.forceKeepAttr)return"continue";if(!r.keepAttr)return Vt(a,t),"continue";if(!$&&mv(/\/>/i,f))return Vt(a,t),"continue";Z&&ov([B,I,F],(function(t){f=sv(f,t," ")}));var m=_t(t.nodeName);if(!jt(m,l,f))return Vt(a,t),"continue";if(!at||"id"!==l&&"name"!==l||(Vt(a,t),f="user-content-"+f),Q&&mv(/((--!?|])>)|<\/(style|title)/i,f))return Vt(a,t),"continue";if(o&&"object"==typeof v&&"function"==typeof v.getAttributeType)if(c);else switch(v.getAttributeType(m,l)){case"TrustedHTML":f=o.createHTML(f);break;case"TrustedScriptURL":f=o.createScriptURL(f)}if(f!==d)try{c?t.setAttributeNS(c,a,f):t.setAttribute(a,f),Ht(t)?Nt(t):rv(e.removed)}catch(t){}};i--;)u();Ut("afterSanitizeAttributes",t,null)}},Yt=function t(n){var e=null,o=Lt(n);for(Ut("beforeSanitizeShadowDOM",n,null);e=o.nextNode();)Ut("uponSanitizeShadowNode",e,null),Wt(e)||(e.content instanceof c&&t(e.content),qt(e));Ut("afterSanitizeShadowDOM",n,null)};return e.sanitize=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,u=null,a=null,s=null;if((wt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Pt(t)){if("function"!=typeof t.toString)throw gv("toString is not a function");if("string"!=typeof(t=t.toString()))throw gv("dirty is not a string, aborting")}if(!e.isSupported)return t;if(nt||At(n),e.removed=[],"string"==typeof t&&(st=!1),st){if(t.nodeName){var f=_t(t.nodeName);if(!P[f]||q[f])throw gv("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)(u=(r=zt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType===Uv&&"BODY"===u.nodeName||"HTML"===u.nodeName?r=u:r.appendChild(u);else{if(!ot&&!Z&&!tt&&-1===t.indexOf("<"))return o&&it?o.createHTML(t):t;if(!(r=zt(t)))return ot?null:it?C:""}r&&et&&Nt(r.firstChild);for(var d=Lt(st?t:r);a=d.nextNode();)Wt(a)||(a.content instanceof c&&Yt(a.content),qt(a));if(st)return t;if(ot){if(rt)for(s=E.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(W.shadowroot||W.shadowrootmode)&&(s=A.call(i,s,!0)),s}var m=tt?r.outerHTML:r.innerHTML;return tt&&P["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&mv(Lv,r.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+m),Z&&ov([B,I,F],(function(t){m=sv(m,t," ")})),o&&it?o.createHTML(m):m},e.setConfig=function(){At(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),nt=!0},e.clearConfig=function(){Tt=null,nt=!1},e.isValidAttribute=function(t,n,e){Tt||At({});var o=_t(t),r=_t(n);return jt(o,r,e)},e.addHook=function(t,n){"function"==typeof n&&(M[t]=M[t]||[],iv(M[t],n))},e.removeHook=function(t){if(M[t])return rv(M[t])},e.removeHooks=function(t){M[t]&&(M[t]=[])},e.removeAllHooks=function(){M={}},e}(),$v=function(t){return Jv().sanitize(t)},Zv=tinymce.util.Tools.resolve("tinymce.util.I18n"),Qv={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},tb="temporary-placeholder",nb=function(t){return function(){return Tt(t,tb).getOr("!not found!")}},eb=function(t,n){var e=t.toLowerCase();if(Zv.isRtl()){var o=function(t,n){return Lt(t,n)?t:function(t,n){return t+n}(t,n)}(e,"-rtl");return Et(n,o)?o:e}return e},ob=function(t,n){return Tt(n,eb(t,n))},rb=function(t,n){var e=n();return ob(t,e).getOrThunk(nb(e))},ib=function(){return Jp("add-focusable",[vu((function(t){Wa(t.element,"svg").each((function(t){return Fn(t,"focusable","false")}))}))])},ub=function(t,n,e,o){var r,i,a=function(t){return!!Zv.isRtl()&&Et(Qv,t)}(n)?["tox-icon--flip"]:[],c=Tt(e,eb(n,e)).or(o).getOrThunk(nb(e));return{dom:{tag:t.tag,attributes:null!==(r=t.attributes)&&void 0!==r?r:{},classes:t.classes.concat(a),innerHtml:c},behaviours:es(u(u([],null!==(i=t.behaviours)&&void 0!==i?i:[],!0),[ib()],!1))}},ab=function(t,n,e,o){return void 0===o&&(o=z.none()),ub(n,t,e(),o)},cb={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},sb=mm({name:"Notification",factory:function(t){var n,e,o,r,i,u=jh({dom:Wh("<p>".concat($v(t.translationProvider(t.text)),"</p>")),behaviours:es([Kp.config({})])}),a=function(t){return{dom:{tag:"div",classes:["tox-bar"],styles:{width:"".concat(t,"%")}}}},c=function(t){return{dom:{tag:"div",classes:["tox-text"],innerHtml:"".concat(t,"%")}}},s=jh({dom:{tag:"div",classes:t.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[a(0)]},c(0)],behaviours:es([Kp.config({})])}),l={updateProgress:function(t,n){t.getSystem().isConnected()&&s.getOpt(t).each((function(t){Kp.set(t,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[a(n)]},c(n)])}))},updateText:function(t,n){if(t.getSystem().isConnected()){var e=u.get(t);Kp.set(e,[Ba(n)])}}},f=ot([t.icon.toArray(),t.level.toArray(),t.level.bind((function(t){return z.from(cb[t])})).toArray()]),d=jh(Uh.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[ab("close",{tag:"span",classes:["tox-icon"],attributes:{"aria-label":t.translationProvider("Close")}},t.iconProvider)],action:function(n){t.onAction(n)}})),m=(n=f,e={tag:"div",classes:["tox-notification__icon"]},o=t.iconProvider,r=o(),i=nt(n,(function(t){return Et(r,eb(t,r))})),ub(e,i.getOr(tb),r,z.none())),g=[m,{dom:{tag:"div",classes:["tox-notification__body"]},components:[u.asSpec()],behaviours:es([Kp.config({})])}];return{uid:t.uid,dom:{tag:"div",attributes:{role:"alert"},classes:t.level.map((function(t){return["tox-notification","tox-notification--in","tox-notification--".concat(t)]})).getOr(["tox-notification","tox-notification--in"])},behaviours:es([nh.config({}),Jp("notification-events",[su(pi(),(function(t){d.getOpt(t).each(nh.focus)}))])]),components:g.concat(t.progress?[s.asSpec()]:[]).concat(t.closeButton?[d.asSpec()]:[]),apis:l}},configFields:[Er("level"),yr("progress"),Er("icon"),yr("onAction"),yr("text"),yr("iconProvider"),yr("translationProvider"),Pr("closeButton",!0)],apis:{updateProgress:function(t,n,e){t.updateProgress(n,e)},updateText:function(t,n,e){t.updateText(n,e)}}}),lb=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),fb=tinymce.util.Tools.resolve("tinymce.EditorManager"),db=tinymce.util.Tools.resolve("tinymce.Env");!function(t){t.default="wrap",t.floating="floating",t.sliding="sliding",t.scrolling="scrolling"}(Xv||(Xv={})),function(t){t.auto="auto",t.top="top",t.bottom="bottom"}(Kv||(Kv={}));var mb,gb=function(t){return function(n){return n.options.get(t)}},pb=function(t){return function(n){return z.from(t(n))}},hb=function(t){var n=db.deviceType.isPhone(),e=db.deviceType.isTablet()||n,o=t.options.register,r=function(t){return g(t)||!1===t},i=function(t){return g(t)||O(t)};o("skin",{processor:function(t){return g(t)||!1===t},default:"oxide"}),o("skin_url",{processor:"string"}),o("height",{processor:i,default:Math.max(t.getElement().offsetHeight,400)}),o("width",{processor:i,default:lb.DOM.getStyle(t.getElement(),"width")}),o("min_height",{processor:"number",default:100}),o("min_width",{processor:"number"}),o("max_height",{processor:"number"}),o("max_width",{processor:"number"}),o("style_formats",{processor:"object[]"}),o("style_formats_merge",{processor:"boolean",default:!1}),o("style_formats_autohide",{processor:"boolean",default:!1}),o("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"}),o("font_family_formats",{processor:"string",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"}),o("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"}),o("font_size_input_default_unit",{processor:"string",default:"pt"}),o("block_formats",{processor:"string",default:"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre"}),o("content_langs",{processor:"object[]"}),o("removed_menuitems",{processor:"string",default:""}),o("menubar",{processor:function(t){return g(t)||y(t)},default:!n}),o("menu",{processor:"object",default:{}}),o("toolbar",{processor:function(t){return y(t)||g(t)||v(t)?{value:t,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."}},default:!0}),Y(9,(function(t){o("toolbar"+(t+1),{processor:"string"})})),o("toolbar_mode",{processor:"string",default:e?"scrolling":"floating"}),o("toolbar_groups",{processor:"object",default:{}}),o("toolbar_location",{processor:"string",default:Kv.auto}),o("toolbar_persist",{processor:"boolean",default:!1}),o("toolbar_sticky",{processor:"boolean",default:t.inline}),o("toolbar_sticky_offset",{processor:"number",default:0}),o("fixed_toolbar_container",{processor:"string",default:""}),o("fixed_toolbar_container_target",{processor:"object"}),o("ui_mode",{processor:"string",default:"combined"}),o("file_picker_callback",{processor:"function"}),o("file_picker_validator_handler",{processor:"function"}),o("file_picker_types",{processor:"string"}),o("typeahead_urls",{processor:"boolean",default:!0}),o("anchor_top",{processor:r,default:"#top"}),o("anchor_bottom",{processor:r,default:"#bottom"}),o("draggable_modal",{processor:"boolean",default:!1}),o("statusbar",{processor:"boolean",default:!0}),o("elementpath",{processor:"boolean",default:!0}),o("branding",{processor:"boolean",default:!0}),o("promotion",{processor:"boolean",default:!0}),o("resize",{processor:function(t){return"both"===t||y(t)},default:!db.deviceType.isTouch()}),o("sidebar_show",{processor:"string"}),o("help_accessibility",{processor:"boolean",default:t.hasPlugin("help")}),o("default_font_stack",{processor:"string[]",default:[]})},vb=gb("readonly"),bb=gb("height"),yb=gb("width"),xb=pb(gb("min_width")),wb=pb(gb("min_height")),Sb=pb(gb("max_width")),kb=pb(gb("max_height")),Ob=pb(gb("style_formats")),Cb=gb("style_formats_merge"),_b=gb("style_formats_autohide"),Tb=gb("content_langs"),Eb=gb("removed_menuitems"),Db=gb("toolbar_mode"),Ab=gb("toolbar_groups"),Mb=gb("toolbar_location"),Bb=gb("fixed_toolbar_container"),Ib=gb("fixed_toolbar_container_target"),Fb=gb("toolbar_persist"),Rb=gb("toolbar_sticky_offset"),Nb=gb("menubar"),Vb=gb("toolbar"),zb=gb("file_picker_callback"),Lb=gb("file_picker_validator_handler"),Hb=gb("font_size_input_default_unit"),Pb=gb("file_picker_types"),Ub=gb("typeahead_urls"),Wb=gb("anchor_top"),jb=gb("anchor_bottom"),Gb=gb("draggable_modal"),qb=gb("statusbar"),Yb=gb("elementpath"),Xb=gb("branding"),Kb=gb("resize"),Jb=gb("paste_as_text"),$b=gb("sidebar_show"),Zb=gb("promotion"),Qb=gb("help_accessibility"),ty=gb("default_font_stack"),ny=function(t){return!1===t.options.get("skin")},ey=function(t){return!1!==t.options.get("menubar")},oy=function(t){var n=t.options.get("skin_url");if(ny(t))return n;if(n)return t.documentBaseURI.toAbsolute(n);var e=t.options.get("skin");return fb.baseURL+"/skins/ui/"+e},ry=function(t){return z.from(t.options.get("skin_url"))},iy=function(t){return t.options.get("line_height_formats").split(" ")},uy=function(t){var n=Vb(t),e=g(n),o=v(n)&&n.length>0;return!cy(t)&&(o||e||!0===n)},ay=function(t){var n=Y(9,(function(n){return t.options.get("toolbar"+(n+1))})),e=Z(n,g);return Ft(e.length>0,e)},cy=function(t){return ay(t).fold((function(){var n=Vb(t);return C(n,g)&&n.length>0}),V)},sy=function(t){return Mb(t)===Kv.bottom},ly=function(t){var n;if(!t.inline)return z.none();var e=null!==(n=Bb(t))&&void 0!==n?n:"";if(e.length>0)return ja(Mn(),e);var o=Ib(t);return S(o)?z.some(Gt.fromDom(o)):z.none()},fy=function(t){return t.inline&&ly(t).isSome()},dy=function(t){return ly(t).getOrThunk((function(){return _n(Cn(Gt.fromDom(t.getElement())))}))},my=function(t){return t.inline&&!ey(t)&&!uy(t)&&!cy(t)},gy=function(t){return(t.options.get("toolbar_sticky")||t.inline)&&!fy(t)&&!my(t)},py=function(t){return!fy(t)&&"split"===t.options.get("ui_mode")},hy=function(t){var n=t.options.get("menu");return yt(n,(function(t){return e(e({},t),{items:t.items})}))},vy=Object.freeze({__proto__:null,get ToolbarMode(){return Xv},get ToolbarLocation(){return Kv},register:hb,getSkinUrl:oy,getSkinUrlOption:ry,isReadOnly:vb,isSkinDisabled:ny,getHeightOption:bb,getWidthOption:yb,getMinWidthOption:xb,getMinHeightOption:wb,getMaxWidthOption:Sb,getMaxHeightOption:kb,getUserStyleFormats:Ob,shouldMergeStyleFormats:Cb,shouldAutoHideStyleFormats:_b,getLineHeightFormats:iy,getContentLanguages:Tb,getRemovedMenuItems:Eb,isMenubarEnabled:ey,isMultipleToolbars:cy,isToolbarEnabled:uy,isToolbarPersist:Fb,getMultipleToolbarsOption:ay,getUiContainer:dy,useFixedContainer:fy,isSplitUiMode:py,getToolbarMode:Db,isDraggableModal:Gb,isDistractionFree:my,isStickyToolbar:gy,getStickyToolbarOffset:Rb,getToolbarLocation:Mb,isToolbarLocationBottom:sy,getToolbarGroups:Ab,getMenus:hy,getMenubar:Nb,getToolbar:Vb,getFilePickerCallback:zb,getFilePickerTypes:Pb,useTypeaheadUrls:Ub,getAnchorTop:Wb,getAnchorBottom:jb,getFilePickerValidatorHandler:Lb,getFontSizeInputDefaultUnit:Hb,useStatusBar:qb,useElementPath:Yb,promotionEnabled:Zb,useBranding:Xb,getResize:Kb,getPasteAsText:Jb,getSidebarShow:$b,useHelpAccessibility:Qb,getDefaultFontStack:ty}),by="[data-mce-autocompleter]",yy=function(t){return Ga(t,by)},xy=function(t,n){var e=function(t,n){nu(t,vi(),{raw:n})},o=function(){return t.getMenu().bind(Wm.getHighlighted)};n.on("keydown",(function(n){var r=n.which;t.isActive()&&(t.isMenuOpen()?13===r?(o().each(eu),n.preventDefault()):40===r?(o().fold((function(){t.getMenu().each(Wm.highlightFirst)}),(function(t){e(t,n)})),n.preventDefault(),n.stopImmediatePropagation()):37!==r&&38!==r&&39!==r||o().each((function(t){e(t,n),n.preventDefault(),n.stopImmediatePropagation()})):13!==r&&38!==r&&40!==r||t.cancelIfNecessary())})),n.on("NodeChange",(function(n){t.isActive()&&!t.isProcessingAction()&&yy(Gt.fromDom(n.element)).isNone()&&t.cancelIfNecessary()}))};!function(t){t[t.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",t[t.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(mb||(mb={}));var wy,Sy,ky,Oy=mb,Cy="tox-menu-nav__js",_y="tox-collection__item",Ty="tox-swatch",Ey={normal:Cy,color:Ty},Dy="tox-collection__item--enabled",Ay="tox-collection__item-icon",My="tox-collection__item-label",By="tox-collection__item-caret",Iy="tox-collection__item--active",Fy="tox-collection__item-container",Ry="tox-collection__item-container--row",Ny=function(t){return Tt(Ey,t).getOr(Cy)},Vy=function(t){return"color"===t?"tox-swatches":"tox-menu"},zy=function(t){return{backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:Vy(t),tieredMenu:"tox-tiered-menu"}},Ly=function(t){var n=zy(t);return{backgroundMenu:n.backgroundMenu,selectedMenu:n.selectedMenu,menu:n.menu,selectedItem:n.selectedItem,item:Ny(t)}},Hy=function(t,n,e){var o=zy(e);return{tag:"div",classes:ot([[o.menu,"tox-menu-".concat(n,"-column")],t?[o.hasIcons]:[]])}},Py=[Mh.parts.items({})],Uy=function(t,n,e){var o=zy(e);return{dom:{tag:"div",classes:ot([[o.tieredMenu]])},markers:Ly(e)}},Wy=D([Er("data"),Nr("inputAttributes",{}),Nr("inputStyles",{}),Nr("tag","input"),Nr("inputClasses",[]),sc("onSetValue"),Nr("styles",{}),Nr("eventOrder",{}),ld("inputBehaviours",[sd,nh]),Nr("selectOnFocus",!0)]),jy=function(t){return es([nh.config({onFocus:t.selectOnFocus?function(t){var n=t.element,e=ba(n);n.dom.setSelectionRange(0,e.length)}:_})])},Gy=function(t){return e(e({},jy(t)),dd(t.inputBehaviours,[sd.config({store:e(e({mode:"manual"},t.data.map((function(t){return{initialValue:t}})).getOr({})),{getValue:function(t){return ba(t.element)},setValue:function(t,n){ba(t.element)!==n&&ya(t.element,n)}}),onSetValue:t.onSetValue})]))},qy=function(t){return{tag:t.tag,attributes:e({type:"text"},t.inputAttributes),styles:t.inputStyles,classes:t.inputClasses}},Yy=mm({name:"Input",configFields:Wy(),factory:function(t,n){return{uid:t.uid,dom:qy(t),components:[],behaviours:Gy(t),eventOrder:t.eventOrder}}}),Xy=Du("refetch-trigger-event"),Ky=Du("redirect-menu-item-interaction"),Jy="tox-menu__searcher",$y=function(t){return ja(t.element,".".concat(Jy)).bind((function(n){return t.getSystem().getByDom(n).toOptional()}))},Zy=$y,Qy=function(t){return{fetchPattern:sd.getValue(t),selectionStart:t.element.dom.selectionStart,selectionEnd:t.element.dom.selectionEnd}},tx="tox-collection--results__js",nx=function(t){var n;return t.dom?e(e({},t),{dom:e(e({},t.dom),{attributes:e(e({},null!==(n=t.dom.attributes)&&void 0!==n?n:{}),{id:Du("aria-item-search-result-id"),"aria-selected":"false"})})}):t},ex=function(t,n){return function(e){var o=X(e,n);return K(o,(function(n){return{dom:t,components:n}}))}},ox=function(t,n){var e=[],o=[];return J(t,(function(t,r){n(t,r)?(o.length>0&&e.push(o),o=[],(Et(t.dom,"innerHtml")||t.components&&t.components.length>0)&&o.push(t)):o.push(t)})),o.length>0&&e.push(o),K(e,(function(t){return{dom:{tag:"div",classes:["tox-collection__group"]},components:t}}))},rx=function(t,n,e){return Mh.parts.items({preprocess:function(o){var r=K(o,e);return"auto"!==t&&t>1?ex({tag:"div",classes:["tox-collection__group"]},t)(r):ox(r,(function(t,e){return"separator"===n[e].type}))}})},ix=function(t,n,e){return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[rx(t,n,A)]}},ux=function(t){return q(t,(function(t){return"icon"in t&&void 0!==t.icon}))},ax=function(t){return console.error(mr(t)),console.log(t),z.none()},cx=function(t,n,e,o,r){var i,u=(i=e,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Mh.parts.items({preprocess:function(t){return ox(t,(function(t,n){return"separator"===i[n].type}))}})]});return{value:t,dom:u.dom,components:u.components,items:e}},sx=function(t,n,o,r,i){if("color"===i.menuType){var a=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Mh.parts.items({preprocess:"auto"!==t?ex({tag:"div",classes:["tox-swatches__row"]},t):A})]}]}}(r);return{value:t,dom:a.dom,components:a.components,items:o}}if("normal"===i.menuType&&"auto"===r)return{value:t,dom:(a=ix(r,o)).dom,components:a.components,items:o};if("normal"===i.menuType||"searchable"===i.menuType){a="searchable"!==i.menuType?ix(r,o):"search-with-field"===i.searchMode.searchMode?function(t,n,o){var r,i,a,c,s=Du("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===t?["tox-collection--list"]:["tox-collection--grid"])},components:[(r={i18n:Zv.translate,placeholder:o.placeholder},i=function(t,n){return n.cut(),z.none()},a=function(t,n){var e={interactionEvent:n.event,eventType:n.event.raw.type};return nu(t,Ky,e),z.some(!0)},c="searcher-events",{dom:{tag:"div",classes:[_y]},components:[Yy.sketch({inputClasses:[Jy,"tox-textfield"],inputAttributes:e(e({},r.placeholder.map((function(t){return{placeholder:r.i18n(t)}})).getOr({})),{type:"search","aria-autocomplete":"list"}),inputBehaviours:es([Jp(c,[su(yi(),(function(t){tu(t,Xy)})),su(vi(),(function(t,n){"Escape"===n.event.raw.key&&n.stop()}))]),Hp.config({mode:"special",onLeft:i,onRight:i,onSpace:i,onEnter:a,onEscape:a,onUp:a,onDown:a})]),eventOrder:{keydown:[c,Hp.name()]}})]}),{dom:{tag:"div",classes:u(u([],1===t?["tox-collection--list"]:["tox-collection--grid"],!0),[tx],!1),attributes:{id:s}},components:[rx(t,n,nx)]}]}}(r,o,i.searchMode):function(t,n,e){var o=Du("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",tx].concat(1===t?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:o}},components:[rx(t,n,nx)]}}(r,o);return{value:t,dom:a.dom,components:a.components,items:o}}if("listpreview"===i.menuType&&"auto"!==r){a=function(t){return{dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Mh.parts.items({preprocess:ex({tag:"div",classes:["tox-collection__group"]},t)})]}}(r);return{value:t,dom:a.dom,components:a.components,items:o}}return{value:t,dom:Hy(n,r,i.menuType),components:Py,items:o}},lx=Sr("type"),fx=Sr("name"),dx=Sr("label"),mx=Sr("text"),gx=Sr("title"),px=Sr("icon"),hx=Sr("value"),vx=Or("fetch"),bx=Or("getSubmenuItems"),yx=Or("onAction"),xx=Or("onItemAction"),wx=Ur("onSetup",(function(){return _})),Sx=Mr("name"),kx=Mr("text"),Ox=Mr("icon"),Cx=Mr("tooltip"),_x=Mr("label"),Tx=Mr("shortcut"),Ex=Ir("select"),Dx=Pr("active",!1),Ax=Pr("borderless",!1),Mx=Pr("enabled",!0),Bx=Pr("primary",!1),Ix=function(t){return Nr("columns",t)},Fx=Nr("meta",{}),Rx=Ur("onAction",_),Nx=function(t){return Lr("type",t)},Vx=function(t){return hr("name","name",Bo((function(){return Du("".concat(t,"-name"))})),nr)},zx=Yo([lx,kx]),Lx=Yo([Nx("autocompleteitem"),Dx,Mx,Fx,hx,kx,Ox]),Hx=[Mx,Cx,Ox,kx,wx],Px=Yo([lx,yx].concat(Hx)),Ux=function(t){return lr("toolbarbutton",Px,t)},Wx=[Dx].concat(Hx),jx=Yo(Wx.concat([lx,yx])),Gx=function(t){return lr("ToggleButton",jx,t)},qx=[Ur("predicate",N),Hr("scope","node",["node","editor"]),Hr("position","selection",["node","selection","line"])],Yx=Hx.concat([Nx("contextformbutton"),Bx,yx,vr("original",A)]),Xx=Wx.concat([Nx("contextformbutton"),Bx,yx,vr("original",A)]),Kx=Hx.concat([Nx("contextformbutton")]),Jx=Wx.concat([Nx("contextformtogglebutton")]),$x=gr("type",{contextformbutton:Yx,contextformtogglebutton:Xx}),Zx=Yo([Nx("contextform"),Ur("initValue",D("")),_x,Tr("commands",$x),Dr("launch",gr("type",{contextformbutton:Kx,contextformtogglebutton:Jx}))].concat(qx)),Qx=Yo([Nx("contexttoolbar"),Sr("items")].concat(qx)),tw=[lx,Sr("src"),Mr("alt"),Wr("classes",[],nr)],nw=Yo(tw),ew=[lx,mx,Sx,Wr("classes",["tox-collection__item-label"],nr)],ow=Yo(ew),rw=jo((function(){return ar("type",{cardimage:nw,cardtext:ow,cardcontainer:iw})})),iw=Yo([lx,Lr("direction","horizontal"),Lr("align","left"),Lr("valign","middle"),Tr("items",rw)]),uw=[Mx,kx,Tx,(wy="menuitem",hr("value","value",Bo((function(){return Du("".concat(wy,"-value"))})),Zo())),Fx],aw=Yo([lx,_x,Tr("items",rw),wx,Rx].concat(uw)),cw=Yo([lx,Dx,Ox].concat(uw)),sw=[lx,Sr("fancytype"),Rx],lw=[Nr("initData",{})].concat(sw),fw=[Ir("select"),jr("initData",{},[Pr("allowCustomColors",!0),Lr("storageKey","default"),Fr("colors",Zo())])].concat(sw),dw=gr("fancytype",{inserttable:lw,colorswatch:fw}),mw=Yo([lx,wx,Rx,Ox].concat(uw)),gw=Yo([lx,bx,wx,Ox].concat(uw)),pw=Yo([lx,Ox,Dx,wx,yx].concat(uw)),hw=function(t,n,e){var o=Rl(t.element,"."+e);if(o.length>0){var r=et(o,(function(t){var e=t.dom.getBoundingClientRect().top,r=o[0].dom.getBoundingClientRect().top;return Math.abs(e-r)>n})).getOr(o.length);return z.some({numColumns:r,numRows:Math.ceil(o.length/r)})}return z.none()},vw=function(t,n){return es([Jp(t,n)])},bw=function(t){return vw(Du("unnamed-events"),t)},yw=Du("tooltip.exclusive"),xw=Du("tooltip.show"),ww=Du("tooltip.hide"),Sw=function(t,n,e){t.getSystem().broadcastOn([yw],{})},kw=Object.freeze({__proto__:null,hideAllExclusive:Sw,setComponents:function(t,n,e,o){e.getTooltip().each((function(t){t.getSystem().isConnected()&&Kp.set(t,o)}))}}),Ow=Object.freeze({__proto__:null,events:function(t,n){var e=function(e){n.getTooltip().each((function(o){Tf(o),t.onHide(e,o),n.clearTooltip()})),n.clearTimer()};return uu(ot([[su(xw,(function(e){n.resetTimer((function(){!function(e){if(!n.isShowing()){Sw(e);var o=t.lazySink(e).getOrDie(),r=e.getSystem().build({dom:t.tooltipDom,components:t.tooltipComponents,events:uu("normal"===t.mode?[su(gi(),(function(t){tu(e,xw)})),su(di(),(function(t){tu(e,ww)}))]:[]),behaviours:es([Kp.config({})])});n.setTooltip(r),Of(o,r),t.onShow(e,r),hf.position(o,r,{anchor:t.anchor(e)})}}(e)}),t.delay)})),su(ww,(function(o){n.resetTimer((function(){e(o)}),t.delay)})),su(Mi(),(function(t,n){var o=n;o.universal||G(o.channels,yw)&&e(t)})),bu((function(t){e(t)}))],"normal"===t.mode?[su(pi(),(function(t){tu(t,xw)})),su(Di(),(function(t){tu(t,ww)})),su(gi(),(function(t){tu(t,xw)})),su(di(),(function(t){tu(t,ww)}))]:[su(Zi(),(function(t,n){tu(t,xw)})),su(Qi(),(function(t){tu(t,ww)}))]]))}}),Cw=[yr("lazySink"),yr("tooltipDom"),Nr("exclusive",!0),Nr("tooltipComponents",[]),Nr("delay",300),Hr("mode","normal",["normal","follow-highlight"]),Nr("anchor",(function(t){return{type:"hotspot",hotspot:t,layouts:{onLtr:D([Pc,Hc,Nc,zc,Vc,Lc]),onRtl:D([Pc,Hc,Nc,zc,Vc,Lc])}}})),sc("onHide"),sc("onShow")],_w=Object.freeze({__proto__:null,init:function(){var t=Fs(),n=Fs(),e=function(){t.on(clearTimeout)},o=D("not-implemented");return Yu({getTooltip:n.get,isShowing:n.isSet,setTooltip:n.set,clearTooltip:n.clear,clearTimer:e,resetTimer:function(n,o){e(),t.set(setTimeout(n,o))},readState:o})}}),Tw=rs({fields:Cw,name:"tooltipping",active:Ow,state:_w,apis:kw}),Ew="silver.readonly",Dw=Yo([(Sy="readonly",xr(Sy,er))]),Aw=function(t,n){var e=t.mainUi.outerContainer.element,o=u([t.mainUi.mothership],t.uiMotherships,!0);n&&J(o,(function(t){t.broadcastOn([jf()],{target:e})})),J(o,(function(t){t.broadcastOn([Ew],{readonly:n})}))},Mw=function(t,n){t.on("init",(function(){t.mode.isReadOnly()&&Aw(n,!0)})),t.on("SwitchMode",(function(){return Aw(n,t.mode.isReadOnly())})),vb(t)&&t.mode.set("readonly")},Bw=function(){var t;return cs.config({channels:(t={},t[Ew]={schema:Dw,onReceive:function(t,n){Bm.set(t,n.readonly)}},t)})},Iw=function(t){return Bm.config({disabled:t,disableClass:"tox-collection__item--state-disabled"})},Fw=function(t){return Bm.config({disabled:t})},Rw=function(t){return Bm.config({disabled:t,disableClass:"tox-tbtn--disabled"})},Nw=function(t){return Bm.config({disabled:t,disableClass:"tox-tbtn--disabled",useNative:!1})},Vw=function(t,n){var e=t.getApi(n);return function(t){t(e)}},zw=function(t,n){return vu((function(e){Vw(t,e)((function(e){var o=t.onSetup(e);k(o)&&n.set(o)}))}))},Lw=function(t,n){return bu((function(e){return Vw(t,e)(n.get())}))},Hw=function(t,n){return xu((function(e,o){Vw(t,e)(t.onAction),t.triggersSubmenu||n!==Oy.CLOSE_ON_EXECUTE||(e.getSystem().isConnected()&&tu(e,Ni()),o.stop())}))},Pw=((n={})[Bi()]=["disabling","alloy.base.behaviour","toggling","item-events"],n),Uw=Mt,Ww=function(t,n,e,o){var r=Gr(_);return{type:"item",dom:n.dom,components:Uw(n.optComponents),data:t.data,eventOrder:Pw,hasSubmenu:t.triggersSubmenu,itemBehaviours:es([Jp("item-events",[Hw(t,e),zw(t,r),Lw(t,r)]),Iw((function(){return!t.enabled||o.isDisabled()})),Bw(),Kp.config({})].concat(t.itemBehaviours))}},jw=function(t){return{value:t.value,meta:e({text:t.text.getOr("")},t.meta)}},Gw=function(t){var n=db.os.isMacOS()||db.os.isiOS(),e=n?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},o=t.split("+"),r=K(o,(function(t){var n=t.toLowerCase().trim();return Et(e,n)?e[n]:t}));return n?r.join(""):r.join("+")},qw=function(t,n,e){return void 0===e&&(e=[Ay]),ab(t,{tag:"div",classes:e},n)},Yw=function(t){return{dom:{tag:"div",classes:[My]},components:[Ba(Zv.translate(t))]}},Xw=function(t,n){return{dom:{tag:"div",classes:n,innerHtml:t}}},Kw=function(t,n){return{dom:{tag:"div",classes:[My]},components:[{dom:{tag:t.tag,styles:t.styles},components:[Ba(Zv.translate(n))]}]}},Jw=function(t){return{dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[Ba(Gw(t))]}},$w=function(t){return qw("checkmark",t,["tox-collection__item-checkmark"])},Zw=function(t,n,o){var r=t.ariaLabel,i=t.value,a=t.iconContent.map((function(t){return function(t,n,e){var o=n();return ob(t,o).or(e).getOrThunk(nb(o))}(t,n.icons,o)}));return{dom:function(){var t=Ty,o=a.getOr(""),c=r.map((function(t){return{title:n.translate(t)}})).getOr({}),s={tag:"div",attributes:c,classes:[t]};return"custom"===i?e(e({},s),{tag:"button",classes:u(u([],s.classes,!0),["tox-swatches__picker-btn"],!1),innerHtml:o}):"remove"===i?e(e({},s),{classes:u(u([],s.classes,!0),["tox-swatch--remove"],!1),innerHtml:o}):S(i)?e(e({},s),{attributes:e(e({},s.attributes),{"data-mce-color":i}),styles:{"background-color":i},innerHtml:o}):s}(),optComponents:[]}},Qw=function(t){var n=t.map((function(t){return{attributes:{title:Zv.translate(t),id:Du("menu-item")}}})).getOr({});return e({tag:"div",classes:[Cy,_y]},n)},tS=function(t,n,e,o){return void 0===o&&(o=z.none()),"color"===t.presets?Zw(t,n,o):function(t,n,e,o){var r={tag:"div",classes:[Ay]},i=e?t.iconContent.map((function(t){return ab(t,r,n.icons,o)})).orThunk((function(){return z.some({dom:r})})):z.none(),u=t.checkMark,a=z.from(t.meta).fold((function(){return Yw}),(function(t){return Et(t,"style")?B(Kw,t.style):Yw})),c=t.htmlContent.fold((function(){return t.textContent.map(a)}),(function(t){return z.some(Xw(t,[My]))}));return{dom:Qw(t.ariaLabel),optComponents:[i,c,t.shortcutContent.map(Jw),u,t.caret]}}(t,n,e,o)},nS=function(t,n){return Tt(t,"tooltipWorker").map((function(t){return[Tw.config({lazySink:n.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:function(t){return{type:"submenu",item:t,overrides:{maxHeightFunction:Ks}}},mode:"follow-highlight",onShow:function(n,e){t((function(t){Tw.setComponents(n,[Ia({element:Gt.fromDom(t)})])}))}})]})).getOr([])},eS=function(t,n){var e=function(t){return lb.DOM.encode(t)}(Zv.translate(t));if(n.length>0){var o=new RegExp(function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(n),"gi");return e.replace(o,(function(t){return'<span class="tox-autocompleter-highlight">'.concat(t,"</span>")}))}return e},oS=function(t,n){return K(t,(function(t){switch(t.type){case"cardcontainer":return function(t,n){var e="vertical"===t.direction?"tox-collection__item-container--column":Ry,o="left"===t.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[Fy,e,o,function(){switch(t.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}}()]},components:n}}(t,oS(t.items,n));case"cardimage":return function(t,n,e){return{dom:{tag:"img",classes:n,attributes:{src:t,alt:e.getOr("")}}}}(t.src,t.classes,t.alt);case"cardtext":var e=t.name.exists((function(t){return G(n.cardText.highlightOn,t)})),o=e?z.from(n.cardText.matchText).getOr(""):"";return Xw(eS(t.text,o),t.classes)}}))},rS=qd(Oh(),Ch()),iS=function(t){return{value:sS(t)}},uS=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,aS=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,cS=function(t){return uS.test(t)||aS.test(t)},sS=function(t){return Nt(t,"#").toUpperCase()},lS=function(t){var n=function(t){var n=t.value.replace(uS,(function(t,n,e,o){return n+n+e+e+o+o}));return{value:n}}(t),e=aS.exec(n.value);return null===e?["FFFFFF","FF","FF","FF"]:e},fS=function(t){var n=t.toString(16);return(1===n.length?"0"+n:n).toUpperCase()},dS=function(t){var n=fS(t.red)+fS(t.green)+fS(t.blue);return iS(n)},mS=Math.min,gS=Math.max,pS=Math.round,hS=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,vS=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,bS=function(t,n,e,o){return{red:t,green:n,blue:e,alpha:o}},yS=function(t){var n=parseInt(t,10);return n.toString()===t&&n>=0&&n<=255},xS=function(t){var n,e,o,r=(t.hue||0)%360,i=t.saturation/100,u=t.value/100;if(i=gS(0,mS(i,1)),u=gS(0,mS(u,1)),0===i)return n=e=o=pS(255*u),bS(n,e,o,1);var a=r/60,c=u*i,s=c*(1-Math.abs(a%2-1)),l=u-c;switch(Math.floor(a)){case 0:n=c,e=s,o=0;break;case 1:n=s,e=c,o=0;break;case 2:n=0,e=c,o=s;break;case 3:n=0,e=s,o=c;break;case 4:n=s,e=0,o=c;break;case 5:n=c,e=0,o=s;break;default:n=e=o=0}return n=pS(255*(n+l)),e=pS(255*(e+l)),o=pS(255*(o+l)),bS(n,e,o,1)},wS=function(t){var n=lS(t),e=parseInt(n[1],16),o=parseInt(n[2],16),r=parseInt(n[3],16);return bS(e,o,r,1)},SS=function(t,n,e,o){var r=parseInt(t,10),i=parseInt(n,10),u=parseInt(e,10),a=parseFloat(o);return bS(r,i,u,a)},kS=function(t){if("transparent"===t)return z.some(bS(0,0,0,0));var n=hS.exec(t);if(null!==n)return z.some(SS(n[1],n[2],n[3],"1"));var e=vS.exec(t);return null!==e?z.some(SS(e[1],e[2],e[3],e[4])):z.none()},OS=function(t){return"rgba(".concat(t.red,",").concat(t.green,",").concat(t.blue,",").concat(t.alpha,")")},CS=bS(255,0,0,1),_S=function(t,n){t.dispatch("ResizeContent",n)},TS=function(t,n){t.dispatch("TextColorChange",n)},ES=function(t,n){return t.dispatch("ResolveName",{name:n.nodeName.toLowerCase(),target:n})},DS=function(t,n){return function(){t(),n()}},AS=function(t){return BS(t,"NodeChange",(function(n){n.setEnabled(t.selection.isEditable())}))},MS=function(t,n){return function(e){var o=AS(t)(e),r=function(t,n){return function(e){var o=Is(),r=function(){e.setActive(t.formatter.match(n));var r=t.formatter.formatChanged(n,e.setActive);o.set(r)};return t.initialized?r():t.once("init",r),function(){t.off("init",r),o.clear()}}}(t,n)(e);return function(){o(),r()}}},BS=function(t,n,e){return function(o){var r=function(){return e(o)},i=function(){e(o),t.on(n,r)};return t.initialized?i():t.once("init",i),function(){t.off("init",i),t.off(n,r)}}},IS=function(t){return function(n){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("mceToggleFormat",!1,n.format)}))}}},FS=function(t,n){return function(){return t.execCommand(n)}},RS=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),NS={},VS=function(t){return Tt(NS,t).getOrThunk((function(){var n="tinymce-custom-colors-".concat(t),e=RS.getItem(n);if(w(e)){var o=RS.getItem("tinymce-custom-colors");RS.setItem(n,S(o)?o:"[]")}var r=function(t,n){void 0===n&&(n=10);var e,o=RS.getItem(t),r=g(o)?JSON.parse(o):[],i=n-(e=r).length<0?e.slice(0,n):e,u=function(t){i.splice(t,1)};return{add:function(e){j(i,e).each(u),i.unshift(e),i.length>n&&i.pop(),RS.setItem(t,JSON.stringify(i))},state:function(){return i.slice(0)}}}(n,10);return NS[t]=r,r}))},zS=function(t,n){VS(t).add(n)},LS=function(t,n,e){return{hue:t,saturation:n,value:e}},HS=function(t){var n,e=0,o=0,r=t.red/255,i=t.green/255,u=t.blue/255,a=Math.min(r,Math.min(i,u)),c=Math.max(r,Math.max(i,u));return a===c?LS(0,0,100*(o=a)):(e=60*((e=r===a?3:u===a?1:5)-(r===a?i-u:u===a?r-i:u-r)/(c-a)),n=(c-a)/c,o=c,LS(Math.round(e),Math.round(100*n),Math.round(100*o)))},PS=function(t){return dS(xS(t))},US=function(t){return(n=t,cS(n)?z.some({value:sS(n)}):z.none()).orThunk((function(){return kS(t).map(dS)})).getOrThunk((function(){var n=document.createElement("canvas");n.height=1,n.width=1;var e=n.getContext("2d");e.clearRect(0,0,n.width,n.height),e.fillStyle="#FFFFFF",e.fillStyle=t,e.fillRect(0,0,1,1);var o=e.getImageData(0,0,1,1).data,r=o[0],i=o[1],u=o[2],a=o[3];return dS(bS(r,i,u,a))}));var n},WS="forecolor",jS="hilitecolor",GS=function(t){for(var n=[],e=0;e<t.length;e+=2)n.push({text:t[e+1],value:"#"+US(t[e]).value,icon:"checkmark",type:"choiceitem"});return n},qS=function(t){return function(n){return n.options.get(t)}},YS="#000000",XS=function(t,n){return n===WS&&t.options.isSet("color_map_foreground")?qS("color_map_foreground")(t):n===jS&&t.options.isSet("color_map_background")?qS("color_map_background")(t):qS("color_map")(t)},KS=function(t,n){return void 0===n&&(n="default"),Math.max(5,Math.ceil(Math.sqrt(XS(t,n).length)))},JS=function(t,n){var e=qS("color_cols")(t),o=KS(t,n);return e===KS(t)?o:e},$S=function(t,n){void 0===n&&(n="default");return Math.round(n===WS?qS("color_cols_foreground")(t):n===jS?qS("color_cols_background")(t):qS("color_cols")(t))},ZS=qS("custom_colors"),QS=qS("color_default_foreground"),tk=qS("color_default_background"),nk=function(t){return ti(t,(function(t){if(tn(t)){var n=Gn(t,"background-color");return Ft(function(t){return kS(t).exists((function(t){return 0!==t.alpha}))}(n),n)}return z.none()})).getOr("rgba(0, 0, 0, 0)")},ek=function(t,n){var e=Gt.fromDom(t.selection.getStart()),o="hilitecolor"===n?nk(e):Gn(e,"color");return kS(o).map((function(t){return"#"+dS(t).value}))},ok=function(t){var n="choiceitem",e={type:n,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return t?[e,{type:n,text:"Custom color",icon:"color-picker",value:"custom"}]:[e]},rk=function(t,n,e,o){"custom"===e?mk(t)((function(e){e.each((function(e){zS(n,e),t.execCommand("mceApplyTextcolor",n,e),o(e)}))}),ek(t,n).getOr(YS)):"remove"===e?(o(""),t.execCommand("mceRemoveTextcolor",n)):(o(e),t.execCommand("mceApplyTextcolor",n,e))},ik=function(t,n,e){return t.concat(function(t){return K(VS(t).state(),(function(t){return{type:"choiceitem",text:t,icon:"checkmark",value:t}}))}(n).concat(ok(e)))},uk=function(t,n,e){return function(o){o(ik(t,n,e))}},ak=function(t,n,e){var o="forecolor"===n?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";t.setIconFill(o,e)},ck=function(t,n){t.setTooltip(n)},sk=function(t,n){return function(e){var o=ek(t,n);return At(o,e.toUpperCase())}},lk=function(t,n,e){if(Ut(e))return"forecolor"===n?"Text color":"Background color";var o="forecolor"===n?"Text color {0}":"Background color {0}",r=ik(XS(t,n),n,!1),i=nt(r,(function(t){return t.value===e})).getOr({text:""}).text;return t.translate([o,t.translate(i)])},fk=function(t,n,e,o){t.ui.registry.addSplitButton(n,{tooltip:lk(t,e,o.get()),presets:"color",icon:"forecolor"===n?"text-color":"highlight-bg-color",select:sk(t,e),columns:$S(t,e),fetch:uk(XS(t,e),e,ZS(t)),onAction:function(n){rk(t,e,o.get(),_)},onItemAction:function(r,i){rk(t,e,i,(function(e){o.set(e),TS(t,{name:n,color:e})}))},onSetup:function(r){ak(r,n,o.get());var i=function(o){o.name===n&&(ak(r,o.name,o.color),ck(r,lk(t,e,o.color)))};return t.on("TextColorChange",i),DS(AS(t)(r),(function(){t.off("TextColorChange",i)}))}})},dk=function(t,n,e,o,r){t.ui.registry.addNestedMenuItem(n,{text:o,icon:"forecolor"===n?"text-color":"highlight-bg-color",onSetup:function(o){return ck(o,lk(t,e,r.get())),ak(o,n,r.get()),AS(t)(o)},getSubmenuItems:function(){return[{type:"fancymenuitem",fancytype:"colorswatch",select:sk(t,e),initData:{storageKey:e},onAction:function(o){rk(t,e,o.value,(function(e){r.set(e),TS(t,{name:n,color:e})}))}}]}})},mk=function(t){return function(n,e){var o=!1,r={colorpicker:e};t.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r,onAction:function(t,n){"hex-valid"===n.name&&(o=n.value)},onSubmit:function(e){var r=e.getData().colorpicker;o?(n(z.from(r)),e.close()):t.windowManager.alert(t.translate(["Invalid hex color code: {0}",r]))},onClose:_,onCancel:function(){n(z.none())}})}},gk=function(t,n,e,o,r,i,u,a){var c=ux(n),s=pk(n,e,o,"color"!==r?"normal":"color",i,u,a);return sx(t,c,s,o,{menuType:r})},pk=function(t,n,e,o,r,i,u){return Mt(K(t,(function(a){return"choiceitem"===a.type?(c=a,lr("choicemenuitem",cw,c)).fold(ax,(function(a){return z.some(function(t,n,e,o,r,i,u,a){void 0===a&&(a=!0);var c=tS({presets:e,textContent:n?t.text:z.none(),htmlContent:z.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:n?t.shortcut:z.none(),checkMark:n?z.some($w(u.icons)):z.none(),caret:z.none(),value:t.value},u,a);return Ao(Ww({data:jw(t),enabled:t.enabled,getApi:function(t){return{setActive:function(n){sh.set(t,n)},isActive:function(){return sh.isOn(t)},isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)}}},onAction:function(n){return o(t.value)},onSetup:function(t){return t.setActive(r),_},triggersSubmenu:!1,itemBehaviours:[]},c,i,u),{toggling:{toggleClass:Dy,toggleOnExecute:!1,selected:t.active,exclusive:!0}})}(a,1===e,o,n,i(a.value),r,u,ux(t)))})):z.none();var c})))},hk=function(t,n){var e=Ly(n);return 1===t?{mode:"menu",moveOnTab:!0}:"auto"===t?{mode:"grid",selector:"."+e.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===n?"tox-swatches__row":"tox-collection__group"),previousSelector:function(t){return"color"===n?ja(t.element,"[aria-checked=true]"):z.none()}}},vk=function(t,n){var e=t.initData.allowCustomColors&&n.colorinput.hasCustomColors();return t.initData.colors.fold((function(){return ik(n.colorinput.getColors(t.initData.storageKey),t.initData.storageKey,e)}),(function(t){return t.concat(ok(e))}))},bk=Du("cell-over"),yk=Du("cell-execute"),xk=function(t,n,e){var o,r=function(e){return nu(e,yk,{row:t,col:n})},i=function(t,n){n.stop(),r(t)};return Na({dom:{tag:"div",attributes:(o={role:"button"},o["aria-label"]=e,o)},behaviours:es([Jp("insert-table-picker-cell",[su(gi(),nh.focus),su(Bi(),r),su(wi(),i),su(Fi(),i)]),sh.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),nh.config({onFocus:function(e){return nu(e,bk,{row:t,col:n})}})])})},wk=function(t){return rt(t,(function(t){return K(t,Va)}))},Sk=function(t,n){return Ba("".concat(n,"x").concat(t))},kk={inserttable:function(t,n){var e=function(t){return function(n,e){return t.shared.providers.translate(["{0} columns, {1} rows",e,n])}}(n),o=function(t,n,e){for(var o=[],r=0;r<n;r++){for(var i=[],u=0;u<e;u++){var a=t(r+1,u+1);i.push(xk(r,u,a))}o.push(i)}return o}(e,10,10),r=Sk(0,0),i=jh({dom:{tag:"span",classes:["tox-insert-table-picker__label"]},components:[r],behaviours:es([Kp.config({})])});return{type:"widget",data:{value:Du("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[rS.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:wk(o).concat(i.asSpec()),behaviours:es([Jp("insert-table-picker",[vu((function(t){Kp.set(i.get(t),[r])})),mu(bk,(function(t,n,e){var r=e.event,u=r.row,a=r.col;!function(t,n,e,o,r){for(var i=0;i<o;i++)for(var u=0;u<r;u++)sh.set(t[i][u],i<=n&&u<=e)}(o,u,a,10,10),Kp.set(i.get(t),[Sk(u+1,a+1)])})),mu(yk,(function(n,e,o){var r=o.event,i=r.row,u=r.col;t.onAction({numRows:i+1,numColumns:u+1}),tu(n,Ni())}))]),Hp.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:function(t,n){var o=vk(t,n),r=n.colorinput.getColorCols(t.initData.storageKey),i="color",u=gk(Du("menu-value"),o,(function(n){t.onAction({value:n})}),r,i,Oy.CLOSE_ON_EXECUTE,t.select.getOr(N),n.shared.providers),a=e(e({},u),{markers:Ly(i),movement:hk(r,i)});return{type:"widget",data:{value:Du("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[rS.widget(Mh.sketch(a))]}}},Ok=function(t,n,e,o,r,i,u,a){void 0===a&&(a=!0);var c=tS({presets:o,textContent:z.none(),htmlContent:e?t.text.map((function(t){return eS(t,n)})):z.none(),ariaLabel:t.text,iconContent:t.icon,shortcutContent:z.none(),checkMark:z.none(),caret:z.none(),value:t.value},u.providers,a,t.icon);return Ww({data:jw(t),enabled:t.enabled,getApi:D({}),onAction:function(n){return r(t.value,t.meta)},onSetup:D(_),triggersSubmenu:!1,itemBehaviours:nS(t.meta,u)},c,i,u.providers)},Ck=function(t){return{type:"separator",dom:{tag:"div",classes:[_y,"tox-collection__group-heading"]},components:t.text.map(Ba).toArray()}},_k=function(t,n,e,o){void 0===o&&(o=!0);var r=tS({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:z.none(),ariaLabel:t.text,caret:z.none(),checkMark:z.none(),shortcutContent:t.shortcut},e,o);return Ww({data:jw(t),getApi:function(t){return{isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)}}},enabled:t.enabled,onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e)},Tk=function(t,n,e,o,r){void 0===o&&(o=!0),void 0===r&&(r=!1);var i,u=r?(i=e.icons,qw("chevron-down",i,[By])):function(t){return qw("chevron-right",t,[By])}(e.icons),a=tS({presets:"normal",iconContent:t.icon,textContent:t.text,htmlContent:z.none(),ariaLabel:t.text,caret:z.some(u),checkMark:z.none(),shortcutContent:t.shortcut},e,o);return Ww({data:jw(t),getApi:function(t){return{isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)},setIconFill:function(n,e){ja(t.element,'svg path[class="'.concat(n,'"], rect[class="').concat(n,'"]')).each((function(t){Fn(t,"fill",e)}))},setTooltip:function(n){var o=e.translate(n);Rn(t.element,{"aria-label":o,title:o})}}},enabled:t.enabled,onAction:_,onSetup:t.onSetup,triggersSubmenu:!0,itemBehaviours:[]},a,n,e)},Ek=function(t,n,e,o){void 0===o&&(o=!0);var r=tS({iconContent:t.icon,textContent:t.text,htmlContent:z.none(),ariaLabel:t.text,checkMark:z.some($w(e.icons)),caret:z.none(),shortcutContent:t.shortcut,presets:"normal",meta:t.meta},e,o);return Ao(Ww({data:jw(t),enabled:t.enabled,getApi:function(t){return{setActive:function(n){sh.set(t,n)},isActive:function(){return sh.isOn(t)},isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,n,e),{toggling:{toggleClass:Dy,toggleOnExecute:!1,selected:t.active}})},Dk=function(t,n){return Tt(kk,t.fancytype).map((function(e){return e(t,n)}))},Ak=function(t,n,o,r){var i={dom:Qw(t.label),optComponents:[z.some({dom:{tag:"div",classes:[Fy,Ry]},components:oS(t.items,r)})]};return Ww({data:jw(e({text:z.none()},t)),enabled:t.enabled,getApi:function(t){return{isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){Bm.set(t,!n),J(Rl(t.element,"*"),(function(e){t.getSystem().getByDom(e).each((function(t){t.hasConfigured(Bm)&&Bm.set(t,!n)}))}))}}},onAction:t.onAction,onSetup:t.onSetup,triggersSubmenu:!1,itemBehaviours:z.from(r.itemBehaviours).getOr([])},i,n,o.providers)},Mk=Object.freeze({__proto__:null,getCoupled:function(t,n,e,o){return e.getOrCreate(t,n,o)},getExistingCoupled:function(t,n,e,o){return e.getExisting(t,n,o)}}),Bk=[xr("others",sr(mo.value,Zo()))],Ik=Object.freeze({__proto__:null,init:function(){var t={},n=function(n,e){if(0===ht(n.others).length)throw new Error("Cannot find any known coupled components");return Tt(t,e)},e=D({});return Yu({readState:e,getExisting:function(t,e,o){return n(e,o).orThunk((function(){return Tt(e.others,o).getOrDie("No information found for coupled component: "+o),z.none()}))},getOrCreate:function(e,o,r){return n(o,r).getOrThunk((function(){var n=Tt(o.others,r).getOrDie("No information found for coupled component: "+r)(e),i=e.getSystem().build(n);return t[r]=i,i}))}})}}),Fk=rs({fields:Bk,name:"coupling",apis:Mk,state:Ik}),Rk=function(t){var n=z.none(),e=[],o=function(t){r()?u(t):e.push(t)},r=function(){return n.isSome()},i=function(t){J(t,u)},u=function(t){n.each((function(n){setTimeout((function(){t(n)}),0)}))};return t((function(t){r()||(n=z.some(t),i(e),e=[])})),{get:o,map:function(t){return Rk((function(n){o((function(e){n(t(e))}))}))},isReady:r}},Nk={nu:Rk,pure:function(t){return Rk((function(n){n(t)}))}},Vk=function(t){setTimeout((function(){throw t}),0)},zk=function(t){var n=function(n){t().then(n,Vk)};return{map:function(n){return zk((function(){return t().then(n)}))},bind:function(n){return zk((function(){return t().then((function(t){return n(t).toPromise()}))}))},anonBind:function(n){return zk((function(){return t().then((function(){return n.toPromise()}))}))},toLazy:function(){return Nk.nu(n)},toCached:function(){var n=null;return zk((function(){return null===n&&(n=t()),n}))},toPromise:t,get:n}},Lk=function(t){return zk((function(){return new Promise(t)}))},Hk=function(t){return zk((function(){return Promise.resolve(t)}))},Pk=D("sink"),Uk=D(Pd({name:Pk(),overrides:D({dom:{tag:"div"},behaviours:es([hf.config({useFixed:V})]),events:uu([gu(vi()),gu(li()),gu(wi())])})})),Wk=function(t,n){var e=t.getHotspot(n).getOr(n),o="hotspot",r=t.getAnchorOverrides();return t.layouts.fold((function(){return{type:o,hotspot:e,overrides:r}}),(function(t){return{type:o,hotspot:e,overrides:r,layouts:t}}))},jk=function(t,n,o,r,i,u,a){var c=function(t,n,o,r,i,u,a){var c=function(t,n,e){return(0,t.fetch)(e).map(n)}(t,n,r),s=Xk(r,t);return c.map((function(t){return t.bind((function(t){return z.from(Lh.sketch(e(e({},u.menu()),{uid:Nu(""),data:t,highlightOnOpen:a,onOpenMenu:function(t,n){var e=s().getOrDie();hf.position(e,n,{anchor:o}),Wf.decloak(i)},onOpenSubmenu:function(t,n,e){var o=s().getOrDie();hf.position(o,e,{anchor:{type:"submenu",item:n}}),Wf.decloak(i)},onRepositionMenu:function(t,n,e){var r=s().getOrDie();hf.position(r,n,{anchor:o}),J(e,(function(t){hf.position(r,t.triggeredMenu,{anchor:{type:"submenu",item:t.triggeringItem}})}))},onEscape:function(){return nh.focus(r),Wf.close(i),z.some(!0)}})))}))}))}(t,n,Wk(t,o),o,r,i,a);return c.map((function(t){return t.fold((function(){Wf.isOpen(r)&&Wf.close(r)}),(function(t){Wf.cloak(r),Wf.open(r,t),u(r)})),r}))},Gk=function(t,n,e,o,r,i,u){return Wf.close(o),Hk(o)},qk=function(t,n,e,o,r,i){var u=Fk.getCoupled(e,"sandbox");return(Wf.isOpen(u)?Gk:jk)(t,n,e,u,o,r,i)},Yk=function(t,n,e){var o=bm.getCurrent(n).getOr(n),r=ce(t.element);e?Un(o.element,"min-width",r+"px"):function(t,n){ae.set(t,n)}(o.element,r)},Xk=function(t,n){return t.getSystem().getByUid(n.uid+"-"+Pk()).map((function(t){return function(){return mo.value(t)}})).getOrThunk((function(){return n.lazySink.fold((function(){return function(){return mo.error(new Error("No internal sink is specified, nor could an external sink be found"))}}),(function(n){return function(){return n(t)}}))}))},Kk=function(t){Wf.getState(t).each((function(t){Lh.repositionMenus(t)}))},Jk=function(t,n,o){var r=Ya(),i=Xk(n,t);return{dom:{tag:"div",classes:t.sandboxClasses,attributes:{id:r.id,role:"listbox"}},behaviours:gd(t.sandboxBehaviours,[sd.config({store:{mode:"memory",initialValue:n}}),Wf.config({onOpen:function(e,i){var u=Wk(t,n);r.link(n.element),t.matchWidth&&Yk(u.hotspot,i,t.useMinWidth),t.onOpen(u,e,i),void 0!==o&&void 0!==o.onOpen&&o.onOpen(e,i)},onClose:function(t,e){r.unlink(n.element),void 0!==o&&void 0!==o.onClose&&o.onClose(t,e)},isPartOf:function(t,e,o){return Ka(e,o)||Ka(n,o)},getAttachPoint:function(){return i().getOrDie()}}),bm.config({find:function(t){return Wf.getState(t).bind((function(t){return bm.getCurrent(t)}))}}),cs.config({channels:e(e({},Xf({isExtraPart:N})),Jf({doReposition:Kk}))})])}},$k=function(t){var n=Fk.getCoupled(t,"sandbox");Kk(n)},Zk=function(){return[Nr("sandboxClasses",[]),md("sandboxBehaviours",[bm,cs,Wf,sd])]},Qk=D([yr("dom"),yr("fetch"),sc("onOpen"),lc("onExecute"),Nr("getHotspot",z.some),Nr("getAnchorOverrides",D({})),ul(),ld("dropdownBehaviours",[sh,Fk,Hp,nh]),yr("toggleClass"),Nr("eventOrder",{}),Er("lazySink"),Nr("matchWidth",!1),Nr("useMinWidth",!1),Er("role")].concat(Zk())),tO=D([Hd({schema:[uc(),Nr("fakeFocus",!1)],name:"menu",defaults:function(t){return{onExecute:t.onExecute}}}),Uk()]),nO=gm({name:"Dropdown",configFields:Qk(),partFields:tO(),factory:function(t,n,o,r){var i,u,a=function(t){Wf.getState(t).each((function(t){Lh.highlightPrimary(t)}))},c=function(n,e,o){return qk(t,A,n,r,e,o)},s={expand:function(t){sh.isOn(t)||c(t,_,mg.HighlightNone).get(_)},open:function(t){sh.isOn(t)||c(t,_,mg.HighlightMenuAndItem).get(_)},refetch:function(n){return Fk.getExistingCoupled(n,"sandbox").fold((function(){return c(n,_,mg.HighlightMenuAndItem).map(_)}),(function(e){return jk(t,A,n,e,r,_,mg.HighlightMenuAndItem).map(_)}))},isOpen:sh.isOn,close:function(t){sh.isOn(t)&&c(t,_,mg.HighlightMenuAndItem).get(_)},repositionMenus:function(t){sh.isOn(t)&&$k(t)}},l=function(t,n){return eu(t),z.some(!0)};return{uid:t.uid,dom:t.dom,components:n,behaviours:dd(t.dropdownBehaviours,[sh.config({toggleClass:t.toggleClass,aria:{mode:"expanded"}}),Fk.config({others:{sandbox:function(n){return Jk(t,n,{onOpen:function(){return sh.on(n)},onClose:function(){return sh.off(n)}})}}}),Hp.config({mode:"special",onSpace:l,onEnter:l,onDown:function(t,n){if(nO.isOpen(t)){var e=Fk.getCoupled(t,"sandbox");a(e)}else nO.open(t);return z.some(!0)},onEscape:function(t,n){return nO.isOpen(t)?(nO.close(t),z.some(!0)):z.none()}}),nh.config({})]),events:fh(z.some((function(t){c(t,a,mg.HighlightMenuAndItem).get(_)}))),eventOrder:e(e({},t.eventOrder),(i={},i[Bi()]=["disabling","toggling","alloy.base.behaviour"],i)),apis:s,domModification:{attributes:e(e({"aria-haspopup":"true"},t.role.fold((function(){return{}}),(function(t){return{role:t}}))),"button"===t.dom.tag?{type:(u="type",Tt(t.dom,"attributes").bind((function(t){return Tt(t,u)}))).getOr("button")}:{})}}},apis:{open:function(t,n){return t.open(n)},refetch:function(t,n){return t.refetch(n)},expand:function(t,n){return t.expand(n)},close:function(t,n){return t.close(n)},isOpen:function(t,n){return t.isOpen(n)},repositionMenus:function(t,n){return t.repositionMenus(n)}}}),eO=function(t){var n=sd.getValue(t),e=$y(t).map(Qy);nO.refetch(n).get((function(){var t=Fk.getCoupled(n,"sandbox");e.each((function(n){return $y(t).each((function(t){return function(t,n){sd.setValue(t,n.fetchPattern),t.element.dom.selectionStart=n.selectionStart,t.element.dom.selectionEnd=n.selectionEnd}(t,n)}))}))}))},oO=function(t,n){rO(t).each((function(o){!function(t,n,o,r){var i=e(e({},r),{target:n});t.getSystem().triggerEvent(o,n,i)}(t,o.element,n.event.eventType,n.event.interactionEvent)}))},rO=function(t){return Wf.getState(t).bind(Wm.getHighlighted).bind(Wm.getHighlighted)},iO=function(t,n,e){Zy(t).each((function(t){var o;!function(t,n){Vn(n.element,"id").each((function(n){return Fn(t.element,"aria-activedescendant",n)}))}(t,e),(ga((o=n).element,tx)?z.some(o.element):ja(o.element,"."+tx)).each((function(n){Vn(n,"id").each((function(n){return Fn(t.element,"aria-controls",n)}))}))})),Fn(e.element,"aria-selected","true")},uO=function(t,n,e){Fn(e.element,"aria-selected","false")},aO=function(t){return Fk.getExistingCoupled(t,"sandbox").bind($y).map(Qy).map((function(t){return t.fetchPattern})).getOr("")};!function(t){t[t.ContentFocus=0]="ContentFocus",t[t.UiFocus=1]="UiFocus"}(ky||(ky={}));var cO,sO=function(t,n,o,r,i){var u,a=o.shared.providers,c=function(t){return i?e(e({},t),{shortcut:z.none(),icon:t.text.isSome()?z.none():t.icon}):t};switch(t.type){case"menuitem":return(u=t,lr("menuitem",mw,u)).fold(ax,(function(t){return z.some(_k(c(t),n,a,r))}));case"nestedmenuitem":return function(t){return lr("nestedmenuitem",gw,t)}(t).fold(ax,(function(t){return z.some(Tk(c(t),n,a,r,i))}));case"togglemenuitem":return function(t){return lr("togglemenuitem",pw,t)}(t).fold(ax,(function(t){return z.some(Ek(c(t),n,a,r))}));case"separator":return function(t){return lr("separatormenuitem",zx,t)}(t).fold(ax,(function(t){return z.some(Ck(t))}));case"fancymenuitem":return function(t){return lr("fancymenuitem",dw,t)}(t).fold(ax,(function(t){return Dk(t,o)}));default:return console.error("Unknown item in general menu",t),z.none()}},lO=function(t,n,o,r,i,u,a){var c=1===r,s=!c||ux(t);return Mt(K(t,(function(t){switch(t.type){case"separator":return(r=t,lr("Autocompleter.Separator",zx,r)).fold(ax,(function(t){return z.some(Ck(t))}));case"cardmenuitem":return function(t){return lr("cardmenuitem",aw,t)}(t).fold(ax,(function(t){return z.some(Ak(e(e({},t),{onAction:function(n){t.onAction(n),o(t.value,t.meta)}}),i,u,{itemBehaviours:nS(t.meta,u),cardText:{matchText:n,highlightOn:a}}))}));default:return function(t){return lr("Autocompleter.Item",Lx,t)}(t).fold(ax,(function(t){return z.some(Ok(t,n,c,"normal",o,i,u,s))}))}var r})))},fO=function(t,n,o,r,i,u){var a=ux(n),c=Mt(K(n,(function(t){var n=function(t){return sO(t,o,r,function(t){return i?!Et(t,"text"):a}(t),i)};return"nestedmenuitem"===t.type&&t.getSubmenuItems().length<=0?n(e(e({},t),{enabled:!1})):n(t)}))),s=function(t){return"no-search"===t.searchMode?{menuType:"normal"}:{menuType:"searchable",searchMode:t}}(u);return(i?cx:sx)(t,a,c,1,s)},dO=function(t){return Lh.singleData(t.value,t)},mO=function(t,n){var o=Du("autocompleter"),r=Gr(!1),i=Gr(!1),u=Na(Hh.sketch({dom:{tag:"div",classes:["tox-autocompleter"],attributes:{id:o}},components:[],fireDismissalEventInstead:{},inlineBehaviours:es([Jp("dismissAutocompleter",[su(Gi(),(function(){return f()})),su(Zi(),(function(n,e){Vn(e.event.target,"id").each((function(n){return Fn(Gt.fromDom(t.getBody()),"aria-activedescendant",n)}))}))])]),lazySink:n.getSink})),a=function(){return Hh.isOpen(u)},c=i.get,s=function(){if(a()){Hh.hide(u),t.dom.remove(o,!1);var n=Gt.fromDom(t.getBody());Vn(n,"aria-owns").filter((function(t){return t===o})).each((function(){Ln(n,"aria-owns"),Ln(n,"aria-activedescendant")}))}},l=function(){return Hh.getContent(u).bind((function(t){return ft(t.components(),0)}))},f=function(){return t.execCommand("mceAutocompleterClose")},d=function(e){var o=pt(e,(function(t){return z.from(t.columns)})).getOr(1);return rt(e,(function(e){var i=e.items;return lO(i,e.matchText,(function(n,o){var i=t.selection.getRng();(function(t,n){return yy(Gt.fromDom(n.startContainer)).map((function(n){var e=t.createRng();return e.selectNode(n.dom),e}))})(t.dom,i).each((function(i){var u={hide:function(){return f()},reload:function(n){s(),t.execCommand("mceAutocompleterReload",!1,{fetchOptions:n})}};r.set(!0),e.onAction(u,i,n,o),r.set(!1)}))}),o,Oy.BUBBLE_TO_SANDBOX,n,e.highlightOn)}))},m=function(n,o){var r;(r=Gt.fromDom(t.getBody()),ja(r,by)).each((function(r){var i=pt(n,(function(t){return z.from(t.columns)})).getOr(1);Hh.showMenuAt(u,{anchor:{type:"node",root:Gt.fromDom(t.getBody()),node:z.from(r)}},function(t,n,o,r){var i=hk(n,r),u=Ly(r);return{data:dO(e(e({},t),{movement:i,menuBehaviours:bw("auto"!==n?[]:[vu((function(t,n){hw(t,4,u.item).each((function(n){var e=n.numColumns,o=n.numRows;Hp.setGridSize(t,o,e)}))}))])})),menu:{markers:Ly(r),fakeFocus:o===ky.ContentFocus}}}(sx("autocompleter-value",!0,o,i,{menuType:"normal"}),i,ky.ContentFocus,"normal"))})),l().each(Wm.highlightFirst)},g=function(n){var e=d(n);e.length>0?(m(n,e),Fn(Gt.fromDom(t.getBody()),"aria-owns",o),t.inline||p()):s()},p=function(){t.dom.get(o)&&t.dom.remove(o,!1);var n=t.getDoc().documentElement,e=t.selection.getNode(),r=function(t){return ku(t,!0)}(u.element);Wn(r,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",top:"".concat(e.offsetTop,"px"),left:"".concat(e.offsetLeft,"px")}),t.dom.add(n,r.dom),ja(r,'[role="menu"]').each((function(t){Jn(t,"position"),Jn(t,"max-height")}))};t.on("AutocompleterStart",(function(t){var n=t.lookupData;i.set(!0),r.set(!1),g(n)})),t.on("AutocompleterUpdate",(function(t){var n=t.lookupData;return g(n)})),t.on("AutocompleterEnd",(function(){s(),i.set(!1),r.set(!1)}));var h={cancelIfNecessary:f,isMenuOpen:a,isActive:c,isProcessingAction:r.get,getMenu:l};xy(h,t)},gO=["visible","hidden","clip"],pO=function(t){return Ht(t).length>0&&!G(gO,t)},hO=function(t){if(Qt(t)){var n=Gn(t,"overflow-x"),e=Gn(t,"overflow-y");return pO(n)||pO(e)}return!1},vO=function(t,n){return py(t)?function(t){var n=Fl(t,hO),e=0===n.length?Tn(t).map(En).map((function(t){return Fl(t,hO)})).getOr([]):n;return dt(e).map((function(t){return{element:t,others:e.slice(1)}}))}(n):z.none()},bO=function(t){var n=u(u([],K(t.others,io),!0),[co()],!1);return function(t,n){return tt(n,(function(t,n){return ao(t,n)}),t)}(io(t.element),n)},yO=function(t,n,e){return Ga(t,n,e).isSome()},xO=function(t,n){var e=null;return{cancel:function(){null!==e&&(clearTimeout(e),e=null)},schedule:function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];e=setTimeout((function(){t.apply(null,o),e=null}),n)}}},wO=function(t){var n=t.raw;return void 0===n.touches||1!==n.touches.length?z.none():z.some(n.touches[0])},SO=function(t){var n=Fs(),e=Gr(!1),o=xO((function(n){t.triggerEvent(Ri(),n),e.set(!0)}),400),r=Jr([{key:ui(),value:function(t){return wO(t).each((function(r){o.cancel();var i={x:r.clientX,y:r.clientY,target:t.target};o.schedule(t),e.set(!1),n.set(i)})),z.none()}},{key:ai(),value:function(t){return o.cancel(),wO(t).each((function(t){n.on((function(e){(function(t,n){var e=Math.abs(t.clientX-n.x),o=Math.abs(t.clientY-n.y);return e>5||o>5})(t,e)&&n.clear()}))})),z.none()}},{key:ci(),value:function(r){o.cancel();return n.get().filter((function(t){return cn(t.target,r.target)})).map((function(n){return e.get()?(r.prevent(),!1):t.triggerEvent(Fi(),r)}))}}]);return{fireIfReady:function(t,n){return Tt(r,n).bind((function(n){return n(t)}))}}},kO=function(t,n){var o=e({stopBackspace:!0},n),r=SO(o),i=K(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(function(n){return Ns(t,n,(function(t){r.fireIfReady(t,n).each((function(n){n&&t.kill()})),o.triggerEvent(n,t)&&t.kill()}))})),u=Fs(),a=Ns(t,"paste",(function(t){r.fireIfReady(t,"paste").each((function(n){n&&t.kill()})),o.triggerEvent("paste",t)&&t.kill(),u.set(setTimeout((function(){o.triggerEvent(Ai(),t)}),0))})),c=Ns(t,"keydown",(function(t){o.triggerEvent("keydown",t)?t.kill():o.stopBackspace&&function(t){return t.raw.which===jm[0]&&!G(["input","textarea"],$t(t.target))&&!yO(t.target,'[contenteditable="true"]')}(t)&&t.prevent()})),s=Ns(t,"focusin",(function(t){o.triggerEvent("focusin",t)&&t.kill()})),l=Fs(),f=Ns(t,"focusout",(function(t){o.triggerEvent("focusout",t)&&t.kill(),l.set(setTimeout((function(){o.triggerEvent(Di(),t)}),0))}));return{unbind:function(){J(i,(function(t){t.unbind()})),c.unbind(),s.unbind(),f.unbind(),a.unbind(),u.on(clearTimeout),l.on(clearTimeout)}}},OO=function(t,n){var e=Tt(t,"target").getOr(n);return Gr(e)},CO=qr([{stopped:[]},{resume:["element"]},{complete:[]}]),_O=function(t,n,e,o,r,i){var u=t(n,o),a=function(t,n){var e=Gr(!1),o=Gr(!1);return{stop:function(){e.set(!0)},cut:function(){o.set(!0)},isStopped:e.get,isCut:o.get,event:t,setSource:n.set,getSource:n.get}}(e,r);return u.fold((function(){return i.logEventNoHandlers(n,o),CO.complete()}),(function(t){var e=t.descHandler;return Ju(e)(a),a.isStopped()?(i.logEventStopped(n,t.element,e.purpose),CO.stopped()):a.isCut()?(i.logEventCut(n,t.element,e.purpose),CO.complete()):gn(t.element).fold((function(){return i.logNoParent(n,t.element,e.purpose),CO.complete()}),(function(o){return i.logEventResponse(n,t.element,e.purpose),CO.resume(o)}))}))},TO=function(t,n,e,o,r,i){return _O(t,n,e,o,r,i).fold(V,(function(o){return TO(t,n,e,o,r,i)}),N)},EO=function(t,n,e){var o=function(t){var n=Gr(!1);return{stop:function(){n.set(!0)},cut:_,isStopped:n.get,isCut:N,event:t,setSource:F("Cannot set source of a broadcasted event"),getSource:F("Cannot get source of a broadcasted event")}}(n);return J(t,(function(t){var n=t.descHandler;Ju(n)(o)})),o.isStopped()},DO=function(t,n,e,o,r){var i=OO(e,o);return TO(t,n,e,o,i,r)},AO=function(){var t={};return{registerId:function(n,e,o){bt(o,(function(o,r){var i=void 0!==t[r]?t[r]:{};i[e]=function(t,n){return e=B.apply(void 0,[t.handler].concat(n)),o=t.purpose,{cHandler:e,purpose:o};var e,o}(o,n),t[r]=i}))},unregisterId:function(n){bt(t,(function(t,e){Et(t,n)&&delete t[n]}))},filterByType:function(n){return Tt(t,n).map((function(t){return Ot(t,(function(t,n){return function(t,n){return{id:t,descHandler:n}}(n,t)}))})).getOr([])},find:function(n,e,o){return Tt(t,e).bind((function(t){return ti(o,(function(n){return function(t,n){return Ru(n).bind((function(n){return Tt(t,n)})).map((function(t){return function(t,n){return{element:t,descHandler:n}}(n,t)}))}(t,n)}),n)}))}}},MO=function(){var t=AO(),n={},e=function(t){var n=t.element;return Ru(n).getOrThunk((function(){return function(t,n){var e=Du(Bu+t);return Fu(n,e),e}("uid-",t.element)}))},o=function(e){Ru(e.element).each((function(e){delete n[e],t.unregisterId(e)}))};return{find:function(n,e,o){return t.find(n,e,o)},filter:function(n){return t.filterByType(n)},register:function(r){var i=e(r);Dt(n,i)&&function(t,e){var r=n[e];if(r!==t)throw new Error('The tagId "'+e+'" is already used by: '+Cu(r.element)+"\nCannot use it for: "+Cu(t.element)+"\nThe conflicting element is"+(An(r.element)?" ":" not ")+"already in the DOM");o(t)}(r,i);var u=[r];t.registerId(u,i,r.events),n[i]=r},unregister:o,getById:function(t){return Tt(n,t)}}},BO=mm({name:"Container",factory:function(t){var n=t.dom,o=n.attributes,r=i(n,["attributes"]);return{uid:t.uid,dom:e({tag:"div",attributes:e({role:"presentation"},o)},r),components:t.components,behaviours:fd(t.containerBehaviours),events:t.events,domModification:t.domModification,eventOrder:t.eventOrder}},configFields:[Nr("components",[]),ld("containerBehaviours",[]),Nr("events",{}),Nr("domModification",{}),Nr("eventOrder",{})]}),IO=function(t){var n=function(n){return gn(t.element).fold(V,(function(t){return cn(n,t)}))},e=MO(),o=function(t,o){return e.find(n,t,o)},r=kO(t.element,{triggerEvent:function(t,n){return tc(t,n.target,(function(e){return function(t,n,e,o){return DO(t,n,e,e.target,o)}(o,t,n,e)}))}}),i={debugInfo:D("real"),triggerEvent:function(t,n,e){tc(t,n,(function(r){return DO(o,t,e,n,r)}))},triggerFocus:function(t,n){Ru(t).fold((function(){ls(t)}),(function(e){tc(Ei(),t,(function(e){return function(t,n,e,o,r){var i=OO(e,o);_O(t,n,e,o,i,r)}(o,Ei(),{originator:n,kill:_,prevent:_,target:t},t,e),!1}))}))},triggerEscape:function(t,n){i.triggerEvent("keydown",t.element,n.event)},getByUid:function(t){return g(t)},getByDom:function(t){return p(t)},build:Na,buildOrPatch:Ra,addToGui:function(t){c(t)},removeFromGui:function(t){s(t)},addToWorld:function(t){u(t)},removeFromWorld:function(t){a(t)},broadcast:function(t){f(t)},broadcastOn:function(t,n){d(t,n)},broadcastEvent:function(t,n){m(t,n)},isConnected:V},u=function(t){t.connect(i),nn(t.element)||(e.register(t),J(t.components(),u),i.triggerEvent(zi(),t.element,{target:t.element}))},a=function(t){nn(t.element)||(J(t.components(),a),e.unregister(t)),t.disconnect()},c=function(n){Of(t,n)},s=function(t){Tf(t)},l=function(t){var n=e.filter(Mi());J(n,(function(n){var e=n.descHandler;Ju(e)(t)}))},f=function(t){l({universal:!0,data:t})},d=function(t,n){l({universal:!1,channels:t,data:n})},m=function(t,n){var o=e.filter(t);return EO(o,n)},g=function(t){return e.getById(t).fold((function(){return mo.error(new Error('Could not find component with uid: "'+t+'" in system.'))}),mo.value)},p=function(t){var n=Ru(t).getOr("not found");return g(n)};return u(t),{root:t,element:t.element,destroy:function(){r.unbind(),Ke(t.element)},add:c,remove:s,getByUid:g,getByDom:p,addToWorld:u,removeFromWorld:a,broadcast:f,broadcastOn:d,broadcastEvent:m}},FO=D([Nr("prefix","form-field"),ld("fieldBehaviours",[bm,sd])]),RO=D([Pd({schema:[yr("dom")],name:"label"}),Pd({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[yr("text")],name:"aria-descriptor"}),Ld({factory:{sketch:function(t){var n=Xr(t,["factory"]);return t.factory.sketch(n)}},schema:[yr("factory")],name:"field"})]),NO=gm({name:"FormField",configFields:FO(),partFields:RO(),factory:function(t,n,e,o){var r=dd(t.fieldBehaviours,[bm.config({find:function(n){return Qd(n,t,"field")}}),sd.config({store:{mode:"manual",getValue:function(t){return bm.getCurrent(t).bind(sd.getValue)},setValue:function(t,n){bm.getCurrent(t).each((function(t){sd.setValue(t,n)}))}}})]),i=uu([vu((function(n,e){var o=nm(n,t,["label","field","aria-descriptor"]);o.field().each((function(n){var e=Du(t.prefix);o.label().each((function(t){Fn(t.element,"for",e),Fn(n.element,"id",e)})),o["aria-descriptor"]().each((function(e){var o=Du(t.prefix);Fn(e.element,"id",o),Fn(n.element,"aria-describedby",o)}))}))}))]),u={getField:function(n){return Qd(n,t,"field")},getLabel:function(n){return Qd(n,t,"label")}};return{uid:t.uid,dom:t.dom,components:n,behaviours:r,events:i,apis:u}},apis:{getField:function(t,n){return t.getField(n)},getLabel:function(t,n){return t.getLabel(n)}}}),VO=Object.freeze({__proto__:null,exhibit:function(t,n){return Ku({attributes:Jr([{key:n.tabAttr,value:"true"}])})}}),zO=[Nr("tabAttr","data-alloy-tabstop")],LO=rs({fields:zO,name:"tabstopping",active:VO}),HO=tinymce.util.Tools.resolve("tinymce.html.Entities"),PO=function(t,n,e,o){var r=UO(t,n,e,o);return NO.sketch(r)},UO=function(t,n,e,o){return{dom:WO(e),components:t.toArray().concat([n]),fieldBehaviours:es(o)}},WO=function(t){return{tag:"div",classes:["tox-form__group"].concat(t)}},jO=function(t,n){return NO.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ba(n.translate(t))]})},GO=Du("form-component-change"),qO=Du("form-close"),YO=Du("form-cancel"),XO=Du("form-action"),KO=Du("form-submit"),JO=Du("form-block"),$O=Du("form-unblock"),ZO=Du("form-tabchange"),QO=Du("form-resize"),tC=function(t,n,e){var o,r,i,u=t.label.map((function(t){return jO(t,n)})),a=n.icons(),c=function(t){return function(n,e){Ga(e.event.target,"[data-collection-item-value]").each((function(o){t(n,e,o,Nn(o,"data-collection-item-value"))}))}},s=function(e,o){var r=K(o,(function(e){var o=Zv.translate(e.text),r=1===t.columns?'<div class="tox-collection__item-label">'.concat(o,"</div>"):"",i='<div class="tox-collection__item-icon">'.concat(function(t){var n;return null!==(n=a[t])&&void 0!==n?n:t}(e.icon),"</div>"),u={_:" "," - ":" ","-":" "},c=o.replace(/\_| \- |\-/g,(function(t){return u[t]})),s=n.isDisabled()?" tox-collection__item--state-disabled":"";return'<div class="tox-collection__item'.concat(s,'" tabindex="-1" data-collection-item-value="').concat(HO.encodeAllRaw(e.value),'" title="').concat(c,'" aria-label="').concat(c,'">').concat(i).concat(r,"</div>")})),i="auto"!==t.columns&&t.columns>1?X(r,t.columns):[r],u=K(i,(function(t){return'<div class="tox-collection__group">'.concat(t.join(""),"</div>")}));Su(e.element,u.join(""))},l=c((function(e,o,r,i){o.stop(),n.isDisabled()||nu(e,XO,{name:t.name,value:i})})),f=[su(gi(),c((function(t,n,e){ls(e)}))),su(wi(),l),su(Fi(),l),su(pi(),c((function(t,n,e){ja(t.element,"."+Iy).each((function(t){da(t,Iy)})),la(e,Iy)}))),su(hi(),c((function(t){ja(t.element,"."+Iy).each((function(t){da(t,Iy)}))}))),xu(c((function(n,e,o,r){nu(n,XO,{name:t.name,value:r})})))],d=function(t,n){return K(Rl(t.element,".tox-collection__item"),n)},m=NO.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==t.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:A},behaviours:es([Bm.config({disabled:n.isDisabled,onDisabled:function(t){d(t,(function(t){la(t,"tox-collection__item--state-disabled"),Fn(t,"aria-disabled",!0)}))},onEnabled:function(t){d(t,(function(t){da(t,"tox-collection__item--state-disabled"),Ln(t,"aria-disabled")}))}}),Bw(),Kp.config({}),sd.config({store:{mode:"memory",initialValue:e.getOr([])},onSetValue:function(n,e){s(n,e),"auto"===t.columns&&hw(n,5,"tox-collection__item").each((function(t){var e=t.numRows,o=t.numColumns;Hp.setGridSize(n,e,o)})),tu(n,QO)}}),LO.config({}),Hp.config((r=t.columns,i="normal",1===r?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===r?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:"color"===i?".tox-swatches__row":".tox-collection__group",cell:".".concat("color"===i?Ty:_y)}})),Jp("collection-events",f)]),eventOrder:(o={},o[Bi()]=["disabling","alloy.base.behaviour","collection-events"],o)});return PO(u,m,["tox-form__group--collection"],[])},nC=["input","textarea"],eC=function(t){var n=$t(t);return G(nC,n)},oC=function(t,n){var e=n.getRoot(t).getOr(t.element);da(e,n.invalidClass),n.notify.each((function(n){eC(t.element)&&Fn(t.element,"aria-invalid",!1),n.getContainer(t).each((function(t){Su(t,n.validHtml)})),n.onValid(t)}))},rC=function(t,n,e,o){var r=n.getRoot(t).getOr(t.element);la(r,n.invalidClass),n.notify.each((function(n){eC(t.element)&&Fn(t.element,"aria-invalid",!0),n.getContainer(t).each((function(t){Su(t,o)})),n.onInvalid(t,o)}))},iC=function(t,n,e){return n.validator.fold((function(){return Hk(mo.value(!0))}),(function(n){return n.validate(t)}))},uC=function(t,n,e){return n.notify.each((function(n){n.onValidate(t)})),iC(t,n).map((function(e){return t.getSystem().isConnected()?e.fold((function(e){return rC(t,n,0,e),mo.error(e)}),(function(e){return oC(t,n),mo.value(e)})):mo.error("No longer in system")}))},aC=Object.freeze({__proto__:null,markValid:oC,markInvalid:rC,query:iC,run:uC,isInvalid:function(t,n){var e=n.getRoot(t).getOr(t.element);return ga(e,n.invalidClass)}}),cC=Object.freeze({__proto__:null,events:function(t,n){return t.validator.map((function(n){return uu([su(n.onEvent,(function(n){uC(n,t).get(A)}))].concat(n.validateOnLoad?[vu((function(n){uC(n,t).get(_)}))]:[]))})).getOr({})}}),sC=[yr("invalidClass"),Nr("getRoot",z.none),Rr("notify",[Nr("aria","alert"),Nr("getContainer",z.none),Nr("validHtml",""),sc("onValid"),sc("onInvalid"),sc("onValidate")]),Rr("validator",[yr("validate"),Nr("onEvent","input"),Nr("validateOnLoad",!0)])],lC=rs({fields:sC,name:"invalidating",active:cC,apis:aC,extra:{validation:function(t){return function(n){var e=sd.getValue(n);return Hk(t(e))}}}}),fC=Object.freeze({__proto__:null,events:function(){return uu([au(Ci(),V)])},exhibit:function(){return Ku({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})}}),dC=rs({fields:[],name:"unselecting",active:fC}),mC=Du("color-input-change"),gC=Du("color-swatch-change"),pC=Du("color-picker-cancel"),hC=function(t,n,e,o){var r=NO.parts.field({factory:Yy,inputClasses:["tox-textfield"],data:o,onSetValue:function(t){return lC.run(t).get(_)},inputBehaviours:es([Bm.config({disabled:n.providers.isDisabled}),Bw(),LO.config({}),lC.config({invalidClass:"tox-textbox-field-invalid",getRoot:function(t){return pn(t.element)},notify:{onValid:function(t){var n=sd.getValue(t);nu(t,mC,{color:n})}},validator:{validateOnLoad:!1,validate:function(t){var n=sd.getValue(t);if(0===n.length)return Hk(mo.value(!0));var e=Gt.fromTag("span");Un(e,"background-color",n);var o=Yn(e,"background-color").fold((function(){return mo.error("blah")}),(function(t){return mo.value(n)}));return Hk(o)}}})]),selectOnFocus:!1}),i=t.label.map((function(t){return jO(t,n.providers)})),u=function(t,n){nu(t,gC,{value:n})},a=jh(function(t,n){return nO.sketch({dom:t.dom,components:t.components,toggleClass:"mce-active",dropdownBehaviours:es([Fw(n.providers.isDisabled),Bw(),dC.config({}),LO.config({})]),layouts:t.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:n.getSink,fetch:function(e){return Lk((function(n){return t.fetch(n)})).map((function(o){return z.from(dO(Ao(gk(Du("menu-value"),o,(function(n){t.onItemAction(e,n)}),t.columns,t.presets,Oy.CLOSE_ON_EXECUTE,N,n.providers),{movement:hk(t.columns,t.presets)})))}))},parts:{menu:Uy(0,0,t.presets)}})}({dom:{tag:"span",attributes:{"aria-label":n.providers.translate("Color swatch")}},layouts:{onRtl:function(){return[Vc,Nc,Pc]},onLtr:function(){return[Nc,Vc,Pc]}},components:[],fetch:uk(e.getColors(t.storageKey),t.storageKey,e.hasCustomColors()),columns:e.getColorCols(t.storageKey),presets:"color",onItemAction:function(n,o){a.getOpt(n).each((function(n){"custom"===o?e.colorPicker((function(e){e.fold((function(){return tu(n,pC)}),(function(e){u(n,e),zS(t.storageKey,e)}))}),"#ffffff"):u(n,"remove"===o?"":o)}))}},n));return NO.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:i.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,a.asSpec()]}]),fieldBehaviours:es([Jp("form-field-events",[su(mC,(function(n,e){a.getOpt(n).each((function(t){Un(t.element,"background-color",e.event.color)})),nu(n,GO,{name:t.name})})),su(gC,(function(t,n){NO.getField(t).each((function(e){sd.setValue(e,n.event.value),bm.getCurrent(t).each(nh.focus)}))})),su(pC,(function(t,n){NO.getField(t).each((function(n){bm.getCurrent(t).each(nh.focus)}))}))])])})},vC=Pd({schema:[yr("dom")],name:"label"}),bC=function(t){return Pd({name:t+"-edge",overrides:function(n){return n.model.manager.edgeActions[t].fold((function(){return{}}),(function(t){return{events:uu([lu(ui(),(function(n,e,o){return t(n,o)}),[n]),lu(li(),(function(n,e,o){return t(n,o)}),[n]),lu(fi(),(function(n,e,o){o.mouseIsDown.get()&&t(n,o)}),[n])])}}))}})},yC=bC("top-left"),xC=bC("top"),wC=bC("top-right"),SC=bC("right"),kC=bC("bottom-right"),OC=bC("bottom"),CC=bC("bottom-left"),_C=bC("left"),TC=Ld({name:"thumb",defaults:D({dom:{styles:{position:"absolute"}}}),overrides:function(t){return{events:uu([du(ui(),t,"spectrum"),du(ai(),t,"spectrum"),du(ci(),t,"spectrum"),du(li(),t,"spectrum"),du(fi(),t,"spectrum"),du(mi(),t,"spectrum")])}}}),EC=function(t){return ig(t.event)},DC=Ld({schema:[vr("mouseIsDown",(function(){return Gr(!1)}))],name:"spectrum",overrides:function(t){var n=t.model.manager,e=function(e,o){return n.getValueFromEvent(o).map((function(o){return n.setValueFrom(e,t,o)}))};return{behaviours:es([Hp.config({mode:"special",onLeft:function(e,o){return n.onLeft(e,t,EC(o))},onRight:function(e,o){return n.onRight(e,t,EC(o))},onUp:function(e,o){return n.onUp(e,t,EC(o))},onDown:function(e,o){return n.onDown(e,t,EC(o))}}),LO.config({}),nh.config({})]),events:uu([su(ui(),e),su(ai(),e),su(li(),e),su(fi(),(function(n,o){t.mouseIsDown.get()&&e(n,o)}))])}}}),AC=[vC,_C,SC,xC,OC,yC,wC,CC,kC,TC,DC],MC=D("slider.change.value"),BC=function(t){var n=t.event.raw;if(function(t){return-1!==t.type.indexOf("touch")}(n)){var e=n;return void 0!==e.touches&&1===e.touches.length?z.some(e.touches[0]).map((function(t){return oe(t.clientX,t.clientY)})):z.none()}var o=n;return void 0!==o.clientX?z.some(o).map((function(t){return oe(t.clientX,t.clientY)})):z.none()},IC=function(t){return t.model.minX},FC=function(t){return t.model.minY},RC=function(t){return t.model.minX-1},NC=function(t){return t.model.minY-1},VC=function(t){return t.model.maxX},zC=function(t){return t.model.maxY},LC=function(t){return t.model.maxX+1},HC=function(t){return t.model.maxY+1},PC=function(t,n,e){return n(t)-e(t)},UC=function(t){return PC(t,VC,IC)},WC=function(t){return PC(t,zC,FC)},jC=function(t){return UC(t)/2},GC=function(t){return WC(t)/2},qC=function(t,n){return n?t.stepSize*t.speedMultiplier:t.stepSize},YC=function(t){return t.snapToGrid},XC=function(t){return t.snapStart},KC=function(t){return t.rounded},JC=function(t,n){return void 0!==t[n+"-edge"]},$C=function(t){return JC(t,"left")},ZC=function(t){return JC(t,"right")},QC=function(t){return JC(t,"top")},t_=function(t){return JC(t,"bottom")},n_=function(t){return t.model.value.get()},e_=function(t,n){return{x:t,y:n}},o_=function(t,n){nu(t,MC(),{value:n})},r_=function(t,n,e,o){return t<n?t:t>e?e:t===n?n-1:Math.max(n,t-o)},i_=function(t,n,e,o){return t>e?t:t<n?n:t===e?e+1:Math.min(e,t+o)},u_=function(t,n,e){return Math.max(n,Math.min(e,t))},a_=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.step,u=t.snap,a=t.snapStart,c=t.rounded,s=t.hasMinEdge,l=t.hasMaxEdge,f=t.minBound,d=t.maxBound,m=t.screenRange,g=s?n-1:n,p=l?e+1:e;if(r<f)return g;if(r>d)return p;var h=function(t,n,e){return Math.min(e,Math.max(t,n))-n}(r,f,d),v=u_(h/m*o+n,g,p);return u&&v>=n&&v<=e?function(t,n,e,o,r){return r.fold((function(){var r=t-n,i=Math.round(r/o)*o;return u_(n+i,n-1,e+1)}),(function(n){var r=(t-n)%o,i=Math.round(r/o),u=Math.floor((t-n)/o),a=Math.floor((e-n)/o),c=n+Math.min(a,u+i)*o;return Math.max(n,c)}))}(v,n,e,i,a):c?Math.round(v):v},c_=function(t){var n=t.min,e=t.max,o=t.range,r=t.value,i=t.hasMinEdge,u=t.hasMaxEdge,a=t.maxBound,c=t.maxOffset,s=t.centerMinEdge,l=t.centerMaxEdge;return r<n?i?0:s:r>e?u?a:l:(r-n)/o*c},s_="top",l_="right",f_="bottom",d_="left",m_=function(t){return t.element.dom.getBoundingClientRect()},g_=function(t,n){return t[n]},p_=function(t){var n=m_(t);return g_(n,d_)},h_=function(t){var n=m_(t);return g_(n,l_)},v_=function(t){var n=m_(t);return g_(n,s_)},b_=function(t){var n=m_(t);return g_(n,f_)},y_=function(t){var n=m_(t);return g_(n,"width")},x_=function(t){var n=m_(t);return g_(n,"height")},w_=function(t,n,e){return(t+n)/2-e},S_=function(t,n){var e=m_(t),o=m_(n),r=g_(e,d_),i=g_(e,l_),u=g_(o,d_);return w_(r,i,u)},k_=function(t,n){var e=m_(t),o=m_(n),r=g_(e,s_),i=g_(e,f_),u=g_(o,s_);return w_(r,i,u)},O_=function(t,n){nu(t,MC(),{value:n})},C_=function(t,n,e){var o={min:IC(n),max:VC(n),range:UC(n),value:e,step:qC(n),snap:YC(n),snapStart:XC(n),rounded:KC(n),hasMinEdge:$C(n),hasMaxEdge:ZC(n),minBound:p_(t),maxBound:h_(t),screenRange:y_(t)};return a_(o)},__=function(t){return function(n,e,o){return function(t,n,e,o){var r=(t>0?i_:r_)(n_(e),IC(e),VC(e),qC(e,o));return O_(n,r),z.some(r)}(t,n,e,o).map(V)}},T_=function(t,n,e,o,r,i){var u=function(t,n,e,o,r){var i=y_(t),u=o.bind((function(n){return z.some(S_(n,t))})).getOr(0),a=r.bind((function(n){return z.some(S_(n,t))})).getOr(i),c={min:IC(n),max:VC(n),range:UC(n),value:e,hasMinEdge:$C(n),hasMaxEdge:ZC(n),minBound:p_(t),minOffset:0,maxBound:h_(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return c_(c)}(n,i,e,o,r);return p_(n)-p_(t)+u},E_=__(-1),D_=__(1),A_=z.none,M_=z.none,B_={"top-left":z.none(),top:z.none(),"top-right":z.none(),right:z.some((function(t,n){o_(t,LC(n))})),"bottom-right":z.none(),bottom:z.none(),"bottom-left":z.none(),left:z.some((function(t,n){o_(t,RC(n))}))},I_=Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=C_(t,n,e);return O_(t,o),o},setToMin:function(t,n){var e=IC(n);O_(t,e)},setToMax:function(t,n){var e=VC(n);O_(t,e)},findValueOfOffset:C_,getValueFromEvent:function(t){return BC(t).map((function(t){return t.left}))},findPositionOfValue:T_,setPositionFromValue:function(t,n,e,o){var r=n_(e),i=T_(t,o.getSpectrum(t),r,o.getLeftEdge(t),o.getRightEdge(t),e),u=ce(n.element)/2;Un(n.element,"left",i-u+"px")},onLeft:E_,onRight:D_,onUp:A_,onDown:M_,edgeActions:B_}),F_=function(t,n){nu(t,MC(),{value:n})},R_=function(t,n,e){var o={min:FC(n),max:zC(n),range:WC(n),value:e,step:qC(n),snap:YC(n),snapStart:XC(n),rounded:KC(n),hasMinEdge:QC(n),hasMaxEdge:t_(n),minBound:v_(t),maxBound:b_(t),screenRange:x_(t)};return a_(o)},N_=function(t){return function(n,e,o){return function(t,n,e,o){var r=(t>0?i_:r_)(n_(e),FC(e),zC(e),qC(e,o));return F_(n,r),z.some(r)}(t,n,e,o).map(V)}},V_=function(t,n,e,o,r,i){var u=function(t,n,e,o,r){var i=x_(t),u=o.bind((function(n){return z.some(k_(n,t))})).getOr(0),a=r.bind((function(n){return z.some(k_(n,t))})).getOr(i),c={min:FC(n),max:zC(n),range:WC(n),value:e,hasMinEdge:QC(n),hasMaxEdge:t_(n),minBound:v_(t),minOffset:0,maxBound:b_(t),maxOffset:i,centerMinEdge:u,centerMaxEdge:a};return c_(c)}(n,i,e,o,r);return v_(n)-v_(t)+u},z_=z.none,L_=z.none,H_=N_(-1),P_=N_(1),U_={"top-left":z.none(),top:z.some((function(t,n){o_(t,NC(n))})),"top-right":z.none(),right:z.none(),"bottom-right":z.none(),bottom:z.some((function(t,n){o_(t,HC(n))})),"bottom-left":z.none(),left:z.none()},W_=Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=R_(t,n,e);return F_(t,o),o},setToMin:function(t,n){var e=FC(n);F_(t,e)},setToMax:function(t,n){var e=zC(n);F_(t,e)},findValueOfOffset:R_,getValueFromEvent:function(t){return BC(t).map((function(t){return t.top}))},findPositionOfValue:V_,setPositionFromValue:function(t,n,e,o){var r=n_(e),i=V_(t,o.getSpectrum(t),r,o.getTopEdge(t),o.getBottomEdge(t),e),u=te(n.element)/2;Un(n.element,"top",i-u+"px")},onLeft:z_,onRight:L_,onUp:H_,onDown:P_,edgeActions:U_}),j_=function(t,n){nu(t,MC(),{value:n})},G_=function(t,n){return{x:t,y:n}},q_=function(t,n){return function(e,o,r){return function(t,n,e,o,r){var i=t>0?i_:r_,u=n?n_(o).x:i(n_(o).x,IC(o),VC(o),qC(o,r)),a=n?i(n_(o).y,FC(o),zC(o),qC(o,r)):n_(o).y;return j_(e,G_(u,a)),z.some(u)}(t,n,e,o,r).map(V)}},Y_=q_(-1,!1),X_=q_(1,!1),K_=q_(-1,!0),J_=q_(1,!0),$_={"top-left":z.some((function(t,n){o_(t,e_(RC(n),NC(n)))})),top:z.some((function(t,n){o_(t,e_(jC(n),NC(n)))})),"top-right":z.some((function(t,n){o_(t,e_(LC(n),NC(n)))})),right:z.some((function(t,n){o_(t,e_(LC(n),GC(n)))})),"bottom-right":z.some((function(t,n){o_(t,e_(LC(n),HC(n)))})),bottom:z.some((function(t,n){o_(t,e_(jC(n),HC(n)))})),"bottom-left":z.some((function(t,n){o_(t,e_(RC(n),HC(n)))})),left:z.some((function(t,n){o_(t,e_(RC(n),GC(n)))}))},Z_=Object.freeze({__proto__:null,setValueFrom:function(t,n,e){var o=C_(t,n,e.left),r=R_(t,n,e.top),i=G_(o,r);return j_(t,i),i},setToMin:function(t,n){var e=IC(n),o=FC(n);j_(t,G_(e,o))},setToMax:function(t,n){var e=VC(n),o=zC(n);j_(t,G_(e,o))},getValueFromEvent:function(t){return BC(t)},setPositionFromValue:function(t,n,e,o){var r=n_(e),i=T_(t,o.getSpectrum(t),r.x,o.getLeftEdge(t),o.getRightEdge(t),e),u=V_(t,o.getSpectrum(t),r.y,o.getTopEdge(t),o.getBottomEdge(t),e),a=ce(n.element)/2,c=te(n.element)/2;Un(n.element,"left",i-a+"px"),Un(n.element,"top",u-c+"px")},onLeft:Y_,onRight:X_,onUp:K_,onDown:J_,edgeActions:$_}),Q_=[Nr("stepSize",1),Nr("speedMultiplier",10),Nr("onChange",_),Nr("onChoose",_),Nr("onInit",_),Nr("onDragStart",_),Nr("onDragEnd",_),Nr("snapToGrid",!1),Nr("rounded",!0),Er("snapStart"),xr("model",gr("mode",{x:[Nr("minX",0),Nr("maxX",100),vr("value",(function(t){return Gr(t.mode.minX)})),yr("getInitialValue"),mc("manager",I_)],y:[Nr("minY",0),Nr("maxY",100),vr("value",(function(t){return Gr(t.mode.minY)})),yr("getInitialValue"),mc("manager",W_)],xy:[Nr("minX",0),Nr("maxX",100),Nr("minY",0),Nr("maxY",100),vr("value",(function(t){return Gr({x:t.mode.minX,y:t.mode.minY})})),yr("getInitialValue"),mc("manager",Z_)]})),ld("sliderBehaviours",[Hp,sd]),vr("mouseIsDown",(function(){return Gr(!1)}))],tT=gm({name:"Slider",configFields:Q_,partFields:AC,factory:function(t,n,e,o){var r,i=function(n){return tm(n,t,"thumb")},u=function(n){return tm(n,t,"spectrum")},a=function(n){return Qd(n,t,"left-edge")},c=function(n){return Qd(n,t,"right-edge")},s=function(n){return Qd(n,t,"top-edge")},l=function(n){return Qd(n,t,"bottom-edge")},f=t.model,d=f.manager,m=function(n,e){d.setPositionFromValue(n,e,t,{getLeftEdge:a,getRightEdge:c,getTopEdge:s,getBottomEdge:l,getSpectrum:u})},g=function(t,n){f.value.set(n);var e=i(t);m(t,e)},p=function(n){var e=t.mouseIsDown.get();t.mouseIsDown.set(!1),e&&Qd(n,t,"thumb").each((function(e){var o=f.value.get();t.onChoose(n,e,o)}))},h=function(n,e){e.stop(),t.mouseIsDown.set(!0),t.onDragStart(n,i(n))},v=function(n,e){e.stop(),t.onDragEnd(n,i(n)),p(n)},b=function(n){Qd(n,t,"spectrum").map(Hp.focusIn)};return{uid:t.uid,dom:t.dom,components:n,behaviours:dd(t.sliderBehaviours,[Hp.config({mode:"special",focusIn:b}),sd.config({store:{mode:"manual",getValue:function(t){return f.value.get()},setValue:g}}),cs.config({channels:(r={},r[qf()]={onReceive:p},r)})]),events:uu([su(MC(),(function(n,e){!function(n,e){g(n,e);var o=i(n);t.onChange(n,o,e),z.some(!0)}(n,e.event.value)})),vu((function(n,e){var o=f.getInitialValue();f.value.set(o);var r=i(n);m(n,r);var a=u(n);t.onInit(n,r,a,f.value.get())})),su(ui(),h),su(ci(),v),su(li(),(function(t,n){b(t),h(t,n)})),su(mi(),v)]),apis:{resetToMin:function(n){d.setToMin(n,t)},resetToMax:function(n){d.setToMax(n,t)},setValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},apis:{setValue:function(t,n,e){t.setValue(n,e)},resetToMin:function(t,n){t.resetToMin(n)},resetToMax:function(t,n){t.resetToMax(n)},refresh:function(t,n){t.refresh(n)}}}),nT=Du("rgb-hex-update"),eT=Du("slider-update"),oT=Du("palette-update"),rT="form",iT=[ld("formBehaviours",[sd])],uT=function(t){return"<alloy.field."+t+">"},aT=function(t,n){return{uid:t.uid,dom:t.dom,components:n,behaviours:dd(t.formBehaviours,[sd.config({store:{mode:"manual",getValue:function(n){var e=em(n,t);return yt(e,(function(t,n){return t().bind((function(t){var e,o,r=bm.getCurrent(t);return e=r,o=new Error("Cannot find a current component to extract the value from for form part '".concat(n,"': ")+Cu(t.element)),e.fold((function(){return mo.error(o)}),mo.value)})).map(sd.getValue)}))},setValue:function(n,e){bt(e,(function(e,o){Qd(n,t,o).each((function(t){bm.getCurrent(t).each((function(t){sd.setValue(t,e)}))}))}))}}})]),apis:{getField:function(n,e){return Qd(n,t,e).bind(bm.getCurrent)}}}},cT={getField:Gu((function(t,n,e){return t.getField(n,e)})),sketch:function(t){var n=function(){var t=[];return{field:function(n,e){return t.push(n),Xd(rT,uT(n),e)},record:D(t)}}(),e=t(n),o=n.record(),r=K(o,(function(t){return Ld({name:t,pname:uT(t)})}));return sm(rT,iT,r,aT,e)}},sT=Du("valid-input"),lT=Du("invalid-input"),fT=Du("validating-input"),dT="colorcustom.rgb.",mT=function(t,n,o,r){var i=function(e,o){return lC.config({invalidClass:n("invalid"),notify:{onValidate:function(t){nu(t,fT,{type:e})},onValid:function(t){nu(t,sT,{type:e,value:sd.getValue(t)})},onInvalid:function(t){nu(t,lT,{type:e,value:sd.getValue(t)})}},validator:{validate:function(n){var e=sd.getValue(n),r=o(e)?mo.value(!0):mo.error(t("aria.input.invalid"));return Hk(r)},validateOnLoad:!1}})},u=function(o,r,u,a,c){var s=t(dT+"range"),l=NO.parts.label({dom:{tag:"label",attributes:{"aria-label":a}},components:[Ba(u)]}),f=NO.parts.field({data:c,factory:Yy,inputAttributes:e({type:"text"},"hex"===r?{"aria-live":"polite"}:{}),inputClasses:[n("textfield")],inputBehaviours:es([i(r,o),LO.config({})]),onSetValue:function(t){lC.isInvalid(t)&&lC.run(t).get(_)}}),d=[l,f],m="hex"!==r?[NO.parts["aria-descriptor"]({text:s})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:d.concat(m)}},a=function(t,n){var e=n.red,o=n.green,r=n.blue;sd.setValue(t,{red:e,green:o,blue:r})},c=jh({dom:{tag:"div",classes:[n("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),s=function(t,n){c.getOpt(t).each((function(t){Un(t.element,"background-color","#"+n.value)}))},l=mm({factory:function(){var e={red:Gr(z.some(255)),green:Gr(z.some(255)),blue:Gr(z.some(255)),hex:Gr(z.some("ffffff"))},i=function(t){return e[t].get()},l=function(t,n){e[t].set(n)},f=function(t){var n=t.red,e=t.green,o=t.blue;l("red",z.some(n)),l("green",z.some(e)),l("blue",z.some(o))},d=function(t,n){var e=n.event;"hex"!==e.type?l(e.type,z.none()):r(t)},m=function(t,n,e){var o=parseInt(e,10);l(n,z.some(o)),i("red").bind((function(t){return i("green").bind((function(n){return i("blue").map((function(e){return bS(t,n,e,1)}))}))})).each((function(n){var e=function(t,n){var e=dS(n);return cT.getField(t,"hex").each((function(n){nh.isFocused(n)||sd.setValue(t,{hex:e.value})})),e}(t,n);nu(t,nT,{hex:e}),s(t,e)}))},g=function(t,n){var e=n.event;!function(t){return"hex"===t.type}(e)?m(t,e.type,e.value):function(t,n){o(t);var e=iS(n);l("hex",z.some(e.value));var r=wS(e);a(t,r),f(r),nu(t,nT,{hex:e}),s(t,e)}(t,e.value)},p=function(n){return{label:t(dT+n+".label"),description:t(dT+n+".description")}},h=p("red"),v=p("green"),b=p("blue"),y=p("hex");return Ao(cT.sketch((function(e){return{dom:{tag:"form",classes:[n("rgb-form")],attributes:{"aria-label":t("aria.color.picker")}},components:[e.field("red",NO.sketch(u(yS,"red",h.label,h.description,255))),e.field("green",NO.sketch(u(yS,"green",v.label,v.description,255))),e.field("blue",NO.sketch(u(yS,"blue",b.label,b.description,255))),e.field("hex",NO.sketch(u(cS,"hex",y.label,y.description,"ffffff"))),c.asSpec()],formBehaviours:es([lC.config({invalidClass:n("form-invalid")}),Jp("rgb-form-events",[su(sT,g),su(lT,d),su(fT,d)])])}})),{apis:{updateHex:function(t,n){sd.setValue(t,{hex:n.value}),function(t,n){var e=wS(n);a(t,e),f(e)}(t,n),s(t,n)}}})},name:"RgbForm",configFields:[],apis:{updateHex:function(t,n,e){t.updateHex(n,e)}},extraApis:{}});return l},gT=function(t,n){var e=tT.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[n("sv-palette-spectrum")]}}),o=tT.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[n("sv-palette-thumb")],innerHtml:"<div class=".concat(n("sv-palette-inner-thumb"),' role="presentation"></div>')}}),r=function(t,n){var e=t.width,o=t.height,r=t.getContext("2d");if(null!==r){r.fillStyle=n,r.fillRect(0,0,e,o);var i=r.createLinearGradient(0,0,e,0);i.addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=i,r.fillRect(0,0,e,o);var u=r.createLinearGradient(0,0,0,o);u.addColorStop(0,"rgba(0,0,0,0)"),u.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=u,r.fillRect(0,0,e,o)}},i=mm({factory:function(i){var u=D({x:0,y:0}),a=es([bm.config({find:z.some}),nh.config({})]);return tT.sketch({dom:{tag:"div",attributes:{role:"slider","aria-valuetext":t(["Saturation {0}%, Brightness {1}%",0,0])},classes:[n("sv-palette")]},model:{mode:"xy",getInitialValue:u},rounded:!1,components:[e,o],onChange:function(n,e,o){O(o)||Fn(n.element,"aria-valuetext",t(["Saturation {0}%, Brightness {1}%",Math.floor(o.x),Math.floor(100-o.y)])),nu(n,oT,{value:o})},onInit:function(t,n,e,o){r(e.element.dom,OS(CS))},sliderBehaviours:a})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:function(t,n,e){!function(t,n){var e=t.components()[0].element.dom,o=LS(n,100,100),i=xS(o);r(e,OS(i))}(n,e)},setThumb:function(n,e,o){!function(n,e){var o=HS(wS(e));tT.setValue(n,{x:o.saturation,y:100-o.value}),Fn(n.element,"aria-valuetext",t(["Saturation {0}%, Brightness {1}%",o.saturation,o.value]))}(e,o)}},extraApis:{}});return i},pT=function(t,n){var e=mm({name:"ColourPicker",configFields:[yr("dom"),Nr("onValidHex",_),Nr("onInvalidHex",_)],factory:function(e){var o,r=mT(t,n,e.onValidHex,e.onInvalidHex),i=gT(t,n),u={paletteRgba:Gr(CS),paletteHue:Gr(0)},a=jh(function(t,n){var e=tT.parts.spectrum({dom:{tag:"div",classes:[n("hue-slider-spectrum")],attributes:{role:"presentation"}}}),o=tT.parts.thumb({dom:{tag:"div",classes:[n("hue-slider-thumb")],attributes:{role:"presentation"}}});return tT.sketch({dom:{tag:"div",classes:[n("hue-slider")],attributes:{role:"slider","aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":120}},rounded:!1,model:{mode:"y",getInitialValue:D(0)},components:[e,o],sliderBehaviours:es([nh.config({})]),onChange:function(t,n,e){Fn(t.element,"aria-valuenow",Math.floor(360-3.6*e)),nu(t,eT,{value:e})}})}(0,n)),c=jh(i.sketch({})),s=jh(r.sketch({})),l=function(t,n,e){c.getOpt(t).each((function(t){i.setHue(t,e)}))},f=function(t,n){s.getOpt(t).each((function(t){r.updateHex(t,n)}))},d=function(t,n,e){a.getOpt(t).each((function(t){tT.setValue(t,function(t){return 100-t/360*100}(e))}))},m=function(t,n){c.getOpt(t).each((function(t){i.setThumb(t,n)}))},g=function(t,n,e,o){!function(t,n){var e=wS(t);u.paletteRgba.set(e),u.paletteHue.set(n)}(n,e),J(o,(function(o){o(t,n,e)}))};return{uid:e.uid,dom:e.dom,components:[c.asSpec(),a.asSpec(),s.asSpec()],behaviours:es([Jp("colour-picker-events",[su(nT,(o=[l,d,m],function(t,n){var e=n.event.hex,r=function(t){return HS(wS(t))}(e);g(t,e,r.hue,o)})),su(oT,function(){var t=[f];return function(n,e){var o=e.event.value,r=u.paletteHue.get(),i=LS(r,o.x,100-o.y),a=PS(i);g(n,a,r,t)}}()),su(eT,function(){var t=[l,f];return function(n,e){var o=function(t){return(100-t)/100*360}(e.event.value),r=u.paletteRgba.get(),i=HS(r),a=LS(o,i.saturation,i.value),c=PS(a);g(n,c,o,t)}}())]),bm.config({find:function(t){return s.getOpt(t)}}),Hp.config({mode:"acyclic"})])}}});return e},hT=function(){return bm.config({find:z.some})},vT=function(t){return bm.config({find:t.getOpt})},bT=function(t){return bm.config({find:function(n){return bn(n.element,t).bind((function(t){return n.getSystem().getByDom(t).toOptional()}))}})},yT=Yo([Nr("preprocess",A),Nr("postprocess",A)]),xT=function(t,n,o){return sd.config({store:e(e({mode:"manual"},t.map((function(t){return{initialValue:t}})).getOr({})),{getValue:n,setValue:o})})},wT=function(t,n,e){return xT(t,(function(t){return n(t.element)}),(function(t,n){return e(t.element,n)}))},ST=function(t){return sd.config({store:{mode:"memory",initialValue:t}})},kT={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"},OT=function(t,n,e){var o=function(t){return"tox-"+t},r=pT(function(t){return function(n){return g(n)?t.translate(kT[n]):t.translate(n)}}(n),o),i=jh(r.sketch({dom:{tag:"div",classes:[o("color-picker-container")],attributes:{role:"presentation"}},onValidHex:function(t){nu(t,XO,{name:"hex-valid",value:!0})},onInvalidHex:function(t){nu(t,XO,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[i.asSpec()],behaviours:es([xT(e,(function(t){var n=i.get(t);return bm.getCurrent(n).bind((function(t){return sd.getValue(t).hex})).map((function(t){return"#"+Nt(t,"#")})).getOr("")}),(function(t,n){var e=z.from(/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(n)).bind((function(t){return ft(t,1)})),o=i.get(t);bm.getCurrent(o).fold((function(){console.log("Can not find form")}),(function(t){sd.setValue(t,{hex:e.getOr("")}),cT.getField(t,"hex").each((function(t){tu(t,yi())}))}))})),hT()])}},CT=tinymce.util.Tools.resolve("tinymce.Resource"),_T=tinymce.util.Tools.resolve("tinymce.util.Tools"),TT=function(t,n,e){var o=function(t,n){n.stop()},r=function(t){return function(n,e){J(t,(function(t){t(n,e)}))}},i=function(t,n){var e;if(!Bm.isDisabled(t)){var o=n.event.raw;a(t,null===(e=o.dataTransfer)||void 0===e?void 0:e.files)}},u=function(t,n){var e=n.event.raw.target;a(t,e.files)},a=function(e,o){o&&(sd.setValue(e,function(t,n){var e=_T.explode(n.getOption("images_file_types"));return Z(gt(t),(function(t){return q(e,(function(n){return Lt(t.name.toLowerCase(),".".concat(n.toLowerCase()))}))}))}(o,n)),nu(e,GO,{name:t.name}))},c=jh({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:es([Jp("input-file-events",[gu(wi()),gu(Fi())])])}),s=t.label.map((function(t){return jO(t,n)})),l=NO.parts.field({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:es([ST(e.getOr([])),hT(),Bm.config({}),sh.config({toggleClass:"dragenter",toggleOnExecute:!1}),Jp("dropzone-events",[su("dragenter",r([o,sh.toggle])),su("dragleave",r([o,sh.toggle])),su("dragover",o),su("drop",r([o,i])),su(xi(),u)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[Ba(n.translate("Drop an image here"))]},Uh.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[Ba(n.translate("Browse for an image")),c.asSpec()],action:function(t){c.get(t).element.dom.click()},buttonBehaviours:es([LO.config({}),Fw(n.isDisabled),Bw()])})]}]}}}});return PO(s,l,["tox-form__group--stretched"],[])},ET=function(t,n){var e=null,o=function(){b(e)||(clearTimeout(e),e=null)};return{cancel:o,throttle:function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];o(),e=setTimeout((function(){e=null,t.apply(null,r)}),n)}}},DT=Du("alloy-fake-before-tabstop"),AT=Du("alloy-fake-after-tabstop"),MT=function(t){return{dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:t},behaviours:es([nh.config({ignore:!0}),LO.config({})])}},BT=function(t,n){return{dom:{tag:"div",classes:u(["tox-navobj"],t.getOr([]),!0)},components:[MT([DT]),n,MT([AT])],behaviours:es([bT(1)])}},IT=function(t,n){nu(t,vi(),{raw:{which:9,shiftKey:n}})},FT=function(t,n){var e=n.element;ga(e,DT)?IT(t,!0):ga(e,AT)&&IT(t,!1)},RT=function(t){return yO(t,["."+DT,"."+AT].join(","),N)},NT=Du("update-dialog"),VT=Du("update-title"),zT=Du("update-body"),LT=Du("update-footer"),HT=Du("body-send-message"),PT=Du("dialog-focus-shifted"),UT=Le().browser,WT=UT.isSafari(),jT=UT.isFirefox(),GT=WT||jT,qT=UT.isChromium(),YT=function(t){var n=t.scrollTop,e=t.scrollHeight,o=t.clientHeight;return Math.ceil(n)+o>=e},XT=function(t,n){return t.scrollTo(0,"bottom"===n?99999999:n)},KT=function(t,n,e){var o=t.dom;z.from(o.contentDocument).fold(e,(function(t){var e=0,r=function(t,n){var e=t.body;return z.from(!/^<!DOCTYPE (html|HTML)/.test(n)&&(!qT&&!WT||S(e)&&(0!==e.scrollTop||Math.abs(e.scrollHeight-e.clientHeight)>1))?e:t.documentElement)}(t,n).map((function(t){return e=t.scrollTop,t})).forall(YT),i=function(){var t=o.contentWindow;S(t)&&(r?XT(t,"bottom"):!r&>&&0!==e&&XT(t,e))};WT&&o.addEventListener("load",i,{once:!0}),t.open(),t.write(n),t.close(),WT||i()}))},JT=Ft(GT,WT?500:200),$T=JT.map((function(t){return n=KT,e=t,o=null,r=null,{cancel:function(){b(o)||(clearTimeout(o),o=null,r=null)},throttle:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];r=t,b(o)&&(o=setTimeout((function(){var t=r;o=null,r=null,n.apply(null,t)}),e))}};var n,e,o,r})),ZT=function(t,n,o){var r="tox-dialog__iframe",i=t.transparent?[]:["".concat(r,"--opaque")],a=t.border?["tox-navobj-bordered"]:[],c=e(e(e({},t.label.map((function(t){return{title:t}})).getOr({})),o.map((function(t){return{srcdoc:t}})).getOr({})),t.sandboxed?{sandbox:"allow-scripts allow-same-origin"}:{}),s=function(t,n){var e=Gr(t.getOr(""));return{getValue:function(t){return e.get()},setValue:function(t,o){if(e.get()!==o){var r=t.element,i=function(){return Fn(r,"srcdoc",o)};n?$T.fold(D(KT),(function(t){return t.throttle}))(r,o,i):i()}e.set(o)}}}(o,t.streamContent),l=t.label.map((function(t){return jO(t,n)})),f=NO.parts.field({factory:{sketch:function(t){var n;return BT(z.from(a),{uid:t.uid,dom:{tag:"iframe",attributes:c,classes:u([r],i,!0)},behaviours:es([LO.config({}),nh.config({}),xT(o,s.getValue,s.setValue),cs.config({channels:(n={},n[PT]={onReceive:function(t,n){n.newFocus.each((function(n){pn(t.element).each((function(e){(cn(t.element,n)?la:da)(e,"tox-navobj-bordered-focus")}))}))}},n)})])})}}});return PO(l,f,["tox-form__group--stretched"],[])},QT=function(t,n){var e=Gr(n.getOr({url:""})),o=jh({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:n.map((function(t){return{src:t.url}})).getOr({})}}),r=jh({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[o.asSpec()]}),i={};t.height.each((function(t){return i.height=t}));var u=n.map((function(t){return{url:t.url,zoom:z.from(t.zoom),cachedWidth:z.from(t.cachedWidth),cachedHeight:z.from(t.cachedHeight)}}));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:i,attributes:{role:"presentation"}},components:[r.asSpec()],behaviours:es([hT(),xT(u,(function(){return e.get()}),(function(t,n){var i={url:n.url};n.zoom.each((function(t){return i.zoom=t})),n.cachedWidth.each((function(t){return i.cachedWidth=t})),n.cachedHeight.each((function(t){return i.cachedHeight=t})),e.set(i);var u=function(){var n=i.cachedWidth,e=i.cachedHeight,o=i.zoom;if(!x(n)&&!x(e)){if(x(o)){var u=function(t,n,e){var o=ce(t),r=te(t);return Math.min(o/n,r/e,1)}(t.element,n,e);i.zoom=u}var a=function(t,n,e,o,r){var i=e*r,u=o*r,a=Math.max(0,t/2-i/2),c=Math.max(0,n/2-u/2);return{left:a.toString()+"px",top:c.toString()+"px",width:i.toString()+"px",height:u.toString()+"px"}}(ce(t.element),te(t.element),n,e,i.zoom);r.getOpt(t).each((function(t){Wn(t.element,a)}))}};o.getOpt(t).each((function(e){var o=e.element;n.url!==Nn(o,"src")&&(Fn(o,"src",n.url),da(t.element,"tox-imagepreview__loaded")),u(),function(t){return new Promise((function(n,e){var o=function(){i(),n(t)},r=[Ns(t,"load",o),Ns(t,"error",(function(){i(),e("Unable to load data from image: "+t.dom.src)}))],i=function(){return J(r,(function(t){return t.unbind()}))};t.dom.complete&&o()}))}(o).then((function(n){t.getSystem().isConnected()&&(la(t.element,"tox-imagepreview__loaded"),i.cachedWidth=n.dom.naturalWidth,i.cachedHeight=n.dom.naturalHeight,u())}))}))}))])}},tE=Du("toolbar.button.execute"),nE=Du("common-button-display-events"),eE=(a={},a[Bi()]=["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],a[Wi()]=["toolbar-button-events",nE],a[li()]=["focusing","alloy.base.behaviour",nE],a),oE=function(t){return Un(t.element,"width",Gn(t.element,"width"))},rE=function(t,n,e){return ab(t,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:e},n)},iE=function(t,n){return rE(t,n,[])},uE=function(t,n){return rE(t,n,[Kp.config({})])},aE=function(t,n,e){return{dom:{tag:"span",classes:["".concat(n,"__select-label")]},components:[Ba(e.translate(t))],behaviours:es([Kp.config({})])}},cE=Du("update-menu-text"),sE=Du("update-menu-icon"),lE=function(t,n,o){var r,i=Gr(_),a=t.text.map((function(t){return jh(aE(t,n,o.providers))})),c=t.icon.map((function(t){return jh(uE(t,o.providers.icons))})),s=function(t,n){var e=sd.getValue(t);return nh.focus(e),nu(e,"keydown",{raw:n.event.raw}),nO.close(e),z.some(!0)},l=t.role.fold((function(){return{}}),(function(t){return{role:t}})),f=t.tooltip.fold((function(){return{}}),(function(t){var n=o.providers.translate(t);return{title:n,"aria-label":n}})),d=ab("chevron-down",{tag:"div",classes:["".concat(n,"__select-chevron")]},o.providers.icons),m=Du("common-button-display-events"),g=jh(nO.sketch(e(e(e({},t.uid?{uid:t.uid}:{}),l),{dom:{tag:"button",classes:[n,"".concat(n,"--select")].concat(K(t.classes,(function(t){return"".concat(n,"--").concat(t)}))),attributes:e({},f)},components:Uw([c.map((function(t){return t.asSpec()})),a.map((function(t){return t.asSpec()})),z.some(d)]),matchWidth:!0,useMinWidth:!0,onOpen:function(n,e,o){t.searchable&&function(t){Zy(t).each((function(t){return nh.focus(t)}))}(o)},dropdownBehaviours:es(u(u([],t.dropdownBehaviours,!0),[Fw((function(){return t.disabled||o.providers.isDisabled()})),Bw(),dC.config({}),Kp.config({}),Jp("dropdown-events",[zw(t,i),Lw(t,i)]),Jp(m,[vu((function(t,n){return oE(t)}))]),Jp("menubutton-update-display-text",[su(cE,(function(t,n){a.bind((function(n){return n.getOpt(t)})).each((function(t){Kp.set(t,[Ba(o.providers.translate(n.event.text))])}))})),su(sE,(function(t,n){c.bind((function(n){return n.getOpt(t)})).each((function(t){Kp.set(t,[uE(n.event.icon,o.providers.icons)])}))}))])],!1)),eventOrder:Ao(eE,(r={mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]},r[Wi()]=["toolbar-button-events","dropdown-events",m],r)),sandboxBehaviours:es([Hp.config({mode:"special",onLeft:s,onRight:s}),Jp("dropdown-sandbox-events",[su(Xy,(function(t,n){eO(t),n.stop()})),su(Ky,(function(t,n){oO(t,n),n.stop()}))])]),lazySink:o.getSink,toggleClass:"".concat(n,"--active"),parts:{menu:e(e({},Uy(0,t.columns,t.presets)),{fakeFocus:t.searchable,onHighlightItem:iO,onCollapseMenu:function(t,n,e){Wm.getHighlighted(e).each((function(n){iO(t,e,n)}))},onDehighlightItem:uO})},getAnchorOverrides:function(){return{maxHeightFunction:function(t,n){Xs()(t,n-10)}}},fetch:function(n){return Lk(B(t.fetch,n))}})));return g.asSpec()},fE=function(t){return"separator"===t.type},dE={type:"separator"},mE=function(t,n){var e=tt(t,(function(t,e){return function(t){return g(t)}(e)?""===e?t:"|"===e?t.length>0&&!fE(t[t.length-1])?t.concat([dE]):t:Et(n,e.toLowerCase())?t.concat([n[e.toLowerCase()]]):t:t.concat([e])}),[]);return e.length>0&&fE(e[e.length-1])&&e.pop(),e},gE=function(t,n){var o=mE(g(t)?t.split(" "):t,n);return Q(o,(function(t,o){if(function(t){return Et(t,"getSubmenuItems")}(o)){var r=function(t){var n=Tt(t,"value").getOrThunk((function(){return Du("generated-menu-item")}));return Ao({value:n},t)}(o),i=function(t,n){var e,o,r=t.getSubmenuItems(),i=gE(r,n);return{item:t,menus:Ao(i.menus,((e={})[t.value]=i.items,e)),expansions:Ao(i.expansions,((o={})[t.value]=t.value,o))}}(r,n);return{menus:Ao(t.menus,i.menus),items:u([i.item],t.items,!0),expansions:Ao(t.expansions,i.expansions)}}return e(e({},t),{items:u([o],t.items,!0)})}),{menus:{},expansions:{},items:[]})},pE=function(t,n,e,o){var r=Du("primary-menu"),i=gE(t,e.shared.providers.menuItems());if(0===i.items.length)return z.none();var u=function(t){return t.search.fold((function(){return{searchMode:"no-search"}}),(function(t){return{searchMode:"search-with-field",placeholder:t.placeholder}}))}(o),a=fO(r,i.items,n,e,o.isHorizontalMenu,u),c=function(t){return t.search.fold((function(){return{searchMode:"no-search"}}),(function(t){return{searchMode:"search-with-results"}}))}(o),s=yt(i.menus,(function(t,o){return fO(o,t,n,e,!1,c)})),l=Ao(s,Kr(r,a));return z.from(Lh.tieredData(r,l,i.expansions))},hE=function(t){return!Et(t,"items")},vE="data-value",bE=function(t,n,e,o){return K(e,(function(e){return hE(e)?{type:"togglemenuitem",text:e.text,value:e.value,active:e.value===o,onAction:function(){sd.setValue(t,e.value),nu(t,GO,{name:n}),nh.focus(t)}}:{type:"nestedmenuitem",text:e.text,getSubmenuItems:function(){return bE(t,n,e.items,o)}}}))},yE=function(t,n){return pt(t,(function(t){return hE(t)?Ft(t.value===n,t):yE(t.items,n)}))},xE=mm({name:"HtmlSelect",configFields:[yr("options"),ld("selectBehaviours",[nh,sd]),Nr("selectClasses",[]),Nr("selectAttributes",{}),Er("data")],factory:function(t,n){var o=K(t.options,(function(t){return{dom:{tag:"option",value:t.value,innerHtml:t.text}}})),r=t.data.map((function(t){return Kr("initialValue",t)})).getOr({});return{uid:t.uid,dom:{tag:"select",classes:t.selectClasses,attributes:t.selectAttributes},components:o,behaviours:dd(t.selectBehaviours,[nh.config({}),sd.config({store:e({mode:"manual",getValue:function(t){return ba(t.element)},setValue:function(n,e){var o=dt(t.options);nt(t.options,(function(t){return t.value===e})).isSome()?ya(n.element,e):-1===n.element.dom.selectedIndex&&""===e&&o.each((function(t){return ya(n.element,t.value)}))}},r)})])}}}),wE=D([Nr("field1Name","field1"),Nr("field2Name","field2"),fc("onLockedChange"),ac(["lockClass"]),Nr("locked",!1),md("coupledFieldBehaviours",[bm,sd])]),SE=function(t,n){return Ld({factory:NO,name:t,overrides:function(t){return{fieldBehaviours:es([Jp("coupled-input-behaviour",[su(yi(),(function(e){(function(t,n,e){return Qd(t,n,e).bind(bm.getCurrent)})(e,t,n).each((function(n){Qd(e,t,"lock").each((function(o){sh.isOn(o)&&t.onLockedChange(e,n,o)}))}))}))])])}}})},kE=D([SE("field1","field2"),SE("field2","field1"),Ld({factory:Uh,schema:[yr("dom")],name:"lock",overrides:function(t){return{buttonBehaviours:es([sh.config({selected:t.locked,toggleClass:t.markers.lockClass,aria:{mode:"pressed"}})])}}})]),OE=gm({name:"FormCoupledInputs",configFields:wE(),partFields:kE(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,behaviours:gd(t.coupledFieldBehaviours,[bm.config({find:z.some}),sd.config({store:{mode:"manual",getValue:function(n){var e,o=rm(n,t,["field1","field2"]);return(e={})[t.field1Name]=sd.getValue(o.field1()),e[t.field2Name]=sd.getValue(o.field2()),e},setValue:function(n,e){var o=rm(n,t,["field1","field2"]);Dt(e,t.field1Name)&&sd.setValue(o.field1(),e[t.field1Name]),Dt(e,t.field2Name)&&sd.setValue(o.field2(),e[t.field2Name])}}})]),apis:{getField1:function(n){return Qd(n,t,"field1")},getField2:function(n){return Qd(n,t,"field2")},getLock:function(n){return Qd(n,t,"lock")}}}},apis:{getField1:function(t,n){return t.getField1(n)},getField2:function(t,n){return t.getField2(n)},getLock:function(t,n){return t.getLock(n)}}}),CE=function(t){var n=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(t);if(null!==n){var e=parseFloat(n[1]),o=n[2];return mo.value({value:e,unit:o})}return mo.error(t)},_E=function(t,n){var e={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},o=function(t){return Et(e,t)};return t.unit===n?z.some(t.value):o(t.unit)&&o(n)?e[t.unit]===e[n]?z.some(t.value):z.some(t.value/e[t.unit]*e[n]):z.none()},TE=function(t){return z.none()},EE=function(t,n){var e=CE(t).toOptional(),o=CE(n).toOptional();return Bt(e,o,(function(t,n){return _E(t,n.unit).map((function(t){return n.value/t})).map((function(t){return e=t,o=n.unit,function(t){return _E(t,o).map((function(t){return{value:t*e,unit:o}}))};var e,o})).getOr(TE)})).getOr(TE)},DE=function(t,n){var o=t.label.map((function(t){return jO(t,n)})),r=[Bm.config({disabled:function(){return t.disabled||n.isDisabled()}}),Bw(),Hp.config({mode:"execution",useEnter:!0!==t.multiline,useControlEnter:!0===t.multiline,execute:function(t){return tu(t,KO),z.some(!0)}}),Jp("textfield-change",[su(yi(),(function(n,e){nu(n,GO,{name:t.name})})),su(Ai(),(function(n,e){nu(n,GO,{name:t.name})}))]),LO.config({})],i=t.validation.map((function(t){return lC.config({getRoot:function(t){return pn(t.element)},invalidClass:"tox-invalid",validator:{validate:function(n){var e=sd.getValue(n),o=t.validator(e);return Hk(!0===o?mo.value(e):mo.error(o))},validateOnLoad:t.validateOnLoad}})})).toArray(),u=t.placeholder.fold(D({}),(function(t){return{placeholder:n.translate(t)}})),a=t.inputMode.fold(D({}),(function(t){return{inputmode:t}})),c=e(e({},u),a),s=NO.parts.field(e(e({tag:!0===t.multiline?"textarea":"input"},t.data.map((function(t){return{data:t}})).getOr({})),{inputAttributes:c,inputClasses:[t.classname],inputBehaviours:es(ot([r,i])),selectOnFocus:!1,factory:Yy})),l=t.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[s]}:s,f=(t.flex?["tox-form__group--stretched"]:[]).concat(t.maximized?["tox-form-group--maximize"]:[]),d=[Bm.config({disabled:function(){return t.disabled||n.isDisabled()},onDisabled:function(t){NO.getField(t).each(Bm.disable)},onEnabled:function(t){NO.getField(t).each(Bm.enable)}}),Bw()];return PO(o,l,f,d)},AE=function(t,n){return n.getAnimationRoot.fold((function(){return t.element}),(function(n){return n(t)}))},ME=function(t){return t.dimension.property},BE=function(t,n){return t.dimension.getDimension(n)},IE=function(t,n){var e=AE(t,n);ha(e,[n.shrinkingClass,n.growingClass])},FE=function(t,n){da(t.element,n.openClass),la(t.element,n.closedClass),Un(t.element,ME(n),"0px"),$n(t.element)},RE=function(t,n){da(t.element,n.closedClass),la(t.element,n.openClass),Jn(t.element,ME(n))},NE=function(t,n,e,o){e.setCollapsed(),Un(t.element,ME(n),BE(n,t.element)),IE(t,n),FE(t,n),n.onStartShrink(t),n.onShrunk(t)},VE=function(t,n,e,o){var r=o.getOrThunk((function(){return BE(n,t.element)}));e.setCollapsed(),Un(t.element,ME(n),r),$n(t.element);var i=AE(t,n);da(i,n.growingClass),la(i,n.shrinkingClass),FE(t,n),n.onStartShrink(t)},zE=function(t,n,e){var o=BE(n,t.element);("0px"===o?NE:VE)(t,n,e,z.some(o))},LE=function(t,n,e){var o=AE(t,n),r=ga(o,n.shrinkingClass),i=BE(n,t.element);RE(t,n);var u=BE(n,t.element);(r?function(){Un(t.element,ME(n),i),$n(t.element)}:function(){FE(t,n)})(),da(o,n.shrinkingClass),la(o,n.growingClass),RE(t,n),Un(t.element,ME(n),u),e.setExpanded(),n.onStartGrow(t)},HE=function(t,n,e){var o=AE(t,n);return!0===ga(o,n.growingClass)},PE=function(t,n,e){var o=AE(t,n);return!0===ga(o,n.shrinkingClass)},UE=Object.freeze({__proto__:null,refresh:function(t,n,e){if(e.isExpanded()){Jn(t.element,ME(n));var o=BE(n,t.element);Un(t.element,ME(n),o)}},grow:function(t,n,e){e.isExpanded()||LE(t,n,e)},shrink:function(t,n,e){e.isExpanded()&&zE(t,n,e)},immediateShrink:function(t,n,e){e.isExpanded()&&NE(t,n,e)},hasGrown:function(t,n,e){return e.isExpanded()},hasShrunk:function(t,n,e){return e.isCollapsed()},isGrowing:HE,isShrinking:PE,isTransitioning:function(t,n,e){return HE(t,n)||PE(t,n)},toggleGrow:function(t,n,e){(e.isExpanded()?zE:LE)(t,n,e)},disableTransitions:IE,immediateGrow:function(t,n,e){e.isExpanded()||(RE(t,n),Un(t.element,ME(n),BE(n,t.element)),IE(t,n),e.setExpanded(),n.onStartGrow(t),n.onGrown(t))}}),WE=Object.freeze({__proto__:null,exhibit:function(t,n,e){var o=n.expanded;return Ku(o?{classes:[n.openClass],styles:{}}:{classes:[n.closedClass],styles:Kr(n.dimension.property,"0px")})},events:function(t,n){return uu([hu(ki(),(function(e,o){o.event.raw.propertyName===t.dimension.property&&(IE(e,t),n.isExpanded()&&Jn(e.element,t.dimension.property),(n.isExpanded()?t.onGrown:t.onShrunk)(e))}))])}}),jE=[yr("closedClass"),yr("openClass"),yr("shrinkingClass"),yr("growingClass"),Er("getAnimationRoot"),sc("onShrunk"),sc("onStartShrink"),sc("onGrown"),sc("onStartGrow"),Nr("expanded",!1),xr("dimension",gr("property",{width:[mc("property","width"),mc("getDimension",(function(t){return ce(t)+"px"}))],height:[mc("property","height"),mc("getDimension",(function(t){return te(t)+"px"}))]}))],GE=Object.freeze({__proto__:null,init:function(t){var n=Gr(t.expanded);return Yu({isExpanded:function(){return!0===n.get()},isCollapsed:function(){return!1===n.get()},setCollapsed:B(n.set,!1),setExpanded:B(n.set,!0),readState:function(){return"expanded: "+n.get()}})}}),qE=rs({fields:jE,name:"sliding",active:WE,apis:UE,state:GE}),YE=function(t){return{isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)},setActive:function(n){var e=t.element;n?(la(e,"tox-tbtn--enabled"),Fn(e,"aria-pressed",!0)):(da(e,"tox-tbtn--enabled"),Ln(e,"aria-pressed"))},isActive:function(){return ga(t.element,"tox-tbtn--enabled")},setText:function(n){nu(t,cE,{text:n})},setIcon:function(n){return nu(t,sE,{icon:n})}}},XE=function(t,n,e,o,r){return void 0===r&&(r=!0),lE({text:t.text,icon:t.icon,tooltip:t.tooltip,searchable:t.search.isSome(),role:o,fetch:function(n,o){var r={pattern:t.search.isSome()?aO(n):""};t.fetch((function(n){o(pE(n,Oy.CLOSE_ON_EXECUTE,e,{isHorizontalMenu:!1,search:t.search}))}),r,YE(n))},onSetup:t.onSetup,getApi:YE,columns:1,presets:"normal",classes:[],dropdownBehaviours:u([],r?[LO.config({})]:[],!0)},n,e.shared)},KE=function(t,n,o){var r=function(t){return function(e){var r=!e.isActive();e.setActive(r),t.storage.set(r),o.shared.getSink().each((function(e){n().getOpt(e).each((function(n){ls(n.element),nu(n,XO,{name:t.name,value:t.storage.get()})}))}))}},i=function(t){return function(n){n.setActive(t.storage.get())}};return function(n){n(K(t,(function(t){var n=t.text.fold((function(){return{}}),(function(t){return{text:t}}));return e(e({type:t.type,active:!1},n),{onAction:r(t),onSetup:i(t)})})))}},JE=function(t){return{dom:{tag:"span",classes:["tox-tree__label"],attributes:{title:t,"aria-label":t}},components:[Ba(t)]}},$E=Du("leaf-label-event-id"),ZE=function(t){var n,e,o=t.leaf,r=t.onLeafAction,i=t.visible,a=t.treeId,c=t.selectedId,s=t.backstage,l=o.menu.map((function(t){return XE(t,"tox-mbtn",s,z.none(),i)})),f=[JE(o.title)];return l.each((function(t){return f.push(t)})),Uh.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(i?["tox-tree--leaf__label--visible"]:[])},components:f,role:"treeitem",action:function(t){r(o.id),t.getSystem().broadcastOn(["update-active-item-".concat(a)],{value:o.id})},eventOrder:(n={},n[vi()]=[$E,"keying"],n),buttonBehaviours:es(u(u([],i?[LO.config({})]:[],!0),[sh.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),cs.config({channels:(e={},e["update-active-item-".concat(a)]={onReceive:function(t,n){(n.value===o.id?sh.on:sh.off)(t)}},e)}),Jp($E,[vu((function(t,n){c.each((function(n){(n===o.id?sh.on:sh.off)(t)}))})),su(vi(),(function(t,n){var e="ArrowLeft"===n.event.raw.code,o="ArrowRight"===n.event.raw.code;e?(Ua(t.element,".tox-tree--directory").each((function(n){t.getSystem().getByDom(n).each((function(t){Wa(n,".tox-tree--directory__label").each((function(n){t.getSystem().getByDom(n).each(nh.focus)}))}))})),n.stop()):o&&n.stop()}))])],!1))})},QE=function(t,n){return function(t,n,e){return ab(t,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"],behaviours:e},n)}(t,n,[])},tD=Du("directory-label-event-id"),nD=function(t){var n,e=t.directory,o=t.visible,r=t.noChildren,i=t.backstage,a=e.menu.map((function(t){return XE(t,"tox-mbtn",i,z.none())})),c=[{dom:{tag:"div",classes:["tox-chevron"]},components:[QE("chevron-right",i.shared.providers.icons)]},JE(e.title)];a.each((function(t){c.push(t)}));var s=function(t){Ua(t.element,".tox-tree--directory").each((function(n){t.getSystem().getByDom(n).each((function(n){var o=!sh.isOn(n);sh.toggle(n),nu(t,"expand-tree-node",{expanded:o,node:e.id})}))}))};return Uh.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(o?["tox-tree--directory__label--visible"]:[])},components:c,action:s,eventOrder:(n={},n[vi()]=[tD,"keying"],n),buttonBehaviours:es(u(u([],o?[LO.config({})]:[],!0),[Jp(tD,[su(vi(),(function(t,n){var e="ArrowRight"===n.event.raw.code,o="ArrowLeft"===n.event.raw.code;e&&r&&n.stop(),(e||o)&&Ua(t.element,".tox-tree--directory").each((function(r){t.getSystem().getByDom(r).each((function(r){!sh.isOn(r)&&e||sh.isOn(r)&&o?(s(t),n.stop()):o&&!sh.isOn(r)&&(Ua(r.element,".tox-tree--directory").each((function(t){Wa(t,".tox-tree--directory__label").each((function(t){r.getSystem().getByDom(t).each(nh.focus)}))})),n.stop())}))}))}))])],!1))})},eD=function(t){var n=t.children,e=t.onLeafAction,o=t.visible,r=t.treeId,i=t.expandedIds,u=t.selectedId,a=t.backstage;return{dom:{tag:"div",classes:["tox-tree--directory__children"]},components:n.map((function(t){return"leaf"===t.type?ZE({leaf:t,selectedId:u,onLeafAction:e,visible:o,treeId:r,backstage:a}):rD({directory:t,expandedIds:i,selectedId:u,onLeafAction:e,labelTabstopping:o,treeId:r,backstage:a})})),behaviours:es([qE.config({dimension:{property:"height"},closedClass:"tox-tree--directory__children--closed",openClass:"tox-tree--directory__children--open",growingClass:"tox-tree--directory__children--growing",shrinkingClass:"tox-tree--directory__children--shrinking",expanded:o}),Kp.config({})])}},oD=Du("directory-event-id"),rD=function(t){var n=t.directory,o=t.onLeafAction,r=t.labelTabstopping,i=t.treeId,a=t.backstage,c=t.expandedIds,s=t.selectedId,l=n.children,f=Gr(c),d=c.includes(n.id);return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[nD({directory:n,visible:r,noChildren:0===n.children.length,backstage:a}),eD({children:l,expandedIds:c,selectedId:s,onLeafAction:o,visible:d,treeId:i,backstage:a})],behaviours:es([Jp(oD,[vu((function(t,n){sh.set(t,d)})),su("expand-tree-node",(function(t,n){var e=n.event,o=e.expanded,r=e.node;f.set(o?u(u([],f.get(),!0),[r],!1):f.get().filter((function(t){return t!==r})))}))]),sh.config(e(e({},n.children.length>0?{aria:{mode:"expanded"}}:{}),{toggleClass:"tox-tree--directory--expanded",onToggled:function(t,n){var e,r=t.components()[1],u=(e=n,l.map((function(t){return"leaf"===t.type?ZE({leaf:t,selectedId:s,onLeafAction:o,visible:e,treeId:i,backstage:a}):rD({directory:t,expandedIds:f.get(),selectedId:s,onLeafAction:o,labelTabstopping:e,treeId:i,backstage:a})})));n?qE.grow(r):qE.shrink(r),Kp.set(r,u)}}))])}},iD=Du("tree-event-id"),uD=Object.freeze({__proto__:null,events:function(t,n){var e=t.stream.streams.setup(t,n);return uu([su(t.event,e),bu((function(){return n.cancel()}))].concat(t.cancelEvent.map((function(t){return[su(t,(function(){return n.cancel()}))]})).getOr([])))}}),aD=function(t){var n=Gr(null);return Yu({readState:function(){return{timer:null!==n.get()?"set":"unset"}},setTimer:function(t){n.set(t)},cancel:function(){var t=n.get();null!==t&&t.cancel()}})},cD=Object.freeze({__proto__:null,throttle:aD,init:function(t){return t.stream.streams.state(t)}}),sD=[xr("stream",gr("mode",{throttle:[yr("delay"),Nr("stopEvent",!0),mc("streams",{setup:function(t,n){var e=t.stream,o=ET(t.onStream,e.delay);return n.setTimer(o),function(t,n){o.throttle(t,n),e.stopEvent&&n.stop()}},state:aD})]})),Nr("event","input"),Er("cancelEvent"),fc("onStream")],lD=rs({fields:sD,name:"streaming",active:uD,state:cD}),fD=function(t,n,e){var o=sd.getValue(e);sd.setValue(n,o),mD(n)},dD=function(t,n){var e=t.element,o=ba(e),r=e.dom;"number"!==Nn(e,"type")&&n(r,o)},mD=function(t){dD(t,(function(t,n){return t.setSelectionRange(n.length,n.length)}))},gD=function(t,n,e){if(t.selectsOver){var o=sd.getValue(n),r=t.getDisplayText(o),i=sd.getValue(e);return 0===t.getDisplayText(i).indexOf(r)?z.some((function(){fD(0,n,e),function(t,n){dD(t,(function(t,e){return t.setSelectionRange(n,e.length)}))}(n,r.length)})):z.none()}return z.none()},pD=D("alloy.typeahead.itemexecute"),hD=D([Er("lazySink"),yr("fetch"),Nr("minChars",5),Nr("responseTime",1e3),sc("onOpen"),Nr("getHotspot",z.some),Nr("getAnchorOverrides",D({})),Nr("layouts",z.none()),Nr("eventOrder",{}),jr("model",{},[Nr("getDisplayText",(function(t){return void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.value})),Nr("selectsOver",!0),Nr("populateFromBrowse",!0)]),sc("onSetValue"),lc("onExecute"),sc("onItemExecute"),Nr("inputClasses",[]),Nr("inputAttributes",{}),Nr("inputStyles",{}),Nr("matchWidth",!0),Nr("useMinWidth",!1),Nr("dismissOnBlur",!0),ac(["openClass"]),Er("initialData"),ld("typeaheadBehaviours",[nh,sd,lD,Hp,sh,Fk]),vr("lazyTypeaheadComp",(function(){return Gr(z.none)})),vr("previewing",(function(){return Gr(!0)}))].concat(Wy()).concat(Zk())),vD=D([Hd({schema:[uc()],name:"menu",overrides:function(t){return{fakeFocus:!0,onHighlightItem:function(n,e,o){t.previewing.get()?t.lazyTypeaheadComp.get().each((function(n){gD(t.model,n,o).fold((function(){t.model.selectsOver?(Wm.dehighlight(e,o),t.previewing.set(!0)):t.previewing.set(!1)}),(function(n){n(),t.previewing.set(!1)}))})):t.lazyTypeaheadComp.get().each((function(n){t.model.populateFromBrowse&&fD(t.model,n,o),Vn(o.element,"id").each((function(t){return Fn(n.element,"aria-activedescendant",t)}))}))},onExecute:function(n,e){return t.lazyTypeaheadComp.get().map((function(t){return nu(t,pD(),{item:e}),!0}))},onHover:function(n,e){t.previewing.set(!1),t.lazyTypeaheadComp.get().each((function(n){t.model.populateFromBrowse&&fD(t.model,n,e)}))}}}})]),bD=gm({name:"Typeahead",configFields:hD(),partFields:vD(),factory:function(t,n,o,r){var i,u=function(n,e,o){t.previewing.set(!1);var i=Fk.getCoupled(n,"sandbox");if(Wf.isOpen(i))bm.getCurrent(i).each((function(t){Wm.getHighlighted(t).fold((function(){o(t)}),(function(){iu(i,t.element,"keydown",e)}))}));else{jk(t,c(n),n,i,r,(function(t){bm.getCurrent(t).each(o)}),mg.HighlightMenuAndItem).get(_)}},a=jy(t),c=function(t){return function(n){return n.map((function(n){var e=_t(n.menus),o=rt(e,(function(t){return Z(t.items,(function(t){return"item"===t.type}))}));return sd.getState(t).update(K(o,(function(t){return t.data}))),n}))}},s=function(t){return bm.getCurrent(t)},l="typeaheadevents",f=[nh.config({}),sd.config({onSetValue:t.onSetValue,store:e({mode:"dataset",getDataKey:function(t){return ba(t.element)},getFallbackEntry:function(t){return{value:t,meta:{}}},setValue:function(n,e){ya(n.element,t.model.getDisplayText(e))}},t.initialData.map((function(t){return Kr("initialValue",t)})).getOr({}))}),lD.config({stream:{mode:"throttle",delay:t.responseTime,stopEvent:!1},onStream:function(n,e){var o=Fk.getCoupled(n,"sandbox");if(nh.isFocused(n)&&ba(n.element).length>=t.minChars){var i=s(o).bind((function(t){return Wm.getHighlighted(t).map(sd.getValue)}));t.previewing.set(!0);jk(t,c(n),n,o,r,(function(n){s(o).each((function(n){i.fold((function(){t.model.selectsOver&&Wm.highlightFirst(n)}),(function(t){Wm.highlightBy(n,(function(n){return sd.getValue(n).value===t.value})),Wm.getHighlighted(n).orThunk((function(){return Wm.highlightFirst(n),z.none()}))}))}))}),mg.HighlightJustMenu).get(_)}},cancelEvent:Vi()}),Hp.config({mode:"special",onDown:function(t,n){return u(t,n,Wm.highlightFirst),z.some(!0)},onEscape:function(t){var n=Fk.getCoupled(t,"sandbox");return Wf.isOpen(n)?(Wf.close(n),z.some(!0)):z.none()},onUp:function(t,n){return u(t,n,Wm.highlightLast),z.some(!0)},onEnter:function(n){var e=Fk.getCoupled(n,"sandbox"),o=Wf.isOpen(e);if(o&&!t.previewing.get())return s(e).bind((function(t){return Wm.getHighlighted(t)})).map((function(t){return nu(n,pD(),{item:t}),!0}));var r=sd.getValue(n);return tu(n,Vi()),t.onExecute(e,n,r),o&&Wf.close(e),z.some(!0)}}),sh.config({toggleClass:t.markers.openClass,aria:{mode:"expanded"}}),Fk.config({others:{sandbox:function(n){return Jk(t,n,{onOpen:function(){return sh.on(n)},onClose:function(){t.lazyTypeaheadComp.get().each((function(t){return Ln(t.element,"aria-activedescendant")})),sh.off(n)}})}}}),Jp(l,[vu((function(n){t.lazyTypeaheadComp.set(z.some(n))})),bu((function(n){t.lazyTypeaheadComp.set(z.none())})),xu((function(n){var e=_;qk(t,c(n),n,r,e,mg.HighlightMenuAndItem).get(_)})),su(pD(),(function(n,e){var o=Fk.getCoupled(n,"sandbox");fD(t.model,n,e.event.item),tu(n,Vi()),t.onItemExecute(n,o,e.event.item,sd.getValue(n)),Wf.close(o),mD(n)}))].concat(t.dismissOnBlur?[su(Di(),(function(t){var n=Fk.getCoupled(t,"sandbox");gs(n.element).isNone()&&Wf.close(n)}))]:[]))],d=e(((i={})[ji()]=[sd.name(),lD.name(),l],i),t.eventOrder);return{uid:t.uid,dom:qy(Ao(t,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:e(e({},a),dd(t.typeaheadBehaviours,f)),eventOrder:d}}}),yD=function(t){return e(e({},t),{toCached:function(){return yD(t.toCached())},bindFuture:function(n){return yD(t.bind((function(t){return t.fold((function(t){return Hk(mo.error(t))}),(function(t){return n(t)}))})))},bindResult:function(n){return yD(t.map((function(t){return t.bind(n)})))},mapResult:function(n){return yD(t.map((function(t){return t.map(n)})))},mapError:function(n){return yD(t.map((function(t){return t.mapError(n)})))},foldResult:function(n,e){return t.map((function(t){return t.fold(n,e)}))},withTimeout:function(n,e){return yD(Lk((function(o){var r=!1,i=setTimeout((function(){r=!0,o(mo.error(e()))}),n);t.get((function(t){r||(clearTimeout(i),o(t))}))})))}})},xD=function(t){return yD(Lk(t))},wD=xD,SD=function(t,n,o,r,i,u){void 0===o&&(o=[]);var a=n.fold((function(){return{}}),(function(t){return{action:t}})),c=e({buttonBehaviours:es([Fw((function(){return!t.enabled||u.isDisabled()})),Bw(),LO.config({}),Jp("button press",[cu("click"),cu("mousedown")])].concat(o)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]}},a),s=Ao(c,{dom:r});return Ao(s,{components:i})},kD=function(t,n,e,o){void 0===o&&(o=[]);var r={tag:"button",classes:["tox-tbtn"],attributes:t.tooltip.map((function(t){return{"aria-label":e.translate(t),title:e.translate(t)}})).getOr({})},i=t.icon.map((function(t){return iE(t,e.icons)})),u=Uw([i]);return SD(t,n,o,r,u,e)},OD=function(t){switch(t){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];default:return["tox-button","tox-button--secondary"]}},CD=function(t,n,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=e.translate(t.text),a=t.icon.map((function(t){return iE(t,e.icons)})),c=[a.getOrThunk((function(){return Ba(i)}))],s=t.buttonType.getOr(t.primary||t.borderless?"primary":"secondary"),l=OD(s),f=u(u(u(u([],l,!0),a.isSome()?["tox-button--icon"]:[],!0),t.borderless?["tox-button--naked"]:[],!0),r,!0);return SD(t,n,o,{tag:"button",classes:f,attributes:{title:i}},c,e)},_D=function(t,n,e,o,r){void 0===o&&(o=[]),void 0===r&&(r=[]);var i=CD(t,z.some(n),e,o,r);return Uh.sketch(i)},TD=function(t,n){return function(e){"custom"===n?nu(e,XO,{name:t,value:{}}):"submit"===n?tu(e,KO):"cancel"===n?tu(e,YO):console.error("Unknown button type: ",n)}},ED=function(t,n,o){if(function(t,n){return"menu"===n}(0,n)){var r=t,i=e(e({},t),{type:"menubutton",search:z.none(),onSetup:function(n){return n.setEnabled(t.enabled),_},fetch:KE(r.items,(function(){return a}),o)}),a=jh(XE(i,"tox-tbtn",o,z.none()));return a.asSpec()}if(function(t,n){return"custom"===n||"cancel"===n||"submit"===n}(0,n)){var c=TD(t.name,n),s=e(e({},t),{borderless:!1});return _D(s,c,o.shared.providers,[])}if(function(t,n){return"togglebutton"===n}(0,n))return function(t,n){var o,r,i=t.icon.map((function(t){return uE(t,n.icons)})).map(jh),a=t.buttonType.getOr(t.primary?"primary":"secondary"),c=e(e({},t),{name:null!==(o=t.name)&&void 0!==o?o:"",primary:"primary"===a,tooltip:z.from(t.tooltip),enabled:null!==(r=t.enabled)&&void 0!==r&&r,borderless:!1}),s=c.tooltip.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({}),l=OD(null!=a?a:"secondary"),f=t.icon.isSome()&&t.text.isSome(),d={tag:"button",classes:u(u(u([],l.concat(t.icon.isSome()?["tox-button--icon"]:[]),!0),t.active?["tox-button--enabled"]:[],!0),f?["tox-button--icon-and-text"]:[],!0),attributes:s},m=n.translate(t.text.getOr("")),g=Ba(m),p=Uw([i.map((function(t){return t.asSpec()}))]),h=u(u([],p,!0),t.text.isSome()?[g]:[],!0),v=SD(c,z.some((function(e){nu(e,XO,{name:t.name,value:{setIcon:function(t){i.map((function(o){return o.getOpt(e).each((function(e){Kp.set(e,[uE(t,n.icons)])}))}))}}})})),[],d,h,n);return Uh.sketch(v)}(t,o.shared.providers);throw console.error("Unknown footer button type: ",n),new Error("Unknown footer button type")},DD=function(t,n){var o,r,i=TD(t.name,"custom");return o=z.none(),r=NO.parts.field(e({factory:Uh},CD(t,z.some(i),n,[ST(""),hT()]))),PO(o,r,[],[])},AD={type:"separator"},MD=function(t){return{type:"menuitem",value:t.url,text:t.title,meta:{attach:t.attach},onAction:_}},BD=function(t,n){return{type:"menuitem",value:n,text:t,meta:{attach:void 0},onAction:_}},ID=function(t,n){return function(t){return K(t,MD)}(function(t,n){return Z(n,(function(n){return n.type===t}))}(t,n))},FD=function(t){return ID("header",t.targets)},RD=function(t){return ID("anchor",t.targets)},ND=function(t){return z.from(t.anchorTop).map((function(t){return BD("<top>",t)})).toArray()},VD=function(t){return z.from(t.anchorBottom).map((function(t){return BD("<bottom>",t)})).toArray()},zD=function(t,n){var e=t.toLowerCase();return Z(n,(function(t){var n,o=void 0!==t.meta&&void 0!==t.meta.text?t.meta.text:t.text,r=null!==(n=t.value)&&void 0!==n?n:"";return Vt(o.toLowerCase(),e)||Vt(r.toLowerCase(),e)}))},LD=function(t,n,e){var o,r,i=sd.getValue(n),u=null!==(r=null===(o=null==i?void 0:i.meta)||void 0===o?void 0:o.text)&&void 0!==r?r:i.value;return e.getLinkInformation().fold((function(){return[]}),(function(n){var o,r=zD(u,function(t){return K(t,(function(t){return BD(t,t)}))}(e.getHistory(t)));return"file"===t?(o=[r,zD(u,FD(n)),zD(u,ot([ND(n),RD(n),VD(n)]))],tt(o,(function(t,n){return 0===t.length||0===n.length?t.concat(n):t.concat(AD,n)}),[])):r}))},HD=Du("aria-invalid"),PD=function(t,n){t.dom.checked=n},UD=function(t){return t.dom.checked},WD=function(t){return function(n,e,o,r){return Tt(e,"name").fold((function(){return t(e,r,z.none())}),(function(i){return n.field(i,t(e,r,Tt(o,i)))}))}},jD={bar:WD((function(t,n){return function(t,n){return{dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:K(t.items,n.interpreter)}}(t,n.shared)})),collection:WD((function(t,n,e){return tC(t,n.shared.providers,e)})),alertbanner:WD((function(t,n){return function(t,n){var e=rb(t.icon,n.icons);return BO.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in","tox-notification--".concat(t.level)]},components:[{dom:{tag:"div",classes:["tox-notification__icon"],innerHtml:t.url?void 0:e},components:t.url?[Uh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:e,attributes:{title:n.translate(t.iconTooltip)}},action:function(n){return nu(n,XO,{name:"alert-banner",value:t.url})},buttonBehaviours:es([ib()])})]:void 0},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:n.translate(t.text)}}]})}(t,n.shared.providers)})),input:WD((function(t,n,e){return function(t,n,e){return DE({name:t.name,multiline:!1,label:t.label,inputMode:t.inputMode,placeholder:t.placeholder,flex:!1,disabled:!t.enabled,classname:"tox-textfield",validation:z.none(),maximized:t.maximized,data:e},n)}(t,n.shared.providers,e)})),textarea:WD((function(t,n,e){return function(t,n,e){return DE({name:t.name,multiline:!0,label:t.label,inputMode:z.none(),placeholder:t.placeholder,flex:!0,disabled:!t.enabled,classname:"tox-textarea",validation:z.none(),maximized:t.maximized,data:e},n)}(t,n.shared.providers,e)})),label:WD((function(t,n){return function(t,n){var e,o="tox-label",r="center"===t.align?["".concat(o,"--center")]:[],i="end"===t.align?["".concat(o,"--end")]:[],a={dom:{tag:"label",classes:u(u([o],r,!0),i,!0)},components:[Ba(n.providers.translate(t.label))]},c=K(t.items,n.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:u([a],c,!0),behaviours:es([hT(),Kp.config({}),(e=z.none(),wT(e,wu,Su)),Hp.config({mode:"acyclic"})])}}(t,n.shared)})),iframe:function(t){return function(n,e,o,r){var i=Ao(e,{source:"dynamic"});return WD(t)(n,i,o,r)}}((function(t,n,e){return ZT(t,n.shared.providers,e)})),button:WD((function(t,n){return DD(t,n.shared.providers)})),checkbox:WD((function(t,n,e){return function(t,n,e){var o=function(t){return t.element.dom.click(),z.some(!0)},r=NO.parts.field({factory:{sketch:A},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:es([hT(),Bm.config({disabled:function(){return!t.enabled||n.isDisabled()},onDisabled:function(t){pn(t.element).each((function(t){return la(t,"tox-checkbox--disabled")}))},onEnabled:function(t){pn(t.element).each((function(t){return da(t,"tox-checkbox--disabled")}))}}),LO.config({}),nh.config({}),wT(e,UD,PD),Hp.config({mode:"special",onEnter:o,onSpace:o,stopSpaceKeyup:!0}),Jp("checkbox-events",[su(xi(),(function(n,e){nu(n,GO,{name:t.name})}))])])}),i=NO.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[Ba(n.translate(t.label))],behaviours:es([dC.config({})])}),u=function(t){return ab("checked"===t?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+t]},n.icons)},a=jh({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[u("checked"),u("unchecked")]});return NO.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[r,a.asSpec(),i],fieldBehaviours:es([Bm.config({disabled:function(){return!t.enabled||n.isDisabled()}}),Bw()])})}(t,n.shared.providers,e)})),colorinput:WD((function(t,n,e){return hC(t,n.shared,n.colorinput,e)})),colorpicker:WD((function(t,n,e){return OT(0,n.shared.providers,e)})),dropzone:WD((function(t,n,e){return TT(t,n.shared.providers,e)})),grid:WD((function(t,n){return function(t,n){return{dom:{tag:"div",classes:["tox-form__grid","tox-form__grid--".concat(t.columns,"col")]},components:K(t.items,n.interpreter)}}(t,n.shared)})),listbox:WD((function(t,n,e){return function(t,n,e){var o=n.shared.providers,r=e.bind((function(n){return yE(t.items,n)})).orThunk((function(){return dt(t.items).filter(hE)})),i=t.label.map((function(t){return jO(t,o)})),u=NO.parts.field({dom:{},factory:{sketch:function(e){return lE({uid:e.uid,text:r.map((function(t){return t.text})),icon:z.none(),tooltip:t.label,role:z.none(),fetch:function(e,o){var r=bE(e,t.name,t.items,sd.getValue(e));o(pE(r,Oy.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!1,search:z.none()}))},onSetup:D(_),getApi:D({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[LO.config({}),xT(r.map((function(t){return t.value})),(function(t){return Nn(t.element,vE)}),(function(n,e){yE(t.items,e).each((function(t){Fn(n.element,vE,t.value),nu(n,cE,{text:t.text})}))}))]},"tox-listbox",n.shared)}}}),a={dom:{tag:"div",classes:["tox-listboxfield"]},components:[u]};return NO.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:ot([i.toArray(),[a]]),fieldBehaviours:es([Bm.config({disabled:D(!t.enabled),onDisabled:function(t){NO.getField(t).each(Bm.disable)},onEnabled:function(t){NO.getField(t).each(Bm.enable)}})])})}(t,n,e)})),selectbox:WD((function(t,n,o){return function(t,n,o){var r=K(t.items,(function(t){return{text:n.translate(t.text),value:t.value}})),i=t.label.map((function(t){return jO(t,n)})),u=NO.parts.field(e(e({dom:{}},o.map((function(t){return{data:t}})).getOr({})),{selectAttributes:{size:t.size},options:r,factory:xE,selectBehaviours:es([Bm.config({disabled:function(){return!t.enabled||n.isDisabled()}}),LO.config({}),Jp("selectbox-change",[su(xi(),(function(n,e){nu(n,GO,{name:t.name})}))])])})),a=t.size>1?z.none():z.some(ab("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},n.icons)),c={dom:{tag:"div",classes:["tox-selectfield"]},components:ot([[u],a.toArray()])};return NO.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:ot([i.toArray(),[c]]),fieldBehaviours:es([Bm.config({disabled:function(){return!t.enabled||n.isDisabled()},onDisabled:function(t){NO.getField(t).each(Bm.disable)},onEnabled:function(t){NO.getField(t).each(Bm.enable)}}),Bw()])})}(t,n.shared.providers,o)})),sizeinput:WD((function(t,n){return function(t,n){var e=TE,o=Du("ratio-event"),r=function(t){return ab(t,{tag:"span",classes:["tox-icon","tox-lock-icon__"+t]},n.icons)},i=OE.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:n.translate(t.label.getOr("Constrain proportions"))}},components:[r("lock"),r("unlock")],buttonBehaviours:es([Bm.config({disabled:function(){return!t.enabled||n.isDisabled()}}),Bw(),LO.config({})])}),u=function(t){return{dom:{tag:"div",classes:["tox-form__group"]},components:t}},a=function(e){return NO.parts.field({factory:Yy,inputClasses:["tox-textfield"],inputBehaviours:es([Bm.config({disabled:function(){return!t.enabled||n.isDisabled()}}),Bw(),LO.config({}),Jp("size-input-events",[su(pi(),(function(t,n){nu(t,o,{isField1:e})})),su(xi(),(function(n,e){nu(n,GO,{name:t.name})}))])]),selectOnFocus:!1})},c=function(t){return{dom:{tag:"label",classes:["tox-label"]},components:[Ba(n.translate(t))]}},s=OE.parts.field1(u([NO.parts.label(c("Width")),a(!0)])),l=OE.parts.field2(u([NO.parts.label(c("Height")),a(!1)]));return OE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[s,l,u([c(" "),i])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:function(t,n,o){CE(sd.getValue(t)).each((function(t){e(t).each((function(t){sd.setValue(n,function(t){var n,e={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4},o=t.value.toFixed((n=t.unit)in e?e[n]:1);return-1!==o.indexOf(".")&&(o=o.replace(/\.?0*$/,"")),o+t.unit}(t))}))}))},coupledFieldBehaviours:es([Bm.config({disabled:function(){return!t.enabled||n.isDisabled()},onDisabled:function(t){OE.getField1(t).bind(NO.getField).each(Bm.disable),OE.getField2(t).bind(NO.getField).each(Bm.disable),OE.getLock(t).each(Bm.disable)},onEnabled:function(t){OE.getField1(t).bind(NO.getField).each(Bm.enable),OE.getField2(t).bind(NO.getField).each(Bm.enable),OE.getLock(t).each(Bm.enable)}}),Bw(),Jp("size-input-events2",[su(o,(function(t,n){var o=n.event.isField1,r=o?OE.getField1(t):OE.getField2(t),i=o?OE.getField2(t):OE.getField1(t),u=r.map(sd.getValue).getOr(""),a=i.map(sd.getValue).getOr("");e=EE(u,a)}))])])})}(t,n.shared.providers)})),slider:WD((function(t,n,e){return function(t,n,e){var o=tT.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ba(n.translate(t.label))]}),r=tT.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),i=tT.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return tT.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:t.min,maxX:t.max,getInitialValue:D(e.getOrThunk((function(){return(Math.abs(t.max)-Math.abs(t.min))/2})))},components:[o,r,i],sliderBehaviours:es([hT(),nh.config({})]),onChoose:function(n,e,o){nu(n,GO,{name:t.name,value:o})}})}(t,n.shared.providers,e)})),urlinput:WD((function(t,n,o){return function(t,n,o,r){var i,a=n.shared.providers,c=function(n){var e=sd.getValue(n);o.addToHistory(e.value,t.filetype)},s=e(e({},r.map((function(t){return{initialData:t}})).getOr({})),{dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":HD,type:"url"},minChars:0,responseTime:0,fetch:function(e){var r=LD(t.filetype,e,o),i=pE(r,Oy.BUBBLE_TO_SANDBOX,n,{isHorizontalMenu:!1,search:z.none()});return Hk(i)},getHotspot:function(t){return h.getOpt(t)},onSetValue:function(t,n){t.hasConfigured(lC)&&lC.run(t).get(_)},typeaheadBehaviours:es(u(u([],o.getValidationHandler().map((function(n){return lC.config({getRoot:function(t){return pn(t.element)},invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:function(t,n){d.getOpt(t).each((function(t){Fn(t.element,"title",a.translate(n))}))}},validator:{validate:function(e){var o=sd.getValue(e);return wD((function(e){n({type:t.filetype,url:o.value},(function(t){if("invalid"===t.status){var n=mo.error(t.message);e(n)}else{var o=mo.value(t.message);e(o)}}))}))},validateOnLoad:!1}})})).toArray(),!0),[Bm.config({disabled:function(){return!t.enabled||a.isDisabled()}}),LO.config({}),Jp("urlinput-events",[su(yi(),(function(n){var e=ba(n.element),o=e.trim();o!==e&&ya(n.element,o),"file"===t.filetype&&nu(n,GO,{name:t.name})})),su(xi(),(function(n){nu(n,GO,{name:t.name}),c(n)})),su(Ai(),(function(n){nu(n,GO,{name:t.name}),c(n)}))])],!1)),eventOrder:(i={},i[yi()]=["streaming","urlinput-events","invalidating"],i),model:{getDisplayText:function(t){return t.value},selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:n.shared.getSink,parts:{menu:Uy(0,0,"normal")},onExecute:function(t,n,e){nu(n,KO,{})},onItemExecute:function(n,e,o,r){c(n),nu(n,GO,{name:t.name})}}),l=NO.parts.field(e(e({},s),{factory:bD})),f=t.label.map((function(t){return jO(t,a)})),d=jh(function(t,n,o,r){return void 0===o&&(o=t),void 0===r&&(r=t),ab(o,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+t],attributes:e({title:a.translate(r),"aria-live":"polite"},n.fold((function(){return{}}),(function(t){return{id:t}})))},a.icons)}("invalid",z.some(HD),"warning")),m=jh({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[d.asSpec()]}),g=o.getUrlPicker(t.filetype),p=Du("browser.url.event"),h=jh({dom:{tag:"div",classes:["tox-control-wrap"]},components:[l,m.asSpec()],behaviours:es([Bm.config({disabled:function(){return!t.enabled||a.isDisabled()}})])}),v=jh(_D({name:t.name,icon:z.some("browse"),text:t.picker_text.or(t.label).getOr(""),enabled:t.enabled,primary:!1,buttonType:z.none(),borderless:!0},(function(t){return tu(t,p)}),a,[],["tox-browse-url"]));return NO.sketch({dom:WO([]),components:f.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:ot([[h.asSpec()],g.map((function(){return v.asSpec()})).toArray()])}]),fieldBehaviours:es([Bm.config({disabled:function(){return!t.enabled||a.isDisabled()},onDisabled:function(t){NO.getField(t).each(Bm.disable),v.getOpt(t).each(Bm.disable)},onEnabled:function(t){NO.getField(t).each(Bm.enable),v.getOpt(t).each(Bm.enable)}}),Bw(),Jp("url-input-events",[su(p,(function(n){bm.getCurrent(n).each((function(o){var r=sd.getValue(o),i=e({fieldname:t.name},r);g.each((function(e){e(i).get((function(e){sd.setValue(o,e),nu(n,GO,{name:t.name})}))}))}))}))])])})}(t,n,n.urlinput,o)})),customeditor:WD((function(t){var n=Fs(),e=jh({dom:{tag:t.tag}}),o=Fs();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:es([Jp("custom-editor-events",[vu((function(r){e.getOpt(r).each((function(e){(!function(t){return Et(t,"init")}(t)?CT.load(t.scriptId,t.scriptUrl).then((function(n){return n(e.element.dom,t.settings)})):t.init(e.element.dom)).then((function(t){o.on((function(n){t.setValue(n)})),o.clear(),n.set(t)}))}))}))]),xT(z.none(),(function(){return n.get().fold((function(){return o.get().getOr("")}),(function(t){return t.getValue()}))}),(function(t,e){n.get().fold((function(){return o.set(e)}),(function(t){return t.setValue(e)}))})),hT()]),components:[e.asSpec()]}})),htmlpanel:WD((function(t){return"presentation"===t.presets?BO.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html}}):BO.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:t.html,attributes:{role:"document"}},containerBehaviours:es([LO.config({}),nh.config({})])})})),imagepreview:WD((function(t,n,e){return QT(t,e)})),table:WD((function(t,n){return function(t,n){var e,o,r=function(t){return{dom:{tag:"th",innerHtml:n.translate(t)}}},i=function(t){return{dom:{tag:"td",innerHtml:n.translate(t)}}},u=function(t){return{dom:{tag:"tr"},components:K(t,i)}};return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(o=t.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:K(o,r)}]}),(e=t.cells,{dom:{tag:"tbody"},components:K(e,u)})],behaviours:es([LO.config({}),nh.config({})])}}(t,n.shared.providers)})),tree:WD((function(t,n){return function(t,n){var e,o=t.onLeafAction.getOr(_),r=t.onToggleExpand.getOr(_),i=t.defaultExpandedIds,a=Gr(i),c=Gr(t.defaultSelectedId),s=Du("tree-id"),l=function(e,r){return t.items.map((function(t){return"leaf"===t.type?ZE({leaf:t,selectedId:e,onLeafAction:o,visible:!0,treeId:s,backstage:n}):rD({directory:t,selectedId:e,onLeafAction:o,expandedIds:r,labelTabstopping:!0,treeId:s,backstage:n})}))};return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:l(c.get(),a.get()),behaviours:es([Hp.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1}),Jp(iD,[su("expand-tree-node",(function(t,n){var e=n.event,o=e.expanded,i=e.node;a.set(o?u(u([],a.get(),!0),[i],!1):a.get().filter((function(t){return t!==i}))),r(a.get(),{expanded:o,node:i})}))]),cs.config({channels:(e={},e["update-active-item-".concat(s)]={onReceive:function(t,n){c.set(z.some(n.value)),Kp.set(t,l(z.some(n.value),a.get()))}},e)}),Kp.config({})])}}(t,n)})),panel:WD((function(t,n){return function(t,n){return{dom:{tag:"div",classes:t.classes},components:K(t.items,n.shared.interpreter)}}(t,n)}))},GD={field:function(t,n){return n},record:D([])},qD=function(t,n,e,o){var r=Ao(o,{shared:{interpreter:function(n){return YD(t,n,e,r)}}});return YD(t,n,e,r)},YD=function(t,n,e,o){return Tt(jD,n.type).fold((function(){return console.error('Unknown factory type "'.concat(n.type,'", defaulting to container: '),n),n}),(function(r){return r(t,n,e,o)}))},XD=function(t,n,e){return YD(GD,t,n,e)},KD="layout-inset",JD=function(t){return t.x},$D=function(t,n){return t.x+t.width/2-n.width/2},ZD=function(t,n){return t.x+t.width-n.width},QD=function(t){return t.y},tA=function(t,n){return t.y+t.height-n.height},nA=function(t,n){return t.y+t.height/2-n.height/2},eA=function(t,n,e){return hc(ZD(t,n),tA(t,n),e.insetSouthwest(),wc(),"southwest",Ec(t,{right:0,bottom:3}),KD)},oA=function(t,n,e){return hc(JD(t),tA(t,n),e.insetSoutheast(),xc(),"southeast",Ec(t,{left:1,bottom:3}),KD)},rA=function(t,n,e){return hc(ZD(t,n),QD(t),e.insetNorthwest(),yc(),"northwest",Ec(t,{right:0,top:2}),KD)},iA=function(t,n,e){return hc(JD(t),QD(t),e.insetNortheast(),bc(),"northeast",Ec(t,{left:1,top:2}),KD)},uA=function(t,n,e){return hc($D(t,n),QD(t),e.insetNorth(),Sc(),"north",Ec(t,{top:2}),KD)},aA=function(t,n,e){return hc($D(t,n),tA(t,n),e.insetSouth(),kc(),"south",Ec(t,{bottom:3}),KD)},cA=function(t,n,e){return hc(ZD(t,n),nA(t,n),e.insetEast(),Cc(),"east",Ec(t,{right:0}),KD)},sA=function(t,n,e){return hc(JD(t),nA(t,n),e.insetWest(),Oc(),"west",Ec(t,{left:1}),KD)},lA=function(t){switch(t){case"north":return uA;case"northeast":return iA;case"northwest":return rA;case"south":return aA;case"southeast":return oA;case"southwest":return eA;case"east":return cA;case"west":return sA}},fA=function(t,n,e,o,r){return Ds(o).map(lA).getOr(uA)(t,n,e,o,r)},dA=function(t){switch(t){case"north":return aA;case"northeast":return oA;case"northwest":return eA;case"south":return uA;case"southeast":return iA;case"southwest":return rA;case"east":return sA;case"west":return cA}},mA=function(t,n,e,o,r){return Ds(o).map(dA).getOr(uA)(t,n,e,o,r)},gA={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},pA=function(t,n,e){var o={maxHeightFunction:Ks()};return function(){return e()?{type:"node",root:_n(Cn(t())),node:z.from(t()),bubble:Qs(12,12,gA),layouts:{onRtl:function(){return[iA]},onLtr:function(){return[rA]}},overrides:o}:{type:"hotspot",hotspot:n(),bubble:Qs(-12,12,gA),layouts:{onRtl:function(){return[Nc,Vc,Pc]},onLtr:function(){return[Vc,Nc,Pc]}},overrides:o}}},hA=function(t,n,e,o){var r={maxHeightFunction:Ks()};return function(){return o()?{type:"node",root:_n(Cn(n())),node:z.from(n()),bubble:Qs(12,12,gA),layouts:{onRtl:function(){return[uA]},onLtr:function(){return[uA]}},overrides:r}:t?{type:"node",root:_n(Cn(n())),node:z.from(n()),bubble:Qs(0,-ne(n()),gA),layouts:{onRtl:function(){return[Hc]},onLtr:function(){return[Hc]}},overrides:r}:{type:"hotspot",hotspot:e(),bubble:Qs(0,0,gA),layouts:{onRtl:function(){return[Hc]},onLtr:function(){return[Hc]}},overrides:r}}},vA=function(t,n,e){return function(){return e()?{type:"node",root:_n(Cn(t())),node:z.from(t()),layouts:{onRtl:function(){return[uA]},onLtr:function(){return[uA]}}}:{type:"hotspot",hotspot:n(),layouts:{onRtl:function(){return[Pc]},onLtr:function(){return[Pc]}}}}},bA=function(t,n){return function(){return{type:"selection",root:n(),getSelection:function(){var n=t.selection.getRng(),e=t.model.table.getSelectedCells();if(e.length>1){var o=e[0],r=e[e.length-1],i={firstCell:Gt.fromDom(o),lastCell:Gt.fromDom(r)};return z.some(i)}return z.some(Cl.range(Gt.fromDom(n.startContainer),n.startOffset,Gt.fromDom(n.endContainer),n.endOffset))}}}},yA=function(t){return function(n){return{type:"node",root:t(),node:n}}},xA=function(t,n,e,o){var r=fy(t),i=function(){return Gt.fromDom(t.getBody())},u=function(){return Gt.fromDom(t.getContentAreaContainer())},a=function(){return r||!o()};return{inlineDialog:pA(u,n,a),inlineBottomDialog:hA(t.inline,u,e,a),banner:vA(u,n,a),cursor:bA(t,i),node:yA(i)}},wA=function(t){return function(n,e){mk(t)(n,e)}},SA=function(t){return function(){return ZS(t)}},kA=function(t){return function(n){return XS(t,n)}},OA=function(t){return function(n){return $S(t,n)}},CA=function(t){return function(){return Gb(t)}},_A=function(t){return Dt(t,"items")},TA=function(t){return Dt(t,"format")},EA=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}],DA=function(t){return tt(t,(function(t,n){if(Et(n,"items")){var o=DA(n.items);return{customFormats:t.customFormats.concat(o.customFormats),formats:t.formats.concat([{title:n.title,items:o.formats}])}}if(function(t){return Et(t,"inline")}(n)||function(t){return Et(t,"block")}(n)||function(t){return Et(t,"selector")}(n)){var r=g(n.name)?n.name:n.title.toLowerCase(),i="custom-".concat(r);return{customFormats:t.customFormats.concat([{name:i,format:n}]),formats:t.formats.concat([{title:n.title,format:i,icon:n.icon}])}}return e(e({},t),{formats:t.formats.concat(n)})}),{customFormats:[],formats:[]})},AA=function(t){return Ob(t).map((function(n){var e=function(t,n){var e=DA(n),o=function(n){J(n,(function(n){t.formatter.has(n.name)||t.formatter.register(n.name,n.format)}))};return t.formatter?o(e.customFormats):t.on("init",(function(){o(e.customFormats)})),e.formats}(t,n);return Cb(t)?EA.concat(e):e})).getOr(EA)},MA=function(t,n,o){return e(e({},t),{type:"formatter",isSelected:n(t.format),getStylePreview:o(t.format)})},BA=function(t,n,o,r){var i=function(n){return K(n,(function(n){return _A(n)?function(t){var n=i(t.items);return e(e({},t),{type:"submenu",getStyleItems:D(n)})}(n):TA(n)?function(t){return MA(t,o,r)}(n):1===(u=ht(n)).length&&G(u,"title")?e(e({},n),{type:"separator"}):function(n){var i=g(n.name)?n.name:Du(n.title),u="custom-".concat(i),a=e(e({},n),{type:"formatter",format:u,isSelected:o(u),getStylePreview:r(u)});return t.formatter.register(i,a),a}(n);var u}))};return i(n)},IA=_T.trim,FA=function(t){return function(n){if(function(t){return S(t)&&1===t.nodeType}(n)){if(n.contentEditable===t)return!0;if(n.getAttribute("data-mce-contenteditable")===t)return!0}return!1}},RA=FA("true"),NA=FA("false"),VA=function(t,n,e,o,r){return{type:t,title:n,url:e,level:o,attach:r}},zA=function(t){return t.innerText||t.textContent},LA=function(t){return function(t){return t&&"A"===t.nodeName&&void 0!==(t.id||t.name)}(t)&&PA(t)},HA=function(t){return t&&/^(H[1-6])$/.test(t.nodeName)},PA=function(t){return function(t){for(var n=t;n=n.parentNode;){var e=n.contentEditable;if(e&&"inherit"!==e)return RA(n)}return!1}(t)&&!NA(t)},UA=function(t){return HA(t)&&PA(t)},WA=function(t){var n,e=function(t){return t.id?t.id:Du("h")}(t);return VA("header",null!==(n=zA(t))&&void 0!==n?n:"","#"+e,function(t){return HA(t)?parseInt(t.nodeName.substr(1),10):0}(t),(function(){t.id=e}))},jA=function(t){var n=t.id||t.name,e=zA(t);return VA("anchor",e||"#"+n,"#"+n,0,_)},GA=function(t){var n,e,o=(n="h1,h2,h3,h4,h5,h6,a:not([href])",e=t,K(Rl(Gt.fromDom(e),n),(function(t){return t.dom})));return o},qA=function(t){return IA(t.title).length>0},YA=function(t){var n=GA(t);return Z(function(t){return K(Z(t,UA),WA)}(n).concat(function(t){return K(Z(t,LA),jA)}(n)),qA)},XA="tinymce-url-history",KA=function(t){return g(t)&&/^https?/.test(t)},JA=function(t){return p(t)&&Ct(t,(function(t){return!(v(n=t)&&n.length<=5&&it(n,KA));var n})).isNone()},$A=function(){var t,n=RS.getItem(XA);if(null===n)return{};try{t=JSON.parse(n)}catch(t){if(t instanceof SyntaxError)return console.log("Local storage "+XA+" was not valid JSON",t),{};throw t}return JA(t)?t:(console.log("Local storage "+XA+" was not valid format",t),{})},ZA=function(t){var n=$A();return Tt(n,t).getOr([])},QA=function(t,n){if(KA(t)){var e=$A(),o=Tt(e,n).getOr([]),r=Z(o,(function(n){return n!==t}));e[n]=[t].concat(r).slice(0,5),function(t){if(!JA(t))throw new Error("Bad format for history:\n"+JSON.stringify(t));RS.setItem(XA,JSON.stringify(t))}(e)}},tM=function(t){return!!t},nM=function(t){return yt(_T.makeMap(t,/[, ]/),tM)},eM=function(t){return z.from(zb(t))},oM=function(t,n){var e=function(t){var n=z.from(Pb(t)).filter(tM).map(nM);return eM(t).fold(N,(function(t){return n.fold(V,(function(t){return ht(t).length>0&&t}))}))}(t);return y(e)?e?eM(t):z.none():e[n]?eM(t):z.none()},rM=function(t){return z.from(t).filter(g).getOrUndefined()},iM=function(t){return{getHistory:ZA,addToHistory:QA,getLinkInformation:function(){return function(t){return Ub(t)?z.some({targets:YA(t.getBody()),anchorTop:rM(Wb(t)),anchorBottom:rM(jb(t))}):z.none()}(t)},getValidationHandler:function(){return function(t){return z.from(Lb(t))}(t)},getUrlPicker:function(n){return function(t,n){return oM(t,n).map((function(o){return function(r){return Lk((function(i){var u=e({filetype:n,fieldname:r.fieldname},z.from(r.meta).getOr({}));o.call(t,(function(t,n){if(!g(t))throw new Error("Expected value to be string");if(void 0!==n&&!p(n))throw new Error("Expected meta to be a object");i({value:t,meta:n})}),r.value,u)}))}}))}(t,n)}}},uM=function(t,n,o,r){var i=Gr(!1),u=function(t){var n=Gr(sy(t)?"bottom":"top");return{isPositionedAtTop:function(){return"top"===n.get()},getDockingMode:n.get,setDockingMode:n.set}}(n),a={icons:function(){return n.ui.registry.getAll().icons},menuItems:function(){return n.ui.registry.getAll().menuItems},translate:Zv.translate,isDisabled:function(){return n.mode.isReadOnly()||!n.ui.isEnabled()},getOption:n.options.get},c=iM(n),s=function(t){var n=function(n){return function(){return t.formatter.match(n)}},e=function(n){return function(){var e=t.formatter.get(n);return void 0!==e?z.some({tag:e.length>0&&(e[0].inline||e[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(n))}):z.none()}},o=Gr([]),r=Gr([]),i=Gr(!1);return t.on("PreInit",(function(r){var i=AA(t),u=BA(t,i,n,e);o.set(u)})),t.on("addStyleModifications",(function(o){var u=BA(t,o.items,n,e);r.set(u),i.set(o.replace)})),{getData:function(){var t=i.get()?[]:o.get(),n=r.get();return t.concat(n)}}}(n),l=function(t){return{colorPicker:wA(t),hasCustomColors:SA(t),getColors:kA(t),getColorCols:OA(t)}}(n),f=function(t){return{isDraggableModal:CA(t)}}(n),d={shared:{providers:a,anchors:xA(n,o,r,u.isPositionedAtTop),header:u},urlinput:c,styles:s,colorinput:l,dialog:f,isContextMenuOpen:function(){return i.get()},setContextMenuState:function(t){return i.set(t)}},m=e(e({},d),{shared:e(e({},d.shared),{interpreter:function(t){return XD(t,{},m)},getSink:t.popup})}),g=e(e({},d),{shared:e(e({},d.shared),{interpreter:function(t){return XD(t,{},g)},getSink:t.dialog})});return{popup:m,dialog:g}},aM=am,cM=jd,sM=D([Nr("shell",!1),yr("makeItem"),Nr("setupItem",_),md("listBehaviours",[Kp])]),lM=Pd({name:"items",overrides:function(){return{behaviours:es([Kp.config({})])}}}),fM=D([lM]),dM=D("CustomList"),mM=gm({name:dM(),configFields:sM(),partFields:fM(),factory:function(t,n,e,o){var r=t.shell?{behaviours:[Kp.config({})],components:[]}:{behaviours:[],components:n},i=function(n){return t.shell?z.some(n):Qd(n,t,"items")};return{uid:t.uid,dom:t.dom,components:r.components,behaviours:dd(t.listBehaviours,r.behaviours),apis:{setItems:function(n,e){i(n).fold((function(){throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(function(o){var r=Kp.contents(o),i=e.length,u=i-r.length,a=u>0?Y(u,(function(){return t.makeItem()})):[],c=r.slice(i);J(c,(function(t){return Kp.remove(o,t)})),J(a,(function(t){return Kp.append(o,t)}));var s=Kp.contents(o);J(s,(function(o,r){t.setupItem(n,o,e[r],r)}))}))}}}},apis:{setItems:function(t,n,e){t.setItems(n,e)}}}),gM=D([yr("dom"),Nr("shell",!0),ld("toolbarBehaviours",[Kp])]),pM=D([Pd({name:"groups",overrides:function(){return{behaviours:es([Kp.config({})])}}})]),hM=gm({name:"Toolbar",configFields:gM(),partFields:pM(),factory:function(t,n,e,o){var r=function(n){return t.shell?z.some(n):Qd(n,t,"groups")},i=t.shell?{behaviours:[Kp.config({})],components:[]}:{behaviours:[],components:n};return{uid:t.uid,dom:t.dom,components:i.components,behaviours:dd(t.toolbarBehaviours,i.behaviours),apis:{setGroups:function(t,n){r(t).fold((function(){throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(function(t){Kp.set(t,n)}))},refresh:_},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)}}}),vM=_,bM=N,yM=D([]),xM=Object.freeze({__proto__:null,setup:vM,isDocked:bM,getBehaviours:yM}),wM=function(t){return(At(Yn(t,"position"),"fixed")?z.none():hn(t)).orThunk((function(){var n=Gt.fromTag("span");return gn(t).bind((function(t){qe(t,n);var e=hn(n);return Ke(n),e}))}))},SM=function(t){return wM(t).map(ie).getOrThunk((function(){return oe(0,0)}))},kM=function(t,n){var e=t.element;la(e,n.transitionClass),da(e,n.fadeOutClass),la(e,n.fadeInClass),n.onShow(t)},OM=function(t,n){var e=t.element;la(e,n.transitionClass),da(e,n.fadeInClass),la(e,n.fadeOutClass),n.onHide(t)},CM=function(t,n){return t.y>=n.y},_M=function(t,n){return t.bottom<=n.bottom},TM=function(t,n,e){return{location:"top",leftX:n,topY:e.bounds.y-t.y}},EM=function(t,n,e){return{location:"bottom",leftX:n,bottomY:t.bottom-e.bounds.bottom}},DM=function(t){return t.box.x-t.win.x},AM=function(t,n,e){return e.getInitialPos().map((function(e){var o=function(t,n){var e=n.optScrollEnv.fold(D(t.bounds.y),(function(n){return n.scrollElmTop+(t.bounds.y-n.currentScrollTop)}));return oe(t.bounds.x,e)}(e,n);return{box:ro(o.left,o.top,ce(t),te(t)),location:e.location}}))},MM=function(t,n,e,o,r){var i=function(t,n){var e=n.optScrollEnv.fold(D(t.y),(function(n){return t.y+n.currentScrollTop-n.scrollElmTop}));return oe(t.x,e)}(n,e),u=ro(i.left,i.top,n.width,n.height);o.setInitialPos({style:Xn(t),position:Gn(t,"position")||"static",bounds:u,location:r.location})},BM=function(t,n,e){return e.getInitialPos().bind((function(o){var r;switch(e.clearInitialPos(),o.position){case"static":return z.some({morph:"static"});case"absolute":var i=wM(t).getOr(Mn()),u=io(i),a=null!==(r=i.dom.scrollTop)&&void 0!==r?r:0;return z.some({morph:"absolute",positionCss:hs("absolute",Tt(o.style,"left").map((function(t){return n.x-u.x})),Tt(o.style,"top").map((function(t){return n.y-u.y+a})),Tt(o.style,"right").map((function(t){return u.right-n.right})),Tt(o.style,"bottom").map((function(t){return u.bottom-n.bottom})))});default:return z.none()}}))},IM=function(t,n,e){return AM(t,n,e).filter((function(t){var o=t.box;return function(t,n,e){return it(t,(function(t){switch(t){case"bottom":return _M(n,e.bounds);case"top":return CM(n,e.bounds)}}))}(e.getModes(),o,n)})).bind((function(n){var o=n.box;return BM(t,o,e)}))},FM=function(t){switch(t.location){case"top":return z.some({morph:"fixed",positionCss:hs("fixed",z.some(t.leftX),z.some(t.topY),z.none(),z.none())});case"bottom":return z.some({morph:"fixed",positionCss:hs("fixed",z.some(t.leftX),z.none(),z.none(),z.some(t.bottomY))});default:return z.none()}},RM=function(t,n,e){var o=io(t),r=co(),i=function(t,n,e){var o=n.win,r=n.box,i=DM(n);return pt(t,(function(t){switch(t){case"bottom":return _M(r,e.bounds)?z.none():z.some(EM(o,i,e));case"top":return CM(r,e.bounds)?z.none():z.some(TM(o,i,e));default:return z.none()}})).getOr({location:"no-dock"})}(e.getModes(),{win:r,box:o},n);return"top"===i.location||"bottom"===i.location?(MM(t,o,n,e,i),FM(i)):z.none()},NM=function(t,n,e){var o=t.element;return At(Yn(o,"position"),"fixed")?function(t,n,e){return IM(t,n,e).orThunk((function(){return n.optScrollEnv.bind((function(o){return AM(t,n,e)})).bind((function(t){var e=t.box,o=t.location,r=co(),i=DM({win:r,box:e}),u="top"===o?TM(r,i,n):EM(r,i,n);return FM(u)}))}))}(o,n,e):RM(o,n,e)},VM=function(t,n,e,o){var r=io(t),i=co(),u=o(i,DM({win:i,box:r}),n);return"bottom"===u.location||"top"===u.location?(function(t,n,e,o,r){o.getInitialPos().fold((function(){return MM(t,n,e,o,r)}),(function(){return _}))}(t,r,n,e,u),FM(u)):z.none()},zM=function(t,n,e){e.setDocked(!1),J(["left","right","top","bottom","position"],(function(n){return Jn(t.element,n)})),n.onUndocked(t)},LM=function(t,n,e,o){var r="fixed"===o.position;e.setDocked(r),vs(t.element,o),(r?n.onDocked:n.onUndocked)(t)},HM=function(t,n,e,o,r){void 0===r&&(r=!1),n.contextual.each((function(n){n.lazyContext(t).each((function(i){var u=function(t,n){return t.y<n.bottom&&t.bottom>n.y}(i,o.bounds);u!==e.isVisible()&&(e.setVisible(u),r&&!u?(pa(t.element,[n.fadeOutClass]),n.onHide(t)):(u?kM:OM)(t,n))}))}))},PM=function(t,n,e,o,r){HM(t,n,e,o,!0),LM(t,n,e,r.positionCss)},UM=function(t,n,e){var o=n.lazyViewport(t);HM(t,n,e,o),NM(t,o,e).each((function(r){!function(t,n,e,o,r){switch(r.morph){case"static":return zM(t,n,e);case"absolute":return LM(t,n,e,r.positionCss);case"fixed":PM(t,n,e,o,r)}}(t,n,e,o,r)}))},WM=function(t,n,e){var o=t.element;e.setDocked(!1);var r=n.lazyViewport(t);(function(t,n,e){var o=t.element;return AM(o,n,e).bind((function(t){var n=t.box;return BM(o,n,e)}))})(t,r,e).each((function(o){switch(o.morph){case"static":zM(t,n,e);break;case"absolute":LM(t,n,e,o.positionCss)}})),e.setVisible(!0),n.contextual.each((function(n){ha(o,[n.fadeInClass,n.fadeOutClass,n.transitionClass]),n.onShow(t)})),jM(t,n,e)},jM=function(t,n,e){t.getSystem().isConnected()&&UM(t,n,e)},GM=function(t,n,e){e.isDocked()&&WM(t,n,e)},qM=function(t){return function(n,e,o){var r=e.lazyViewport(n);VM(n.element,r,o,t).each((function(t){PM(n,e,o,r,t)}))}},YM=qM(TM),XM=qM(EM),KM=Object.freeze({__proto__:null,refresh:jM,reset:GM,isDocked:function(t,n,e){return e.isDocked()},getModes:function(t,n,e){return e.getModes()},setModes:function(t,n,e,o){return e.setModes(o)},forceDockToTop:YM,forceDockToBottom:XM}),JM=Object.freeze({__proto__:null,events:function(t,n){return uu([hu(ki(),(function(e,o){t.contextual.each((function(t){ga(e.element,t.transitionClass)&&(ha(e.element,[t.transitionClass,t.fadeInClass]),(n.isVisible()?t.onShown:t.onHidden)(e));o.stop()}))})),su(Pi(),(function(e,o){jM(e,t,n)})),su(Ki(),(function(e,o){jM(e,t,n)})),su(Ui(),(function(e,o){GM(e,t,n)}))])}}),$M=[Rr("contextual",[Sr("fadeInClass"),Sr("fadeOutClass"),Sr("transitionClass"),Or("lazyContext"),sc("onShow"),sc("onShown"),sc("onHide"),sc("onHidden")]),Ur("lazyViewport",(function(){return{bounds:co(),optScrollEnv:z.none()}})),Wr("modes",["top","bottom"],nr),sc("onDocked"),sc("onUndocked")],ZM=rs({fields:$M,name:"docking",active:JM,apis:KM,state:Object.freeze({__proto__:null,init:function(t){var n=Gr(!1),e=Gr(!0),o=Fs(),r=Gr(t.modes);return Yu({isDocked:n.get,setDocked:n.set,getInitialPos:o.get,setInitialPos:o.set,clearInitialPos:o.clear,isVisible:e.get,setVisible:e.set,getModes:r.get,setModes:r.set,readState:function(){return"docked: ".concat(n.get(),", visible: ").concat(e.get(),", modes: ").concat(r.get().join(","))}})}})}),QM=D(Du("toolbar-height-change")),tB={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},nB="tox-tinymce--toolbar-sticky-on",eB="tox-tinymce--toolbar-sticky-off",oB=function(t,n){return G(ZM.getModes(t),n)},rB=function(t){var n=t.element;pn(n).each((function(e){var o="padding-"+ZM.getModes(t)[0];if(ZM.isDocked(t)){var r=ce(e);Un(n,"width",r+"px"),Un(e,o,function(t){return ne(t)+(parseInt(Gn(t,"margin-top"),10)||0)+(parseInt(Gn(t,"margin-bottom"),10)||0)}(n)+"px")}else Jn(n,"width"),Jn(e,o)}))},iB=function(t,n){n?(da(t,tB.fadeOutClass),pa(t,[tB.transitionClass,tB.fadeInClass])):(da(t,tB.fadeInClass),pa(t,[tB.fadeOutClass,tB.transitionClass]))},uB=function(t,n){var e=Gt.fromDom(t.getContainer());n?(la(e,nB),da(e,eB)):(la(e,eB),da(e,nB))},aB=function(t,n){var o=Fs(),r=n.getSink,i=function(t){r().each((function(n){return t(n.element)}))},a=function(n){t.inline||rB(n),uB(t,ZM.isDocked(n)),n.getSystem().broadcastOn([Gf()],{}),r().each((function(t){return t.getSystem().broadcastOn([Gf()],{})}))},c=t.inline?[]:function(){var t;return[cs.config({channels:(t={},t[QM()]={onReceive:rB},t)})]}();return u([nh.config({}),ZM.config({contextual:e({lazyContext:function(n){var e=ne(n.element),o=t.inline?t.getContentAreaContainer():t.getContainer();return z.from(o).map((function(o){var r=io(Gt.fromDom(o));return vO(t,n.element).fold((function(){var t=r.height-e,o=r.y+(oB(n,"top")?0:e);return ro(r.x,o,r.width,t)}),(function(t){var o=ao(r,bO(t)),i=oB(n,"top")?o.y:o.y+e;return ro(o.x,i,o.width,o.height-e)}))}))},onShow:function(){i((function(t){return iB(t,!0)}))},onShown:function(t){i((function(t){return ha(t,[tB.transitionClass,tB.fadeInClass])})),o.get().each((function(n){var e,r,i;e=t.element,i=ln(r=n),ms(i).filter((function(t){return!cn(r,t)})).filter((function(t){return cn(t,Gt.fromDom(i.dom.body))||sn(e,t)})).each((function(){return ls(r)})),o.clear()}))},onHide:function(t){(function(t,n){return gs(t).orThunk((function(){return n().toOptional().bind((function(t){return gs(t.element)}))}))})(t.element,r).fold(o.clear,o.set),i((function(t){return iB(t,!1)}))},onHidden:function(){i((function(t){return ha(t,[tB.transitionClass])}))}},tB),lazyViewport:function(n){return vO(t,n.element).fold((function(){var e=co(),o=Rb(t),r=e.y+(oB(n,"top")?o:0),i=e.height-(oB(n,"bottom")?o:0);return{bounds:ro(e.x,r,e.width,i),optScrollEnv:z.none()}}),(function(t){return{bounds:bO(t),optScrollEnv:z.some({currentScrollTop:t.element.dom.scrollTop,scrollElmTop:ie(t.element).top})}}))},modes:[n.header.getDockingMode()],onDocked:a,onUndocked:a})],c,!0)},cB=Object.freeze({__proto__:null,setup:function(t,n,e){t.inline||(n.header.isPositionedAtTop()||t.on("ResizeEditor",(function(){e().each(ZM.reset)})),t.on("ResizeWindow ResizeEditor",(function(){e().each(rB)})),t.on("SkinLoaded",(function(){e().each((function(t){ZM.isDocked(t)?ZM.reset(t):ZM.refresh(t)}))})),t.on("FullscreenStateChanged",(function(){e().each(ZM.reset)}))),t.on("AfterScrollIntoView",(function(t){e().each((function(n){ZM.refresh(n);var e=n.element;Ig(e)&&function(t,n){var e=ln(n),o=mn(n).dom.innerHeight,r=Je(e),i=Gt.fromDom(t.elm),u=uo(i),a=te(i),c=u.y,s=c+a,l=ie(n),f=te(n),d=l.top,m=d+f,g=Math.abs(d-r.top)<2,p=Math.abs(m-(r.top+o))<2;if(g&&c<m)$e(r.left,c-f,e);else if(p&&s>d){var h=c-o+a+f;$e(r.left,h,e)}}(t,e)}))})),t.on("PostRender",(function(){uB(t,!1)}))},isDocked:function(t){return t().map(ZM.isDocked).getOr(!1)},getBehaviours:aB}),sB=Yo([lx,xr("items",Ko([$o([fx,Tr("items",nr)]),nr]))].concat(Hx)),lB=[Mr("text"),Mr("tooltip"),Mr("icon"),Vr("search",!1,Ko([er,Yo([Mr("placeholder")])],(function(t){return y(t)?t?z.some({placeholder:z.none()}):z.none():z.some(t)}))),Or("fetch"),Ur("onSetup",(function(){return _}))],fB=Yo(u([lx],lB,!0)),dB=function(t){return lr("menubutton",fB,t)},mB=Yo([lx,Cx,Ox,kx,Ex,vx,wx,Hr("presets","normal",["normal","color","listpreview"]),Ix(1),yx,xx]),gB=mm({factory:function(t,n){var e={focus:Hp.focusIn,setMenus:function(t,e){var o=K(e,(function(t){var e={type:"menubutton",text:t.text,fetch:function(n){n(t.getItems())}},o=dB(e).mapError((function(t){return mr(t)})).getOrDie();return XE(o,"tox-mbtn",n.backstage,z.some("menuitem"))}));Kp.set(t,o)}};return{uid:t.uid,dom:t.dom,components:[],behaviours:es([Kp.config({}),Jp("menubar-events",[vu((function(n){t.onSetup(n)})),su(gi(),(function(t,n){ja(t.element,".tox-mbtn--active").each((function(e){Ga(n.event.target,".tox-mbtn").each((function(n){cn(e,n)||t.getSystem().getByDom(e).each((function(e){t.getSystem().getByDom(n).each((function(t){nO.expand(t),nO.close(e),nh.focus(t)}))}))}))}))})),su(Yi(),(function(t,n){n.event.prevFocus.bind((function(n){return t.getSystem().getByDom(n).toOptional()})).each((function(e){n.event.newFocus.bind((function(n){return t.getSystem().getByDom(n).toOptional()})).each((function(t){nO.isOpen(e)&&(nO.expand(t),nO.close(e))}))}))}))]),Hp.config({mode:"flow",selector:".tox-mbtn",onEscape:function(n){return t.onEscape(n),z.some(!0)}}),LO.config({})]),apis:e,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[yr("dom"),yr("uid"),yr("onEscape"),yr("backstage"),Nr("onSetup",_)],apis:{focus:function(t,n){t.focus(n)},setMenus:function(t,n,e){t.setMenus(n,e)}}}),pB="container",hB=[ld("slotBehaviours",[])],vB=function(t){return"<alloy.field."+t+">"},bB=function(t,n){var e=function(n){return om(t)},o=function(n,e){return function(o,r){return Qd(o,t,r).map((function(t){return n(t,r)})).getOr(e)}},r=function(t,n){return"true"!==Nn(t.element,"aria-hidden")},i=o(r,!1),u=o((function(t,n){if(r(t)){var e=t.element;Un(e,"display","none"),Fn(e,"aria-hidden","true"),nu(t,Xi(),{name:n,visible:!1})}})),a=function(t){return function(n,e){J(e,(function(e){return t(n,e)}))}}(u),c=o((function(t,n){if(!r(t)){var e=t.element;Jn(e,"display"),Ln(e,"aria-hidden"),nu(t,Xi(),{name:n,visible:!0})}})),s={getSlotNames:e,getSlot:function(n,e){return Qd(n,t,e)},isShowing:i,hideSlot:u,hideAllSlots:function(t){return a(t,e())},showSlot:c};return{uid:t.uid,dom:t.dom,components:n,behaviours:fd(t.slotBehaviours),apis:s}},yB=yt({getSlotNames:function(t,n){return t.getSlotNames(n)},getSlot:function(t,n,e){return t.getSlot(n,e)},isShowing:function(t,n,e){return t.isShowing(n,e)},hideSlot:function(t,n,e){return t.hideSlot(n,e)},hideAllSlots:function(t,n){return t.hideAllSlots(n)},showSlot:function(t,n,e){return t.showSlot(n,e)}},(function(t){return Gu(t)})),xB=e(e({},yB),{sketch:function(t){var n=function(){var t=[];return{slot:function(n,e){return t.push(n),Xd(pB,vB(n),e)},record:D(t)}}(),e=t(n),o=n.record(),r=K(o,(function(t){return Ld({name:t,pname:vB(t)})}));return sm(pB,hB,r,bB,e)}}),wB=Yo([Ox,Cx,Ur("onShow",_),Ur("onHide",_),wx]),SB=function(t){return{element:function(){return t.element.dom}}},kB=function(t,n){var e=K(ht(n),(function(t){var e=n[t],o=fr(function(t){return lr("sidebar",wB,t)}(e));return{name:t,getApi:SB,onSetup:o.onSetup,onShow:o.onShow,onHide:o.onHide}}));return K(e,(function(n){var o=Gr(_);return t.slot(n.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:bw([zw(n,o),Lw(n,o),su(Xi(),(function(t,n){var o=n.event,r=nt(e,(function(t){return t.name===o.name}));r.each((function(n){(o.visible?n.onShow:n.onHide)(n.getApi(t))}))}))])})}))},OB=function(t){return xB.sketch((function(n){return{dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:kB(n,t),slotBehaviours:bw([vu((function(t){return xB.hideAllSlots(t)}))])}}))},CB=function(t,n){Fn(t,"role",n)},_B=function(t){return bm.getCurrent(t).bind((function(t){return qE.isGrowing(t)||qE.hasGrown(t)?bm.getCurrent(t).bind((function(t){return nt(xB.getSlotNames(t),(function(n){return xB.isShowing(t,n)}))})):z.none()}))},TB=Du("FixSizeEvent"),EB=Du("AutoSizeEvent"),DB=Object.freeze({__proto__:null,block:function(t,n,e,o){Fn(t.element,"aria-busy",!0);var r=n.getRoot(t).getOr(t),i=es([Hp.config({mode:"special",onTab:function(){return z.some(!0)},onShiftTab:function(){return z.some(!0)}}),nh.config({})]),u=o(r,i),a=r.getSystem().build(u);Kp.append(r,Va(a)),a.hasConfigured(Hp)&&n.focus&&Hp.focusIn(a),e.isBlocked()||n.onBlock(t),e.blockWith((function(){return Kp.remove(r,a)}))},unblock:function(t,n,e){Ln(t.element,"aria-busy"),e.isBlocked()&&n.onUnblock(t),e.clear()},isBlocked:function(t,n,e){return e.isBlocked()}}),AB=[Ur("getRoot",z.none),Pr("focus",!0),sc("onBlock"),sc("onUnblock")],MB=rs({fields:AB,name:"blocking",apis:DB,state:Object.freeze({__proto__:null,init:function(){var t=Bs((function(t){return t.destroy()}));return Yu({readState:t.isSet,blockWith:function(n){t.set({destroy:n})},clear:t.clear,isBlocked:t.isSet})}})}),BB=function(t){return bm.getCurrent(t).each((function(t){return ls(t.element,!0)}))},IB=function(t,n,e,o){var r=n.element;if(function(t,n){var e="tabindex",o="data-mce-".concat(e);z.from(t.iframeElement).map(Gt.fromDom).each((function(t){n?(Vn(t,e).each((function(n){return Fn(t,o,n)})),Fn(t,e,-1)):(Ln(t,e),Vn(t,o).each((function(n){Fn(t,e,n),Ln(t,o)})))}))}(t,e),e)MB.block(n,function(t){return function(n,e){return{dom:{tag:"div",attributes:{"aria-label":t.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:Wh('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}}}(o)),Jn(r,"display"),Ln(r,"aria-hidden"),t.hasFocus()&&BB(n);else{var i=bm.getCurrent(n).exists((function(t){return ds(t.element)}));MB.unblock(n),Un(r,"display","none"),Fn(r,"aria-hidden","true"),i&&t.focus()}},FB=function(t,n,e){var o=Gr(!1),r=Fs(),i=function(e){var r;!o.get()||function(t){return"focusin"===t.type}(r=e)&&(r.composed?dt(r.composedPath()):z.from(r.target)).map(Gt.fromDom).filter(tn).exists((function(t){return ga(t,"mce-pastebin")}))||(e.preventDefault(),BB(n()),t.editorManager.setActive(t))};t.inline||t.on("PreInit",(function(){t.dom.bind(t.getWin(),"focusin",i),t.on("BeforeExecCommand",(function(t){"mcefocus"===t.command.toLowerCase()&&!0!==t.value&&i(t)}))}));var u=function(r){r!==o.get()&&(o.set(r),IB(t,n(),r,e.providers),function(t,n){t.dispatch("AfterProgressState",{state:n})}(t,r))};t.on("ProgressState",(function(n){if(r.on(clearTimeout),O(n.time)){var e=Ph.setEditorTimeout(t,(function(){return u(n.state)}),n.time);r.set(e)}else u(n.state),r.clear()}))},RB=function(t,n,e){return{within:t,extra:n,withinWidth:e}},NB=function(t,n,e){var o=function(t,n){var e=tt(t,(function(t,e){return n(e,t.len).fold(D(t),(function(n){return{len:n.finish,list:t.list.concat([n])}}))}),{len:0,list:[]});return e.list}(t,(function(t,n){var o=e(t);return z.some({element:t,start:n,finish:n+o,width:o})})),r=Z(o,(function(t){return t.finish<=n})),i=Q(r,(function(t,n){return t+n.width}),0);return{within:r,extra:o.slice(r.length),withinWidth:i}},VB=function(t){return K(t,(function(t){return t.element}))},zB=function(t,n,e,o){var r=function(t,n,e){var o=NB(n,t,e);return 0===o.extra.length?z.some(o):z.none()}(t,n,e).getOrThunk((function(){return NB(n,t-e(o),e)})),i=r.within,u=r.extra,a=r.withinWidth;return 1===u.length&&u[0].width<=e(o)?function(t,n,e){var o=VB(t.concat(n));return RB(o,[],e)}(i,u,a):u.length>=1?function(t,n,e,o){var r=VB(t).concat([e]);return RB(r,VB(n),o)}(i,u,o,a):function(t,n,e){return RB(VB(t),[],e)}(i,0,a)},LB=function(t,n){var e=K(n,(function(t){return Va(t)}));hM.setGroups(t,e)},HB=function(t,n,e){var o=n.builtGroups.get();if(0!==o.length){var r=tm(t,n,"primary"),i=Fk.getCoupled(t,"overflowGroup");Un(r.element,"visibility","hidden");var u=o.concat([i]),a=pt(u,(function(t){return gs(t.element).bind((function(n){return t.getSystem().getByDom(n).toOptional()}))}));e([]),LB(r,u);var c=ce(r.element),s=zB(c,n.builtGroups.get(),(function(t){return ce(t.element)}),i);0===s.extra.length?(Kp.remove(r,i),e([])):(LB(r,s.within),e(s.extra)),Jn(r.element,"visibility"),$n(r.element),a.each(nh.focus)}},PB=D([ld("splitToolbarBehaviours",[Fk]),vr("builtGroups",(function(){return Gr([])}))]),UB=D([ac(["overflowToggledClass"]),Ir("getOverflowBounds"),yr("lazySink"),vr("overflowGroups",(function(){return Gr([])})),sc("onOpened"),sc("onClosed")].concat(PB())),WB=D([Ld({factory:hM,schema:gM(),name:"primary"}),Hd({schema:gM(),name:"overflow"}),Hd({name:"overflow-button"}),Hd({name:"overflow-group"})]),jB=D((function(t,n){!function(t,n){var e=ae.max(t,n,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);Un(t,"max-width",e+"px")}(t,Math.floor(n))})),GB=D([ac(["toggledClass"]),yr("lazySink"),Or("fetch"),Ir("getBounds"),Rr("fireDismissalEventInstead",[Nr("event",Gi())]),ul(),sc("onToggled")]),qB=D([Hd({name:"button",overrides:function(t){return{dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:es([sh.config({toggleClass:t.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:t.onToggled})])}}}),Hd({factory:hM,schema:gM(),name:"toolbar",overrides:function(t){return{toolbarBehaviours:es([Hp.config({mode:"cyclic",onEscape:function(n){return Qd(n,t,"button").each(nh.focus),z.none()}})])}}})]),YB=Fs(),XB=function(t,n){var e=Fk.getCoupled(t,"toolbarSandbox");Wf.isOpen(e)?Wf.close(e):Wf.open(e,n.toolbar())},KB=function(t,n,e,o){var r=e.getBounds.map((function(t){return t()})),i=e.lazySink(t).getOrDie();hf.positionWithinBounds(i,n,{anchor:{type:"hotspot",hotspot:t,layouts:o,overrides:{maxWidthFunction:jB()}}},r)},JB=function(t,n,e,o,r){hM.setGroups(n,r),KB(t,n,e,o),sh.on(t)},$B=gm({name:"FloatingToolbarButton",factory:function(t,n,o,r){return e(e({},Uh.sketch(e(e({},r.button()),{action:function(t){XB(t,r)},buttonBehaviours:gd({dump:r.button().buttonBehaviours},[Fk.config({others:{toolbarSandbox:function(n){return function(t,n,o){var r=Ya();return{dom:{tag:"div",attributes:{id:r.id}},behaviours:es([Hp.config({mode:"special",onEscape:function(t){return Wf.close(t),z.some(!0)}}),Wf.config({onOpen:function(e,i){var u=YB.get().getOr(!1);o.fetch().get((function(e){JB(t,i,o,n.layouts,e),r.link(t.element),u||Hp.focusIn(i)}))},onClose:function(){sh.off(t),YB.get().getOr(!1)||nh.focus(t),r.unlink(t.element)},isPartOf:function(n,e,o){return Ka(e,o)||Ka(t,o)},getAttachPoint:function(){return o.lazySink(t).getOrDie()}}),cs.config({channels:e(e({},Xf(e({isExtraPart:N},o.fireDismissalEventInstead.map((function(t){return{fireEventInstead:{event:t.event}}})).getOr({})))),Jf({doReposition:function(){Wf.getState(Fk.getCoupled(t,"toolbarSandbox")).each((function(e){KB(t,e,o,n.layouts)}))}}))})])}}(n,o,t)}}})])}))),{apis:{setGroups:function(n,e){Wf.getState(Fk.getCoupled(n,"toolbarSandbox")).each((function(r){JB(n,r,t,o.layouts,e)}))},reposition:function(n){Wf.getState(Fk.getCoupled(n,"toolbarSandbox")).each((function(e){KB(n,e,t,o.layouts)}))},toggle:function(t){XB(t,r)},toggleWithoutFocusing:function(t){!function(t,n){YB.set(!0),XB(t,n),YB.clear()}(t,r)},getToolbar:function(t){return Wf.getState(Fk.getCoupled(t,"toolbarSandbox"))},isOpen:function(t){return Wf.isOpen(Fk.getCoupled(t,"toolbarSandbox"))}}})},configFields:GB(),partFields:qB(),apis:{setGroups:function(t,n,e){t.setGroups(n,e)},reposition:function(t,n){t.reposition(n)},toggle:function(t,n){t.toggle(n)},toggleWithoutFocusing:function(t,n){t.toggleWithoutFocusing(n)},getToolbar:function(t,n){return t.getToolbar(n)},isOpen:function(t,n){return t.isOpen(n)}}}),ZB=D([yr("items"),ac(["itemSelector"]),ld("tgroupBehaviours",[Hp])]),QB=D([Ud({name:"items",unit:"item"})]),tI=gm({name:"ToolbarGroup",configFields:ZB(),partFields:QB(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,behaviours:dd(t.tgroupBehaviours,[Hp.config({mode:"flow",selector:t.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}}}}),nI=function(t){return K(t,(function(t){return Va(t)}))},eI=function(t,n,e){HB(t,e,(function(o){e.overflowGroups.set(o),n.getOpt(t).each((function(t){$B.setGroups(t,nI(o))}))}))},oI=gm({name:"SplitFloatingToolbar",configFields:UB(),partFields:WB(),factory:function(t,n,o,r){var i=jh($B.sketch({fetch:function(){return Lk((function(n){n(nI(t.overflowGroups.get()))}))},layouts:{onLtr:function(){return[Vc,Nc]},onRtl:function(){return[Nc,Vc]},onBottomLtr:function(){return[Lc,zc]},onBottomRtl:function(){return[zc,Lc]}},getBounds:o.getOverflowBounds,lazySink:t.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:t.markers.overflowToggledClass},parts:{button:r["overflow-button"](),toolbar:r.overflow()},onToggled:function(n,e){return t[e?"onOpened":"onClosed"](n)}}));return{uid:t.uid,dom:t.dom,components:n,behaviours:dd(t.splitToolbarBehaviours,[Fk.config({others:{overflowGroup:function(){return tI.sketch(e(e({},r["overflow-group"]()),{items:[i.asSpec()]}))}}})]),apis:{setGroups:function(n,e){t.builtGroups.set(K(e,n.getSystem().build)),eI(n,i,t)},refresh:function(n){return eI(n,i,t)},toggle:function(t){i.getOpt(t).each((function(t){$B.toggle(t)}))},toggleWithoutFocusing:function(t){i.getOpt(t).each($B.toggleWithoutFocusing)},isOpen:function(t){return i.getOpt(t).map($B.isOpen).getOr(!1)},reposition:function(t){i.getOpt(t).each((function(t){$B.reposition(t)}))},getOverflow:function(t){return i.getOpt(t).bind($B.getToolbar)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},reposition:function(t,n){t.reposition(n)},toggle:function(t,n){t.toggle(n)},toggleWithoutFocusing:function(t,n){t.toggle(n)},isOpen:function(t,n){return t.isOpen(n)},getOverflow:function(t,n){return t.getOverflow(n)}}}),rI=D([ac(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),sc("onOpened"),sc("onClosed")].concat(PB())),iI=D([Ld({factory:hM,schema:gM(),name:"primary"}),Ld({factory:hM,schema:gM(),name:"overflow",overrides:function(t){return{toolbarBehaviours:es([qE.config({dimension:{property:"height"},closedClass:t.markers.closedClass,openClass:t.markers.openClass,shrinkingClass:t.markers.shrinkingClass,growingClass:t.markers.growingClass,onShrunk:function(n){Qd(n,t,"overflow-button").each((function(t){sh.off(t),nh.focus(t)})),t.onClosed(n)},onGrown:function(n){Hp.focusIn(n),t.onOpened(n)},onStartGrow:function(n){Qd(n,t,"overflow-button").each(sh.on)}}),Hp.config({mode:"acyclic",onEscape:function(n){return Qd(n,t,"overflow-button").each(nh.focus),z.some(!0)}})])}}}),Hd({name:"overflow-button",overrides:function(t){return{buttonBehaviours:es([sh.config({toggleClass:t.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])}}}),Hd({name:"overflow-group"})]),uI=function(t,n){Qd(t,n,"overflow-button").bind((function(){return Qd(t,n,"overflow")})).each((function(e){aI(t,n),qE.toggleGrow(e)}))},aI=function(t,n){Qd(t,n,"overflow").each((function(e){HB(t,n,(function(t){var n=K(t,(function(t){return Va(t)}));hM.setGroups(e,n)})),Qd(t,n,"overflow-button").each((function(t){qE.hasGrown(e)&&sh.on(t)})),qE.refresh(e)}))},cI=gm({name:"SplitSlidingToolbar",configFields:rI(),partFields:iI(),factory:function(t,n,o,r){var i="alloy.toolbar.toggle";return{uid:t.uid,dom:t.dom,components:n,behaviours:dd(t.splitToolbarBehaviours,[Fk.config({others:{overflowGroup:function(t){return tI.sketch(e(e({},r["overflow-group"]()),{items:[Uh.sketch(e(e({},r["overflow-button"]()),{action:function(n){tu(t,i)}}))]}))}}}),Jp("toolbar-toggle-events",[su(i,(function(n){uI(n,t)}))])]),apis:{setGroups:function(n,e){!function(n,e){var o=K(e,n.getSystem().build);t.builtGroups.set(o)}(n,e),aI(n,t)},refresh:function(n){return aI(n,t)},toggle:function(n){return uI(n,t)},isOpen:function(n){return function(t,n){return Qd(t,n,"overflow").map(qE.hasGrown).getOr(!1)}(n,t)}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:function(t,n,e){t.setGroups(n,e)},refresh:function(t,n){t.refresh(n)},toggle:function(t,n){t.toggle(n)},isOpen:function(t,n){return t.isOpen(n)}}}),sI=function(t){var n=t.title.fold((function(){return{}}),(function(t){return{attributes:{title:t}}}));return{dom:e({tag:"div",classes:["tox-toolbar__group"]},n),components:[tI.parts.items({})],items:t.items,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])"},tgroupBehaviours:es([LO.config({}),nh.config({})])}},lI=function(t){return tI.sketch(sI(t))},fI=function(t,n){var e=vu((function(n){var e=K(t.initGroups,lI);hM.setGroups(n,e)}));return es([Nw(t.providers.isDisabled),Bw(),Hp.config({mode:n,onEscape:t.onEscape,selector:".tox-toolbar__group"}),Jp("toolbar-events",[e])])},dI=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return{uid:t.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":sI({title:z.none(),items:[]}),"overflow-button":kD({name:"more",icon:z.some("more-drawer"),enabled:!0,tooltip:z.some("Reveal or hide additional toolbar items"),primary:!1,buttonType:z.none(),borderless:!1},z.none(),t.providers)},splitToolbarBehaviours:fI(t,n)}},mI=function(t){var n=dI(t),o=oI.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return oI.sketch(e(e({},n),{lazySink:t.getSink,getOverflowBounds:function(){var n=t.moreDrawerData.lazyHeader().element,e=uo(n),o=dn(n),r=uo(o),i=Math.max(o.dom.scrollHeight,r.height);return ro(e.x+4,r.y,e.width-8,i)},parts:e(e({},n.parts),{overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:t.attributes}}}),components:[o],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(n){return t.onToggled(n,!0)},onClosed:function(n){return t.onToggled(n,!1)}}))},gI=function(t){var n=cI.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),o=cI.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),r=dI(t);return cI.sketch(e(e({},r),{components:[n,o],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:function(n){n.getSystem().broadcastOn([QM()],{type:"opened"}),t.onToggled(n,!0)},onClosed:function(n){n.getSystem().broadcastOn([QM()],{type:"closed"}),t.onToggled(n,!1)}}))},pI=function(t){var n=t.cyclicKeying?"cyclic":"acyclic";return hM.sketch({uid:t.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(t.type===Xv.scrolling?["tox-toolbar--scrolling"]:[])},components:[hM.parts.groups({})],toolbarBehaviours:fI(t,n)})},hI=[kx,Ox,Mr("tooltip"),Hr("buttonType","secondary",["primary","secondary"]),Pr("borderless",!1),Or("onAction")],vI={button:u(u([],hI,!0),[mx,kr("type",["button"])],!1),togglebutton:u(u([],hI,!0),[Pr("active",!1),kr("type",["togglebutton"])],!1)},bI=[kr("type",["group"]),Wr("buttons",[],gr("type",vI))],yI=gr("type",e(e({},vI),{group:bI})),xI=Yo([Wr("buttons",[],yI),Or("onShow"),Or("onHide")]),wI=function(t,n){return function(t,n){var o,r,i,u,a,c="togglebutton"===t.type,s=t.icon.map((function(t){return uE(t,n.icons)})).map(jh),l=function(e){var o=function(t){s.map((function(o){return o.getOpt(e).each((function(e){Kp.set(e,[uE(t,n.icons)])}))}))};return c?t.onAction({setIcon:o,setActive:function(t){var n=e.element;t?(la(n,"tox-button--enabled"),Fn(n,"aria-pressed",!0)):(da(n,"tox-button--enabled"),Ln(n,"aria-pressed"))},isActive:function(){return ga(e.element,"tox-button--enabled")}}):"button"===t.type?t.onAction({setIcon:o}):void 0},f=e(e({},t),{name:c?t.text.getOr(t.icon.getOr("")):null!==(u=t.text)&&void 0!==u?u:t.icon.getOr(""),primary:"primary"===t.buttonType,buttonType:z.from(t.buttonType),tooltip:t.tooltip,icon:t.icon,enabled:!0,borderless:t.borderless}),d=OD(null!==(a=t.buttonType)&&void 0!==a?a:"secondary"),m=c?t.text.map(n.translate):z.some(n.translate(t.text)),g=m.map(Ba),p=f.tooltip.or(m).map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({}),h=s.map((function(t){return t.asSpec()})),v=Uw([h,g]),b=t.icon.isSome()&&g.isSome(),y={tag:"button",classes:(o=(r=(i=d.concat.apply(d,t.icon.isSome()&&!b?["tox-button--icon"]:[])).concat.apply(i,b?["tox-button--icon-and-text"]:[])).concat.apply(r,t.borderless?["tox-button--naked"]:[])).concat.apply(o,"togglebutton"===t.type&&t.active?["tox-button--enabled"]:[]),attributes:p},x=SD(f,z.some(l),[],y,v,n);return Uh.sketch(x)}(t,n)},SI=Le().deviceType,kI=SI.isPhone(),OI=SI.isTablet(),CI=gm({name:"silver.View",configFields:[yr("viewConfig")],partFields:[Pd({factory:{sketch:function(t){var n=!1,e=K(t.buttons,(function(e){return"group"===e.type?(n=!0,function(t,n){return{dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:K(t.buttons,(function(t){return wI(t,n)}))}}(e,t.providers)):wI(e,t.providers)}));return{uid:t.uid,dom:{tag:"div",classes:u([n?"tox-view__toolbar":"tox-view__header"],kI||OI?["tox-view--mobile","tox-view--scrolling"]:[],!0)},behaviours:es([nh.config({}),Hp.config({mode:"flow",selector:"button, .tox-button",focusInside:Il.OnEnterOrSpaceMode})]),components:n?e:[BO.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),BO.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:e})]}}},schema:[yr("buttons"),yr("providers")],name:"header"}),Pd({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-view__pane"]}}}},schema:[],name:"pane"})],factory:function(t,n,e,o){var r={getPane:function(n){return aM.getPart(n,t,"pane")},getOnShow:function(n){return t.viewConfig.onShow},getOnHide:function(n){return t.viewConfig.onHide}};return{uid:t.uid,dom:t.dom,components:n,apis:r}},apis:{getPane:function(t,n){return t.getPane(n)},getOnShow:function(t,n){return t.getOnShow(n)},getOnHide:function(t,n){return t.getOnHide(n)}}}),_I=function(t,n,e){return Ot(n,(function(n,o){var r=fr(lr("view",xI,n));return t.slot(o,CI.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:r,components:u(u([],r.buttons.length>0?[CI.parts.header({buttons:r.buttons,providers:e})]:[],!0),[CI.parts.pane({})],!1)}))}))},TI=function(t,n){return xB.sketch((function(e){return{dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:_I(e,t,n),slotBehaviours:bw([vu((function(t){return xB.hideAllSlots(t)}))])}}))},EI=function(t){return nt(xB.getSlotNames(t),(function(n){return xB.isShowing(t,n)}))},DI=function(t,n,e){xB.getSlot(t,n).each((function(t){CI.getPane(t).each((function(n){var o;e(t)((o=n.element.dom,{getContainer:D(o)}))}))}))},AI=mm({factory:function(t,n){var e={setViews:function(t,e){Kp.set(t,[TI(e,n.backstage.shared.providers)])},whichView:function(t){return bm.getCurrent(t).bind(EI)},toggleView:function(t,n,e,o){return bm.getCurrent(t).exists((function(r){var i=EI(r),u=i.exists((function(t){return o===t})),a=xB.getSlot(r,o).isSome();return a&&(xB.hideAllSlots(r),u?(!function(t){var n=t.element;Un(n,"display","none"),Fn(n,"aria-hidden","true")}(t),n()):(e(),function(t){var n=t.element;Jn(n,"display"),Ln(n,"aria-hidden")}(t),xB.showSlot(r,o),function(t,n){DI(t,n,CI.getOnShow)}(r,o)),i.each((function(t){return function(t,n){return DI(t,n,CI.getOnHide)}(r,t)}))),a}))}};return{uid:t.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:es([Kp.config({}),bm.config({find:function(t){var n=Kp.contents(t);return dt(n)}})]),apis:e}},name:"silver.ViewWrapper",configFields:[yr("backstage")],apis:{setViews:function(t,n,e){return t.setViews(n,e)},toggleView:function(t,n,e,o,r){return t.toggleView(n,e,o,r)},whichView:function(t,n){return t.whichView(n)}}}),MI=cM.optional({factory:gB,name:"menubar",schema:[yr("backstage")]}),BI=cM.optional({factory:{sketch:function(t){return mM.sketch({uid:t.uid,dom:t.dom,listBehaviours:es([Hp.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:function(){return pI({type:t.type,uid:Du("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:t.providers,onEscape:function(){return t.onEscape(),z.some(!0)}})},setupItem:function(t,n,e,o){hM.setGroups(n,e)},shell:!0})}},name:"multiple-toolbar",schema:[yr("dom"),yr("onEscape")]}),II=cM.optional({factory:{sketch:function(t){var n=function(t){return t.type===Xv.sliding?gI:t.type===Xv.floating?mI:pI}(t);return n({type:t.type,uid:t.uid,onEscape:function(){return t.onEscape(),z.some(!0)},onToggled:function(n,e){return t.onToolbarToggled(e)},cyclicKeying:!1,initGroups:[],getSink:t.getSink,providers:t.providers,moreDrawerData:{lazyToolbar:t.lazyToolbar,lazyMoreButton:t.lazyMoreButton,lazyHeader:t.lazyHeader},attributes:t.attributes})}},name:"toolbar",schema:[yr("dom"),yr("onEscape"),yr("getSink")]}),FI=cM.optional({factory:{sketch:function(t){var n=t.editor,e=t.sticky?aB:yM;return{uid:t.uid,dom:t.dom,components:t.components,behaviours:es(e(n,t.sharedBackstage))}}},name:"header",schema:[yr("dom")]}),RI=cM.optional({factory:{sketch:function(t){return{uid:t.uid,dom:t.dom,components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_campaign=self_hosted_upgrade_promo&utm_source=tiny&utm_medium=referral",rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:"⚡️Upgrade"}}]}}},name:"promotion",schema:[yr("dom")]}),NI=cM.optional({name:"socket",schema:[yr("dom")]}),VI=cM.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:es([LO.config({}),nh.config({}),qE.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:function(t){bm.getCurrent(t).each(xB.hideAllSlots),tu(t,EB)},onGrown:function(t){tu(t,EB)},onStartGrow:function(t){nu(t,TB,{width:Yn(t.element,"width").getOr("")})},onStartShrink:function(t){nu(t,TB,{width:ce(t.element)+"px"})}}),Kp.config({}),bm.config({find:function(t){var n=Kp.contents(t);return dt(n)}})])}],behaviours:es([bT(0),Jp("sidebar-sliding-events",[su(TB,(function(t,n){Un(t.element,"width",n.event.width)})),su(EB,(function(t,n){Jn(t.element,"width")}))])])}}},name:"sidebar",schema:[yr("dom")]}),zI=cM.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:es([Kp.config({}),MB.config({focus:!1}),bm.config({find:function(t){return dt(t.components())}})]),components:[]}}},name:"throbber",schema:[yr("dom")]}),LI=cM.optional({factory:AI,name:"viewWrapper",schema:[yr("backstage")]}),HI=cM.optional({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:t.components}}},name:"editorContainer",schema:[]}),PI=gm({name:"OuterContainer",factory:function(t,n,e){var o=!1,r={getSocket:function(n){return aM.getPart(n,t,"socket")},setSidebar:function(n,e,o){aM.getPart(n,t,"sidebar").each((function(t){return function(t,n,e){bm.getCurrent(t).each((function(o){Kp.set(o,[OB(n)]);var r=null==e?void 0:e.toLowerCase();g(r)&&Et(n,r)&&bm.getCurrent(o).each((function(n){xB.showSlot(n,r),qE.immediateGrow(o),Jn(o.element,"width"),CB(t.element,"region")}))}))}(t,e,o)}))},toggleSidebar:function(n,e){aM.getPart(n,t,"sidebar").each((function(t){return function(t,n){bm.getCurrent(t).each((function(e){bm.getCurrent(e).each((function(o){qE.hasGrown(e)?xB.isShowing(o,n)?(qE.shrink(e),CB(t.element,"presentation")):(xB.hideAllSlots(o),xB.showSlot(o,n),CB(t.element,"region")):(xB.hideAllSlots(o),xB.showSlot(o,n),qE.grow(e),CB(t.element,"region"))}))}))}(t,e)}))},whichSidebar:function(n){return aM.getPart(n,t,"sidebar").bind(_B).getOrNull()},getHeader:function(n){return aM.getPart(n,t,"header")},getToolbar:function(n){return aM.getPart(n,t,"toolbar")},setToolbar:function(n,e){aM.getPart(n,t,"toolbar").each((function(t){var n=K(e,lI);t.getApis().setGroups(t,n)}))},setToolbars:function(n,e){aM.getPart(n,t,"multiple-toolbar").each((function(t){var n=K(e,(function(t){return K(t,lI)}));mM.setItems(t,n)}))},refreshToolbar:function(n){aM.getPart(n,t,"toolbar").each((function(t){return t.getApis().refresh(t)}))},toggleToolbarDrawer:function(n){aM.getPart(n,t,"toolbar").each((function(t){It(t.getApis().toggle,(function(n){return n(t)}))}))},toggleToolbarDrawerWithoutFocusing:function(n){aM.getPart(n,t,"toolbar").each((function(t){It(t.getApis().toggleWithoutFocusing,(function(n){return n(t)}))}))},isToolbarDrawerToggled:function(n){return aM.getPart(n,t,"toolbar").bind((function(t){return z.from(t.getApis().isOpen).map((function(n){return n(t)}))})).getOr(!1)},getThrobber:function(n){return aM.getPart(n,t,"throbber")},focusToolbar:function(n){aM.getPart(n,t,"toolbar").orThunk((function(){return aM.getPart(n,t,"multiple-toolbar")})).each((function(t){Hp.focusIn(t)}))},setMenubar:function(n,e){aM.getPart(n,t,"menubar").each((function(t){gB.setMenus(t,e)}))},focusMenubar:function(n){aM.getPart(n,t,"menubar").each((function(t){gB.focus(t)}))},setViews:function(n,e){aM.getPart(n,t,"viewWrapper").each((function(t){AI.setViews(t,e)}))},toggleView:function(n,e){return aM.getPart(n,t,"viewWrapper").exists((function(t){return AI.toggleView(t,(function(){return r.showMainView(n)}),(function(){return r.hideMainView(n)}),e)}))},whichView:function(n){return aM.getPart(n,t,"viewWrapper").bind(AI.whichView).getOrNull()},hideMainView:function(n){(o=r.isToolbarDrawerToggled(n))&&r.toggleToolbarDrawer(n),aM.getPart(n,t,"editorContainer").each((function(t){var n=t.element;Un(n,"display","none"),Fn(n,"aria-hidden","true")}))},showMainView:function(n){o&&r.toggleToolbarDrawer(n),aM.getPart(n,t,"editorContainer").each((function(t){var n=t.element;Jn(n,"display"),Ln(n,"aria-hidden")}))}};return{uid:t.uid,dom:t.dom,components:n,apis:r,behaviours:t.behaviours}},configFields:[yr("dom"),yr("behaviours")],partFields:[FI,MI,II,BI,NI,VI,RI,zI,LI,HI],apis:{getSocket:function(t,n){return t.getSocket(n)},setSidebar:function(t,n,e,o){t.setSidebar(n,e,o)},toggleSidebar:function(t,n,e){t.toggleSidebar(n,e)},whichSidebar:function(t,n){return t.whichSidebar(n)},getHeader:function(t,n){return t.getHeader(n)},getToolbar:function(t,n){return t.getToolbar(n)},setToolbar:function(t,n,e){t.setToolbar(n,e)},setToolbars:function(t,n,e){t.setToolbars(n,e)},refreshToolbar:function(t,n){return t.refreshToolbar(n)},toggleToolbarDrawer:function(t,n){t.toggleToolbarDrawer(n)},toggleToolbarDrawerWithoutFocusing:function(t,n){t.toggleToolbarDrawerWithoutFocusing(n)},isToolbarDrawerToggled:function(t,n){return t.isToolbarDrawerToggled(n)},getThrobber:function(t,n){return t.getThrobber(n)},setMenubar:function(t,n,e){t.setMenubar(n,e)},focusMenubar:function(t,n){t.focusMenubar(n)},focusToolbar:function(t,n){t.focusToolbar(n)},setViews:function(t,n,e){t.setViews(n,e)},toggleView:function(t,n,e){return t.toggleView(n,e)},whichView:function(t,n){return t.whichView(n)}}}),UI={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template inserttemplate codesample inserttable accordion | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"aidialog aishortcuts | spellchecker spellcheckerlanguage | autocorrect capitalization | a11ycheck code typography wordcount addtemplate"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},WI=function(t){return t.split(" ")},jI=function(t,n){var o=e(e({},UI),n.menus),r=ht(n.menus).length>0,i=void 0===n.menubar||!0===n.menubar?WI("file edit view insert format tools table help"):WI(!1===n.menubar?"":n.menubar),u=Z(i,(function(t){var e=Et(UI,t);return r?e||Tt(n.menus,t).exists((function(t){return Et(t,"items")})):e})),a=K(u,(function(e){var r=o[e];return function(t,n,e){var o=Eb(e).split(/[ ,]/);return{text:t.title,getItems:function(){return rt(t.items,(function(t){var e=t.toLowerCase();return 0===e.trim().length||q(o,(function(t){return t===e}))?[]:"separator"===e||"|"===e?[{type:"separator"}]:n.menuItems[e]?[n.menuItems[e]]:[]}))}}}({title:r.title,items:WI(r.items)},n,t)}));return Z(a,(function(t){return t.getItems().length>0&&q(t.getItems(),(function(t){return g(t)||"separator"!==t.type}))}))},GI=function(t,n,e){return t.on("remove",(function(){return e.unload(n)})),e.load(n)},qI=function(t,n,e,o){return t.on("remove",(function(){return o.unloadRawCss(n)})),o.loadRawCss(n,e)},YI=function(t,n){return o(c,void 0,void 0,(function(){var e,o,i;return r(this,(function(r){return e=ry(t).getOr("default"),o="ui/"+e+"/skin.css",i=tinymce.Resource.get(o),g(i)?[2,Promise.resolve(qI(t,o,i,t.ui.styleSheetLoader))]:[2,GI(t,n+"/skin.min.css",t.ui.styleSheetLoader)]}))}))},XI=function(t,n){return o(c,void 0,void 0,(function(){var e,o,i;return r(this,(function(r){var u;return u=Gt.fromDom(t.getElement()),Tn(u).isSome()?(e=ry(t).getOr("default"),o="ui/"+e+"/skin.shadowdom.css",i=tinymce.Resource.get(o),g(i)?(qI(t,o,i,lb.DOM.styleSheetLoader),[2,Promise.resolve()]):[2,GI(t,n+"/skin.shadowdom.min.css",lb.DOM.styleSheetLoader)]):[2]}))}))},KI=function(t,n){return function(t,n){return o(c,void 0,void 0,(function(){var e;return r(this,(function(o){return ry(n).fold((function(){var e=oy(n);e&&n.contentCSS.push(e+(t?"/content.inline":"/content")+".min.css")}),(function(e){var o="ui/"+e+(t?"/content.inline":"/content")+".css",r=tinymce.Resource.get(o);if(g(r))qI(n,o,r,n.ui.styleSheetLoader);else{var i=oy(n);i&&n.contentCSS.push(i+(t?"/content.inline":"/content")+".min.css")}})),e=oy(n),!ny(n)&&g(e)?[2,Promise.all([YI(n,e),XI(n,e)]).then()]:[2]}))}))}(t,n).then(function(t){var n=function(){t._skinLoaded=!0,function(t){t.dispatch("SkinLoaded")}(t)};return function(){t.initialized?n():t.on("init",n)}}(n),function(t,n){return function(){return function(t,n){t.dispatch("SkinLoadError",n)}(t,{message:n})}}(n,"Skin could not be loaded"))},JI=B(KI,!1),$I=B(KI,!0),ZI=function(t,n,e){return t.translate([n,t.translate(e)])},QI=function(t,n){var o=function(o,i,u,a){var c=t.shared.providers.translate(o.title);if("separator"===o.type)return z.some({type:"separator",text:c});if("submenu"===o.type){var s=rt(o.getStyleItems(),(function(t){return r(t,i,a)}));return 0===i&&s.length<=0?z.none():z.some({type:"nestedmenuitem",text:c,enabled:s.length>0,getSubmenuItems:function(){return rt(o.getStyleItems(),(function(t){return r(t,i,a)}))}})}return z.some(e({type:"togglemenuitem",text:c,icon:o.icon,active:o.isSelected(a),enabled:!u,onAction:n.onAction(o)},o.getStylePreview().fold((function(){return{}}),(function(t){return{meta:{style:t}}}))))},r=function(t,e,r){var i="formatter"===t.type&&n.isInvalid(t);return 0===e?i?[]:o(t,e,!1,r).toArray():o(t,e,i,r).toArray()},i=function(t){var e=n.getCurrentValue(),o=n.shouldHide?0:1;return rt(t,(function(t){return r(t,o,e)}))};return{validateItems:i,getFetch:function(t,n){return function(e,o){var r=n(),u=i(r);o(pE(u,Oy.CLOSE_ON_EXECUTE,t,{isHorizontalMenu:!1,search:z.none()}))}}}},tF=function(t,n,e){var o=e.dataset,r="basic"===o.type?function(){return K(o.data,(function(t){return MA(t,e.isSelectedFor,e.getPreviewFor)}))}:o.getData;return{items:QI(n,e),getStyleItems:r}},nF=function(t,n,e,o,r){var i=tF(0,n,e),u=i.items,a=i.getStyleItems;return lE({text:e.icon.isSome()?z.none():e.text,icon:e.icon,tooltip:z.from(e.tooltip),role:z.none(),fetch:u.getFetch(n,a),onSetup:function(n){var i=function(e){return n.setTooltip(ZI(t,o,e.value))};return t.on(r,i),DS(BS(t,"NodeChange",(function(n){var o=n.getComponent();e.updateText(o),Bm.set(n.getComponent(),!t.selection.isEditable())}))(n),(function(){return t.off(r,i)}))},getApi:function(t){return{getComponent:D(t),setTooltip:function(e){var o=n.shared.providers.translate(e);Rn(t.element,{"aria-label":o,title:o})}}},columns:1,presets:"normal",classes:e.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",n.shared)};!function(t){t[t.SemiColon=0]="SemiColon",t[t.Space=1]="Space"}(cO||(cO={}));var eF,oF,rF,iF,uF,aF,cF=function(t,n,e){var o=function(t){return K(t,(function(t){var n=t,e=t,o=t.split("=");return o.length>1&&(n=o[0],e=o[1]),{title:n,format:e}}))}(function(t,n){return n===cO.SemiColon?t.replace(/;$/,"").split(";"):t.split(" ")}(t.options.get(n),e));return{type:"basic",data:o}},sF="Alignment {0}",lF="left",fF=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}],dF=function(t){var n={type:"basic",data:fF};return{tooltip:ZI(t,sF,lF),text:z.none(),icon:z.some("align-left"),isSelectedFor:function(n){return function(){return t.formatter.match(n)}},getCurrentValue:z.none,getPreviewFor:function(t){return z.none},onAction:function(n){return function(){return nt(fF,(function(t){return t.format===n.format})).each((function(n){return t.execCommand(n.command)}))}},updateText:function(n){var e=nt(fF,(function(n){return t.formatter.match(n.format)})),o=e.fold(D(lF),(function(t){return t.title.toLowerCase()}));nu(n,sE,{icon:"align-".concat(o)}),function(t,n){t.dispatch("AlignTextUpdate",n)}(t,{value:o})},dataset:n,shouldHide:!1,isInvalid:function(n){return!t.formatter.canApply(n.format)}}},mF=function(t,n){var e=n(),o=K(e,(function(t){return t.format}));return z.from(t.formatter.closest(o)).bind((function(t){return nt(e,(function(n){return n.format===t}))})).orThunk((function(){return Ft(t.formatter.match("p"),{title:"Paragraph",format:"p"})}))},gF="Block {0}",pF="Paragraph",hF=function(t){var n=cF(t,"block_formats",cO.SemiColon);return{tooltip:ZI(t,gF,pF),text:z.some(pF),icon:z.none(),isSelectedFor:function(n){return function(){return t.formatter.match(n)}},getCurrentValue:z.none,getPreviewFor:function(n){return function(){var e=t.formatter.get(n);return e?z.some({tag:e.length>0&&(e[0].inline||e[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(n))}):z.none()}},onAction:IS(t),updateText:function(e){var o=mF(t,(function(){return n.data})).fold(D(pF),(function(t){return t.title}));nu(e,cE,{text:o}),function(t,n){t.dispatch("BlocksTextUpdate",n)}(t,{value:o})},dataset:n,shouldHide:!1,isInvalid:function(n){return!t.formatter.canApply(n.format)}}},vF="Font {0}",bF="System Font",yF=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],xF=function(t){var n=t.split(/\s*,\s*/);return K(n,(function(t){return t.replace(/^['"]+|['"]+$/g,"")}))},wF=function(t,n){return n.length>0&&it(n,(function(n){return t.indexOf(n.toLowerCase())>-1}))},SF=function(t){var n=function(){var n=function(t){return t?xF(t)[0]:""},o=t.queryCommandValue("FontName"),r=e.data,i=o?o.toLowerCase():"",u=ty(t),a=nt(r,(function(t){var e=t.format;return e.toLowerCase()===i||n(e).toLowerCase()===n(i).toLowerCase()})).orThunk((function(){return Ft(function(t,n){if(0===t.indexOf("-apple-system")||n.length>0){var e=xF(t.toLowerCase());return wF(e,yF)||wF(e,n)}return!1}(i,u),{title:bF,format:i})}));return{matchOpt:a,font:o}},e=cF(t,"font_family_formats",cO.SemiColon);return{tooltip:ZI(t,vF,bF),text:z.some(bF),icon:z.none(),isSelectedFor:function(t){return function(n){return n.exists((function(n){return n.format===t}))}},getCurrentValue:function(){return n().matchOpt},getPreviewFor:function(t){return function(){return z.some({tag:"div",styles:-1===t.indexOf("dings")?{"font-family":t}:{}})}},onAction:function(n){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontName",!1,n.format)}))}},updateText:function(e){var o=n(),r=o.matchOpt,i=o.font,u=r.fold(D(i),(function(t){return t.title}));nu(e,cE,{text:u}),function(t,n){t.dispatch("FontFamilyTextUpdate",n)}(t,{value:u})},dataset:e,shouldHide:!1,isInvalid:N}},kF={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},OF=(eF="[0-9]+",oF="[eE][+-]?"+eF,rF=function(t){return"(?:".concat(t,")?")},iF=["Infinity",eF+"\\."+rF(eF)+rF(oF),"\\."+eF+rF(oF),eF+rF(oF)].join("|"),uF="[+-]?(?:".concat(iF,")"),new RegExp("^(".concat(uF,")(.*)$"))),CF=function(t,n){return z.from(OF.exec(t)).bind((function(t){var e=Number(t[1]),o=t[2];return function(t,n){return q(n,(function(n){return q(kF[n],(function(n){return t===n}))}))}(o,n)?z.some({value:e,unit:o}):z.none()}))},_F={tab:D(9),escape:D(27),enter:D(13),backspace:D(8),delete:D(46),left:D(37),up:D(38),right:D(39),down:D(40),space:D(32),home:D(36),end:D(35),pageUp:D(33),pageDown:D(34)},TF=function(t,n,e){var o=z.none(),r=BS(t,"NodeChange SwitchMode",(function(n){var r=n.getComponent();o=z.some(r),e.updateInputValue(r),Bm.set(r,!t.selection.isEditable())})),i=function(t){return{getComponent:D(t)}},u=Gr(_),a=Du("custom-number-input-events"),c=function(t,n,r){var i=o.map((function(t){return sd.getValue(t)})).getOr(""),u=e.getNewValue(i,t),a=i.length-"".concat(u).length,c=o.map((function(t){return t.element.dom.selectionStart-a})),s=o.map((function(t){return t.element.dom.selectionEnd-a}));e.onAction(u,r),o.each((function(t){sd.setValue(t,u),n&&(c.each((function(n){return t.element.dom.selectionStart=n})),s.each((function(n){return t.element.dom.selectionEnd=n})))}))},s=function(t,n){return c((function(t,n){return t-n}),t,n)},l=function(t,n){return c((function(t,n){return t+n}),t,n)},f=function(t){return pn(t.element).fold(z.none,(function(t){return ls(t),z.some(!0)}))},d=function(t){return ds(t.element)?(yn(t.element).each((function(t){return ls(t)})),z.some(!0)):z.none()},m=function(e,o,r,u){var a,c=Gr(_),s=n.shared.providers.translate(r),l=Du("altExecuting"),f=BS(t,"NodeChange SwitchMode",(function(n){Bm.set(n.getComponent(),!t.selection.isEditable())})),d=function(t){Bm.isDisabled(t)||e(!0)};return Uh.sketch({dom:{tag:"button",attributes:{title:s,"aria-label":s},classes:u.concat(o)},components:[iE(o,n.shared.providers.icons)],buttonBehaviours:es([Bm.config({}),Jp(l,[zw({onSetup:f,getApi:i},c),Lw({getApi:i},c),su(vi(),(function(t,n){n.event.raw.keyCode!==_F.space()&&n.event.raw.keyCode!==_F.enter()||Bm.isDisabled(t)||e(!1)})),su(wi(),d),su(ci(),d)])]),eventOrder:(a={},a[vi()]=[l,"keying"],a[wi()]=[l,"alloy.base.behaviour"],a[ci()]=[l,"alloy.base.behaviour"],a)})},g=jh(m((function(t){return s(!1,t)}),"minus","Decrease font size",[])),p=jh(m((function(t){return l(!1,t)}),"plus","Increase font size",[])),h=jh({dom:{tag:"div",classes:["tox-input-wrapper"]},components:[Yy.sketch({inputBehaviours:es([Bm.config({}),Jp(a,[zw({onSetup:r,getApi:i},u),Lw({getApi:i},u)]),Jp("input-update-display-text",[su(cE,(function(t,n){sd.setValue(t,n.event.text)})),su(hi(),(function(t){e.onAction(sd.getValue(t))})),su(xi(),(function(t){e.onAction(sd.getValue(t))}))]),Hp.config({mode:"special",onEnter:function(t){return c(A,!0,!0),z.some(!0)},onEscape:f,onUp:function(t){return l(!0,!1),z.some(!0)},onDown:function(t){return s(!0,!1),z.some(!0)},onLeft:function(t,n){return n.cut(),z.none()},onRight:function(t,n){return n.cut(),z.none()}})])})],behaviours:es([nh.config({}),Hp.config({mode:"special",onEnter:d,onSpace:d,onEscape:f}),Jp("input-wrapper-events",[su(gi(),(function(t){J([g,p],(function(n){var e=Gt.fromDom(n.get(t).element.dom);ds(e)&&fs(e)}))}))])])});return{dom:{tag:"div",classes:["tox-number-input"]},components:[g.asSpec(),h.asSpec(),p.asSpec()],behaviours:es([nh.config({}),Hp.config({mode:"flow",focusInside:Il.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape:function(t){return ds(t.element)?z.none():(ls(t.element),z.some(!0))}})])}},EF="Font size {0}",DF="12pt",AF={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},MF={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},BF=function(t,n){return/[0-9.]+px$/.test(t)?function(t,n){var e=Math.pow(10,n);return Math.round(t*e)/e}(72*parseInt(t,10)/96,n||0)+"pt":Tt(MF,t).getOr(t)},IF=function(t){var n=function(){var n=z.none(),e=o.data,r=t.queryCommandValue("FontSize");if(r)for(var i=function(t){var o=BF(r,t),i=function(t){return Tt(AF,t).getOr("")}(o);n=nt(e,(function(t){return t.format===r||t.format===o||t.format===i}))},u=3;n.isNone()&&u>=0;u--)i(u);return{matchOpt:n,size:r}},e=D(z.none),o=cF(t,"font_size_formats",cO.Space);return{tooltip:ZI(t,EF,DF),text:z.some(DF),icon:z.none(),isSelectedFor:function(t){return function(n){return n.exists((function(n){return n.format===t}))}},getPreviewFor:e,getCurrentValue:function(){return n().matchOpt},onAction:function(n){return function(){t.undoManager.transact((function(){t.focus(),t.execCommand("FontSize",!1,n.format)}))}},updateText:function(e){var o=n(),r=o.matchOpt,i=o.size,u=r.fold(D(i),(function(t){return t.title}));nu(e,cE,{text:u}),function(t,n){t.dispatch("FontSizeTextUpdate",n)}(t,{value:u})},dataset:o,shouldHide:!1,isInvalid:N}},FF="Format {0}",RF=function(t,n){var e="Paragraph";return{tooltip:ZI(t,FF,e),text:z.some(e),icon:z.none(),isSelectedFor:function(n){return function(){return t.formatter.match(n)}},getCurrentValue:z.none,getPreviewFor:function(n){return function(){var e=t.formatter.get(n);return void 0!==e?z.some({tag:e.length>0&&(e[0].inline||e[0].block)||"div",styles:t.dom.parseStyle(t.formatter.getCssText(n))}):z.none()}},onAction:IS(t),updateText:function(n){var o=function(t){return _A(t)?rt(t.items,o):TA(t)?[{title:t.title,format:t.format}]:[]},r=rt(AA(t),o),i=mF(t,D(r)).fold(D(e),(function(t){return t.title}));nu(n,cE,{text:i}),function(t,n){t.dispatch("StylesTextUpdate",n)}(t,{value:i})},shouldHide:_b(t),isInvalid:function(n){return!t.formatter.canApply(n.format)},dataset:n}},NF=D([yr("toggleClass"),yr("fetch"),fc("onExecute"),Nr("getHotspot",z.some),Nr("getAnchorOverrides",D({})),ul(),fc("onItemExecute"),Er("lazySink"),yr("dom"),sc("onOpen"),ld("splitDropdownBehaviours",[Fk,Hp,nh]),Nr("matchWidth",!1),Nr("useMinWidth",!1),Nr("eventOrder",{}),Er("role")].concat(Zk())),VF=Ld({factory:Uh,schema:[yr("dom")],name:"arrow",defaults:function(){return{buttonBehaviours:es([nh.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(t.uid).each(eu)},buttonBehaviours:es([sh.config({toggleOnExecute:!1,toggleClass:t.toggleClass})])}}}),zF=Ld({factory:Uh,schema:[yr("dom")],name:"button",defaults:function(){return{buttonBehaviours:es([nh.revoke()])}},overrides:function(t){return{dom:{tag:"span",attributes:{role:"presentation"}},action:function(n){n.getSystem().getByUid(t.uid).each((function(e){t.onExecute(e,n)}))}}}}),LF=D([VF,zF,Pd({factory:{sketch:function(t){return{uid:t.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:t.text}}}},schema:[yr("text")],name:"aria-descriptor"}),Hd({schema:[uc()],name:"menu",defaults:function(t){return{onExecute:function(n,e){n.getSystem().getByUid(t.uid).each((function(o){t.onItemExecute(o,n,e)}))}}}}),Uk()]),HF=gm({name:"SplitDropdown",configFields:NF(),partFields:LF(),factory:function(t,n,o,r){var i,u=function(t){bm.getCurrent(t).each((function(t){Wm.highlightFirst(t),Hp.focusIn(t)}))},a=function(n){qk(t,A,n,r,u,mg.HighlightMenuAndItem).get(_)},c=function(n){var e=tm(n,t,"button");return eu(e),z.some(!0)},s=e(e({},uu([vu((function(n,e){Qd(n,t,"aria-descriptor").each((function(t){var e=Du("aria");Fn(t.element,"id",e),Fn(n.element,"aria-describedby",e)}))}))])),fh(z.some(a))),l={repositionMenus:function(t){sh.isOn(t)&&$k(t)}};return{uid:t.uid,dom:t.dom,components:n,apis:l,eventOrder:e(e({},t.eventOrder),(i={},i[Bi()]=["disabling","toggling","alloy.base.behaviour"],i)),events:s,behaviours:dd(t.splitDropdownBehaviours,[Fk.config({others:{sandbox:function(n){var e=tm(n,t,"arrow");return Jk(t,n,{onOpen:function(){sh.on(e),sh.on(n)},onClose:function(){sh.off(e),sh.off(n)}})}}}),Hp.config({mode:"special",onSpace:c,onEnter:c,onDown:function(t){return a(t),z.some(!0)}}),nh.config({}),sh.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:t.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:function(t,n){return t.repositionMenus(n)}}}),PF=function(t){return{isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)},setText:function(n){return nu(t,cE,{text:n})},setIcon:function(n){return nu(t,sE,{icon:n})}}},UF=function(t){return{setActive:function(n){sh.set(t,n)},isActive:function(){return sh.isOn(t)},isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)},setText:function(n){return nu(t,cE,{text:n})},setIcon:function(n){return nu(t,sE,{icon:n})}}},WF=function(t,n){return t.map((function(t){return{"aria-label":n.translate(t),title:n.translate(t)}})).getOr({})},jF=Du("focus-button"),GF=function(t,n,e,o,r){var i,u=n.map((function(t){return jh(aE(t,"tox-tbtn",r))})),a=t.map((function(t){return jh(uE(t,r.icons))}));return{dom:{tag:"button",classes:["tox-tbtn"].concat(n.isSome()?["tox-tbtn--select"]:[]),attributes:WF(e,r)},components:Uw([a.map((function(t){return t.asSpec()})),u.map((function(t){return t.asSpec()}))]),eventOrder:(i={},i[li()]=["focusing","alloy.base.behaviour",nE],i[Wi()]=[nE,"toolbar-group-button-events"],i),buttonBehaviours:es([Nw(r.isDisabled),Bw(),Jp(nE,[vu((function(t,n){return oE(t)})),su(cE,(function(t,n){u.bind((function(n){return n.getOpt(t)})).each((function(t){Kp.set(t,[Ba(r.translate(n.event.text))])}))})),su(sE,(function(t,n){a.bind((function(n){return n.getOpt(t)})).each((function(t){Kp.set(t,[uE(n.event.icon,r.icons)])}))})),su(li(),(function(t,n){n.event.prevent(),tu(t,jF)}))])].concat(o.getOr([])))}},qF=function(t,n,o){var r,i,u,a=Gr(_),c=GF(t.icon,t.text,t.tooltip,z.none(),o);return Uh.sketch({dom:c.dom,components:c.components,eventOrder:eE,buttonBehaviours:e(e({},es([Jp("toolbar-button-events",[(u={onAction:t.onAction,getApi:n.getApi},xu((function(t,n){Vw(u,t)((function(n){nu(t,tE,{buttonApi:n}),u.onAction(n)}))}))),zw(n,a),Lw(n,a)]),Nw((function(){return!t.enabled||o.isDisabled()})),Bw()].concat(n.toolbarButtonBehaviours))),(r={},r[nE]=null===(i=c.buttonBehaviours)||void 0===i?void 0:i[nE],r))})},YF=function(t,n,e){return qF(t,{toolbarButtonBehaviours:e.length>0?[Jp("toolbarButtonWith",e)]:[],getApi:PF,onSetup:t.onSetup},n)},XF=function(t,n,e){return qF(t,{toolbarButtonBehaviours:[Kp.config({}),sh.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(e.length>0?[Jp("toolbarToggleButtonWith",e)]:[]),getApi:UF,onSetup:t.onSetup},n)},KF=function(t,n,e){return function(o){return Lk((function(t){return n.fetch(t)})).map((function(r){return z.from(dO(Ao(gk(Du("menu-value"),r,(function(e){n.onItemAction(t(o),e)}),n.columns,n.presets,Oy.CLOSE_ON_EXECUTE,n.select.getOr(N),e),{movement:hk(n.columns,n.presets),menuBehaviours:bw("auto"!==n.columns?[]:[vu((function(t,e){hw(t,4,Ny(n.presets)).each((function(n){var e=n.numRows,o=n.numColumns;Hp.setGridSize(t,e,o)}))}))])})))}))}},JF=[{name:"history",items:["undo","redo"]},{name:"ai",items:["aidialog","aishortcuts"]},{name:"styles",items:["styles"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}],$F=function(t,n){return function(e,o,r){var i=t(e).mapError((function(t){return mr(t)})).getOrDie();return n(i,o,r)}},ZF={button:$F(Ux,(function(t,n){return e=t,o=n.shared.providers,YF(e,o,[]);var e,o})),togglebutton:$F(Gx,(function(t,n){return e=t,o=n.shared.providers,XF(e,o,[]);var e,o})),menubutton:$F(dB,(function(t,n){return XE(t,"tox-tbtn",n,z.none(),!1)})),splitbutton:$F((function(t){return lr("SplitButton",mB,t)}),(function(t,n){return function(t,n){var o,r=function(t){return{isEnabled:function(){return!Bm.isDisabled(t)},setEnabled:function(n){return Bm.set(t,!n)},setIconFill:function(n,e){ja(t.element,'svg path[class="'.concat(n,'"], rect[class="').concat(n,'"]')).each((function(t){Fn(t,"fill",e)}))},setActive:function(n){Fn(t.element,"aria-pressed",n),ja(t.element,"span").each((function(e){t.getSystem().getByDom(e).each((function(t){return sh.set(t,n)}))}))},isActive:function(){return ja(t.element,"span").exists((function(n){return t.getSystem().getByDom(n).exists(sh.isOn)}))},setText:function(n){return ja(t.element,"span").each((function(e){return t.getSystem().getByDom(e).each((function(t){return nu(t,cE,{text:n})}))}))},setIcon:function(n){return ja(t.element,"span").each((function(e){return t.getSystem().getByDom(e).each((function(t){return nu(t,sE,{icon:n})}))}))},setTooltip:function(e){var o=n.providers.translate(e);Rn(t.element,{"aria-label":o,title:o})}}},i=Gr(_),u={getApi:r,onSetup:t.onSetup};return HF.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:e({"aria-pressed":!1},WF(t.tooltip,n.providers))},onExecute:function(n){var e=r(n);e.isEnabled()&&t.onAction(e)},onItemExecute:function(t,n,e){},splitDropdownBehaviours:es([Rw(n.providers.isDisabled),Bw(),Jp("split-dropdown-events",[vu((function(t,n){return oE(t)})),su(jF,nh.focus),zw(u,i),Lw(u,i)]),dC.config({})]),eventOrder:(o={},o[Wi()]=["alloy.base.behaviour","split-dropdown-events"],o),toggleClass:"tox-tbtn--enabled",lazySink:n.getSink,fetch:KF(r,t,n.providers),parts:{menu:Uy(0,t.columns,t.presets)},components:[HF.parts.button(GF(t.icon,t.text,z.none(),z.some([sh.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),n.providers)),HF.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:rb("chevron-down",n.providers.icons)},buttonBehaviours:es([Rw(n.providers.isDisabled),Bw(),ib()])}),HF.parts["aria-descriptor"]({text:n.providers.translate("To open the popup, press Shift+Enter")})]})}(t,n.shared)})),grouptoolbarbutton:$F((function(t){return lr("GroupToolbarButton",sB,t)}),(function(t,n,e){var o,r=e.ui.registry.getAll().buttons,i=((o={})[rl]=n.shared.header.isPositionedAtTop()?Os.TopToBottom:Os.BottomToTop,o);if(Db(e)===Xv.floating)return function(t,n,e,o){var r=n.shared,i=Gr(_),u={toolbarButtonBehaviours:[],getApi:PF,onSetup:t.onSetup},a=[Jp("toolbar-group-button-events",[zw(u,i),Lw(u,i)])];return $B.sketch({lazySink:r.getSink,fetch:function(){return Lk((function(n){n(K(e(t.items),lI))}))},markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:GF(t.icon,t.text,t.tooltip,z.some(a),r.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:o}}}})}(t,n,(function(t){return eR(e,{buttons:r,toolbar:t,allowToolbarGroups:!1},n,z.none())}),i);throw new Error("Toolbar groups are only supported when using floating toolbar mode")}))},QF={styles:function(t,n){var o=e({type:"advanced"},n.styles);return nF(t,n,RF(t,o),FF,"StylesTextUpdate")},fontsize:function(t,n){return nF(t,n,IF(t),EF,"FontSizeTextUpdate")},fontsizeinput:function(t,n){return TF(t,n,function(t){var n=function(){return t.queryCommandValue("FontSize")};return{updateInputValue:function(t){return nu(t,cE,{text:n()})},onAction:function(n,e){return t.execCommand("FontSize",!1,n,{skip_focus:!e})},getNewValue:function(e,o){CF(e,["unsupportedLength","empty"]);var r=n(),i=CF(e,["unsupportedLength","empty"]).or(CF(r,["unsupportedLength","empty"])),u=i.map((function(t){return t.value})).getOr(16),a=Hb(t),c=i.map((function(t){return t.unit})).filter((function(t){return""!==t})).getOr(a),s=o(u,function(t){var n;return null!==(n={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[t])&&void 0!==n?n:{step:1}}(c).step),l="".concat(function(t){return t>=0}(s)?s:u).concat(c);return l!==r&&function(t,n){t.dispatch("FontSizeInputTextUpdate",n)}(t,{value:l}),l}}}(t))},fontfamily:function(t,n){return nF(t,n,SF(t),vF,"FontFamilyTextUpdate")},blocks:function(t,n){return nF(t,n,hF(t),gF,"BlocksTextUpdate")},align:function(t,n){return nF(t,n,dF(t),sF,"AlignTextUpdate")}},tR=function(t){var n,e=t.toolbar,o=t.buttons;return!1===e?[]:void 0===e||!0===e?function(t){var n=K(JF,(function(n){var e=Z(n.items,(function(n){return Et(t,n)||Et(QF,n)}));return{name:n.name,items:e}}));return Z(n,(function(t){return t.items.length>0}))}(o):g(e)?(n=e.split("|"),K(n,(function(t){return{items:t.trim().split(" ")}}))):function(t){return C(t,(function(t){return Et(t,"name")&&Et(t,"items")}))}(e)?e:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])},nR=function(t,n,e,o,r,i){return Tt(n,e.toLowerCase()).orThunk((function(){return i.bind((function(t){return pt(t,(function(t){return Tt(n,t+e.toLowerCase())}))}))})).fold((function(){return Tt(QF,e.toLowerCase()).map((function(n){return n(t,r)}))}),(function(n){return"grouptoolbarbutton"!==n.type||o?function(t,n,e){return Tt(ZF,t.type).fold((function(){return console.error("skipping button defined by",t),z.none()}),(function(o){return z.some(o(t,n,e))}))}(n,r,t):(console.warn("Ignoring the '".concat(e,"' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.")),z.none())}))},eR=function(t,n,e,o){var r=tR(n),i=K(r,(function(r){var i=rt(r.items,(function(r){return 0===r.trim().length?[]:nR(t,n.buttons,r,n.allowToolbarGroups,e,o).toArray()}));return{title:z.from(t.translate(r.name)),items:i}}));return Z(i,(function(t){return t.items.length>0}))},oR=function(t,n,e,o){var r=n.mainUi.outerContainer,i=e.toolbar,u=e.buttons;if(C(i,g)){var a=i.map((function(n){var r={toolbar:n,buttons:u,allowToolbarGroups:e.allowToolbarGroups};return eR(t,r,o,z.none())}));PI.setToolbars(r,a)}else PI.setToolbar(r,eR(t,e,o,z.none()))},rR=Le(),iR=rR.os.isiOS()&&rR.os.version.major<=12,uR=Object.freeze({__proto__:null,render:function(t,n,e,o,r){var i=n.mainUi,u=n.uiMotherships,a=Gr(0),c=i.outerContainer;JI(t);var s=Gt.fromDom(r.targetNode),l=_n(Cn(s));Af(s,i.mothership),function(t,n,e){py(t)&&Af(e.mainUi.mothership.element,e.popupUi.mothership),Df(n,e.dialogUi.mothership)}(t,l,n),t.on("SkinLoaded",(function(){PI.setSidebar(c,e.sidebar,$b(t)),oR(t,n,e,o),a.set(t.getWin().innerWidth),PI.setMenubar(c,jI(t,e)),PI.setViews(c,e.views),function(t,n){var e=n.uiMotherships,o=t.dom,r=t.getWin(),i=t.getDoc().documentElement,u=Gr(oe(r.innerWidth,r.innerHeight)),a=Gr(oe(i.offsetWidth,i.offsetHeight)),c=function(){var n=u.get();n.left===r.innerWidth&&n.top===r.innerHeight||(u.set(oe(r.innerWidth,r.innerHeight)),_S(t))},s=function(){var n=t.getDoc().documentElement,e=a.get();e.left===n.offsetWidth&&e.top===n.offsetHeight||(a.set(oe(n.offsetWidth,n.offsetHeight)),_S(t))},l=function(n){!function(t,n){t.dispatch("ScrollContent",n)}(t,n)};o.bind(r,"resize",c),o.bind(r,"scroll",l);var f=Vs(Gt.fromDom(t.getBody()),"load",s);t.on("hide",(function(){J(e,(function(t){Un(t.element,"display","none")}))})),t.on("show",(function(){J(e,(function(t){Jn(t.element,"display")}))})),t.on("NodeChange",s),t.on("remove",(function(){f.unbind(),o.unbind(r,"resize",c),o.unbind(r,"scroll",l),r=null}))}(t,n)}));var f,d,m,g=PI.getSocket(c).getOrDie("Could not find expected socket element");if(iR){Wn(g.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});var p=(f=function(){t.dispatch("ScrollContent")},d=20,m=null,{cancel:function(){b(m)||(clearTimeout(m),m=null)},throttle:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];b(m)&&(m=setTimeout((function(){m=null,f.apply(null,t)}),d))}}),h=Ns(g.element,"scroll",p.throttle);t.on("remove",h.unbind)}Mw(t,n),t.addCommand("ToggleSidebar",(function(n,e){PI.toggleSidebar(c,e),t.dispatch("ToggleSidebar")})),t.addQueryValueHandler("ToggleSidebar",(function(){var t;return null!==(t=PI.whichSidebar(c))&&void 0!==t?t:""})),t.addCommand("ToggleView",(function(n,e){if(PI.toggleView(c,e)){var o=c.element;i.mothership.broadcastOn([jf()],{target:o}),J(u,(function(t){t.broadcastOn([jf()],{target:o})})),b(PI.whichView(c))&&(t.focus(),t.nodeChanged(),PI.refreshToolbar(c))}})),t.addQueryValueHandler("ToggleView",(function(){var t;return null!==(t=PI.whichView(c))&&void 0!==t?t:""}));var v=Db(t);v!==Xv.sliding&&v!==Xv.floating||t.on("ResizeWindow ResizeEditor ResizeContent",(function(){var e=t.getWin().innerWidth;e!==a.get()&&(PI.refreshToolbar(n.mainUi.outerContainer),a.set(e))}));var y={setEnabled:function(t){Aw(n,!t)},isEnabled:function(){return!Bm.isDisabled(c)}};return{iframeContainer:g.element.dom,editorContainer:c.element.dom,api:y}}}),aR=function(t){return/^[0-9\.]+(|px)$/i.test(""+t)?z.some(parseInt(""+t,10)):z.none()},cR=function(t){return O(t)?t+"px":t},sR=function(t,n,e){var o=n.filter((function(n){return t<n})),r=e.filter((function(n){return t>n}));return o.or(r).getOr(t)},lR=function(t){var n=function(t){var n=bb(t),e=wb(t),o=kb(t);return aR(n).map((function(t){return sR(t,e,o)}))}(t);return n.getOr(bb(t))},fR=function(t){var n=yb(t),e=xb(t),o=Sb(t);return aR(n).map((function(t){return sR(t,e,o)}))},dR=vy.ToolbarLocation,mR=vy.ToolbarMode,gR=function(t,n,o,r,i){var u=o.mainUi,a=o.uiMotherships,c=lb.DOM,s=fy(t),l=gy(t),f=Sb(t).or(fR(t)),d=r.shared.header,m=d.isPositionedAtTop,g=Db(t),p=g===mR.sliding||g===mR.floating,h=Gr(!1),v=function(){return h.get()&&!t.removed},b=function(t){return p?t.fold(D(0),(function(t){return t.components().length>1?te(t.components()[1].element):0})):0},y=function(t,n){return py(t)?wM(n):z.none()},x=function(){J(a,(function(t){t.broadcastOn([Gf()],{})}))},w=function(o){if(v()){s||i.on((function(t){var e=f.getOrThunk((function(){var t=aR(Gn(Mn(),"margin-left")).getOr(0);return ce(Mn())-ie(n).left+t}));Un(t.element,"max-width",e+"px")}));var r=s?z.none():function(){if(s)return z.none();if(ie(u.outerContainer.element).left+se(u.outerContainer.element)>=window.innerWidth-40||Yn(u.outerContainer.element,"width").isSome()){Un(u.outerContainer.element,"position","absolute"),Un(u.outerContainer.element,"left","0px"),Jn(u.outerContainer.element,"width");var t=se(u.outerContainer.element);return z.some(t)}return z.none()}();p&&PI.refreshToolbar(u.outerContainer),s||function(o){i.on((function(r){var i=PI.getToolbar(u.outerContainer),a=b(i),c=io(n),s=y(t,u.outerContainer.element).fold((function(){return{top:m()?Math.max(c.y-te(r.element)+a,0):c.bottom,left:c.x}}),(function(t){var n,e=io(t),o=null!==(n=t.dom.scrollTop)&&void 0!==n?n:0,i=cn(t,Mn()),u=i?Math.max(c.y-te(r.element)+a,0):c.y-e.y+o-te(r.element)+a;return{top:m()?u:c.bottom,left:i?c.x:c.x-e.x}})),l=s.top,f=s.left,d={position:"absolute",left:Math.round(f)+"px",top:Math.round(l)+"px"},g=o.map((function(t){var n=Je(),e=window.innerWidth-(f-n.left);return{width:Math.max(Math.min(t,e),150)+"px"}})).getOr({});Wn(u.outerContainer.element,e(e({},d),g))}))}(r),l&&i.on(o),x()}},S=function(){return!(s||!l||!v())&&i.get().exists((function(e){var o,r=d.getDockingMode(),a=function(e){switch(Mb(t)){case dR.auto:var o=PI.getToolbar(u.outerContainer),r=b(o),i=te(e.element)-r,a=io(n);if(a.y>i)return"top";var c=dn(n),s=Math.max(c.dom.scrollHeight,te(c));return a.bottom<s-i||co().bottom<a.bottom-i?"bottom":"top";case dR.bottom:return"bottom";case dR.top:default:return"top"}}(e);return a!==r&&(o=a,i.on((function(t){ZM.setModes(t,[o]),d.setDockingMode(o);var n=m()?Os.TopToBottom:Os.BottomToTop;Fn(t.element,rl,n)})),!0)}))};return{isVisible:v,isPositionedAtTop:m,show:function(){h.set(!0),Un(u.outerContainer.element,"display","flex"),c.addClass(t.getBody(),"mce-edit-focus"),J(a,(function(t){Jn(t.element,"display")})),S(),py(t)?w((function(t){return ZM.isDocked(t)?ZM.reset(t):ZM.refresh(t)})):w(ZM.refresh)},hide:function(){h.set(!1),Un(u.outerContainer.element,"display","none"),c.removeClass(t.getBody(),"mce-edit-focus"),J(a,(function(t){Un(t.element,"display","none")}))},update:w,updateMode:function(){S()&&w(ZM.reset)},repositionPopups:x}},pR=function(t,n){var e=io(t);return{pos:n?e.y:e.bottom,bounds:e}},hR=Object.freeze({__proto__:null,render:function(t,n,e,o,r){var i=n.mainUi,u=Fs(),a=Gt.fromDom(r.targetNode),c=gR(t,a,n,o,u),s=Fb(t);$I(t);var l=function(){if(u.isSet())c.show();else{u.set(PI.getHeader(i.outerContainer).getOrDie());var r=dy(t);py(t)?(Af(a,i.mothership),Af(a,n.popupUi.mothership)):Df(r,i.mothership),Df(r,n.dialogUi.mothership),oR(t,n,e,o),PI.setMenubar(i.outerContainer,jI(t,e)),c.show(),function(t,n,e,o){var r=Gr(pR(n,e.isPositionedAtTop())),i=function(o){var i=pR(n,e.isPositionedAtTop()),u=i.pos,a=i.bounds,c=r.get(),s=c.pos,l=c.bounds,f=a.height!==l.height||a.width!==l.width;r.set({pos:u,bounds:a}),f&&_S(t,o),e.isVisible()&&(s!==u?e.update(ZM.reset):f&&(e.updateMode(),e.repositionPopups()))};o||(t.on("activate",e.show),t.on("deactivate",e.hide)),t.on("SkinLoaded ResizeWindow",(function(){return e.update(ZM.reset)})),t.on("NodeChange keydown",(function(t){requestAnimationFrame((function(){return i(t)}))}));var u=0,a=ET((function(){return e.update(ZM.refresh)}),33);t.on("ScrollWindow",(function(){var t=Je().left;t!==u&&(u=t,a.throttle()),e.updateMode()})),py(t)&&t.on("ElementScroll",(function(t){e.update(ZM.refresh)}));var c=Is();c.set(Vs(Gt.fromDom(t.getBody()),"load",(function(t){return i(t.raw)}))),t.on("remove",(function(){c.clear()}))}(t,a,c,s),t.nodeChanged()}};t.on("show",l),t.on("hide",c.hide),s||(t.on("focus",l),t.on("blur",c.hide)),t.on("init",(function(){(t.hasFocus()||s)&&l()})),Mw(t,n);var f={show:l,hide:c.hide,setEnabled:function(t){Aw(n,!t)},isEnabled:function(){return!Bm.isDisabled(i.outerContainer)}};return{editorContainer:i.outerContainer.element.dom,api:f}}}),vR="contexttoolbar-hide",bR=function(t,n){return su(tE,(function(e,o){var r=function(t){return{hide:function(){return tu(t,Ni())},getValue:function(){return sd.getValue(t)}}}(t.get(e));n.onAction(r,o.event.buttonApi)}))},yR=function(t,n,o){return function(t){return"contextformtogglebutton"===t.type}(n)?function(t,n,o){var r=n.original;r.primary;var u=i(r,["primary"]),a=fr(Gx(e(e({},u),{type:"togglebutton",onAction:_})));return XF(a,o,[bR(t,n)])}(t,n,o):function(t,n,o){var r=n.original;r.primary;var u=i(r,["primary"]),a=fr(Ux(e(e({},u),{type:"button",onAction:_})));return YF(a,o,[bR(t,n)])}(t,n,o)},xR=function(t,n){var e=t.label.fold((function(){return{}}),(function(t){return{"aria-label":t}})),o=jh(Yy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:t.initValue(),inputAttributes:e,selectOnFocus:!0,inputBehaviours:es([Hp.config({mode:"special",onEnter:function(t){return r.findPrimary(t).map((function(t){return eu(t),!0}))},onLeft:function(t,n){return n.cut(),z.none()},onRight:function(t,n){return n.cut(),z.none()}})])})),r=function(t,n,e){var o=K(n,(function(n){return jh(yR(t,n,e))}));return{asSpecs:function(){return K(o,(function(t){return t.asSpec()}))},findPrimary:function(t){return pt(n,(function(n,e){return n.primary?z.from(o[e]).bind((function(n){return n.getOpt(t)})).filter(I(Bm.isDisabled)):z.none()}))}}}(o,t.commands,n);return[{title:z.none(),items:[o.asSpec()]},{title:z.none(),items:r.asSpecs()}]},wR=xR,SR=function(t,n,e){return n.bottom-t.y>=e&&t.bottom-n.y>=e},kR=function(t){var n=function(t){var n=t.getBoundingClientRect();if(n.height<=0&&n.width<=0){var e=wn(Gt.fromDom(t.startContainer),t.startOffset).element;return(nn(e)?gn(e):z.some(e)).filter(tn).map((function(t){return t.dom.getBoundingClientRect()})).getOr(n)}return n}(t.selection.getRng());if(t.inline){var e=Je();return ro(e.left+n.left,e.top+n.top,n.width,n.height)}var o=uo(Gt.fromDom(t.getBody()));return ro(o.x+n.left,o.y+n.top,n.width,n.height)},OR=function(t,n,e,o){void 0===o&&(o=0);var r=Qe(window),i=io(Gt.fromDom(t.getContentAreaContainer())),u=ey(t)||uy(t)||cy(t),a=function(t,n,e){var o=Math.max(t.x+e,n.x);return{x:o,width:Math.min(t.right-e,n.right)-o}}(i,r,o),c=a.x,s=a.width;if(t.inline&&!u)return ro(c,r.y,s,r.height);var l=function(t,n,e,o,r,i){var u=Gt.fromDom(t.getContainer()),a=ja(u,".tox-editor-header").getOr(u),c=io(a),s=c.y>=n.bottom,l=o&&!s;if(t.inline&&l)return{y:Math.max(c.bottom+i,e.y),bottom:e.bottom};if(t.inline&&!l)return{y:e.y,bottom:Math.min(c.y-i,e.bottom)};var f="line"===r?io(u):n;return l?{y:Math.max(c.bottom+i,e.y),bottom:Math.min(f.bottom-i,e.bottom)}:{y:Math.max(f.y+i,e.y),bottom:Math.min(c.y-i,e.bottom)}}(t,i,r,n.header.isPositionedAtTop(),e,o),f=l.y,d=l.bottom;return ro(c,f,s,d-f)},CR={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]},_R={maxHeightFunction:Ks(),maxWidthFunction:jB()},TR=function(t){return"node"===t},ER=function(t,n,e,o,r){var i=kR(t),u=o.lastElement().exists((function(t){return cn(e,t)}));return function(t,n){var e=t.selection.getRng(),o=wn(Gt.fromDom(e.startContainer),e.startOffset);return e.startContainer===e.endContainer&&e.startOffset===e.endOffset-1&&cn(o.element,n)}(t,e)?u?fA:uA:u?function(t,n,e){var o=Yn(t,"position");Un(t,"position",n);var r=e(t);return o.each((function(n){return Un(t,"position",n)})),r}(n,o.getMode(),(function(){return SR(i,io(n),-20)&&!o.isReposition()?mA:fA})):("fixed"===o.getMode()?r.y+Je().top:r.y)+(te(n)+12)<=i.y?uA:aA},DR=function(t,n,o,r){var i=function(n){return function(r,i,u,a,c){var s=ER(t,a,n,o,c),l=e(e({},r),{y:c.y,height:c.height});return e(e({},s(l,i,u,a,c)),{alwaysFit:!0})}},u=function(t){return TR(r)?[i(t)]:[]};return n?{onLtr:function(t){return[Pc,Nc,Vc,zc,Lc,Hc].concat(u(t))},onRtl:function(t){return[Pc,Vc,Nc,Lc,zc,Hc].concat(u(t))}}:{onLtr:function(t){return[Hc,Pc,zc,Nc,Lc,Vc].concat(u(t))},onRtl:function(t){return[Hc,Pc,Lc,Vc,zc,Nc].concat(u(t))}}},AR=function(t,n){var e=Z(n,(function(n){return n.predicate(t.dom)})),o=$(e,(function(t){return"contexttoolbar"===t.type}));return{contextToolbars:o.pass,contextForms:o.fail}},MR=function(t,n,o){var r=AR(t,n);if(r.contextForms.length>0)return z.some({elem:t,toolbars:[r.contextForms[0]]});var i=AR(t,o);if(i.contextForms.length>0)return z.some({elem:t,toolbars:[i.contextForms[0]]});if(r.contextToolbars.length>0||i.contextToolbars.length>0){var u=function(t){if(t.length<=1)return t;var n=function(n){return q(t,(function(t){return t.position===n}))},o=function(n){return Z(t,(function(t){return t.position===n}))},r=n("selection"),i=n("node");if(r||i){if(i&&r){var u=o("node"),a=K(o("selection"),(function(t){return e(e({},t),{position:"node"})}));return u.concat(a)}return o(r?"selection":"node")}return o("line")}(r.contextToolbars.concat(i.contextToolbars));return z.some({elem:t,toolbars:u})}return z.none()},BR=function(t,n,e){return t(n)?z.none():Qr(n,(function(t){if(tn(t)){var n=AR(t,e.inNodeScope),o=n.contextToolbars,r=n.contextForms,i=r.length>0?r:function(t){if(t.length<=1)return t;var n=function(n){return nt(t,(function(t){return t.position===n}))},e=n("selection").orThunk((function(){return n("node")})).orThunk((function(){return n("line")})).map((function(t){return t.position}));return e.fold((function(){return[]}),(function(n){return Z(t,(function(t){return t.position===n}))}))}(o);return i.length>0?z.some({elem:t,toolbars:i}):z.none()}return z.none()}),t)},IR=function(t,n){var o={},r=[],i=[],u={},a={},c=function(t,c){var s=fr(lr("ContextForm",Zx,c));o[t]=s,s.launch.map((function(o){u["form:"+t]=e(e({},c.launch),{type:"contextformtogglebutton"===o.type?"togglebutton":"button",onAction:function(){n(s)}})})),"editor"===s.scope?i.push(s):r.push(s),a[t]=s},s=function(t,n){var e;(e=n,lr("ContextToolbar",Qx,e)).each((function(e){"editor"===n.scope?i.push(e):r.push(e),a[t]=e}))},l=ht(t);return J(l,(function(n){var e=t[n];"contextform"===e.type?c(n,e):"contexttoolbar"===e.type&&s(n,e)})),{forms:o,inNodeScope:r,inEditorScope:i,lookupTable:a,formNavigators:u}},FR=Du("forward-slide"),RR=Du("backward-slide"),NR=Du("change-slide-event"),VR="tox-pop--resizing",zR="tox-pop--transition",LR=function(t,n,o,r){var i,u,a=r.backstage,c=a.shared,s=Le().deviceType.isTouch,l=Fs(),f=Fs(),d=Fs(),m=Na((i={sink:o,onEscape:function(){return t.focus(),z.some(!0)}},u=Gr([]),Hh.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:function(t){u.set([]),Hh.getContent(t).each((function(t){Jn(t.element,"visibility")})),da(t.element,VR),Jn(t.element,"width")},inlineBehaviours:es([Jp("context-toolbar-events",[hu(ki(),(function(t,n){"width"===n.event.raw.propertyName&&(da(t.element,VR),Jn(t.element,"width"))})),su(NR,(function(t,n){var e=t.element;Jn(e,"width");var o=ce(e);Hh.setContent(t,n.event.contents),la(e,VR);var r=ce(e);Un(e,"width",o+"px"),Hh.getContent(t).each((function(t){n.event.focus.bind((function(t){return ls(t),gs(e)})).orThunk((function(){return Hp.focusIn(t),ms(Cn(e))}))})),setTimeout((function(){Un(t.element,"width",r+"px")}),0)})),su(FR,(function(t,n){Hh.getContent(t).each((function(n){u.set(u.get().concat([{bar:n,focus:ms(Cn(t.element))}]))})),nu(t,NR,{contents:n.event.forwardContents,focus:z.none()})})),su(RR,(function(t,n){mt(u.get()).each((function(n){u.set(u.get().slice(0,u.get().length-1)),nu(t,NR,{contents:Va(n.bar),focus:n.focus})}))}))]),Hp.config({mode:"special",onEscape:function(t){return mt(u.get()).fold((function(){return i.onEscape()}),(function(n){return tu(t,RR),z.some(!0)}))}})]),lazySink:function(){return mo.value(i.sink)}}))),g=function(){var n=d.get().getOr("node"),e=TR(n)?1:0;return OR(t,c,n,e)},p=function(){return!(t.removed||s()&&a.isContextMenuOpen())},h=function(){if(p()){var n=g(),e=At(d.get(),"node")?function(t,n){return n.filter((function(t){return An(t)&&Qt(t)})).map(uo).getOrThunk((function(){return kR(t)}))}(t,l.get()):kR(t);return n.height<=0||!SR(e,n,.01)}return!0},v=function(){l.clear(),f.clear(),d.clear(),Hh.hide(m)},b=function(){if(Hh.isOpen(m)){var t=m.element;Jn(t,"display"),h()?Un(t,"display","none"):(f.set(0),Hh.reposition(m))}},y=function(n){return{dom:{tag:"div",classes:["tox-pop__dialog"]},components:[n],behaviours:es([Hp.config({mode:"acyclic"}),Jp("pop-dialog-wrap-events",[vu((function(n){t.shortcuts.add("ctrl+F9","focus statusbar",(function(){return Hp.focusIn(n)}))})),bu((function(n){t.shortcuts.remove("ctrl+F9")}))])])}},x=le((function(){return IR(n,(function(t){var n=w([t]);nu(m,FR,{forwardContents:y(n)})}))})),w=function(n){var o=t.ui.registry.getAll().buttons,i=x(),u=e(e({},o),i.formNavigators),a=Db(t)===Xv.scrolling?Xv.scrolling:Xv.default,s=ot(K(n,(function(n){return"contexttoolbar"===n.type?function(n,e){return eR(t,{buttons:n,toolbar:e.items,allowToolbarGroups:!1},r.backstage,z.some(["form:"]))}(u,n):function(t,n){return wR(t,n)}(n,c.providers)})));return pI({type:a,uid:Du("context-toolbar"),initGroups:s,onEscape:z.none,cyclicKeying:!0,providers:c.providers})},S=function(n,e){var r="node"===n?c.anchors.node(e):c.anchors.cursor(),i=function(t,n,e,o){return"line"===n?{bubble:Qs(12,0,CR),layouts:{onLtr:function(){return[Uc]},onRtl:function(){return[Wc]}},overrides:_R}:{bubble:Qs(0,12,CR,1/12),layouts:DR(t,e,o,n),overrides:_R}}(t,n,s(),{lastElement:l.get,isReposition:function(){return At(f.get(),0)},getMode:function(){return hf.getMode(o)}});return Ao(r,i)},k=function(t,n){if(C.cancel(),p()){var e=w(t),r=t[0].position,i=S(r,n);d.set(r),f.set(1);var u=m.element;Jn(u,"display"),function(t){return At(Bt(t,l.get(),cn),!0)}(n)||(da(u,zR),hf.reset(o,m)),Hh.showWithinBounds(m,y(e),{anchor:i,transition:{classes:[zR],mode:"placement"}},(function(){return z.some(g())})),n.fold(l.clear,l.set),h()&&Un(u,"display","none")}},O=!1,C=ET((function(){!t.hasFocus()||t.removed||O||(ga(m.element,zR)?C.throttle():function(t,n){var e=Gt.fromDom(n.getBody()),o=function(t){return cn(t,e)},r=Gt.fromDom(n.selection.getNode());return function(t){return!o(t)&&!sn(e,t)}(r)?z.none():MR(r,t.inNodeScope,t.inEditorScope).orThunk((function(){return BR(o,r,t)}))}(x(),t).fold(v,(function(t){k(t.toolbars,z.some(t.elem))})))}),17);t.on("init",(function(){t.on("remove",v),t.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",b),t.on("click keyup focus SetContent",C.throttle),t.on(vR,v),t.on("contexttoolbar-show",(function(n){var e=x();Tt(e.lookupTable,n.toolbarKey).each((function(e){k([e],Ft(n.target!==t,n.target)),Hh.getContent(m).each(Hp.focusIn)}))})),t.on("focusout",(function(n){Ph.setEditorTimeout(t,(function(){gs(o.element).isNone()&&gs(m.element).isNone()&&v()}),0)})),t.on("SwitchMode",(function(){t.mode.isReadOnly()&&v()})),t.on("AfterProgressState",(function(n){n.state?v():t.hasFocus()&&C.throttle()})),t.on("dragstart",(function(){O=!0})),t.on("dragend drop",(function(){O=!1})),t.on("NodeChange",(function(t){gs(m.element).fold(C.throttle,_)}))}))},HR=function(t,n){var e=function(){var e=n.getOptions(t),o=n.getCurrent(t).map(n.hash),r=Fs();return K(e,(function(e){return{type:"togglemenuitem",text:n.display(e),onSetup:function(i){var u=function(t){t&&(r.on((function(t){return t.setActive(!1)})),r.set(i)),i.setActive(t)};u(At(o,n.hash(e)));var a=n.watcher(t,e,u);return function(){r.clear(),a()}},onAction:function(){return n.setCurrent(t,e)}}}))};t.ui.registry.addMenuButton(n.name,{tooltip:n.text,icon:n.icon,fetch:function(t){return t(e())},onSetup:n.onToolbarSetup}),t.ui.registry.addNestedMenuItem(n.name,{type:"nestedmenuitem",text:n.text,getSubmenuItems:e,onSetup:n.onMenuSetup})},PR=function(t){return{name:"lineheight",text:"Line height",icon:"line-height",getOptions:iy,hash:function(t){return function(t,n){return CF(t,n).map((function(t){return t.value+t.unit}))}(t,["fixed","relative","empty"]).getOr(t)},display:A,watcher:function(t,n,e){return t.formatter.formatChanged("lineheight",e,!1,{value:n}).unbind},getCurrent:function(t){return z.from(t.queryCommandValue("LineHeight"))},setCurrent:function(t,n){return t.execCommand("LineHeight",!1,n)},onToolbarSetup:AS(t),onMenuSetup:AS(t)}},UR=function(t){HR(t,PR(t)),function(t){return z.from(Tb(t)).map((function(n){return{name:"language",text:"Language",icon:"language",getOptions:D(n),hash:function(t){return x(t.customCode)?t.code:"".concat(t.code,"/").concat(t.customCode)},display:function(t){return t.title},watcher:function(t,n,e){var o;return t.formatter.formatChanged("lang",e,!1,{value:n.code,customValue:null!==(o=n.customCode)&&void 0!==o?o:null}).unbind},getCurrent:function(t){var n=Gt.fromDom(t.selection.getNode());return ti(n,(function(t){return z.some(t).filter(tn).bind((function(t){return Vn(t,"lang").map((function(n){return{code:n,customCode:Vn(t,"data-mce-lang").getOrUndefined(),title:""}}))}))}))},setCurrent:function(t,n){return t.execCommand("Lang",!1,n)},onToolbarSetup:function(n){var e=Is();return n.setActive(t.formatter.match("lang",{},void 0,!0)),e.set(t.formatter.formatChanged("lang",n.setActive,!0)),DS(e.clear,AS(t)(n))},onMenuSetup:AS(t)}}))}(t).each((function(n){return HR(t,n)}))},WR=function(t,n){!function(t,n){var e=tF(0,n,dF(t));t.ui.registry.addNestedMenuItem("align",{text:n.shared.providers.translate("Align"),onSetup:AS(t),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n),function(t,n){var e=tF(0,n,SF(t));t.ui.registry.addNestedMenuItem("fontfamily",{text:n.shared.providers.translate("Fonts"),onSetup:AS(t),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n),function(t,n){var o=e({type:"advanced"},n.styles),r=tF(0,n,RF(t,o));t.ui.registry.addNestedMenuItem("styles",{text:"Formats",onSetup:AS(t),getSubmenuItems:function(){return r.items.validateItems(r.getStyleItems())}})}(t,n),function(t,n){var e=tF(0,n,hF(t));t.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",onSetup:AS(t),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n),function(t,n){var e=tF(0,n,IF(t));t.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",onSetup:AS(t),getSubmenuItems:function(){return e.items.validateItems(e.getStyleItems())}})}(t,n)},jR=function(t){return BS(t,"NodeChange",(function(n){n.setEnabled(t.queryCommandState("outdent")&&t.selection.isEditable())}))},GR=function(t){!function(t){t.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:jR(t),onAction:FS(t,"outdent")}),t.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onSetup:AS(t),onAction:FS(t,"indent")})}(t)},qR=function(t,n){return function(e){e.setActive(n.get());var o=function(t){n.set(t.state),e.setActive(t.state)};return t.on("PastePlainTextToggle",o),DS((function(){return t.off("PastePlainTextToggle",o)}),AS(t)(e))}},YR=function(t,n){return function(){t.execCommand("mceToggleFormat",!1,n)}},XR=function(t){!function(t){_T.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],(function(n,e){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onSetup:MS(t,n.name),onAction:YR(t,n.name)})}));for(var n=1;n<=6;n++){var e="h"+n;t.ui.registry.addToggleButton(e,{text:e.toUpperCase(),tooltip:"Heading "+n,onSetup:MS(t,e),onAction:YR(t,e)})}}(t),function(t){_T.each([{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"print",text:"Print",action:"mcePrint",icon:"print"}],(function(n){t.ui.registry.addButton(n.name,{tooltip:n.text,icon:n.icon,onAction:FS(t,n.action)})})),_T.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(function(n){t.ui.registry.addButton(n.name,{tooltip:n.text,icon:n.icon,onSetup:AS(t),onAction:FS(t,n.action)})}))}(t),function(t){_T.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onAction:FS(t,n.action),onSetup:MS(t,n.name)})}))}(t)},KR=function(t){XR(t),function(t){_T.each([{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P"}],(function(n){t.ui.registry.addMenuItem(n.name,{text:n.text,icon:n.icon,shortcut:n.shortcut,onAction:FS(t,n.action)})})),_T.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(function(n){t.ui.registry.addMenuItem(n.name,{text:n.text,icon:n.icon,shortcut:n.shortcut,onSetup:AS(t),onAction:FS(t,n.action)})})),t.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onSetup:AS(t),onAction:YR(t,"code")})}(t)},JR=function(t,n){return BS(t,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(function(e){e.setEnabled(!t.mode.isReadOnly()&&t.undoManager[n]())}))},$R=function(t){!function(t){t.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:JR(t,"hasUndo"),onAction:FS(t,"undo")}),t.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:JR(t,"hasRedo"),onAction:FS(t,"redo")})}(t),function(t){t.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:JR(t,"hasUndo"),onAction:FS(t,"undo")}),t.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:JR(t,"hasRedo"),onAction:FS(t,"redo")})}(t)},ZR=function(t){return BS(t,"VisualAid",(function(n){n.setActive(t.hasVisual)}))},QR=function(t){!function(t){t.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:FS(t,"mceToggleVisualAid")})}(t),function(t){t.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:ZR(t),onAction:FS(t,"mceToggleVisualAid")})}(t)},tN=function(t,n){!function(t){J([{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}],(function(n){t.ui.registry.addToggleButton(n.name,{tooltip:n.text,icon:n.icon,onAction:FS(t,n.cmd),onSetup:MS(t,n.name)})})),t.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onSetup:AS(t),onAction:FS(t,"JustifyNone")})}(t),KR(t),WR(t,n),$R(t),function(t){!function(t){t.addCommand("mceApplyTextcolor",(function(n,e){!function(t,n,e){t.undoManager.transact((function(){t.focus(),t.formatter.apply(n,{value:e}),t.nodeChanged()}))}(t,n,e)})),t.addCommand("mceRemoveTextcolor",(function(n){!function(t,n){t.undoManager.transact((function(){t.focus(),t.formatter.remove(n,{value:null},void 0,!0),t.nodeChanged()}))}(t,n)}))}(t);var n=QS(t),e=tk(t),o=Gr(n),r=Gr(e);fk(t,"forecolor","forecolor",o),fk(t,"backcolor","hilitecolor",r),dk(t,"forecolor","forecolor","Text color",o),dk(t,"backcolor","hilitecolor","Background color",r)}(t),QR(t),GR(t),UR(t),function(t){var n=Gr(Jb(t)),e=function(){return t.execCommand("mceTogglePlainTextPaste")};t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:e,onSetup:qR(t,n)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:e,onSetup:qR(t,n)})}(t)},nN=function(t){return g(t)?t.split(/[ ,]/):t},eN=function(t){return function(n){return n.options.get(t)}},oN=eN("contextmenu_never_use_native"),rN=eN("contextmenu_avoid_overlap"),iN=function(t){var n=t.ui.registry.getAll().contextMenus,e=t.options.get("contextmenu");return t.options.isSet("contextmenu")?e:Z(e,(function(t){return Et(n,t)}))},uN=function(t,n){return{type:"makeshift",x:t,y:n}},aN=function(t){return"longpress"===t.type||0===t.type.indexOf("touch")},cN=function(t,n){var e=lb.DOM.getPos(t);return function(t,n,e){return uN(t.x+n,t.y+e)}(n,e.x,e.y)},sN=function(t,n){return"contextmenu"===n.type||"longpress"===n.type?t.inline?function(t){if(aN(t)){var n=t.touches[0];return uN(n.pageX,n.pageY)}return uN(t.pageX,t.pageY)}(n):cN(t.getContentAreaContainer(),function(t){if(aN(t)){var n=t.touches[0];return uN(n.clientX,n.clientY)}return uN(t.clientX,t.clientY)}(n)):lN(t)},lN=function(t){return{type:"selection",root:Gt.fromDom(t.selection.getNode())}},fN=function(t,n,e){switch(e){case"node":return function(t){return{type:"node",node:z.some(Gt.fromDom(t.selection.getNode())),root:Gt.fromDom(t.getBody())}}(t);case"point":return sN(t,n);case"selection":return lN(t)}},dN=function(t,n,e,o,r,i){var u=e(),a=fN(t,n,i);pE(u,Oy.CLOSE_ON_EXECUTE,o,{isHorizontalMenu:!1,search:z.none()}).map((function(t){n.preventDefault(),Hh.showMenuAt(r,{anchor:a},{menu:{markers:Ly("normal")},data:t})}))},mN={onLtr:function(){return[Pc,Nc,Vc,zc,Lc,Hc,uA,aA,iA,oA,rA,eA]},onRtl:function(){return[Pc,Vc,Nc,Lc,zc,Hc,uA,aA,rA,eA,iA,oA]}},gN={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]},pN=function(t,n,o,r,i,u,a){var c=function(t,n,o){var r=fN(t,n,o);return e({bubble:Qs(0,"point"===o?12:0,gN),layouts:mN,overrides:{maxWidthFunction:jB(),maxHeightFunction:Ks()}},r)}(t,n,u);pE(o,Oy.CLOSE_ON_EXECUTE,r,{isHorizontalMenu:!0,search:z.none()}).map((function(e){n.preventDefault();var o=a?mg.HighlightMenuAndItem:mg.HighlightNone;Hh.showMenuWithinBounds(i,{anchor:c},{menu:{markers:Ly("normal"),highlightOnOpen:o},data:e,type:"horizontal"},(function(){return z.some(OR(t,r.shared,"node"===u?"node":"selection"))})),t.dispatch(vR)}))},hN=function(t,n,e,o,r,i){var u=Le(),a=u.os.isiOS(),c=u.os.isMacOS(),s=u.os.isAndroid(),l=u.deviceType.isTouch(),f=function(){var u=e();pN(t,n,u,o,r,i,!(s||a||c&&l))};if((c||a)&&"node"!==i){var d=function(){!function(t){var n=t.selection.getRng(),e=function(){Ph.setEditorTimeout(t,(function(){t.selection.setRng(n)}),10),i()};t.once("touchend",e);var o=function(t){t.preventDefault(),t.stopImmediatePropagation()};t.on("mousedown",o,!0);var r=function(){return i()};t.once("longpresscancel",r);var i=function(){t.off("touchend",e),t.off("longpresscancel",r),t.off("mousedown",o)}}(t),f()};!function(t,n){var e=t.selection;if(e.isCollapsed()||n.touches.length<1)return!1;var o=n.touches[0],r=e.getRng();return Hl(t.getWin(),Cl.domRange(r)).exists((function(t){return t.left<=o.clientX&&t.right>=o.clientX&&t.top<=o.clientY&&t.bottom>=o.clientY}))}(t,n)?(t.once("selectionchange",d),t.once("touchend",(function(){return t.off("selectionchange",d)}))):d()}else f()},vN=function(t){return g(t)?"|"===t:"separator"===t.type},bN={type:"separator"},yN=function(t){var n=function(t){return{text:t.text,icon:t.icon,enabled:t.enabled,shortcut:t.shortcut}};if(g(t))return t;switch(t.type){case"separator":return bN;case"submenu":return e(e({type:"nestedmenuitem"},n(t)),{getSubmenuItems:function(){var n=t.getSubmenuItems();return g(n)?n:K(n,yN)}});default:var o=t;return e(e({type:"menuitem"},n(o)),{onAction:T(o.onAction)})}},xN=function(t,n){if(0===n.length)return t;var e=mt(t).filter((function(t){return!vN(t)})),o=e.fold((function(){return[]}),(function(t){return[bN]}));return t.concat(o).concat(n).concat([bN])},wN=function(t,n){return!function(t){return"longpress"===t.type||Et(t,"touches")}(n)&&(2!==n.button||n.target===t.getBody()&&""===n.pointerType)},SN=function(t,n){return wN(t,n)?t.selection.getStart(!0):n.target},kN=function(t,n,e){var o=Le().deviceType.isTouch,r=Na(Hh.sketch({dom:{tag:"div"},lazySink:n,onEscape:function(){return t.focus()},onShow:function(){return e.setContextMenuState(!0)},onHide:function(){return e.setContextMenuState(!1)},fireDismissalEventInstead:{},inlineBehaviours:es([Jp("dismissContextMenu",[su(Gi(),(function(n,e){Wf.close(n),t.focus()}))])])})),i=function(){return Hh.hide(r)},u=function(n){if(oN(t)&&n.preventDefault(),!function(t,n){return n.ctrlKey&&!oN(t)}(t,n)&&!function(t){return 0===iN(t).length}(t)){var i=function(t,n){var e=rN(t),o=wN(t,n)?"selection":"point";if(Pt(e)){var r=SN(t,n);return yO(Gt.fromDom(r),e)?"node":o}return o}(t,n);(o()?hN:dN)(t,n,(function(){var e=SN(t,n),o=t.ui.registry.getAll(),r=iN(t);return function(t,n,e){var o=tt(n,(function(n,o){return Tt(t,o.toLowerCase()).map((function(t){var o=t.update(e);if(g(o)&&Pt(Ht(o)))return xN(n,o.split(" "));if(v(o)&&o.length>0){var r=K(o,yN);return xN(n,r)}return n})).getOrThunk((function(){return n.concat([o])}))}),[]);return o.length>0&&vN(o[o.length-1])&&o.pop(),o}(o.contextMenus,r,e)}),e,r,i)}};t.on("init",(function(){var n="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(o()?"":" ResizeWindow");t.on(n,i),t.on("longpress contextmenu",u)}))},ON=qr([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),CN=function(t){return function(n){return n.translate(-t.left,-t.top)}},_N=function(t){return function(n){return n.translate(t.left,t.top)}},TN=function(t){return function(n,e){return tt(t,(function(t,n){return n(t)}),oe(n,e))}},EN=function(t,n,e){return t.fold(TN([_N(e),CN(n)]),TN([CN(n)]),TN([]))},DN=function(t,n,e){return t.fold(TN([_N(e)]),TN([]),TN([_N(n)]))},AN=function(t,n,e){return t.fold(TN([]),TN([CN(e)]),TN([_N(n),CN(e)]))},MN=function(t,n,o){var r=t.fold((function(t,n){return{position:z.some("absolute"),left:z.some(t+"px"),top:z.some(n+"px")}}),(function(t,n){return{position:z.some("absolute"),left:z.some(t-o.left+"px"),top:z.some(n-o.top+"px")}}),(function(t,n){return{position:z.some("fixed"),left:z.some(t+"px"),top:z.some(n+"px")}}));return e({right:z.none(),bottom:z.none()},r)},BN=function(t,n,e,o){var r=function(t,r){return function(i,u){var a=t(n,e,o);return r(i.getOr(a.left),u.getOr(a.top))}};return t.fold(r(AN,IN),r(DN,FN),r(EN,RN))},IN=ON.offset,FN=ON.absolute,RN=ON.fixed,NN=function(t,n){var e=Nn(t,n);return x(e)?NaN:parseInt(e,10)},VN=function(t,n,e,o){return function(t,n){var e=t.element,o=NN(e,n.leftAttr),r=NN(e,n.topAttr);return isNaN(o)||isNaN(r)?z.none():z.some(oe(o,r))}(t,n).fold((function(){return e}),(function(t){return RN(t.left+o.left,t.top+o.top)}))},zN=function(t,n,e,o,r,i){var u=VN(t,n,e,o),a=n.mustSnap?PN(t,n,u,r,i):UN(t,n,u,r,i),c=EN(u,r,i);return function(t,n,e){var o=t.element;Fn(o,n.leftAttr,e.left+"px"),Fn(o,n.topAttr,e.top+"px")}(t,n,c),a.fold((function(){return{coord:RN(c.left,c.top),extra:z.none()}}),(function(t){return{coord:t.output,extra:t.extra}}))},LN=function(t,n){!function(t,n){var e=t.element;Ln(e,n.leftAttr),Ln(e,n.topAttr)}(t,n)},HN=function(t,n,e,o){return pt(t,(function(t){var r=t.sensor,i=function(t,n,e,o,r,i){var u=DN(t,r,i),a=DN(n,r,i);return Math.abs(u.left-a.left)<=e&&Math.abs(u.top-a.top)<=o}(n,r,t.range.left,t.range.top,e,o);return i?z.some({output:BN(t.output,n,e,o),extra:t.extra}):z.none()}))},PN=function(t,n,e,o,r){var i=n.getSnapPoints(t);return HN(i,e,o,r).orThunk((function(){var t=tt(i,(function(t,n){var i=n.sensor,u=function(t,n,e,o,r,i){var u=DN(t,r,i),a=DN(n,r,i),c=Math.abs(u.left-a.left),s=Math.abs(u.top-a.top);return oe(c,s)}(e,i,n.range.left,n.range.top,o,r);return t.deltas.fold((function(){return{deltas:z.some(u),snap:z.some(n)}}),(function(e){return(u.left+u.top)/2<=(e.left+e.top)/2?{deltas:z.some(u),snap:z.some(n)}:t}))}),{deltas:z.none(),snap:z.none()});return t.snap.map((function(t){return{output:BN(t.output,e,o,r),extra:t.extra}}))}))},UN=function(t,n,e,o,r){var i=n.getSnapPoints(t);return HN(i,e,o,r)},WN=Object.freeze({__proto__:null,snapTo:function(t,n,e,o){var r=n.getTarget(t.element);if(n.repositionTarget){var i=ln(t.element),u=Je(i),a=SM(r),c=function(t,n,e){return{coord:BN(t.output,t.output,n,e),extra:t.extra}}(o,u,a),s=MN(c.coord,0,a);jn(r,s)}}}),jN="data-initial-z-index",GN=function(t,n){t.getSystem().addToGui(n),function(t){gn(t.element).filter(tn).each((function(n){Yn(n,"z-index").each((function(t){Fn(n,jN,t)})),Un(n,"z-index",Gn(t.element,"z-index"))}))}(n)},qN=function(t){!function(t){gn(t.element).filter(tn).each((function(t){Vn(t,jN).fold((function(){return Jn(t,"z-index")}),(function(n){return Un(t,"z-index",n)})),Ln(t,jN)}))}(t),t.getSystem().removeFromGui(t)},YN=function(t,n,e){return t.getSystem().build(BO.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[n]},events:e}))},XN=Rr("snaps",[yr("getSnapPoints"),sc("onSensor"),yr("leftAttr"),yr("topAttr"),Nr("lazyViewport",co),Nr("mustSnap",!1)]),KN=[Nr("useFixed",N),yr("blockerClass"),Nr("getTarget",A),Nr("onDrag",_),Nr("repositionTarget",!0),Nr("onDrop",_),Ur("getBounds",co),XN],JN=function(t){return function(t,n,e,o){return t.isSome()&&n.isSome()&&e.isSome()?z.some(o(t.getOrDie(),n.getOrDie(),e.getOrDie())):z.none()}(Yn(t,"left"),Yn(t,"top"),Yn(t,"position"),(function(t,n,e){return("fixed"===e?RN:IN)(parseInt(t,10),parseInt(n,10))})).getOrThunk((function(){var n=ie(t);return FN(n.left,n.top)}))},$N=function(t,n,e,o,r,i,u){return function(t,n,e,o,r){var i=r.bounds,u=DN(n,e,o),a=Tc(u.left,i.x,i.x+i.width-r.width),c=Tc(u.top,i.y,i.y+i.height-r.height),s=FN(a,c);return n.fold((function(){var t=AN(s,e,o);return IN(t.left,t.top)}),D(s),(function(){var t=EN(s,e,o);return RN(t.left,t.top)}))}(0,n.fold((function(){var t,n,u,a=(t=e,n=i.left,u=i.top,t.fold((function(t,e){return IN(t+n,e+u)}),(function(t,e){return FN(t+n,e+u)}),(function(t,e){return RN(t+n,e+u)}))),c=EN(a,o,r);return RN(c.left,c.top)}),(function(n){var u=zN(t,n,e,i,o,r);return u.extra.each((function(e){n.onSensor(t,e)})),u.coord})),o,r,u)},ZN=function(t,n){return{bounds:t.getBounds(),height:ne(n.element),width:se(n.element)}},QN=function(t,n,e,o,r){var i=e.update(o,r),u=e.getStartData().getOrThunk((function(){return ZN(n,t)}));i.each((function(e){!function(t,n,e,o){var r=n.getTarget(t.element);if(n.repositionTarget){var i=ln(t.element),u=Je(i),a=SM(r),c=JN(r),s=$N(t,n.snaps,c,u,a,o,e),l=MN(s,0,a);jn(r,l)}n.onDrag(t,r,o)}(t,n,u,e)}))},tV=function(t,n,e,o){n.each(qN),e.snaps.each((function(n){LN(t,n)}));var r=e.getTarget(t.element);o.reset(),e.onDrop(t,r)},nV=function(t){return function(n,e){var o=function(t){e.setStartData(ZN(n,t))};return uu(u([su(Pi(),(function(t){e.getStartData().each((function(){return o(t)}))}))],t(n,e,o),!0))}},eV=Object.freeze({__proto__:null,getData:function(t){return z.from(oe(t.x,t.y))},getDelta:function(t,n){return oe(n.left-t.left,n.top-t.top)}}),oV=function(t,n,e){return[su(li(),(function(o,r){if(0===r.event.raw.button){r.stop();var i=function(){return tV(o,z.some(c),t,n)},u=xO(i,200),a={drop:i,delayDrop:u.schedule,forceDrop:i,move:function(e){u.cancel(),QN(o,t,n,eV,e)}},c=YN(o,t.blockerClass,function(t){return uu([su(li(),t.forceDrop),su(mi(),t.drop),su(fi(),(function(n,e){t.move(e.event)})),su(di(),t.delayDrop)])}(a));e(o),GN(o,c)}}))]},rV=u(u([],KN,!0),[mc("dragger",{handlers:nV(oV)})],!1),iV=Object.freeze({__proto__:null,getData:function(t){var n=t.raw.touches;return 1===n.length?function(t){var n=t[0];return z.some(oe(n.clientX,n.clientY))}(n):z.none()},getDelta:function(t,n){return oe(n.left-t.left,n.top-t.top)}}),uV=function(t,n,e){var o=Fs(),r=function(e){tV(e,o.get(),t,n),o.clear()};return[su(ui(),(function(i,u){u.stop();var a=function(){return r(i)},c={drop:a,delayDrop:_,forceDrop:a,move:function(e){QN(i,t,n,iV,e)}},s=YN(i,t.blockerClass,function(t){return uu([su(ui(),t.forceDrop),su(ci(),t.drop),su(si(),t.drop),su(ai(),(function(n,e){t.move(e.event)}))])}(c));o.set(s);e(i),GN(i,s)})),su(ai(),(function(e,o){o.stop(),QN(e,t,n,iV,o.event)})),su(ci(),(function(t,n){n.stop(),r(t)})),su(si(),r)]},aV=rV,cV=u(u([],KN,!0),[mc("dragger",{handlers:nV(uV)})],!1),sV=u(u([],KN,!0),[mc("dragger",{handlers:nV((function(t,n,e){return u(u([],oV(t,n,e),!0),uV(t,n,e),!0)}))})],!1),lV=Object.freeze({__proto__:null,mouse:aV,touch:cV,mouseOrTouch:sV}),fV=Object.freeze({__proto__:null,init:function(){var t=z.none(),n=z.none(),e=D({});return Yu({readState:e,reset:function(){t=z.none(),n=z.none()},update:function(n,e){return n.getData(e).bind((function(e){return function(n,e){var o=t.map((function(t){return n.getDelta(t,e)}));return t=z.some(e),o}(n,e)}))},getStartData:function(){return n},setStartData:function(t){n=z.some(t)}})}}),dV=us({branchKey:"mode",branches:lV,name:"dragging",active:{events:function(t,n){return t.dragger.handlers(t,n)}},extra:{snap:function(t){return{sensor:t.sensor,range:t.range,output:t.output,extra:z.from(t.extra)}}},state:fV,apis:WN}),mV=function(t,n,e,o,r,i){return t.fold((function(){return dV.snap({sensor:FN(e-20,o-20),range:oe(r,i),output:FN(z.some(e),z.some(o)),extra:{td:n}})}),(function(t){var r=e-20,i=o-20,u=t.element.dom.getBoundingClientRect();return dV.snap({sensor:FN(r,i),range:oe(40,40),output:FN(z.some(e-u.width/2),z.some(o-u.height/2)),extra:{td:n}})}))},gV=function(t,n,e){return{getSnapPoints:t,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:function(t,o){var r=o.td;(function(t,n){return t.exists((function(t){return cn(t,n)}))})(n.get(),r)||(n.set(r),e(r))},mustSnap:!0}},pV=function(t){return jh(Uh.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:es([dV.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:t}),dC.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}))},hV=function(t,n){var e=Gr([]),o=Gr([]),r=Gr(!1),i=Fs(),u=Fs(),a=function(t){var e=uo(t);return mV(f.getOpt(n),t,e.x,e.y,e.width,e.height)},c=function(t){var e=uo(t);return mV(d.getOpt(n),t,e.right,e.bottom,e.width,e.height)},s=gV((function(){return K(e.get(),(function(t){return a(t)}))}),i,(function(n){u.get().each((function(e){t.dispatch("TableSelectorChange",{start:n,finish:e})}))})),l=gV((function(){return K(o.get(),(function(t){return c(t)}))}),u,(function(n){i.get().each((function(e){t.dispatch("TableSelectorChange",{start:e,finish:n})}))})),f=pV(s),d=pV(l),m=Na(f.asSpec()),g=Na(d.asSpec()),p=function(n,e,o,r){var i=o(e);dV.snapTo(n,i);!function(n,e,o,r){var i=e.dom.getBoundingClientRect();Jn(n.element,"display");var u=mn(Gt.fromDom(t.getBody())).dom.innerHeight,a=o(i),c=r(i,u);(a||c)&&Un(n.element,"display","none")}(n,e,(function(t){return t[r]<0}),(function(t,n){return t[r]>n}))},h=function(t){return p(m,t,a,"top")},v=function(t){return p(g,t,c,"bottom")};Le().deviceType.isTouch()&&(t.on("TableSelectionChange",(function(t){r.get()||(Of(n,m),Of(n,g),r.set(!0)),i.set(t.start),u.set(t.finish),t.otherCells.each((function(n){e.set(n.upOrLeftCells),o.set(n.downOrRightCells),h(t.start),v(t.finish)}))})),t.on("ResizeEditor ResizeWindow ScrollContent",(function(){i.get().each(h),u.get().each(v)})),t.on("TableSelectionClear",(function(){r.get()&&(Tf(m),Tf(g),r.set(!1)),i.clear(),u.clear()})))},vV=function(t,n,e){var o,r=null!==(o=n.delimiter)&&void 0!==o?o:"›",i=function(n){return tt(n,(function(n,o,i){var u=function(n,o,r){return Uh.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":r,"aria-level":r+1}},components:[Ba(n)],action:function(n){t.focus(),t.selection.select(o),t.nodeChanged()},buttonBehaviours:es([Fw(e.isDisabled),Bw()])})}(o.name,o.element,i);return 0===i?n.concat([u]):n.concat([{dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[Ba(" ".concat(r," "))]},u])}),[])};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:es([Hp.config({mode:"flow",selector:"div[role=button]"}),Bm.config({disabled:e.isDisabled}),Bw(),LO.config({}),Kp.config({}),Jp("elementPathEvents",[vu((function(n,e){t.shortcuts.add("alt+F11","focus statusbar elementpath",(function(){return Hp.focusIn(n)})),t.on("NodeChange",(function(e){var o=function(n){for(var e,o=[],r=n.length;r-- >0;){var i=n[r];if(1===i.nodeType&&"BR"!==(e=i).nodeName&&!e.getAttribute("data-mce-bogus")&&"bookmark"!==e.getAttribute("data-mce-type")){var u=ES(t,i);if(u.isDefaultPrevented()||o.push({name:u.name,element:i}),u.isPropagationStopped())break}}return o}(e.parents),r=o.length>0?i(o):[];Kp.set(n,r)}))}))])]),components:[]}};!function(t){t[t.None=0]="None",t[t.Both=1]="Both",t[t.Vertical=2]="Vertical"}(aF||(aF={}));var bV=function(t,n,e){var o=Gt.fromDom(t.getContainer()),r=function(t,n,e,o,r){var i={height:sR(o+n.top,wb(t),kb(t))};return e===aF.Both&&(i.width=sR(r+n.left,xb(t),Sb(t))),i}(t,n,e,te(o),ce(o));bt(r,(function(t,n){O(t)&&Un(o,n,cR(t))})),function(t){t.dispatch("ResizeEditor")}(t)},yV=function(t,n,e,o){var r=oe(20*e,20*o);return bV(t,r,n),z.some(!0)},xV=function(t,n){var e=function(t){var n=Kb(t);return!1===n?aF.None:"both"===n?aF.Both:aF.Vertical}(t);if(e===aF.None)return z.none();var o=e===aF.Both?"Press the arrow keys to resize the editor.":"Press the Up and Down arrow keys to resize the editor.";return z.some(ab("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:n.translate("Resize"),"aria-label":n.translate(o)},behaviours:[dV.config({mode:"mouse",repositionTarget:!1,onDrag:function(n,o,r){return bV(t,r,e)},blockerClass:"tox-blocker"}),Hp.config({mode:"special",onLeft:function(){return yV(t,e,-1,0)},onRight:function(){return yV(t,e,1,0)},onUp:function(){return yV(t,e,0,-1)},onDown:function(){return yV(t,e,0,1)}}),LO.config({}),nh.config({})]},n.icons))},wV=function(t,n){var e=function(){var e=[];return t.hasPlugin("wordcount")&&e.push(function(t,n){var e,o=function(t,e,o){return Kp.set(t,[Ba(n.translate(["{0} "+o,e[o]]))])};return Uh.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:es([Fw(n.isDisabled),Bw(),LO.config({}),Kp.config({}),sd.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Jp("wordcount-events",[xu((function(t){var n=sd.getValue(t),e="words"===n.mode?"characters":"words";sd.setValue(t,{mode:e,count:n.count}),o(t,n.count,e)})),vu((function(n){t.on("wordCountUpdate",(function(t){var e=sd.getValue(n).mode;sd.setValue(n,{mode:e,count:t.wordCount}),o(n,t.wordCount,e)}))}))])]),eventOrder:(e={},e[Bi()]=["disabling","alloy.base.behaviour","wordcount-events"],e)})}(t,n)),Xb(t)&&e.push({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=poweredby&utm_source=tiny&utm_medium=referral&utm_content=v6",rel:"noopener",target:"_blank","aria-label":Zv.translate(["Powered by {0}","Tiny"])},innerHtml:'<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'.trim()},behaviours:es([nh.config({})])}]}),{dom:{tag:"div",classes:["tox-statusbar__right-container"]},components:e}},o=function(){var o,r=[],i=Qb(t),a=Yb(t),c=Xb(t)||t.hasPlugin("wordcount");return a&&r.push(vV(t,{},n)),i&&r.push((o=Gw("Alt+0"),{dom:{tag:"div",classes:["tox-statusbar__help-text"]},components:[Ba(Zv.translate(["Press {0} for help",o]))]})),c&&r.push(e()),r.length>0?[{dom:{tag:"div",classes:u(["tox-statusbar__text-container"],function(){var t="tox-statusbar__text-container--flex-start",n="tox-statusbar__text-container--flex-end";if(i){var e="tox-statusbar__text-container-3-cols";return c||a?c&&!a?[e,n]:[e,t]:[e,"tox-statusbar__text-container--space-around"]}return[c&&!a?n:t]}(),!0)},components:r}]:[]};return{dom:{tag:"div",classes:["tox-statusbar"]},components:function(){var e=o(),r=xV(t,n);return e.concat(r.toArray())}()}},SV=function(t,n){return n.get().getOrDie("UI for ".concat(t," has not been rendered"))},kV=function(t,n){var o,r,i,a=t.inline,c=a?hR:uR,s=gy(t)?cB:xM,l=(o=Fs(),r=Fs(),i=Fs(),{dialogUi:o,popupUi:r,mainUi:i,getUiMotherships:function(){var t=o.get().map((function(t){return t.mothership})),n=r.get().map((function(t){return t.mothership}));return t.fold((function(){return n.toArray()}),(function(t){return n.fold((function(){return[t]}),(function(n){return cn(t.element,n.element)?[t]:[t,n]}))}))},lazyGetInOuterOrDie:function(t,n){return function(){return i.get().bind((function(t){return n(t.outerContainer)})).getOrDie("Could not find ".concat(t," element in OuterContainer"))}}}),f=Fs(),d=Fs(),m=Fs(),g=Le().deviceType.isTouch()?["tox-platform-touch"]:[],p=sy(t),h=Db(t),v=jh({dom:{tag:"div",classes:["tox-anchorbar"]}}),b=jh({dom:{tag:"div",classes:["tox-bottom-anchorbar"]}}),y=function(){return l.mainUi.get().map((function(t){return t.outerContainer})).bind(PI.getHeader)},x=l.lazyGetInOuterOrDie("anchor bar",v.getOpt),w=l.lazyGetInOuterOrDie("bottom anchor bar",b.getOpt),S=l.lazyGetInOuterOrDie("toolbar",PI.getToolbar),k=l.lazyGetInOuterOrDie("throbber",PI.getThrobber),O=uM({popup:function(){return mo.fromOption(l.popupUi.get().map((function(t){return t.sink})),"(popup) UI has not been rendered")},dialog:function(){return mo.fromOption(l.dialogUi.get().map((function(t){return t.sink})),"UI has not been rendered")}},t,x,w),C=function(){return PI.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}})},_=function(){var n=function(){var n,o={attributes:(n={},n[rl]=p?Os.BottomToTop:Os.TopToBottom,n)},r=PI.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:O.popup,onEscape:function(){t.focus()}}),i=PI.parts.toolbar(e({dom:{tag:"div",classes:["tox-toolbar"]},getSink:O.popup.shared.getSink,providers:O.popup.shared.providers,onEscape:function(){t.focus()},onToolbarToggled:function(n){!function(t,n){t.dispatch("ToggleToolbarDrawer",{state:n})}(t,n)},type:h,lazyToolbar:S,lazyHeader:function(){return y().getOrDie("Could not find header element")}},o)),u=PI.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:O.popup.shared.providers,onEscape:function(){t.focus()},type:h}),a=cy(t),c=uy(t),s=ey(t),l=Zb(t),f=C(),d=a||c||s,m=l?[f,r]:[r];return PI.parts.header({dom:e({tag:"div",classes:["tox-editor-header"].concat(d?[]:["tox-editor-header--empty"])},o),components:ot([s?m:[],a?[u]:c?[i]:[],fy(t)?[]:[v.asSpec()]]),sticky:gy(t),editor:t,sharedBackstage:O.popup.shared})}(),o={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[PI.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),PI.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}})]},r=PI.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:O.popup}),i=PI.parts.viewWrapper({backstage:O.popup}),c=qb(t)&&!a?z.some(wV(t,O.popup.shared.providers)):z.none(),s=ot([p?[]:[n],a?[]:[o],p?[n]:[]]),l=PI.parts.editorContainer({components:ot([s,a?[]:u([b.asSpec()],c.toArray(),!0)])}),d=my(t),m=e(e({role:"application"},Zv.isRtl()?{dir:"rtl"}:{}),d?{"aria-hidden":"true"}:{}),x=Na(PI.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(a?["tox-tinymce-inline"]:[]).concat(p?["tox-tinymce--toolbar-bottom"]:[]).concat(g),styles:e({visibility:"hidden"},d?{opacity:"0",border:"0"}:{}),attributes:m},components:u(u([l],a?[]:[i],!0),[r],!1),behaviours:es([Bw(),Bm.config({disableClass:"tox-tinymce--disabled"}),Hp.config({mode:"cyclic",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"})])})),w=IO(x);return f.set(w),{mothership:w,outerContainer:x}},T=function(n){var e=cR(lR(t)),o=cR(function(t){return fR(t).getOr(yb(t))}(t));return t.inline||(Kn("div","width",o)&&Un(n.element,"width",o),Kn("div","height",e)?Un(n.element,"height",e):Un(n.element,"height","400px")),e},E=function(n){var e=n.mainUi,o=n.popupUi,r=n.uiMotherships;yt(Ab(t),(function(n,e){t.ui.registry.addGroupToolbarButton(e,n)}));var i,a=t.ui.registry.getAll(),l=a.buttons,f=a.menuItems,d=a.contextToolbars,m=a.sidebars,g=a.views,p=ay(t),v={menuItems:f,menus:hy(t),menubar:Nb(t),toolbar:p.getOrThunk((function(){return Vb(t)})),allowToolbarGroups:h===Xv.floating,buttons:l,sidebar:m,views:g};i=e.outerContainer,t.addShortcut("alt+F9","focus menubar",(function(){PI.focusMenubar(i)})),t.addShortcut("alt+F10","focus toolbar",(function(){PI.focusToolbar(i)})),t.addCommand("ToggleToolbarDrawer",(function(t,n){(null==n?void 0:n.skipFocus)?PI.toggleToolbarDrawerWithoutFocusing(i):PI.toggleToolbarDrawer(i)})),t.addQueryStateHandler("ToggleToolbarDrawer",(function(){return PI.isToolbarDrawerToggled(i)})),function(t,n,e){var o=function(t,o){J(u([n],e,!0),(function(n){n.broadcastEvent(t,o)}))},r=function(t,o){J(u([n],e,!0),(function(n){n.broadcastOn([t],o)}))},i=function(t){return r(jf(),{target:t.target})},a=to(),c=Ns(a,"touchstart",i),s=Ns(a,"touchmove",(function(t){return o(Li(),t)})),l=Ns(a,"touchend",(function(t){return o(Hi(),t)})),f=Ns(a,"mousedown",i),d=Ns(a,"mouseup",(function(t){0===t.raw.button&&r(qf(),{target:t.target})})),m=function(t){return r(jf(),{target:Gt.fromDom(t.target)})},g=function(t){0===t.button&&r(qf(),{target:Gt.fromDom(t.target)})},p=function(){J(t.editorManager.get(),(function(n){t!==n&&n.dispatch("DismissPopups",{relatedTarget:t})}))},h=function(t){return o(Pi(),zs(t))},v=function(t){r(Gf(),{}),o(Ui(),zs(t))},b=Cn(Gt.fromDom(t.getElement())),y=Vs(b,"scroll",(function(e){requestAnimationFrame((function(){if(null!=t.getContainer()){var r=vO(t,n.element).map((function(t){return u([t.element],t.others,!0)})).getOr([]);q(r,(function(t){return cn(t,e.target)}))&&(t.dispatch("ElementScroll",{target:e.target.dom}),o(Ki(),e))}}))})),x=function(){return r(Gf(),{})},w=function(n){n.state&&r(jf(),{target:Gt.fromDom(t.getContainer())})},S=function(t){r(jf(),{target:Gt.fromDom(t.relatedTarget.getContainer())})};t.on("PostRender",(function(){t.on("click",m),t.on("tap",m),t.on("mouseup",g),t.on("mousedown",p),t.on("ScrollWindow",h),t.on("ResizeWindow",v),t.on("ResizeEditor",x),t.on("AfterProgressState",w),t.on("DismissPopups",S)})),t.on("remove",(function(){t.off("click",m),t.off("tap",m),t.off("mouseup",g),t.off("mousedown",p),t.off("ScrollWindow",h),t.off("ResizeWindow",v),t.off("ResizeEditor",x),t.off("AfterProgressState",w),t.off("DismissPopups",S),f.unbind(),c.unbind(),s.unbind(),l.unbind(),d.unbind(),y.unbind()})),t.on("detach",(function(){J(u([n],e,!0),Bf),J(u([n],e,!0),(function(t){return t.destroy()}))}))}(t,e.mothership,r),s.setup(t,O.popup.shared,y),tN(t,O.popup),kN(t,O.popup.shared.getSink,O.popup),function(t){var n=t.ui.registry.getAll().sidebars;J(ht(n),(function(e){var o=n[e],r=function(){return At(z.from(t.queryCommandValue("ToggleSidebar")),e)};t.ui.registry.addToggleButton(e,{icon:o.icon,tooltip:o.tooltip,onAction:function(n){t.execCommand("ToggleSidebar",!1,e),n.setActive(r())},onSetup:function(n){n.setActive(r());var e=function(){return n.setActive(r())};return t.on("ToggleSidebar",e),function(){t.off("ToggleSidebar",e)}}})}))}(t),FB(t,k,O.popup.shared),LR(t,d,o.sink,{backstage:O.popup}),hV(t,o.sink);var b={targetNode:t.getElement(),height:T(e.outerContainer)};return c.render(t,n,v,O.popup,b)};return{popups:{backstage:O.popup,getMothership:function(){return SV("popups",m)}},dialogs:{backstage:O.dialog,getMothership:function(){return SV("dialogs",d)}},renderUI:function(){var o,r,i,u,a,c,f=_(),p=(o=dy(t),r=cn(Mn(),o)&&"grid"===Gn(o,"display"),i={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(g),attributes:e({},Zv.isRtl()?{dir:"rtl"}:{})},behaviours:es([hf.config({useFixed:function(){return s.isDocked(y)}})])},u={dom:{styles:{width:document.body.clientWidth+"px"}},events:uu([su(Ui(),(function(t){Un(t.element,"width",document.body.clientWidth+"px")}))])},a=Na(Ao(i,r?u:{})),c=IO(a),d.set(c),{sink:a,mothership:c}),h=py(t)?function(){var t={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(g),attributes:e({},Zv.isRtl()?{dir:"rtl"}:{})},behaviours:es([hf.config({useFixed:function(){return s.isDocked(y)},getBounds:function(){return n.getPopupSinkBounds()}})])},o=Na(t),r=IO(o);return m.set(r),{sink:o,mothership:r}}():function(t){return m.set(t.mothership),t}(p);l.dialogUi.set(p),l.popupUi.set(h),l.mainUi.set(f);var v={popupUi:h,dialogUi:p,mainUi:f,uiMotherships:l.getUiMotherships()};return E(v)}}},OV=D([yr("lazySink"),Er("dragBlockClass"),Ur("getBounds",co),Nr("useTabstopAt",V),Nr("firstTabstop",0),Nr("eventOrder",{}),ld("modalBehaviours",[Hp]),lc("onExecute"),dc("onEscape")]),CV={sketch:A},_V=D([Pd({name:"draghandle",overrides:function(t,n){return{behaviours:es([dV.config({mode:"mouse",getTarget:function(t){return Ua(t,'[role="dialog"]').getOr(t)},blockerClass:t.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(n,null,2)).message),getBounds:t.getDragBounds})])}}}),Ld({schema:[yr("dom")],name:"title"}),Ld({factory:CV,schema:[yr("dom")],name:"close"}),Ld({factory:CV,schema:[yr("dom")],name:"body"}),Pd({factory:CV,schema:[yr("dom")],name:"footer"}),Hd({factory:{sketch:function(t,n){return e(e({},t),{dom:n.dom,components:n.components})}},schema:[Nr("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),Nr("components",[])],name:"blocker"})]),TV=gm({name:"ModalDialog",configFields:OV(),partFields:_V(),factory:function(t,n,o,r){var i,u=Fs(),a=Du("modal-events"),c=e(e({},t.eventOrder),((i={})[Wi()]=[a].concat(t.eventOrder["alloy.system.attached"]||[]),i));return{uid:t.uid,dom:t.dom,components:n,apis:{show:function(n){u.set(n);var o=t.lazySink(n).getOrDie(),i=r.blocker(),a=o.getSystem().build(e(e({},i),{components:i.components.concat([Va(n)]),behaviours:es([nh.config({}),Jp("dialog-blocker-events",[hu(pi(),(function(){MB.isBlocked(n)||Hp.focusIn(n)}))])])}));Of(o,a),Hp.focusIn(n)},hide:function(t){u.clear(),gn(t.element).each((function(n){t.getSystem().getByDom(n).each((function(t){Tf(t)}))}))},getBody:function(n){return tm(n,t,"body")},getFooter:function(n){return Qd(n,t,"footer")},setIdle:function(t){MB.unblock(t)},setBusy:function(t,n){MB.block(t,n)}},eventOrder:c,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:dd(t.modalBehaviours,[Kp.config({}),Hp.config({mode:"cyclic",onEnter:t.onExecute,onEscape:t.onEscape,useTabstopAt:t.useTabstopAt,firstTabstop:t.firstTabstop}),MB.config({getRoot:u.get}),Jp(a,[vu((function(n){var e,o,r;e=n.element,o=tm(n,t,"title").element,r=Vn(e,"id").fold((function(){var t=Du("dialog-label");return Fn(o,"id",t),t}),A),Fn(e,"aria-labelledby",r)}))])])}},apis:{show:function(t,n){t.show(n)},hide:function(t,n){t.hide(n)},getBody:function(t,n){return t.getBody(n)},getFooter:function(t,n){return t.getFooter(n)},setBusy:function(t,n,e){t.setBusy(n,e)},setIdle:function(t,n){t.setIdle(n)}}}),EV=Yo([lx,fx].concat(uw)),DV=er,AV=[Vx("button"),Ox,Hr("align","end",["start","end"]),Bx,Mx,Br("buttonType",["primary","secondary"])],MV=u(u([],AV,!0),[mx],!1),BV=u([kr("type",["submit","cancel","custom"])],MV,!0),IV=u([kr("type",["menu"]),kx,Cx,Ox,Tr("items",EV)],AV,!0),FV=u(u([],AV,!0),[kr("type",["togglebutton"]),Sr("tooltip"),Ox,kx,Pr("active",!1)],!1),RV=gr("type",{submit:BV,cancel:BV,custom:BV,menu:IV,togglebutton:FV}),NV=[lx,mx,kr("level",["info","warn","error","success"]),px,Nr("url","")],VV=Yo(NV),zV=[lx,mx,Mx,Vx("button"),Ox,Ax,Br("buttonType",["primary","secondary","toolbar"]),Bx],LV=Yo(zV),HV=[lx,fx],PV=HV.concat([_x]),UV=HV.concat([dx,Mx]),WV=Yo(UV),jV=er,GV=PV.concat([Ix("auto")]),qV=Yo(GV),YV=$o([hx,mx,px]),XV=PV.concat([Lr("storageKey","default")]),KV=Yo(XV),JV=nr,$V=Yo(PV),ZV=nr,QV=HV.concat([Lr("tag","textarea"),Sr("scriptId"),Sr("scriptUrl"),function(t,n){return Vr(t,n,ir)}("settings",void 0)]),tz=HV.concat([Lr("tag","textarea"),Or("init")]),nz=cr((function(t){return lr("customeditor.old",qo(tz),t).orThunk((function(){return lr("customeditor.new",qo(QV),t)}))})),ez=nr,oz=Yo(PV),rz=Xo(Ho),iz=function(t){return[lx,wr("columns"),t]},uz=[lx,Sr("html"),Hr("presets","presentation",["presentation","document"])],az=Yo(uz),cz=PV.concat([Pr("border",!1),Pr("sandboxed",!0),Pr("streamContent",!1),Pr("transparent",!0)]),sz=Yo(cz),lz=nr,fz=Yo(HV.concat([Mr("height")])),dz=Yo([Sr("url"),Ar("zoom"),Ar("cachedWidth"),Ar("cachedHeight")]),mz=PV.concat([Mr("inputMode"),Mr("placeholder"),Pr("maximized",!1),Mx]),gz=Yo(mz),pz=nr,hz=function(t){return[lx,dx,t,Hr("align","start",["start","center","end"])]},vz=[mx,hx],bz=[mx,Tr("items",pr(0,(function(){return yz})))],yz=Ko([Yo(vz),Yo(bz)]),xz=PV.concat([Tr("items",yz),Mx]),wz=Yo(xz),Sz=nr,kz=PV.concat([_r("items",[mx,hx]),zr("size",1),Mx]),Oz=Yo(kz),Cz=nr,_z=PV.concat([Pr("constrain",!0),Mx]),Tz=Yo(_z),Ez=Yo([Sr("width"),Sr("height")]),Dz=HV.concat([dx,zr("min",0),zr("max",0)]),Az=Yo(Dz),Mz=tr,Bz=[lx,Tr("header",nr),Tr("cells",Xo(nr))],Iz=Yo(Bz),Fz=PV.concat([Mr("placeholder"),Pr("maximized",!1),Mx]),Rz=Yo(Fz),Nz=nr,Vz=[kr("type",["directory","leaf"]),gx,Sr("id"),Dr("menu",fB)],zz=Yo(Vz),Lz=Vz.concat([Tr("children",pr(0,(function(){return ar("type",{directory:Hz,leaf:zz})})))]),Hz=Yo(Lz),Pz=ar("type",{directory:Hz,leaf:zz}),Uz=[lx,Tr("items",Pz),Ir("onLeafAction"),Ir("onToggleExpand"),Wr("defaultExpandedIds",[],nr),Mr("defaultSelectedId")],Wz=Yo(Uz),jz=PV.concat([Hr("filetype","file",["image","media","file"]),Mx,Mr("picker_text")]),Gz=Yo(jz),qz=Yo([hx,Fx]),Yz=function(t){return hr("items","items",{tag:"required",process:{}},Xo(cr((function(n){return lr("Checking item of ".concat(t),Xz,n).fold((function(t){return mo.error(mr(t))}),(function(t){return mo.value(t)}))}))))},Xz=jo((function(){return ar("type",{alertbanner:VV,bar:Yo((t=Yz("bar"),[lx,t])),button:LV,checkbox:WV,colorinput:KV,colorpicker:$V,dropzone:oz,grid:Yo(iz(Yz("grid"))),iframe:sz,input:gz,listbox:wz,selectbox:Oz,sizeinput:Tz,slider:Az,textarea:Rz,urlinput:Gz,customeditor:nz,htmlpanel:az,imagepreview:fz,collection:qV,label:Yo(hz(Yz("label"))),table:Iz,tree:Wz,panel:Jz});var t})),Kz=[lx,Nr("classes",[]),Tr("items",Xz)],Jz=Yo(Kz),$z=[Vx("tab"),gx,Tr("items",Xz)],Zz=[lx,_r("tabs",$z)],Qz=Yo(Zz),tL=MV,nL=RV,eL=Yo([Sr("title"),xr("body",ar("type",{panel:Jz,tabpanel:Qz})),Lr("size","normal"),Wr("buttons",[],nL),Nr("initialData",{}),Ur("onAction",_),Ur("onChange",_),Ur("onSubmit",_),Ur("onClose",_),Ur("onCancel",_),Ur("onTabChange",_)]),oL=Yo(u([kr("type",["cancel","custom"])],tL,!0)),rL=Yo([Sr("title"),Sr("url"),Ar("height"),Ar("width"),Fr("buttons",oL),Ur("onAction",_),Ur("onCancel",_),Ur("onClose",_),Ur("onMessage",_)]),iL=function(t){return p(t)?[t].concat(rt(_t(t),iL)):v(t)?rt(t,iL):[]},uL=function(t){return g(t.type)&&g(t.name)},aL={checkbox:jV,colorinput:JV,colorpicker:ZV,dropzone:rz,input:pz,iframe:lz,imagepreview:dz,selectbox:Cz,sizeinput:Ez,slider:Mz,listbox:Sz,size:Ez,textarea:Nz,urlinput:qz,customeditor:ez,collection:YV,togglemenuitem:DV},cL=function(t){var n=function(t){return Z(iL(t),uL)}(t),e=rt(n,(function(t){return function(t){return z.from(aL[t.type])}(t).fold((function(){return[]}),(function(n){return[xr(t.name,n)]}))}));return Yo(e)},sL=function(t){var n;return{internalDialog:fr(lr("dialog",eL,t)),dataValidator:cL(t),initialData:null!==(n=t.initialData)&&void 0!==n?n:{}}},lL={open:function(t,n){var e=sL(n);return t(e.internalDialog,e.initialData,e.dataValidator)},openUrl:function(t,n){return t(fr(lr("dialog",rL,n)))},redial:function(t){return sL(t)}},fL=Object.freeze({__proto__:null,events:function(t,n){var e=function(e,o){t.updateState.each((function(t){var r=t(e,o);n.set(r)})),t.renderComponents.each((function(r){var i=r(o,n.get());(t.reuseDom?Up:Pp)(e,i)}))};return uu([su(Mi(),(function(n,o){var r=o;if(!r.universal){var i=t.channel;G(r.channels,i)&&e(n,r.data)}})),vu((function(n,o){t.initialData.each((function(t){e(n,t)}))}))])}}),dL=Object.freeze({__proto__:null,getState:function(t,n,e){return e}}),mL=[yr("channel"),Er("renderComponents"),Er("updateState"),Er("initialData"),Pr("reuseDom",!0)],gL=rs({fields:mL,name:"reflecting",active:fL,apis:dL,state:Object.freeze({__proto__:null,init:function(){var t=Gr(z.none());return{readState:function(){return t.get().getOr("none")},get:t.get,set:t.set,clear:function(){return t.set(z.none())}}}})}),pL=function(t){var n=[],e={};return bt(t,(function(t,o){t.fold((function(){n.push(o)}),(function(t){e[o]=t}))})),n.length>0?mo.error(n):mo.value(e)},hL=function(t,n,e){var o,r,i,u=jh(cT.sketch((function(o){return{dom:{tag:"div",classes:["tox-form"].concat(t.classes)},components:K(t.items,(function(t){return qD(o,t,n,e)}))}})));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[u.asSpec()]}],behaviours:es([Hp.config({mode:"acyclic",useTabstopAt:I(RT)}),vT(u),(o=u,r={postprocess:function(t){return pL(t).fold((function(t){return console.error(t),{}}),A)}},i=dr("RepresentingConfigs.memento processors",yT,r),sd.config({store:{mode:"manual",getValue:function(t){var n=o.get(t),e=sd.getValue(n);return i.postprocess(e)},setValue:function(t,n){var e=i.preprocess(n),r=o.get(t);sd.setValue(r,e)}}})),Jp("dialog-body-panel",[su(pi(),(function(t,n){t.getSystem().broadcastOn([PT],{newFocus:z.some(n.event.target)})}))])])}},vL=mm({name:"TabButton",configFields:[Nr("uid",void 0),yr("value"),hr("dom","dom",Fo((function(){return{attributes:{role:"tab",id:Du("aria"),"aria-selected":"false"}}})),Zo()),Er("action"),Nr("domModification",{}),ld("tabButtonBehaviours",[nh,Hp,sd]),yr("view")],factory:function(t,n){return{uid:t.uid,dom:t.dom,components:t.components,events:fh(t.action),behaviours:dd(t.tabButtonBehaviours,[nh.config({}),Hp.config({mode:"execution",useSpace:!0,useEnter:!0}),sd.config({store:{mode:"memory",initialValue:t.value}})]),domModification:t.domModification}}}),bL=D([yr("tabs"),yr("dom"),Nr("clickToDismiss",!1),ld("tabbarBehaviours",[Wm,Hp]),ac(["tabClass","selectedClass"])]),yL=Ud({factory:vL,name:"tabs",unit:"tab",overrides:function(t){var n=function(t,n){Wm.dehighlight(t,n),nu(t,$i(),{tabbar:t,button:n})},e=function(t,n){Wm.highlight(t,n),nu(t,Ji(),{tabbar:t,button:n})};return{action:function(o){var r=o.getSystem().getByUid(t.uid).getOrDie(),i=Wm.isHighlighted(r,o);(i&&t.clickToDismiss?n:i?_:e)(r,o)},domModification:{classes:[t.markers.tabClass]}}}}),xL=D([yL]),wL=gm({name:"Tabbar",configFields:bL(),partFields:xL(),factory:function(t,n,e,o){return{uid:t.uid,dom:t.dom,components:n,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:dd(t.tabbarBehaviours,[Wm.config({highlightClass:t.markers.selectedClass,itemClass:t.markers.tabClass,onHighlight:function(t,n){Fn(n.element,"aria-selected","true")},onDehighlight:function(t,n){Fn(n.element,"aria-selected","false")}}),Hp.config({mode:"flow",getInitial:function(t){return Wm.getHighlighted(t).map((function(t){return t.element}))},selector:"."+t.markers.tabClass,executeOnMove:!0})])}}}),SL=mm({name:"Tabview",configFields:[ld("tabviewBehaviours",[Kp])],factory:function(t,n){return{uid:t.uid,dom:t.dom,behaviours:dd(t.tabviewBehaviours,[Kp.config({})]),domModification:{attributes:{role:"tabpanel"}}}}}),kL=D([Nr("selectFirst",!0),sc("onChangeTab"),sc("onDismissTab"),Nr("tabs",[]),ld("tabSectionBehaviours",[])]),OL=Ld({factory:wL,schema:[yr("dom"),Cr("markers",[yr("tabClass"),yr("selectedClass")])],name:"tabbar",defaults:function(t){return{tabs:t.tabs}}}),CL=Ld({factory:SL,name:"tabview"}),_L=D([OL,CL]),TL=gm({name:"TabSection",configFields:kL(),partFields:_L(),factory:function(t,n,e,o){var r=function(n,e){Qd(n,t,"tabbar").each((function(t){e(t).each(eu)}))};return{uid:t.uid,dom:t.dom,components:n,behaviours:fd(t.tabSectionBehaviours),events:uu(ot([t.selectFirst?[vu((function(t,n){r(t,Wm.getFirst)}))]:[],[su(Ji(),(function(n,e){!function(n){var e=sd.getValue(n);Qd(n,t,"tabview").each((function(o){var r=nt(t.tabs,(function(t){return t.value===e}));r.each((function(e){var r=e.view();Vn(n.element,"id").each((function(t){Fn(o.element,"aria-labelledby",t)})),Kp.set(o,r),t.onChangeTab(o,n,r)}))}))}(e.event.button)})),su($i(),(function(n,e){var o=e.event.button;t.onDismissTab(n,o)}))]])),apis:{getViewItems:function(n){return Qd(n,t,"tabview").map((function(t){return Kp.contents(t)})).getOr([])},showTab:function(t,n){r(t,(function(t){var e=Wm.getCandidates(t);return nt(e,(function(t){return sd.getValue(t)===n})).filter((function(n){return!Wm.isHighlighted(t,n)}))}))}}}},apis:{getViewItems:function(t,n){return t.getViewItems(n)},showTab:function(t,n,e){t.showTab(n,e)}}}),EL=function(t,n){Un(t,"height",n+"px"),Un(t,"flex-basis",n+"px")},DL=function(t,n,e){Ua(t,'[role="dialog"]').each((function(t){ja(t,'[role="tablist"]').each((function(o){e.get().map((function(e){return Un(n,"height","0"),Un(n,"flex-basis","0"),Math.min(e,function(t,n,e){var o,r=dn(t).dom,i=Ua(t,".tox-dialog-wrap").getOr(t);o="fixed"===Gn(i,"position")?Math.max(r.clientHeight,window.innerHeight):Math.max(r.offsetHeight,r.scrollHeight);var u=te(n),a=n.dom.offsetLeft>=e.dom.offsetLeft+ce(e)?Math.max(te(e),u):u,c=parseInt(Gn(t,"margin-top"),10)||0,s=parseInt(Gn(t,"margin-bottom"),10)||0;return o-(te(t)+c+s-a)}(t,n,o))})).each((function(t){EL(n,t)}))}))}))},AL=function(t){return ja(t,'[role="tabpanel"]')},ML=function(t){var n=Fs(),e=[vu((function(e){var o=e.element;AL(o).each((function(r){Un(r,"visibility","hidden"),e.getSystem().getByDom(r).toOptional().each((function(e){var o=function(t,n,e){return K(t,(function(o,r){Kp.set(e,t[r].view());var i=n.dom.getBoundingClientRect();return Kp.set(e,[]),i.height}))}(t,r,e),i=function(t){return dt(lt(t,(function(t,n){return t>n?-1:t<n?1:0})))}(o);i.fold(n.clear,n.set)})),DL(o,r,n),Jn(r,"visibility"),function(t,n){dt(t).each((function(t){return TL.showTab(n,t.value)}))}(t,e),requestAnimationFrame((function(){DL(o,r,n)}))}))})),su(Ui(),(function(t){var e=t.element;AL(e).each((function(t){DL(e,t,n)}))})),su(QO,(function(t,e){var o=t.element;AL(o).each((function(t){var e=ms(Cn(t));Un(t,"visibility","hidden");var r=Yn(t,"height").map((function(t){return parseInt(t,10)}));Jn(t,"height"),Jn(t,"flex-basis");var i=t.dom.getBoundingClientRect().height;r.forall((function(t){return i>t}))?(n.set(i),DL(o,t,n)):r.each((function(n){EL(t,n)})),Jn(t,"visibility"),e.each(ls)}))}))];return{extraEvents:e,selectFirst:!1}},BL="send-data-to-section",IL="send-data-to-view",FL=function(t,n,e){var o=Gr({}),r=function(t){var n=sd.getValue(t),e=pL(n).getOr({}),r=o.get(),i=Ao(r,e);o.set(i)},i=function(t){var n=o.get();sd.setValue(t,n)},u=Gr(null),a=K(t.tabs,(function(t){return{value:t.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[Ba(e.shared.providers.translate(t.title))],view:function(){return[cT.sketch((function(o){return{dom:{tag:"div",classes:["tox-form"]},components:K(t.items,(function(t){return qD(o,t,n,e)})),formBehaviours:es([Hp.config({mode:"acyclic",useTabstopAt:I(RT)}),Jp("TabView.form.events",[vu(i),bu(r)]),cs.config({channels:Jr([{key:BL,value:{onReceive:r}},{key:IL,value:{onReceive:i}}])})])}}))]}}})),c=ML(a);return TL.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:function(t,n,e){var o=sd.getValue(n);nu(t,ZO,{name:o,oldName:u.get()}),u.set(o)},tabs:a,components:[TL.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[wL.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:es([LO.config({})])}),TL.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:c.selectFirst,tabSectionBehaviours:es([Jp("tabpanel",c.extraEvents),Hp.config({mode:"acyclic"}),bm.config({find:function(t){return dt(TL.getViewItems(t))}}),xT(z.none(),(function(t){return t.getSystem().broadcastOn([BL],{}),o.get()}),(function(t,n){o.set(n),t.getSystem().broadcastOn([IL],{})}))])})},RL=function(t,n,o,r,i){return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:e(e({},o.map((function(t){return{id:t}})).getOr({})),i?{"aria-live":"polite"}:{})},components:[],behaviours:es([bT(0),gL.config({channel:"".concat(zT,"-").concat(n),updateState:function(t,n){return z.some({isTabPanel:function(){return"tabpanel"===n.body.type}})},renderComponents:function(t){var n=t.body;return"tabpanel"===n.type?[FL(n,t.initialData,r)]:[hL(n,t.initialData,r)]},initialData:t})])}},NL=db.deviceType.isTouch(),VL=function(t,n){return{dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[t,n]}},zL=function(t,n){return TV.parts.close(Uh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":n.translate("Close")}},action:t,buttonBehaviours:es([LO.config({})])}))},LL=function(){return TV.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}})},HL=function(t,n){return TV.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:Wh("<p>".concat($v(n.translate(t)),"</p>"))}]}]})},PL=function(t){return TV.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:t})},UL=function(t,n){return[BO.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:t}),BO.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:n})]},WL=function(t){var n,o="tox-dialog",r=o+"-wrap",i=r+"__backdrop",a=o+"__disable-scroll";return TV.sketch({lazySink:t.lazySink,onEscape:function(n){return t.onEscape(n),z.some(!0)},useTabstopAt:function(t){return!RT(t)},firstTabstop:t.firstTabstop,dom:{tag:"div",classes:[o].concat(t.extraClasses),styles:e({position:"relative"},t.extraStyles)},components:u([t.header,t.body],t.footer.toArray(),!0),parts:{blocker:{dom:Wh('<div class="'.concat(r,'"></div>')),components:[{dom:{tag:"div",classes:NL?[i,i+"--opaque"]:[i]}}]}},dragBlockClass:r,modalBehaviours:es(u([nh.config({}),Jp("dialog-events",t.dialogEvents.concat([hu(pi(),(function(t,n){MB.isBlocked(t)||Hp.focusIn(t)})),su(Yi(),(function(t,n){t.getSystem().broadcastOn([PT],{newFocus:n.event.newFocus})}))])),Jp("scroll-lock",[vu((function(){la(Mn(),a)})),bu((function(){da(Mn(),a)}))])],t.extraBehaviours,!0)),eventOrder:e((n={},n[Bi()]=["dialog-events"],n[Wi()]=["scroll-lock","dialog-events","alloy.base.behaviour"],n[ji()]=["alloy.base.behaviour","dialog-events","scroll-lock"],n),t.eventOrder)})},jL=function(t){return Uh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close"),title:t.translate("Close")}},buttonBehaviours:es([LO.config({})]),components:[ab("close",{tag:"span",classes:["tox-icon"]},t.icons)],action:function(t){tu(t,YO)}})},GL=function(t,n,o,r){return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:e({},o.map((function(t){return{id:t}})).getOr({}))},components:[],behaviours:es([gL.config({channel:"".concat(VT,"-").concat(n),initialData:t,renderComponents:function(t){return[Ba(r.translate(t.title))]}})])}},qL=function(){return{dom:Wh('<div class="tox-dialog__draghandle"></div>')}},YL=function(t,n,e){return function(t,n,e){var o=TV.parts.title(GL(t,n,z.none(),e)),r=TV.parts.draghandle(qL()),i=TV.parts.close(jL(e)),u=[o].concat(t.draggable?[r]:[]).concat([i]);return BO.sketch({dom:Wh('<div class="tox-dialog__header"></div>'),components:u})}({title:e.shared.providers.translate(t),draggable:e.dialog.isDraggableModal()},n,e.shared.providers)},XL=function(t,n,e,o){return{dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":e.translate(t)},styles:{left:"0px",right:"0px",bottom:"0px",top:"".concat(o.getOr(0),"px"),position:"absolute"}},behaviours:n,components:[{dom:Wh('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}},KL=function(t,n,e){return{onClose:function(){return e.closeWindow()},onBlock:function(e){var o=ja(t().element,".tox-dialog__header").map((function(t){return te(t)}));TV.setBusy(t(),(function(t,r){return XL(e.message,r,n,o)}))},onUnblock:function(){TV.setIdle(t())}}},JL="tox-dialog--fullscreen",$L="tox-dialog--width-lg",ZL="tox-dialog--width-md",QL=function(t){switch(t){case"large":return z.some($L);case"medium":return z.some(ZL);default:return z.none()}},tH=function(t,n){var e=Gt.fromDom(n.element.dom);ga(e,JL)||(ha(e,[$L,ZL]),QL(t).each((function(t){return la(e,t)})))},nH=function(t,n){var e=Gt.fromDom(t.element.dom),o=va(e),r=nt(o,(function(t){return t===$L||t===ZL})).or(QL(n));!function(t,n){J(n,(function(n){ma(t,n)}))}(e,u([JL],r.toArray(),!0))},eH=function(t,n,o){var r;return Na(WL(e(e({},t),{firstTabstop:1,lazySink:o.shared.getSink,extraBehaviours:u([ST({})],t.extraBehaviours,!0),onEscape:function(t){tu(t,YO)},dialogEvents:n,eventOrder:(r={},r[Mi()]=[gL.name(),cs.name()],r[Wi()]=["scroll-lock",gL.name(),"messages","dialog-events","alloy.base.behaviour"],r[ji()]=["alloy.base.behaviour","dialog-events","messages",gL.name(),"scroll-lock"],r)})))},oH=function(t,n){void 0===n&&(n={});return K(t,(function(t){return"menu"===t.type?function(t){var o=K(t.items,(function(t){var o=Tt(n,t.name).getOr(Gr(!1));return e(e({},t),{storage:o})}));return e(e({},t),{items:o})}(t):t}))},rH=function(t){return tt(t,(function(t,n){return"menu"===n.type?tt(n.items,(function(t,n){return t[n.name]=n.storage,t}),t):t}),{})},iH=function(t,n){return[mu(pi(),FT),t(qO,(function(t,e,o,r){ms(Cn(r.element)).fold(_,fs),n.onClose(),e.onClose()})),t(YO,(function(t,n,e,o){n.onCancel(t),tu(o,qO)})),su($O,(function(t,e){return n.onUnblock()})),su(JO,(function(t,e){return n.onBlock(e.event)}))]},uH=function(t,n,e){var o=function(n,e){return su(n,(function(n,o){r(n,(function(r,i){e(t(),r,o.event,n)}))}))},r=function(t,n){gL.getState(t).get().each((function(e){n(e.internalDialog,t)}))};return u(u([],iH(o,n),!0),[o(KO,(function(t,n){return n.onSubmit(t)})),o(GO,(function(t,n,e){n.onChange(t,{name:e.name})})),o(XO,(function(t,n,o,r){var i=function(){return r.getSystem().isConnected()?Hp.focusIn(r):void 0},u=function(t){return zn(t,"disabled")||Vn(t,"aria-disabled").exists((function(t){return"true"===t}))},a=Cn(r.element),c=ms(a);n.onAction(t,{name:o.name,value:o.value}),ms(a).fold(i,(function(t){u(t)||c.exists((function(n){return sn(t,n)&&u(n)}))?i():e().toOptional().filter((function(n){return!sn(n.element,t)})).each(i)}))})),o(ZO,(function(t,n,e){n.onTabChange(t,{newTabName:e.name,oldTabName:e.oldName})})),bu((function(n){var e=t();sd.setValue(n,e.getData())}))],!1)},aH=function(t,n){var e=n.map((function(t){return t.footerButtons})).getOr([]),o=$(e,(function(t){return"start"===t.align})),r=function(t,n){return BO.sketch({dom:{tag:"div",classes:["tox-dialog__footer-".concat(t)]},components:K(n,(function(t){return t.memento.asSpec()}))})};return[r("start",o.pass),r("end",o.fail)]},cH=function(t,n,e){return{dom:Wh('<div class="tox-dialog__footer"></div>'),components:[],behaviours:es([gL.config({channel:"".concat(LT,"-").concat(n),initialData:t,updateState:function(t,n){var o=K(n.buttons,(function(t){var n=jh(function(t,n){return ED(t,t.type,n)}(t,e));return{name:t.name,align:t.align,memento:n}}));return z.some({lookupByName:function(n){return function(t,n,e){return nt(n,(function(t){return t.name===e})).bind((function(n){return n.memento.getOpt(t)}))}(t,o,n)},footerButtons:o})},renderComponents:aH})])}},sH=function(t,n,e){return TV.parts.footer(cH(t,n,e))},lH=function(t,n){if(t.getRoot().getSystem().isConnected()){var e=bm.getCurrent(t.getFormWrapper()).getOr(t.getFormWrapper());return cT.getField(e,n).orThunk((function(){var e=t.getFooter().bind((function(t){return gL.getState(t).get()}));return e.bind((function(t){return t.lookupByName(n)}))}))}return z.none()},fH=function(t,n,o){var r=function(n){var e=t.getRoot();e.getSystem().isConnected()&&n(e)},i={getData:function(){var n=t.getRoot(),r=n.getSystem().isConnected()?t.getFormWrapper():n,i=sd.getValue(r),u=yt(o,(function(t){return t.get()}));return e(e({},i),u)},setData:function(n){r((function(e){var r=i.getData(),u=Ao(r,n),a=function(t,n){var e=t.getRoot();return gL.getState(e).get().map((function(t){return fr(lr("data",t.dataValidator,n))})).getOr(n)}(t,u),c=t.getFormWrapper();sd.setValue(c,a),bt(o,(function(t,n){Et(u,n)&&t.set(u[n])}))}))},setEnabled:function(n,e){lH(t,n).each(e?Bm.enable:Bm.disable)},focus:function(n){lH(t,n).each(nh.focus)},block:function(t){if(!g(t))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");r((function(n){nu(n,JO,{message:t})}))},unblock:function(){r((function(t){tu(t,$O)}))},showTab:function(n){r((function(e){var o=t.getBody();gL.getState(o).get().exists((function(t){return t.isTabPanel()}))&&bm.getCurrent(o).each((function(t){TL.showTab(t,n)}))}))},redial:function(u){r((function(r){var a=t.getId(),c=n(u),s=oH(c.internalDialog.buttons,o);r.getSystem().broadcastOn(["".concat(NT,"-").concat(a)],c),r.getSystem().broadcastOn(["".concat(VT,"-").concat(a)],c.internalDialog),r.getSystem().broadcastOn(["".concat(zT,"-").concat(a)],c.internalDialog),r.getSystem().broadcastOn(["".concat(LT,"-").concat(a)],e(e({},c.internalDialog),{buttons:s})),i.setData(c.initialData)}))},close:function(){r((function(t){tu(t,qO)}))},toggleFullscreen:t.toggleFullscreen};return i},dH=function(t,n,e){var o=Du("dialog"),r=t.internalDialog,i=YL(r.title,o,e),u=Gr(r.size),a=QL(u.get()).toArray(),c=function(t,n,e){var o=RL(t,n,z.none(),e,!1);return TV.parts.body(o)}({body:r.body,initialData:r.initialData},o,e),s=oH(r.buttons),l=rH(s),f=Ft(0!==s.length,sH({buttons:s},o,e)),d=uH((function(){return h}),KL((function(){return g}),e.shared.providers,n),e.shared.getSink),m={id:o,header:i,body:c,footer:f,extraClasses:a,extraBehaviours:[gL.config({channel:"".concat(NT,"-").concat(o),updateState:function(t,n){return u.set(n.internalDialog.size),tH(n.internalDialog.size,t),z.some(n)},initialData:t})],extraStyles:{}},g=eH(m,d,e),p={getId:D(o),getRoot:D(g),getBody:function(){return TV.getBody(g)},getFooter:function(){return TV.getFooter(g)},getFormWrapper:function(){var t=TV.getBody(g);return bm.getCurrent(t).getOr(t)},toggleFullscreen:function(){nH(g,u.get())}},h=fH(p,n.redial,l);return{dialog:g,instanceApi:h}},mH=function(t,n,e,o,r){var i,a;void 0===o&&(o=!1);var c=Du("dialog"),s=Du("dialog-label"),l=Du("dialog-content"),f=t.internalDialog,d=Gr(f.size),m=QL(d.get()).toArray(),g=jh(function(t,n,e,o){return BO.sketch({dom:Wh('<div class="tox-dialog__header"></div>'),components:[GL(t,n,z.some(e),o),qL(),jL(o)],containerBehaviours:es([dV.config({mode:"mouse",blockerClass:"blocker",getTarget:function(t){return Ga(t,'[role="dialog"]').getOrDie()},snaps:{getSnapPoints:function(){return[]},leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])})}({title:f.title,draggable:!0},c,s,e.shared.providers)),p=jh(function(t,n,e,o,r){return RL(t,n,z.some(e),o,r)}({body:f.body,initialData:f.initialData},c,l,e,o)),h=oH(f.buttons),v=rH(h),b=Ft(0!==h.length,jh(function(t,n,e){return cH(t,n,e)}({buttons:h},c,e))),y=uH((function(){return w}),{onBlock:function(t){MB.block(x,(function(n,o){var r=g.getOpt(x).map((function(t){return te(t.element)}));return XL(t.message,o,e.shared.providers,r)}))},onUnblock:function(){MB.unblock(x)},onClose:function(){return n.closeWindow()}},e.shared.getSink),x=Na({dom:{tag:"div",classes:u(["tox-dialog","tox-dialog-inline"],m,!0),attributes:(i={role:"dialog"},i["aria-labelledby"]=s,i)},eventOrder:(a={},a[Mi()]=[gL.name(),cs.name()],a[Bi()]=["execute-on-form"],a[Wi()]=["reflecting","execute-on-form"],a),behaviours:es([Hp.config({mode:"cyclic",onEscape:function(t){return tu(t,qO),z.some(!0)},useTabstopAt:function(t){return!RT(t)&&("button"!==$t(t)||"disabled"!==Nn(t,"disabled"))},firstTabstop:1}),gL.config({channel:"".concat(NT,"-").concat(c),updateState:function(t,n){return d.set(n.internalDialog.size),tH(n.internalDialog.size,t),r(),z.some(n)},initialData:t}),nh.config({}),Jp("execute-on-form",y.concat([hu(pi(),(function(t,n){Hp.focusIn(t)})),su(Yi(),(function(t,n){t.getSystem().broadcastOn([PT],{newFocus:n.event.newFocus})}))])),MB.config({getRoot:function(){return z.some(x)}}),Kp.config({}),ST({})]),components:u([g.asSpec(),p.asSpec()],b.map((function(t){return t.asSpec()})).toArray(),!0)}),w=fH({getId:D(c),getRoot:D(x),getFooter:function(){return b.map((function(t){return t.get(x)}))},getBody:function(){return p.get(x)},getFormWrapper:function(){var t=p.get(x);return bm.getCurrent(t).getOr(t)},toggleFullscreen:function(){nH(x,d.get())}},n.redial,v);return{dialog:x,instanceApi:w}},gH=tinymce.util.Tools.resolve("tinymce.util.URI"),pH=["insertContent","setContent","execCommand","close","block","unblock"],hH=function(t){return p(t)&&-1!==pH.indexOf(t.mceAction)},vH=function(t,n,o,r){var i,a,c,s,l,f,d,m=Du("dialog"),h=YL(t.title,m,r),v=function(t){var n={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[BT(z.none(),{dom:{tag:"iframe",attributes:{src:t.url}},behaviours:es([LO.config({}),nh.config({})])})]}],behaviours:es([Hp.config({mode:"acyclic",useTabstopAt:I(RT)})])};return TV.parts.body(n)}(t),b=t.buttons.bind((function(t){return 0===t.length?z.none():z.some(sH({buttons:t},m,r))})),x=(a=function(){return D},c=KL((function(){return E}),r.shared.providers,n),s=function(t,n){return su(t,(function(t,e){l(t,(function(o,r){n(a(),o,e.event,t)}))}))},l=function(t,n){gL.getState(t).get().each((function(e){n(e,t)}))},u(u([],iH(s,c),!0),[s(XO,(function(t,n,e){n.onAction(t,{name:e.name})}))],!1)),w=e(e({},t.height.fold((function(){return{}}),(function(t){return{height:t+"px","max-height":t+"px"}}))),t.width.fold((function(){return{}}),(function(t){return{width:t+"px","max-width":t+"px"}}))),k=t.width.isNone()&&t.height.isNone()?["tox-dialog--width-lg"]:[],O=new gH(t.url,{base_uri:new gH(window.location.href)}),C="".concat(O.protocol,"://").concat(O.host).concat(O.port?":"+O.port:""),_=Is(),T=[gL.config({channel:"".concat(NT,"-").concat(m),updateState:function(t,n){return z.some(n)},initialData:t}),Jp("messages",[vu((function(){var n=Ns(Gt.fromDom(window),"message",(function(n){if(O.isSameOrigin(new gH(n.raw.origin))){var e=n.raw.data;hH(e)?function(t,n,e){switch(e.mceAction){case"insertContent":t.insertContent(e.content);break;case"setContent":t.setContent(e.content);break;case"execCommand":var o=!!y(e.ui)&&e.ui;t.execCommand(e.cmd,o,e.value);break;case"close":n.close();break;case"block":n.block(e.message);break;case"unblock":n.unblock()}}(o,D,e):function(t){return!hH(t)&&p(t)&&Et(t,"mceAction")}(e)&&t.onMessage(D,e)}}));_.set(n)})),bu(_.clear)]),cs.config({channels:(i={},i[HT]={onReceive:function(t,n){ja(t.element,"iframe").each((function(t){var e=t.dom.contentWindow;S(e)&&e.postMessage(n,C)}))}},i)})],E=eH({id:m,header:h,body:v,footer:b,extraClasses:k,extraBehaviours:T,extraStyles:w},x,r),D=(f=E,d=function(t){f.getSystem().isConnected()&&t(f)},{block:function(t){if(!g(t))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");d((function(n){nu(n,JO,{message:t})}))},unblock:function(){d((function(t){tu(t,$O)}))},close:function(){d((function(t){tu(t,qO)}))},sendMessage:function(t){d((function(n){n.getSystem().broadcastOn([HT],t)}))}});return{dialog:E,instanceApi:D}},bH=function(t,n){return fr(lr("data",n,t))},yH=function(t){return yO(t,".tox-alert-dialog")||yO(t,".tox-confirm-dialog")},xH=function(t,n,e){return n&&e?[]:[ZM.config({contextual:{lazyContext:function(){return z.some(io(Gt.fromDom(t.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport:function(n){return vO(t,n.element).map((function(t){return{bounds:bO(t),optScrollEnv:z.some({currentScrollTop:t.element.dom.scrollTop,scrollElmTop:ie(t.element).top})}})).getOrThunk((function(){return{bounds:co(),optScrollEnv:z.none()}}))}})]},wH=function(t){var n,o,r=t.editor,i=gy(r),a=(n=t.backstages.dialog,o=n.shared,{open:function(t,e){var r=function(){TV.hide(c),e()},i=jh(ED({name:"close-alert",text:"OK",primary:!0,buttonType:z.some("primary"),align:"end",enabled:!0,icon:z.none()},"cancel",n)),u=LL(),a=zL(r,o.providers),c=Na(WL({lazySink:function(){return o.getSink()},header:VL(u,a),body:HL(t,o.providers),footer:z.some(PL(UL([],[i.asSpec()]))),onEscape:r,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[su(YO,r)],eventOrder:{}}));TV.show(c);var s=i.get(c);nh.focus(s)}}),c=function(t){var n=t.shared;return{open:function(e,o){var r=function(t){TV.hide(s),o(t)},i=jh(ED({name:"yes",text:"Yes",primary:!0,buttonType:z.some("primary"),align:"end",enabled:!0,icon:z.none()},"submit",t)),u=ED({name:"no",text:"No",primary:!1,buttonType:z.some("secondary"),align:"end",enabled:!0,icon:z.none()},"cancel",t),a=LL(),c=zL((function(){return r(!1)}),n.providers),s=Na(WL({lazySink:function(){return n.getSink()},header:VL(a,c),body:HL(e,n.providers),footer:z.some(PL(UL([],[u,i.asSpec()]))),onEscape:function(){return r(!1)},extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[su(YO,(function(){return r(!1)})),su(KO,(function(){return r(!0)}))],eventOrder:{}}));TV.show(s);var l=i.get(s);nh.focus(l)}}}(t.backstages.dialog),s=function(n,e){return lL.openUrl((function(n){var o=vH(n,{closeWindow:function(){TV.hide(o.dialog),e(o.instanceApi)}},r,t.backstages.dialog);return TV.show(o.dialog),o.instanceApi}),n)},l=function(n,e){return lL.open((function(n,o,r){var i=o,u=dH({dataValidator:r,initialData:i,internalDialog:n},{redial:lL.redial,closeWindow:function(){TV.hide(u.dialog),e(u.instanceApi)}},t.backstages.dialog);return TV.show(u.dialog),u.instanceApi.setData(i),u.instanceApi}),n)},f=function(n,o,a,c){return lL.open((function(n,s,l){var f=bH(s,l),d=Fs(),m=t.backstages.popup.shared.header.isPositionedAtTop(),g=function(){return d.on((function(t){Hh.reposition(t),i&&m||ZM.refresh(t)}))},p=mH({dataValidator:l,initialData:f,internalDialog:n},{redial:lL.redial,closeWindow:function(){d.on(Hh.hide),r.off("ResizeEditor",g),d.clear(),a(p.instanceApi)}},t.backstages.popup,c.ariaAttrs,g),h=Na(Hh.sketch(e(e({lazySink:t.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:c.persistent?{event:"doNotDismissYet"}:{}},m?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:es(u([Jp("window-manager-inline-events",[su(Gi(),(function(t,n){tu(p.dialog,YO)}))])],xH(r,i,m),!0)),isExtraPart:function(t,n){return yH(n)}})));d.set(h);return Hh.showWithinBounds(h,Va(p.dialog),{anchor:o},(function(){var t=r.inline?Mn():Gt.fromDom(r.getContainer()),n=io(t);return z.some(n)})),i&&m||(ZM.refresh(h),r.on("ResizeEditor",g)),p.instanceApi.setData(f),Hp.focusIn(p.dialog),p.instanceApi}),n)},d=function(n,o,i,u){return lL.open((function(n,a,c){var s=bH(a,c),l=Fs(),f=t.backstages.popup.shared.header.isPositionedAtTop(),d=function(){return l.on((function(t){Hh.reposition(t),ZM.refresh(t)}))},m=mH({dataValidator:c,initialData:s,internalDialog:n},{redial:lL.redial,closeWindow:function(){l.on(Hh.hide),r.off("ResizeEditor ScrollWindow ElementScroll",d),l.clear(),i(m.instanceApi)}},t.backstages.popup,u.ariaAttrs,d),g=Na(Hh.sketch(e(e({lazySink:t.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:u.persistent?{event:"doNotDismissYet"}:{}},f?{}:{fireRepositionEventInstead:{}}),{inlineBehaviours:es([Jp("window-manager-inline-events",[su(Gi(),(function(t,n){tu(m.dialog,YO)}))]),ZM.config({contextual:{lazyContext:function(){return z.some(io(Gt.fromDom(r.getContentAreaContainer())))},fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top","bottom"],lazyViewport:function(t){return vO(r,t.element).map((function(t){return{bounds:bO(t),optScrollEnv:z.some({currentScrollTop:t.element.dom.scrollTop,scrollElmTop:ie(t.element).top})}})).getOrThunk((function(){return{bounds:co(),optScrollEnv:z.none()}}))}})]),isExtraPart:function(t,n){return yH(n)}})));l.set(g);return Hh.showWithinBounds(g,Va(m.dialog),{anchor:o},(function(){return t.backstages.popup.shared.getSink().toOptional().bind((function(t){var n=vO(r,t.element).map((function(t){return bO(t)})).getOr(co()),e=io(Gt.fromDom(r.getContentAreaContainer())),o=ao(e,n);return z.some(ro(o.x,o.y,o.width,o.height-15))}))})),ZM.refresh(g),r.on("ResizeEditor ScrollWindow ElementScroll ResizeWindow",d),m.instanceApi.setData(s),Hp.focusIn(m.dialog),m.instanceApi}),n)};return{open:function(n,e,o){if(!x(e)){if("toolbar"===e.inline)return f(n,t.backstages.popup.shared.anchors.inlineDialog(),o,e);if("bottom"===e.inline)return d(n,t.backstages.popup.shared.anchors.inlineBottomDialog(),o,e);if("cursor"===e.inline)return f(n,t.backstages.popup.shared.anchors.cursor(),o,e)}return l(n,o)},openUrl:function(t,n){return s(t,n)},alert:function(t,n){a.open(t,n)},close:function(t){t.close()},confirm:function(t,n){c.open(t,n)}}},SH=function(t){hb(t),function(t){var n=t.options.register,e=function(t){return C(t,g)?{value:GS(t),valid:!0}:{valid:!1,message:"Must be an array of strings."}},o=function(t){return O(t)&&t>0?{value:t,valid:!0}:{valid:!1,message:"Must be a positive number."}};n("color_map",{processor:e,default:["#BFEDD2","Light Green","#FBEEB8","Light Yellow","#F8CAC6","Light Red","#ECCAFA","Light Purple","#C2E0F4","Light Blue","#2DC26B","Green","#F1C40F","Yellow","#E03E2D","Red","#B96AD9","Purple","#3598DB","Blue","#169179","Dark Turquoise","#E67E23","Orange","#BA372A","Dark Red","#843FA1","Dark Purple","#236FA1","Dark Blue","#ECF0F1","Light Gray","#CED4D9","Medium Gray","#95A5A6","Gray","#7E8C8D","Dark Gray","#34495E","Navy Blue","#000000","Black","#ffffff","White"]}),n("color_map_background",{processor:e}),n("color_map_foreground",{processor:e}),n("color_cols",{processor:o,default:KS(t)}),n("color_cols_foreground",{processor:o,default:JS(t,WS)}),n("color_cols_background",{processor:o,default:JS(t,jS)}),n("custom_colors",{processor:"boolean",default:!0}),n("color_default_foreground",{processor:"string",default:YS}),n("color_default_background",{processor:"string",default:YS})}(t),function(t){var n=t.options.register;n("contextmenu_avoid_overlap",{processor:"string",default:""}),n("contextmenu_never_use_native",{processor:"boolean",default:!1}),n("contextmenu",{processor:function(t){return!1===t?{value:[],valid:!0}:g(t)||C(t,g)?{value:nN(t),valid:!0}:{valid:!1,message:"Must be false or a string."}},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})}(t)};so.add("silver",(function(t){SH(t);var n=function(){return co()},o=kV(t,{getPopupSinkBounds:function(){return n()}}),r=o.dialogs,i=o.popups,u=o.renderUI;mO(t,i.backstage.shared);var a=wH({editor:t,backstages:{popup:i.backstage,dialog:r.backstage}});return{renderUI:function(){var e=u();return vO(t,i.getMothership().element).each((function(t){n=function(){return bO(t)}})),e},getWindowManagerImpl:D(a),getNotificationManagerImpl:function(){return function(t,n,o){var r=n.backstage.shared,i=function(){var n=io(Gt.fromDom(t.getContentAreaContainer())),e=co(),o=Tc(e.x,n.x,n.right),r=Tc(e.y,n.y,n.bottom),i=Math.max(n.right,e.right),u=Math.max(n.bottom,e.bottom);return z.some(ro(o,r,i-o,u-r))};return{open:function(n,u){var a=function(){u(),Hh.hide(s)},c=Na(sb.sketch({text:n.text,level:G(["success","error","warning","warn","info"],n.type)?n.type:void 0,progress:!0===n.progressBar,icon:n.icon,closeButton:n.closeButton,onAction:a,iconProvider:r.providers.icons,translationProvider:r.providers.translate})),s=Na(Hh.sketch(e({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:r.getSink,fireDismissalEventInstead:{}},r.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}})));o.add(s),O(n.timeout)&&n.timeout>0&&Ph.setEditorTimeout(t,(function(){a()}),n.timeout);var l={close:a,reposition:function(){var n=Va(c),o={maxHeightFunction:Ks()},u=t.notificationManager.getNotifications();if(u[0]===l){var a=e(e({},r.anchors.banner()),{overrides:o});Hh.showWithinBounds(s,n,{anchor:a},i)}else j(u,l).each((function(t){var e=u[t-1].getEl(),r={type:"node",root:Mn(),node:z.some(Gt.fromDom(e)),overrides:o,layouts:{onRtl:function(){return[Pc]},onLtr:function(){return[Pc]}}};Hh.showWithinBounds(s,n,{anchor:r},i)}))},text:function(t){sb.updateText(c,t)},settings:n,getEl:function(){return c.element.dom},progressBar:{value:function(t){sb.updateProgress(c,t)}}};return l},close:function(t){t.close()},getArgs:function(t){return t.settings}}}(t,{backstage:i.backstage},i.getMothership())}}}))}(),t}export{e as __require};
|
2
|
-
//# sourceMappingURL=theme.mjs.map
|