@progress/kendo-react-editor 7.0.3-develop.9 → 7.1.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- (function(y,De){typeof exports=="object"&&typeof module<"u"?De(exports,require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-form"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-pdf")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-editor-common","@progress/kendo-svg-icons","@progress/kendo-react-dialogs","@progress/kendo-react-inputs","@progress/kendo-react-form","@progress/kendo-react-intl","@progress/kendo-react-layout","@progress/kendo-react-popup","@progress/kendo-react-dropdowns","@progress/kendo-react-pdf"],De):(y=typeof globalThis<"u"?globalThis:y||self,De(y.KendoReactEditor={},y.React,y.PropTypes,y.KendoReactButtons,y.KendoReactCommon,y.KendoEditorCommon,y.KendoSvgIcons,y.KendoReactDialogs,y.KendoReactInputs,y.KendoReactForm,y.KendoReactIntl,y.KendoReactLayout,y.KendoReactPopup,y.KendoReactDropdowns,y.KendoReactPdf))})(this,function(y,De,R,D,F,i,x,q,C,W,A,Le,Wr,O,Kr){"use strict";"use client";function Or(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const l=Or(De),Vr=`
5
+ (function(y,De){typeof exports=="object"&&typeof module!="undefined"?De(exports,require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-form"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-pdf")):typeof define=="function"&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-editor-common","@progress/kendo-svg-icons","@progress/kendo-react-dialogs","@progress/kendo-react-inputs","@progress/kendo-react-form","@progress/kendo-react-intl","@progress/kendo-react-layout","@progress/kendo-react-popup","@progress/kendo-react-dropdowns","@progress/kendo-react-pdf"],De):(y=typeof globalThis!="undefined"?globalThis:y||self,De(y.KendoReactEditor={},y.React,y.PropTypes,y.KendoReactButtons,y.KendoReactCommon,y.KendoEditorCommon,y.KendoSvgIcons,y.KendoReactDialogs,y.KendoReactInputs,y.KendoReactForm,y.KendoReactIntl,y.KendoReactLayout,y.KendoReactPopup,y.KendoReactDropdowns,y.KendoReactPdf))})(this,function(y,De,R,D,F,i,x,q,C,W,A,Le,Wr,O,Kr){"use strict";"use client";function Or(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const l=Or(De),Vr=`
6
6
  html, body {
7
7
  margin: 0;
8
8
  height: 100%;
@@ -223,4 +223,4 @@ body > .k-content {
223
223
  background: rgba(200, 200, 255, 0.4);
224
224
  pointer-events: none;
225
225
  }
226
- `,_r="body { direction: rtl }",tt="editor.bold",lt="editor.italic",at="editor.underline",rt="editor.strikethrough",st="editor.subscript",it="editor.superscript",nt="editor.hyperlink",ot="editor.insertFile",ct="editor.print",pt="editor.selectAll",dt="editor.cleanFormatting",ut="editor.pdf",gt="editor.foregroundColor",ht="editor.backgroundColor",mt="editor.createTable",ft="editor.insertTableHint",bt="editor.addRowBefore",vt="editor.addRowAfter",yt="editor.addColumnBefore",wt="editor.addColumnAfter",St="editor.deleteRow",Pt="editor.deleteColumn",xt="editor.deleteTable",Nt="editor.mergeCells",Tt="editor.splitCell",Lt="editor.hyperlink-dialog-title",At="editor.hyperlink-dialog-content-address",Ct="editor.hyperlink-dialog-content-title",It="editor.hyperlink-dialog-content-newwindow",Dt="editor.hyperlink-dialog-cancel",Bt="editor.hyperlink-dialog-insert",zt="editor.insertfile-dialog-title",Rt="editor.insertfile-dialog-content-address",Mt="editor.insertfile-dialog-content-title",kt="editor.insertfile-dialog-cancel",Ht="editor.insertfile-dialog-insert",Ft="editor.image",Wt="editor.image-dialog-title",Kt="editor.image-address",Ot="editor.image-title",Vt="editor.image-altText",Ut="editor.image-width",_t="editor.image-height",$t="editor.image-cancel",Et="editor.image-insert",jt="editor.viewHtml",qt="editor.viewHtml-dialog-title",Gt="editor.viewHtml-cancel",Jt="editor.viewHtml-update",Qt="editor.unlink",Xt="editor.undo",Yt="editor.redo",Zt="editor.fontSize",el="editor.fontName",tl="editor.format",ll="editor.alignLeft",al="editor.alignRight",rl="editor.alignCenter",sl="editor.alignJustify",il="editor.indent",nl="editor.outdent",ol="editor.orderedList",cl="editor.bulletList",pl="editor.findReplace-tool-title",dl="editor.findReplace-dialog-title",ul="editor.findReplace-tab-find",gl="editor.findReplace-tab-replace",hl="editor.findReplace-findWhat",ml="editor.findReplace-replaceWith",fl="editor.findReplace-replace",bl="editor.findReplace-replaceAll",vl="editor.findReplace-matchCase",yl="editor.findReplace-matchWord",wl="editor.findReplace-matchCyclic",Sl="editor.findReplace-useRegExp",Pl="editor.findReplace-prevMatch",xl="editor.findReplace-nextMatch",Nl="editor.findReplace-matches",Tl="editor.iframeTitle",Ll="editorTools.foreColorLabel",Al="editorTools.backColorLabel",Cl="editor.cellProperties",Il="editor.cellPropertiesLeftTop",Dl="editor.cellPropertiesCenterTop",Bl="editor.cellPropertiesRightTop",zl="editor.cellPropertiesLeftMiddle",Rl="editor.cellPropertiesCenterMiddle",Ml="editor.cellPropertiesRightMiddle",kl="editor.cellPropertiesLeftBottom",Hl="editor.cellPropertiesCenterBottom",Fl="editor.cellPropertiesRightBottom",Wl="editor.cellPropertiesNoAlignment",Kl="editor.cellPropertiesWrap",Ol="editor.cellPropertiesFitToCell",Vl="editor.cellPropertiesApplyToAllCells",Ul="editor.cellPropertiesWidth",_l="editor.cellPropertiesApplyToColumn",$l="editor.cellPropertiesHeight",El="editor.cellPropertiesApplyToRow",jl="editor.cellPropertiesAlignment",ql="editor.cellPropertiesTextControl",Gl="editor.cellPropertiesCellPadding",Jl="editor.cellPropertiesBackground",Ql="editor.cellPropertiesBorderWidth",Xl="editor.cellPropertiesBorderColor",Yl="editor.cellPropertiesBorderStyle",Zl="editor.cellPropertiesId",ea="editor.cellPropertiesCssClass",ta="editor.cellPropertiesSave",la="editor.cellPropertiesCancel",aa="editor.tableProperties",ra="editor.tablePropertiesAlignLeft",sa="editor.tablePropertiesAlignCenter",ia="editor.tablePropertiesAlignRight",na="editor.tablePropertiesNoAlignment",oa="editor.tablePropertiesLeft",ca="editor.tablePropertiesCenter",pa="editor.tablePropertiesRight",da="editor.tablePropertiesTop",ua="editor.tablePropertiesBottom",ga="editor.tablePropertiesNone",ha="editor.tablePropertiesUsingScopeAttribute",ma="editor.tablePropertiesUsingIdAttributes",fa="editor.tablePropertiesRows",ba="editor.tablePropertiesColumns",va="editor.tablePropertiesWidth",ya="editor.tablePropertiesHeight",wa="editor.tablePropertiesPosition",Sa="editor.tablePropertiesAlignment",Pa="editor.tablePropertiesCellSpacing",xa="editor.tablePropertiesCellPadding",Na="editor.tablePropertiesTableBackground",Ta="editor.tablePropertiesBorderWidth",La="editor.tablePropertiesBorderColor",Aa="editor.tablePropertiesBorderStyle",Ca="editor.tablePropertiesCollapseBorders",Ia="editor.tablePropertiesID",Da="editor.tablePropertiesCssClass",Ba="editor.tablePropertiesAccessibility",za="editor.tablePropertiesCaption",Ra="editor.tablePropertiesCaptionPosition",Ma="editor.tablePropertiesCaptionAlignment",ka="editor.tablePropertiesHeaderRows",Ha="editor.tablePropertiesHeaderCols",Fa="editor.tablePropertiesAssociateHeaders",Wa="editor.tablePropertiesGeneral",Ka="editor.tablePropertiesAdvanced",Oa="editor.tablePropertiesSave",Va="editor.tablePropertiesCancel",Ua="editor.borderStyleNone",_a="editor.borderStyleSolid",$a="editor.borderStyleDotted",Ea="editor.borderStyleDashed",ja="editor.borderStyleDouble",qa="editor.borderStyleGroove",Ga="editor.borderStyleRidge",Ja="editor.borderStyleInset",Qa="editor.borderStyleOutset",Xa="editor.borderStyleInitial",Ya="editor.borderStyleInherit",Za="editor.borderStyleHidden",er="editor.sizeAuto",g={[tt]:"Bold",[lt]:"Italic",[at]:"Underline",[rt]:"Strikethrough",[st]:"Subscript",[it]:"Superscript",[Qt]:"Remove hyperlink",[Xt]:"Undo",[Yt]:"Redo",[Zt]:"Font Size",[el]:"Font Name",[tl]:"Format",[ll]:"Align text left",[al]:"Align text right",[rl]:"Center text",[sl]:"Justify",[il]:"Indent",[nl]:"Outdent",[ol]:"Insert ordered list",[cl]:"Insert unordered list",[ct]:"Print",[pt]:"Select All",[dt]:"Clean formatting",[ut]:"Export as PDF",[gt]:"Color",[ht]:"Background color",[mt]:"Create a table",[ft]:"Create a {0} x {1} table",[bt]:"Add row above",[vt]:"Add row below",[yt]:"Add column on the left",[wt]:"Add column on the right",[St]:"Delete row",[Pt]:"Delete column",[xt]:"Delete table",[Nt]:"Merge cells",[Tt]:"Split cell",[nt]:"Insert hyperlink",[Lt]:"Insert hyperlink",[At]:"Web address",[Ct]:"Title",[It]:"Open link in new window",[Dt]:"Cancel",[Bt]:"Insert",[ot]:"Insert file",[zt]:"Insert file",[Rt]:"Web address",[Mt]:"Title",[kt]:"Cancel",[Ht]:"Insert",[Ft]:"Insert image",[Wt]:"Insert image",[Kt]:"Web address",[Ot]:"Title",[Vt]:"Alternate text",[Ut]:"Width (px)",[_t]:"Height (px)",[$t]:"Cancel",[Et]:"Insert",[jt]:"View HTML",[qt]:"View HTML",[Gt]:"Cancel",[Jt]:"Update",[pl]:"Find and Replace",[dl]:"Find and Replace",[ul]:"Find",[gl]:"Replace",[hl]:"Find What:",[ml]:"Replace With",[fl]:"Replace",[bl]:"Replace All",[vl]:"Match Case",[yl]:"Match whole word only",[wl]:"Match cyclic (Wrap around)",[Sl]:"Regular Expression",[Pl]:"Prev",[xl]:"Next",[Nl]:"{0} of {1} matches",[Tl]:"Editable area. Press Alt + F10 for toolbar.",[Ll]:"Fore Color",[Al]:"Back Color",[Cl]:"Cell properties",[Il]:"Left Top",[Dl]:"Center Top",[Bl]:"Right Top",[zl]:"Left Middle",[Rl]:"Center Middle",[Ml]:"Right Middle",[kl]:"Left Bottom",[Hl]:"Center Bottom",[Fl]:"Right Bottom",[Wl]:"No Alignment",[Kl]:"Wrap",[Ol]:"Fit to cell",[Vl]:"Apply to all cells",[Ul]:"Width",[_l]:"apply to column",[$l]:"Height",[El]:"apply to row",[jl]:"Alignment",[ql]:"Text control",[Gl]:"Cell padding",[Jl]:"Background",[Ql]:"Border width",[Xl]:"Border color",[Yl]:"Border style",[Zl]:"ID",[ea]:"CSS class",[ta]:"Save",[la]:"Cancel",[aa]:"Table properties",[ra]:"Align Left",[sa]:"Align Center",[ia]:"Align Right",[na]:"No Alignment",[oa]:"Left",[ca]:"Center",[pa]:"Right",[da]:"Top",[ua]:"Bottom",[ga]:"None",[ha]:"Using 'scope' attribute",[ma]:"Using 'id' attributes",[fa]:"Rows",[ba]:"Columns",[va]:"Width",[ya]:"Height",[wa]:"Position",[Sa]:"Alignment",[Pa]:"Cell spacing",[xa]:"Cell padding",[Na]:"Table background",[Ta]:"Border width",[La]:"Border color",[Aa]:"Border style",[Ca]:"Collapse borders",[Ia]:"ID",[Da]:"CSS class",[Ba]:"Accessibility",[za]:"Caption",[Ra]:"Position",[Ma]:"Alignment",[ka]:"Header rows",[Ha]:"Header cols",[Fa]:"Associate headers",[Wa]:"General",[Ka]:"Advanced",[Oa]:"Save",[Va]:"Cancel",[Ua]:"None",[_a]:"Solid",[$a]:"Dotted",[Ea]:"Dashed",[ja]:"Double",[qa]:"Groove",[Ga]:"Ridge",[Ja]:"Inset",[Qa]:"Outset",[Xa]:"Initial",[Ya]:"Inherit",[Za]:"Hidden",[er]:"Auto"},o={bold:tt,italic:lt,underline:at,strikethrough:rt,subscript:st,superscript:it,unlink:Qt,undo:Xt,redo:Yt,fontSize:Zt,fontName:el,format:tl,alignLeft:ll,alignRight:al,alignCenter:rl,alignJustify:sl,indent:il,outdent:nl,orderedList:ol,bulletList:cl,print:ct,selectAll:pt,cleanFormatting:dt,pdf:ut,foregroundColor:gt,backgroundColor:ht,createTable:mt,createTableHint:ft,addRowBefore:bt,addRowAfter:vt,addColumnBefore:yt,addColumnAfter:wt,deleteRow:St,deleteColumn:Pt,deleteTable:xt,mergeCells:Nt,splitCell:Tt,insertHyperlink:nt,insertHyperlinkDialogTitle:Lt,insertHyperlinkAddress:At,insertHyperlinkTitle:Ct,insertHyperlinkNewWindow:It,insertHyperlinkCancel:Dt,insertHyperlinkInsert:Bt,insertFile:ot,insertFileDialogTitle:zt,insertFileAddress:Rt,insertFileTitle:Mt,insertFileCancel:kt,insertFileInsert:Ht,insertImage:Ft,insertImageDialogTitle:Wt,insertImageAddress:Kt,insertImageTitle:Ot,insertImageAltText:Vt,insertImageWidth:Ut,insertImageHeight:_t,insertImageCancel:$t,insertImageInsert:Et,viewHtml:jt,viewHtmlDialogTitle:qt,viewHtmlCancel:Gt,viewHtmlUpdate:Jt,findReplaceToolTitle:pl,findReplaceDialogTitle:dl,findReplaceTabFind:ul,findReplaceTabReplace:gl,findReplaceFindWhat:hl,findReplaceReplaceWith:ml,findReplaceReplace:fl,findReplaceReplaceAll:bl,findReplaceMatchCase:vl,findReplaceMatchWord:yl,findReplaceMatchCyclic:wl,findReplaceUseRegExp:Sl,findReplacePrevMatch:Pl,findReplaceNextMatch:xl,findReplaceMatches:Nl,iframeTitle:Tl,foreColorLabel:Ll,backColorLabel:Al,cellProperties:Cl,cellPropertiesLeftTop:Il,cellPropertiesCenterTop:Dl,cellPropertiesRightTop:Bl,cellPropertiesLeftMiddle:zl,cellPropertiesCenterMiddle:Rl,cellPropertiesRightMiddle:Ml,cellPropertiesLeftBottom:kl,cellPropertiesCenterBottom:Hl,cellPropertiesRightBottom:Fl,cellPropertiesNoAlignment:Wl,cellPropertiesWrap:Kl,cellPropertiesFitToCell:Ol,cellPropertiesApplyToAllCells:Vl,cellPropertiesWidth:Ul,cellPropertiesApplyToColumn:_l,cellPropertiesHeight:$l,cellPropertiesApplyToRow:El,cellPropertiesAlignment:jl,cellPropertiesTextControl:ql,cellPropertiesCellPadding:Gl,cellPropertiesBackground:Jl,cellPropertiesBorderWidth:Ql,cellPropertiesBorderColor:Xl,cellPropertiesBorderStyle:Yl,cellPropertiesId:Zl,cellPropertiesCssClass:ea,cellPropertiesSave:ta,cellPropertiesCancel:la,tableProperties:aa,tablePropertiesAlignLeft:ra,tablePropertiesAlignCenter:sa,tablePropertiesAlignRight:ia,tablePropertiesNoAlignment:na,tablePropertiesLeft:oa,tablePropertiesCenter:ca,tablePropertiesRight:pa,tablePropertiesTop:da,tablePropertiesBottom:ua,tablePropertiesNone:ga,tablePropertiesUsingScopeAttribute:ha,tablePropertiesUsingIdAttributes:ma,tablePropertiesRows:fa,tablePropertiesColumns:ba,tablePropertiesWidth:va,tablePropertiesHeight:ya,tablePropertiesPosition:wa,tablePropertiesAlignment:Sa,tablePropertiesCellSpacing:Pa,tablePropertiesCellPadding:xa,tablePropertiesTableBackground:Na,tablePropertiesBorderWidth:Ta,tablePropertiesBorderColor:La,tablePropertiesBorderStyle:Aa,tablePropertiesCollapseBorders:Ca,tablePropertiesId:Ia,tablePropertiesCssClass:Da,tablePropertiesAccessibility:Ba,tablePropertiesCaption:za,tablePropertiesCaptionPosition:Ra,tablePropertiesCaptionAlignment:Ma,tablePropertiesHeaderRows:ka,tablePropertiesHeaderCols:Ha,tablePropertiesAssociateHeaders:Fa,tablePropertiesGeneral:Wa,tablePropertiesAdvanced:Ka,tablePropertiesSave:Oa,tablePropertiesCancel:Va,borderStyleNone:Ua,borderStyleSolid:_a,borderStyleDotted:$a,borderStyleDashed:Ea,borderStyleDouble:ja,borderStyleGroove:qa,borderStyleRidge:Ga,borderStyleInset:Ja,borderStyleOutset:Qa,borderStyleInitial:Xa,borderStyleInherit:Ya,borderStyleHidden:Za,sizeAuto:er},ge={...i.indentRules.listsTypes};y.EditorToolsSettings=void 0,(t=>{const e={type:"button"};t.bold={...i.bold,props:{icon:"bold",svgIcon:x.boldIcon,...e},messages:{title:o.bold},commandName:"Bold"},t.italic={...i.italic,props:{icon:"italic",svgIcon:x.italicIcon,...e},messages:{title:o.italic},commandName:"Italic"},t.underline={...i.underline,props:{icon:"underline",svgIcon:x.underlineIcon,...e},messages:{title:o.underline},commandName:"Underline"},t.strikethrough={...i.strikethrough,props:{icon:"strikethrough",svgIcon:x.strikethroughIcon,...e},messages:{title:o.strikethrough},commandName:"Strikethrough"},t.subscript={...i.subscript,props:{icon:"subscript",svgIcon:x.subscriptIcon,...e},messages:{title:o.subscript},commandName:"Subscript"},t.superscript={...i.superscript,props:{icon:"supscript",svgIcon:x.supscriptIcon,...e},messages:{title:o.superscript},commandName:"Superscript"},t.link={...i.link,props:{icon:"link",svgIcon:x.linkIcon,...e},messages:{insertHyperlink:o.insertHyperlink,insertHyperlinkDialogTitle:o.insertHyperlinkDialogTitle,insertHyperlinkAddress:o.insertHyperlinkAddress,insertHyperlinkTitle:o.insertHyperlinkTitle,insertHyperlinkNewWindow:o.insertHyperlinkNewWindow,insertHyperlinkCancel:o.insertHyperlinkCancel,insertHyperlinkInsert:o.insertHyperlinkInsert},commandName:"Link"},t.insertFile={...i.link,props:{icon:"file-add",svgIcon:x.fileAddIcon,...e},messages:{insertHyperlink:o.insertFile,insertHyperlinkDialogTitle:o.insertFileDialogTitle,insertHyperlinkAddress:o.insertFileAddress,insertHyperlinkTitle:o.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:o.insertFileCancel,insertHyperlinkInsert:o.insertFileInsert},commandName:"InsertFile",linkTarget:!1},t.insertTable={props:{icon:"table-add",svgIcon:x.tableAddIcon,...e},messages:{createTable:o.createTable,createTableHint:o.createTableHint},commandName:"InsertTable"},t.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:x.tableRowInsertAboveIcon,...e},messages:{title:o.addRowBefore},commandName:"AddRowBefore"},t.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:x.tableRowInsertBelowIcon,...e},messages:{title:o.addRowAfter},commandName:"AddRowAfter"},t.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:x.tableColumnInsertLeftIcon,...e},messages:{title:o.addColumnBefore},commandName:"AddColumnBefore"},t.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:x.tableColumnInsertRightIcon,...e},messages:{title:o.addColumnAfter},commandName:"AddColumnAfter"},t.deleteRow={props:{icon:"table-row-delete",svgIcon:x.tableRowDeleteIcon,...e},messages:{title:o.deleteRow},commandName:"DeleteRow"},t.deleteColumn={props:{icon:"table-column-delete",svgIcon:x.tableColumnDeleteIcon,...e},messages:{title:o.deleteColumn},commandName:"DeleteColumn"},t.deleteTable={props:{icon:"table-delete",svgIcon:x.tableDeleteIcon,...e},messages:{title:o.deleteTable},commandName:"DeleteTable"},t.mergeCells={props:{icon:"cells-merge",svgIcon:x.cellsMergeIcon,...e},messages:{title:o.mergeCells},commandName:"MergeCells"},t.splitCell={props:{icon:"cell-split-horizontally",svgIcon:x.cellSplitHorizontallyIcon,...e},messages:{title:o.splitCell},commandName:"SplitCell"},t.print={props:{icon:"print",svgIcon:x.printIcon,...e},messages:{title:o.print}},t.selectAll={props:{icon:"select-all",svgIcon:x.selectAllIcon,...e},messages:{title:o.selectAll}},t.pdf={props:{icon:"file-pdf",svgIcon:x.filePdfIcon,...e},messages:{title:o.pdf}},t.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},t.cleanFormatting={props:{icon:"clear-css",svgIcon:x.clearCssIcon,...e},messages:{title:o.cleanFormatting},commandName:"CleanFormatting"},t.image={node:"image",props:{icon:"image",svgIcon:x.imageIcon,...e},messages:{insertImage:o.insertImage,insertImageDialogTitle:o.insertImageDialogTitle,insertImageAddress:o.insertImageAddress,insertImageTitle:o.insertImageTitle,insertImageAltText:o.insertImageAltText,insertImageWidth:o.insertImageWidth,insertImageHeight:o.insertImageHeight,insertImageCancel:o.insertImageCancel,insertImageInsert:o.insertImageInsert},commandName:"InsertImage"},t.viewHtml={props:{icon:"code",svgIcon:x.codeIcon,...e},messages:{viewHtml:o.viewHtml,viewHtmlDialogTitle:o.viewHtmlDialogTitle,viewHtmlCancel:o.viewHtmlCancel,viewHtmlUpdate:o.viewHtmlUpdate},commandName:"SetContent"},t.findAndReplace={props:{icon:"find",svgIcon:x.binocularsIcon,...e},messages:{findReplaceToolTitle:o.findReplaceToolTitle,findReplaceDialogTitle:o.findReplaceDialogTitle,findReplaceTabFind:o.findReplaceTabFind,findReplaceTabReplace:o.findReplaceTabReplace,findReplaceFindWhat:o.findReplaceFindWhat,findReplaceReplaceWith:o.findReplaceReplaceWith,findReplaceReplace:o.findReplaceReplace,findReplaceReplaceAll:o.findReplaceReplaceAll,findReplaceMatchCase:o.findReplaceMatchCase,findReplaceMatchWord:o.findReplaceMatchWord,findReplaceMatchCyclic:o.findReplaceMatchCyclic,findReplaceUseRegExp:o.findReplaceUseRegExp,findReplacePrevMatch:o.findReplacePrevMatch,findReplaceNextMatch:o.findReplaceNextMatch,findReplaceMatches:o.findReplaceMatches}},t.unlink={...i.link,props:{icon:"unlink",svgIcon:x.unlinkIcon,...e},messages:{title:o.unlink},commandName:"Unlink"},t.undo={props:{icon:"undo",svgIcon:x.undoIcon,...e},messages:{title:o.undo},commandName:"Undo"},t.redo={props:{icon:"redo",svgIcon:x.redoIcon,...e},messages:{title:o.redo},commandName:"Redo"},t.fontSize={style:"font-size",defaultItem:{text:g[o.fontSize],value:"",localizationKey:o.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},t.fontName={style:"font-family",defaultItem:{text:g[o.fontName],value:"",localizationKey:o.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},t.formatBlock={defaultItem:{text:g[o.format],value:"",localizationKey:o.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},t.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:x.foregroundColorIcon,view:"palette",title:o.foregroundColor,ariaLabel:o.foreColorLabel},commandName:"ForeColor"},t.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:x.dropletIcon,view:"palette",title:o.backgroundColor,ariaLabel:o.backColorLabel},commandName:"BackColor"},t.alignLeft={actions:[...i.alignLeftRules],props:{icon:"align-left",svgIcon:x.alignLeftIcon,...e},messages:{title:o.alignLeft},commandName:"AlignLeft"},t.alignRight={actions:[...i.alignRightRules],props:{icon:"align-right",svgIcon:x.alignRightIcon,...e},messages:{title:o.alignRight},commandName:"AlignRight"},t.alignCenter={actions:[...i.alignCenterRules],props:{icon:"align-center",svgIcon:x.alignCenterIcon,...e},messages:{title:o.alignCenter},commandName:"AlignCenter"},t.alignJustify={actions:[...i.alignJustifyRules],props:{icon:"align-justify",svgIcon:x.alignJustifyIcon,...e},messages:{title:o.alignJustify},commandName:"AlignJustify"},t.alignRemove={actions:[...i.alignRemoveRules],props:{icon:"align-remove",svgIcon:x.alignRemoveIcon,...e},messages:{},commandName:"AlignRemove"},t.indent={actions:i.indentRules.nodes,listsTypes:ge,props:{icon:"indent",svgIcon:x.indentIcon,...e},messages:{title:o.indent},commandName:"Indent"},t.outdent={actions:i.outdentRules.nodes,listsTypes:ge,props:{icon:"outdent",svgIcon:x.outdentIcon,...e},messages:{title:o.outdent},commandName:"Outdent"},t.orderedList={listType:ge.orderedList,props:{icon:"list-ordered",svgIcon:x.listOrderedIcon,...e},messages:{title:o.orderedList},commandName:"OrderedList",types:{...ge}},t.bulletList={listType:ge.bulletList,props:{icon:"list-unordered",svgIcon:x.listUnorderedIcon,...e},messages:{title:o.bulletList},commandName:"UnorderedList",types:{...ge}}})(y.EditorToolsSettings||(y.EditorToolsSettings={}));let tr=class extends l.Component{constructor(){super(...arguments),this.href=null,this.title=null,this.target=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const e=this.props.view,a=this.props.settings.mark,s={href:this.href?this.href.value:void 0,title:this.title?this.title.value:void 0,target:this.target&&this.target.element&&this.target.element.checked?"_blank":void 0};i.applyLink({mark:a,attrs:s},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:a,dir:s,render:r}=this.props,n=A.provideLocalizationService(this),{insertHyperlinkDialogTitle:c,insertHyperlinkAddress:p,insertHyperlinkTitle:d,insertHyperlinkNewWindow:u,insertHyperlinkCancel:h,insertHyperlinkInsert:m}=a.messages,w=e?i.getMark(e.state,e.state.schema.marks[a.mark]):!1,f=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},n.toLanguageString(p,g[p])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-link-url",ref:T=>this.href=T,defaultValue:w&&w.attrs.href||void 0,autoFocus:!0}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},n.toLanguageString(d,g[d])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-link-text",ref:T=>this.title=T,defaultValue:w&&w.attrs.title||void 0}))),a.linkTarget!==!1&&l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},l.createElement(C.Checkbox,{id:"k-editor-link-target",ref:T=>this.target=T,defaultChecked:w&&!!w.attrs.target||void 0}),n.toLanguageString(u,g[u]))))}),b=[l.createElement(D.Button,{onClick:this.onClose,dir:s,key:"cancel"},n.toLanguageString(h,g[h])),l.createElement(D.Button,{onClick:this.onInsert,themeColor:"primary",dir:s,key:"insert"},n.toLanguageString(m,g[m]))],P=l.createElement(q.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:n.toLanguageString(c,g[c]),onClose:this.onClose,style:s==="rtl"?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},f,l.createElement(q.WindowActionsBar,null,...b));return r?r(P,{content:f,actionButtons:b}):P}};A.registerForLocalization(tr);let lr=class extends l.Component{constructor(){super(...arguments),this.src=null,this.altText=null,this.title=null,this.width=null,this.height=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const{view:e,settings:a}=this.props,r=e.state.schema.nodes[a.node],n={src:this.src?this.src.value:null,title:this.title?this.title.value:null,alt:this.altText?this.altText.value:null,width:this.width?this.width.value:null,height:this.height?this.height.value:null},c=Object.keys(n).filter(d=>n[d]!==null&&n[d]!=="").reduce((d,u)=>Object.assign(d,{[u]:n[u]}),{}),p=r.createAndFill(c);p&&i.insertNode(p,!0)(e.state,u=>e.dispatch(u.setMeta("commandName",a.commandName).setMeta("args",c))),this.onClose()}}render(){const{view:e,settings:a,dir:s,render:r}=this.props,{insertImageDialogTitle:n,insertImageAddress:c,insertImageTitle:p,insertImageAltText:d,insertImageWidth:u,insertImageHeight:h,insertImageCancel:m,insertImageInsert:w}=a.messages,f=A.provideLocalizationService(this),b=e&&e.state;let P={};b&&b.selection instanceof i.NodeSelection&&b.selection.node.type===b.schema.nodes[a.node]&&(P=b.selection.node.attrs);const T=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},f.toLanguageString(c,g[c])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-url",defaultValue:P.src,ref:k=>this.src=k,autoFocus:!0}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},f.toLanguageString(d,g[d])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-alt",defaultValue:P.alt,ref:k=>this.altText=k}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},f.toLanguageString(p,g[p])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-title",defaultValue:P.title,ref:k=>this.title=k}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},f.toLanguageString(u,g[u])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-width",defaultValue:P.width,ref:k=>this.width=k}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},f.toLanguageString(h,g[h])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{id:"k-editor-image-height",defaultValue:P.height,ref:k=>this.height=k}))))}),I=[l.createElement(D.Button,{onClick:this.onClose,dir:s,key:"cancel"},f.toLanguageString(m,g[m])),l.createElement(D.Button,{onClick:this.onInsert,themeColor:"primary",dir:s,key:"insert"},f.toLanguageString(w,g[w]))],B=l.createElement(q.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:f.toLanguageString(n,g[n]),onClose:this.onClose,key:"dialog",style:s==="rtl"?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},T,l.createElement(q.WindowActionsBar,null,...I));return r?r(B,{content:T,actionButtons:I}):B}};A.registerForLocalization(lr);const Be=new i.PluginKey("editor-props");let ar=class extends l.Component{constructor(){super(...arguments),this.htmlArea=null,this.textAreaRef=e=>{this.htmlArea=e;const a=e&&e.element.current;a&&(a.style.resize="none")},this.onUpdate=()=>{const{view:e,settings:a}=this.props,s=i.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:r}=Be.getState(e.state);i.setHtml(s,a.commandName,{preserveWhitespace:r})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:a,dir:s,render:r}=this.props,n=A.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:d}=a.messages,u=l.createElement(C.TextArea,{className:"k-editor-textarea",defaultValue:i.indentHtml(i.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),h=[l.createElement(D.Button,{onClick:this.onClose,dir:s,key:"cancel"},n.toLanguageString(p,g[p])),l.createElement(D.Button,{onClick:this.onUpdate,themeColor:"primary",dir:s,key:"update"},n.toLanguageString(d,g[d]))],m=l.createElement(q.Window,{className:"k-editor-window",title:n.toLanguageString(c,g[c]),onClose:this.onClose,key:"dialog",style:s==="rtl"?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!0,initialHeight:400,initialWidth:500},u,l.createElement(q.WindowActionsBar,null,...h));return r?r(m,{content:u,actionButtons:h}):m}};A.registerForLocalization(ar);const K={onMouseDown:t=>t.preventDefault(),onPointerDown:t=>t.preventDefault()},rr={userSelect:"none"},sr=function(t,...e){return e.forEach((a,s)=>{t=t.replace("{"+s+"}",String(a))}),t},ir=(t,e)=>e.dataItem.style?l.cloneElement(t,t.props,l.createElement("span",{style:e.dataItem.style},t.props.children)):t,ne=["px","em","%"],U={animate:{openDuration:150,closeDuration:150}},ze=[{textKey:o.borderStyleNone,text:g[o.borderStyleNone],value:"none"},{textKey:o.borderStyleSolid,text:g[o.borderStyleSolid],value:"solid"},{textKey:o.borderStyleDotted,text:g[o.borderStyleDotted],value:"dotted"},{textKey:o.borderStyleDashed,text:g[o.borderStyleDashed],value:"dashed"},{textKey:o.borderStyleDouble,text:g[o.borderStyleDouble],value:"double"},{textKey:o.borderStyleGroove,text:g[o.borderStyleGroove],value:"groove"},{textKey:o.borderStyleRidge,text:g[o.borderStyleRidge],value:"ridge"},{textKey:o.borderStyleInset,text:g[o.borderStyleInset],value:"inset"},{textKey:o.borderStyleOutset,text:g[o.borderStyleOutset],value:"outset"},{textKey:o.borderStyleInitial,text:g[o.borderStyleInitial],value:"initial"},{textKey:o.borderStyleInherit,text:g[o.borderStyleInherit],value:"inherit"},{textKey:o.borderStyleHidden,text:g[o.borderStyleHidden],value:"hidden"}];function _(t,e){for(let a=t.depth;a>0;a--){let s=t.node(a);if(e(s))return{node:s,depth:a}}return null}const $r=13,Er=27,jr=y.EditorToolsSettings.findAndReplace;let Ke=class extends l.Component{constructor(e){super(e),this.onTabSelect=a=>{this.setState({selectedTab:a.selected})},this.onClose=()=>{const a=this.props.view,s=a.state,r=s.tr.setSelection(i.TextSelection.create(s.doc,s.selection.from,s.selection.to));a.updateState(s.apply(r)),a.focus(),this.props.onClose.call(void 0)},this.matchesMessage=a=>{const s=this.state.matches,r=this.state.nextMatch;let n=0,c=0;if(s&&r){const p=s.findIndex(d=>d.eq(r));n=p===-1?s.length:p+1,c=s.length}return sr(a,n,c)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(a=!1)=>{const s=this.props.view,{searchText:r,matchCase:n,matchCyclic:c,matchWord:p,useRegExp:d}=this.state,u={text:r,matchWord:p,matchCase:n,useRegExp:d,backward:a,matchCyclic:c},h=i.find(s.state,u);if(h){const m=s.state.tr.setSelection(h);m.scrollIntoView(),s.updateState(s.state.apply(m)),this.setState({nextMatch:h})}},this.onReplace=()=>{const a=this.props.view,s=a.state.selection,{replaceText:r}=this.state;if(!s.empty){const n=s.from,c=n+r.length,p=i.replace(s,r,a.state.tr);p.setSelection(i.TextSelection.create(p.doc,n,c)),p.scrollIntoView(),a.dispatch(p),this.setNextState({})}},this.onReplaceAll=()=>{const a=this.props.view,{searchText:s,replaceText:r,matchCase:n,matchWord:c,useRegExp:p}=this.state,d={text:s,matchWord:c,matchCase:n,useRegExp:p},u=i.replaceAll(a.state,r,d);u&&a.dispatch(u),this.setNextState({})},this.onKeyDown=a=>{a.keyCode===$r?this.onFindNext():a.keyCode===Er&&this.onClose()},this.onMatchCaseChecked=a=>this.setNextState({matchCase:a.value}),this.onMatchWordChecked=a=>this.setNextState({matchWord:a.value}),this.onMatchCyclicChecked=a=>this.setNextState({matchCyclic:a.value}),this.onUseRegExpChecked=a=>this.setNextState({useRegExp:a.value}),this.onSearchChange=a=>this.setNextState({searchText:a.target.value}),this.onReplaceChange=a=>this.setNextState({replaceText:a.target.value}),this.setNextState=a=>{const s={...this.state,...a,matches:void 0,nextMatch:void 0},r=this.props.view;if(s.searchText){const{searchText:n,matchWord:c,matchCase:p,useRegExp:d,matchCyclic:u}=s,h={text:n,matchWord:c,matchCase:p,useRegExp:d},m=r.state.selection,w=i.findAll(r.state.doc,h);let f=!this.state.searchText&&w[0]||w.find(b=>b.from>=m.from)||u&&w[0]||void 0;this.setState({...s,matches:w,nextMatch:f})}else this.setState(s)},this.state={selectedTab:0,searchText:i.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||jr}componentDidUpdate(e,a){const s=this.props.view,{matches:r=[],nextMatch:n}=this.state;if(a.nextMatch!==n){const c=s.state,p=c.tr,d=[];r.forEach(u=>{d.push({from:u.from,to:u.to,attrs:{class:n&&u.eq(n)?"k-text-selected":"k-text-highlighted"}})}),p.setMeta(i.textHighlightKey,d),p.setSelection(n||i.TextSelection.create(c.doc,c.selection.from)),s.dispatch(p)}}render(){const e=A.provideLocalizationService(this),{findReplaceDialogTitle:a,findReplaceTabFind:s,findReplaceTabReplace:r,findReplaceFindWhat:n,findReplaceReplaceWith:c,findReplaceReplace:p,findReplaceReplaceAll:d,findReplaceMatchCase:u,findReplaceMatchWord:h,findReplaceMatchCyclic:m,findReplaceUseRegExp:w,findReplacePrevMatch:f,findReplaceNextMatch:b,findReplaceMatches:P}=this.settings.messages,{matchCase:T,matchWord:I,matchCyclic:B,useRegExp:k,searchText:H,replaceText:$,nextMatch:Q}=this.state,E=l.createElement("div",{className:"k-search-options"},l.createElement("span",null,l.createElement(C.Checkbox,{id:"match-case",checked:T,onChange:this.onMatchCaseChecked}),l.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(u,g[u]))),l.createElement("span",null,l.createElement(C.Checkbox,{id:"match-whole",checked:I,onChange:this.onMatchWordChecked}),l.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(h,g[h]))),l.createElement("span",null,l.createElement(C.Checkbox,{id:"match-cyclic",checked:B,onChange:this.onMatchCyclicChecked}),l.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(m,g[m]))),l.createElement("span",null,l.createElement(C.Checkbox,{id:"regular-expression",checked:k,onChange:this.onUseRegExpChecked}),l.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(w,g[w])))),X=l.createElement("div",{className:"k-matches-container"},l.createElement(D.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},l.createElement(F.IconWrap,{name:"chevron-left",icon:x.chevronLeftIcon}),e.toLanguageString(f,g[f])),l.createElement("span",null,this.matchesMessage(e.toLanguageString(P,g[P]))),l.createElement(D.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(b,g[b]),l.createElement(F.IconWrap,{name:"chevron-right",icon:x.chevronRightIcon}))),j=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(n,g[n])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{id:"findWhat",type:"text",value:H,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))))}),Y=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(c,g[c])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{id:"replaceWith",type:"text",value:$,onChange:this.onReplaceChange}))))});return l.createElement(q.Window,{title:e.toLanguageString(a,g[a]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},l.createElement(Le.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},l.createElement(Le.TabStripTab,{title:e.toLanguageString(s,g[s])},j,E,X),l.createElement(Le.TabStripTab,{title:e.toLanguageString(r,g[r])},j,Y,l.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},l.createElement(D.Button,{disabled:!Q,onClick:this.onReplace},e.toLanguageString(p,g[p])),l.createElement(D.Button,{disabled:!Q,onClick:this.onReplaceAll},e.toLanguageString(d,g[d]))),E,X)))}};A.registerForLocalization(Ke),y.EditorDialogs=void 0,(t=>{class e extends tr{}t.InsertLinkDialog=e;class a extends lr{}t.InsertImageDialog=a;class s extends ar{}t.ViewHtmlDialog=s;class r extends Ke{}t.FindAndReplaceDialog=r})(y.EditorDialogs||(y.EditorDialogs={}));const{bold:qr,underline:Gr,italic:Jr}=y.EditorToolsSettings,nr=typeof navigator<"u"?/Mac/.test(navigator.platform):!1,Qr=t=>{const e=i.chainCommands(i.exitCode,(n,c)=>{const p=t&&t.types&&t.types.hardBreak||"hard_break",d=n.schema.nodes[p];return c&&c(n.tr.replaceSelectionWith(d.create()).scrollIntoView()),!0}),a=t&&t.types&&t.types.listItem||"list_item",s=t&&t.toolsSettings||{};return{"Mod-b":(n,c)=>i.toggleInlineFormat(s.bold||qr)(n,c),"Mod-i":(n,c)=>i.toggleInlineFormat(s.italic||Jr)(n,c),"Mod-u":(n,c)=>i.toggleInlineFormat(s.underline||Gr)(n,c),"Mod-z":i.undo,"Shift-Mod-z":i.redo,...nr?{}:{"Mod-y":i.redo},Backspace:i.undoInputRule,"Mod-Enter":e,"Shift-Enter":e,...nr?{"Ctrl-Enter":e}:{},Enter:(n,c)=>i.splitListItem(n.schema.nodes[a])(n,c),Tab:i.goToNextCell(1),"Shift-Tab":i.goToNextCell(-1)}};y.EditorUtils=void 0,(t=>{function e(S,L,z){return!!i.alignBlocks(L,z)(S.state,S.dispatch)}t.alignBlocks=e;function a(S,L,z){return i.applyInlineStyle(L,z)(S.state,S.dispatch)}t.applyInlineStyle=a;function s(S,L,z){return i.applyLink(L,z)(S.state,S.dispatch)}t.applyLink=s;function r(S,L){return i.canIndentAsListItem(S,L)}t.canIndentList=r;function n(S,L){return i.canInsert(S,L)}t.canInsert=n;function c(S,L){return i.canOutdentAsListItem(S,{listsTypes:L,nodes:[]})}t.canOutdentList=c;function p(S){return i.convertMsLists(S)}t.convertMsLists=p;function d(S,L,z){return i.parseContent(i.trimWhitespace(L),S,z!==void 0?z:{preserveWhitespace:"full"})}t.createDocument=d;function u(S,L,z){return i.createTable(S,L,z)}t.createTable=u;function h(S,L,z){return i.formatBlockElements(L,z)(S.state,S.dispatch)}t.formatBlockElements=h;function m(S){return i.getBlockFormats(S)}t.getBlockFormats=m;function w(S){return i.getHtml(S)}t.getHtml=w;function f(S,L){return i.getInlineStyles(S,L)}t.getInlineStyles=f;function b(S,L){return i.getMark(S,L)}t.getMark=b;function P(S,L){return i.hasMark(S,L)}t.hasMark=P;function T(S,L){return i.hasNode(S,L)}t.hasNode=T;function I(S,L,z,V){return!!i.indentBlocks(L,z,V)(S.state,S.dispatch)}t.indentBlocks=I;function B(S){return i.indentHtml(S)}t.indentHtml=B;function k(S,L,z){i.insertNode(L,z)(S.state,S.dispatch)}t.insertNode=k;function H(S,L){return i.isAligned(S,L)}t.isAligned=H;function $(S,L,z){return i.isIndented(S,L,z)}t.isIndented=$;function Q(S){return i.removeComments(S)}t.removeComments=Q;function E(S,L){return i.removeTag(S,L)}t.removeTag=E;function X(S,L){return i.pasteCleanup(S,L)}t.pasteCleanup=X;function j(S){i.sanitizeClassAttr(S)}t.sanitizeClassAttr=j;function Y(S){i.sanitizeStyleAttr(S)}t.sanitizeStyleAttr=Y;function Z(S){i.removeAttribute(S)}t.removeAttribute=Z;function re(S){return i.sanitize(S)}t.sanitize=re;function te(S,L){return i.replaceImageSourcesFromRtf(S,L)}t.replaceImageSourcesFromRtf=te;function he(S){return i.textHighlight(S)}t.textHighlight=he;function me(S){return i.imageResizing(S)}t.imageResizing=me;function se(){return i.tableResizing()}t.tableResizing=se;function fe(S,L,z,V){const le=i.trimWhitespace(L);i.setHtml(le,z,V)(S.state,S.dispatch)}t.setHtml=fe;function N(S,L,z,V){return i.toggleInlineFormat(L,z,V)(S.state,S.dispatch)}t.toggleInlineFormat=N;function ee(S,L,z){return i.toggleList(S.state,S.dispatch,S,L,z)}t.toggleList=ee;function ie(S){return Qr(S)}t.getShortcuts=ie,t.propsKey=Be,t.imageResizeKey=i.imageResizeKey,t.marks={...i.marks},t.nodes={...i.nodes}})(y.EditorUtils||(y.EditorUtils={}));const Re=(t,e)=>{const a=e.tr||t.state.tr.setSelection(new i.AllSelection(t.state.doc)).replaceSelectionWith(e.doc||y.EditorUtils.createDocument(t.state.schema,e.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(a))},Xr=(t,e,a,s,r)=>{typeof e=="string"?s&&e===r?Re(t,{tr:s}):e!==a&&Re(t,{html:e}):s&&e.eq(s.doc)?Re(t,{tr:s}):t.state.doc.eq(e)||Re(t,{doc:e})},or=typeof window<"u"&&/Firefox/.test(window.navigator.userAgent),cr={name:"@progress/kendo-react-editor",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},{link:pr,bold:Yr,italic:Zr,underline:es}=y.EditorToolsSettings;class Oe extends l.Component{constructor(e){super(e),this.state={view:void 0,linkDialog:!1},this._element=null,this._contentElement=null,this.iframe=null,this.trOnChange=null,this.htmlOnChange=null,this.showLicenseWatermark=!1,this.focus=()=>{this.view&&this.view.focus()},this.renderDialog=(a,s,r)=>this.state[r]&&l.createElement(a,{view:this.view,settings:s,dir:this.props.dir,onClose:()=>this.setState({[r]:!1})}),this.renderTool=(a,s)=>{const r=l.createElement(a,{view:this.view,dir:this.props.dir,key:s});return r.type===D.ToolbarSeparator?l.createElement(a,{key:s}):r},this.updateTools=(a,s)=>{this.setState({view:a})},this.filterTransaction=(a,s)=>{const r={target:this,transaction:a,state:s};return(this.props.onExecute&&this.props.onExecute.call(void 0,r))!==!1},this.onPasteHtml=a=>{if(this.props.onPasteHtml&&this.pasteEvent){const s={target:this,pastedHtml:a,nativeEvent:this.pasteEvent},r=this.props.onPasteHtml.call(void 0,s);if(this.pasteEvent=void 0,typeof r=="string")return r}return a},this.dispatchTransaction=a=>{const s=a.docChanged;if(this.props.onChange&&s){this.trOnChange=a;const r=a.doc,n=a.doc.type.schema,c={target:this,value:r,html:"",transaction:a,schema:n};Object.defineProperty(c,"html",{get:()=>(this.htmlOnChange=y.EditorUtils.getHtml({doc:r,schema:n}),this.htmlOnChange)}),this.props.onChange.call(void 0,c)}this.view&&(this.props.value===void 0||!s)&&this.view.updateState(this.view.state.apply(a))},this.onFocus=(a,s)=>{if(this.props.onFocus){const r={target:this,nativeEvent:s};this.props.onFocus.call(void 0,r)}return!1},this.onBlur=(a,s)=>{if(this.props.onBlur){const r={target:this,nativeEvent:s};this.props.onBlur.call(void 0,r)}return!1},this.onPaste=(a,s)=>(this.props.onPasteHtml&&(this.pasteEvent=s),!1),F.validatePackage(cr),this.showLicenseWatermark=F.shouldShowValidationUI(cr)}get value(){return this.trOnChange!==null?this.trOnChange.doc:this.props.value!==void 0?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!or)&&this.initialize()}componentDidUpdate(e){const{value:a}=this.props,s=this.view;a===void 0||!s||(Xr(s,a,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){this.view&&this.view.destroy(),this._view=void 0;const e=this.iframe&&this.iframe.contentWindow;if(e){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const a=e.document.head;for(;a&&a.firstChild;)a.removeChild(a.firstChild)}}render(){const{tools:e=[],defaultEditMode:a="iframe",preserveWhitespace:s="full",style:r,className:n}=this.props,c=A.provideLocalizationService(this);if(this.view){const u=Be.getState(this.view.state);u.preserveWhitespace=s}let p=this.props.contentStyle;p===void 0&&(r||{}).height===void 0&&(p={height:"300px"});const d=e.map((u,h)=>Array.isArray(u)?l.createElement(D.ButtonGroup,{key:h},u.map(this.renderTool,h)):this.renderTool(u,h));return l.createElement("div",{ref:u=>this._element=u,className:F.classNames("k-editor",n,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:r},d.length>0&&l.createElement(D.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},d),a==="iframe"?l.createElement("div",{className:"k-editor-content"},l.createElement("iframe",{onLoad:or?()=>{this.initialize()}:void 0,ref:u=>this.iframe=u,frameBorder:"0",title:c.toLanguageString(o.iframeTitle,g[o.iframeTitle]),style:p,className:"k-iframe"})):l.createElement("div",{style:p,className:"k-editor-content"},l.createElement("div",{ref:u=>this._contentElement=u,suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(y.EditorDialogs.InsertLinkDialog,pr,"linkDialog"),this.showLicenseWatermark&&l.createElement(F.WatermarkOverlay,null))}initialize(){const e=this.iframe&&this.iframe.contentWindow;if(e){const f=e.document;[Vr,Ur,this.props.dir==="rtl"?_r:void 0].forEach(P=>{if(P){const T=f.createElement("style");T.appendChild(f.createTextNode(P)),f.head.appendChild(T)}});const b=f.createElement("meta");b.setAttribute("charset","utf-8"),f.head.appendChild(b),this._contentElement=f.createElement("div"),f.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content")}const a=this._contentElement;if(!a)return;const{preserveWhitespace:s="full"}=this.props;let r=[new i.Plugin({view:()=>({update:this.updateTools}),key:new i.PluginKey("toolbar-tools-update-plugin")}),new i.Plugin({filterTransaction:this.filterTransaction,key:new i.PluginKey("onExecute-event-plugin")}),new i.Plugin({key:Be,state:{init:()=>({preserveWhitespace:s}),apply:(f,b)=>b}}),i.spacesFix(),i.caretColor(),i.history(),i.dropCursor(),i.gapCursor(),i.tableEditing(),i.cspFix()],n={...y.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:Yr,italic:Zr,underline:es}}),"Mod-k":()=>{const{linkDialog:f}=this.state,b=this.view;if(b){const P=b.state,T=P.selection.empty,I=i.getMark(P,P.schema.marks[pr.mark]);!f&&!(T&&!I)&&this.setState({linkDialog:!0})}return!f},"Alt-F10":()=>{var b;const f=(b=this.element)==null?void 0:b.querySelector(".k-toolbar");if(f){const P=f.querySelector(D.toolbarButtons.join(","));if(P)return P.focus(),!0}return!1}};const{defaultContent:c="",value:p,onMount:d}=this.props,u=p&&typeof p!="string"?p:y.EditorUtils.createDocument(new i.Schema({nodes:i.nodes,marks:i.marks}),p||c,{preserveWhitespace:s}),h={state:i.EditorState.create({plugins:[...r,i.keymap(n),i.keymap(i.baseKeymap)],doc:u}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(f,b,P,T)=>{let I=!1;return P.content.nodesBetween(0,P.content.size,B=>{I=I||B.type.name==="table_caption_external"}),I}},m={plugins:r,shortcuts:n,target:this,viewProps:h,dom:a},w=this._view=d&&d.call(void 0,m)||new i.EditorView({mount:a},h);this.setState({view:w})}}Oe.propTypes={defaultContent:R.string,value:R.oneOfType([R.object,R.string]),defaultEditMode:R.oneOf(["iframe","div"]),contentStyle:R.object,dir:R.string,className:R.string,ariaDescribedBy:R.string,ariaLabelledBy:R.string,ariaLabel:R.string,style:R.object,tools:R.arrayOf(R.any),keyboardNavigation:R.bool,resizable:R.bool,preserveWhitespace:R.oneOf([!0,!1,"full"]),onMount:R.func,onFocus:R.func,onBlur:R.func,onChange:R.func,onPasteHtml:R.func,onExecute:R.func},A.registerForLocalization(Oe);const ts="k-ct-cell k-disabled",ls="k-selected";class as extends l.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,a,s){const r=Math.floor(e/this.props.columns),n=e%this.props.columns,c=n<=s&&r<=a;return l.createElement("span",{className:ts+(c?` ${ls}`:""),onMouseEnter:()=>this.setState({row:r,col:n}),onClick:()=>this.props.onCellClick.call(void 0,r,n),key:e})}render(){const e=[],a=this.props.columns*this.props.rows,{row:s,col:r}=this.state,{onDown:n}=this.props;let c=this.props.createTableMessage;r>-1&&(c=sr(this.props.createTableHintMessage,s+1,r+1));for(let p=0;p<a;p++)e.push(this.renderCell(p,s,r));return[l.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:n,onMouseDown:n},e),l.createElement("div",{className:"k-status",key:"status",onPointerDown:n,onMouseDown:n},c)]}}var Me;(t=>{const e=class extends l.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=s=>{const{anchor:r}=this.props;r&&(r===s.target||r.firstElementChild===s.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(s){s.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:s,anchor:r,dir:n,rows:c=e.defaultProps.rows,columns:p=e.defaultProps.columns}=this.props,d=n==="rtl"?"right":"left";return l.createElement(Wr.Popup,{anchor:r,anchorAlign:{horizontal:d,vertical:"bottom"},popupAlign:{horizontal:d,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:s,style:n==="rtl"?{direction:"rtl"}:void 0},l.createElement(as,{rows:c,columns:p,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};let a=e;a.propTypes={show:R.bool.isRequired,createTableMessage:R.string.isRequired,createTableHintMessage:R.string.isRequired,onClose:R.func.isRequired,onTableInsert:R.func.isRequired,anchor:R.any,rows:R.number,columns:R.number,dir:R.string},a.defaultProps={rows:6,columns:8},t.InsertTablePopup=a})(Me||(Me={}));var Ve;(t=>{t.createInsertTableTool=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(r,n)=>{const{view:c}=this.props;if(!c)return;const{table:p,table_row:d,table_cell:u}=c.state.schema.nodes,h=i.createTable({table:p,table_row:d,table_cell:u},r,n);h&&i.insertNode(h,!0)(c.state,c.dispatch),c.focus(),this.closePopup()}}render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,d=A.provideLocalizationService(this),{createTable:u,createTableHint:h}=e.messages,m=d.toLanguageString(u,g[u]),w=d.toLanguageString(h,g[h]),f=!!(!p||!i.canInsert(p,p.schema.nodes.table)||_(p.selection.$from,P=>P.type.name==="table_caption_external")),b=[l.createElement(D.Button,{onClick:f?void 0:this.togglePopup,"aria-disabled":f?!0:void 0,ref:P=>this.button=P&&P.element,key:"InsertTable",...K,title:m,...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":f})}),r&&!f&&l.createElement(Me.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:w,dir:c.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return n?n.call(void 0,b,{view:r}):b}};return A.registerForLocalization(a),a}})(Ve||(Ve={}));const{alignRemove:dr}=y.EditorToolsSettings,rs=t=>{const e=class extends l.Component{render(){const{view:s,render:r,...n}=this.props,c=s&&s.state,p=!!c&&i.isAligned(c,t.actions),d=p?dr.actions:t.actions,u=p?dr.commandName:t.commandName,h=A.provideLocalizationService(this),m=t.messages.title,w=l.createElement(D.Button,{onClick:()=>s&&i.alignBlocks(d,u)(s.state,s.dispatch),selected:p,togglable:!0,...K,title:h.toLanguageString(m,g[m]),...t.props,...n});return r?r.call(void 0,w,{view:s}):w}};return A.registerForLocalization(e),e};var Ue;(t=>{t.createStyleDropDownList=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.onChange=r=>{const n=r.target.value,{view:c}=this.props,{style:p}=e;if(c){i.applyInlineStyle({style:p,value:n.value},e.commandName)(c.state,c.dispatch);const{syntheticEvent:d}=r;d&&d.type==="click"&&c.focus()}}}render(){const{style:r}=e,{view:n,render:c,data:p,defaultItem:d,...u}=this.props,h=p||e.items;let m=d||e.defaultItem;const w=n?i.getInlineStyles(n.state,{name:r,value:/^.+$/}):[],f=A.provideLocalizationService(this);m&&m.localizationKey&&(m={...m},m.text=m.localizationKey?f.toLanguageString(m.localizationKey,g[m.localizationKey]):m.text);const b=new Set(w).size===1?w[0]:null,P=l.createElement(O.DropDownList,{value:b&&h.find(T=>T.value===b),data:h,defaultItem:m,itemRender:ir,textField:"text",dataItemKey:"value",onChange:this.onChange,style:rr,leftRightKeysNavigation:!1,title:m.text,...u});return c?c.call(void 0,P,{view:n}):P}};return A.registerForLocalization(a),a}})(Ue||(Ue={}));const ur=t=>{const{view:e,style:a,colorPickerProps:s,commandName:r}=t,n=s.title,c=s.ariaLabel,{view:p="palette"}=s,d=A.useLocalization(),u=l.useCallback(h=>{e&&(i.applyInlineStyle({style:a,value:h.value},r)(e.state,e.dispatch),p==="palette"&&e.focus())},[e,a,p,r]);return l.createElement(C.ColorPicker,{onChange:u,onActiveColorClick:u,...s,title:n&&d.toLanguageString(n,g[n]),ariaLabel:c&&d.toLanguageString(c,g[c])})};var _e;(t=>{t.createFormatBlockDropDownList=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.onChange=r=>{const n=r.target.value,{view:c}=this.props;if(c&&i.formatBlockElements(n.value,e.commandName)(c.state,c.dispatch)){const{syntheticEvent:p}=r;p&&p.type==="click"&&c.focus()}}}render(){const{view:r,render:n,data:c,defaultItem:p,...d}=this.props,u=c||e.items;let h=p||e.defaultItem;const m=r&&r.state,w=m?i.getBlockFormats(m):[],f=A.provideLocalizationService(this);h&&h.localizationKey&&(h={...h},h.text=h.localizationKey?f.toLanguageString(h.localizationKey,g[h.localizationKey]):h.text);const b=new Set(w).size===1?w[0]:null,P=l.createElement(O.DropDownList,{value:b&&u.find(T=>T.value===b),onChange:this.onChange,itemRender:ir,data:u,defaultItem:h,textField:"text",dataItemKey:"value",style:rr,leftRightKeysNavigation:!1,title:h.text,...d});return n?n.call(void 0,P,{view:r}):P}};return A.registerForLocalization(a),a}})(_e||(_e={}));const G=(t,e)=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=A.provideLocalizationService(this),d=t.messages.title,u=r&&r.state,h=u?!e(u):!1,m=l.createElement(D.Button,{onClick:h?void 0:()=>r&&e(r.state,w=>r.dispatch(w.setMeta("commandName",t.commandName))),"aria-disabled":h?!0:void 0,...K,title:p.toLanguageString(d,g[d]),...t.props,...c,className:F.classNames(c.className,t.props.className,{"k-disabled":h})});return n?n.call(void 0,m,{view:r}):m}};return A.registerForLocalization(a),a};var ke;(t=>{t.createUndoTool=e=>G(e,i.undo),t.createRedoTool=e=>G(e,i.redo)})(ke||(ke={}));var $e;(t=>{t.createIndentTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=c.dir,d=r&&r.state,u=d&&d.schema.nodes,h=u&&u[e.listsTypes.listItem],m=e.actions,w=!!d&&!!h&&(i.isIndented(d,m,p)||m.some(k=>u&&u[k.node]&&i.hasNode(d,u[k.node])))&&!i.hasNode(d,h),f=!!d&&i.canIndentAsListItem(d,h),b=w||f,P=A.provideLocalizationService(this),T=e.messages.title,I=!b,B=l.createElement(D.Button,{onClick:I?void 0:()=>{r&&f&&h?i.sinkListItem(h)(r.state,r.dispatch):r&&w&&i.indentBlocks(m,e.commandName,p)(r.state,r.dispatch)},"aria-disabled":I?!0:void 0,title:P.toLanguageString(T,g[T]),...K,...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":I})});return n?n.call(void 0,B,{view:r}):B}};return A.registerForLocalization(a),a}})($e||($e={}));var Ee;(t=>{t.createInlineFormatTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,{mark:d,altMarks:u,altStyle:h}=e,m={mark:d,altMarks:u,altStyle:h},w=A.provideLocalizationService(this),f=e.messages.title,b=l.createElement(D.Button,{onClick:()=>r&&i.toggleInlineFormat(m,p&&p.tr.setMeta("commandName",e.commandName))(r.state,r.dispatch),selected:!!p&&i.hasMark(p,m),togglable:!0,...K,title:w.toLanguageString(f,g[f]),...e.props,...c});return n?n.call(void 0,b,{view:r}):b}};return A.registerForLocalization(a),a}})(Ee||(Ee={}));const ss=t=>{const e=class extends l.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:s,render:r,...n}=this.props,c=s&&s.state,p=c?c.schema.nodes[t.node]:void 0,d=A.provideLocalizationService(this),{insertImage:u}=t.messages,h=!p||!c||!i.canInsert(c,p),m=[l.createElement(D.Button,{onClick:h?void 0:this.toggleDialog,"aria-disabled":h?!0:void 0,key:"insertImage",...K,title:d.toLanguageString(u,g[u]),...t.props,...n,className:F.classNames(n.className,t.props.className,{"k-disabled":h})}),this.state.openedDialog&&s&&l.createElement(y.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:s,settings:t,dir:n.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,m,{view:s}):m}};return A.registerForLocalization(e),e};var je;(t=>{t.createLinkTool=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,d=p?p.selection.empty:!0,u=p&&i.getMark(p,p.schema.marks[e.mark]),h=A.provideLocalizationService(this),{insertHyperlink:m}=e.messages,w=d&&!u,f=[l.createElement(D.Button,{onClick:w?void 0:this.toggleDialog,"aria-disabled":w?!0:void 0,key:"link",...K,title:h.toLanguageString(m,g[m]),...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":w})}),this.state.openedDialog&&r&&l.createElement(y.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:e,dir:c.dir,view:r,onClose:this.toggleDialog})||null];return n?n.call(void 0,f,{view:r}):f}};return A.registerForLocalization(a),a}})(je||(je={}));var qe;(t=>{t.createListTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props;let p=!1;const d=A.provideLocalizationService(this),u=e.messages.title,h=e.types,m=e.listType;if(r){const f=r.state,b=f.schema.nodes,P=i.hasNode(f,b[h.orderedList]),T=i.hasNode(f,b[h.bulletList]);m===h.orderedList?p=P&&!T:p=!P&&T}const w=l.createElement(D.Button,{onClick:()=>r&&i.toggleList(r.state,r.dispatch,r,{listType:m,...h},e.commandName),togglable:!0,selected:p,title:d.toLanguageString(u,g[u]),...K,...e.props,...c});return n?n.call(void 0,w,{view:r}):w}};return A.registerForLocalization(a),a}})(qe||(qe={}));var Ge;(t=>{t.createOutdentTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,d=c.dir,u=!!p&&i.isIndented(p,e.actions,d),h=p&&p.schema.nodes[e.listsTypes.listItem],m=!!p&&i.canOutdentAsListItem(p,{nodes:e.actions,listsTypes:e.listsTypes}),w=u||m,f=A.provideLocalizationService(this),b=e.messages.title,P=!w,T=l.createElement(D.Button,{onClick:P?void 0:()=>{r&&m&&h?i.liftListItem(h)(r.state,r.dispatch):r&&u&&i.indentBlocks(e.actions,e.commandName,d)(r.state,r.dispatch)},"aria-disabled":P?!0:void 0,title:f.toLanguageString(b,g[b]),...K,...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":P})});return n?n.call(void 0,T,{view:r}):T}};return A.registerForLocalization(a),a}})(Ge||(Ge={}));const gr=(t,e)=>{const a=i.deleteColumn(t,e);if(a&&!e){const s=i.selectionCell(t),r=s&&s.node(s.depth);if(r&&r.content.childCount===1)return!1}return a},hr=(t,e)=>{const a=i.deleteRow(t,e);if(a&&!e){const s=i.selectionCell(t),r=s&&s.node(s.depth-1);if(r&&r.content.childCount===1)return!1}return a};var J;(t=>{t.createAddRowBeforeTool=e=>G(e,i.addRowBefore),t.createAddRowAfterTool=e=>G(e,i.addRowAfter),t.createAddColumnBeforeTool=e=>G(e,i.addColumnBefore),t.createAddColumnAfterTool=e=>G(e,i.addColumnAfter),t.createDeleteRowTool=e=>G(e,hr),t.createDeleteColumnTool=e=>G(e,gr),t.createDeleteTableTool=e=>G(e,i.deleteTable),t.createMergeCellsTool=e=>G(e,i.mergeCells),t.createSplitCellTool=e=>G(e,i.splitCell)})(J||(J={}));var Je;(t=>{t.createUnlinkTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p={mark:e.mark},d=r?i.hasMark(r.state,p):!1,u=A.provideLocalizationService(this),h=e.messages.title,m=!d,w=l.createElement(D.Button,{onClick:m?void 0:()=>r&&i.removeLink(p,r.state.tr.setMeta("commandName",e.commandName))(r.state,r.dispatch),"aria-disabled":m?!0:void 0,...K,title:u.toLanguageString(h,g[h]),...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":m})});return n?n.call(void 0,w,{view:r}):w}};return A.registerForLocalization(a),a}})(Je||(Je={}));var Qe;(t=>{t.createViewHtmlTool=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:r,render:n,...c}=this.props,p=A.provideLocalizationService(this),d=e.messages.viewHtml,u=[l.createElement(D.Button,{onClick:this.toggleDialog,key:"viewHtml",...K,title:p.toLanguageString(d,g[d]),...e.props,...c}),this.state.openedDialog&&r&&l.createElement(y.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:r,settings:e,dir:c.dir,onClose:this.toggleDialog})||null];return n?n.call(void 0,u,{view:r}):u}};return A.registerForLocalization(a),a}})(Qe||(Qe={}));const{print:is}=y.EditorToolsSettings,ns=t=>{const{view:e,render:a,settings:s=is,...r}=t,n=e&&e.dom,c=n&&n.ownerDocument,p=c&&c.defaultView,d=s.messages.title,u=!p||p===window,h=l.useCallback(()=>{p&&p.print()},[p]),m=l.createElement(D.Button,{onClick:u?void 0:h,"aria-disabled":u?!0:void 0,title:A.useLocalization().toLanguageString(d,g[d]),...K,...s.props,...r,className:F.classNames(r.className,s.props.className,{"k-disabled":u})});return a?a.call(void 0,m,{view:e}):m},{pdf:os,savePdfOptions:cs}=y.EditorToolsSettings,ps=t=>{const{view:e,render:a,settings:s=os,savePdfOptions:r,savePdfCallback:n,...c}=t,p=s.messages.title,d=l.useCallback(()=>{e&&Kr.savePDF(e.dom,{...cs,...r||{}},n)},[e,r,n]),u=l.createElement(D.Button,{onClick:d,title:A.useLocalization().toLanguageString(p,g[p]),...K,...s.props,...c});return a?a.call(void 0,u,{view:e}):u},{selectAll:ds}=y.EditorToolsSettings,us=t=>{const{view:e,render:a,settings:s=ds,...r}=t,n=s.messages.title,c=l.useCallback(()=>{e&&(i.selectAll(e.state,e.dispatch),e.focus())},[e]),p=l.createElement(D.Button,{onClick:c,title:A.useLocalization().toLanguageString(n,g[n]),...K,...s.props,...r});return a?a.call(void 0,p,{view:e}):p},{cleanFormatting:gs}=y.EditorToolsSettings,mr=i.cleanFormatting(),hs=t=>{const{view:e,render:a,settings:s=gs,...r}=t,n=s.messages.title,c=!e||!mr(e.state),p=l.useCallback(()=>{e&&mr(e.state,u=>{u.setMeta("commandName",s.commandName),e.dispatch(u)})},[e]),d=l.createElement(D.Button,{onClick:c?void 0:p,"aria-disabled":c?!0:void 0,title:A.useLocalization().toLanguageString(n,g[n]),...K,...s.props,...r,className:F.classNames(t.className,s.props.className,{"k-disabled":c})});return a?a.call(void 0,d,{view:e}):d},fr=y.EditorToolsSettings.findAndReplace;let br=class extends l.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...a}=this.props,{props:s}=fr,r=A.provideLocalizationService(this),n=fr.messages.findReplaceToolTitle,c=!e;return[l.createElement(D.Button,{onClick:c?void 0:this.onOpen,"aria-disabled":c?!0:void 0,...K,title:r.toLanguageString(n,g[n]),key:"tool",...s,...a,className:F.classNames(a.className,s.className,{"k-disabled":c})}),this.state.showDialog&&e&&l.createElement(Ke,{view:e,onClose:this.onClose,dir:a.dir,key:"dialog"})]}};A.registerForLocalization(br);const vr=(t,e)=>{let{from:a,to:s}=t.selection,r=null;return t.doc.nodesBetween(a,s,n=>(r=r||(n.type===e?n:null),!r)),r},yr=t=>{let e=!1;const a=t.view,s=ge,r=t.listType,n=A.useLocalization();let c=[...t.items||[]],p,d;if(a){const m=a.state,w=m&&m.schema.nodes;p=w&&vr(m,w[s.orderedList]),d=w&&vr(m,w[s.bulletList]),e=!!(r===s.orderedList?p&&!d:!p&&d)}const u=m=>{a&&(i.toggleList(a.state,a.dispatch,a,{listType:r,...s,listAttrs:{}},"InsertList"),a.focus())},h=m=>{if(a){const w=m.item.style?{style:"list-style-type: "+m.item.style+";"}:{},f=p||d;if(f&&i.listStyle(f.attrs)!==m.item.style){const b=a.state.selection.$head.posAtIndex(0,-2)-1;a.dispatch(a.state.tr.setNodeMarkup(b,a.state.schema.nodes[r],w))}else i.toggleList(a.state,a.dispatch,a,{listType:r,...s,listAttrs:w},"InsertList");a.focus()}};if(e&&(p||d)){const m=i.listStyle((p||d).attrs);c=c.map((w,f)=>({...w,selected:m?w.style===m:f===0}))}return l.createElement("span",{onMouseDown:m=>{m.preventDefault()}},l.createElement(D.SplitButton,{textField:"text",items:c,icon:t.icon,svgIcon:t.svgIcon,onButtonClick:u,onItemClick:h,buttonClass:e?"k-selected":void 0,title:t.title!==void 0?t.title:n.toLanguageString(t.titleKey,g[t.titleKey])}))},ms=/[\D]+$/,Xe=t=>{const e=t.match(ms);return e?e[0]:""},Ye=(t,e)=>{var s;const a=ae(((s=t.attrs)==null?void 0:s.style)||"")[e]||"";return{[e]:parseFloat(a)||null,[e+"Unit"]:Xe(a)}},ae=t=>(t||"").split(/\s*;\s*/).filter(Boolean).map(a=>{const s=a.split(/\s*:\s*/);return{[s[0]]:s[1]}}).reduce((a,s)=>({...a,...s}),{}),fs=(t,e)=>{const a=e.style,s=e.value,r=e.newValue;if(!t)return{changed:!1,style:null};const n=t.split(/\s*;\s*/).filter(p=>!!p),c=n.filter(p=>{const d=p.split(/\s*:\s*/);return!(d[0].toLowerCase()===a&&s.test(d[1]))});return r&&c.push(`${a}: ${r}`),{style:c.join("; ")+(c.length?";":""),changed:!!r||c.length!==n.length}},bs=/^.+$/;function M(t,e,a){let s;if(new RegExp("[^-]?"+e+":").test(t.style||"")){const{style:r}=fs(t.style||"",{style:e,value:bs,newValue:a});s={...t,style:r}}else if(t.style){const r=ae(t.style);r[e]=a,s={...t,style:Object.keys(r).filter(n=>!!r[n]).reduce((n,c)=>n+c+": "+r[c]+"; ","").trim()}}else a?s={...t,style:e+": "+a+";"}:s={...t};return s}const vs=t=>{const{doc:e,selection:a}=t,s=[];return a.ranges.forEach(r=>{const n=r.$from.pos,c=r.$to.pos;e.nodesBetween(n,c,(p,d,u,h)=>{(p.type.name==="table_cell"||p.type.name==="table_header")&&s.push({node:p,pos:d})})}),s},He=t=>{const e=_(t.selection.$from,s=>s.type.name==="table"),a=_(t.selection.$to,s=>s.type.name==="table");return e&&a&&e.depth===a.depth&&e.node.eq(a.node)?vs(t).filter(({pos:r})=>{const n=_(t.doc.resolve(r),c=>c.type.name==="table");return n&&n.depth===e.depth&&e.node.eq(n.node)}):[]},wr=t=>{const e=[];if(He(t).length){const a=t.selection.$from,s=_(a,d=>d.type.spec.tableRole==="table");if(s===null)return e;const r=a.start(s.depth),n=s.node,c=i.TableMap.get(n),p=t.doc;c.map.forEach(d=>{const u=d+r;e.push({pos:u,node:p.nodeAt(u)})})}return e},Ae="k-colgroup-data",ys=(t,e,a)=>{const s={cellWidth:null,widthUnit:""},r=e.node,n=a.start(e.depth);if(!r.attrs[Ae])return s;const c=new Set;let p="";const d=i.htmlToFragment(r.attrs[Ae]).firstChild;return t.forEach(u=>{const h=r.resolve(u.pos-n),m=h.parent,w=h.index();let f=0;for(let P=0;P<=w;P++)f+=m.child(P).attrs.colspan;let b=d.children[f-1];b&&(p=b.style.width,c.add(p))}),c.size===1&&p&&(s.cellWidth=parseFloat(p)||null,s.widthUnit=Xe(p)),s},ws=(t,e,a)=>{const s={cellHeight:null,heightUnit:""},r=e.node,n=a.start(e.depth),c=new Set;let p="";return t.forEach(d=>{var m;const h=r.resolve(d.pos-n).parent;p=ae(((m=h.attrs)==null?void 0:m.style)||"").height||"",c.add(p)}),c.size===1&&p&&(s.cellHeight=parseFloat(p)||null,s.heightUnit=Xe(p)),s},oe=(t,e)=>{const a=new Set;let s="";return t.forEach(r=>{var n;s=ae(((n=r.node.attrs)==null?void 0:n.style)||"")[e]||"",a.add(s)}),a.size===1&&s?s:""},Sr=(t,e)=>{const a=new Set;let s="";return t.forEach(r=>{s=(r.node.attrs||{})[e]||"",a.add(s)}),a.size===1&&s?s:""},Pr={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},Ss=t=>{const e=He(t),a=t.selection.$from,s=e.length?_(a,r=>r.type.spec.tableRole==="table"):null;return s?{...Pr,...ys(e,s,a),...ws(e,s,a),alignment:{x:oe(e,"text-align"),y:oe(e,"vertical-align")},textControl:oe(e,"white-space"),backgroundColor:oe(e,"background-color")||void 0,cellPadding:parseFloat(oe(e,"padding"))||null,borderWidth:parseFloat(oe(e,"border-width"))||null,borderColor:oe(e,"border-color")||void 0,borderStyle:oe(e,"border-style")||null,id:Sr(e,"id"),className:Sr(e,"class")}:Pr},Ps=(t,e,a)=>{const s=t.doc.resolve(e),r=s.parent,n=s.index();let c=0;for(let m=0;m<=n;m++)c+=r.child(m).attrs.colspan;const p=s.node(s.depth-1),d=s.posAtIndex(0,s.depth-1)-1;let u=p.attrs,h;if(u&&u[Ae]){const m=i.htmlToFragment(u[Ae]).firstChild;h=m.children[c-1],h.style.width=a,u={...u,[Ae]:m.outerHTML},t.setNodeMarkup(d,null,u)}else{let m=0;for(let b=0;b<r.childCount;b++)m+=r.child(b).attrs.colspan;const w=document.createElement("colgroup"),f=new Array(m);for(let b=0;b<m;b++)f[b]=document.createElement("col"),w.appendChild(f[b]);h=f[n],h.style.width=a,u={...u,[Ae]:"<colgroup>"+f.reduce((b,P)=>b+P.outerHTML,"")+"</colgroup>"},t.setNodeMarkup(d,null,u)}},xs=(t,e,a)=>{let s=t.doc.resolve(e),r=s.parent;const n=s.posAtIndex(0)-1;t.setNodeMarkup(n,null,M(r.attrs,"height",a))},Ns=(t,e,a)=>{a.forEach(({node:s,pos:r})=>{let n={...s.attrs};n=M(n,"border-color",e.borderColor||""),n=M(n,"border-style",e.borderStyle||""),n=M(n,"border-width",typeof e.borderWidth=="number"?e.borderWidth+"px":""),n=M(n,"padding",typeof e.cellPadding=="number"?e.cellPadding+"px":""),n=M(n,"background-color",e.backgroundColor||""),n=M(n,"text-align",e.alignment.x||""),n=M(n,"vertical-align",e.alignment.y||""),n=M(n,"white-space",e.textControl||""),n.id=e.id||null,n.class=e.className||null,t.setNodeMarkup(r,null,n),typeof e.cellWidth=="number"&&Ps(t,r,e.cellWidth+(e.widthUnit||"px")),typeof e.cellHeight=="number"&&xs(t,r,e.cellHeight+(e.heightUnit||"px"))})},Ts=(t,e)=>{const a=t.tr,s=e.applyToAll?wr(t):He(t);return Ns(a,e,s),a},Ls=t=>{const{view:e,...a}=t,[s,r]=l.useState(!1),n=A.useLocalization(),c=!!(e&&_(e.state.selection.$from,h=>h.type.spec.tableRole==="table")),p=l.useCallback(()=>{r(!0)},[]),d=l.useCallback(()=>{r(!1),e==null||e.focus()},[e]),u=l.useCallback(h=>{if(e&&h){const m=Ts(e.state,h);m.docChanged&&e.dispatch(m)}d()},[e,d]);return l.createElement(l.Fragment,null,l.createElement(D.Button,{type:"button",title:n.toLanguageString(o.cellProperties,g[o.cellProperties]),icon:"table-cell-properties",svgIcon:x.tableCellPropertiesIcon,onClick:p,disabled:!c,...K,...a}),s&&e&&l.createElement(As,{view:e,onCancel:d,onSave:u}))},xr=[{textKey:o.cellPropertiesLeftTop,text:g[o.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:x.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:o.cellPropertiesCenterTop,text:g[o.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:x.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:o.cellPropertiesRightTop,text:g[o.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:x.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:o.cellPropertiesLeftMiddle,text:g[o.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:x.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:o.cellPropertiesCenterMiddle,text:g[o.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:x.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:o.cellPropertiesRightMiddle,text:g[o.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:x.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:o.cellPropertiesLeftBottom,text:g[o.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:x.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:o.cellPropertiesCenterBottom,text:g[o.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:x.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:o.cellPropertiesRightBottom,text:g[o.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:x.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:o.cellPropertiesNoAlignment,text:g[o.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:x.tableAlignRemoveIcon,value:{x:"",y:""}}],Nr=[{textKey:o.cellPropertiesWrap,text:g[o.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:x.textWrapIcon},{textKey:o.cellPropertiesFitToCell,text:g[o.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:x.parameterStringIcon}],Ce=(t,e)=>e?l.createElement(l.Fragment,null,l.createElement(C.InputPrefix,null,l.createElement(F.IconWrap,{icon:e.svgIcon,name:e.icon})),t):t,Ie=(t,e)=>{const a=l.createElement(l.Fragment,null,l.createElement(C.InputPrefix,null,l.createElement(F.IconWrap,{icon:e.dataItem.svgIcon,name:e.dataItem.icon})),t.props.children);return l.cloneElement(t,t.props,a)},As=t=>{const e=l.useMemo(()=>Ss(t.view.state),[t.view]),a=A.useLocalization(),s=l.useRef(null),r=e.applyToAll,n=l.useRef(null),c=e.cellWidth,p=l.useRef(null);e.widthUnit&&!ne.includes(e.widthUnit)&&ne.push(e.widthUnit);const d=e.widthUnit||"",u=l.useRef(null),h=e.cellHeight,m=l.useRef(null);e.heightUnit&&!ne.includes(e.heightUnit)&&ne.push(e.heightUnit);const w=e.heightUnit||"",f=l.useRef(null),b=xr.find(N=>N.value.x!==void 0&&e.alignment&&N.value.x===e.alignment.x&&N.value.y===e.alignment.y)||null,P=l.useRef(null),T=Nr.find(N=>N.value===e.textControl),I=l.useRef(null),B=e.backgroundColor,k=l.useRef(null),H=e.cellPadding,$=l.useRef(null),Q=e.borderWidth,E=l.useRef(null),X=e.borderColor,j=l.useRef(null),Y=ze.find(N=>N.value===e.borderStyle),Z=l.useRef(null),re=e.id,te=l.useRef(null),he=e.className,me=l.useCallback(()=>{var ee,ie,S,L,z,V,le,ce,pe,de,ue,be,ve,ye,we,Se,Pe,xe,Ne,Te;const N={applyToAll:!!((ie=(ee=s.current)==null?void 0:ee.element)!=null&&ie.checked),cellWidth:((S=n.current)==null?void 0:S.value)||null,widthUnit:((L=p.current)==null?void 0:L.value)||"",cellHeight:((z=u.current)==null?void 0:z.value)||null,heightUnit:((V=m.current)==null?void 0:V.value)||"",alignment:(ce=(le=f.current)==null?void 0:le.value)==null?void 0:ce.value,textControl:(de=(pe=P.current)==null?void 0:pe.value)==null?void 0:de.value,backgroundColor:(ue=I.current)==null?void 0:ue.value,cellPadding:typeof((be=k.current)==null?void 0:be.value)=="number"?(ve=k.current)==null?void 0:ve.value:null,borderWidth:typeof((ye=$.current)==null?void 0:ye.value)=="number"?(we=$.current)==null?void 0:we.value:null,borderColor:(Se=E.current)==null?void 0:Se.value,borderStyle:((xe=(Pe=j.current)==null?void 0:Pe.value)==null?void 0:xe.value)||null,id:String(((Ne=Z.current)==null?void 0:Ne.value)||""),className:String(((Te=te.current)==null?void 0:Te.value)||"")};t.onSave.call(void 0,N)},[t.onSave]),se=l.createElement("div",{className:"k-form k-form-md"},l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("div",{className:"k-form-field-wrap"},l.createElement("span",{className:"k-checkbox-wrap"},l.createElement(C.Checkbox,{ref:s,defaultChecked:r})),l.createElement("label",{className:"k-checkbox-label"},a.toLanguageString(o.cellPropertiesApplyToAllCells,g[o.cellPropertiesApplyToAllCells])))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesWidth,g[o.cellPropertiesWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:n,defaultValue:c,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}),l.createElement("div",{className:"k-form-hint"},a.toLanguageString(o.cellPropertiesApplyToColumn,g[o.cellPropertiesApplyToColumn])))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:p,defaultValue:d,data:ne,popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesHeight,g[o.cellPropertiesHeight])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:u,defaultValue:h,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}),l.createElement("div",{className:"k-form-hint"},a.toLanguageString(o.cellPropertiesApplyToRow,g[o.cellPropertiesApplyToRow])))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:m,defaultValue:w,data:ne,popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesAlignment,g[o.cellPropertiesAlignment])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:f,defaultValue:b,data:xr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"text",popupSettings:U,valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesTextControl,g[o.cellPropertiesTextControl])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:P,defaultValue:T,data:Nr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value",popupSettings:U,valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesCellPadding,g[o.cellPropertiesCellPadding])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:k,defaultValue:H,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBackground,g[o.cellPropertiesBackground])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:I,defaultValue:B}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBorderWidth,g[o.cellPropertiesBorderWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:$,defaultValue:Q,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBorderColor,g[o.cellPropertiesBorderColor])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:E,defaultValue:X}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBorderStyle,g[o.cellPropertiesBorderStyle])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:j,defaultValue:Y,popupSettings:U,data:ze,textField:"text",dataItemKey:"value"}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesId,g[o.cellPropertiesId])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:Z,defaultValue:re}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesCssClass,g[o.cellPropertiesCssClass])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:te,defaultValue:he})))))),fe=[l.createElement(D.Button,{themeColor:"primary",key:"save",onClick:me},a.toLanguageString(o.cellPropertiesSave,g[o.cellPropertiesSave])),l.createElement(D.Button,{onClick:t.onCancel,key:"cancel"},a.toLanguageString(o.cellPropertiesCancel,g[o.cellPropertiesCancel]))];return l.createElement(q.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(o.cellProperties,g[o.cellProperties]),onClose:t.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},se,l.createElement(q.WindowActionsBar,{layout:"start"},...fe))},Ze={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},Fe={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},Tr=t=>{const e=[];for(let a=0;a<t.height;a++){const s=a*t.width,r=s+t.width;e.push(t.map.slice(s,r))}return e},Cs=(t,e)=>{let a=0,s=0;const r=Tr(e);r.forEach(n=>{let c=!0;n.forEach(p=>{const d=t.nodeAt(p);d&&d.type.name!=="table_header"&&(c=!1)}),c&&a++});for(let n=0;n<e.width;n++){let c=!0;for(let p=0;p<e.height;p++){const d=r[p]&&r[p][n],u=typeof d=="number"&&t.nodeAt(d);u&&u.type.name!=="table_header"&&(c=!1)}c&&s++}return{rows:a,columns:s}},Is=t=>{const e=new Set;return t.content.forEach(a=>{a.content.forEach(s=>{e.add(ae(s.attrs.style).padding||"")})}),e.size===1?Array.from(e)[0]:""},Ds=t=>{let e=!0,a=!0;return t.content.forEach(s=>{s.content.forEach(r=>{let n=r.type.name==="table_header",c=r.type.name==="table_cell";n&&!r.attrs.scope&&(e=!1),(n&&!r.attrs.id||c&&!r.attrs.headers)&&(a=!1)})}),e?"scope":a?"id":"none"},Bs=t=>{var f,b,P;const e=He(t),a=t.selection.$from,s=e.length?_(a,T=>T.type.spec.tableRole==="table"):null;if(!s)return Ze;const r=_(a,T=>T.type.name==="table_wrapper");let n="",c={},p={};r&&(p=ae(r.node.attrs.style),r.node.content.forEach(T=>{if(T.type.name==="table_caption_external"){const I=i.pmDocToFragment(T);n=i.fragmentToHtml(I),n=n==="<img>"?"":n,c=ae(T.attrs.style)}}));const d=ae(((f=s.node.attrs)==null?void 0:f.style)||""),u=i.TableMap.get(s.node),h=p["margin-left"]==="auto"&&p["margin-right"]==="auto"?"center":p["margin-right"]==="auto"?"left":p["margin-left"]==="auto"?"right":null,m=Cs(s.node,u),w=Is(s.node);return{...Ze,columns:u.width,rows:u.height,...Ye(s.node,"width"),...r&&/%/.test(p.width||"")?Ye(r.node,"width"):{},...Ye(s.node,"height"),textAlign:d["text-align"]||"",position:h||null,cellPadding:w?parseFloat(w):null,cellSpacing:d["border-spacing"]?parseFloat(d["border-spacing"]):null,backgroundColor:d["background-color"],borderWidth:d["border-width"]?parseFloat(d["border-width"]):null,borderColor:d["border-color"],borderStyle:d["border-style"]||null,collapseBorders:d["border-collapse"]==="collapse",caption:n||void 0,captionAlignment:c["text-align"]||"",captionPosition:c["caption-side"]||null,headerRows:m.rows,headerColumns:m.columns,associateHeaders:m.rows||m.columns?Ds(s.node):"none",id:((b=s.node.attrs)==null?void 0:b.id)||"",className:((P=s.node.attrs)==null?void 0:P.class)||""}},Lr=t=>{const a=t.lastChild.lastChild;return{node:a,pos:t.content.size-a.nodeSize}},Ar=(t,e,a,s,r)=>{const n=Lr(a),c=e+n.pos;if(!t.doc.nodeAt(c))return t;const d=t.doc.resolve(c),u=new i.CellSelection(d,d),h=t.tr.setSelection(u);let m=t.apply(h);for(let w=0;w<s;w++)r(m,f=>{m=m.apply(f)});return m},Cr=(t,e,a,s)=>{let r=t;for(let n=0;n<a;n++){const c=r.doc.nodeAt(e);if(c){const p=Lr(c),d=e+p.pos,u=r.doc.resolve(d),h=new i.CellSelection(u,u),m=r.tr.setSelection(h);r=r.apply(m),s(r,w=>{r=r.apply(w)})}}return r},zs=(t,e,a,s)=>{let r=t,n=r.doc.nodeAt(e);if(!n)return r;let c=i.TableMap.get(n);return c.width===s&&c.height===a||(s>c.width?r=Ar(r,e,n,s-c.width,i.addColumnAfter):s<c.width&&(r=Cr(r,e,c.width-s,gr)),n=r.doc.nodeAt(e),!n)||(c=i.TableMap.get(n),a>c.height?r=Ar(r,e,n,a-c.height,i.addRowAfter):a<c.height&&(r=Cr(r,e,c.height-a,hr))),r},Rs=(t,e,a)=>{const s=t.doc.nodeAt(a);if(!s)return t;let r={...s.attrs};const n=e.width!==null&&(e.widthUnit!=="%"||!e.caption&&!e.position);r=M(r,"width",n?e.width+e.widthUnit:""),r=M(r,"height",e.height!==null?e.height+e.heightUnit:""),r=M(r,"text-align",e.textAlign||""),r=M(r,"background-color",e.backgroundColor||""),r=M(r,"border-width",e.borderWidth?e.borderWidth+"px":""),r=M(r,"border-style",e.borderStyle||""),r=M(r,"border-color",e.borderColor||""),r=M(r,"border-spacing",e.cellSpacing!==null?e.cellSpacing+"px":""),e.cellSpacing!==null?r=M(r,"border-collapse","unset"):r=M(r,"border-collapse",e.collapseBorders?"collapse":"");const c=Fe[e.position||""]||{};Object.keys(c).forEach(d=>{r=M(r,d,c[d])}),r.id=e.id||null,r.class=e.className||null;const p=t.tr.setNodeMarkup(a,null,r);return t=t.apply(p),t},Ir=(t,e,a,s,r)=>{if(e.type.name!==s.name||Object.keys(r).length>0){const n=t.tr.setNodeMarkup(a,s,{...e.attrs,...r});return t.apply(n)}return t},Ms=(t,e)=>{/^cell-[0-9]+-[0-9]+$/.test(t.attrs.id||"")&&(e.id=null)},ks=(t,e,a)=>{const s=t.doc.nodeAt(a),r=s&&i.TableMap.get(s);if(!s||!r)return t;const n=Tr(r);let c=t;const{table_header:p,table_cell:d}=t.schema.nodes,u=String(new Date().getTime()),h=[],m=(f,b)=>{const P=`cell-${f}${b}-${u}`;return h[f]||h.push([]),h[f][b]||h[f].push([]),h[f][b]=P,P},w=(f,b,P,T)=>{const I=[];if(T)for(let B=0;B<f;B++)h[B]&&h[B][b]&&I.push(h[B][b]);if(P)for(let B=0;B<b;B++)h[f]&&h[f][B]&&I.push(h[f][B]);return I.join(" ")};return n.forEach((f,b)=>{f.forEach((P,T)=>{const I=s.nodeAt(P);if(I){const B=T<e.headerColumns,k=b<e.headerRows,H={...I.attrs};Ms(I,H),H.headers=null,H.scope=null,k||B?(e.associateHeaders==="scope"&&(H.scope=k?"col":"row"),e.associateHeaders==="id"&&(H.id=m(b,T),(T>0||b>0)&&(H.headers=w(b,T,B,k)||null)),c=Ir(c,I,a+P+1,p,H)):(e.associateHeaders==="id"&&(H.headers=w(b,T,e.headerColumns>0,e.headerRows>0)||null),c=Ir(c,I,a+P+1,d,H))}})}),c},Hs=(t,e,a,s)=>{let r={...e.attrs};return r=M(r,"margin-left",""),r=M(r,"margin-right",""),Object.keys(s||{}).forEach(n=>{r=M(r,n,(s||{})[n]||"")}),t.apply(t.tr.setNodeMarkup(a,null,r))},Dr=(t,e)=>i.parseContent("<p>"+t+"</p>",e).content.firstChild.content,Br=(t,e)=>{if(!t.caption)return;let a={caption:"",style:"display: table-caption"};t.captionAlignment&&(a=M(a,"text-align",t.captionAlignment)),t.captionPosition&&(a=M(a,"caption-side",t.captionPosition));const s=Dr(t.caption,e);return s&&e.nodes.table_caption_external.createAndFill(a,s)||void 0},zr=t=>t.firstChild&&t.firstChild.type.name==="table_caption_external",Fs=(t,e,a,s)=>{let r=t,n;const c=a+2,p=a+1,d=r.schema;if(zr(e))if(n=e.firstChild,s.caption){const u=Dr(s.caption,d);if(r=r.apply(r.tr.replaceWith(c,c+n.content.size,u)),n=r.doc.nodeAt(p),n){let h={...n.attrs};h=M(h,"text-align",s.captionAlignment||""),h=M(h,"caption-side",s.captionPosition||""),r=r.apply(r.tr.setNodeAttribute(p,"style",h.style))}}else r=r.apply(r.tr.deleteRange(c,c+n.content.size));else n=Br(s,d),n&&(r=r.apply(r.tr.replaceWith(p,p,n)));return r},Ws=(t,e,a,s,r)=>{let n={state:t,pos:a};if(!s&&(e.position||e.caption)){let p={table:"",style:"display: table"};const d=[],u=e.position,h=u&&Fe[u];h&&Object.keys(h).forEach(b=>{p=M(p,b,h[b]||"")}),typeof e.width=="number"&&e.widthUnit==="%"&&(p=M(p,"width",e.width+e.widthUnit));const m=Br(e,t.schema);m&&d.push(m);const w=t.doc.nodeAt(a);d.push(w);const f=t.schema.nodes.table_wrapper.createAndFill(p,d);if(f){const b=t.tr.replaceWith(a,a+w.content.size,f);t=t.apply(b),n={state:t,pos:a}}}else s&&(e.position||e.caption||!e.caption&&zr(s.node))?(t=Hs(t,s.node,r,e.position&&Fe[e.position]),t=Fs(t,s.node,r,e),n={state:t,pos:r}):s&&!(e.position||e.caption)?n={state:t,node:s.node,pos:t.selection.$from.start(s.depth)-1}:n={state:t,pos:a};const c=s&&n.state.doc.nodeAt(r);if(c){let p;typeof e.width=="number"&&e.widthUnit==="%"?p=M(c.attrs,"width",e.width+e.widthUnit):e.widthUnit!=="%"&&/%/.test(ae(c.attrs.style||"").width||"")&&(p=M(c.attrs,"width","")),p&&(n.state=n.state.apply(n.state.tr.setNodeMarkup(r,null,p)))}return n},Ks=(t,e)=>{const a=t.selection.$from;let s=_(a,T=>T.type.spec.tableRole==="table");if(!s)return;const r=a.start(s.depth)-1;let n=zs(t,r,e.rows,e.columns);if(!n)return;const c=n.tr;wr(n).forEach(T=>{let I={...T.node.attrs};I=M(I,"padding",typeof e.cellPadding=="number"?e.cellPadding+"px":""),c.setNodeMarkup(T.pos,null,I)}),n=n.apply(c),n=Rs(n,e,r),n=ks(n,e,r);const p=_(a,T=>T.type.name==="table_wrapper"),d=a.start((p==null?void 0:p.depth)||0)-1;let u=Ws(n,e,r,p,d);n=u.state;const h=u.pos,m=n.doc.nodeAt(u.pos);if(!m)return;const w=h+(p||s).node.content.size,f=t.tr.replaceWith(h,w,m),b=i.Selection.atEnd(m),P=i.TextSelection.create(f.doc,h+b.to+1);return f.setSelection(P),f},Os=t=>{const{view:e,...a}=t,s=A.useLocalization(),[r,n]=l.useState(!1),c=!!(e&&_(e.state.selection.$from,h=>h.type.spec.tableRole==="table")),p=l.useCallback(()=>{n(!0)},[]),d=l.useCallback(()=>{n(!1),e==null||e.focus()},[e]),u=l.useCallback(h=>{if(e&&h){const m=Ks(e.state,h);m&&e.dispatch(m)}d()},[e,d]);return l.createElement(l.Fragment,null,l.createElement(D.Button,{type:"button",title:s.toLanguageString(o.tableProperties,g[o.tableProperties]),icon:"table-properties",svgIcon:x.tablePropertiesIcon,onClick:p,disabled:!c,...K,...a}),r&&l.createElement(Vs,{onClose:d,onSave:u,view:e}))},We=[{textKey:o.tablePropertiesAlignLeft,text:g[o.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:x.tableAlignMiddleLeftIcon},{textKey:o.tablePropertiesAlignCenter,text:g[o.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:x.tableAlignMiddleCenterIcon},{textKey:o.tablePropertiesAlignRight,text:g[o.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:x.tableAlignMiddleRightIcon},{textKey:o.tablePropertiesNoAlignment,text:g[o.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:x.tableAlignRemoveIcon}],Rr=[{textKey:o.tablePropertiesLeft,text:g[o.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:x.tablePositionStartIcon},{textKey:o.tablePropertiesCenter,text:g[o.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:x.tablePositionCenterIcon},{textKey:o.tablePropertiesRight,text:g[o.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:x.tablePositionEndIcon}].map(t=>({...t,style:Fe[t.value]})),Mr=[{textKey:o.tablePropertiesTop,text:g[o.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:x.positionTopIcon},{textKey:o.tablePropertiesBottom,text:g[o.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:x.positionBottomIcon}],kr=[{textKey:o.tablePropertiesNone,text:g[o.tablePropertiesNone],value:"none"},{textKey:o.tablePropertiesUsingScopeAttribute,text:g[o.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:o.tablePropertiesUsingIdAttributes,text:g[o.tablePropertiesUsingIdAttributes],value:"id"}],Vs=t=>{const e=l.useMemo(()=>{const N=t.view&&t.view.state;return N?Bs(N):Ze},[t.view]),a=A.useLocalization(),[s,r]=l.useState(0),n=l.useCallback(N=>{r(N.selected)},[]),c=l.useRef(null),p=l.useRef(null),d=l.useRef(null),u=l.useRef(null),h=l.useRef(null),m=l.useRef(null),w=l.useRef(null),f=l.useRef(null),b=l.useRef(null),P=l.useRef(null),T=l.useRef(null),I=l.useRef(null),B=l.useRef(null),k=l.useRef(null),H=l.useRef(null),$=l.useRef(null),Q=l.useRef(null),E=l.useRef(null),X=l.useRef(null),j=l.useRef(null),Y=l.useRef(null),Z=l.useRef(null),re=l.useRef(null),te=l.useCallback(()=>{var ee,ie,S,L,z,V,le,ce,pe,de,ue,be,ve,ye,we,Se,Pe,xe,Ne,Te;const N={rows:((ee=c.current)==null?void 0:ee.value)||0,columns:((ie=p.current)==null?void 0:ie.value)||0,width:d.current?d.current.value:null,height:u.current?u.current.value:null,cellSpacing:h.current?h.current.value:null,cellPadding:m.current?m.current.value:null,borderWidth:w.current?w.current.value:null,widthUnit:((S=f.current)==null?void 0:S.value)||"",heightUnit:((L=b.current)==null?void 0:L.value)||"",position:((V=(z=P.current)==null?void 0:z.value)==null?void 0:V.value)||null,textAlign:(le=T.current)!=null&&le.value?T.current.value.value:null,borderStyle:(ce=I.current)!=null&&ce.value?I.current.value.value:null,backgroundColor:(pe=B.current)==null?void 0:pe.value,borderColor:(de=k.current)==null?void 0:de.value,collapseBorders:!!((be=(ue=H.current)==null?void 0:ue.element)!=null&&be.checked),id:String(((ve=$.current)==null?void 0:ve.value)||""),className:String(((ye=Q.current)==null?void 0:ye.value)||""),caption:String(((we=E.current)==null?void 0:we.value)||""),headerRows:((Se=X.current)==null?void 0:Se.value)||0,headerColumns:((Pe=j.current)==null?void 0:Pe.value)||0,captionAlignment:(xe=Y.current)!=null&&xe.value?Y.current.value.value:null,captionPosition:(Ne=Z.current)!=null&&Ne.value?Z.current.value.value:null,associateHeaders:(Te=re.current)!=null&&Te.value?re.current.value.value:"none"};t.onSave.call(void 0,N)},[t.onSave]),he=l.createElement("div",{className:"k-form k-form-md"},l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesRows,g[o.tablePropertiesRows])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:c,defaultValue:e.rows,min:1}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesColumns,g[o.tablePropertiesColumns])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:p,defaultValue:e.columns,min:1}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesWidth,g[o.tablePropertiesWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:d,defaultValue:e.width,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:f,defaultValue:e.widthUnit,data:ne,popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesHeight,g[o.tablePropertiesHeight])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:u,defaultValue:e.height,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:b,defaultValue:e.heightUnit,data:ne.filter(N=>N!=="%"),popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesPosition,g[o.tablePropertiesPosition])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:P,defaultValue:Rr.find(N=>N.value===e.position),popupSettings:U,data:Rr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value",valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesAlignment,g[o.tablePropertiesAlignment])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:T,defaultValue:We.find(N=>N.value===e.textAlign),data:We.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value",popupSettings:U,valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCellSpacing,g[o.tablePropertiesCellSpacing])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:h,defaultValue:e.cellSpacing,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto]),min:0}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCellPadding,g[o.tablePropertiesCellPadding])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:m,defaultValue:e.cellPadding,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto]),min:0}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesTableBackground,g[o.tablePropertiesTableBackground])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:B,defaultValue:e.backgroundColor}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesBorderWidth,g[o.tablePropertiesBorderWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:w,defaultValue:e.borderWidth,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesBorderColor,g[o.tablePropertiesBorderColor])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:k,defaultValue:e.borderColor}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesBorderStyle,g[o.tablePropertiesBorderStyle])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:I,defaultValue:ze.find(N=>N.value===e.borderStyle),popupSettings:U,data:ze.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value"}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Checkbox,{ref:H,className:"k-checkbox-wrap",label:a.toLanguageString(o.tablePropertiesCollapseBorders,g[o.tablePropertiesCollapseBorders]),defaultChecked:e.collapseBorders})))))),me=l.createElement("div",{className:"k-form k-form-md"},l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("div",{className:"k-form-layout k-d-grid"},l.createElement("div",{className:"k-form-field"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesId,g[o.tablePropertiesId])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:$,defaultValue:e.id}))),l.createElement("div",{className:"k-form-field"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCssClass,g[o.tablePropertiesCssClass])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:Q,defaultValue:e.className}))),l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("legend",{className:"k-form-legend"},a.toLanguageString(o.tablePropertiesAccessibility,g[o.tablePropertiesAccessibility])),l.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCaption,g[o.tablePropertiesCaption])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:E,defaultValue:e.caption}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCaptionPosition,g[o.tablePropertiesCaptionPosition])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:Z,defaultValue:Mr.find(N=>N.value===e.captionPosition),data:Mr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),popupSettings:U,textField:"text",dataItemKey:"value",valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCaptionAlignment,g[o.tablePropertiesCaptionAlignment])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:Y,defaultValue:We.find(N=>N.value===e.captionAlignment),data:We.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),popupSettings:U,textField:"text",dataItemKey:"value",valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesHeaderRows,g[o.tablePropertiesHeaderRows])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:X,defaultValue:e.headerRows,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesHeaderCols,g[o.tablePropertiesHeaderCols])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:j,defaultValue:e.headerColumns,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesAssociateHeaders,g[o.tablePropertiesAssociateHeaders])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:re,defaultValue:kr.find(N=>N.value===e.associateHeaders),data:kr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),popupSettings:U,textField:"text",dataItemKey:"value"})))))))),se=l.createElement(Le.TabStrip,{selected:s,onSelect:n,animation:!1,keepTabsMounted:!0},l.createElement(Le.TabStripTab,{title:a.toLanguageString(o.tablePropertiesGeneral,g[o.tablePropertiesGeneral])},he),l.createElement(Le.TabStripTab,{title:a.toLanguageString(o.tablePropertiesAdvanced,g[o.tablePropertiesAdvanced])},me)),fe=[l.createElement(D.Button,{themeColor:"primary",key:"save",onClick:te},a.toLanguageString(o.tablePropertiesSave,g[o.tablePropertiesSave])),l.createElement(D.Button,{onClick:t.onClose,key:"cancel"},a.toLanguageString(o.tablePropertiesCancel,g[o.tablePropertiesCancel]))];return l.createElement(q.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(o.tableProperties,g[o.tableProperties]),onClose:t.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},se,l.createElement(q.WindowActionsBar,{layout:"start"},...fe))};y.EditorTools=void 0,(t=>{function e(v){return rs(v)}t.createAlignTool=e;class a extends e(y.EditorToolsSettings.alignLeft){}t.AlignLeft=a;class s extends e(y.EditorToolsSettings.alignRight){}t.AlignRight=s;class r extends e(y.EditorToolsSettings.alignCenter){}t.AlignCenter=r;class n extends e(y.EditorToolsSettings.alignJustify){}t.AlignJustify=n;function c(v){return Ve.createInsertTableTool(v)}t.createInsertTableTool=c;class p extends c(y.EditorToolsSettings.insertTable){}t.InsertTable=p;class d extends Me.InsertTablePopup{}t.InsertTablePopup=d;function u(v){return Ue.createStyleDropDownList(v)}t.createStyleDropDownList=u;class h extends u(y.EditorToolsSettings.fontSize){}t.FontSize=h;class m extends u(y.EditorToolsSettings.fontName){}t.FontName=m,t.ForeColor=v=>l.createElement(ur,{...y.EditorToolsSettings.foreColor,...v}),t.BackColor=v=>l.createElement(ur,{...y.EditorToolsSettings.backColor,...v});function w(v){return _e.createFormatBlockDropDownList(v)}t.createFormatBlockDropDownList=w;class f extends w(y.EditorToolsSettings.formatBlock){}t.FormatBlock=f;function b(v){return ke.createUndoTool(v)}t.createUndoTool=b;function P(v){return ke.createRedoTool(v)}t.createRedoTool=P;class T extends b(y.EditorToolsSettings.undo){}t.Undo=T;class I extends P(y.EditorToolsSettings.redo){}t.Redo=I;function B(v){return $e.createIndentTool(v)}t.createIndentTool=B;class k extends B(y.EditorToolsSettings.indent){}t.Indent=k;function H(v){return Ee.createInlineFormatTool(v)}t.createInlineFormatTool=H;class $ extends H(y.EditorToolsSettings.bold){}t.Bold=$;class Q extends H(y.EditorToolsSettings.italic){}t.Italic=Q;class E extends H(y.EditorToolsSettings.underline){}t.Underline=E;class X extends H(y.EditorToolsSettings.strikethrough){}t.Strikethrough=X;class j extends H(y.EditorToolsSettings.subscript){}t.Subscript=j;class Y extends H(y.EditorToolsSettings.superscript){}t.Superscript=Y;function Z(v){return ss(v)}t.createInsertImageTool=Z;class re extends Z(y.EditorToolsSettings.image){}t.InsertImage=re;function te(v){return je.createLinkTool(v)}t.createLinkTool=te;class he extends te(y.EditorToolsSettings.link){}t.Link=he;class me extends te(y.EditorToolsSettings.insertFile){}t.InsertFile=me;function se(v){return qe.createListTool(v)}t.createListTool=se;class fe extends se(y.EditorToolsSettings.orderedList){}t.OrderedList=fe;class N extends se(y.EditorToolsSettings.bulletList){}t.UnorderedList=N,t.BulletedList=v=>{const et=[{icon:"list-unordered",svgIcon:x.listUnorderedIcon,text:"Disc",style:"disc"},{icon:"list-unordered-outline",svgIcon:x.listUnorderedOutlineIcon,text:"Circle",style:"circle"},{icon:"list-unordered-square",svgIcon:x.listUnorderedSquareIcon,text:"Square",style:"square"}];return l.createElement(yr,{listType:y.EditorToolsSettings.bulletList.listType,items:et,icon:"list-unordered",svgIcon:x.listUnorderedIcon,titleKey:y.EditorToolsSettings.bulletList.messages.title,...v})},t.NumberedList=v=>{const et=[{icon:"list-ordered",svgIcon:x.listOrderedIcon,text:"Decimal"},{icon:"list-roman-upper",svgIcon:x.listRomanUpperIcon,text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",svgIcon:x.listRomanLowerIcon,text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",svgIcon:x.listLatinBigIcon,text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",svgIcon:x.listLatinSmallIcon,text:"Lower latin",style:"lower-latin"}];return l.createElement(yr,{listType:y.EditorToolsSettings.orderedList.listType,items:et,icon:"list-ordered",svgIcon:x.listOrderedIcon,titleKey:y.EditorToolsSettings.orderedList.messages.title,...v})},t.TableCellProperties=Ls,t.TableProperties=Os;function ee(v){return Ge.createOutdentTool(v)}t.createOutdentTool=ee;class ie extends ee(y.EditorToolsSettings.outdent){}t.Outdent=ie,t.Print=v=>l.createElement(ns,{...v}),t.Pdf=v=>l.createElement(ps,{...v}),t.SelectAll=v=>l.createElement(us,{...v}),t.CleanFormatting=v=>l.createElement(hs,{...v});function S(v){return J.createAddRowBeforeTool(v)}t.createAddRowBeforeTool=S;function L(v){return J.createAddRowAfterTool(v)}t.createAddRowAfterTool=L;function z(v){return J.createAddColumnBeforeTool(v)}t.createAddColumnBeforeTool=z;function V(v){return J.createAddColumnAfterTool(v)}t.createAddColumnAfterTool=V;function le(v){return J.createDeleteRowTool(v)}t.createDeleteRowTool=le;function ce(v){return J.createDeleteColumnTool(v)}t.createDeleteColumnTool=ce;function pe(v){return J.createDeleteTableTool(v)}t.createDeleteTableTool=pe;function de(v){return J.createMergeCellsTool(v)}t.createMergeCellsTool=de;function ue(v){return J.createSplitCellTool(v)}t.createSplitCellTool=ue;class be extends S(y.EditorToolsSettings.addRowBefore){}t.AddRowBefore=be;class ve extends L(y.EditorToolsSettings.addRowAfter){}t.AddRowAfter=ve;class ye extends z(y.EditorToolsSettings.addColumnBefore){}t.AddColumnBefore=ye;class we extends V(y.EditorToolsSettings.addColumnAfter){}t.AddColumnAfter=we;class Se extends le(y.EditorToolsSettings.deleteRow){}t.DeleteRow=Se;class Pe extends ce(y.EditorToolsSettings.deleteColumn){}t.DeleteColumn=Pe;class xe extends pe(y.EditorToolsSettings.deleteTable){}t.DeleteTable=xe;class Ne extends de(y.EditorToolsSettings.mergeCells){}t.MergeCells=Ne;class Te extends ue(y.EditorToolsSettings.splitCell){}t.SplitCell=Te;function Hr(v){return Je.createUnlinkTool(v)}t.createUnlinkTool=Hr;class _s extends Hr(y.EditorToolsSettings.unlink){}t.Unlink=_s;function Fr(v){return Qe.createViewHtmlTool(v)}t.createViewHtmlTool=Fr;class $s extends Fr(y.EditorToolsSettings.viewHtml){}t.ViewHtml=$s;class Es extends br{}t.FindAndReplace=Es})(y.EditorTools||(y.EditorTools={}));const Us={Selection:i.Selection,SelectionRange:i.SelectionRange,TextSelection:i.TextSelection,NodeSelection:i.NodeSelection,AllSelection:i.AllSelection,EditorState:i.EditorState,Plugin:i.Plugin,PluginKey:i.PluginKey,Transaction:i.Transaction,Decoration:i.Decoration,DecorationSet:i.DecorationSet,EditorView:i.EditorView,Node:i.Node,ResolvedPos:i.ResolvedPos,NodeRange:i.NodeRange,Fragment:i.Fragment,Slice:i.Slice,ReplaceError:i.ReplaceError,Mark:i.Mark,Schema:i.Schema,NodeType:i.NodeType,MarkType:i.MarkType,ContentMatch:i.ContentMatch,DOMParser:i.DOMParser,DOMSerializer:i.DOMSerializer,Transform:i.Transform,Step:i.Step,StepResult:i.StepResult,joinPoint:i.joinPoint,canJoin:i.canJoin,canSplit:i.canSplit,insertPoint:i.insertPoint,dropPoint:i.dropPoint,liftTarget:i.liftTarget,findWrapping:i.findWrapping,StepMap:i.StepMap,MapResult:i.MapResult,Mapping:i.Mapping,AddMarkStep:i.AddMarkStep,RemoveMarkStep:i.RemoveMarkStep,ReplaceStep:i.ReplaceStep,ReplaceAroundStep:i.ReplaceAroundStep,replaceStep:i.replaceStep,deleteSelection:i.deleteSelection,joinBackward:i.joinBackward,selectNodeBackward:i.selectNodeBackward,joinForward:i.joinForward,selectNodeForward:i.selectNodeForward,joinUp:i.joinUp,joinDown:i.joinDown,lift:i.lift,newlineInCode:i.newlineInCode,exitCode:i.exitCode,createParagraphNear:i.createParagraphNear,liftEmptyBlock:i.liftEmptyBlock,splitBlock:i.splitBlock,splitBlockKeepMarks:i.splitBlockKeepMarks,selectParentNode:i.selectParentNode,selectAll:i.selectAll,wrapIn:i.wrapIn,setBlockType:i.setBlockType,toggleMark:i.toggleMark,autoJoin:i.autoJoin,chainCommands:i.chainCommands,pcBaseKeymap:i.pcBaseKeymap,macBaseKeymap:i.macBaseKeymap,baseKeymap:i.baseKeymap,history:i.history,undo:i.undo,redo:i.redo,undoDepth:i.undoDepth,redoDepth:i.redoDepth,InputRule:i.InputRule,inputRules:i.inputRules,undoInputRule:i.undoInputRule,emDash:i.emDash,ellipsis:i.ellipsis,openDoubleQuote:i.openDoubleQuote,closeDoubleQuote:i.closeDoubleQuote,openSingleQuote:i.openSingleQuote,closeSingleQuote:i.closeSingleQuote,smartQuotes:i.smartQuotes,wrappingInputRule:i.wrappingInputRule,textblockTypeInputRule:i.textblockTypeInputRule,keymap:i.keymap,keydownHandler:i.keydownHandler,orderedList:i.orderedList,bulletList:i.bulletList,listItem:i.listItem,addListNodes:i.addListNodes,wrapInList:i.wrapInList,splitListItem:i.splitListItem,liftListItem:i.liftListItem,sinkListItem:i.sinkListItem,dropCursor:i.dropCursor,gapCursor:i.gapCursor,tableEditing:i.tableEditing,fixTables:i.fixTables,fixTablesKey:i.fixTablesKey,cellAround:i.cellAround,isInTable:i.isInTable,selectionCell:i.selectionCell,moveCellForward:i.moveCellForward,inSameTable:i.inSameTable,findCell:i.findCell,colCount:i.colCount,nextCell:i.nextCell,removeColSpan:i.removeColSpan,addColSpan:i.addColSpan,columnIsHeader:i.columnIsHeader,tableNodes:i.tableNodes,tableNodeTypes:i.tableNodeTypes,CellSelection:i.CellSelection,TableMap:i.TableMap,tableEditingKey:i.tableEditingKey,columnResizing:i.columnResizing,columnResizingPluginKey:i.columnResizingPluginKey,updateColumnsOnResize:i.updateColumnsOnResize,selectedRect:i.selectedRect,addColumn:i.addColumn,addColumnBefore:i.addColumnBefore,addColumnAfter:i.addColumnAfter,deleteColumn:i.deleteColumn,rowIsHeader:i.rowIsHeader,addRow:i.addRow,addRowBefore:i.addRowBefore,addRowAfter:i.addRowAfter,deleteRow:i.deleteRow,mergeCells:i.mergeCells,splitCell:i.splitCell,splitCellWithType:i.splitCellWithType,setCellAttr:i.setCellAttr,toggleHeader:i.toggleHeader,toggleHeaderRow:i.toggleHeaderRow,toggleHeaderColumn:i.toggleHeaderColumn,toggleHeaderCell:i.toggleHeaderCell,goToNextCell:i.goToNextCell,deleteTable:i.deleteTable};Object.defineProperty(y,"getHtml",{enumerable:!0,get:()=>i.getHtml}),Object.defineProperty(y,"marks",{enumerable:!0,get:()=>i.marks}),Object.defineProperty(y,"nodes",{enumerable:!0,get:()=>i.nodes}),Object.defineProperty(y,"parseContent",{enumerable:!0,get:()=>i.parseContent}),y.Editor=Oe,y.ProseMirror=Us,y.editorPropsKey=Be,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
226
+ `,_r="body { direction: rtl }",tt="editor.bold",lt="editor.italic",at="editor.underline",rt="editor.strikethrough",st="editor.subscript",it="editor.superscript",nt="editor.hyperlink",ot="editor.insertFile",ct="editor.print",pt="editor.selectAll",dt="editor.cleanFormatting",ut="editor.pdf",gt="editor.foregroundColor",ht="editor.backgroundColor",mt="editor.createTable",ft="editor.insertTableHint",bt="editor.addRowBefore",vt="editor.addRowAfter",yt="editor.addColumnBefore",wt="editor.addColumnAfter",St="editor.deleteRow",Pt="editor.deleteColumn",xt="editor.deleteTable",Nt="editor.mergeCells",Tt="editor.splitCell",Lt="editor.hyperlink-dialog-title",At="editor.hyperlink-dialog-content-address",Ct="editor.hyperlink-dialog-content-title",It="editor.hyperlink-dialog-content-newwindow",Dt="editor.hyperlink-dialog-cancel",Bt="editor.hyperlink-dialog-insert",zt="editor.insertfile-dialog-title",Rt="editor.insertfile-dialog-content-address",Mt="editor.insertfile-dialog-content-title",kt="editor.insertfile-dialog-cancel",Ht="editor.insertfile-dialog-insert",Ft="editor.image",Wt="editor.image-dialog-title",Kt="editor.image-address",Ot="editor.image-title",Vt="editor.image-altText",Ut="editor.image-width",_t="editor.image-height",$t="editor.image-cancel",Et="editor.image-insert",jt="editor.viewHtml",qt="editor.viewHtml-dialog-title",Gt="editor.viewHtml-cancel",Jt="editor.viewHtml-update",Qt="editor.unlink",Xt="editor.undo",Yt="editor.redo",Zt="editor.fontSize",el="editor.fontName",tl="editor.format",ll="editor.alignLeft",al="editor.alignRight",rl="editor.alignCenter",sl="editor.alignJustify",il="editor.indent",nl="editor.outdent",ol="editor.orderedList",cl="editor.bulletList",pl="editor.findReplace-tool-title",dl="editor.findReplace-dialog-title",ul="editor.findReplace-tab-find",gl="editor.findReplace-tab-replace",hl="editor.findReplace-findWhat",ml="editor.findReplace-replaceWith",fl="editor.findReplace-replace",bl="editor.findReplace-replaceAll",vl="editor.findReplace-matchCase",yl="editor.findReplace-matchWord",wl="editor.findReplace-matchCyclic",Sl="editor.findReplace-useRegExp",Pl="editor.findReplace-prevMatch",xl="editor.findReplace-nextMatch",Nl="editor.findReplace-matches",Tl="editor.iframeTitle",Ll="editorTools.foreColorLabel",Al="editorTools.backColorLabel",Cl="editor.cellProperties",Il="editor.cellPropertiesLeftTop",Dl="editor.cellPropertiesCenterTop",Bl="editor.cellPropertiesRightTop",zl="editor.cellPropertiesLeftMiddle",Rl="editor.cellPropertiesCenterMiddle",Ml="editor.cellPropertiesRightMiddle",kl="editor.cellPropertiesLeftBottom",Hl="editor.cellPropertiesCenterBottom",Fl="editor.cellPropertiesRightBottom",Wl="editor.cellPropertiesNoAlignment",Kl="editor.cellPropertiesWrap",Ol="editor.cellPropertiesFitToCell",Vl="editor.cellPropertiesApplyToAllCells",Ul="editor.cellPropertiesWidth",_l="editor.cellPropertiesApplyToColumn",$l="editor.cellPropertiesHeight",El="editor.cellPropertiesApplyToRow",jl="editor.cellPropertiesAlignment",ql="editor.cellPropertiesTextControl",Gl="editor.cellPropertiesCellPadding",Jl="editor.cellPropertiesBackground",Ql="editor.cellPropertiesBorderWidth",Xl="editor.cellPropertiesBorderColor",Yl="editor.cellPropertiesBorderStyle",Zl="editor.cellPropertiesId",ea="editor.cellPropertiesCssClass",ta="editor.cellPropertiesSave",la="editor.cellPropertiesCancel",aa="editor.tableProperties",ra="editor.tablePropertiesAlignLeft",sa="editor.tablePropertiesAlignCenter",ia="editor.tablePropertiesAlignRight",na="editor.tablePropertiesNoAlignment",oa="editor.tablePropertiesLeft",ca="editor.tablePropertiesCenter",pa="editor.tablePropertiesRight",da="editor.tablePropertiesTop",ua="editor.tablePropertiesBottom",ga="editor.tablePropertiesNone",ha="editor.tablePropertiesUsingScopeAttribute",ma="editor.tablePropertiesUsingIdAttributes",fa="editor.tablePropertiesRows",ba="editor.tablePropertiesColumns",va="editor.tablePropertiesWidth",ya="editor.tablePropertiesHeight",wa="editor.tablePropertiesPosition",Sa="editor.tablePropertiesAlignment",Pa="editor.tablePropertiesCellSpacing",xa="editor.tablePropertiesCellPadding",Na="editor.tablePropertiesTableBackground",Ta="editor.tablePropertiesBorderWidth",La="editor.tablePropertiesBorderColor",Aa="editor.tablePropertiesBorderStyle",Ca="editor.tablePropertiesCollapseBorders",Ia="editor.tablePropertiesID",Da="editor.tablePropertiesCssClass",Ba="editor.tablePropertiesAccessibility",za="editor.tablePropertiesCaption",Ra="editor.tablePropertiesCaptionPosition",Ma="editor.tablePropertiesCaptionAlignment",ka="editor.tablePropertiesHeaderRows",Ha="editor.tablePropertiesHeaderCols",Fa="editor.tablePropertiesAssociateHeaders",Wa="editor.tablePropertiesGeneral",Ka="editor.tablePropertiesAdvanced",Oa="editor.tablePropertiesSave",Va="editor.tablePropertiesCancel",Ua="editor.borderStyleNone",_a="editor.borderStyleSolid",$a="editor.borderStyleDotted",Ea="editor.borderStyleDashed",ja="editor.borderStyleDouble",qa="editor.borderStyleGroove",Ga="editor.borderStyleRidge",Ja="editor.borderStyleInset",Qa="editor.borderStyleOutset",Xa="editor.borderStyleInitial",Ya="editor.borderStyleInherit",Za="editor.borderStyleHidden",er="editor.sizeAuto",g={[tt]:"Bold",[lt]:"Italic",[at]:"Underline",[rt]:"Strikethrough",[st]:"Subscript",[it]:"Superscript",[Qt]:"Remove hyperlink",[Xt]:"Undo",[Yt]:"Redo",[Zt]:"Font Size",[el]:"Font Name",[tl]:"Format",[ll]:"Align text left",[al]:"Align text right",[rl]:"Center text",[sl]:"Justify",[il]:"Indent",[nl]:"Outdent",[ol]:"Insert ordered list",[cl]:"Insert unordered list",[ct]:"Print",[pt]:"Select All",[dt]:"Clean formatting",[ut]:"Export as PDF",[gt]:"Color",[ht]:"Background color",[mt]:"Create a table",[ft]:"Create a {0} x {1} table",[bt]:"Add row above",[vt]:"Add row below",[yt]:"Add column on the left",[wt]:"Add column on the right",[St]:"Delete row",[Pt]:"Delete column",[xt]:"Delete table",[Nt]:"Merge cells",[Tt]:"Split cell",[nt]:"Insert hyperlink",[Lt]:"Insert hyperlink",[At]:"Web address",[Ct]:"Title",[It]:"Open link in new window",[Dt]:"Cancel",[Bt]:"Insert",[ot]:"Insert file",[zt]:"Insert file",[Rt]:"Web address",[Mt]:"Title",[kt]:"Cancel",[Ht]:"Insert",[Ft]:"Insert image",[Wt]:"Insert image",[Kt]:"Web address",[Ot]:"Title",[Vt]:"Alternate text",[Ut]:"Width (px)",[_t]:"Height (px)",[$t]:"Cancel",[Et]:"Insert",[jt]:"View HTML",[qt]:"View HTML",[Gt]:"Cancel",[Jt]:"Update",[pl]:"Find and Replace",[dl]:"Find and Replace",[ul]:"Find",[gl]:"Replace",[hl]:"Find What:",[ml]:"Replace With",[fl]:"Replace",[bl]:"Replace All",[vl]:"Match Case",[yl]:"Match whole word only",[wl]:"Match cyclic (Wrap around)",[Sl]:"Regular Expression",[Pl]:"Prev",[xl]:"Next",[Nl]:"{0} of {1} matches",[Tl]:"Editable area. Press Alt + F10 for toolbar.",[Ll]:"Fore Color",[Al]:"Back Color",[Cl]:"Cell properties",[Il]:"Left Top",[Dl]:"Center Top",[Bl]:"Right Top",[zl]:"Left Middle",[Rl]:"Center Middle",[Ml]:"Right Middle",[kl]:"Left Bottom",[Hl]:"Center Bottom",[Fl]:"Right Bottom",[Wl]:"No Alignment",[Kl]:"Wrap",[Ol]:"Fit to cell",[Vl]:"Apply to all cells",[Ul]:"Width",[_l]:"apply to column",[$l]:"Height",[El]:"apply to row",[jl]:"Alignment",[ql]:"Text control",[Gl]:"Cell padding",[Jl]:"Background",[Ql]:"Border width",[Xl]:"Border color",[Yl]:"Border style",[Zl]:"ID",[ea]:"CSS class",[ta]:"Save",[la]:"Cancel",[aa]:"Table properties",[ra]:"Align Left",[sa]:"Align Center",[ia]:"Align Right",[na]:"No Alignment",[oa]:"Left",[ca]:"Center",[pa]:"Right",[da]:"Top",[ua]:"Bottom",[ga]:"None",[ha]:"Using 'scope' attribute",[ma]:"Using 'id' attributes",[fa]:"Rows",[ba]:"Columns",[va]:"Width",[ya]:"Height",[wa]:"Position",[Sa]:"Alignment",[Pa]:"Cell spacing",[xa]:"Cell padding",[Na]:"Table background",[Ta]:"Border width",[La]:"Border color",[Aa]:"Border style",[Ca]:"Collapse borders",[Ia]:"ID",[Da]:"CSS class",[Ba]:"Accessibility",[za]:"Caption",[Ra]:"Position",[Ma]:"Alignment",[ka]:"Header rows",[Ha]:"Header cols",[Fa]:"Associate headers",[Wa]:"General",[Ka]:"Advanced",[Oa]:"Save",[Va]:"Cancel",[Ua]:"None",[_a]:"Solid",[$a]:"Dotted",[Ea]:"Dashed",[ja]:"Double",[qa]:"Groove",[Ga]:"Ridge",[Ja]:"Inset",[Qa]:"Outset",[Xa]:"Initial",[Ya]:"Inherit",[Za]:"Hidden",[er]:"Auto"},o={bold:tt,italic:lt,underline:at,strikethrough:rt,subscript:st,superscript:it,unlink:Qt,undo:Xt,redo:Yt,fontSize:Zt,fontName:el,format:tl,alignLeft:ll,alignRight:al,alignCenter:rl,alignJustify:sl,indent:il,outdent:nl,orderedList:ol,bulletList:cl,print:ct,selectAll:pt,cleanFormatting:dt,pdf:ut,foregroundColor:gt,backgroundColor:ht,createTable:mt,createTableHint:ft,addRowBefore:bt,addRowAfter:vt,addColumnBefore:yt,addColumnAfter:wt,deleteRow:St,deleteColumn:Pt,deleteTable:xt,mergeCells:Nt,splitCell:Tt,insertHyperlink:nt,insertHyperlinkDialogTitle:Lt,insertHyperlinkAddress:At,insertHyperlinkTitle:Ct,insertHyperlinkNewWindow:It,insertHyperlinkCancel:Dt,insertHyperlinkInsert:Bt,insertFile:ot,insertFileDialogTitle:zt,insertFileAddress:Rt,insertFileTitle:Mt,insertFileCancel:kt,insertFileInsert:Ht,insertImage:Ft,insertImageDialogTitle:Wt,insertImageAddress:Kt,insertImageTitle:Ot,insertImageAltText:Vt,insertImageWidth:Ut,insertImageHeight:_t,insertImageCancel:$t,insertImageInsert:Et,viewHtml:jt,viewHtmlDialogTitle:qt,viewHtmlCancel:Gt,viewHtmlUpdate:Jt,findReplaceToolTitle:pl,findReplaceDialogTitle:dl,findReplaceTabFind:ul,findReplaceTabReplace:gl,findReplaceFindWhat:hl,findReplaceReplaceWith:ml,findReplaceReplace:fl,findReplaceReplaceAll:bl,findReplaceMatchCase:vl,findReplaceMatchWord:yl,findReplaceMatchCyclic:wl,findReplaceUseRegExp:Sl,findReplacePrevMatch:Pl,findReplaceNextMatch:xl,findReplaceMatches:Nl,iframeTitle:Tl,foreColorLabel:Ll,backColorLabel:Al,cellProperties:Cl,cellPropertiesLeftTop:Il,cellPropertiesCenterTop:Dl,cellPropertiesRightTop:Bl,cellPropertiesLeftMiddle:zl,cellPropertiesCenterMiddle:Rl,cellPropertiesRightMiddle:Ml,cellPropertiesLeftBottom:kl,cellPropertiesCenterBottom:Hl,cellPropertiesRightBottom:Fl,cellPropertiesNoAlignment:Wl,cellPropertiesWrap:Kl,cellPropertiesFitToCell:Ol,cellPropertiesApplyToAllCells:Vl,cellPropertiesWidth:Ul,cellPropertiesApplyToColumn:_l,cellPropertiesHeight:$l,cellPropertiesApplyToRow:El,cellPropertiesAlignment:jl,cellPropertiesTextControl:ql,cellPropertiesCellPadding:Gl,cellPropertiesBackground:Jl,cellPropertiesBorderWidth:Ql,cellPropertiesBorderColor:Xl,cellPropertiesBorderStyle:Yl,cellPropertiesId:Zl,cellPropertiesCssClass:ea,cellPropertiesSave:ta,cellPropertiesCancel:la,tableProperties:aa,tablePropertiesAlignLeft:ra,tablePropertiesAlignCenter:sa,tablePropertiesAlignRight:ia,tablePropertiesNoAlignment:na,tablePropertiesLeft:oa,tablePropertiesCenter:ca,tablePropertiesRight:pa,tablePropertiesTop:da,tablePropertiesBottom:ua,tablePropertiesNone:ga,tablePropertiesUsingScopeAttribute:ha,tablePropertiesUsingIdAttributes:ma,tablePropertiesRows:fa,tablePropertiesColumns:ba,tablePropertiesWidth:va,tablePropertiesHeight:ya,tablePropertiesPosition:wa,tablePropertiesAlignment:Sa,tablePropertiesCellSpacing:Pa,tablePropertiesCellPadding:xa,tablePropertiesTableBackground:Na,tablePropertiesBorderWidth:Ta,tablePropertiesBorderColor:La,tablePropertiesBorderStyle:Aa,tablePropertiesCollapseBorders:Ca,tablePropertiesId:Ia,tablePropertiesCssClass:Da,tablePropertiesAccessibility:Ba,tablePropertiesCaption:za,tablePropertiesCaptionPosition:Ra,tablePropertiesCaptionAlignment:Ma,tablePropertiesHeaderRows:ka,tablePropertiesHeaderCols:Ha,tablePropertiesAssociateHeaders:Fa,tablePropertiesGeneral:Wa,tablePropertiesAdvanced:Ka,tablePropertiesSave:Oa,tablePropertiesCancel:Va,borderStyleNone:Ua,borderStyleSolid:_a,borderStyleDotted:$a,borderStyleDashed:Ea,borderStyleDouble:ja,borderStyleGroove:qa,borderStyleRidge:Ga,borderStyleInset:Ja,borderStyleOutset:Qa,borderStyleInitial:Xa,borderStyleInherit:Ya,borderStyleHidden:Za,sizeAuto:er},ge={...i.indentRules.listsTypes};y.EditorToolsSettings=void 0,(t=>{const e={type:"button"};t.bold={...i.bold,props:{icon:"bold",svgIcon:x.boldIcon,...e},messages:{title:o.bold},commandName:"Bold"},t.italic={...i.italic,props:{icon:"italic",svgIcon:x.italicIcon,...e},messages:{title:o.italic},commandName:"Italic"},t.underline={...i.underline,props:{icon:"underline",svgIcon:x.underlineIcon,...e},messages:{title:o.underline},commandName:"Underline"},t.strikethrough={...i.strikethrough,props:{icon:"strikethrough",svgIcon:x.strikethroughIcon,...e},messages:{title:o.strikethrough},commandName:"Strikethrough"},t.subscript={...i.subscript,props:{icon:"subscript",svgIcon:x.subscriptIcon,...e},messages:{title:o.subscript},commandName:"Subscript"},t.superscript={...i.superscript,props:{icon:"supscript",svgIcon:x.supscriptIcon,...e},messages:{title:o.superscript},commandName:"Superscript"},t.link={...i.link,props:{icon:"link",svgIcon:x.linkIcon,...e},messages:{insertHyperlink:o.insertHyperlink,insertHyperlinkDialogTitle:o.insertHyperlinkDialogTitle,insertHyperlinkAddress:o.insertHyperlinkAddress,insertHyperlinkTitle:o.insertHyperlinkTitle,insertHyperlinkNewWindow:o.insertHyperlinkNewWindow,insertHyperlinkCancel:o.insertHyperlinkCancel,insertHyperlinkInsert:o.insertHyperlinkInsert},commandName:"Link"},t.insertFile={...i.link,props:{icon:"file-add",svgIcon:x.fileAddIcon,...e},messages:{insertHyperlink:o.insertFile,insertHyperlinkDialogTitle:o.insertFileDialogTitle,insertHyperlinkAddress:o.insertFileAddress,insertHyperlinkTitle:o.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:o.insertFileCancel,insertHyperlinkInsert:o.insertFileInsert},commandName:"InsertFile",linkTarget:!1},t.insertTable={props:{icon:"table-add",svgIcon:x.tableAddIcon,...e},messages:{createTable:o.createTable,createTableHint:o.createTableHint},commandName:"InsertTable"},t.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:x.tableRowInsertAboveIcon,...e},messages:{title:o.addRowBefore},commandName:"AddRowBefore"},t.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:x.tableRowInsertBelowIcon,...e},messages:{title:o.addRowAfter},commandName:"AddRowAfter"},t.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:x.tableColumnInsertLeftIcon,...e},messages:{title:o.addColumnBefore},commandName:"AddColumnBefore"},t.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:x.tableColumnInsertRightIcon,...e},messages:{title:o.addColumnAfter},commandName:"AddColumnAfter"},t.deleteRow={props:{icon:"table-row-delete",svgIcon:x.tableRowDeleteIcon,...e},messages:{title:o.deleteRow},commandName:"DeleteRow"},t.deleteColumn={props:{icon:"table-column-delete",svgIcon:x.tableColumnDeleteIcon,...e},messages:{title:o.deleteColumn},commandName:"DeleteColumn"},t.deleteTable={props:{icon:"table-delete",svgIcon:x.tableDeleteIcon,...e},messages:{title:o.deleteTable},commandName:"DeleteTable"},t.mergeCells={props:{icon:"cells-merge",svgIcon:x.cellsMergeIcon,...e},messages:{title:o.mergeCells},commandName:"MergeCells"},t.splitCell={props:{icon:"cell-split-horizontally",svgIcon:x.cellSplitHorizontallyIcon,...e},messages:{title:o.splitCell},commandName:"SplitCell"},t.print={props:{icon:"print",svgIcon:x.printIcon,...e},messages:{title:o.print}},t.selectAll={props:{icon:"select-all",svgIcon:x.selectAllIcon,...e},messages:{title:o.selectAll}},t.pdf={props:{icon:"file-pdf",svgIcon:x.filePdfIcon,...e},messages:{title:o.pdf}},t.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},t.cleanFormatting={props:{icon:"clear-css",svgIcon:x.clearCssIcon,...e},messages:{title:o.cleanFormatting},commandName:"CleanFormatting"},t.image={node:"image",props:{icon:"image",svgIcon:x.imageIcon,...e},messages:{insertImage:o.insertImage,insertImageDialogTitle:o.insertImageDialogTitle,insertImageAddress:o.insertImageAddress,insertImageTitle:o.insertImageTitle,insertImageAltText:o.insertImageAltText,insertImageWidth:o.insertImageWidth,insertImageHeight:o.insertImageHeight,insertImageCancel:o.insertImageCancel,insertImageInsert:o.insertImageInsert},commandName:"InsertImage"},t.viewHtml={props:{icon:"code",svgIcon:x.codeIcon,...e},messages:{viewHtml:o.viewHtml,viewHtmlDialogTitle:o.viewHtmlDialogTitle,viewHtmlCancel:o.viewHtmlCancel,viewHtmlUpdate:o.viewHtmlUpdate},commandName:"SetContent"},t.findAndReplace={props:{icon:"find",svgIcon:x.binocularsIcon,...e},messages:{findReplaceToolTitle:o.findReplaceToolTitle,findReplaceDialogTitle:o.findReplaceDialogTitle,findReplaceTabFind:o.findReplaceTabFind,findReplaceTabReplace:o.findReplaceTabReplace,findReplaceFindWhat:o.findReplaceFindWhat,findReplaceReplaceWith:o.findReplaceReplaceWith,findReplaceReplace:o.findReplaceReplace,findReplaceReplaceAll:o.findReplaceReplaceAll,findReplaceMatchCase:o.findReplaceMatchCase,findReplaceMatchWord:o.findReplaceMatchWord,findReplaceMatchCyclic:o.findReplaceMatchCyclic,findReplaceUseRegExp:o.findReplaceUseRegExp,findReplacePrevMatch:o.findReplacePrevMatch,findReplaceNextMatch:o.findReplaceNextMatch,findReplaceMatches:o.findReplaceMatches}},t.unlink={...i.link,props:{icon:"unlink",svgIcon:x.unlinkIcon,...e},messages:{title:o.unlink},commandName:"Unlink"},t.undo={props:{icon:"undo",svgIcon:x.undoIcon,...e},messages:{title:o.undo},commandName:"Undo"},t.redo={props:{icon:"redo",svgIcon:x.redoIcon,...e},messages:{title:o.redo},commandName:"Redo"},t.fontSize={style:"font-size",defaultItem:{text:g[o.fontSize],value:"",localizationKey:o.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},t.fontName={style:"font-family",defaultItem:{text:g[o.fontName],value:"",localizationKey:o.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},t.formatBlock={defaultItem:{text:g[o.format],value:"",localizationKey:o.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},t.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:x.foregroundColorIcon,view:"palette",title:o.foregroundColor,ariaLabel:o.foreColorLabel},commandName:"ForeColor"},t.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:x.dropletIcon,view:"palette",title:o.backgroundColor,ariaLabel:o.backColorLabel},commandName:"BackColor"},t.alignLeft={actions:[...i.alignLeftRules],props:{icon:"align-left",svgIcon:x.alignLeftIcon,...e},messages:{title:o.alignLeft},commandName:"AlignLeft"},t.alignRight={actions:[...i.alignRightRules],props:{icon:"align-right",svgIcon:x.alignRightIcon,...e},messages:{title:o.alignRight},commandName:"AlignRight"},t.alignCenter={actions:[...i.alignCenterRules],props:{icon:"align-center",svgIcon:x.alignCenterIcon,...e},messages:{title:o.alignCenter},commandName:"AlignCenter"},t.alignJustify={actions:[...i.alignJustifyRules],props:{icon:"align-justify",svgIcon:x.alignJustifyIcon,...e},messages:{title:o.alignJustify},commandName:"AlignJustify"},t.alignRemove={actions:[...i.alignRemoveRules],props:{icon:"align-remove",svgIcon:x.alignRemoveIcon,...e},messages:{},commandName:"AlignRemove"},t.indent={actions:i.indentRules.nodes,listsTypes:ge,props:{icon:"indent",svgIcon:x.indentIcon,...e},messages:{title:o.indent},commandName:"Indent"},t.outdent={actions:i.outdentRules.nodes,listsTypes:ge,props:{icon:"outdent",svgIcon:x.outdentIcon,...e},messages:{title:o.outdent},commandName:"Outdent"},t.orderedList={listType:ge.orderedList,props:{icon:"list-ordered",svgIcon:x.listOrderedIcon,...e},messages:{title:o.orderedList},commandName:"OrderedList",types:{...ge}},t.bulletList={listType:ge.bulletList,props:{icon:"list-unordered",svgIcon:x.listUnorderedIcon,...e},messages:{title:o.bulletList},commandName:"UnorderedList",types:{...ge}}})(y.EditorToolsSettings||(y.EditorToolsSettings={}));let tr=class extends l.Component{constructor(){super(...arguments),this.href=null,this.title=null,this.target=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const e=this.props.view,a=this.props.settings.mark,s={href:this.href?this.href.value:void 0,title:this.title?this.title.value:void 0,target:this.target&&this.target.element&&this.target.element.checked?"_blank":void 0};i.applyLink({mark:a,attrs:s},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:a,dir:s,render:r}=this.props,n=A.provideLocalizationService(this),{insertHyperlinkDialogTitle:c,insertHyperlinkAddress:p,insertHyperlinkTitle:d,insertHyperlinkNewWindow:u,insertHyperlinkCancel:h,insertHyperlinkInsert:m}=a.messages,w=e?i.getMark(e.state,e.state.schema.marks[a.mark]):!1,f=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},n.toLanguageString(p,g[p])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-link-url",ref:T=>this.href=T,defaultValue:w&&w.attrs.href||void 0,autoFocus:!0}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},n.toLanguageString(d,g[d])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-link-text",ref:T=>this.title=T,defaultValue:w&&w.attrs.title||void 0}))),a.linkTarget!==!1&&l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},l.createElement(C.Checkbox,{id:"k-editor-link-target",ref:T=>this.target=T,defaultChecked:w&&!!w.attrs.target||void 0}),n.toLanguageString(u,g[u]))))}),b=[l.createElement(D.Button,{onClick:this.onClose,dir:s,key:"cancel"},n.toLanguageString(h,g[h])),l.createElement(D.Button,{onClick:this.onInsert,themeColor:"primary",dir:s,key:"insert"},n.toLanguageString(m,g[m]))],P=l.createElement(q.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:n.toLanguageString(c,g[c]),onClose:this.onClose,style:s==="rtl"?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},f,l.createElement(q.WindowActionsBar,null,...b));return r?r(P,{content:f,actionButtons:b}):P}};A.registerForLocalization(tr);let lr=class extends l.Component{constructor(){super(...arguments),this.src=null,this.altText=null,this.title=null,this.width=null,this.height=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const{view:e,settings:a}=this.props,r=e.state.schema.nodes[a.node],n={src:this.src?this.src.value:null,title:this.title?this.title.value:null,alt:this.altText?this.altText.value:null,width:this.width?this.width.value:null,height:this.height?this.height.value:null},c=Object.keys(n).filter(d=>n[d]!==null&&n[d]!=="").reduce((d,u)=>Object.assign(d,{[u]:n[u]}),{}),p=r.createAndFill(c);p&&i.insertNode(p,!0)(e.state,u=>e.dispatch(u.setMeta("commandName",a.commandName).setMeta("args",c))),this.onClose()}}render(){const{view:e,settings:a,dir:s,render:r}=this.props,{insertImageDialogTitle:n,insertImageAddress:c,insertImageTitle:p,insertImageAltText:d,insertImageWidth:u,insertImageHeight:h,insertImageCancel:m,insertImageInsert:w}=a.messages,f=A.provideLocalizationService(this),b=e&&e.state;let P={};b&&b.selection instanceof i.NodeSelection&&b.selection.node.type===b.schema.nodes[a.node]&&(P=b.selection.node.attrs);const T=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},f.toLanguageString(c,g[c])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-url",defaultValue:P.src,ref:k=>this.src=k,autoFocus:!0}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},f.toLanguageString(d,g[d])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-alt",defaultValue:P.alt,ref:k=>this.altText=k}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},f.toLanguageString(p,g[p])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-title",defaultValue:P.title,ref:k=>this.title=k}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},f.toLanguageString(u,g[u])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{type:"text",id:"k-editor-image-width",defaultValue:P.width,ref:k=>this.width=k}))),l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},f.toLanguageString(h,g[h])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{id:"k-editor-image-height",defaultValue:P.height,ref:k=>this.height=k}))))}),I=[l.createElement(D.Button,{onClick:this.onClose,dir:s,key:"cancel"},f.toLanguageString(m,g[m])),l.createElement(D.Button,{onClick:this.onInsert,themeColor:"primary",dir:s,key:"insert"},f.toLanguageString(w,g[w]))],B=l.createElement(q.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:f.toLanguageString(n,g[n]),onClose:this.onClose,key:"dialog",style:s==="rtl"?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},T,l.createElement(q.WindowActionsBar,null,...I));return r?r(B,{content:T,actionButtons:I}):B}};A.registerForLocalization(lr);const Be=new i.PluginKey("editor-props");let ar=class extends l.Component{constructor(){super(...arguments),this.htmlArea=null,this.textAreaRef=e=>{this.htmlArea=e;const a=e&&e.element.current;a&&(a.style.resize="none")},this.onUpdate=()=>{const{view:e,settings:a}=this.props,s=i.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:r}=Be.getState(e.state);i.setHtml(s,a.commandName,{preserveWhitespace:r})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:a,dir:s,render:r}=this.props,n=A.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:d}=a.messages,u=l.createElement(C.TextArea,{className:"k-editor-textarea",defaultValue:i.indentHtml(i.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),h=[l.createElement(D.Button,{onClick:this.onClose,dir:s,key:"cancel"},n.toLanguageString(p,g[p])),l.createElement(D.Button,{onClick:this.onUpdate,themeColor:"primary",dir:s,key:"update"},n.toLanguageString(d,g[d]))],m=l.createElement(q.Window,{className:"k-editor-window",title:n.toLanguageString(c,g[c]),onClose:this.onClose,key:"dialog",style:s==="rtl"?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!0,initialHeight:400,initialWidth:500},u,l.createElement(q.WindowActionsBar,null,...h));return r?r(m,{content:u,actionButtons:h}):m}};A.registerForLocalization(ar);const K={onMouseDown:t=>t.preventDefault(),onPointerDown:t=>t.preventDefault()},rr={userSelect:"none"},sr=function(t,...e){return e.forEach((a,s)=>{t=t.replace("{"+s+"}",String(a))}),t},ir=(t,e)=>e.dataItem.style?l.cloneElement(t,t.props,l.createElement("span",{style:e.dataItem.style},t.props.children)):t,ne=["px","em","%"],U={animate:{openDuration:150,closeDuration:150}},ze=[{textKey:o.borderStyleNone,text:g[o.borderStyleNone],value:"none"},{textKey:o.borderStyleSolid,text:g[o.borderStyleSolid],value:"solid"},{textKey:o.borderStyleDotted,text:g[o.borderStyleDotted],value:"dotted"},{textKey:o.borderStyleDashed,text:g[o.borderStyleDashed],value:"dashed"},{textKey:o.borderStyleDouble,text:g[o.borderStyleDouble],value:"double"},{textKey:o.borderStyleGroove,text:g[o.borderStyleGroove],value:"groove"},{textKey:o.borderStyleRidge,text:g[o.borderStyleRidge],value:"ridge"},{textKey:o.borderStyleInset,text:g[o.borderStyleInset],value:"inset"},{textKey:o.borderStyleOutset,text:g[o.borderStyleOutset],value:"outset"},{textKey:o.borderStyleInitial,text:g[o.borderStyleInitial],value:"initial"},{textKey:o.borderStyleInherit,text:g[o.borderStyleInherit],value:"inherit"},{textKey:o.borderStyleHidden,text:g[o.borderStyleHidden],value:"hidden"}];function _(t,e){for(let a=t.depth;a>0;a--){let s=t.node(a);if(e(s))return{node:s,depth:a}}return null}const $r=13,Er=27,jr=y.EditorToolsSettings.findAndReplace;let Ke=class extends l.Component{constructor(e){super(e),this.onTabSelect=a=>{this.setState({selectedTab:a.selected})},this.onClose=()=>{const a=this.props.view,s=a.state,r=s.tr.setSelection(i.TextSelection.create(s.doc,s.selection.from,s.selection.to));a.updateState(s.apply(r)),a.focus(),this.props.onClose.call(void 0)},this.matchesMessage=a=>{const s=this.state.matches,r=this.state.nextMatch;let n=0,c=0;if(s&&r){const p=s.findIndex(d=>d.eq(r));n=p===-1?s.length:p+1,c=s.length}return sr(a,n,c)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(a=!1)=>{const s=this.props.view,{searchText:r,matchCase:n,matchCyclic:c,matchWord:p,useRegExp:d}=this.state,u={text:r,matchWord:p,matchCase:n,useRegExp:d,backward:a,matchCyclic:c},h=i.find(s.state,u);if(h){const m=s.state.tr.setSelection(h);m.scrollIntoView(),s.updateState(s.state.apply(m)),this.setState({nextMatch:h})}},this.onReplace=()=>{const a=this.props.view,s=a.state.selection,{replaceText:r}=this.state;if(!s.empty){const n=s.from,c=n+r.length,p=i.replace(s,r,a.state.tr);p.setSelection(i.TextSelection.create(p.doc,n,c)),p.scrollIntoView(),a.dispatch(p),this.setNextState({})}},this.onReplaceAll=()=>{const a=this.props.view,{searchText:s,replaceText:r,matchCase:n,matchWord:c,useRegExp:p}=this.state,d={text:s,matchWord:c,matchCase:n,useRegExp:p},u=i.replaceAll(a.state,r,d);u&&a.dispatch(u),this.setNextState({})},this.onKeyDown=a=>{a.keyCode===$r?this.onFindNext():a.keyCode===Er&&this.onClose()},this.onMatchCaseChecked=a=>this.setNextState({matchCase:a.value}),this.onMatchWordChecked=a=>this.setNextState({matchWord:a.value}),this.onMatchCyclicChecked=a=>this.setNextState({matchCyclic:a.value}),this.onUseRegExpChecked=a=>this.setNextState({useRegExp:a.value}),this.onSearchChange=a=>this.setNextState({searchText:a.target.value}),this.onReplaceChange=a=>this.setNextState({replaceText:a.target.value}),this.setNextState=a=>{const s={...this.state,...a,matches:void 0,nextMatch:void 0},r=this.props.view;if(s.searchText){const{searchText:n,matchWord:c,matchCase:p,useRegExp:d,matchCyclic:u}=s,h={text:n,matchWord:c,matchCase:p,useRegExp:d},m=r.state.selection,w=i.findAll(r.state.doc,h);let f=!this.state.searchText&&w[0]||w.find(b=>b.from>=m.from)||u&&w[0]||void 0;this.setState({...s,matches:w,nextMatch:f})}else this.setState(s)},this.state={selectedTab:0,searchText:i.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||jr}componentDidUpdate(e,a){const s=this.props.view,{matches:r=[],nextMatch:n}=this.state;if(a.nextMatch!==n){const c=s.state,p=c.tr,d=[];r.forEach(u=>{d.push({from:u.from,to:u.to,attrs:{class:n&&u.eq(n)?"k-text-selected":"k-text-highlighted"}})}),p.setMeta(i.textHighlightKey,d),p.setSelection(n||i.TextSelection.create(c.doc,c.selection.from)),s.dispatch(p)}}render(){const e=A.provideLocalizationService(this),{findReplaceDialogTitle:a,findReplaceTabFind:s,findReplaceTabReplace:r,findReplaceFindWhat:n,findReplaceReplaceWith:c,findReplaceReplace:p,findReplaceReplaceAll:d,findReplaceMatchCase:u,findReplaceMatchWord:h,findReplaceMatchCyclic:m,findReplaceUseRegExp:w,findReplacePrevMatch:f,findReplaceNextMatch:b,findReplaceMatches:P}=this.settings.messages,{matchCase:T,matchWord:I,matchCyclic:B,useRegExp:k,searchText:H,replaceText:$,nextMatch:Q}=this.state,E=l.createElement("div",{className:"k-search-options"},l.createElement("span",null,l.createElement(C.Checkbox,{id:"match-case",checked:T,onChange:this.onMatchCaseChecked}),l.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(u,g[u]))),l.createElement("span",null,l.createElement(C.Checkbox,{id:"match-whole",checked:I,onChange:this.onMatchWordChecked}),l.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(h,g[h]))),l.createElement("span",null,l.createElement(C.Checkbox,{id:"match-cyclic",checked:B,onChange:this.onMatchCyclicChecked}),l.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(m,g[m]))),l.createElement("span",null,l.createElement(C.Checkbox,{id:"regular-expression",checked:k,onChange:this.onUseRegExpChecked}),l.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(w,g[w])))),X=l.createElement("div",{className:"k-matches-container"},l.createElement(D.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},l.createElement(F.IconWrap,{name:"chevron-left",icon:x.chevronLeftIcon}),e.toLanguageString(f,g[f])),l.createElement("span",null,this.matchesMessage(e.toLanguageString(P,g[P]))),l.createElement(D.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(b,g[b]),l.createElement(F.IconWrap,{name:"chevron-right",icon:x.chevronRightIcon}))),j=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(n,g[n])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{id:"findWhat",type:"text",value:H,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))))}),Y=l.createElement(W.Form,{render:()=>l.createElement(W.FormElement,{horizontal:!0},l.createElement(W.FieldWrapper,null,l.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(c,g[c])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Input,{id:"replaceWith",type:"text",value:$,onChange:this.onReplaceChange}))))});return l.createElement(q.Window,{title:e.toLanguageString(a,g[a]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},l.createElement(Le.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},l.createElement(Le.TabStripTab,{title:e.toLanguageString(s,g[s])},j,E,X),l.createElement(Le.TabStripTab,{title:e.toLanguageString(r,g[r])},j,Y,l.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},l.createElement(D.Button,{disabled:!Q,onClick:this.onReplace},e.toLanguageString(p,g[p])),l.createElement(D.Button,{disabled:!Q,onClick:this.onReplaceAll},e.toLanguageString(d,g[d]))),E,X)))}};A.registerForLocalization(Ke),y.EditorDialogs=void 0,(t=>{class e extends tr{}t.InsertLinkDialog=e;class a extends lr{}t.InsertImageDialog=a;class s extends ar{}t.ViewHtmlDialog=s;class r extends Ke{}t.FindAndReplaceDialog=r})(y.EditorDialogs||(y.EditorDialogs={}));const{bold:qr,underline:Gr,italic:Jr}=y.EditorToolsSettings,nr=typeof navigator!="undefined"?/Mac/.test(navigator.platform):!1,Qr=t=>{const e=i.chainCommands(i.exitCode,(n,c)=>{const p=t&&t.types&&t.types.hardBreak||"hard_break",d=n.schema.nodes[p];return c&&c(n.tr.replaceSelectionWith(d.create()).scrollIntoView()),!0}),a=t&&t.types&&t.types.listItem||"list_item",s=t&&t.toolsSettings||{};return{"Mod-b":(n,c)=>i.toggleInlineFormat(s.bold||qr)(n,c),"Mod-i":(n,c)=>i.toggleInlineFormat(s.italic||Jr)(n,c),"Mod-u":(n,c)=>i.toggleInlineFormat(s.underline||Gr)(n,c),"Mod-z":i.undo,"Shift-Mod-z":i.redo,...nr?{}:{"Mod-y":i.redo},Backspace:i.undoInputRule,"Mod-Enter":e,"Shift-Enter":e,...nr?{"Ctrl-Enter":e}:{},Enter:(n,c)=>i.splitListItem(n.schema.nodes[a])(n,c),Tab:i.goToNextCell(1),"Shift-Tab":i.goToNextCell(-1)}};y.EditorUtils=void 0,(t=>{function e(S,L,z){return!!i.alignBlocks(L,z)(S.state,S.dispatch)}t.alignBlocks=e;function a(S,L,z){return i.applyInlineStyle(L,z)(S.state,S.dispatch)}t.applyInlineStyle=a;function s(S,L,z){return i.applyLink(L,z)(S.state,S.dispatch)}t.applyLink=s;function r(S,L){return i.canIndentAsListItem(S,L)}t.canIndentList=r;function n(S,L){return i.canInsert(S,L)}t.canInsert=n;function c(S,L){return i.canOutdentAsListItem(S,{listsTypes:L,nodes:[]})}t.canOutdentList=c;function p(S){return i.convertMsLists(S)}t.convertMsLists=p;function d(S,L,z){return i.parseContent(i.trimWhitespace(L),S,z!==void 0?z:{preserveWhitespace:"full"})}t.createDocument=d;function u(S,L,z){return i.createTable(S,L,z)}t.createTable=u;function h(S,L,z){return i.formatBlockElements(L,z)(S.state,S.dispatch)}t.formatBlockElements=h;function m(S){return i.getBlockFormats(S)}t.getBlockFormats=m;function w(S){return i.getHtml(S)}t.getHtml=w;function f(S,L){return i.getInlineStyles(S,L)}t.getInlineStyles=f;function b(S,L){return i.getMark(S,L)}t.getMark=b;function P(S,L){return i.hasMark(S,L)}t.hasMark=P;function T(S,L){return i.hasNode(S,L)}t.hasNode=T;function I(S,L,z,V){return!!i.indentBlocks(L,z,V)(S.state,S.dispatch)}t.indentBlocks=I;function B(S){return i.indentHtml(S)}t.indentHtml=B;function k(S,L,z){i.insertNode(L,z)(S.state,S.dispatch)}t.insertNode=k;function H(S,L){return i.isAligned(S,L)}t.isAligned=H;function $(S,L,z){return i.isIndented(S,L,z)}t.isIndented=$;function Q(S){return i.removeComments(S)}t.removeComments=Q;function E(S,L){return i.removeTag(S,L)}t.removeTag=E;function X(S,L){return i.pasteCleanup(S,L)}t.pasteCleanup=X;function j(S){i.sanitizeClassAttr(S)}t.sanitizeClassAttr=j;function Y(S){i.sanitizeStyleAttr(S)}t.sanitizeStyleAttr=Y;function Z(S){i.removeAttribute(S)}t.removeAttribute=Z;function re(S){return i.sanitize(S)}t.sanitize=re;function te(S,L){return i.replaceImageSourcesFromRtf(S,L)}t.replaceImageSourcesFromRtf=te;function he(S){return i.textHighlight(S)}t.textHighlight=he;function me(S){return i.imageResizing(S)}t.imageResizing=me;function se(){return i.tableResizing()}t.tableResizing=se;function fe(S,L,z,V){const le=i.trimWhitespace(L);i.setHtml(le,z,V)(S.state,S.dispatch)}t.setHtml=fe;function N(S,L,z,V){return i.toggleInlineFormat(L,z,V)(S.state,S.dispatch)}t.toggleInlineFormat=N;function ee(S,L,z){return i.toggleList(S.state,S.dispatch,S,L,z)}t.toggleList=ee;function ie(S){return Qr(S)}t.getShortcuts=ie,t.propsKey=Be,t.imageResizeKey=i.imageResizeKey,t.marks={...i.marks},t.nodes={...i.nodes}})(y.EditorUtils||(y.EditorUtils={}));const Re=(t,e)=>{const a=e.tr||t.state.tr.setSelection(new i.AllSelection(t.state.doc)).replaceSelectionWith(e.doc||y.EditorUtils.createDocument(t.state.schema,e.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(a))},Xr=(t,e,a,s,r)=>{typeof e=="string"?s&&e===r?Re(t,{tr:s}):e!==a&&Re(t,{html:e}):s&&e.eq(s.doc)?Re(t,{tr:s}):t.state.doc.eq(e)||Re(t,{doc:e})},or=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),cr={name:"@progress/kendo-react-editor",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},{link:pr,bold:Yr,italic:Zr,underline:es}=y.EditorToolsSettings;class Oe extends l.Component{constructor(e){super(e),this.state={view:void 0,linkDialog:!1},this._element=null,this._contentElement=null,this.iframe=null,this.trOnChange=null,this.htmlOnChange=null,this.showLicenseWatermark=!1,this.focus=()=>{this.view&&this.view.focus()},this.renderDialog=(a,s,r)=>this.state[r]&&l.createElement(a,{view:this.view,settings:s,dir:this.props.dir,onClose:()=>this.setState({[r]:!1})}),this.renderTool=(a,s)=>{const r=l.createElement(a,{view:this.view,dir:this.props.dir,key:s});return r.type===D.ToolbarSeparator?l.createElement(a,{key:s}):r},this.updateTools=(a,s)=>{this.setState({view:a})},this.filterTransaction=(a,s)=>{const r={target:this,transaction:a,state:s};return(this.props.onExecute&&this.props.onExecute.call(void 0,r))!==!1},this.onPasteHtml=a=>{if(this.props.onPasteHtml&&this.pasteEvent){const s={target:this,pastedHtml:a,nativeEvent:this.pasteEvent},r=this.props.onPasteHtml.call(void 0,s);if(this.pasteEvent=void 0,typeof r=="string")return r}return a},this.dispatchTransaction=a=>{const s=a.docChanged;if(this.props.onChange&&s){this.trOnChange=a;const r=a.doc,n=a.doc.type.schema,c={target:this,value:r,html:"",transaction:a,schema:n};Object.defineProperty(c,"html",{get:()=>(this.htmlOnChange=y.EditorUtils.getHtml({doc:r,schema:n}),this.htmlOnChange)}),this.props.onChange.call(void 0,c)}this.view&&(this.props.value===void 0||!s)&&this.view.updateState(this.view.state.apply(a))},this.onFocus=(a,s)=>{if(this.props.onFocus){const r={target:this,nativeEvent:s};this.props.onFocus.call(void 0,r)}return!1},this.onBlur=(a,s)=>{if(this.props.onBlur){const r={target:this,nativeEvent:s};this.props.onBlur.call(void 0,r)}return!1},this.onPaste=(a,s)=>(this.props.onPasteHtml&&(this.pasteEvent=s),!1),F.validatePackage(cr),this.showLicenseWatermark=F.shouldShowValidationUI(cr)}get value(){return this.trOnChange!==null?this.trOnChange.doc:this.props.value!==void 0?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!or)&&this.initialize()}componentDidUpdate(e){const{value:a}=this.props,s=this.view;a===void 0||!s||(Xr(s,a,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){this.view&&this.view.destroy(),this._view=void 0;const e=this.iframe&&this.iframe.contentWindow;if(e){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const a=e.document.head;for(;a&&a.firstChild;)a.removeChild(a.firstChild)}}render(){const{tools:e=[],defaultEditMode:a="iframe",preserveWhitespace:s="full",style:r,className:n}=this.props,c=A.provideLocalizationService(this);if(this.view){const u=Be.getState(this.view.state);u.preserveWhitespace=s}let p=this.props.contentStyle;p===void 0&&(r||{}).height===void 0&&(p={height:"300px"});const d=e.map((u,h)=>Array.isArray(u)?l.createElement(D.ButtonGroup,{key:h},u.map(this.renderTool,h)):this.renderTool(u,h));return l.createElement("div",{ref:u=>this._element=u,className:F.classNames("k-editor",n,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:r},d.length>0&&l.createElement(D.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},d),a==="iframe"?l.createElement("div",{className:"k-editor-content"},l.createElement("iframe",{onLoad:or?()=>{this.initialize()}:void 0,ref:u=>this.iframe=u,frameBorder:"0",title:c.toLanguageString(o.iframeTitle,g[o.iframeTitle]),style:p,className:"k-iframe"})):l.createElement("div",{style:p,className:"k-editor-content"},l.createElement("div",{ref:u=>this._contentElement=u,suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(y.EditorDialogs.InsertLinkDialog,pr,"linkDialog"),this.showLicenseWatermark&&l.createElement(F.WatermarkOverlay,null))}initialize(){const e=this.iframe&&this.iframe.contentWindow;if(e){const f=e.document;[Vr,Ur,this.props.dir==="rtl"?_r:void 0].forEach(P=>{if(P){const T=f.createElement("style");T.appendChild(f.createTextNode(P)),f.head.appendChild(T)}});const b=f.createElement("meta");b.setAttribute("charset","utf-8"),f.head.appendChild(b),this._contentElement=f.createElement("div"),f.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content")}const a=this._contentElement;if(!a)return;const{preserveWhitespace:s="full"}=this.props;let r=[new i.Plugin({view:()=>({update:this.updateTools}),key:new i.PluginKey("toolbar-tools-update-plugin")}),new i.Plugin({filterTransaction:this.filterTransaction,key:new i.PluginKey("onExecute-event-plugin")}),new i.Plugin({key:Be,state:{init:()=>({preserveWhitespace:s}),apply:(f,b)=>b}}),i.spacesFix(),i.caretColor(),i.history(),i.dropCursor(),i.gapCursor(),i.tableEditing(),i.cspFix()],n={...y.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:Yr,italic:Zr,underline:es}}),"Mod-k":()=>{const{linkDialog:f}=this.state,b=this.view;if(b){const P=b.state,T=P.selection.empty,I=i.getMark(P,P.schema.marks[pr.mark]);!f&&!(T&&!I)&&this.setState({linkDialog:!0})}return!f},"Alt-F10":()=>{var b;const f=(b=this.element)==null?void 0:b.querySelector(".k-toolbar");if(f){const P=f.querySelector(D.toolbarButtons.join(","));if(P)return P.focus(),!0}return!1}};const{defaultContent:c="",value:p,onMount:d}=this.props,u=p&&typeof p!="string"?p:y.EditorUtils.createDocument(new i.Schema({nodes:i.nodes,marks:i.marks}),p||c,{preserveWhitespace:s}),h={state:i.EditorState.create({plugins:[...r,i.keymap(n),i.keymap(i.baseKeymap)],doc:u}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(f,b,P,T)=>{let I=!1;return P.content.nodesBetween(0,P.content.size,B=>{I=I||B.type.name==="table_caption_external"}),I}},m={plugins:r,shortcuts:n,target:this,viewProps:h,dom:a},w=this._view=d&&d.call(void 0,m)||new i.EditorView({mount:a},h);this.setState({view:w})}}Oe.propTypes={defaultContent:R.string,value:R.oneOfType([R.object,R.string]),defaultEditMode:R.oneOf(["iframe","div"]),contentStyle:R.object,dir:R.string,className:R.string,ariaDescribedBy:R.string,ariaLabelledBy:R.string,ariaLabel:R.string,style:R.object,tools:R.arrayOf(R.any),keyboardNavigation:R.bool,resizable:R.bool,preserveWhitespace:R.oneOf([!0,!1,"full"]),onMount:R.func,onFocus:R.func,onBlur:R.func,onChange:R.func,onPasteHtml:R.func,onExecute:R.func},A.registerForLocalization(Oe);const ts="k-ct-cell k-disabled",ls="k-selected";class as extends l.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,a,s){const r=Math.floor(e/this.props.columns),n=e%this.props.columns,c=n<=s&&r<=a;return l.createElement("span",{className:ts+(c?` ${ls}`:""),onMouseEnter:()=>this.setState({row:r,col:n}),onClick:()=>this.props.onCellClick.call(void 0,r,n),key:e})}render(){const e=[],a=this.props.columns*this.props.rows,{row:s,col:r}=this.state,{onDown:n}=this.props;let c=this.props.createTableMessage;r>-1&&(c=sr(this.props.createTableHintMessage,s+1,r+1));for(let p=0;p<a;p++)e.push(this.renderCell(p,s,r));return[l.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:n,onMouseDown:n},e),l.createElement("div",{className:"k-status",key:"status",onPointerDown:n,onMouseDown:n},c)]}}var Me;(t=>{const e=class extends l.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=s=>{const{anchor:r}=this.props;r&&(r===s.target||r.firstElementChild===s.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(s){s.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:s,anchor:r,dir:n,rows:c=e.defaultProps.rows,columns:p=e.defaultProps.columns}=this.props,d=n==="rtl"?"right":"left";return l.createElement(Wr.Popup,{anchor:r,anchorAlign:{horizontal:d,vertical:"bottom"},popupAlign:{horizontal:d,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:s,style:n==="rtl"?{direction:"rtl"}:void 0},l.createElement(as,{rows:c,columns:p,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};let a=e;a.propTypes={show:R.bool.isRequired,createTableMessage:R.string.isRequired,createTableHintMessage:R.string.isRequired,onClose:R.func.isRequired,onTableInsert:R.func.isRequired,anchor:R.any,rows:R.number,columns:R.number,dir:R.string},a.defaultProps={rows:6,columns:8},t.InsertTablePopup=a})(Me||(Me={}));var Ve;(t=>{t.createInsertTableTool=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(r,n)=>{const{view:c}=this.props;if(!c)return;const{table:p,table_row:d,table_cell:u}=c.state.schema.nodes,h=i.createTable({table:p,table_row:d,table_cell:u},r,n);h&&i.insertNode(h,!0)(c.state,c.dispatch),c.focus(),this.closePopup()}}render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,d=A.provideLocalizationService(this),{createTable:u,createTableHint:h}=e.messages,m=d.toLanguageString(u,g[u]),w=d.toLanguageString(h,g[h]),f=!!(!p||!i.canInsert(p,p.schema.nodes.table)||_(p.selection.$from,P=>P.type.name==="table_caption_external")),b=[l.createElement(D.Button,{onClick:f?void 0:this.togglePopup,"aria-disabled":f?!0:void 0,ref:P=>this.button=P&&P.element,key:"InsertTable",...K,title:m,...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":f})}),r&&!f&&l.createElement(Me.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:w,dir:c.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return n?n.call(void 0,b,{view:r}):b}};return A.registerForLocalization(a),a}})(Ve||(Ve={}));const{alignRemove:dr}=y.EditorToolsSettings,rs=t=>{const e=class extends l.Component{render(){const{view:s,render:r,...n}=this.props,c=s&&s.state,p=!!c&&i.isAligned(c,t.actions),d=p?dr.actions:t.actions,u=p?dr.commandName:t.commandName,h=A.provideLocalizationService(this),m=t.messages.title,w=l.createElement(D.Button,{onClick:()=>s&&i.alignBlocks(d,u)(s.state,s.dispatch),selected:p,togglable:!0,...K,title:h.toLanguageString(m,g[m]),...t.props,...n});return r?r.call(void 0,w,{view:s}):w}};return A.registerForLocalization(e),e};var Ue;(t=>{t.createStyleDropDownList=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.onChange=r=>{const n=r.target.value,{view:c}=this.props,{style:p}=e;if(c){i.applyInlineStyle({style:p,value:n.value},e.commandName)(c.state,c.dispatch);const{syntheticEvent:d}=r;d&&d.type==="click"&&c.focus()}}}render(){const{style:r}=e,{view:n,render:c,data:p,defaultItem:d,...u}=this.props,h=p||e.items;let m=d||e.defaultItem;const w=n?i.getInlineStyles(n.state,{name:r,value:/^.+$/}):[],f=A.provideLocalizationService(this);m&&m.localizationKey&&(m={...m},m.text=m.localizationKey?f.toLanguageString(m.localizationKey,g[m.localizationKey]):m.text);const b=new Set(w).size===1?w[0]:null,P=l.createElement(O.DropDownList,{value:b&&h.find(T=>T.value===b),data:h,defaultItem:m,itemRender:ir,textField:"text",dataItemKey:"value",onChange:this.onChange,style:rr,leftRightKeysNavigation:!1,title:m.text,...u});return c?c.call(void 0,P,{view:n}):P}};return A.registerForLocalization(a),a}})(Ue||(Ue={}));const ur=t=>{const{view:e,style:a,colorPickerProps:s,commandName:r}=t,n=s.title,c=s.ariaLabel,{view:p="palette"}=s,d=A.useLocalization(),u=l.useCallback(h=>{e&&(i.applyInlineStyle({style:a,value:h.value},r)(e.state,e.dispatch),p==="palette"&&e.focus())},[e,a,p,r]);return l.createElement(C.ColorPicker,{onChange:u,onActiveColorClick:u,...s,title:n&&d.toLanguageString(n,g[n]),ariaLabel:c&&d.toLanguageString(c,g[c])})};var _e;(t=>{t.createFormatBlockDropDownList=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.onChange=r=>{const n=r.target.value,{view:c}=this.props;if(c&&i.formatBlockElements(n.value,e.commandName)(c.state,c.dispatch)){const{syntheticEvent:p}=r;p&&p.type==="click"&&c.focus()}}}render(){const{view:r,render:n,data:c,defaultItem:p,...d}=this.props,u=c||e.items;let h=p||e.defaultItem;const m=r&&r.state,w=m?i.getBlockFormats(m):[],f=A.provideLocalizationService(this);h&&h.localizationKey&&(h={...h},h.text=h.localizationKey?f.toLanguageString(h.localizationKey,g[h.localizationKey]):h.text);const b=new Set(w).size===1?w[0]:null,P=l.createElement(O.DropDownList,{value:b&&u.find(T=>T.value===b),onChange:this.onChange,itemRender:ir,data:u,defaultItem:h,textField:"text",dataItemKey:"value",style:rr,leftRightKeysNavigation:!1,title:h.text,...d});return n?n.call(void 0,P,{view:r}):P}};return A.registerForLocalization(a),a}})(_e||(_e={}));const G=(t,e)=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=A.provideLocalizationService(this),d=t.messages.title,u=r&&r.state,h=u?!e(u):!1,m=l.createElement(D.Button,{onClick:h?void 0:()=>r&&e(r.state,w=>r.dispatch(w.setMeta("commandName",t.commandName))),"aria-disabled":h?!0:void 0,...K,title:p.toLanguageString(d,g[d]),...t.props,...c,className:F.classNames(c.className,t.props.className,{"k-disabled":h})});return n?n.call(void 0,m,{view:r}):m}};return A.registerForLocalization(a),a};var ke;(t=>{t.createUndoTool=e=>G(e,i.undo),t.createRedoTool=e=>G(e,i.redo)})(ke||(ke={}));var $e;(t=>{t.createIndentTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=c.dir,d=r&&r.state,u=d&&d.schema.nodes,h=u&&u[e.listsTypes.listItem],m=e.actions,w=!!d&&!!h&&(i.isIndented(d,m,p)||m.some(k=>u&&u[k.node]&&i.hasNode(d,u[k.node])))&&!i.hasNode(d,h),f=!!d&&i.canIndentAsListItem(d,h),b=w||f,P=A.provideLocalizationService(this),T=e.messages.title,I=!b,B=l.createElement(D.Button,{onClick:I?void 0:()=>{r&&f&&h?i.sinkListItem(h)(r.state,r.dispatch):r&&w&&i.indentBlocks(m,e.commandName,p)(r.state,r.dispatch)},"aria-disabled":I?!0:void 0,title:P.toLanguageString(T,g[T]),...K,...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":I})});return n?n.call(void 0,B,{view:r}):B}};return A.registerForLocalization(a),a}})($e||($e={}));var Ee;(t=>{t.createInlineFormatTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,{mark:d,altMarks:u,altStyle:h}=e,m={mark:d,altMarks:u,altStyle:h},w=A.provideLocalizationService(this),f=e.messages.title,b=l.createElement(D.Button,{onClick:()=>r&&i.toggleInlineFormat(m,p&&p.tr.setMeta("commandName",e.commandName))(r.state,r.dispatch),selected:!!p&&i.hasMark(p,m),togglable:!0,...K,title:w.toLanguageString(f,g[f]),...e.props,...c});return n?n.call(void 0,b,{view:r}):b}};return A.registerForLocalization(a),a}})(Ee||(Ee={}));const ss=t=>{const e=class extends l.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:s,render:r,...n}=this.props,c=s&&s.state,p=c?c.schema.nodes[t.node]:void 0,d=A.provideLocalizationService(this),{insertImage:u}=t.messages,h=!p||!c||!i.canInsert(c,p),m=[l.createElement(D.Button,{onClick:h?void 0:this.toggleDialog,"aria-disabled":h?!0:void 0,key:"insertImage",...K,title:d.toLanguageString(u,g[u]),...t.props,...n,className:F.classNames(n.className,t.props.className,{"k-disabled":h})}),this.state.openedDialog&&s&&l.createElement(y.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:s,settings:t,dir:n.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,m,{view:s}):m}};return A.registerForLocalization(e),e};var je;(t=>{t.createLinkTool=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,d=p?p.selection.empty:!0,u=p&&i.getMark(p,p.schema.marks[e.mark]),h=A.provideLocalizationService(this),{insertHyperlink:m}=e.messages,w=d&&!u,f=[l.createElement(D.Button,{onClick:w?void 0:this.toggleDialog,"aria-disabled":w?!0:void 0,key:"link",...K,title:h.toLanguageString(m,g[m]),...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":w})}),this.state.openedDialog&&r&&l.createElement(y.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:e,dir:c.dir,view:r,onClose:this.toggleDialog})||null];return n?n.call(void 0,f,{view:r}):f}};return A.registerForLocalization(a),a}})(je||(je={}));var qe;(t=>{t.createListTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props;let p=!1;const d=A.provideLocalizationService(this),u=e.messages.title,h=e.types,m=e.listType;if(r){const f=r.state,b=f.schema.nodes,P=i.hasNode(f,b[h.orderedList]),T=i.hasNode(f,b[h.bulletList]);m===h.orderedList?p=P&&!T:p=!P&&T}const w=l.createElement(D.Button,{onClick:()=>r&&i.toggleList(r.state,r.dispatch,r,{listType:m,...h},e.commandName),togglable:!0,selected:p,title:d.toLanguageString(u,g[u]),...K,...e.props,...c});return n?n.call(void 0,w,{view:r}):w}};return A.registerForLocalization(a),a}})(qe||(qe={}));var Ge;(t=>{t.createOutdentTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p=r&&r.state,d=c.dir,u=!!p&&i.isIndented(p,e.actions,d),h=p&&p.schema.nodes[e.listsTypes.listItem],m=!!p&&i.canOutdentAsListItem(p,{nodes:e.actions,listsTypes:e.listsTypes}),w=u||m,f=A.provideLocalizationService(this),b=e.messages.title,P=!w,T=l.createElement(D.Button,{onClick:P?void 0:()=>{r&&m&&h?i.liftListItem(h)(r.state,r.dispatch):r&&u&&i.indentBlocks(e.actions,e.commandName,d)(r.state,r.dispatch)},"aria-disabled":P?!0:void 0,title:f.toLanguageString(b,g[b]),...K,...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":P})});return n?n.call(void 0,T,{view:r}):T}};return A.registerForLocalization(a),a}})(Ge||(Ge={}));const gr=(t,e)=>{const a=i.deleteColumn(t,e);if(a&&!e){const s=i.selectionCell(t),r=s&&s.node(s.depth);if(r&&r.content.childCount===1)return!1}return a},hr=(t,e)=>{const a=i.deleteRow(t,e);if(a&&!e){const s=i.selectionCell(t),r=s&&s.node(s.depth-1);if(r&&r.content.childCount===1)return!1}return a};var J;(t=>{t.createAddRowBeforeTool=e=>G(e,i.addRowBefore),t.createAddRowAfterTool=e=>G(e,i.addRowAfter),t.createAddColumnBeforeTool=e=>G(e,i.addColumnBefore),t.createAddColumnAfterTool=e=>G(e,i.addColumnAfter),t.createDeleteRowTool=e=>G(e,hr),t.createDeleteColumnTool=e=>G(e,gr),t.createDeleteTableTool=e=>G(e,i.deleteTable),t.createMergeCellsTool=e=>G(e,i.mergeCells),t.createSplitCellTool=e=>G(e,i.splitCell)})(J||(J={}));var Je;(t=>{t.createUnlinkTool=e=>{const a=class extends l.Component{render(){const{view:r,render:n,...c}=this.props,p={mark:e.mark},d=r?i.hasMark(r.state,p):!1,u=A.provideLocalizationService(this),h=e.messages.title,m=!d,w=l.createElement(D.Button,{onClick:m?void 0:()=>r&&i.removeLink(p,r.state.tr.setMeta("commandName",e.commandName))(r.state,r.dispatch),"aria-disabled":m?!0:void 0,...K,title:u.toLanguageString(h,g[h]),...e.props,...c,className:F.classNames(c.className,e.props.className,{"k-disabled":m})});return n?n.call(void 0,w,{view:r}):w}};return A.registerForLocalization(a),a}})(Je||(Je={}));var Qe;(t=>{t.createViewHtmlTool=e=>{const a=class extends l.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:r,render:n,...c}=this.props,p=A.provideLocalizationService(this),d=e.messages.viewHtml,u=[l.createElement(D.Button,{onClick:this.toggleDialog,key:"viewHtml",...K,title:p.toLanguageString(d,g[d]),...e.props,...c}),this.state.openedDialog&&r&&l.createElement(y.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:r,settings:e,dir:c.dir,onClose:this.toggleDialog})||null];return n?n.call(void 0,u,{view:r}):u}};return A.registerForLocalization(a),a}})(Qe||(Qe={}));const{print:is}=y.EditorToolsSettings,ns=t=>{const{view:e,render:a,settings:s=is,...r}=t,n=e&&e.dom,c=n&&n.ownerDocument,p=c&&c.defaultView,d=s.messages.title,u=!p||p===window,h=l.useCallback(()=>{p&&p.print()},[p]),m=l.createElement(D.Button,{onClick:u?void 0:h,"aria-disabled":u?!0:void 0,title:A.useLocalization().toLanguageString(d,g[d]),...K,...s.props,...r,className:F.classNames(r.className,s.props.className,{"k-disabled":u})});return a?a.call(void 0,m,{view:e}):m},{pdf:os,savePdfOptions:cs}=y.EditorToolsSettings,ps=t=>{const{view:e,render:a,settings:s=os,savePdfOptions:r,savePdfCallback:n,...c}=t,p=s.messages.title,d=l.useCallback(()=>{e&&Kr.savePDF(e.dom,{...cs,...r||{}},n)},[e,r,n]),u=l.createElement(D.Button,{onClick:d,title:A.useLocalization().toLanguageString(p,g[p]),...K,...s.props,...c});return a?a.call(void 0,u,{view:e}):u},{selectAll:ds}=y.EditorToolsSettings,us=t=>{const{view:e,render:a,settings:s=ds,...r}=t,n=s.messages.title,c=l.useCallback(()=>{e&&(i.selectAll(e.state,e.dispatch),e.focus())},[e]),p=l.createElement(D.Button,{onClick:c,title:A.useLocalization().toLanguageString(n,g[n]),...K,...s.props,...r});return a?a.call(void 0,p,{view:e}):p},{cleanFormatting:gs}=y.EditorToolsSettings,mr=i.cleanFormatting(),hs=t=>{const{view:e,render:a,settings:s=gs,...r}=t,n=s.messages.title,c=!e||!mr(e.state),p=l.useCallback(()=>{e&&mr(e.state,u=>{u.setMeta("commandName",s.commandName),e.dispatch(u)})},[e]),d=l.createElement(D.Button,{onClick:c?void 0:p,"aria-disabled":c?!0:void 0,title:A.useLocalization().toLanguageString(n,g[n]),...K,...s.props,...r,className:F.classNames(t.className,s.props.className,{"k-disabled":c})});return a?a.call(void 0,d,{view:e}):d},fr=y.EditorToolsSettings.findAndReplace;let br=class extends l.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...a}=this.props,{props:s}=fr,r=A.provideLocalizationService(this),n=fr.messages.findReplaceToolTitle,c=!e;return[l.createElement(D.Button,{onClick:c?void 0:this.onOpen,"aria-disabled":c?!0:void 0,...K,title:r.toLanguageString(n,g[n]),key:"tool",...s,...a,className:F.classNames(a.className,s.className,{"k-disabled":c})}),this.state.showDialog&&e&&l.createElement(Ke,{view:e,onClose:this.onClose,dir:a.dir,key:"dialog"})]}};A.registerForLocalization(br);const vr=(t,e)=>{let{from:a,to:s}=t.selection,r=null;return t.doc.nodesBetween(a,s,n=>(r=r||(n.type===e?n:null),!r)),r},yr=t=>{let e=!1;const a=t.view,s=ge,r=t.listType,n=A.useLocalization();let c=[...t.items||[]],p,d;if(a){const m=a.state,w=m&&m.schema.nodes;p=w&&vr(m,w[s.orderedList]),d=w&&vr(m,w[s.bulletList]),e=!!(r===s.orderedList?p&&!d:!p&&d)}const u=m=>{a&&(i.toggleList(a.state,a.dispatch,a,{listType:r,...s,listAttrs:{}},"InsertList"),a.focus())},h=m=>{if(a){const w=m.item.style?{style:"list-style-type: "+m.item.style+";"}:{},f=p||d;if(f&&i.listStyle(f.attrs)!==m.item.style){const b=a.state.selection.$head.posAtIndex(0,-2)-1;a.dispatch(a.state.tr.setNodeMarkup(b,a.state.schema.nodes[r],w))}else i.toggleList(a.state,a.dispatch,a,{listType:r,...s,listAttrs:w},"InsertList");a.focus()}};if(e&&(p||d)){const m=i.listStyle((p||d).attrs);c=c.map((w,f)=>({...w,selected:m?w.style===m:f===0}))}return l.createElement("span",{onMouseDown:m=>{m.preventDefault()}},l.createElement(D.SplitButton,{textField:"text",items:c,icon:t.icon,svgIcon:t.svgIcon,onButtonClick:u,onItemClick:h,buttonClass:e?"k-selected":void 0,title:t.title!==void 0?t.title:n.toLanguageString(t.titleKey,g[t.titleKey])}))},ms=/[\D]+$/,Xe=t=>{const e=t.match(ms);return e?e[0]:""},Ye=(t,e)=>{var s;const a=ae(((s=t.attrs)==null?void 0:s.style)||"")[e]||"";return{[e]:parseFloat(a)||null,[e+"Unit"]:Xe(a)}},ae=t=>(t||"").split(/\s*;\s*/).filter(Boolean).map(a=>{const s=a.split(/\s*:\s*/);return{[s[0]]:s[1]}}).reduce((a,s)=>({...a,...s}),{}),fs=(t,e)=>{const a=e.style,s=e.value,r=e.newValue;if(!t)return{changed:!1,style:null};const n=t.split(/\s*;\s*/).filter(p=>!!p),c=n.filter(p=>{const d=p.split(/\s*:\s*/);return!(d[0].toLowerCase()===a&&s.test(d[1]))});return r&&c.push(`${a}: ${r}`),{style:c.join("; ")+(c.length?";":""),changed:!!r||c.length!==n.length}},bs=/^.+$/;function M(t,e,a){let s;if(new RegExp("[^-]?"+e+":").test(t.style||"")){const{style:r}=fs(t.style||"",{style:e,value:bs,newValue:a});s={...t,style:r}}else if(t.style){const r=ae(t.style);r[e]=a,s={...t,style:Object.keys(r).filter(n=>!!r[n]).reduce((n,c)=>n+c+": "+r[c]+"; ","").trim()}}else a?s={...t,style:e+": "+a+";"}:s={...t};return s}const vs=t=>{const{doc:e,selection:a}=t,s=[];return a.ranges.forEach(r=>{const n=r.$from.pos,c=r.$to.pos;e.nodesBetween(n,c,(p,d,u,h)=>{(p.type.name==="table_cell"||p.type.name==="table_header")&&s.push({node:p,pos:d})})}),s},He=t=>{const e=_(t.selection.$from,s=>s.type.name==="table"),a=_(t.selection.$to,s=>s.type.name==="table");return e&&a&&e.depth===a.depth&&e.node.eq(a.node)?vs(t).filter(({pos:r})=>{const n=_(t.doc.resolve(r),c=>c.type.name==="table");return n&&n.depth===e.depth&&e.node.eq(n.node)}):[]},wr=t=>{const e=[];if(He(t).length){const a=t.selection.$from,s=_(a,d=>d.type.spec.tableRole==="table");if(s===null)return e;const r=a.start(s.depth),n=s.node,c=i.TableMap.get(n),p=t.doc;c.map.forEach(d=>{const u=d+r;e.push({pos:u,node:p.nodeAt(u)})})}return e},Ae="k-colgroup-data",ys=(t,e,a)=>{const s={cellWidth:null,widthUnit:""},r=e.node,n=a.start(e.depth);if(!r.attrs[Ae])return s;const c=new Set;let p="";const d=i.htmlToFragment(r.attrs[Ae]).firstChild;return t.forEach(u=>{const h=r.resolve(u.pos-n),m=h.parent,w=h.index();let f=0;for(let P=0;P<=w;P++)f+=m.child(P).attrs.colspan;let b=d.children[f-1];b&&(p=b.style.width,c.add(p))}),c.size===1&&p&&(s.cellWidth=parseFloat(p)||null,s.widthUnit=Xe(p)),s},ws=(t,e,a)=>{const s={cellHeight:null,heightUnit:""},r=e.node,n=a.start(e.depth),c=new Set;let p="";return t.forEach(d=>{var m;const h=r.resolve(d.pos-n).parent;p=ae(((m=h.attrs)==null?void 0:m.style)||"").height||"",c.add(p)}),c.size===1&&p&&(s.cellHeight=parseFloat(p)||null,s.heightUnit=Xe(p)),s},oe=(t,e)=>{const a=new Set;let s="";return t.forEach(r=>{var n;s=ae(((n=r.node.attrs)==null?void 0:n.style)||"")[e]||"",a.add(s)}),a.size===1&&s?s:""},Sr=(t,e)=>{const a=new Set;let s="";return t.forEach(r=>{s=(r.node.attrs||{})[e]||"",a.add(s)}),a.size===1&&s?s:""},Pr={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},Ss=t=>{const e=He(t),a=t.selection.$from,s=e.length?_(a,r=>r.type.spec.tableRole==="table"):null;return s?{...Pr,...ys(e,s,a),...ws(e,s,a),alignment:{x:oe(e,"text-align"),y:oe(e,"vertical-align")},textControl:oe(e,"white-space"),backgroundColor:oe(e,"background-color")||void 0,cellPadding:parseFloat(oe(e,"padding"))||null,borderWidth:parseFloat(oe(e,"border-width"))||null,borderColor:oe(e,"border-color")||void 0,borderStyle:oe(e,"border-style")||null,id:Sr(e,"id"),className:Sr(e,"class")}:Pr},Ps=(t,e,a)=>{const s=t.doc.resolve(e),r=s.parent,n=s.index();let c=0;for(let m=0;m<=n;m++)c+=r.child(m).attrs.colspan;const p=s.node(s.depth-1),d=s.posAtIndex(0,s.depth-1)-1;let u=p.attrs,h;if(u&&u[Ae]){const m=i.htmlToFragment(u[Ae]).firstChild;h=m.children[c-1],h.style.width=a,u={...u,[Ae]:m.outerHTML},t.setNodeMarkup(d,null,u)}else{let m=0;for(let b=0;b<r.childCount;b++)m+=r.child(b).attrs.colspan;const w=document.createElement("colgroup"),f=new Array(m);for(let b=0;b<m;b++)f[b]=document.createElement("col"),w.appendChild(f[b]);h=f[n],h.style.width=a,u={...u,[Ae]:"<colgroup>"+f.reduce((b,P)=>b+P.outerHTML,"")+"</colgroup>"},t.setNodeMarkup(d,null,u)}},xs=(t,e,a)=>{let s=t.doc.resolve(e),r=s.parent;const n=s.posAtIndex(0)-1;t.setNodeMarkup(n,null,M(r.attrs,"height",a))},Ns=(t,e,a)=>{a.forEach(({node:s,pos:r})=>{let n={...s.attrs};n=M(n,"border-color",e.borderColor||""),n=M(n,"border-style",e.borderStyle||""),n=M(n,"border-width",typeof e.borderWidth=="number"?e.borderWidth+"px":""),n=M(n,"padding",typeof e.cellPadding=="number"?e.cellPadding+"px":""),n=M(n,"background-color",e.backgroundColor||""),n=M(n,"text-align",e.alignment.x||""),n=M(n,"vertical-align",e.alignment.y||""),n=M(n,"white-space",e.textControl||""),n.id=e.id||null,n.class=e.className||null,t.setNodeMarkup(r,null,n),typeof e.cellWidth=="number"&&Ps(t,r,e.cellWidth+(e.widthUnit||"px")),typeof e.cellHeight=="number"&&xs(t,r,e.cellHeight+(e.heightUnit||"px"))})},Ts=(t,e)=>{const a=t.tr,s=e.applyToAll?wr(t):He(t);return Ns(a,e,s),a},Ls=t=>{const{view:e,...a}=t,[s,r]=l.useState(!1),n=A.useLocalization(),c=!!(e&&_(e.state.selection.$from,h=>h.type.spec.tableRole==="table")),p=l.useCallback(()=>{r(!0)},[]),d=l.useCallback(()=>{r(!1),e==null||e.focus()},[e]),u=l.useCallback(h=>{if(e&&h){const m=Ts(e.state,h);m.docChanged&&e.dispatch(m)}d()},[e,d]);return l.createElement(l.Fragment,null,l.createElement(D.Button,{type:"button",title:n.toLanguageString(o.cellProperties,g[o.cellProperties]),icon:"table-cell-properties",svgIcon:x.tableCellPropertiesIcon,onClick:p,disabled:!c,...K,...a}),s&&e&&l.createElement(As,{view:e,onCancel:d,onSave:u}))},xr=[{textKey:o.cellPropertiesLeftTop,text:g[o.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:x.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:o.cellPropertiesCenterTop,text:g[o.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:x.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:o.cellPropertiesRightTop,text:g[o.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:x.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:o.cellPropertiesLeftMiddle,text:g[o.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:x.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:o.cellPropertiesCenterMiddle,text:g[o.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:x.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:o.cellPropertiesRightMiddle,text:g[o.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:x.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:o.cellPropertiesLeftBottom,text:g[o.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:x.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:o.cellPropertiesCenterBottom,text:g[o.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:x.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:o.cellPropertiesRightBottom,text:g[o.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:x.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:o.cellPropertiesNoAlignment,text:g[o.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:x.tableAlignRemoveIcon,value:{x:"",y:""}}],Nr=[{textKey:o.cellPropertiesWrap,text:g[o.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:x.textWrapIcon},{textKey:o.cellPropertiesFitToCell,text:g[o.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:x.parameterStringIcon}],Ce=(t,e)=>e?l.createElement(l.Fragment,null,l.createElement(C.InputPrefix,null,l.createElement(F.IconWrap,{icon:e.svgIcon,name:e.icon})),t):t,Ie=(t,e)=>{const a=l.createElement(l.Fragment,null,l.createElement(C.InputPrefix,null,l.createElement(F.IconWrap,{icon:e.dataItem.svgIcon,name:e.dataItem.icon})),t.props.children);return l.cloneElement(t,t.props,a)},As=t=>{const e=l.useMemo(()=>Ss(t.view.state),[t.view]),a=A.useLocalization(),s=l.useRef(null),r=e.applyToAll,n=l.useRef(null),c=e.cellWidth,p=l.useRef(null);e.widthUnit&&!ne.includes(e.widthUnit)&&ne.push(e.widthUnit);const d=e.widthUnit||"",u=l.useRef(null),h=e.cellHeight,m=l.useRef(null);e.heightUnit&&!ne.includes(e.heightUnit)&&ne.push(e.heightUnit);const w=e.heightUnit||"",f=l.useRef(null),b=xr.find(N=>N.value.x!==void 0&&e.alignment&&N.value.x===e.alignment.x&&N.value.y===e.alignment.y)||null,P=l.useRef(null),T=Nr.find(N=>N.value===e.textControl),I=l.useRef(null),B=e.backgroundColor,k=l.useRef(null),H=e.cellPadding,$=l.useRef(null),Q=e.borderWidth,E=l.useRef(null),X=e.borderColor,j=l.useRef(null),Y=ze.find(N=>N.value===e.borderStyle),Z=l.useRef(null),re=e.id,te=l.useRef(null),he=e.className,me=l.useCallback(()=>{var ee,ie,S,L,z,V,le,ce,pe,de,ue,be,ve,ye,we,Se,Pe,xe,Ne,Te;const N={applyToAll:!!((ie=(ee=s.current)==null?void 0:ee.element)!=null&&ie.checked),cellWidth:((S=n.current)==null?void 0:S.value)||null,widthUnit:((L=p.current)==null?void 0:L.value)||"",cellHeight:((z=u.current)==null?void 0:z.value)||null,heightUnit:((V=m.current)==null?void 0:V.value)||"",alignment:(ce=(le=f.current)==null?void 0:le.value)==null?void 0:ce.value,textControl:(de=(pe=P.current)==null?void 0:pe.value)==null?void 0:de.value,backgroundColor:(ue=I.current)==null?void 0:ue.value,cellPadding:typeof((be=k.current)==null?void 0:be.value)=="number"?(ve=k.current)==null?void 0:ve.value:null,borderWidth:typeof((ye=$.current)==null?void 0:ye.value)=="number"?(we=$.current)==null?void 0:we.value:null,borderColor:(Se=E.current)==null?void 0:Se.value,borderStyle:((xe=(Pe=j.current)==null?void 0:Pe.value)==null?void 0:xe.value)||null,id:String(((Ne=Z.current)==null?void 0:Ne.value)||""),className:String(((Te=te.current)==null?void 0:Te.value)||"")};t.onSave.call(void 0,N)},[t.onSave]),se=l.createElement("div",{className:"k-form k-form-md"},l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("div",{className:"k-form-field-wrap"},l.createElement("span",{className:"k-checkbox-wrap"},l.createElement(C.Checkbox,{ref:s,defaultChecked:r})),l.createElement("label",{className:"k-checkbox-label"},a.toLanguageString(o.cellPropertiesApplyToAllCells,g[o.cellPropertiesApplyToAllCells])))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesWidth,g[o.cellPropertiesWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:n,defaultValue:c,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}),l.createElement("div",{className:"k-form-hint"},a.toLanguageString(o.cellPropertiesApplyToColumn,g[o.cellPropertiesApplyToColumn])))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:p,defaultValue:d,data:ne,popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesHeight,g[o.cellPropertiesHeight])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:u,defaultValue:h,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}),l.createElement("div",{className:"k-form-hint"},a.toLanguageString(o.cellPropertiesApplyToRow,g[o.cellPropertiesApplyToRow])))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:m,defaultValue:w,data:ne,popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesAlignment,g[o.cellPropertiesAlignment])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:f,defaultValue:b,data:xr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"text",popupSettings:U,valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesTextControl,g[o.cellPropertiesTextControl])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:P,defaultValue:T,data:Nr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value",popupSettings:U,valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesCellPadding,g[o.cellPropertiesCellPadding])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:k,defaultValue:H,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBackground,g[o.cellPropertiesBackground])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:I,defaultValue:B}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBorderWidth,g[o.cellPropertiesBorderWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:$,defaultValue:Q,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBorderColor,g[o.cellPropertiesBorderColor])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:E,defaultValue:X}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesBorderStyle,g[o.cellPropertiesBorderStyle])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:j,defaultValue:Y,popupSettings:U,data:ze,textField:"text",dataItemKey:"value"}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesId,g[o.cellPropertiesId])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:Z,defaultValue:re}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.cellPropertiesCssClass,g[o.cellPropertiesCssClass])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:te,defaultValue:he})))))),fe=[l.createElement(D.Button,{themeColor:"primary",key:"save",onClick:me},a.toLanguageString(o.cellPropertiesSave,g[o.cellPropertiesSave])),l.createElement(D.Button,{onClick:t.onCancel,key:"cancel"},a.toLanguageString(o.cellPropertiesCancel,g[o.cellPropertiesCancel]))];return l.createElement(q.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(o.cellProperties,g[o.cellProperties]),onClose:t.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},se,l.createElement(q.WindowActionsBar,{layout:"start"},...fe))},Ze={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},Fe={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},Tr=t=>{const e=[];for(let a=0;a<t.height;a++){const s=a*t.width,r=s+t.width;e.push(t.map.slice(s,r))}return e},Cs=(t,e)=>{let a=0,s=0;const r=Tr(e);r.forEach(n=>{let c=!0;n.forEach(p=>{const d=t.nodeAt(p);d&&d.type.name!=="table_header"&&(c=!1)}),c&&a++});for(let n=0;n<e.width;n++){let c=!0;for(let p=0;p<e.height;p++){const d=r[p]&&r[p][n],u=typeof d=="number"&&t.nodeAt(d);u&&u.type.name!=="table_header"&&(c=!1)}c&&s++}return{rows:a,columns:s}},Is=t=>{const e=new Set;return t.content.forEach(a=>{a.content.forEach(s=>{e.add(ae(s.attrs.style).padding||"")})}),e.size===1?Array.from(e)[0]:""},Ds=t=>{let e=!0,a=!0;return t.content.forEach(s=>{s.content.forEach(r=>{let n=r.type.name==="table_header",c=r.type.name==="table_cell";n&&!r.attrs.scope&&(e=!1),(n&&!r.attrs.id||c&&!r.attrs.headers)&&(a=!1)})}),e?"scope":a?"id":"none"},Bs=t=>{var f,b,P;const e=He(t),a=t.selection.$from,s=e.length?_(a,T=>T.type.spec.tableRole==="table"):null;if(!s)return Ze;const r=_(a,T=>T.type.name==="table_wrapper");let n="",c={},p={};r&&(p=ae(r.node.attrs.style),r.node.content.forEach(T=>{if(T.type.name==="table_caption_external"){const I=i.pmDocToFragment(T);n=i.fragmentToHtml(I),n=n==="<img>"?"":n,c=ae(T.attrs.style)}}));const d=ae(((f=s.node.attrs)==null?void 0:f.style)||""),u=i.TableMap.get(s.node),h=p["margin-left"]==="auto"&&p["margin-right"]==="auto"?"center":p["margin-right"]==="auto"?"left":p["margin-left"]==="auto"?"right":null,m=Cs(s.node,u),w=Is(s.node);return{...Ze,columns:u.width,rows:u.height,...Ye(s.node,"width"),...r&&/%/.test(p.width||"")?Ye(r.node,"width"):{},...Ye(s.node,"height"),textAlign:d["text-align"]||"",position:h||null,cellPadding:w?parseFloat(w):null,cellSpacing:d["border-spacing"]?parseFloat(d["border-spacing"]):null,backgroundColor:d["background-color"],borderWidth:d["border-width"]?parseFloat(d["border-width"]):null,borderColor:d["border-color"],borderStyle:d["border-style"]||null,collapseBorders:d["border-collapse"]==="collapse",caption:n||void 0,captionAlignment:c["text-align"]||"",captionPosition:c["caption-side"]||null,headerRows:m.rows,headerColumns:m.columns,associateHeaders:m.rows||m.columns?Ds(s.node):"none",id:((b=s.node.attrs)==null?void 0:b.id)||"",className:((P=s.node.attrs)==null?void 0:P.class)||""}},Lr=t=>{const a=t.lastChild.lastChild;return{node:a,pos:t.content.size-a.nodeSize}},Ar=(t,e,a,s,r)=>{const n=Lr(a),c=e+n.pos;if(!t.doc.nodeAt(c))return t;const d=t.doc.resolve(c),u=new i.CellSelection(d,d),h=t.tr.setSelection(u);let m=t.apply(h);for(let w=0;w<s;w++)r(m,f=>{m=m.apply(f)});return m},Cr=(t,e,a,s)=>{let r=t;for(let n=0;n<a;n++){const c=r.doc.nodeAt(e);if(c){const p=Lr(c),d=e+p.pos,u=r.doc.resolve(d),h=new i.CellSelection(u,u),m=r.tr.setSelection(h);r=r.apply(m),s(r,w=>{r=r.apply(w)})}}return r},zs=(t,e,a,s)=>{let r=t,n=r.doc.nodeAt(e);if(!n)return r;let c=i.TableMap.get(n);return c.width===s&&c.height===a||(s>c.width?r=Ar(r,e,n,s-c.width,i.addColumnAfter):s<c.width&&(r=Cr(r,e,c.width-s,gr)),n=r.doc.nodeAt(e),!n)||(c=i.TableMap.get(n),a>c.height?r=Ar(r,e,n,a-c.height,i.addRowAfter):a<c.height&&(r=Cr(r,e,c.height-a,hr))),r},Rs=(t,e,a)=>{const s=t.doc.nodeAt(a);if(!s)return t;let r={...s.attrs};const n=e.width!==null&&(e.widthUnit!=="%"||!e.caption&&!e.position);r=M(r,"width",n?e.width+e.widthUnit:""),r=M(r,"height",e.height!==null?e.height+e.heightUnit:""),r=M(r,"text-align",e.textAlign||""),r=M(r,"background-color",e.backgroundColor||""),r=M(r,"border-width",e.borderWidth?e.borderWidth+"px":""),r=M(r,"border-style",e.borderStyle||""),r=M(r,"border-color",e.borderColor||""),r=M(r,"border-spacing",e.cellSpacing!==null?e.cellSpacing+"px":""),e.cellSpacing!==null?r=M(r,"border-collapse","unset"):r=M(r,"border-collapse",e.collapseBorders?"collapse":"");const c=Fe[e.position||""]||{};Object.keys(c).forEach(d=>{r=M(r,d,c[d])}),r.id=e.id||null,r.class=e.className||null;const p=t.tr.setNodeMarkup(a,null,r);return t=t.apply(p),t},Ir=(t,e,a,s,r)=>{if(e.type.name!==s.name||Object.keys(r).length>0){const n=t.tr.setNodeMarkup(a,s,{...e.attrs,...r});return t.apply(n)}return t},Ms=(t,e)=>{/^cell-[0-9]+-[0-9]+$/.test(t.attrs.id||"")&&(e.id=null)},ks=(t,e,a)=>{const s=t.doc.nodeAt(a),r=s&&i.TableMap.get(s);if(!s||!r)return t;const n=Tr(r);let c=t;const{table_header:p,table_cell:d}=t.schema.nodes,u=String(new Date().getTime()),h=[],m=(f,b)=>{const P=`cell-${f}${b}-${u}`;return h[f]||h.push([]),h[f][b]||h[f].push([]),h[f][b]=P,P},w=(f,b,P,T)=>{const I=[];if(T)for(let B=0;B<f;B++)h[B]&&h[B][b]&&I.push(h[B][b]);if(P)for(let B=0;B<b;B++)h[f]&&h[f][B]&&I.push(h[f][B]);return I.join(" ")};return n.forEach((f,b)=>{f.forEach((P,T)=>{const I=s.nodeAt(P);if(I){const B=T<e.headerColumns,k=b<e.headerRows,H={...I.attrs};Ms(I,H),H.headers=null,H.scope=null,k||B?(e.associateHeaders==="scope"&&(H.scope=k?"col":"row"),e.associateHeaders==="id"&&(H.id=m(b,T),(T>0||b>0)&&(H.headers=w(b,T,B,k)||null)),c=Ir(c,I,a+P+1,p,H)):(e.associateHeaders==="id"&&(H.headers=w(b,T,e.headerColumns>0,e.headerRows>0)||null),c=Ir(c,I,a+P+1,d,H))}})}),c},Hs=(t,e,a,s)=>{let r={...e.attrs};return r=M(r,"margin-left",""),r=M(r,"margin-right",""),Object.keys(s||{}).forEach(n=>{r=M(r,n,(s||{})[n]||"")}),t.apply(t.tr.setNodeMarkup(a,null,r))},Dr=(t,e)=>i.parseContent("<p>"+t+"</p>",e).content.firstChild.content,Br=(t,e)=>{if(!t.caption)return;let a={caption:"",style:"display: table-caption"};t.captionAlignment&&(a=M(a,"text-align",t.captionAlignment)),t.captionPosition&&(a=M(a,"caption-side",t.captionPosition));const s=Dr(t.caption,e);return s&&e.nodes.table_caption_external.createAndFill(a,s)||void 0},zr=t=>t.firstChild&&t.firstChild.type.name==="table_caption_external",Fs=(t,e,a,s)=>{let r=t,n;const c=a+2,p=a+1,d=r.schema;if(zr(e))if(n=e.firstChild,s.caption){const u=Dr(s.caption,d);if(r=r.apply(r.tr.replaceWith(c,c+n.content.size,u)),n=r.doc.nodeAt(p),n){let h={...n.attrs};h=M(h,"text-align",s.captionAlignment||""),h=M(h,"caption-side",s.captionPosition||""),r=r.apply(r.tr.setNodeAttribute(p,"style",h.style))}}else r=r.apply(r.tr.deleteRange(c,c+n.content.size));else n=Br(s,d),n&&(r=r.apply(r.tr.replaceWith(p,p,n)));return r},Ws=(t,e,a,s,r)=>{let n={state:t,pos:a};if(!s&&(e.position||e.caption)){let p={table:"",style:"display: table"};const d=[],u=e.position,h=u&&Fe[u];h&&Object.keys(h).forEach(b=>{p=M(p,b,h[b]||"")}),typeof e.width=="number"&&e.widthUnit==="%"&&(p=M(p,"width",e.width+e.widthUnit));const m=Br(e,t.schema);m&&d.push(m);const w=t.doc.nodeAt(a);d.push(w);const f=t.schema.nodes.table_wrapper.createAndFill(p,d);if(f){const b=t.tr.replaceWith(a,a+w.content.size,f);t=t.apply(b),n={state:t,pos:a}}}else s&&(e.position||e.caption||!e.caption&&zr(s.node))?(t=Hs(t,s.node,r,e.position&&Fe[e.position]),t=Fs(t,s.node,r,e),n={state:t,pos:r}):s&&!(e.position||e.caption)?n={state:t,node:s.node,pos:t.selection.$from.start(s.depth)-1}:n={state:t,pos:a};const c=s&&n.state.doc.nodeAt(r);if(c){let p;typeof e.width=="number"&&e.widthUnit==="%"?p=M(c.attrs,"width",e.width+e.widthUnit):e.widthUnit!=="%"&&/%/.test(ae(c.attrs.style||"").width||"")&&(p=M(c.attrs,"width","")),p&&(n.state=n.state.apply(n.state.tr.setNodeMarkup(r,null,p)))}return n},Ks=(t,e)=>{const a=t.selection.$from;let s=_(a,T=>T.type.spec.tableRole==="table");if(!s)return;const r=a.start(s.depth)-1;let n=zs(t,r,e.rows,e.columns);if(!n)return;const c=n.tr;wr(n).forEach(T=>{let I={...T.node.attrs};I=M(I,"padding",typeof e.cellPadding=="number"?e.cellPadding+"px":""),c.setNodeMarkup(T.pos,null,I)}),n=n.apply(c),n=Rs(n,e,r),n=ks(n,e,r);const p=_(a,T=>T.type.name==="table_wrapper"),d=a.start((p==null?void 0:p.depth)||0)-1;let u=Ws(n,e,r,p,d);n=u.state;const h=u.pos,m=n.doc.nodeAt(u.pos);if(!m)return;const w=h+(p||s).node.content.size,f=t.tr.replaceWith(h,w,m),b=i.Selection.atEnd(m),P=i.TextSelection.create(f.doc,h+b.to+1);return f.setSelection(P),f},Os=t=>{const{view:e,...a}=t,s=A.useLocalization(),[r,n]=l.useState(!1),c=!!(e&&_(e.state.selection.$from,h=>h.type.spec.tableRole==="table")),p=l.useCallback(()=>{n(!0)},[]),d=l.useCallback(()=>{n(!1),e==null||e.focus()},[e]),u=l.useCallback(h=>{if(e&&h){const m=Ks(e.state,h);m&&e.dispatch(m)}d()},[e,d]);return l.createElement(l.Fragment,null,l.createElement(D.Button,{type:"button",title:s.toLanguageString(o.tableProperties,g[o.tableProperties]),icon:"table-properties",svgIcon:x.tablePropertiesIcon,onClick:p,disabled:!c,...K,...a}),r&&l.createElement(Vs,{onClose:d,onSave:u,view:e}))},We=[{textKey:o.tablePropertiesAlignLeft,text:g[o.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:x.tableAlignMiddleLeftIcon},{textKey:o.tablePropertiesAlignCenter,text:g[o.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:x.tableAlignMiddleCenterIcon},{textKey:o.tablePropertiesAlignRight,text:g[o.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:x.tableAlignMiddleRightIcon},{textKey:o.tablePropertiesNoAlignment,text:g[o.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:x.tableAlignRemoveIcon}],Rr=[{textKey:o.tablePropertiesLeft,text:g[o.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:x.tablePositionStartIcon},{textKey:o.tablePropertiesCenter,text:g[o.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:x.tablePositionCenterIcon},{textKey:o.tablePropertiesRight,text:g[o.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:x.tablePositionEndIcon}].map(t=>({...t,style:Fe[t.value]})),Mr=[{textKey:o.tablePropertiesTop,text:g[o.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:x.positionTopIcon},{textKey:o.tablePropertiesBottom,text:g[o.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:x.positionBottomIcon}],kr=[{textKey:o.tablePropertiesNone,text:g[o.tablePropertiesNone],value:"none"},{textKey:o.tablePropertiesUsingScopeAttribute,text:g[o.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:o.tablePropertiesUsingIdAttributes,text:g[o.tablePropertiesUsingIdAttributes],value:"id"}],Vs=t=>{const e=l.useMemo(()=>{const N=t.view&&t.view.state;return N?Bs(N):Ze},[t.view]),a=A.useLocalization(),[s,r]=l.useState(0),n=l.useCallback(N=>{r(N.selected)},[]),c=l.useRef(null),p=l.useRef(null),d=l.useRef(null),u=l.useRef(null),h=l.useRef(null),m=l.useRef(null),w=l.useRef(null),f=l.useRef(null),b=l.useRef(null),P=l.useRef(null),T=l.useRef(null),I=l.useRef(null),B=l.useRef(null),k=l.useRef(null),H=l.useRef(null),$=l.useRef(null),Q=l.useRef(null),E=l.useRef(null),X=l.useRef(null),j=l.useRef(null),Y=l.useRef(null),Z=l.useRef(null),re=l.useRef(null),te=l.useCallback(()=>{var ee,ie,S,L,z,V,le,ce,pe,de,ue,be,ve,ye,we,Se,Pe,xe,Ne,Te;const N={rows:((ee=c.current)==null?void 0:ee.value)||0,columns:((ie=p.current)==null?void 0:ie.value)||0,width:d.current?d.current.value:null,height:u.current?u.current.value:null,cellSpacing:h.current?h.current.value:null,cellPadding:m.current?m.current.value:null,borderWidth:w.current?w.current.value:null,widthUnit:((S=f.current)==null?void 0:S.value)||"",heightUnit:((L=b.current)==null?void 0:L.value)||"",position:((V=(z=P.current)==null?void 0:z.value)==null?void 0:V.value)||null,textAlign:(le=T.current)!=null&&le.value?T.current.value.value:null,borderStyle:(ce=I.current)!=null&&ce.value?I.current.value.value:null,backgroundColor:(pe=B.current)==null?void 0:pe.value,borderColor:(de=k.current)==null?void 0:de.value,collapseBorders:!!((be=(ue=H.current)==null?void 0:ue.element)!=null&&be.checked),id:String(((ve=$.current)==null?void 0:ve.value)||""),className:String(((ye=Q.current)==null?void 0:ye.value)||""),caption:String(((we=E.current)==null?void 0:we.value)||""),headerRows:((Se=X.current)==null?void 0:Se.value)||0,headerColumns:((Pe=j.current)==null?void 0:Pe.value)||0,captionAlignment:(xe=Y.current)!=null&&xe.value?Y.current.value.value:null,captionPosition:(Ne=Z.current)!=null&&Ne.value?Z.current.value.value:null,associateHeaders:(Te=re.current)!=null&&Te.value?re.current.value.value:"none"};t.onSave.call(void 0,N)},[t.onSave]),he=l.createElement("div",{className:"k-form k-form-md"},l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesRows,g[o.tablePropertiesRows])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:c,defaultValue:e.rows,min:1}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesColumns,g[o.tablePropertiesColumns])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:p,defaultValue:e.columns,min:1}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesWidth,g[o.tablePropertiesWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:d,defaultValue:e.width,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:f,defaultValue:e.widthUnit,data:ne,popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesHeight,g[o.tablePropertiesHeight])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:u,defaultValue:e.height,min:0,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto])}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"}," "),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.AutoComplete,{ref:b,defaultValue:e.heightUnit,data:ne.filter(N=>N!=="%"),popupSettings:U}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesPosition,g[o.tablePropertiesPosition])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:P,defaultValue:Rr.find(N=>N.value===e.position),popupSettings:U,data:Rr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value",valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesAlignment,g[o.tablePropertiesAlignment])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:T,defaultValue:We.find(N=>N.value===e.textAlign),data:We.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value",popupSettings:U,valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCellSpacing,g[o.tablePropertiesCellSpacing])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:h,defaultValue:e.cellSpacing,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto]),min:0}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCellPadding,g[o.tablePropertiesCellPadding])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:m,defaultValue:e.cellPadding,placeholder:a.toLanguageString(o.sizeAuto,g[o.sizeAuto]),min:0}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesTableBackground,g[o.tablePropertiesTableBackground])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:B,defaultValue:e.backgroundColor}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesBorderWidth,g[o.tablePropertiesBorderWidth])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:w,defaultValue:e.borderWidth,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesBorderColor,g[o.tablePropertiesBorderColor])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.ColorPicker,{ref:k,defaultValue:e.borderColor}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesBorderStyle,g[o.tablePropertiesBorderStyle])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:I,defaultValue:ze.find(N=>N.value===e.borderStyle),popupSettings:U,data:ze.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),textField:"text",dataItemKey:"value"}))),l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.Checkbox,{ref:H,className:"k-checkbox-wrap",label:a.toLanguageString(o.tablePropertiesCollapseBorders,g[o.tablePropertiesCollapseBorders]),defaultChecked:e.collapseBorders})))))),me=l.createElement("div",{className:"k-form k-form-md"},l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("div",{className:"k-form-layout k-d-grid"},l.createElement("div",{className:"k-form-field"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesId,g[o.tablePropertiesId])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:$,defaultValue:e.id}))),l.createElement("div",{className:"k-form-field"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCssClass,g[o.tablePropertiesCssClass])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:Q,defaultValue:e.className}))),l.createElement("fieldset",{className:"k-form-fieldset"},l.createElement("legend",{className:"k-form-legend"},a.toLanguageString(o.tablePropertiesAccessibility,g[o.tablePropertiesAccessibility])),l.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},l.createElement("div",{className:"k-form-field k-col-span-full"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCaption,g[o.tablePropertiesCaption])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.TextBox,{ref:E,defaultValue:e.caption}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCaptionPosition,g[o.tablePropertiesCaptionPosition])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:Z,defaultValue:Mr.find(N=>N.value===e.captionPosition),data:Mr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),popupSettings:U,textField:"text",dataItemKey:"value",valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesCaptionAlignment,g[o.tablePropertiesCaptionAlignment])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:Y,defaultValue:We.find(N=>N.value===e.captionAlignment),data:We.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),popupSettings:U,textField:"text",dataItemKey:"value",valueRender:Ce,itemRender:Ie}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesHeaderRows,g[o.tablePropertiesHeaderRows])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:X,defaultValue:e.headerRows,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-1"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesHeaderCols,g[o.tablePropertiesHeaderCols])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(C.NumericTextBox,{ref:j,defaultValue:e.headerColumns,min:0}))),l.createElement("div",{className:"k-form-field k-col-span-2"},l.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(o.tablePropertiesAssociateHeaders,g[o.tablePropertiesAssociateHeaders])),l.createElement("div",{className:"k-form-field-wrap"},l.createElement(O.DropDownList,{ref:re,defaultValue:kr.find(N=>N.value===e.associateHeaders),data:kr.map(N=>({...N,text:a.toLanguageString(N.textKey,N.text)})),popupSettings:U,textField:"text",dataItemKey:"value"})))))))),se=l.createElement(Le.TabStrip,{selected:s,onSelect:n,animation:!1,keepTabsMounted:!0},l.createElement(Le.TabStripTab,{title:a.toLanguageString(o.tablePropertiesGeneral,g[o.tablePropertiesGeneral])},he),l.createElement(Le.TabStripTab,{title:a.toLanguageString(o.tablePropertiesAdvanced,g[o.tablePropertiesAdvanced])},me)),fe=[l.createElement(D.Button,{themeColor:"primary",key:"save",onClick:te},a.toLanguageString(o.tablePropertiesSave,g[o.tablePropertiesSave])),l.createElement(D.Button,{onClick:t.onClose,key:"cancel"},a.toLanguageString(o.tablePropertiesCancel,g[o.tablePropertiesCancel]))];return l.createElement(q.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(o.tableProperties,g[o.tableProperties]),onClose:t.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},se,l.createElement(q.WindowActionsBar,{layout:"start"},...fe))};y.EditorTools=void 0,(t=>{function e(v){return rs(v)}t.createAlignTool=e;class a extends e(y.EditorToolsSettings.alignLeft){}t.AlignLeft=a;class s extends e(y.EditorToolsSettings.alignRight){}t.AlignRight=s;class r extends e(y.EditorToolsSettings.alignCenter){}t.AlignCenter=r;class n extends e(y.EditorToolsSettings.alignJustify){}t.AlignJustify=n;function c(v){return Ve.createInsertTableTool(v)}t.createInsertTableTool=c;class p extends c(y.EditorToolsSettings.insertTable){}t.InsertTable=p;class d extends Me.InsertTablePopup{}t.InsertTablePopup=d;function u(v){return Ue.createStyleDropDownList(v)}t.createStyleDropDownList=u;class h extends u(y.EditorToolsSettings.fontSize){}t.FontSize=h;class m extends u(y.EditorToolsSettings.fontName){}t.FontName=m,t.ForeColor=v=>l.createElement(ur,{...y.EditorToolsSettings.foreColor,...v}),t.BackColor=v=>l.createElement(ur,{...y.EditorToolsSettings.backColor,...v});function w(v){return _e.createFormatBlockDropDownList(v)}t.createFormatBlockDropDownList=w;class f extends w(y.EditorToolsSettings.formatBlock){}t.FormatBlock=f;function b(v){return ke.createUndoTool(v)}t.createUndoTool=b;function P(v){return ke.createRedoTool(v)}t.createRedoTool=P;class T extends b(y.EditorToolsSettings.undo){}t.Undo=T;class I extends P(y.EditorToolsSettings.redo){}t.Redo=I;function B(v){return $e.createIndentTool(v)}t.createIndentTool=B;class k extends B(y.EditorToolsSettings.indent){}t.Indent=k;function H(v){return Ee.createInlineFormatTool(v)}t.createInlineFormatTool=H;class $ extends H(y.EditorToolsSettings.bold){}t.Bold=$;class Q extends H(y.EditorToolsSettings.italic){}t.Italic=Q;class E extends H(y.EditorToolsSettings.underline){}t.Underline=E;class X extends H(y.EditorToolsSettings.strikethrough){}t.Strikethrough=X;class j extends H(y.EditorToolsSettings.subscript){}t.Subscript=j;class Y extends H(y.EditorToolsSettings.superscript){}t.Superscript=Y;function Z(v){return ss(v)}t.createInsertImageTool=Z;class re extends Z(y.EditorToolsSettings.image){}t.InsertImage=re;function te(v){return je.createLinkTool(v)}t.createLinkTool=te;class he extends te(y.EditorToolsSettings.link){}t.Link=he;class me extends te(y.EditorToolsSettings.insertFile){}t.InsertFile=me;function se(v){return qe.createListTool(v)}t.createListTool=se;class fe extends se(y.EditorToolsSettings.orderedList){}t.OrderedList=fe;class N extends se(y.EditorToolsSettings.bulletList){}t.UnorderedList=N,t.BulletedList=v=>{const et=[{icon:"list-unordered",svgIcon:x.listUnorderedIcon,text:"Disc",style:"disc"},{icon:"list-unordered-outline",svgIcon:x.listUnorderedOutlineIcon,text:"Circle",style:"circle"},{icon:"list-unordered-square",svgIcon:x.listUnorderedSquareIcon,text:"Square",style:"square"}];return l.createElement(yr,{listType:y.EditorToolsSettings.bulletList.listType,items:et,icon:"list-unordered",svgIcon:x.listUnorderedIcon,titleKey:y.EditorToolsSettings.bulletList.messages.title,...v})},t.NumberedList=v=>{const et=[{icon:"list-ordered",svgIcon:x.listOrderedIcon,text:"Decimal"},{icon:"list-roman-upper",svgIcon:x.listRomanUpperIcon,text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",svgIcon:x.listRomanLowerIcon,text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",svgIcon:x.listLatinBigIcon,text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",svgIcon:x.listLatinSmallIcon,text:"Lower latin",style:"lower-latin"}];return l.createElement(yr,{listType:y.EditorToolsSettings.orderedList.listType,items:et,icon:"list-ordered",svgIcon:x.listOrderedIcon,titleKey:y.EditorToolsSettings.orderedList.messages.title,...v})},t.TableCellProperties=Ls,t.TableProperties=Os;function ee(v){return Ge.createOutdentTool(v)}t.createOutdentTool=ee;class ie extends ee(y.EditorToolsSettings.outdent){}t.Outdent=ie,t.Print=v=>l.createElement(ns,{...v}),t.Pdf=v=>l.createElement(ps,{...v}),t.SelectAll=v=>l.createElement(us,{...v}),t.CleanFormatting=v=>l.createElement(hs,{...v});function S(v){return J.createAddRowBeforeTool(v)}t.createAddRowBeforeTool=S;function L(v){return J.createAddRowAfterTool(v)}t.createAddRowAfterTool=L;function z(v){return J.createAddColumnBeforeTool(v)}t.createAddColumnBeforeTool=z;function V(v){return J.createAddColumnAfterTool(v)}t.createAddColumnAfterTool=V;function le(v){return J.createDeleteRowTool(v)}t.createDeleteRowTool=le;function ce(v){return J.createDeleteColumnTool(v)}t.createDeleteColumnTool=ce;function pe(v){return J.createDeleteTableTool(v)}t.createDeleteTableTool=pe;function de(v){return J.createMergeCellsTool(v)}t.createMergeCellsTool=de;function ue(v){return J.createSplitCellTool(v)}t.createSplitCellTool=ue;class be extends S(y.EditorToolsSettings.addRowBefore){}t.AddRowBefore=be;class ve extends L(y.EditorToolsSettings.addRowAfter){}t.AddRowAfter=ve;class ye extends z(y.EditorToolsSettings.addColumnBefore){}t.AddColumnBefore=ye;class we extends V(y.EditorToolsSettings.addColumnAfter){}t.AddColumnAfter=we;class Se extends le(y.EditorToolsSettings.deleteRow){}t.DeleteRow=Se;class Pe extends ce(y.EditorToolsSettings.deleteColumn){}t.DeleteColumn=Pe;class xe extends pe(y.EditorToolsSettings.deleteTable){}t.DeleteTable=xe;class Ne extends de(y.EditorToolsSettings.mergeCells){}t.MergeCells=Ne;class Te extends ue(y.EditorToolsSettings.splitCell){}t.SplitCell=Te;function Hr(v){return Je.createUnlinkTool(v)}t.createUnlinkTool=Hr;class _s extends Hr(y.EditorToolsSettings.unlink){}t.Unlink=_s;function Fr(v){return Qe.createViewHtmlTool(v)}t.createViewHtmlTool=Fr;class $s extends Fr(y.EditorToolsSettings.viewHtml){}t.ViewHtml=$s;class Es extends br{}t.FindAndReplace=Es})(y.EditorTools||(y.EditorTools={}));const Us={Selection:i.Selection,SelectionRange:i.SelectionRange,TextSelection:i.TextSelection,NodeSelection:i.NodeSelection,AllSelection:i.AllSelection,EditorState:i.EditorState,Plugin:i.Plugin,PluginKey:i.PluginKey,Transaction:i.Transaction,Decoration:i.Decoration,DecorationSet:i.DecorationSet,EditorView:i.EditorView,Node:i.Node,ResolvedPos:i.ResolvedPos,NodeRange:i.NodeRange,Fragment:i.Fragment,Slice:i.Slice,ReplaceError:i.ReplaceError,Mark:i.Mark,Schema:i.Schema,NodeType:i.NodeType,MarkType:i.MarkType,ContentMatch:i.ContentMatch,DOMParser:i.DOMParser,DOMSerializer:i.DOMSerializer,Transform:i.Transform,Step:i.Step,StepResult:i.StepResult,joinPoint:i.joinPoint,canJoin:i.canJoin,canSplit:i.canSplit,insertPoint:i.insertPoint,dropPoint:i.dropPoint,liftTarget:i.liftTarget,findWrapping:i.findWrapping,StepMap:i.StepMap,MapResult:i.MapResult,Mapping:i.Mapping,AddMarkStep:i.AddMarkStep,RemoveMarkStep:i.RemoveMarkStep,ReplaceStep:i.ReplaceStep,ReplaceAroundStep:i.ReplaceAroundStep,replaceStep:i.replaceStep,deleteSelection:i.deleteSelection,joinBackward:i.joinBackward,selectNodeBackward:i.selectNodeBackward,joinForward:i.joinForward,selectNodeForward:i.selectNodeForward,joinUp:i.joinUp,joinDown:i.joinDown,lift:i.lift,newlineInCode:i.newlineInCode,exitCode:i.exitCode,createParagraphNear:i.createParagraphNear,liftEmptyBlock:i.liftEmptyBlock,splitBlock:i.splitBlock,splitBlockKeepMarks:i.splitBlockKeepMarks,selectParentNode:i.selectParentNode,selectAll:i.selectAll,wrapIn:i.wrapIn,setBlockType:i.setBlockType,toggleMark:i.toggleMark,autoJoin:i.autoJoin,chainCommands:i.chainCommands,pcBaseKeymap:i.pcBaseKeymap,macBaseKeymap:i.macBaseKeymap,baseKeymap:i.baseKeymap,history:i.history,undo:i.undo,redo:i.redo,undoDepth:i.undoDepth,redoDepth:i.redoDepth,InputRule:i.InputRule,inputRules:i.inputRules,undoInputRule:i.undoInputRule,emDash:i.emDash,ellipsis:i.ellipsis,openDoubleQuote:i.openDoubleQuote,closeDoubleQuote:i.closeDoubleQuote,openSingleQuote:i.openSingleQuote,closeSingleQuote:i.closeSingleQuote,smartQuotes:i.smartQuotes,wrappingInputRule:i.wrappingInputRule,textblockTypeInputRule:i.textblockTypeInputRule,keymap:i.keymap,keydownHandler:i.keydownHandler,orderedList:i.orderedList,bulletList:i.bulletList,listItem:i.listItem,addListNodes:i.addListNodes,wrapInList:i.wrapInList,splitListItem:i.splitListItem,liftListItem:i.liftListItem,sinkListItem:i.sinkListItem,dropCursor:i.dropCursor,gapCursor:i.gapCursor,tableEditing:i.tableEditing,fixTables:i.fixTables,fixTablesKey:i.fixTablesKey,cellAround:i.cellAround,isInTable:i.isInTable,selectionCell:i.selectionCell,moveCellForward:i.moveCellForward,inSameTable:i.inSameTable,findCell:i.findCell,colCount:i.colCount,nextCell:i.nextCell,removeColSpan:i.removeColSpan,addColSpan:i.addColSpan,columnIsHeader:i.columnIsHeader,tableNodes:i.tableNodes,tableNodeTypes:i.tableNodeTypes,CellSelection:i.CellSelection,TableMap:i.TableMap,tableEditingKey:i.tableEditingKey,columnResizing:i.columnResizing,columnResizingPluginKey:i.columnResizingPluginKey,updateColumnsOnResize:i.updateColumnsOnResize,selectedRect:i.selectedRect,addColumn:i.addColumn,addColumnBefore:i.addColumnBefore,addColumnAfter:i.addColumnAfter,deleteColumn:i.deleteColumn,rowIsHeader:i.rowIsHeader,addRow:i.addRow,addRowBefore:i.addRowBefore,addRowAfter:i.addRowAfter,deleteRow:i.deleteRow,mergeCells:i.mergeCells,splitCell:i.splitCell,splitCellWithType:i.splitCellWithType,setCellAttr:i.setCellAttr,toggleHeader:i.toggleHeader,toggleHeaderRow:i.toggleHeaderRow,toggleHeaderColumn:i.toggleHeaderColumn,toggleHeaderCell:i.toggleHeaderCell,goToNextCell:i.goToNextCell,deleteTable:i.deleteTable};Object.defineProperty(y,"getHtml",{enumerable:!0,get:()=>i.getHtml}),Object.defineProperty(y,"marks",{enumerable:!0,get:()=>i.marks}),Object.defineProperty(y,"nodes",{enumerable:!0,get:()=>i.nodes}),Object.defineProperty(y,"parseContent",{enumerable:!0,get:()=>i.parseContent}),y.Editor=Oe,y.ProseMirror=Us,y.editorPropsKey=Be,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});