@progress/kendo-react-editor 5.3.0 → 5.3.1-dev.202205130741

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.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-drawing"),require("react-dom"),require("react-transition-group"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-react-intl","@progress/kendo-licensing","@progress/kendo-drawing","react-dom","react-transition-group","react-dom/server"],t):"object"==typeof exports?exports.KendoReactEditor=t(require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-drawing"),require("react-dom"),require("react-transition-group"),require("react-dom/server")):e.KendoReactEditor=t(e.React,e.PropTypes,e.KendoReactIntl,e.KendoLicensing,e.KendoDrawing,e.ReactDOM,e.ReactTransitionGroup,e.ReactDOMServer)}(window,(function(e,t,n,r,o,i,a,s){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=67)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t),n.d(t,"ZIndexContext",(function(){return r.a})),n.d(t,"useZIndexContext",(function(){return r.b})),n.d(t,"BrowserSupportService",(function(){return o.a})),n.d(t,"canUseDOM",(function(){return i.a})),n.d(t,"canUseRef",(function(){return a})),n.d(t,"classNames",(function(){return s.a})),n.d(t,"cloneDate",(function(){return c})),n.d(t,"clone",(function(){return u})),n.d(t,"cloneObject",(function(){return d})),n.d(t,"cloneValue",(function(){return p})),n.d(t,"cloneArray",(function(){return f})),n.d(t,"focusFirstFocusableChild",(function(){return h.a})),n.d(t,"FormComponent",(function(){return m})),n.d(t,"getTabIndex",(function(){return v.a})),n.d(t,"getter",(function(){return g.a})),n.d(t,"guid",(function(){return y.a})),n.d(t,"Keys",(function(){return b.a})),n.d(t,"noop",(function(){return k.a})),n.d(t,"getScrollbarWidth",(function(){return w.a})),n.d(t,"setScrollbarWidth",(function(){return w.b})),n.d(t,"setter",(function(){return S})),n.d(t,"mapTree",(function(){return I.c})),n.d(t,"mapTreeItem",(function(){return I.d})),n.d(t,"extendDataItem",(function(){return I.a})),n.d(t,"getItemPath",(function(){return I.b})),n.d(t,"validatePackage",(function(){return N.a})),n.d(t,"hasRelativeStackingContext",(function(){return T})),n.d(t,"dispatchEvent",(function(){return M.a})),n.d(t,"AsyncFocusBlur",(function(){return _})),n.d(t,"createPropsContext",(function(){return j.a})),n.d(t,"withPropsContext",(function(){return j.b})),n.d(t,"useDir",(function(){return R.a})),n.d(t,"useAsyncFocusBlur",(function(){return D.a})),n.d(t,"useRtl",(function(){return A.a})),n.d(t,"useMouse",(function(){return F.a})),n.d(t,"useCustomComponent",(function(){return z})),n.d(t,"usePropsContext",(function(){return L.a})),n.d(t,"COLLECTION_ACTION",(function(){return E})),n.d(t,"useCollection",(function(){return B})),n.d(t,"Icon",(function(){return $})),n.d(t,"SvgIcon",(function(){return X})),n.d(t,"Typography",(function(){return le})),n.d(t,"DragAndDrop",(function(){return pe})),n.d(t,"Draggable",(function(){return fe.a})),n.d(t,"Droppable",(function(){return ve})),n.d(t,"useDraggable",(function(){return ge.a})),n.d(t,"useDroppable",(function(){return me})),n.d(t,"kendoThemeMaps",(function(){return ye.a}));var r=n(54),o=n(29),i=n(19),a=function(e){return"string"!=typeof Comment&&(function(e){return Boolean("function"==typeof e&&!!e.prototype.isReactComponent)}(e)||function(e){return Boolean(e.$$typeof&&"function"==typeof e.render)}(e))},s=n(10),l=n(0),c=function(e){return e?new Date(e.getTime()):null};function u(e){var t={};return d(e,t),t}function d(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=p(r,t[n])}}function p(e,t){if(Array.isArray(e))return f(e);if(e instanceof Date)return c(e);if(l.isValidElement(e))return l.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return d(e,n),n}return e}function f(e){return e.map((function(e){return p(e,void 0)}))}var h=n(55),m=function(){},v=n(39),g=n(37),y=n(52),b=n(26),k=n(6),w=n(56),C=n(43),O={undefined:function(e){return e}},x=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function S(e){if(O[e])return O[e];var t=Object(C.a)(e);return O[e]=function(e,n,r){for(var o=e,i=t.length-1,a=0;a<i&&o;a++)o=o[t[a]]=o[t[a]]||x(t[a+1],r);o[t[i]]=n},O[e]}var E,I=n(57),N=n(21),T=function(e){if(!i.a)return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var r=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),r},M=n(53),D=n(32),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_=function(e){var t=e.children,n=e.onFocus,r=e.onBlur,o=e.onSyncFocus,i=e.onSyncBlur,a=Object(D.a)({onFocus:n,onBlur:r,onSyncFocus:o,onSyncBlur:i});return t.call(void 0,P({},a))},j=n(58),R=n(35),A=n(59),F=n(38),z=function(e){return l.isValidElement(e)?[e.type,e.props]:[e,{}]},L=n(33);!function(e){e[e.add=0]="add",e[e.remove=1]="remove"}(E||(E={}));var B=function(e){void 0===e&&(e=[]);var t=l.useRef(e),n=l.useCallback((function(e){switch(e.type){case E.add:t.current.push(e.item);break;case E.remove:var n=t.current.indexOf(e.item);t.current.splice(n,1)}}),[]);return[t.current,n]},V=n(1),H={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},K=function(){return(K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},W=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},$=l.forwardRef((function(e,t){var n=e.className,r=e.name,o=e.themeColor,i=e.size,a=e.flip,c=e.style,u=W(e,["className","name","themeColor","size","flip","style"]),d=l.useRef(null),p=l.useRef(null);l.useImperativeHandle(d,(function(){return{element:p.current}})),l.useImperativeHandle(t,(function(){return d.current}));var f=l.useMemo((function(){return o||q.themeColor}),[o]),h=l.useMemo((function(){return i||q.size}),[i]),m=l.useMemo((function(){return a||q.flip}),[a]),v=l.useMemo((function(){return Object(s.a)("k-icon","k-i-"+r,"k-color-"+f,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},H[h],n)}),[r,f,h,m,n]),g=Object(F.a)(e,d);return l.createElement("span",K({ref:p},u,g,{className:v,style:c,role:"presentation"}))}));$.propTypes={style:V.object,classNames:V.string,name:V.string,themeColor:V.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:V.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:V.oneOf(["default","horizontal","vertical","both"])};var q={size:"default",themeColor:"inherit",flip:"default"};$.displayName="KendoIcon";var U=function(){return(U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},X=l.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.svgClassName,i=e.icon,a=e.flip,c=e.size,u=e.style,d=e.svgStyle,p=e.themeColor,f=e.viewBox,h=G(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=l.useRef(null);l.useImperativeHandle(t,(function(){return{element:m.current}}));var v=l.useMemo((function(){return i?i.name:J.icon}),[i]),g=l.useMemo((function(){return p||J.themeColor}),[p]),y=l.useMemo((function(){return c||J.size}),[c]),b=l.useMemo((function(){return a||J.flip}),[a]),k=l.useMemo((function(){return f||J.viewBox}),[f]),w=l.useMemo((function(){return Object(s.a)("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},H[y],r)}),[v,g,y,b,r]),C=l.useMemo((function(){return e.width&&e.height?U({width:e.width,height:e.height},u):e.width?U({width:e.width,height:e.width},u):e.height?U({width:e.height,height:e.height},u):U({},u)}),[e.width,e.height,u]);return l.createElement("span",{className:w,style:C,ref:m},l.createElement("svg",U({className:o,style:d,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:k,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},h),i?void 0:n))}));X.propTypes={style:V.object,classNames:V.string,children:V.any,icon:V.object,themeColor:V.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:V.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:V.oneOf(["default","horizontal","vertical","both"])};var J={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};X.displayName="KendoSvgIcon";var Y={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},Z={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Q={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},ee={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},te={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},ne={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},re={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},oe={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},ie=function(){return(ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ae=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},se=function(e){var t=l.forwardRef((function(t,n){var r=t.id,o=t.style,i=t.className,a=t.fontSize,s=t.fontWeight,c=t.textAlign,u=t.textTransform,d=t.themeColor,p=t.margin,f=ae(t,["id","style","className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),h=l.useRef(null),m=l.useRef(null);l.useImperativeHandle(h,(function(){return{element:m.current,props:t}})),l.useImperativeHandle(n,(function(){return h.current}));var v=e,g=function(){if(void 0!==p){if("string"==typeof p)return[Q[p]];if("number"==typeof p&&p>=0&&p<=24)return["k-m-"+p];if("object"==typeof p){var e=[];return Object.keys(p).forEach((function(t){var n,r;null!==p[t]&&void 0!==p[t]&&e.push((n=t,r=p[t],""+te[n]+("string"==typeof r?ee[r]:r)))})),e.join(" ")}}};return l.createElement(v,ie({id:r,ref:m,className:["k-"+("p"===e?"paragraph":e),Y[a],Z[s],ne[c],re[u],oe[d],g(),i].filter((function(e){return void 0!==e})).join(" "),style:o},f),t.children)}));return t.propTypes={style:V.object,className:V.string,fontSize:V.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:V.oneOf(["light","normal","bold"]),margin:V.oneOfType([V.number,V.object,V.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:V.oneOf(["left","right","center","justify"]),textTransform:V.oneOf(["lowercase","uppercase","capitalize"]),themeColor:V.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},le={h1:se("h1"),h2:se("h2"),h3:se("h3"),h4:se("h4"),h5:se("h5"),h6:se("h6"),p:se("p"),code:se("code"),pre:se("pre")},ce=function(){return(ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ue=function(e,t,n){var r=l.useState(t||e),o=r[0],i=r[1];return[void 0!==t?t:o,l.useCallback((function(e,t){i(e),n&&n.call(void 0,ce({},t,{value:e}))}),[n,i])]},de=n(13),pe=function(e){var t=ue(null,void 0),n=t[0],r=t[1],o=ue(null,void 0),i=o[0],a=o[1],s=B([]),c=s[0],u=s[1],d=B([]),p=d[0],f=d[1];return l.createElement(de.a.Provider,{value:[n,r]},l.createElement(de.c.Provider,{value:[i,a]},l.createElement(de.b.Provider,{value:[c,function(e){u({type:E.add,item:e})},function(e){u({type:E.remove,item:e})}]},l.createElement(de.d.Provider,{value:[p,function(e){f({type:E.add,item:e})},function(e){f({type:E.remove,item:e})}]},e.children))))};pe.displayName="KendoReactDragAndDrop";var fe=n(60),he=n(30);function me(e,t){void 0===t&&(t={onDragEnter:k.a,onDragOver:k.a,onDragLeave:k.a,onDrop:k.a});var n=t.onDragEnter,r=void 0===n?k.a:n,o=t.onDragOver,i=void 0===o?k.a:o,a=t.onDragLeave,s=void 0===a?k.a:a,c=t.onDrop,u=void 0===c?k.a:c,d=Object(he.a)(de.c)[1],p=l.useContext(de.d),f=p[1],h=p[2],m=l.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),v=l.useRef(null);l.useImperativeHandle(v,(function(){return{element:m(),onDragEnter:g,onDragOver:y,onDragLeave:b,onDrop:w,data:e.current}}));var g=l.useCallback((function(t){d(v,{target:e.current,event:t}),r(t)}),[d,e,r]),y=l.useCallback((function(e){i(e)}),[i]),b=l.useCallback((function(t){d(null,{target:e.current,event:t}),s(t)}),[d,e,s]),w=l.useCallback((function(t){d(null,{target:e.current,event:t}),u(t)}),[d,e,u]),C=l.useCallback((function(){return f(v),function(){h(v)}}),[h,f]);l.useLayoutEffect(C,[C])}var ve=l.forwardRef((function(e,t){var n=l.useRef(null),r=l.useRef(null),o=l.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);l.useImperativeHandle(r,(function(){return{element:o()||void 0}})),l.useImperativeHandle(t,(function(){return r.current})),l.useImperativeHandle(e.childRef,(function(){return n.current}));var i=l.useCallback((function(t){e.onDragEnter&&e.onDragEnter({element:o(),target:r.current,event:t})}),[e.onDragEnter,o]),a=l.useCallback((function(t){e.onDragOver&&e.onDragOver({element:o(),target:r.current,event:t})}),[o,e.onDragOver]),s=l.useCallback((function(t){e.onDragLeave&&e.onDragLeave({element:o(),target:r.current,event:t})}),[e.onDragLeave,o]),c=l.useCallback((function(t){e.onDrop&&e.onDrop({element:o(),target:r.current,event:t})}),[e.onDrop,o]);return me(n,{onDragEnter:i,onDragOver:a,onDragLeave:s,onDrop:c}),e.children?l.cloneElement(l.Children.only(e.children),{ref:n}):null}));ve.displayName="KendoReactDroppable";var ge=n(48),ye=n(22)},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"Toolbar",(function(){return _})),n.d(t,"ToolbarItem",(function(){return R})),n.d(t,"ToolbarSeparator",(function(){return F})),n.d(t,"ToolbarSpacer",(function(){return z})),n.d(t,"Button",(function(){return r.a})),n.d(t,"ButtonGroup",(function(){return o.a})),n.d(t,"SplitButton",(function(){return x})),n.d(t,"SplitButtonItem",(function(){return v})),n.d(t,"DropDownButton",(function(){return T})),n.d(t,"DropDownButtonItem",(function(){return E})),n.d(t,"Chip",(function(){return L.a})),n.d(t,"ChipList",(function(){return B.a})),n.d(t,"FloatingActionButton",(function(){return ee})),n.d(t,"FloatingActionButtonItem",(function(){return q}));var r=n(50),o=n(51),i=n(0),a=n(1),s=n(52),l=n(26),c=n(10),u=n(22),d=n(53),p=function(e){var t,n=i.useCallback((function(t){e.onClick(t,e.index)}),[e]),r=e.dataItem.render||e.item||(void 0===e.item?e.render:null),o=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,a=i.createElement("li",{id:e.id,className:Object(c.a)("k-item",e.className,{"k-focus":e.focused}),onClick:n,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},i.createElement("span",{tabIndex:-1,className:Object(c.a)("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},r?i.createElement(r,{item:e.dataItem,itemIndex:e.index}):i.createElement(i.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&i.createElement("span",{className:Object(c.a)("k-icon",(t={},t["k-i-"+e.dataItem.icon]=e.dataItem.icon,t[""+e.dataItem.iconClass]=e.dataItem.iconClass,t))}),e.dataItem.imageUrl&&i.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),o&&i.createElement("span",{className:"k-menu-link-text"},o))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,a,e):a};p.displayName="KendoReactButtonItem";var f,h=p,m=(f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,disabled:a.bool,render:a.any},t}(i.Component),g=function(e,t,n,r){if(n)return e;switch(t){case l.a.enter:case l.a.space:case l.a.esc:return-1;case l.a.up:case l.a.left:return Math.max(0,e-1);case l.a.down:case l.a.right:return Math.min(r-1,e+1);default:return e}},y=n(47);function b(e){var t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function k(e){var t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}var w=n(21),C=n(11),O=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1,focusedIndex:-1,opened:!1},n.wrapper=null,n.mainButton=null,n.guid=Object(s.a)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.a.down?n.opened&&e.keyCode===l.a.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=void 0;if(e.keyCode===l.a.enter||e.keyCode===l.a.space?(e.preventDefault(),n.dispatchClickEvent(e,t),t>=0&&(r={focusedIndex:n.opened?-1:0,opened:!n.opened},n.dispatchPopupEvent(e,r.opened))):n.opened&&e.keyCode===l.a.esc&&(r={focusedIndex:-1,opened:!1},n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);o!==t&&((r=r||{}).focusedIndex=o);var i=e.keyCode===l.a.up||e.keyCode===l.a.down||e.keyCode===l.a.left||e.keyCode===l.a.right;!e.altKey&&i&&e.preventDefault()}r&&n.setState(r)}},n.onFocus=function(e){Object(d.a)(n.props.onFocus,e,n,void 0),n.setState({focused:!0,focusedIndex:-1})},n.onItemClick=function(e,t){var r=n.opened;r&&n.setState({focusedIndex:0,opened:!1}),n.dispatchClickEvent(e,t),r&&n.dispatchPopupEvent(e,!1)},n.onBlur=function(e){n.setState({focused:!1,focusedIndex:-1,opened:!1}),Object(d.a)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1)},n.onSplitPartClick=function(e){if(n.buttonsData.length){var t=!n.opened;n.dispatchPopupEvent(e,t),n.setState({focusedIndex:t?0:-1,opened:t,focused:!0})}},n.onDownSplitPart=function(e){e.preventDefault(),n.element&&document.activeElement!==n.element&&n.element.focus()},n.onItemDown=function(e){document.activeElement===n.element&&e.preventDefault()},n.dispatchPopupEvent=function(e,t){Object(d.a)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(w.a)(C.a),n}return O(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===v})).map((function(e){return e.props}));var t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,d=o.disabled,p=this.state.focusedIndex;return i.createElement("div",{id:a,style:s,className:Object(c.a)("k-split-button","k-button-group",{"k-focus":this.state.focused},"k-rounded-"+u.a.roundedMap[this.props.rounded||"medium"],this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.a,{ref:function(t){return e.mainButton=t&&t.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:function(t){return e.onItemClick(t,-1)},disabled:d||void 0,tabIndex:l,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,dir:n,"aria-disabled":d,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" splitbutton","aria-owns":this.guid,"aria-activedescendant":p>=0?this.guid+"-"+p:void 0},this.props.text),i.createElement(r.a,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"arrow-s",className:"k-split-button-arrow",disabled:d||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"}),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!0,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||(-1===t?Object(d.a)(this.props.onButtonClick,e,this,void 0):Object(d.a)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n;return i.createElement(y.a,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:Object(c.a)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||b(e),popupAlign:r.popupAlign||k(e),style:e?{direction:"rtl"}:void 0},i.createElement("ul",{role:"menu",id:this.guid,className:Object(c.a)("k-group k-menu-group k-reset",(t={},t["k-menu-group-"+(u.a.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(h,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,key:a,index:a,id:e.guid+"-"+a})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,onButtonClick:a.func,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,text:a.string,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.any,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,selected:a.bool,disabled:a.bool,render:a.any},t}(i.Component),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(){return(N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},T=function(e){function t(t){var n=e.call(this,t)||this;return n.state={opened:!1,focused:!1,focusedIndex:-1},n.wrapper=null,n.mainButton=null,n.guid=Object(s.a)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.a.down?n.opened&&e.keyCode===l.a.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=N({},n.state);if(e.keyCode===l.a.enter||e.keyCode===l.a.space?(t>=0&&n.dispatchClickEvent(e,t),e.preventDefault(),r.focusedIndex=n.opened?-1:0,r.opened=!n.opened,n.dispatchPopupEvent(e,r.opened)):n.opened&&e.keyCode===l.a.esc&&(r.focusedIndex=-1,r.opened=!1,n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);r.focusedIndex=o;var i=e.keyCode===l.a.up||e.keyCode===l.a.down||e.keyCode===l.a.left||e.keyCode===l.a.right;!e.altKey&&i&&e.preventDefault()}n.setState(r)}},n.handleFocus=function(e){n.setState({focused:!0,focusedIndex:n.opened?0:-1}),Object(d.a)(n.props.onFocus,e,n,void 0)},n.handleBlur=function(e){n.setState({focused:!1,opened:!1,focusedIndex:-1}),Object(d.a)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1)},n.onItemClick=function(e,t){n.setState({focusedIndex:-1,opened:!1}),n.dispatchClickEvent(e,t),n.dispatchPopupEvent(e,!1)},n.onItemDown=function(e){document.activeElement===n.element&&e.preventDefault()},n.mouseDown=function(e){e.preventDefault()},n.onClickMainButton=function(e){if(n.buttonsData.length){var t=!n.opened;n.setState({opened:t,focused:!0,focusedIndex:t?0:-1}),n.dispatchPopupEvent(e,t)}},n.dispatchPopupEvent=function(e,t){Object(d.a)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(w.a)(C.a),n}return I(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,u=o.disabled,d=this.state.focusedIndex;return this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===E})).map((function(e){return e.props})),i.createElement("div",{id:a,style:s,className:Object(c.a)("k-dropdown-button",{"k-focus":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.a,{size:this.props.size,shape:this.props.shape,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:u||void 0,tabIndex:l,accessKey:this.props.accessKey,icon:this.props.icon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":u,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" dropdownbutton","aria-owns":this.guid,"aria-activedescendant":d>=0?this.guid+"-"+d:void 0},this.props.text),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.state.focused&&this.element&&this.element.focus()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!0,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||Object(d.a)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n;return i.createElement(y.a,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:Object(c.a)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||b(e),popupAlign:r.popupAlign||k(e),style:e?{direction:"rtl"}:void 0},i.createElement("ul",{role:"menu",id:this.guid,className:Object(c.a)("k-group k-menu-group k-reset",(t={},t["k-menu-group-"+(u.a.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(h,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,index:a,key:a,id:e.guid+"-"+a})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.func,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),M=n(34),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_=function(e){function t(n){var r=e.call(this,n)||this;return r._element=null,r.offsetHeight=0,r.offsetWidth=0,r.buttons=[],r.focusedSelector=r.selectors.map((function(e){return e+":focus"})).join(","),r.setTabIndex=function(e){var n=r.props.tabIndex,o=void 0===n?t.defaultProps.tabIndex:n;r.buttons.forEach((function(t,n){t.tabIndex=n===e?o:-1}))},r.onKeyDown=function(e){var t=e.target;if((e.keyCode===l.a.left||e.keyCode===l.a.right)&&!e.defaultPrevented&&-1!==r.buttons.findIndex((function(e){return e===t}))){var n=r.focusedIndex;e.keyCode===l.a.left?r.focusButton(n,n-1):r.focusButton(n,n+1)}},r.onWindowResize=function(e){var t=r.element;if(t){var n=t.offsetWidth,o=t.offsetHeight;if(r.offsetWidth!==n||r.offsetHeight!==o){r.offsetWidth=n,r.offsetHeight=o;var i={offsetWidth:r.offsetWidth,offsetHeight:r.offsetHeight};r.props.onResize&&r.props.onResize.call(void 0,P({target:r},i,{nativeEvent:e}))}}},Object(w.a)(C.a),r}return D(t,e),Object.defineProperty(t.prototype,"selectors",{get:function(){return this.props.buttons||M.b},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"focusedIndex",{get:function(){var e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex((function(t){return t===e})))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onWindowResize);var e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))},t.prototype.componentDidUpdate=function(){var e=this.element;e&&!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0},t.prototype.render=function(){var e=this;return i.createElement("div",{id:this.props.id,className:Object(c.a)("k-widget k-toolbar",this.props.className),style:this.props.style,role:"toolbar",dir:this.props.dir,ref:function(t){return e._element=t},onKeyDown:!1!==this.props.keyboardNavigation?this.onKeyDown:void 0},this.props.children)},t.prototype.focusButton=function(e,n){var r=this.props.tabIndex,o=void 0===r?t.defaultProps.tabIndex:r,i=this.buttons[n];if(i){i.tabIndex=o,i.focus();var a=this.buttons[e];a&&(a.tabIndex=-1)}},t.propTypes={tabIndex:a.number,dir:a.string,keyboardNavigation:a.bool,style:a.object,className:a.string,onResize:a.func,buttons:a.arrayOf(a.string)},t.defaultProps={tabIndex:0},t}(i.Component),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t}return j(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;return i.createElement("span",{id:this.props.id,className:this.props.className,style:this.props.style,ref:function(t){return e._element=t}},this.props.children)},t.propTypes={className:a.string},t}(i.PureComponent),A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.render=function(){return i.createElement(R,{className:"k-separator"})},t}(i.PureComponent),z=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null);i.useImperativeHandle(r,(function(){return{element:n.current}})),i.useImperativeHandle(t,(function(){return{element:n.current}}));var o=i.useMemo((function(){return Object(c.a)("k-spacer",e.className)}),[e.className]);return i.createElement("span",{ref:n,className:o})}));z.propTypes={className:a.string};var L=n(24),B=n(25),V=n(54),H=n(35),K=n(39),W=function(){return(W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},q=i.forwardRef((function(e,t){var n=e.className,r=e.disabled,o=e.text,a=e.icon,s=e.style,l=e.id,u=e.focused,d=e.tabIndex,p=e.index,f=e.dataItem,h=e.item,m=e.onDown,v=e.onClick,g=$(e,["className","disabled","text","icon","style","id","focused","tabIndex","index","dataItem","item","onDown","onClick"]),y=i.useRef(null),b=i.useCallback((function(){y.current&&y.current.focus()}),[]),k=i.useCallback((function(){return{element:y.current,focus:b}}),[b]);i.useImperativeHandle(t,k);var w=i.useCallback((function(e){v&&void 0!==p&&!r&&v(e,p)}),[v,p]),C=i.useMemo((function(){return Object(c.a)("k-fab-item",{"k-focus":u,"k-disabled":r},n)}),[n,r,u]),O=h;return i.createElement("li",W({ref:y,id:l,className:C,style:s,role:"menuitem",tabIndex:Object(K.a)(d,r),"aria-disabled":r,"aria-label":(o||"")+" floatingactionbutton item",onClick:w,onMouseDown:m,onPointerDown:m},g),O?i.createElement(O,{itemIndex:p,item:f}):i.createElement(i.Fragment,null,o&&i.createElement("span",{className:"k-fab-item-text"},o),a&&i.createElement("span",{className:Object(c.a)("k-fab-item-icon k-icon k-i-"+a)})))}));q.propTypes={className:a.string,style:a.object,children:a.any,disabled:a.bool,focused:a.bool,index:a.number,icon:a.string,text:a.string,tabIndex:a.number,customProp:a.any},q.displayName="KendoFloatingActionButtonItem";var U=function(e){return"number"==typeof e?e+"px":e},G=function(e,t){var n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},X=function(e,t){var n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},J=function(e,t){return{end:t?"left":"right",center:"left",start:t?"right":"left"}[e.horizontal||"end"]},Y=function(e){return{top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]},Z=function(){return(Z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},ee=i.forwardRef((function(e,t){Object(w.a)(C.a);var n=e.align,r=void 0===n?te.align:n,o=e.alignOffset,a=e.className,p=e.disabled,f=e.icon,h=e.iconClass,m=e.id,v=e.items,g=e.item,b=e.text,k=e.positionMode,O=void 0===k?te.positionMode:k,x=e.shape,S=void 0===x?te.shape:x,E=e.size,I=void 0===E?te.size:E,N=e.style,T=e.rounded,M=void 0===T?te.rounded:T,D=e.themeColor,P=void 0===D?te.themeColor:D,_=e.overlayStyle,j=e.tabIndex,R=e.accessKey,A=e.popupSettings,F=void 0===A?{}:A,z=e.modal,L=e.onClick,B=e.onItemClick,W=e.onFocus,$=e.onBlur,ee=e.onKeyDown,ne=e.onOpen,re=e.onClose,oe=Q(e,["align","alignOffset","className","disabled","icon","iconClass","id","items","item","text","positionMode","shape","size","style","rounded","themeColor","overlayStyle","tabIndex","accessKey","popupSettings","modal","onClick","onItemClick","onFocus","onBlur","onKeyDown","onOpen","onClose"]),ie=Object(V.b)(),ae=ie?ie+2:100,se=i.useRef(null),le=i.useRef(null),ce=i.useRef(null),ue=i.useRef(null),de=i.useCallback((function(){le.current&&le.current.focus()}),[]),pe=i.useCallback((function(){return{element:le.current,focus:de}}),[de]);i.useImperativeHandle(se,pe),i.useImperativeHandle(t,(function(){return se.current}));var fe=i.useState(!1),he=fe[0],me=fe[1],ve=i.useState(!1),ge=ve[0],ye=ve[1],be=i.useState(-1),ke=be[0],we=be[1],Ce=i.useMemo((function(){return Object(s.a)()}),[]),Oe=Object(H.a)(le,e.dir),xe="rtl"===Oe,Se=i.useMemo((function(){return Object(s.a)()}),[]);i.useEffect((function(){!function(e,t,n,r){var o=t.horizontal,i=t.vertical;if(e.current){var a=n&&void 0!==n.x?U(n.x):"16px",s=n&&void 0!==n.x?"calc(50% + "+U(n.x)+")":"50%",l=n&&void 0!==n.y?U(n.y):"16px",c=n&&void 0!==n.y?"calc(50% + "+U(n.y)+")":"50%";e.current.style.setProperty(J(t,r),"center"===o?s:a),e.current.style.setProperty(Y(t),"middle"===i?c:l),r&&("top"!==i&&"bottom"!==i||"start"!==o||e.current.style.setProperty("left","unset"),"middle"===i&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===i&&"start"===o&&e.current.style.setProperty("left","unset"))}}(le,r,o,xe)}),[le,r,o,xe]),i.useEffect((function(){ge&&le&&le.current&&le.current.focus()}),[ge,le]);var Ee=i.useCallback((function(e,t){v&&Object(d.a)(t?ne:re,e,pe(),void 0)}),[ne,re,v]),Ie=i.useCallback((function(e){e.target&&!p&&(!v&&L?Object(d.a)(L,e,pe(),void 0):(me(!he),ye(!0),we(he?-1:0),Ee(e,!he)))}),[me,ye,we,L,Ee,he,v,p]),Ne=i.useCallback((function(e){ye(!0),we(he?0:-1),W&&Object(d.a)(W,e,pe(),void 0)}),[W,ye,we]),Te=i.useCallback((function(e){ye(!1),me(!1),we(-1),Object(d.a)($,e,pe(),void 0),he&&Ee(e,!1)}),[$,ye,me,we,Ee]),Me=i.useCallback((function(e){e.preventDefault()}),[]),De=i.useCallback((function(e,t){v&&(v[t].disabled||Object(d.a)(B,e,pe(),{itemProps:v[t],itemIndex:t}))}),[B]),Pe=i.useCallback((function(e,t){e.target&&v&&(we(t),me(!1),De(e,t),Ee(e,!1))}),[we,me,De,Ee]),_e=i.useCallback((function(e){document.activeElement===le.current&&e.preventDefault()}),[le,document.activeElement]),je=i.useCallback((function(e){var t=ke,n=v?v.length-1:-1,o="bottom"===r.vertical;switch(e.keyCode){case l.a.enter:case l.a.space:t>=0&&De(e,t),e.preventDefault(),me(!he),we(he?-1:0);break;case l.a.esc:e.preventDefault(),me(!1),we(-1);break;case l.a.home:e.preventDefault(),we(0);break;case l.a.end:e.preventDefault(),we(n);break;case l.a.down:case l.a.right:e.preventDefault(),t<n&&!o&&we(t+1),t>0&&o&&we(t-1);break;case l.a.up:case l.a.left:e.preventDefault(),t>0&&!o&&we(t-1),t<n&&o&&we(t+1)}Object(d.a)(ee,e,pe(),void 0)}),[ee,ke,we,xe,me]),Re=i.useMemo((function(){var e;return Object(c.a)("k-fab k-fab-solid",((e={})["k-fab-"+S]=S,e["k-fab-sm"]="small"===I,e["k-fab-md"]="medium"===I,e["k-fab-lg"]="large"===I,e["k-disabled"]=p,e["k-pos-absolute"]="absolute"===O,e["k-pos-fixed"]="fixed"===O,e["k-focus"]=ge,e["k-rounded-"+(u.a.roundedMap[M]||M)]=M,e["k-fab-solid-"+P]=P,e),"k-"+r.vertical+"-"+r.horizontal,a)}),[P,I,M,S,p,O,r,ge,a]),Ae=v&&v.map((function(e,t){return i.createElement(q,Z({},e,{key:t,index:t,id:Se+"-"+t,disabled:p||e.disabled,focused:ke===t,dataItem:e,item:g,className:Object(c.a)(e.className,(n=Oe||"ltr",o=r.horizontal,{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[n]["end"===o?"end":"start"])),onClick:Pe,onDown:_e}));var n,o})),Fe=f&&!b,ze=(le.current?le.current.offsetWidth:0)/2-16;return i.createElement(V.a.Provider,{value:ae},i.createElement(i.Fragment,null,i.createElement("button",Z({ref:le,id:m||Ce,role:v?"menubutton":"button",type:"button","aria-disabled":p,"aria-expanded":v?he:void 0,"aria-haspopup":!!v,"aria-label":(b||"")+" floatingactionbutton","aria-owns":v?Se:void 0,"aria-activedescendant":ke>=0&&v?Se+"-"+ke:void 0,tabIndex:Object(K.a)(j,p),accessKey:R,dir:Oe,disabled:p,className:Re,style:N,onClick:Ie,onMouseDown:Me,onFocus:Ne,onBlur:Te,onKeyDown:je},oe),f?i.createElement("span",{role:"presentation",className:Object(c.a)("k-fab-icon k-icon k-i-"+f)}):h?i.createElement("span",{role:"presentation",className:h}):null,b&&i.createElement("span",{className:"k-fab-text"},b)),z&&he&&i.createElement("div",{className:"k-overlay",style:Z({zIndex:ae},_)}),i.createElement(y.a,{ref:ue,anchor:le.current,show:he,animate:F.animate,popupClass:Object(c.a)("k-popup-transparent k-fab-popup",F.popupClass),anchorAlign:F.anchorAlign||G(r,xe),popupAlign:F.popupAlign||X(r,xe),style:{boxShadow:"none"}},i.createElement("ul",{ref:ce,role:"menu","aria-labelledby":m,id:Se,className:Object(c.a)("k-fab-items",{"k-fab-items-bottom":"bottom"!==r.vertical,"k-fab-items-top":"bottom"===r.vertical}),style:{paddingLeft:Fe?ze:void 0,paddingRight:Fe?ze:void 0}},Ae))))}));ee.propTypes={className:a.string,style:a.object,id:a.string,dir:a.string,tabIndex:a.number,accessKey:a.string,disabled:a.bool,icon:a.string,iconClass:a.string,text:a.string,alignOffset:a.shape({x:a.oneOfType([a.number,a.string]),y:a.oneOfType([a.number,a.string])}),align:a.shape({vertical:a.oneOf(["top","middle","bottom"]),horizontal:a.oneOf(["start","center","end"])}),positionMode:a.oneOf(["absolute","fixed"]),shape:a.oneOf([null,"rectangle","square"]),size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),themeColor:a.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:a.bool,overlayStyle:a.object};var te={align:{vertical:"bottom",horizontal:"end"},shape:"rectangle",size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};ee.displayName="KendoFloatingActionButton"},function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"getHtml",(function(){return Rt})),n.d(t,"setHtml",(function(){return At})),n.d(t,"parseContent",(function(){return jt})),n.d(t,"trimWhitespace",(function(){return Mt})),n.d(t,"htmlToFragment",(function(){return Dt})),n.d(t,"domToPmDoc",(function(){return _t})),n.d(t,"pmDocToFragment",(function(){return Pt})),n.d(t,"applyInlineStyle",(function(){return hn})),n.d(t,"getInlineStyles",(function(){return dn})),n.d(t,"toggleInlineFormat",(function(){return fn})),n.d(t,"applyLink",(function(){return vn})),n.d(t,"removeLink",(function(){return mn})),n.d(t,"insertText",(function(){return gn})),n.d(t,"insertImage",(function(){return yn})),n.d(t,"alignBlocks",(function(){return Nn})),n.d(t,"isAligned",(function(){return Tn})),n.d(t,"cleanFormatting",(function(){return Mn})),n.d(t,"hasNode",(function(){return Sn})),n.d(t,"activeNode",(function(){return In})),n.d(t,"formatBlockElements",(function(){return wn})),n.d(t,"getBlockFormats",(function(){return On})),n.d(t,"parentBlockFormat",(function(){return En})),n.d(t,"changeTextBlock",(function(){return bn})),n.d(t,"blockNodes",(function(){return kn})),n.d(t,"cleanTextBlockFormatting",(function(){return Cn})),n.d(t,"hasMark",(function(){return rn})),n.d(t,"getMark",(function(){return sn})),n.d(t,"getActiveMarks",(function(){return ln})),n.d(t,"removeAllMarks",(function(){return tn})),n.d(t,"cleanMarks",(function(){return nn})),n.d(t,"selectionMarks",(function(){return an})),n.d(t,"indent",(function(){return Ar})),n.d(t,"canIndentAsListItem",(function(){return _r})),n.d(t,"outdent",(function(){return Fr})),n.d(t,"canOutdentAsListItem",(function(){return jr})),n.d(t,"isIndented",(function(){return Pr})),n.d(t,"canBeIndented",(function(){return Rr})),n.d(t,"indentBlocks",(function(){return Dr})),n.d(t,"toggleOrderedList",(function(){return qr})),n.d(t,"toggleUnorderedList",(function(){return $r})),n.d(t,"toggleList",(function(){return Wr})),n.d(t,"listStyle",(function(){return Kr})),n.d(t,"blockquote",(function(){return Tr})),n.d(t,"liftBlockquote",(function(){return Mr})),n.d(t,"hasSameMarkup",(function(){return Wt})),n.d(t,"getSelectionText",(function(){return $t})),n.d(t,"getNodeFromSelection",(function(){return qt})),n.d(t,"selectedLineTextOnly",(function(){return Ut})),n.d(t,"expandSelection",(function(){return Jt})),n.d(t,"expandToWordWrap",(function(){return Yt})),n.d(t,"canInsert",(function(){return Bt})),n.d(t,"insertNode",(function(){return Kt})),n.d(t,"indentHtml",(function(){return Gt})),n.d(t,"alignLeftRules",(function(){return Gr})),n.d(t,"alignCenterRules",(function(){return Jr})),n.d(t,"alignRightRules",(function(){return Xr})),n.d(t,"alignJustifyRules",(function(){return Yr})),n.d(t,"alignRemoveRules",(function(){return Zr})),n.d(t,"indentRules",(function(){return qn})),n.d(t,"outdentRules",(function(){return Un})),n.d(t,"nodes",(function(){return Zl})),n.d(t,"marks",(function(){return $l})),n.d(t,"buildKeymap",(function(){return Hc})),n.d(t,"buildListKeymap",(function(){return Kc})),n.d(t,"bold",(function(){return jc})),n.d(t,"italic",(function(){return Rc})),n.d(t,"underline",(function(){return Ac})),n.d(t,"strikethrough",(function(){return Fc})),n.d(t,"subscript",(function(){return zc})),n.d(t,"superscript",(function(){return Lc})),n.d(t,"link",(function(){return Bc})),n.d(t,"sanitize",(function(){return Qc})),n.d(t,"removeComments",(function(){return eu})),n.d(t,"removeTag",(function(){return tu})),n.d(t,"pasteCleanup",(function(){return su})),n.d(t,"sanitizeClassAttr",(function(){return ru})),n.d(t,"sanitizeStyleAttr",(function(){return au})),n.d(t,"removeAttribute",(function(){return nu})),n.d(t,"replaceImageSourcesFromRtf",(function(){return mu})),n.d(t,"convertMsLists",(function(){return Zc})),n.d(t,"find",(function(){return gu})),n.d(t,"findAt",(function(){return vu})),n.d(t,"findAll",(function(){return yu})),n.d(t,"replace",(function(){return bu})),n.d(t,"replaceAll",(function(){return ku})),n.d(t,"placeholder",(function(){return xu})),n.d(t,"spacesFix",(function(){return Iu})),n.d(t,"textHighlight",(function(){return Tu})),n.d(t,"textHighlightKey",(function(){return Nu})),n.d(t,"imageResizing",(function(){return zu})),n.d(t,"imageResizeKey",(function(){return Pu})),n.d(t,"caretColor",(function(){return Bu})),n.d(t,"caretColorKey",(function(){return Lu})),n.d(t,"tableResizing",(function(){return vd})),n.d(t,"tableResizeKey",(function(){return $u})),n.d(t,"tableColumnResizeKey",(function(){return qu})),n.d(t,"tableRowResizeKey",(function(){return Uu})),n.d(t,"autoJoin",(function(){return wr})),n.d(t,"baseKeymap",(function(){return Nr})),n.d(t,"chainCommands",(function(){return Cr})),n.d(t,"createParagraphNear",(function(){return lr})),n.d(t,"deleteSelection",(function(){return Gn})),n.d(t,"exitCode",(function(){return sr})),n.d(t,"joinBackward",(function(){return Xn})),n.d(t,"joinDown",(function(){return rr})),n.d(t,"joinForward",(function(){return Qn})),n.d(t,"joinUp",(function(){return nr})),n.d(t,"lift",(function(){return or})),n.d(t,"liftEmptyBlock",(function(){return cr})),n.d(t,"macBaseKeymap",(function(){return Er})),n.d(t,"newlineInCode",(function(){return ir})),n.d(t,"pcBaseKeymap",(function(){return Sr})),n.d(t,"selectAll",(function(){return fr})),n.d(t,"selectNodeBackward",(function(){return Yn})),n.d(t,"selectNodeForward",(function(){return er})),n.d(t,"selectParentNode",(function(){return pr})),n.d(t,"selectTextblockEnd",(function(){return gr})),n.d(t,"selectTextblockStart",(function(){return vr})),n.d(t,"setBlockType",(function(){return br})),n.d(t,"splitBlock",(function(){return ur})),n.d(t,"splitBlockKeepMarks",(function(){return dr})),n.d(t,"toggleMark",(function(){return kr})),n.d(t,"wrapIn",(function(){return yr})),n.d(t,"dropCursor",(function(){return gd})),n.d(t,"GapCursor",(function(){return bd})),n.d(t,"gapCursor",(function(){return wd})),n.d(t,"HistoryState",(function(){return ic})),n.d(t,"closeHistory",(function(){return fc})),n.d(t,"history",(function(){return vc})),n.d(t,"redo",(function(){return yc})),n.d(t,"redoDepth",(function(){return kc})),n.d(t,"undo",(function(){return gc})),n.d(t,"undoDepth",(function(){return bc})),n.d(t,"InputRule",(function(){return wc})),n.d(t,"closeDoubleQuote",(function(){return Nc})),n.d(t,"closeSingleQuote",(function(){return Mc})),n.d(t,"ellipsis",(function(){return Ec})),n.d(t,"emDash",(function(){return Sc})),n.d(t,"inputRules",(function(){return Cc})),n.d(t,"openDoubleQuote",(function(){return Ic})),n.d(t,"openSingleQuote",(function(){return Tc})),n.d(t,"smartQuotes",(function(){return Dc})),n.d(t,"textblockTypeInputRule",(function(){return _c})),n.d(t,"undoInputRule",(function(){return xc})),n.d(t,"wrappingInputRule",(function(){return Pc})),n.d(t,"keydownHandler",(function(){return ho})),n.d(t,"keymap",(function(){return fo})),n.d(t,"ContentMatch",(function(){return _})),n.d(t,"DOMParser",(function(){return ee})),n.d(t,"DOMSerializer",(function(){return de})),n.d(t,"Fragment",(function(){return i})),n.d(t,"Mark",(function(){return u})),n.d(t,"MarkType",(function(){return Y})),n.d(t,"Node",(function(){return T})),n.d(t,"NodeRange",(function(){return E})),n.d(t,"NodeType",(function(){return U})),n.d(t,"ReplaceError",(function(){return d})),n.d(t,"ResolvedPos",(function(){return w})),n.d(t,"Schema",(function(){return Z})),n.d(t,"Slice",(function(){return p})),n.d(t,"addListNodes",(function(){return zn})),n.d(t,"bulletList",(function(){return Rn})),n.d(t,"liftListItem",(function(){return Vn})),n.d(t,"listItem",(function(){return An})),n.d(t,"orderedList",(function(){return jn})),n.d(t,"sinkListItem",(function(){return Hn})),n.d(t,"splitListItem",(function(){return Bn})),n.d(t,"wrapInList",(function(){return Ln})),n.d(t,"AllSelection",(function(){return lt})),n.d(t,"EditorState",(function(){return gt})),n.d(t,"NodeSelection",(function(){return at})),n.d(t,"Plugin",(function(){return kt})),n.d(t,"PluginKey",(function(){return Ot})),n.d(t,"Selection",(function(){return tt})),n.d(t,"SelectionRange",(function(){return rt})),n.d(t,"TextSelection",(function(){return ot})),n.d(t,"Transaction",(function(){return pt})),n.d(t,"TableMap",(function(){return ps})),n.d(t,"tableEditing",(function(){return Pl})),n.d(t,"tableEditingKey",(function(){return ys})),n.d(t,"tableNodeTypes",(function(){return gs})),n.d(t,"tableNodes",(function(){return vs})),n.d(t,"fixTables",(function(){return Zs})),n.d(t,"fixTablesKey",(function(){return Ys})),n.d(t,"isInTable",(function(){return ks})),n.d(t,"deleteTable",(function(){return Cl})),n.d(t,"inSameTable",(function(){return xs})),n.d(t,"CellSelection",(function(){return Ps})),n.d(t,"selectedRect",(function(){return Qs})),n.d(t,"selectionCell",(function(){return ws})),n.d(t,"setCellAttr",(function(){return ml})),n.d(t,"goToNextCell",(function(){return wl})),n.d(t,"toggleHeader",(function(){return gl})),n.d(t,"toggleHeaderCell",(function(){return kl})),n.d(t,"toggleHeaderColumn",(function(){return bl})),n.d(t,"toggleHeaderRow",(function(){return yl})),n.d(t,"splitCell",(function(){return fl})),n.d(t,"splitCellWithType",(function(){return hl})),n.d(t,"mergeCells",(function(){return pl})),n.d(t,"deleteColumn",(function(){return ol})),n.d(t,"deleteRow",(function(){return ul})),n.d(t,"rowIsHeader",(function(){return il})),n.d(t,"addRow",(function(){return al})),n.d(t,"addColSpan",(function(){return Ms})),n.d(t,"addColumn",(function(){return el})),n.d(t,"addColumnAfter",(function(){return nl})),n.d(t,"addColumnBefore",(function(){return tl})),n.d(t,"colCount",(function(){return Es})),n.d(t,"columnIsHeader",(function(){return Ds})),n.d(t,"columnResizing",(function(){return El})),n.d(t,"columnResizingPluginKey",(function(){return Sl})),n.d(t,"updateColumnsOnResize",(function(){return xl})),n.d(t,"cellAround",(function(){return bs})),n.d(t,"findCell",(function(){return Ss})),n.d(t,"removeColSpan",(function(){return Ts})),n.d(t,"moveCellForward",(function(){return Os})),n.d(t,"nextCell",(function(){return Is})),n.d(t,"AddMarkStep",(function(){return Be})),n.d(t,"MapResult",(function(){return ve})),n.d(t,"Mapping",(function(){return ye})),n.d(t,"RemoveMarkStep",(function(){return Ve})),n.d(t,"ReplaceAroundStep",(function(){return Ie})),n.d(t,"ReplaceStep",(function(){return Ee})),n.d(t,"Step",(function(){return xe})),n.d(t,"StepMap",(function(){return ge})),n.d(t,"StepResult",(function(){return Se})),n.d(t,"Transform",(function(){return ke})),n.d(t,"TransformError",(function(){return be})),n.d(t,"canJoin",(function(){return je})),n.d(t,"canSplit",(function(){return _e})),n.d(t,"dropPoint",(function(){return ze})),n.d(t,"findWrapping",(function(){return De})),n.d(t,"insertPoint",(function(){return Fe})),n.d(t,"joinPoint",(function(){return Ae})),n.d(t,"liftTarget",(function(){return Me})),n.d(t,"replaceStep",(function(){return He})),n.d(t,"Decoration",(function(){return Fa})),n.d(t,"DecorationSet",(function(){return Va})),n.d(t,"EditorView",(function(){return es})),n.d(t,"__endComposition",(function(){return Ia})),n.d(t,"__parseFromClipboard",(function(){return Ji})),n.d(t,"__serializeForClipboard",(function(){return Xi})),n.d(t,"createTable",(function(){return Id})),n.d(t,"addRowAfter",(function(){return Md})),n.d(t,"addRowBefore",(function(){return Td})),n.d(t,"pmAddRowAfter",(function(){return ll})),n.d(t,"pmAddRowBefore",(function(){return sl})),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),a=o.content.slice();return-1==i?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new r(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),a=o.find(e);return i.splice(-1==a?i.length:a,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;n<e.length;n++)this.size+=e[n].nodeSize},a={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};i.prototype.nodesBetween=function(e,t,n,r,o){void 0===r&&(r=0);for(var i=0,a=0;a<t;i++){var s=this.content[i],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=l}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+="function"==typeof r?r(a):r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new i(r,this.size+e.size)},i.prototype.cut=function(e,t){if(null==t&&(t=this.size),0==e&&t==this.size)return this;var n=[],r=0;if(t>e)for(var o=0,a=0;a<t;o++){var s=this.content[o],l=a+s.nodeSize;l>e&&((a<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=l}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0},a.firstChild.get=function(){return this.content.length?this.content[0]:null},a.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},a.childCount.get=function(){return this.content.length},i.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},i.prototype.maybeChild=function(e){return this.content[e]},i.prototype.forEach=function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}},i.prototype.findDiffStart=function(e,t){return void 0===t&&(t=0),function e(t,n,r){for(var o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;var i=t.child(o),a=n.child(o);if(i!=a){if(!i.sameMarkup(a))return r;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)r++;return r}if(i.content.size||a.content.size){var l=e(i.content,a.content,r+1);if(null!=l)return l}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},i.prototype.findDiffEnd=function(e,t,n){return void 0===t&&(t=this.size),void 0===n&&(n=e.size),function e(t,n,r,o){for(var i=t.childCount,a=n.childCount;;){if(0==i||0==a)return i==a?null:{a:r,b:o};var s=t.child(--i),l=n.child(--a),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:r,b:o};if(s.isText&&s.text!=l.text){for(var u=0,d=Math.min(s.text.length,l.text.length);u<d&&s.text[s.text.length-u-1]==l.text[l.text.length-u-1];)u++,r--,o--;return{a:r,b:o}}if(s.content.size||l.content.size){var p=e(s.content,l.content,r-1,o-1);if(p)return p}r-=c,o-=c}else r-=c,o-=c}}(this,e,t,n)},i.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return l(0,e);if(e==this.size)return l(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?l(n+1,o):l(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;r<e.length;r++){var o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new i(t||e,n)},i.from=function(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(i.prototype,a);var s={index:0,offset:0};function l(e,t){return s.index=e,s.offset=t,s}function c(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!c(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!c(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}i.empty=new i([],0);var u=function(e,t){this.type=e,this.attrs=t};function d(e){var t=Error.call(this,e);return t.__proto__=d.prototype,t}u.prototype.addToSet=function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},u.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e},u.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},u.prototype.eq=function(e){return this==e||this.type==e.type&&c(this.attrs,e.attrs)},u.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},u.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type "+t.type+" in this schema");return n.create(t.attrs)},u.sameSet=function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0},u.setFrom=function(e){if(!e||0==e.length)return u.none;if(e instanceof u)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},u.none=[],d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.name="ReplaceError";var p=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n},f={size:{configurable:!0}};function h(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o<t.depth-r.openStart){var l=e(t,n,r,o+1);return s.copy(s.content.replaceChild(a,l))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var c=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),u=c.start,d=c.end;return b(s,function e(t,n,r,o,a){var s=t.depth>a&&v(t,n,a+1),l=o.depth>a&&v(r,o,a+1),c=[];y(null,t,a,c),s&&l&&n.index(a)==r.index(a)?(m(s,l),g(b(s,e(t,n,r,o,a+1)),c)):(s&&g(b(s,k(t,n,a+1)),c),y(n,r,a,c),l&&g(b(l,k(r,o,a+1)),c));return y(o,null,a,c),new i(c)}(t,u,d,n,o))}var p=t.parent,f=p.content;return b(p,f.cut(0,t.parentOffset).append(r.content).append(f.cut(n.parentOffset)))}return b(s,k(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new d("Cannot join "+t.type.name+" onto "+e.type.name)}function v(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function g(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function y(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(g(e.nodeAfter,r),i++));for(var s=i;s<a;s++)g(o.child(s),r);t&&t.depth==n&&t.textOffset&&g(t.nodeBefore,r)}function b(e,t){if(!e.type.validContent(t))throw new d("Invalid content for node "+e.type.name);return e.copy(t)}function k(e,t,n){var r=[];(y(null,e,n,r),e.depth>n)&&g(b(v(e,t,n+1),k(e,t,n+1)),r);return y(t,null,n,r),new i(r)}f.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,l=t.maybeChild(a);if(s==n||l.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var c=e(l.content,n-s-1,r);return c&&t.replaceChild(a,l.copy(c))}(this.content,e+this.openStart,t,null);return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(e,t){return new p(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),l=t.findIndex(r),c=l.index,u=l.offset;if(a==n||s.isText){if(u!=r&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},p.fromJSON=function(e,t){if(!t)return p.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(i.fromJSON(e,t.content),n,r)},p.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new p(e,n,r)},Object.defineProperties(p.prototype,f),p.empty=new p(i.empty,0,0);var w=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},C={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};w.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},C.parent.get=function(){return this.node(this.depth)},C.doc.get=function(){return this.node(0)},w.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},w.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},w.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},w.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},w.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},w.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},w.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},C.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},C.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},C.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},w.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r},w.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i},w.prototype.marksAcross=function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},w.prototype.sharedDepth=function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},w.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new E(this,e,n)},w.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},w.prototype.max=function(e){return e.pos>this.pos?e:this},w.prototype.min=function(e){return e.pos<this.pos?e:this},w.prototype.toString=function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset},w.resolve=function(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,l=a.offset,c=o-l;if(n.push(i,s,r+l),!c)break;if((i=i.child(s)).isText)break;o=c-1,r+=l+1}return new w(t,n,o)},w.resolveCached=function(e,t){for(var n=0;n<O.length;n++){var r=O[n];if(r.pos==t&&r.doc==e)return r}var o=O[x]=w.resolve(e,t);return x=(x+1)%S,o},Object.defineProperties(w.prototype,C);var O=[],x=0,S=12,E=function(e,t,n){this.$from=e,this.$to=t,this.depth=n},I={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};I.start.get=function(){return this.$from.before(this.depth+1)},I.end.get=function(){return this.$to.after(this.depth+1)},I.parent.get=function(){return this.$from.node(this.depth)},I.startIndex.get=function(){return this.$from.index(this.depth)},I.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(E.prototype,I);var N=Object.create(null),T=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||u.none},M={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};M.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},M.childCount.get=function(){return this.content.childCount},T.prototype.child=function(e){return this.content.child(e)},T.prototype.maybeChild=function(e){return this.content.maybeChild(e)},T.prototype.forEach=function(e){this.content.forEach(e)},T.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},T.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},M.textContent.get=function(){return this.textBetween(0,this.content.size,"")},T.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},M.firstChild.get=function(){return this.content.firstChild},M.lastChild.get=function(){return this.content.lastChild},T.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},T.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},T.prototype.hasMarkup=function(e,t,n){return this.type==e&&c(this.attrs,t||e.defaultAttrs||N)&&u.sameSet(this.marks,n||u.none)},T.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},T.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},T.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},T.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return p.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new p(s,r.depth-i,o.depth-i)},T.prototype.replace=function(e,t,n){return h(this.resolve(e),this.resolve(t),n)},T.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},T.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},T.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},T.prototype.resolve=function(e){return w.resolveCached(this,e)},T.prototype.resolveNoCache=function(e){return w.resolve(this,e)},T.prototype.rangeHasMark=function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},M.isBlock.get=function(){return this.type.isBlock},M.isTextblock.get=function(){return this.type.isTextblock},M.inlineContent.get=function(){return this.type.inlineContent},M.isInline.get=function(){return this.type.isInline},M.isText.get=function(){return this.type.isText},M.isLeaf.get=function(){return this.type.isLeaf},M.isAtom.get=function(){return this.type.isAtom},T.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),P(this.marks,e)},T.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},T.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0},T.prototype.canReplaceWith=function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd},T.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},T.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));for(var e=u.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!u.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node "+this.type.name+": "+this.marks.map((function(e){return e.type.name})));this.content.forEach((function(e){return e.check()}))},T.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e},T.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=i.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(T.prototype,M);var D=function(e){function t(t,n,r,o){if(e.call(this,t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return t.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):P(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},t.prototype.textBetween=function(e,t){return this.text.slice(e,t)},n.nodeSize.get=function(){return this.text.length},t.prototype.mark=function(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)},t.prototype.withText=function(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)},t.prototype.cut=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.text.length),0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))},t.prototype.eq=function(e){return this.sameMarkup(e)&&this.text==e.text},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.text=this.text,t},Object.defineProperties(t.prototype,n),t}(T);function P(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var _=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},j={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};_.parse=function(e,t){var n=new R(e,t);if(null==n.next)return _.empty;var r=F(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];K(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new _(r.indexOf(e.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort(H);i.next.push(o[a],t[s.join(",")]||n(s))}return i}(K(e,0))}(function(e){var t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(e(n,i))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=e(t.exprs[a],i);if(a==t.exprs.length-1)return s;o(s,i=n())}else{if("star"==t.type){var l=n();return r(i,l),o(e(t.expr,l),l),[r(l)]}if("plus"==t.type){var c=n();return o(e(t.expr,i),c),o(e(t.expr,c),c),[r(c)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var u=i,d=0;d<t.min;d++){var p=n();o(e(t.expr,u),p),u=p}if(-1==t.max)o(e(t.expr,u),u);else for(var f=t.min;f<t.max;f++){var h=n();r(u,h),o(e(t.expr,u),h),u=h}return[r(u)]}if("name"==t.type)return[r(i,null,t.value)]}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}}(r));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s+=2){var l=o.next[s],c=o.next[s+1];a.push(l.name),!i||l.isText||l.hasRequiredAttrs()||(i=!1),-1==r.indexOf(c)&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},_.prototype.matchType=function(e){for(var t=0;t<this.next.length;t+=2)if(this.next[t]==e)return this.next[t+1];return null},_.prototype.matchFragment=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.childCount);for(var r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r},j.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},j.defaultType.get=function(){for(var e=0;e<this.next.length;e+=2){var t=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}},_.prototype.compatible=function(e){for(var t=0;t<this.next.length;t+=2)for(var n=0;n<e.next.length;n+=2)if(this.next[t]==e.next[n])return!0;return!1},_.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(a,s){var l=a.matchFragment(e,n);if(l&&(!t||l.validEnd))return i.from(s.map((function(e){return e.createAndFill()})));for(var c=0;c<a.next.length;c+=2){var u=a.next[c],d=a.next[c+1];if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var p=o(d,s.concat(u));if(p)return p}}}(this,[])},_.prototype.findWrapping=function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n},_.prototype.computeWrapping=function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s+=2){var l=o.next[s];l.isLeaf||l.hasRequiredAttrs()||l.name in t||r.type&&!o.next[s+1].validEnd||(n.push({match:l.contentMatch,type:l,via:r}),t[l.name]=!0)}}},j.edgeCount.get=function(){return this.next.length>>1},_.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},_.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r<n.next.length;r+=2)-1==e.indexOf(n.next[r])&&t(n.next[r])}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o+=2)r+=(o?", ":"")+t.next[o].name+"->"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(_.prototype,j),_.empty=new _(!0);var R=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},A={next:{configurable:!0}};function F(e){var t=[];do{t.push(z(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function z(e){var t=[];do{t.push(L(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function L(e){for(var t=function(e){if(e.eat("(")){var t=F(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=V(e,t)}return t}function B(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function V(e,t){var n=B(e),r=n;return e.eat(",")&&(r="}"!=e.next?B(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function H(e,t){return t-e}function K(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,l=a.to;s||-1!=n.indexOf(l)||t(l)}}(t),n.sort(H)}function W(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function $(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function q(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new X(e[n]);return t}A.next.get=function(){return this.tokens[this.pos]},R.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},R.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(R.prototype,A);var U=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=q(n.attrs),this.defaultAttrs=W(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e},G={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0},whitespace:{configurable:!0}};G.isInline.get=function(){return!this.isBlock},G.isTextblock.get=function(){return this.isBlock&&this.inlineContent},G.isLeaf.get=function(){return this.contentMatch==_.empty},G.isAtom.get=function(){return this.isLeaf||this.spec.atom},G.whitespace.get=function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")},U.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},U.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},U.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:$(this.attrs,e)},U.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new T(this,this.computeAttrs(e),i.from(t),u.setFrom(n))},U.prototype.createChecked=function(e,t,n){if(t=i.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new T(this,this.computeAttrs(e),t,u.setFrom(n))},U.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(i.empty,!0);return o?new T(this,e,t.append(o),u.setFrom(n)):null},U.prototype.validContent=function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0},U.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},U.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0},U.prototype.allowedMarks=function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:u.empty:e},U.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new U(e,t,r)}));var r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(U.prototype,G);var X=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},J={isRequired:{configurable:!0}};J.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(X.prototype,J);var Y=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=q(r.attrs),this.rank=t,this.excluded=null;var o=W(this.attrs);this.instance=o&&new u(this,o)};Y.prototype.create=function(e){return!e&&this.instance?this.instance:new u(this,$(this.attrs,e))},Y.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new Y(e,r++,t,o)})),n},Y.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e},Y.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},Y.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var Z=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.from(e.nodes),this.spec.marks=o.from(e.marks),this.nodes=U.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=_.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?Q(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=null==u?[c]:""==u?[]:Q(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Q(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var l=e.marks[s];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}Z.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof U))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Z.prototype.text=function(e,t){var n=this.nodes.text;return new D(n,n.defaultAttrs,e,u.setFrom(t))},Z.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Z.prototype.nodeFromJSON=function(e){return T.fromJSON(this,e)},Z.prototype.markFromJSON=function(e){return u.fromJSON(this,e)},Z.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),p.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(le(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i}return o}}},ee.prototype.matchStyle=function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o];if(!(0!=i.style.indexOf(e)||i.context&&!n.matchesContext(i.context)||i.style.length>e.length&&(61!=i.style.charCodeAt(e.length)||i.style.slice(e.length+1)!=t))){if(i.getAttrs){var a=i.getAttrs(t);if(!1===a)continue;i.attrs=a}return i}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=ce(e)),e.mark=t}))};for(var o in e.marks)r(o);var i;for(var a in e.nodes)i=void 0,(i=e.nodes[a].spec.parseDOM)&&i.forEach((function(e){n(e=ce(e)),e.node=a}));return t},ee.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new ee(e,ee.schemaRules(e)))};var te={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},re={ol:!0,ul:!0};function oe(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var ie=function(e,t,n,r,o,i,a){this.type=e,this.attrs=t,this.solid=o,this.match=i||(4&a?null:e.contentMatch),this.options=a,this.content=[],this.marks=n,this.activeMarks=u.none,this.pendingMarks=r,this.stashMarks=[]};ie.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(i.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)},ie.prototype.finish=function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length)))}var r=i.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},ie.prototype.popFromStashMark=function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},ie.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):ue(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}},ie.prototype.inlineContext=function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!te.hasOwnProperty(e.parentNode.nodeName.toLowerCase())};var ae=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n;var r,o=t.topNode,i=oe(null,t.preserveWhitespace,0)|(n?4:0);r=o?new ie(o.type,o.attrs,u.none,u.none,!0,t.topMatch||o.type.contentMatch,i):new ie(n?null:e.schema.topNodeType,null,u.none,u.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},se={top:{configurable:!0},currentPos:{configurable:!0}};function le(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ce(e){var t={};for(var n in e)t[n]=e[n];return t}function ue(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(e)){var i=[],a=function(e){i.push(e);for(var n=0;n<e.edgeCount;n++){var r=e.edge(n),o=r.type,s=r.next;if(o==t)return!0;if(i.indexOf(s)<0&&a(s))return!0}};return a(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}se.top.get=function(){return this.nodes[this.open]},ae.prototype.addDOM=function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}},ae.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)},ae.prototype.addElement=function(e,t){var n,r=e.nodeName.toLowerCase();re.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&re.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:ne.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(te.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:null)},ae.prototype.leafFallback=function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))},ae.prototype.ignoreFallback=function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},ae.prototype.readStyles=function(e){var t=u.none;e:for(var n=0;n<e.length;n+=2)for(var r=null;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t},ae.prototype.addElementByRule=function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var l=t.contentElement;"string"==typeof l?l=e.querySelector(l):"function"==typeof l&&(l=l(e)),l||(l=e),this.findAround(e,l,!0),this.addAll(l,r)}r&&(this.sync(s),this.open--),i&&this.removePendingMark(i,s)},ae.prototype.addAll=function(e,t,n,r){for(var o=n||0,i=n?e.childNodes[n]:e.firstChild,a=null==r?null:e.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i),t&&te.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},ae.prototype.findPlace=function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0},ae.prototype.insertNode=function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1},ae.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r},ae.prototype.enterInner=function(e,t,n,r){this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e,t);var i=oe(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ie(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},ae.prototype.closeExtra=function(e){var t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},se.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ae.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)},ae.prototype.findInside=function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)},ae.prototype.findAround=function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},ae.prototype.findInText=function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))},ae.prototype.matchesContext=function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(e,s){for(;e>=0;e--){var l=n[e];if(""==l){if(e==n.length-1||0==e)continue;for(;s>=i;s--)if(a(e-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=l&&-1==c.groups.indexOf(l))return!1;s--}return!0};return a(n.length-1,this.open)},ae.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},ae.prototype.addPendingMark=function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ae.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}},Object.defineProperties(ae.prototype,se);var de=function(e,t){this.nodes=e||{},this.marks=t||{}};function pe(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function fe(e){return e.document||window.document}de.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=fe(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n<i.length&&a<e.marks.length;){var s=e.marks[a];if(r.marks[s.type.name]){if(!s.eq(i[n])||!1===s.type.spec.spanning)break;n+=2,a++}else a++}for(;n<i.length;)o=i.pop(),i.pop();for(;a<e.marks.length;){var l=e.marks[a++],c=r.serializeMark(l,e.isInline,t);c&&(i.push(l,o),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(r.serializeNodeInner(e,t))})),n},de.prototype.serializeNodeInner=function(e,t){void 0===t&&(t={});var n=de.renderSpec(fe(t),this.nodes[e.type.name](e)),r=n.dom,o=n.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");t.onContent?t.onContent(e,o,t):this.serializeFragment(e.content,t,o)}return r},de.prototype.serializeNode=function(e,t){void 0===t&&(t={});for(var n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},de.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&de.renderSpec(fe(n),r(e,t))},de.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var c in l=2,s)if(null!=s[c]){var u=c.indexOf(" ");u>0?a.setAttributeNS(c.slice(0,u),c.slice(u+1),s[c]):a.setAttribute(c,s[c])}for(var d=l;d<t.length;d++){var p=t[d];if(0===p){if(d<t.length-1||d>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var f=de.renderSpec(e,p,n),h=f.dom,m=f.contentDOM;if(a.appendChild(h),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:a,contentDOM:i}},de.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new de(this.nodesFromSchema(e),this.marksFromSchema(e)))},de.nodesFromSchema=function(e){var t=pe(e.nodes);return t.text||(t.text=function(e){return e.text}),t},de.marksFromSchema=function(e){return pe(e.marks)};var he=Math.pow(2,16);function me(e){return 65535&e}var ve=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n},ge=function e(t,n){if(void 0===n&&(n=!1),!t.length&&e.empty)return e.empty;this.ranges=t,this.inverted=n};ge.prototype.recover=function(e){var t=0,n=me(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/he}(e)},ge.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},ge.prototype.map=function(e,t){return void 0===t&&(t=1),this._map(e,t,!0)},ge.prototype._map=function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var l=this.ranges[a+o],c=this.ranges[a+i],u=s+l;if(e<=u){var d=s+r+((l?e==s?-1:e==u?1:t:t)<0?0:c);if(n)return d;var p=e==(t<0?s:u)?null:a/3+(e-s)*he;return new ve(d,t<0?e!=s:e!=u,p)}r+=c-l}return n?e+r:new ve(e+r)},ge.prototype.touches=function(e,t){for(var n=0,r=me(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var l=this.ranges[a+o];if(e<=s+l&&a==3*r)return!0;n+=this.ranges[a+i]-l}return!1},ge.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(a,a+l,s,s+c),o+=c-l}},ge.prototype.invert=function(){return new ge(this.ranges,!this.inverted)},ge.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},ge.offset=function(e){return 0==e?ge.empty:new ge(e<0?[0,-e,0]:[0,0,e])},ge.empty=new ge([]);var ye=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function be(e){var t=Error.call(this,e);return t.__proto__=be.prototype,t}ye.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new ye(this.maps,this.mirror,e,t)},ye.prototype.copy=function(){return new ye(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},ye.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},ye.prototype.appendMapping=function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:null)}},ye.prototype.getMirror=function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]},ye.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},ye.prototype.appendMappingInverted=function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},ye.prototype.invert=function(){var e=new ye;return e.appendMappingInverted(this),e},ye.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e},ye.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},ye.prototype._map=function(e,t,n){for(var r=!1,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}i.deleted&&(r=!0),e=i.pos}return n?e:new ve(e,r)},be.prototype=Object.create(Error.prototype),be.prototype.constructor=be,be.prototype.name="TransformError";var ke=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ye},we={before:{configurable:!0},docChanged:{configurable:!0}};function Ce(){throw new Error("Override me")}we.before.get=function(){return this.docs.length?this.docs[0]:this.doc},ke.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new be(t.failed);return this},ke.prototype.maybeStep=function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t},we.docChanged.get=function(){return this.steps.length>0},ke.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(ke.prototype,we);var Oe=Object.create(null),xe=function(){};xe.prototype.apply=function(e){return Ce()},xe.prototype.getMap=function(){return ge.empty},xe.prototype.invert=function(e){return Ce()},xe.prototype.map=function(e){return Ce()},xe.prototype.merge=function(e){return null},xe.prototype.toJSON=function(){return Ce()},xe.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=Oe[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},xe.jsonID=function(e,t){if(e in Oe)throw new RangeError("Duplicate use of step JSON ID "+e);return Oe[e]=t,t.prototype.jsonID=e,t};var Se=function(e,t){this.doc=e,this.failed=t};Se.ok=function(e){return new Se(e,null)},Se.fail=function(e){return new Se(null,e)},Se.fromReplace=function(e,t,n,r){try{return Se.ok(e.replace(t,n,r))}catch(e){if(e instanceof d)return Se.fail(e.message);throw e}};var Ee=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&Ne(e,this.from,this.to)?Se.fail("Structure replace would overwrite content"):Se.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new ge([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?p.empty:new p(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var r=this.slice.size+e.slice.size==0?p.empty:new p(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),r,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,p.fromJSON(e,n.slice),!!n.structure)},t}(xe);xe.jsonID("replace",Ee);var Ie=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(Ne(e,this.from,this.gapFrom)||Ne(e,this.gapTo,this.to)))return Se.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Se.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?Se.fromReplace(e,this.from,this.to,n):Se.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new ge([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,p.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(xe);function Ne(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function Te(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Me(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Te(r,o,i))break}}function De(e,t,n,r){void 0===r&&(r=e);var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}(e,t),i=o&&function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,l=r;s&&l<o;l++)s=s.matchType(n.child(l).type);if(!s||!s.validEnd)return null;return a}(r,t);return i?o.map(Pe).concat({type:t,attrs:n}).concat(i.map(Pe)):null}function Pe(e){return{type:e,attrs:null}}function _e(e,t,n,r){void 0===n&&(n=1);var o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,l=n-2;s>i;s--,l--){var c=o.node(s),u=o.index(s);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(u,c.childCount),p=r&&r[l]||c;if(p!=c&&(d=d.replaceChild(0,p.type.create(p.attrs))),!c.canReplace(u+1,c.childCount)||!p.type.validContent(d))return!1}var f=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(f,f,h?h.type:o.node(i+1).type)}function je(e,t){var n=e.resolve(t),r=n.index();return Re(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Re(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function Ae(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&Re(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function Fe(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}}function ze(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(l>0?1:0),u=r.node(s),d=!1;if(1==a)d=u.canReplace(c,c,o);else{var p=u.contentMatchAt(c).findWrapping(o.firstChild.type);d=p&&u.canReplaceWith(c,c,p[0])}if(d)return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Le(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var a=e.child(o);a.content.size&&(a=a.copy(Le(a.content,t,a))),a.isInline&&(a=t(a,n,o)),r.push(a)}return i.fromArray(r)}xe.jsonID("replaceAround",Ie),ke.prototype.lift=function(e,t){for(var n=e.$from,r=e.$to,o=e.depth,a=n.before(o+1),s=r.after(o+1),l=a,c=s,u=i.empty,d=0,f=o,h=!1;f>t;f--)h||n.index(f)>0?(h=!0,u=i.from(n.node(f).copy(u)),d++):l--;for(var m=i.empty,v=0,g=o,y=!1;g>t;g--)y||r.after(g+1)<r.end(g)?(y=!0,m=i.from(r.node(g).copy(m)),v++):c++;return this.step(new Ie(l,c,a,s,new p(u.append(m),d,v),u.size-d,!0))},ke.prototype.wrap=function(e,t){for(var n=i.empty,r=t.length-1;r>=0;r--){if(n.size){var o=t[r].type.contentMatch.matchFragment(n);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=i.from(t[r].type.create(t[r].attrs,n))}var a=e.start,s=e.end;return this.step(new Ie(a,s,a,s,new p(n,0,0),t.length,!0))},ke.prototype.setBlockType=function(e,t,n,r){var o=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,r)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(o.doc,o.mapping.slice(a).map(t),n)){o.clearIncompatible(o.mapping.slice(a).map(t,1),n);var s=o.mapping.slice(a),l=s.map(t,1),c=s.map(t+e.nodeSize,1);return o.step(new Ie(l,c,l+1,c-1,new p(i.from(n.create(r,null,e.marks)),0,0),1,!0)),!1}})),this},ke.prototype.setNodeMarkup=function(e,t,n,r){var o=this.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);var a=t.create(n,null,r||o.marks);if(o.isLeaf)return this.replaceWith(e,e+o.nodeSize,a);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new Ie(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new p(i.from(a),0,0),1,!0))},ke.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var r=this.doc.resolve(e),o=i.empty,a=i.empty,s=r.depth,l=r.depth-t,c=t-1;s>l;s--,c--){o=i.from(r.node(s).copy(o));var u=n&&n[c];a=i.from(u?u.type.create(u.attrs,a):r.node(s).copy(a))}return this.step(new Ee(e,e,new p(o.append(a),t,t),!0))},ke.prototype.join=function(e,t){void 0===t&&(t=1);var n=new Ee(e-t,e+t,p.empty,!0);return this.step(n)};var Be=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new p(Le(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return Se.fromReplace(e,this.from,this.to,i)},t.prototype.invert=function(){return new Ve(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(xe);xe.jsonID("addMark",Be);var Ve=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),r=new p(Le(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return Se.fromReplace(e,this.from,this.to,r)},t.prototype.invert=function(){return new Be(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(xe);function He(e,t,n,r){if(void 0===n&&(n=t),void 0===r&&(r=p.empty),t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return Ke(o,i,r)?new Ee(t,n,r):new We(o,i,r).fit()}function Ke(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}xe.jsonID("removeMark",Ve),ke.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,c){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){for(var d=Math.max(l,e),p=Math.min(l+r.nodeSize,t),f=n.addToSet(u),h=0;h<u.length;h++)u[h].isInSet(f)||(a&&a.to==d&&a.mark.eq(u[h])?a.to=p:o.push(a=new Ve(d,p,u[h])));s&&s.to==d?s.to=p:i.push(s=new Be(d,p,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},ke.prototype.removeMark=function(e,t,n){var r=this;void 0===n&&(n=null);var o=[],i=0;return this.doc.nodesBetween(e,t,(function(r,a){if(r.isInline){i++;var s=null;if(n instanceof Y)for(var l,c=r.marks;l=n.isInSet(c);)(s||(s=[])).push(l),c=l.removeFromSet(c);else n?n.isInSet(r.marks)&&(s=[n]):s=r.marks;if(s&&s.length)for(var u=Math.min(a+r.nodeSize,t),d=0;d<s.length;d++){for(var p=s[d],f=void 0,h=0;h<o.length;h++){var m=o[h];m.step==i-1&&p.eq(o[h].style)&&(f=m)}f?(f.to=u,f.step=i):o.push({style:p,from:Math.max(a,e),to:u,step:i})}}})),o.forEach((function(e){return r.step(new Ve(e.from,e.to,e.style))})),this},ke.prototype.clearIncompatible=function(e,t,n){void 0===n&&(n=t.contentMatch);for(var r=this.doc.nodeAt(e),o=[],a=e+1,s=0;s<r.childCount;s++){var l=r.child(s),c=a+l.nodeSize,u=n.matchType(l.type,l.attrs);if(u){n=u;for(var d=0;d<l.marks.length;d++)t.allowsMarkType(l.marks[d].type)||this.step(new Ve(a,c,l.marks[d]))}else o.push(new Ee(a,c,p.empty));a=c}if(!n.validEnd){var f=n.fillBefore(i.empty,!0);this.replace(a,a,new p(f,0,0))}for(var h=o.length-1;h>=0;h--)this.step(o[h]);return this},ke.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=p.empty);var r=He(this.doc,e,t,n);return r&&this.step(r),this},ke.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new p(i.from(n),0,0))},ke.prototype.delete=function(e,t){return this.replace(e,t,p.empty)},ke.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var We=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var r=0;r<=e.depth;r++){var o=e.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(r))})}this.placed=i.empty;for(var a=e.depth;a>0;a--)this.placed=i.from(e.node(a).copy(this.placed))},$e={depth:{configurable:!0}};function qe(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(qe(e.firstChild.content,t-1,n)))}function Ue(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ue(e.lastChild.content,t-1,n)))}function Ge(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function Xe(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,Xe(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(i.empty,!0)))),e.copy(r)}function Je(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function Ye(e){return e.spec.defining||e.spec.definingForContent}function Ze(e,t,n,r,o){if(t<n){var a=e.firstChild;e=e.replaceChild(0,a.copy(Ze(a.content,t+1,n,r,a)))}if(t>r){var s=o.contentMatchAt(0),l=s.fillBefore(e).append(e);e=l.append(s.matchFragment(l).fillBefore(i.empty,!0))}return e}function Qe(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}$e.depth.get=function(){return this.frontier.length-1},We.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var l=new p(i,a,s);return t>-1?new Ie(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Ee(r.pos,o.pos,l):void 0},We.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,r=(t?(n=Ge(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var a=this.frontier[o],s=a.type,l=a.match,c=void 0,u=void 0;if(1==e&&(r?l.matchType(r.type)||(u=l.fillBefore(i.from(r),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:u};if(2==e&&r&&(c=l.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:c};if(n&&l.matchType(n.type))break}},We.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Ge(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new p(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)},We.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Ge(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new p(qe(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new p(qe(t,n,1),n,r)},We.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s<a.length;s++)this.openFrontierNode(a[s]);var l=this.unplaced,c=r?r.content:l.content,u=l.openStart-t,d=0,f=[],h=this.frontier[n],m=h.match,v=h.type;if(o){for(var g=0;g<o.childCount;g++)f.push(o.child(g));m=m.matchFragment(o)}for(var y=c.size+t-(l.content.size-l.openEnd);d<c.childCount;){var b=c.child(d),k=m.matchType(b.type);if(!k)break;(++d>1||0==u||b.content.size)&&(m=k,f.push(Xe(b.mark(v.allowedMarks(b.marks)),1==d?u:0,d==c.childCount?y:-1)))}var w=d==c.childCount;w||(y=-1),this.placed=Ue(this.placed,n,i.from(f)),this.frontier[n].match=m,w&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var C=0,O=c;C<y;C++){var x=O.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),O=x.content}this.unplaced=w?0==t?p.empty:new p(qe(l.content,t-1,1),t-1,y<0?l.openEnd:t-1):new p(qe(l.content,t,d),l.openStart,l.openEnd)},We.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Je(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r},We.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Je(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var l=this.frontier[s],c=l.match,u=Je(e,s,l.type,c,!0);if(!u||u.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}},We.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Ue(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e},We.prototype.openFrontierNode=function(e,t,n){var r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Ue(this.placed,this.depth,i.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},We.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(i.empty,!0);e.childCount&&(this.placed=Ue(this.placed,this.frontier.length,e))},Object.defineProperties(We.prototype,$e),ke.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var r=this.doc.resolve(e),o=this.doc.resolve(t);if(Ke(r,o,n))return this.step(new Ee(e,t,n));var i=Qe(r,this.doc.resolve(t));0==i[i.length-1]&&i.pop();var a=-(r.depth+1);i.unshift(a);for(var s=r.depth,l=r.pos-1;s>0;s--,l--){var c=r.node(s).type.spec;if(c.defining||c.definingAsContext||c.isolating)break;i.indexOf(s)>-1?a=s:r.before(s)==l&&i.splice(1,0,-s)}for(var u=i.indexOf(a),d=[],f=n.openStart,h=n.content,m=0;;m++){var v=h.firstChild;if(d.push(v),m==n.openStart)break;h=v.content}for(var g=f-1;g>=0;g--){var y=d[g].type,b=Ye(y);if(b&&r.node(u).type!=y)f=g;else if(b||!y.isTextblock)break}for(var k=n.openStart;k>=0;k--){var w=(k+f+1)%(n.openStart+1),C=d[w];if(C)for(var O=0;O<i.length;O++){var x=i[(O+u)%i.length],S=!0;x<0&&(S=!1,x=-x);var E=r.node(x-1),I=r.index(x-1);if(E.canReplaceWith(I,I,C.type,C.marks))return this.replace(r.before(x),S?o.after(x):t,new p(Ze(n.content,0,n.openStart,w),w,n.openEnd))}}for(var N=this.steps.length,T=i.length-1;T>=0&&(this.replace(e,t,n),!(this.steps.length>N));T--){var M=i[T];M<0||(e=r.before(M),t=o.after(M))}return this},ke.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var r=Fe(this.doc,e,n.type);null!=r&&(e=t=r)}return this.replaceRange(e,t,new p(i.from(n),0,0))},ke.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=Qe(n,r),i=0;i<o.length;i++){var a=o[i],s=i==o.length-1;if(s&&0==a||n.node(a).type.contentMatch.validEnd)return this.delete(n.start(a),r.end(a));if(a>0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var l=1;l<=n.depth&&l<=r.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(n.before(l),t);return this.delete(e,t)};var et=Object.create(null),tt=function(e,t,n){this.ranges=n||[new rt(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},nt={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};nt.anchor.get=function(){return this.$anchor.pos},nt.head.get=function(){return this.$head.pos},nt.from.get=function(){return this.$from.pos},nt.to.get=function(){return this.$to.pos},nt.$from.get=function(){return this.ranges[0].$from},nt.$to.get=function(){return this.ranges[0].$to},nt.empty.get=function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0},tt.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},tt.prototype.replace=function(e,t){void 0===t&&(t=p.empty);for(var n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var l=a[s],c=l.$from,u=l.$to,d=e.mapping.slice(i);e.replaceRange(d.map(c.pos),d.map(u.pos),s?p.empty:t),0==s&&dt(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}},tt.prototype.replaceWith=function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,l=e.mapping.slice(n),c=l.map(a.pos),u=l.map(s.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),dt(e,n,t.isInline?-1:1))}},tt.findFrom=function(e,t,n){var r=e.parent.inlineContent?new ot(e):ut(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?ut(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):ut(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},tt.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new lt(e.node(0))},tt.atStart=function(e){return ut(e,e,0,0,1)||new lt(e)},tt.atEnd=function(e){return ut(e,e,e.content.size,e.childCount,-1)||new lt(e)},tt.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=et[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},tt.jsonID=function(e,t){if(e in et)throw new RangeError("Duplicate use of selection JSON ID "+e);return et[e]=t,t.prototype.jsonID=e,t},tt.prototype.getBookmark=function(){return ot.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(tt.prototype,nt),tt.prototype.visible=!0;var rt=function(e,t){this.$from=e,this.$to=t},ot=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=p.empty),e.prototype.replace.call(this,t,n),n==p.empty){var r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new it(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0)&&(n=r),new t(n,r)},Object.defineProperties(t.prototype,n),t}(tt);tt.jsonID("text",ot);var it=function(e,t){this.anchor=e,this.head=t};it.prototype.map=function(e){return new it(e.map(this.anchor),e.map(this.head))},it.prototype.resolve=function(e){return ot.between(e.resolve(this.anchor),e.resolve(this.head))};var at=function(e){function t(t){var n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);e.call(this,t,r),this.node=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,a=o.pos,s=n.resolve(a);return i?e.near(s):new t(s)},t.prototype.content=function(){return new p(i.from(this.node),0,0)},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor},t.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},t.prototype.getBookmark=function(){return new st(this.anchor)},t.fromJSON=function(e,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new t(e.resolve(n.anchor))},t.create=function(e,t){return new this(e.resolve(t))},t.isSelectable=function(e){return!e.isText&&!1!==e.type.spec.selectable},t}(tt);at.prototype.visible=!1,tt.jsonID("node",at);var st=function(e){this.anchor=e};st.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new it(r,r):new st(r)},st.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&at.isSelectable(n)?new at(t):tt.near(t)};var lt=function(e){function t(t){e.call(this,t.resolve(0),t.resolve(t.content.size))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.replace=function(t,n){if(void 0===n&&(n=p.empty),n==p.empty){t.delete(0,t.doc.content.size);var r=e.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else e.prototype.replace.call(this,t,n)},t.prototype.toJSON=function(){return{type:"all"}},t.fromJSON=function(e){return new t(e)},t.prototype.map=function(e){return new t(e)},t.prototype.eq=function(e){return e instanceof t},t.prototype.getBookmark=function(){return ct},t}(tt);tt.jsonID("all",lt);var ct={map:function(){return this},resolve:function(e){return new lt(e)}};function ut(e,t,n,r,o,i){if(t.inlineContent)return ot.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&at.isSelectable(s))return at.create(e,n-(o<0?s.nodeSize:0))}else{var l=ut(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function dt(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof Ee||i instanceof Ie)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(tt.near(e.doc.resolve(o),n))}}var pt=function(e){function t(t){e.call(this,t.doc),this.time=Date.now(),this.curSelection=t.selection,this.curSelectionFor=0,this.storedMarks=t.storedMarks,this.updated=0,this.meta=Object.create(null)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},t.prototype.setSelection=function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return u.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||u.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(tt.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(ke);function ft(e,t){return t&&e?e.bind(t):e}var ht=function(e,t,n){this.name=e,this.init=ft(t.init,n),this.apply=ft(t.apply,n)},mt=[new ht("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new ht("selection",{init:function(e,t){return e.selection||tt.atStart(t.doc)},apply:function(e){return e.selection}}),new ht("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new ht("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],vt=function(e,t){var n=this;this.schema=e,this.fields=mt.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new ht(e.key,e.spec.state,e))}))},gt=function(e){this.config=e},yt={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};yt.schema.get=function(){return this.config.schema},yt.plugins.get=function(){return this.config.plugins},gt.prototype.apply=function(e){return this.applyTransaction(e).state},gt.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0},gt.prototype.applyTransaction=function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,l=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var u=0;u<this.config.plugins.length;u++)r.push(u<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},gt.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new gt(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}for(var i=0;i<bt.length;i++)bt[i](this,e,t);return t},yt.tr.get=function(){return new pt(this)},gt.create=function(e){for(var t=new vt(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new gt(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},gt.prototype.reconfigure=function(e){for(var t=new vt(this.schema,e.plugins),n=t.fields,r=new gt(t),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(e,r)}return r},gt.prototype.toJSON=function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t},gt.fromJSON=function(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");var r=new vt(e.schema,e.plugins),o=new gt(r);return r.fields.forEach((function(r){if("doc"==r.name)o.doc=T.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=tt.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(var i in n){var a=n[i],s=a.spec.state;if(a.key==r.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,i))return void(o[r.name]=s.fromJSON.call(a,e,t[i],o))}o[r.name]=r.init(e,o)}})),o},gt.addApplyListener=function(e){bt.push(e)},gt.removeApplyListener=function(e){var t=bt.indexOf(e);t>-1&&bt.splice(t,1)},Object.defineProperties(gt.prototype,yt);var bt=[];var kt=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:Ct("plugin")};kt.prototype.getState=function(e){return e[this.key]};var wt=Object.create(null);function Ct(e){return e in wt?e+"$"+ ++wt[e]:(wt[e]=0,e+"$")}var Ot=function(e){void 0===e&&(e="key"),this.key=Ct(e)};Ot.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Ot.prototype.getState=function(e){return e[this.key]};var xt="k-parent-node",St="k-colgroup-data",Et="k-resizable-node",It=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"],Nt=function(e,t){var n=(e.ownerDocument||document).createElement(t);Array.from(e.rows).filter((function(e){return e.getAttribute(xt)===t})).forEach((function(e){e.removeAttribute(xt),n.appendChild(e)})),n.children.length&&e.appendChild(n)},Tt=function(e,t){var n=t.toUpperCase();e.filter((function(e){return e.nodeName===n})).forEach((function(e){Array.from(e.children).forEach((function(n){n.setAttribute(xt,t),e.parentNode&&e.parentNode.insertBefore(n,e)})),e.remove()}))},Mt=function(e,t){void 0===t&&(t=It);var n=t.join("|");return e.replace(new RegExp("\\s*(<(?:"+n+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+n+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},Dt=function(e){var t,n=document.createElement("template");if("content"in n)n.innerHTML=e,t=n.content;else{var r=(new DOMParser).parseFromString(e,"text/html");t=document.createDocumentFragment();for(var o=r.body;o&&o.firstChild;)t.appendChild(o.firstChild)}return t},Pt=function(e){var t=de.fromSchema(e.type.schema).serializeFragment(e.content);return function(e){Array.from(e.querySelectorAll("table")).forEach((function(e){Nt(e,"thead"),Nt(e,"tbody"),Nt(e,"tfoot");var t=Array.from(e.children).find((function(e){return 0===e.children.length}));t&&t.remove()}))}(t),t},_t=function(e,t,n){return ee.fromSchema(t).parse(e,n)},jt=function(e,t,n){var r,o=Dt(e);return r=o,Array.from(r.querySelectorAll("table")).forEach((function(e){var t=Array.from(e.children);t.some((function(e){return"THEAD"===e.nodeName||"TFOOT"===e.nodeName}))&&(Tt(t,"thead"),Tt(t,"tbody"),Tt(t,"tfoot"));var n=t.find((function(e){return"COLGROUP"===e.nodeName}));n&&(e.setAttribute(St,n.outerHTML),n.remove())})),_t(o,t,n)},Rt=function(e){var t=Pt(e.doc),n=document.createElement("div");return n.appendChild(t),n.innerHTML},At=function(e,t,n){return void 0===t&&(t="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(r,o){return o(r.tr.setSelection(new lt(r.doc)).replaceSelectionWith(jt(e,r.schema,n)).setMeta("commandName",t))}};var Ft=function(){return(Ft=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function zt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var Lt=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===n&&r.test(t[1]))}));return o&&a.push(n+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},Bt=function(e,t){for(var n=e.selection.$from,r=n.depth;r>=0;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1},Vt=function(e){return e instanceof T?e.type.name:e.name},Ht=function(e,t){return void 0===t&&(t=1),function(n){return function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var i=r.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}}((function(t){return Vt(t)===Vt(e)}),t)(n)}},Kt=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},Wt=function(e,t,n,r){var o=i.from(jt(e,n,r)),a=i.from(jt(t,n,r));return o.eq(a)},$t=function(e){var t=e.selection;if(t instanceof ot||t instanceof lt){var n=t.content().content;return n.textBetween(0,n.size)}return""},qt=function(e){if(e.selection instanceof at)return e.selection.node},Ut=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,a=r.$to,s=r.from,l=r.to;return i.sameParent(a)&&(o.nodesBetween(s,l,(function(e){n=n||e.isLeaf&&!e.isText})),n||(t=$t(e))),t},Gt=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},Xt={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i},Jt=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r=!0===n.applyToWord?Xt:n.applyToWord,o=null,i=e.tr,a=e.selection,s=a.$head.nodeBefore,l=a.$head.nodeAfter;if(s&&"text"===s.type.name&&s.text&&l&&"text"===l.type.name&&l.text){var c=[];a.$head.parent.descendants((function(e,t){return c.push({node:e,pos:t}),!1}));for(var u=a.$head.parentOffset,d=c.findIndex((function(e){var t=e.node,n=e.pos;return n<=u&&n+t.nodeSize>=u})),p=c[d].node.text,f=!1,h=d-1;h>=0;h--){var m=c[h];!f&&m&&"text"===m.node.type.name?p=m.node.text+p:(f=!0,u-=m.node.nodeSize)}for(h=d+1;h<c.length;h++){if(!(m=c[h])||"text"!==m.node.type.name)break;p+=m.node.text}var v=p.substring(0,u),g=p.substring(u),y=r.before.exec(v),b=r.after.exec(g);if(y&&b){var k=y[0].length,w=b[0].length,C=o=a.from;i.setSelection(ot.create(e.doc,C-k,C+w));return{state:{tr:i,selection:i.selection,doc:i.doc,storedMarks:null,schema:i.doc.type.schema},dispatch:function(e){e.setSelection(ot.create(e.doc,o)),t(e)}}}}return{state:e,dispatch:t}},Yt=function(e,t){return function(n,r,o){var i=Jt(n,r,t),a=i.state,s=i.dispatch;return e(t)(a,s)}},Zt=function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1},Qt=function(e,t,n){return function(r,o){var i=r.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Zt(r.doc,l,e))return!1;if(o)if(s)e.isInSet(r.storedMarks||s.marks())?o(n.removeStoredMark(e)):o(n.addStoredMark(e.create(t)));else{for(var c=!1,u=0;!c&&u<l.length;u++){var d=l[u],p=d.$from,f=d.$to;c=r.doc.rangeHasMark(p.pos,f.pos,e)}for(u=0;u<l.length;u++){var h=l[u];p=h.$from,f=h.$to;c?n.removeMark(p.pos,f.pos,e):n.addMark(p.pos,f.pos,e.create(t))}o(n.scrollIntoView())}return!0}},en=function(e,t,n,r){void 0===r&&(r=null);var o=[],i=0;return e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof Y){var l=r.isInSet(e.marks);l&&(s=[l])}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var c=Math.min(a+e.nodeSize,n),u=0;u<s.length;u++){for(var d=s[u],p=void 0,f=0;f<o.length;f++){var h=o[f];h.step===i-1&&d.eq(h.style)&&(p=h)}p?(p.to=c,p.step=i):o.push({style:d,from:Math.max(a,t),to:c,step:i})}}})),o.forEach((function(t){return e.step(new Ve(t.from,t.to,t.style))})),e},tn=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.tr;nn(o,{except:(r=n,r instanceof Array?r:[r])}),o.docChanged&&t(o)}},nn=function(e,t){var n=t.except,r=e.doc,o=e.selection,i=r.type.schema,a=o.empty,s=o.ranges,l=(n||[]).map((function(e){return e.name}));if(!a){var c=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var n=t.$from,r=t.$to;c.forEach((function(t){return e.removeMark(n.pos,r.pos,t)}))}))}},rn=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return r[e]})),i=t.altStyle,a=e.selection,s=a.from,l=a.$from,c=a.to,u=a.empty,d=r[t.mark],p=e.doc,f=!1;return u?(n=e.storedMarks||l.marks(),f=d&&d.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):f=d&&p.rangeHasMark(s,c,d)||o.some((function(e){return p.rangeHasMark(s,c,r[e])})),!f&&i&&r.style?an(e,r.style).some((function(e){return null!==on(e,i)})):Boolean(f)},on=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},an=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,a=n.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},sn=function(e,t){var n=an(e,t),r=n.filter((function(e){return Boolean(e)}));return n.length===r.length?n[0]:void 0},ln=function(e,t){var n=an(e,t),r=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==r.length,marks:r}},cn=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return Lt(r,t)},un=function(e,t,n,r,o){var i=o.create({style:r.style}),a=[],s=[],l=null,c=null;return e.doc.nodesBetween(t,n,(function(e,u,d){if(e.isInline){var p=e.marks;if(!i.isInSet(p)&&d.type.allowsMarkType(i.type)){var f=Math.max(u,t),h=Math.min(u+e.nodeSize,n),m=cn(p,r);if(m.changed||r.newValue){for(var v=m.changed?{style:m.style||null}:{style:[r.style]+": "+r.newValue+";"},g=o.isInSet(p)?p.find((function(e){return"style"===e.type.name})):null,y=g?Ft({},g.attrs,v):v,b=o.create(y),k=b.addToSet(p),w=0;w<p.length;w++)p[w].isInSet(k)||(l&&l.to===f&&l.mark.eq(p[w])?l.to=h:(l=new Ve(f,h,p[w]),a.push(l)));var C=c&&c.to===f,O=C&&b.attrs.style===c.mark.attrs.style;C&&O?c.to=h:Object.keys(y).some((function(e){return null!==y[e]}))&&(c=new Be(f,h,b),s.push(c))}}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)})),a.length+s.length>0},dn=function(e,t){var n=e.schema.marks.style;return(n?an(e,n):[]).map((function(e){return on(e,t)})).filter((function(e){return null!==e}))},pn=function(e,t){return function(n,r,o){var i=n.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Zt(n.doc,l,e))return!1;var c,u,d,p,f=!1;if(r){var h=o||n.tr;if(s){var m=n.storedMarks||s.marks();if(e.isInSet(m)){var v=cn(m,t),g=m.find((function(e){return"style"===e.type.name})),y=Ft({},g?g.attrs:{},{style:v.style||null});if(c=g.attrs,u=y,d=Object.keys(c),p=Object.keys(u),d.length===p.length&&d.every((function(e){return c[e]===u[e]})))return!1;r(h.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&r(h.addStoredMark(e.create(y))),f=!0}}else{for(var b=0;b<l.length;b++){var k=l[b],w=k.$from,C=k.$to;f=un(h,w.pos,C.pos,t,e)}f&&(h.scrollIntoView(),r(h))}}return f}},fn=function(e,t,n){return function(r,o){var i=r.schema.marks,a=e.altStyle,s=e.altMarks,l=void 0===s?[]:s,c=e.mark,u=t||r.tr,d=!1,p=!1,f=function(){return p=!0};a&&i.style&&(d=pn(i.style,{style:a.name,value:a.value})(r,f,u));var h=[c].concat(l).filter((function(e){return i[e]})).map((function(e){return rn(r,{mark:e})&&i[e]})).filter((function(e){return e}));return h.length?function(e,t,n,r){var o=t.selection,i=o.$cursor,a=o.ranges;if(r=r||t.tr,i)e.forEach((function(e){e.isInSet(t.storedMarks||i.marks())&&n(r.removeStoredMark(e))}));else{for(var s=function(t){var n=a[t],o=n.$from,i=n.$to;e.forEach((function(e){en(r,o.pos,i.pos,e)}))},l=0;l<a.length;l++)s(l);n(r.scrollIntoView())}}(h,r,f,u):d||Qt(i[c],n,u)(r,f),p&&o(u),p}},hn=function(e,t){return function(n,r){var o=n.schema.marks.style,i={style:e.style,value:/^.+$/,newValue:e.value},a=n.tr;t&&a.setMeta("commandName",t),a.setMeta("args",e);var s=n.selection,l=s.empty,c=s.$cursor,u=s.ranges;if(l&&!c||!o||!Zt(n.doc,u,o))return!1;if(c){var d=n.storedMarks||c.marks(),p=o.isInSet(d)?d.find((function(e){return"style"===e.type.name})):null,f={style:null};if(p&&p.attrs.style){var h=Lt(p.attrs.style,i);h.changed&&h.style&&(f.style=h.style)}else i.newValue&&(f.style=[i.style]+": "+i.newValue+";");var m=p?Ft({},p.attrs,f):f;return Object.keys(m).some((function(e){return null!==m[e]}))?r(a.addStoredMark(o.create(m))):r(a.removeStoredMark(o)),!0}return pn(o,i)(n,r,a)}},mn=function(e,t){return function(n,r){var o=n.selection.$cursor;if(o){var i=o.parent,a=o.index(),s=n.schema.marks[e.mark],l=i.child(a).marks.find((function(e){return e.type===s})),c=i.childCount,u=o.pos-o.textOffset,d=i.child(a).nodeSize,p=void 0,f=void 0;for(p=a-1;p>=0&&l.isInSet(i.child(p).marks);)d+=f=i.child(p).nodeSize,u-=f,p-=1;for(p=a+1;p<c&&l.isInSet(i.child(p).marks);)d+=i.child(p).nodeSize,p+=1;r(en(t||n.tr,u,u+d,l))}else fn(e,t)(n,r)}},vn=function(e,t){var n=e.mark,r=e.attrs;return void 0===t&&(t="link"),function(e,o){var i=e.schema.marks,a=e.tr;t&&(a.setMeta("commandName",t),a.setMeta("args",r));var s=!1,l=function(){return s=!0};if(function(e,t){var n=an(e,t);return 1===n.length&&n[0]?n[0]:null}(e,i[n]))!function(e,t){return function(n,r){var o=n.selection,i=o.$cursor,a=o.from,s=o.to,l=n.schema.marks[e.mark];if(i){var c=i.parent,u=i.index(),d=c.child(u).marks.find((function(e){return e.type===l})),p=c.childCount,f=i.pos-i.textOffset,h=c.child(u).nodeSize,m=void 0,v=void 0;for(m=u-1;m>=0&&d.isInSet(c.child(m).marks);)h+=v=c.child(m).nodeSize,f-=v,m-=1;for(m=u+1;m<p&&d.isInSet(c.child(m).marks);)h+=c.child(m).nodeSize,m+=1;t.removeMark(f,f+h,l),t.addMark(f,f+h,l.create(e.attrs)),r(t)}else t.doc.nodesBetween(a,s,(function(n,o){n.isInline&&l.isInSet(n.marks)&&(t.removeMark(o,o+n.nodeSize,l),t.addMark(o,o+n.nodeSize,l.create(e.attrs)),r(t))}))}}({mark:n,attrs:r},a)(e,l);else{var c=e;rn(e,{mark:n})&&(mn({mark:n,attrs:r},a)(e,l),c=gt.create({doc:a.doc,selection:a.selection})),s?Qt(i[n],r,a)(c,l):fn({mark:n},a,r)(c,l)}return s&&o(a),s}},gn=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}},yn=function(e){return function(t,n){var r=t.schema.nodes.image,o=r.createAndFill(e);Kt(o)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}},bn=function(e,t,n,r){if(!n.isTextblock)return!1;e.selection.ranges.forEach((function(o){var a=e.steps.length,s=o.$from.pos,l=o.$to.pos;e.doc.nodesBetween(s,l,(function(o,s){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(n,r)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(a).map(s),n)){e.clearIncompatible(e.mapping.slice(a).map(s,1),n);var l=e.mapping.slice(a),c=l.map(s,1),u=l.map(s+o.nodeSize,1),d=new p(i.from(n.create(r,null,o.marks)),0,0);return e.step(new Ie(c,u,c+1,u-1,d,1,!0)),!1}}))}))},kn=function(e,t){void 0===t&&(t={blocksInSelection:!1});var n=e.doc,r=e.selection,o=r.$from,i=r.ranges,a=t.blocksInSelection,s=[],l=r instanceof at?r.node:void 0;return l?l.isBlock?(s.push(l),l.nodesBetween(0,l.content.size,(function(e){e.isBlock&&s.push(e)}))):!a&&o.parent&&o.parent.isBlock&&s.push(o.parent):i.forEach((function(e){var t=e.$from.pos,r=e.$to.pos;n.nodesBetween(t,r,(function(e,n,o,i){e.isBlock&&(!a||n>=t&&n+e.content.size+2<=r)&&s.push(e)}))})),s},wn=function(e,t){return function(n,r){var o=kn(n),i=n.schema.nodes,a=n.tr;a.setMeta("commandName",t),a.setMeta("args",{value:e}),o.forEach((function(t){if(t.type.isTextblock)if("p"===e){var n=t.attrs,r=n.level,o=zt(n,["level"]);bn(a,t,i.paragraph,o)}else if(/^h[1-6]$/i.test(e)){r=parseInt(e.substr(1),10);bn(a,t,i.heading,Ft({},t.attrs,{level:r}))}else if("blockquote"===e){var s=t.attrs;r=s.level,o=zt(s,["level"]);bn(a,t,i.blockquote,o)}}));var s=a.docChanged;return s&&r(a.scrollIntoView()),s}},Cn=function(e,t){void 0===t&&(t={blocksInSelection:!0});var n=e.doc,r=e.selection,o=t.blocksInSelection,i=t.blockNodeType;kn({doc:n,selection:r},{blocksInSelection:o}).filter((function(e){return e.isTextblock})).forEach((function(t){var n=t.attrs||{},r=n.style,o=void 0===r?"":r,a=n.class,s=void 0===a?"":a,l=zt(n,["style","class"]),c=i||t.type;(o||s||c!==t.type)&&bn(e,t,c,l)}))},On=function(e){var t=kn(e),n=e.schema.nodes,r=[];return t.forEach((function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&n.blockquote.isTextblock&&r.push("blockquote")})),r},xn=function(e,t){var n,r,o=e.attrs.style;o&&t.forEach((function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=Lt(o,r),o=n.changed?n.style:o}));return o=o||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:o||null})},Sn=function(e,t){var n=e.selection,r=n.from,o=n.to,i=!1;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||e.type===t)})),i},En=function(e){var t=On(e);return 1===new Set(t).size?t[0]:null},In=function(e){return{tag:En(e)||""}},Nn=function(e,t){return function(n,r){var o=kn(n),i=n.tr;i.setMeta("commandName",t),o.forEach((function(t){if(t.type.isTextblock){var n={},r=e.find((function(e){return e.node===t.type.name}));r&&(n=xn(t,r.style)),bn(i,t,t.type,n)}}));var a=i.docChanged;return a&&r(i.scrollIntoView()),a}},Tn=function(e,t){var n=kn(e),r=!1;return n.forEach((function(e){if(!r&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));n&&(r=n.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),r},Mn=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,n){var r=t.tr,o=e.blocksInSelection,i=e.blockNodeType,a=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);nn(r,{except:a}),Cn(r,{blocksInSelection:o,blockNodeType:i});var s=r.docChanged;return s&&n&&n(r),s}},Dn=["ol",0],Pn=["ul",0],_n=["li",0],jn={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?Dn:["ol",{start:e.attrs.order},0]}},Rn={parseDOM:[{tag:"ul"}],toDOM:function(){return Pn}},An={parseDOM:[{tag:"li"}],toDOM:function(){return _n},defining:!0};function Fn(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}function zn(e,t,n){return e.append({ordered_list:Fn(jn,{content:"list_item+",group:n}),bullet_list:Fn(Rn,{content:"list_item+",group:n}),list_item:Fn(An,{content:t})})}function Ln(e,t){return function(n,r){var o=n.selection,a=o.$from,s=o.$to,l=a.blockRange(s),c=!1,u=l;if(!l)return!1;if(l.depth>=2&&a.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==a.index(l.depth-1))return!1;var d=n.doc.resolve(l.start-2);u=new E(d,d,l.depth),l.endIndex<l.parent.childCount&&(l=new E(a,n.doc.resolve(s.end(l.depth)),l.depth)),c=!0}var f=De(u,e,t,l);return!!f&&(r&&r(function(e,t,n,r,o){for(var a=i.empty,s=n.length-1;s>=0;s--)a=i.from(n[s].type.create(n[s].attrs,a));e.step(new Ie(t.start-(r?2:0),t.end,t.start,t.end,new p(a,0,0),n.length,!0));for(var l=0,c=0;c<n.length;c++)n[c].type==o&&(l=c+1);for(var u=n.length-l,d=t.start+n.length-(r?2:0),f=t.parent,h=t.startIndex,m=t.endIndex,v=!0;h<m;h++,v=!1)!v&&_e(e.doc,d,u)&&(e.split(d,u),d+=2*u),d+=f.child(h).nodeSize;return e}(n.tr,l,f,c,e).scrollIntoView()),!0)}}function Bn(e){return function(t,n){var r=t.selection,o=r.$from,a=r.$to,s=r.node;if(s&&s.isBlock||o.depth<2||!o.sameParent(a))return!1;var l=o.node(-1);if(l.type!=e)return!1;if(0==o.parent.content.size&&o.node(-1).childCount==o.indexAfter(-1)){if(2==o.depth||o.node(-3).type!=e||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){for(var c=i.empty,u=o.index(-1)?1:o.index(-2)?2:3,d=o.depth-u;d>=o.depth-3;d--)c=i.from(o.node(d).copy(c));var f=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;c=c.append(i.from(e.createAndFill()));var h=o.before(o.depth-(u-1)),m=t.tr.replace(h,o.after(-f),new p(c,4-u,0)),v=-1;m.doc.nodesBetween(h,m.doc.content.size,(function(e,t){if(v>-1)return!1;e.isTextblock&&0==e.content.size&&(v=t+1)})),v>-1&&m.setSelection(t.selection.constructor.near(m.doc.resolve(v))),n(m.scrollIntoView())}return!0}var g=a.pos==o.end()?l.contentMatchAt(0).defaultType:null,y=t.tr.delete(o.pos,a.pos),b=g&&[null,{type:g}];return!!_e(y.doc,o.pos,2,b)&&(n&&n(y.split(o.pos,2,b).scrollIntoView()),!0)}}function Vn(e){return function(t,n){var r=t.selection,o=r.$from,a=r.$to,s=o.blockRange(a,(function(t){return t.childCount&&t.firstChild.type==e}));return!!s&&(!n||(o.node(s.depth-1).type==e?function(e,t,n,r){var o=e.tr,a=r.end,s=r.$to.end(r.depth);a<s&&(o.step(new Ie(a-1,s,a,s,new p(i.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new E(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));return t(o.lift(r,Me(r)).scrollIntoView()),!0}(t,n,e,s):function(e,t,n){for(var r=e.tr,o=n.parent,a=n.end,s=n.endIndex-1,l=n.startIndex;s>l;s--)a-=o.child(s).nodeSize,r.delete(a-1,a+1);var c=r.doc.resolve(n.start),u=c.nodeAfter;if(r.mapping.map(n.end)!=n.start+c.nodeAfter.nodeSize)return!1;var d=0==n.startIndex,f=n.endIndex==o.childCount,h=c.node(-1),m=c.index(-1);if(!h.canReplace(m+(d?0:1),m+1,u.content.append(f?i.empty:i.from(o))))return!1;var v=c.pos,g=v+u.nodeSize;return r.step(new Ie(v-(d?1:0),g+(f?1:0),v+1,g-1,new p((d?i.empty:i.from(o.copy(i.empty))).append(f?i.empty:i.from(o.copy(i.empty))),d?0:1,f?0:1),d?0:1)),t(r.scrollIntoView()),!0}(t,n,s)))}}function Hn(e){return function(t,n){var r=t.selection,o=r.$from,a=r.$to,s=o.blockRange(a,(function(t){return t.childCount&&t.firstChild.type==e}));if(!s)return!1;var l=s.startIndex;if(0==l)return!1;var c=s.parent,u=c.child(l-1);if(u.type!=e)return!1;if(n){var d=u.lastChild&&u.lastChild.type==c.type,f=i.from(d?e.create():null),h=new p(i.from(e.create(null,i.from(c.type.create(null,f)))),d?3:1,0),m=s.start,v=s.end;n(t.tr.step(new Ie(m-(d?3:1),v,m,v,h,1,!0)).scrollIntoView())}return!0}}var Kn={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},Wn={listType:Kn.orderedList,types:Ft({},Kn)},$n={listType:Kn.bulletList,types:Ft({},Kn)},qn={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:Ft({},Kn)},Un={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:Ft({},Kn)};function Gn(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function Xn(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=Zn(r);if(!o){var i=r.blockRange(),a=i&&Me(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&hr(e,o,t))return!0;if(0==r.parent.content.size&&(Jn(s,"end")||at.isSelectable(s))){var l=He(e.doc,r.before(),r.after(),p.empty);if(l.slice.size<l.to-l.from){if(t){var c=e.tr.step(l);c.setSelection(Jn(s,"end")?tt.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):at.create(c.doc,o.pos-s.nodeSize)),t(c.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)}function Jn(e,t,n){for(;e;e="start"==t?e.firstChild:e.lastChild){if(e.isTextblock)return!0;if(n&&1!=e.childCount)return!1}return!1}function Yn(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=Zn(o)}var a=i&&i.nodeBefore;return!(!a||!at.isSelectable(a))&&(t&&t(e.tr.setSelection(at.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)}function Zn(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Qn(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=tr(r);if(!o)return!1;var i=o.nodeAfter;if(hr(e,o,t))return!0;if(0==r.parent.content.size&&(Jn(i,"start")||at.isSelectable(i))){var a=He(e.doc,r.before(),r.after(),p.empty);if(a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection(Jn(i,"start")?tt.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):at.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)}function er(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=tr(o)}var a=i&&i.nodeAfter;return!(!a||!at.isSelectable(a))&&(t&&t(e.tr.setSelection(at.create(e.doc,i.pos)).scrollIntoView()),!0)}function tr(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function nr(e,t){var n,r=e.selection,o=r instanceof at;if(o){if(r.node.isTextblock||!je(e.doc,r.from))return!1;n=r.from}else if(null==(n=Ae(e.doc,r.from,-1)))return!1;if(t){var i=e.tr.join(n);o&&i.setSelection(at.create(i.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0}function rr(e,t){var n,r=e.selection;if(r instanceof at){if(r.node.isTextblock||!je(e.doc,r.to))return!1;n=r.to}else if(null==(n=Ae(e.doc,r.to,1)))return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0}function or(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Me(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function ir(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}function ar(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function sr(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=ar(i.contentMatchAt(a));if(!i.canReplaceWith(a,a,s))return!1;if(t){var l=r.after(),c=e.tr.replaceWith(l,l,s.createAndFill());c.setSelection(tt.near(c.doc.resolve(l),1)),t(c.scrollIntoView())}return!0}function lr(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof lt||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=ar(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(ot.create(s.doc,a+1)),t(s.scrollIntoView())}return!0}function cr(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(_e(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Me(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)}function ur(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof at&&e.selection.node.isBlock)return!(!r.parentOffset||!_e(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof ot||e.selection instanceof lt)&&a.deleteSelection();var s=0==r.depth?null:ar(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=i&&s?[{type:s}]:null,c=_e(a.doc,a.mapping.map(r.pos),1,l);if(l||c||!_e(a.doc,a.mapping.map(r.pos),1,s&&[{type:s}])||(l=[{type:s}],c=!0),c&&(a.split(a.mapping.map(r.pos),1,l),!i&&!r.parentOffset&&r.parent.type!=s)){var u=a.mapping.map(r.before()),d=a.doc.resolve(u);r.node(-1).canReplaceWith(d.index(),d.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0}function dr(e,t){return ur(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})}function pr(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(at.create(e.doc,n))),!0)}function fr(e,t){return t&&t(e.tr.setSelection(new lt(e.doc))),!0}function hr(e,t,n){var r,o,a=t.nodeBefore,s=t.nodeAfter;if(a.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!je(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(r=(o=a.contentMatchAt(a.childCount)).findWrapping(s.type))&&o.matchType(r[0]||s.type).validEnd){if(n){for(var c=t.pos+s.nodeSize,u=i.empty,d=r.length-1;d>=0;d--)u=i.from(r[d].create(null,u));u=i.from(a.copy(u));var f=e.tr.step(new Ie(t.pos-1,c,t.pos,c,new p(u,1,0),r.length,!0)),h=c+2*r.length;je(f.doc,h)&&f.join(h),n(f.scrollIntoView())}return!0}var m=tt.findFrom(t,1),v=m&&m.$from.blockRange(m.$to),g=v&&Me(v);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(v,g).scrollIntoView()),!0;if(l&&Jn(s,"start",!0)&&Jn(a,"end")){for(var y=a,b=[];b.push(y),!y.isTextblock;)y=y.lastChild;for(var k=s,w=1;!k.isTextblock;k=k.firstChild)w++;if(y.canReplace(y.childCount,y.childCount,k.content)){if(n){for(var C=i.empty,O=b.length-1;O>=0;O--)C=i.from(b[O].copy(C));n(e.tr.step(new Ie(t.pos-b.length,t.pos+s.nodeSize,t.pos+w,t.pos+s.nodeSize-w,new p(C,b.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function mr(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(ot.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var vr=mr(-1),gr=mr(1);function yr(e,t){return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=s&&De(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}function br(e,t){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function kr(e,t){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1}(n.doc,s,e))return!1;if(r)if(a)e.isInSet(n.storedMarks||a.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{for(var l=!1,c=n.tr,u=0;!l&&u<s.length;u++){var d=s[u],p=d.$from,f=d.$to;l=n.doc.rangeHasMark(p.pos,f.pos,e)}for(var h=0;h<s.length;h++){var m=s[h],v=m.$from,g=m.$to;if(l)c.removeMark(v.pos,g.pos,e);else{var y=v.pos,b=g.pos,k=v.nodeAfter,w=g.nodeBefore,C=k&&k.isText?/^\s*/.exec(k.text)[0].length:0,O=w&&w.isText?/\s*$/.exec(w.text)[0].length:0;y+C<b&&(y+=C,b-=O),c.addMark(y,b,e.create(t))}}r(c.scrollIntoView())}return!0}}function wr(e,t){if(Array.isArray(t)){var n=t;t=function(e){return n.indexOf(e.type.name)>-1}}return function(n,r,o){return e(n,r&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var r=[],o=0;o<n.mapping.maps.length;o++){for(var i=n.mapping.maps[o],a=0;a<r.length;a++)r[a]=i.map(r[a]);i.forEach((function(e,t,n,o){return r.push(n,o)}))}for(var s=[],l=0;l<r.length;l+=2)for(var c=r[l],u=r[l+1],d=n.doc.resolve(c),p=d.sharedDepth(u),f=d.node(p),h=d.indexAfter(p),m=d.after(p+1);m<=u;++h){var v=f.maybeChild(h);if(!v)break;if(h&&-1==s.indexOf(m)){var g=f.child(h-1);g.type==v.type&&t(g,v)&&s.push(m)}m+=v.nodeSize}s.sort((function(e,t){return e-t}));for(var y=s.length-1;y>=0;y--)je(n.doc,s[y])&&n.join(s[y]);e(n)}}(r,t),o)}}function Cr(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}var Or=Cr(Gn,Xn,Yn),xr=Cr(Gn,Qn,er),Sr={Enter:Cr(ir,lr,cr,ur),"Mod-Enter":sr,Backspace:Or,"Mod-Backspace":Or,"Shift-Backspace":Or,Delete:xr,"Mod-Delete":xr,"Mod-a":fr},Er={"Ctrl-h":Sr.Backspace,"Alt-Backspace":Sr["Mod-Backspace"],"Ctrl-d":Sr.Delete,"Ctrl-Alt-Backspace":Sr["Mod-Delete"],"Alt-Delete":Sr["Mod-Delete"],"Alt-d":Sr["Mod-Delete"],"Ctrl-a":vr,"Ctrl-e":gr};for(var Ir in Sr)Er[Ir]=Sr[Ir];var Nr=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?Er:Sr,Tr=function(e,t){return yr(e.schema.nodes.blockquote)(e,t)},Mr=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=e.schema.nodes.blockquote,a=e.doc,s=-1,l=r.blockRange(o);l&&a.nodesBetween(l.start,l.end,(function(e,t,n,r){e.type===i&&(s=t)}));var c=-1!==s;return t&&c&&t(e.tr.lift(l,a.resolve(s).depth)),c},Dr=function(e,t,n){return function(r,o){var i=kn(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var i="rtl"===n?o.rtlStyle:o.style,s={name:i,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var l=new RegExp(i+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(l);if(c){var u=parseFloat(c[1])+o.step;u=u<=0?"":u,s.value=""+u+(u?o.unit:"")}}r=xn(t,[s])}r&&bn(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},Pr=function(e,t,n){var r=kn(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));if(r){var i="rtl"===n?r.rtlStyle:r.style,a=new RegExp(i+":\\s?\\d+"+r.unit,"i");o=a.test(e.attrs.style)}}})),o},_r=function(e,t){return Hn(t)(e)},jr=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],o=e.schema.nodes[t.listsTypes.bulletList],i=!!Ht(r,2)(e.selection),a=!!Ht(o,2)(e.selection);return(i||a)&&Vn(n)(e)},Rr=function(e,t){var n=e.schema.nodes,r=n[qn.listsTypes.listItem];return(Pr(e,t.nodes)||qn.nodes.some((function(t){return n[t.node]&&Sn(e,n[t.node])})))&&!Sn(e,r)},Ar=function(e,t){var n=e.schema.nodes[qn.listsTypes.listItem],r=Rr(e,qn);_r(e,n)?Hn(n)(e,t):r&&Dr(qn.nodes)(e,t)},Fr=function(e,t){var n=e.schema.nodes,r=n[Un.listsTypes.listItem],o=Rr(e,Un);Sn(e,n.blockquote)?Mr(e,t):jr(e,Un)?Vn(r)(e,t):o&&Dr(Un.nodes)(e,t)},zr=function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],a=e.nodes[n.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(r=s),l.type!==o&&l.type!==i&&l.type!==a)break}return r-1};function Lr(e){return function(t,n,r){if(!r)return!1;var o=(t=r.state).schema.nodes[e.listType],i=t.selection,a=i.$from,s=i.$to,l=a.node(-2),c=a.node(-3),u=function(e,t,n,r){return 0===function(e,t,n){var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;var r=t.node(t.depth),o=t;for(;t.depth>=1;)t=e.resolve(t.before(t.depth)),(r=t.node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));for(;i.pos<=n.start(n.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&r.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}(e,t,n).filter((function(e){return e.type!==r})).length}(t.doc,a,s,o);return(l&&l.type===o||c&&c.type===o)&&u?Vr(e)(t,n):(u||(Vr(e)(t,n),t=r.state),function(e,t){void 0===t&&(t={});return wr(Ln(e,t),(function(t,n){return t.type===n.type&&t.type===e}))}(o,e.listAttrs)(t,n))}}function Br(e,t,n,r){var o=r||e.schema.nodes.listItem,a=t.$from,s=t.$to,l=a.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===o}));if(!l||l.depth<2||a.node(l.depth-1).type!==o)return n;var c=l.end,u=s.end(l.depth);return c<u&&(n.step(new Ie(c-1,u,c,u,new p(i.from(o.create(void 0,l.parent.copy())),1,0),1,!0)),l=new E(n.doc.resolve(a.pos),n.doc.resolve(u),l.depth)),n.lift(l,Me(l)).scrollIntoView()}function Vr(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,a=o.$to;return r.doc.nodesBetween(i.pos,a.pos,(function(n,o){if(n.isTextblock||"blockquote"===n.type.name||"div"===n.type.name){var i=new at(r.doc.resolve(r.mapping.map(o))),a=i.$from.blockRange(i.$to);if(!a||i.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var s=a&&Me(a);if(null==s)return!1;r.lift(a,s)}})),n&&n(r),!0}}var Hr=/list\-style\-type:\s?([\w-]+)/,Kr=function(e){var t=e.style||"",n=Hr.exec(t);return n&&n[1]||""},Wr=function(e,t,n,r,o){var i=r.listType,a=r.listAttrs,s=void 0===a?{style:null}:a,l=e.selection,c=l.$from.node(l.$from.depth-2),u=l.$to.node(l.$to.depth-2);if(c&&c.type.name===i&&Kr(c.attrs)===Kr(s)&&u&&u.type.name===i&&Kr(u.attrs)===Kr(s)){var d=n.state.schema.nodes,p={bulletList:d[r.bulletList],orderedList:d[r.orderedList],listItem:d[r.listItem]},f=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==r&&s.type!==o||(n=a),s.type!==r&&s.type!==o&&s.type!==i)break}return n}(l.$to,p),h=function(e,t,n,r,o,i){i||(i=e.schema.nodes.listItem);var a=!1;return o.doc.nodesBetween(t,n,(function(n,s){if(!a&&n.type===i&&s>t){a=!0;for(var l=r+3;l>r+2;){var c=o.doc.resolve(o.mapping.map(s));l=c.depth;var u=o.doc.resolve(o.mapping.map(s+n.textContent.length)),d=new ot(c,u);o=Br(e,d,o,i)}}})),o}(e,l.$to.pos,l.$to.end(f),f,n.state.tr,p.listItem);return(h=function(e,t,n){var r=e.selection,o=r.from,i=r.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,c=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||c.push({node:e,pos:t})}));for(var u=c.length-1;u>=0;u--){var d=c[u],p=t.doc.resolve(t.mapping.map(d.pos));if(p.depth>0){var f=void 0;f=d.node.textContent&&d.node.textContent.length>0?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1));var h=p.blockRange(f);h&&t.lift(h,zr(e.schema,p,n))}}return t}(e,h,r)).setMeta("commandName",o),t(h),!0}return Lr(r)(e,t,n)};function $r(e,t,n){return Wr(e,t,n,Ft({listType:$n.listType},$n.types))}function qr(e,t,n){return Wr(e,t,n,Ft({listType:Wn.listType},Wn.types))}for(var Ur=function(e,t){return{name:e,value:t}},Gr=[{node:"paragraph",style:[Ur("text-align","left")]},{node:"heading",style:[Ur("text-align","left")]}],Xr=[{node:"paragraph",style:[Ur("text-align","right")]},{node:"heading",style:[Ur("text-align","right")]}],Jr=[{node:"paragraph",style:[Ur("text-align","center")]},{node:"heading",style:[Ur("text-align","center")]}],Yr=[{node:"paragraph",style:[Ur("text-align","justify")]},{node:"heading",style:[Ur("text-align","justify")]}],Zr=[{node:"paragraph",style:[Ur("text-align","")]},{node:"heading",style:[Ur("text-align","")]}],Qr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},eo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},to="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),no="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),ro="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),oo="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),io="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ao=to&&(oo||+to[1]<57)||ro&&oo,so=0;so<10;so++)Qr[48+so]=Qr[96+so]=String(so);for(so=1;so<=24;so++)Qr[so+111]="F"+so;for(so=65;so<=90;so++)Qr[so]=String.fromCharCode(so+32),eo[so]=String.fromCharCode(so);for(var lo in Qr)eo.hasOwnProperty(lo)||(eo[lo]=Qr[lo]);var co="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function uo(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var l=i[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);co?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function po(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function fo(e){return new kt({props:{handleKeyDown:ho(e)}})}function ho(e){var t=function(e){var t=Object.create(null);for(var n in e)t[uo(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(ao&&(e.ctrlKey||e.altKey||e.metaKey)||(no||io)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?eo:Qr)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[po(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Qr[n.keyCode])&&r!=o){var s=t[po(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var l=t[po(o,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}return!1}}var mo={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var vo=/Edge\/(\d+)/.exec(navigator.userAgent),go=/MSIE \d/.test(navigator.userAgent),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),bo=mo.ie=!!(go||yo||vo);mo.ie_version=go?document.documentMode||6:yo?+yo[1]:vo?+vo[1]:null,mo.gecko=!bo&&/gecko\/(\d+)/i.test(navigator.userAgent),mo.gecko_version=mo.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var ko=!bo&&/Chrome\/(\d+)/.exec(navigator.userAgent);mo.chrome=!!ko,mo.chrome_version=ko&&+ko[1],mo.safari=!bo&&/Apple Computer/.test(navigator.vendor),mo.ios=mo.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),mo.mac=mo.ios||/Mac/.test(navigator.platform),mo.android=/Android \d/.test(navigator.userAgent),mo.webkit="webkitFontSmoothing"in document.documentElement.style,mo.webkit_version=mo.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var wo=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Co=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},Oo=null,xo=function(e,t,n){var r=Oo||(Oo=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},So=function(e,t,n,r){return n&&(Io(e,t,n,r,-1)||Io(e,t,n,r,1))},Eo=/^(img|br|input|textarea|hr)$/i;function Io(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:No(e))){var i=e.parentNode;if(!i||1!=i.nodeType||To(e)||Eo.test(e.nodeName)||"false"==e.contentEditable)return!1;t=wo(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?No(e):0}}}function No(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function To(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Mo=function(e){var t=e.isCollapsed;return t&&mo.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function Do(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Po(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function _o(e,t){return"number"==typeof e?e:e[t]}function jo(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Ro(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=Co(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,l=s?Po(i):jo(a),c=0,u=0;if(t.top<l.top+_o(r,"top")?u=-(l.top-t.top+_o(o,"top")):t.bottom>l.bottom-_o(r,"bottom")&&(u=t.bottom-l.bottom+_o(o,"bottom")),t.left<l.left+_o(r,"left")?c=-(l.left-t.left+_o(o,"left")):t.right>l.right-_o(r,"right")&&(c=t.right-l.right+_o(o,"right")),c||u)if(s)i.defaultView.scrollBy(c,u);else{var d=a.scrollLeft,p=a.scrollTop;u&&(a.scrollTop+=u),c&&(a.scrollLeft+=c);var f=a.scrollLeft-d,h=a.scrollTop-p;t={left:t.left-f,top:t.top-h,right:t.right-f,bottom:t.bottom-h}}if(s)break}}function Ao(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=Co(e));return t}function Fo(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var zo=null;function Lo(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,l=e.firstChild,c=0;l;l=l.nextSibling,c++){var u=void 0;if(1==l.nodeType)u=l.getClientRects();else{if(3!=l.nodeType)continue;u=xo(l).getClientRects()}for(var d=0;d<u.length;d++){var p=u[d];if(p.top<=a&&p.bottom>=s){a=Math.max(p.bottom,a),s=Math.min(p.top,s);var f=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(f<o){n=l,o=f,r=f&&3==n.nodeType?{left:p.right<t.left?p.right:p.left,top:t.top}:t,1==l.nodeType&&f&&(i=c+(t.left>=(p.left+p.right)/2?1:0));continue}}!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=Ho(r,1);if(i.top!=i.bottom&&Bo(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:Lo(n,r)}function Bo(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Vo(e,t){var n,r,o,i,a=e.dom.ownerDocument;if(a.caretPositionFromPoint)try{var s=a.caretPositionFromPoint(t.left,t.top);s&&(o=(n=s).offsetNode,i=n.offset)}catch(e){}if(!o&&a.caretRangeFromPoint){var l=a.caretRangeFromPoint(t.left,t.top);l&&(o=(r=l).startContainer,i=r.startOffset)}var c,u=(e.root.elementFromPoint?e.root:a).elementFromPoint(t.left,t.top+1);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){var d=e.dom.getBoundingClientRect();if(!Bo(t,d))return null;if(!(u=function e(t,n,r){var o=t.childNodes.length;if(o&&r.top<r.bottom)for(var i=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),a=i;;){var s=t.childNodes[a];if(1==s.nodeType)for(var l=s.getClientRects(),c=0;c<l.length;c++){var u=l[c];if(Bo(n,u))return e(s,n,u)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,d)))return null}if(mo.safari)for(var p=u;o&&p;p=Co(p))p.draggable&&(o=i=null);if(u=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(u,t),o){if(mo.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var f,h=o.childNodes[i];"IMG"==h.nodeName&&(f=h.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?c=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(c=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==c&&(c=function(e,t,n){var r=Lo(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,u,t));var m=e.docView.nearestDesc(u,!0);return{pos:c,inside:m?m.posAtStart-m.border:-1}}function Ho(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var Ko=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Wo(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=mo.webkit||mo.gecko;if(3==o.nodeType){if(!a||!Ko.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==o.nodeValue.length?(s--,c=1):n<0?s--:l++,$o(Ho(xo(o,s,l),c),c<0)}var u=Ho(xo(o,i,i),n);if(mo.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var d=Ho(xo(o,i-1,i-1),-1);if(d.top==u.top){var p=Ho(xo(o,i,i+1),-1);if(p.top!=u.top)return $o(p,p.left<d.left)}}return u}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==No(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return qo(f.getBoundingClientRect(),!1)}if(i<No(o)){var h=o.childNodes[i];if(1==h.nodeType)return qo(h.getBoundingClientRect(),!0)}return qo(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==No(o))){var m=o.childNodes[i-1],v=3==m.nodeType?xo(m,No(m)-(a?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return $o(Ho(v,1),!1)}if(i<No(o)){for(var g=o.childNodes[i];g.pmViewDesc&&g.pmViewDesc.ignoreForCoords;)g=g.nextSibling;var y=g?3==g.nodeType?xo(g,0,a?0:1):1==g.nodeType?g:null:null;if(y)return $o(Ho(y,-1),!0)}return $o(Ho(3==o.nodeType?xo(o):o,-n),n>=0)}function $o(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function qo(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Uo(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var Go=/[\u0590-\u08ac]/;var Xo=null,Jo=null,Yo=!1;function Zo(e,t,n){return Xo==t&&Jo==n?Yo:(Xo=t,Jo=n,Yo="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Uo(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=Wo(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=xo(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<s.length;l++){var c=s[l];if(c.bottom>c.top+1&&("up"==n?i.top-c.top>2*(c.bottom-i.top):c.bottom-i.bottom>2*(i.bottom-c.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.root.getSelection();return Go.test(r.parent.textContent)&&s.modify?Uo(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}var Qo=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},ei={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Qo.prototype.matchesWidget=function(){return!1},Qo.prototype.matchesMark=function(){return!1},Qo.prototype.matchesNode=function(){return!1},Qo.prototype.matchesHack=function(e){return!1},Qo.prototype.parseRule=function(){return null},Qo.prototype.stopEvent=function(){return!1},ei.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},ei.border.get=function(){return 0},Qo.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var e=0;e<this.children.length;e++)this.children[e].destroy()},Qo.prototype.posBeforeChild=function(e){for(var t=0,n=this.posAtStart;t<this.children.length;t++){var r=this.children[t];if(r==e)return n;n+=r.size}},ei.posBefore.get=function(){return this.parent.posBeforeChild(this)},ei.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},ei.posAfter.get=function(){return this.posBefore+this.size},ei.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},Qo.prototype.localPosFromDOM=function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>wo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.parentNode.firstChild!=l)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.parentNode.lastChild!=c)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},Qo.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},Qo.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},Qo.prototype.posFromDOM=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1},Qo.prototype.descAt=function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}},Qo.prototype.domFromPos=function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n=0,r=0,o=0;n<this.children.length;n++){var i=this.children[n],a=o+i.size;if(a>e||i instanceof li){r=e-o;break}o=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(var s=void 0;n&&!(s=this.children[n-1]).size&&s instanceof ni&&s.widget.type.side>=0;n--);if(t<=0){for(var l,c=!0;(l=n?this.children[n-1]:null)&&l.dom.parentNode!=this.contentDOM;n--,c=!1);return l&&t&&c&&!l.border&&!l.domAtom?l.domFromPos(l.size,t):{node:this.contentDOM,offset:l?wo(l.dom)+1:0}}for(var u,d=!0;(u=n<this.children.length?this.children[n]:null)&&u.dom.parentNode!=this.contentDOM;n++,d=!1);return u&&d&&!u.border&&!u.domAtom?u.domFromPos(0,t):{node:this.contentDOM,offset:u?wo(u.dom):this.contentDOM.childNodes.length}},Qo.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],l=i+s.size;if(-1==r&&e<=l){var c=i+s.border;if(e>=c&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var u=a;u>0;u--){var d=this.children[u-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=wo(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var p=a+1;p<this.children.length;p++){var f=this.children[p];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=wo(f.dom);break}t+=f.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}},Qo.prototype.emptyChildAt=function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)},Qo.prototype.domAfterPos=function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]},Qo.prototype.setSelection=function(e,t,n,r){for(var o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var l=this.children[a],c=s+l.size;if(o>s&&i<c)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=c}var u=this.domFromPos(e,e?-1:1),d=t==e?u:this.domFromPos(t,t?-1:1),p=n.getSelection(),f=!1;if((mo.gecko||mo.safari)&&e==t){var h=u.node,m=u.offset;if(3==h.nodeType){if((f=m&&"\n"==h.nodeValue[m-1])&&m==h.nodeValue.length)for(var v=h,g=void 0;v;v=v.parentNode){if(g=v.nextSibling){"BR"==g.nodeName&&(u=d={node:g.parentNode,offset:wo(g)+1});break}var y=v.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{var b=h.childNodes[m-1];f=b&&("BR"==b.nodeName||"false"==b.contentEditable)}}if(mo.gecko&&p.focusNode&&p.focusNode!=d.node&&1==p.focusNode.nodeType){var k=p.focusNode.childNodes[p.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||f&&mo.safari||!So(u.node,u.offset,p.anchorNode,p.anchorOffset)||!So(d.node,d.offset,p.focusNode,p.focusOffset)){var w=!1;if((p.extend||e==t)&&!f){p.collapse(u.node,u.offset);try{e!=t&&p.extend(d.node,d.offset),w=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!w){if(e>t){var C=u;u=d,d=C}var O=document.createRange();O.setEnd(d.node,d.offset),O.setStart(u.node,u.offset),p.removeAllRanges(),p.addRange(O)}}},Qo.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},ei.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Qo.prototype.markDirty=function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2},Qo.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}},ei.domAtom.get=function(){return!1},ei.ignoreForCoords.get=function(){return!1},Object.defineProperties(Qo.prototype,ei);var ti=[],ni=function(e){function t(t,n,r,o){var i,a=n.type.toDOM;if("function"==typeof a&&(a=a(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=a.nodeType){var s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable=!1,a.classList.add("ProseMirror-widget")}e.call(this,t,ti,a,null),this.widget=n,i=this}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.matchesWidget=function(e){return 0==this.dirty&&e.type.eq(this.widget.type)},t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.stopEvent=function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)},t.prototype.ignoreMutation=function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection},t.prototype.destroy=function(){this.widget.type.destroy(this.dom),e.prototype.destroy.call(this)},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(Qo),ri=function(e){function t(t,n,r,o){e.call(this,t,ti,n,null),this.textDOM=r,this.text=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},t.prototype.localPosFromDOM=function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t},t.prototype.domFromPos=function(e){return{node:this.textDOM,offset:e}},t.prototype.ignoreMutation=function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue},Object.defineProperties(t.prototype,n),t}(Qo),oi=function(e){function t(t,n,r,o){e.call(this,t,[],r,o),this.mark=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.create=function(e,n,r,o){var i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return a&&a.dom||(a=de.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,a.dom,a.contentDOM||a.dom)},t.prototype.parseRule=function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},t.prototype.matchesMark=function(e){return 3!=this.dirty&&this.mark.eq(e)},t.prototype.markDirty=function(t,n){if(e.prototype.markDirty.call(this,t,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},t.prototype.slice=function(e,n,r){var o=t.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=ki(i,n,a,r)),e>0&&(i=ki(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},t}(Qo),ii=function(e){function t(t,n,r,o,i,a,s,l,c){e.call(this,t,n.isLeaf?ti:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(l,c)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return t.create=function(e,n,r,o,i,a){var s,l,c=i.nodeViews[n.type.name],u=c&&c(n,i,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:a}),r,o),d=u&&u.dom,p=u&&u.contentDOM;if(n.isText)if(d){if(3!=d.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(n.text);else d||(d=(s=de.renderSpec(document,n.type.spec.toDOM(n))).dom,p=s.contentDOM);p||n.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable=!1),n.type.spec.draggable&&(d.draggable=!0));var f=d;return d=mi(d,r,n),u?l=new ci(e,n,r,o,d,p,f,u,i,a+1):n.isText?new si(e,n,r,o,d,f,i):new t(e,n,r,o,d,p,f,i,a+1)},t.prototype.parseRule=function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return i.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&vi(t,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},t.prototype.updateChildren=function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing&&this.localCompositionInfo(e,t),a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new yi(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var l=0,c=[],u=null,d=0;;){if(l<o.length&&o[l].to==i){for(var p=o[l++],f=void 0;l<o.length&&o[l].to==i;)(f||(f=[p])).push(o[l++]);if(f){f.sort(bi);for(var h=0;h<f.length;h++)n(f[h],d,!!u)}else n(p,d,!!u)}var m=void 0,v=void 0;if(u)v=-1,m=u,u=null;else{if(!(d<e.childCount))break;v=d,m=e.child(d++)}for(var g=0;g<c.length;g++)c[g].to<=i&&c.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)c.push(o[l++]);var y=i+m.nodeSize;if(m.isText){var b=y;l<o.length&&o[l].from<b&&(b=o[l].from);for(var k=0;k<c.length;k++)c[k].to<b&&(b=c[k].to);b<y&&(u=m.cut(b-i),m=m.cut(0,b-i),y=b,v=-1)}var w=c.length?m.isInline&&!m.isLeaf?c.filter((function(e){return!e.inline})):c.slice():ti;r(m,w,t.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&l.syncToMarks(i==n.node.childCount?u.none:n.node.child(i).marks,r,e),l.placeWidget(t,e,o)}),(function(t,n,a,c){var u;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,a,c)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(u=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,n,a,u,e)||l.updateNextNode(t,n,a,e,c)||l.addNode(t,n,a,e,o),o+=t.nodeSize})),l.syncToMarks(ti,r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),function e(t,n,r){for(var o=t.firstChild,i=!1,a=0;a<n.length;a++){var s=n[a],l=s.dom;if(l.parentNode==t){for(;l!=o;)o=gi(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(s instanceof oi){var c=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=c?c.nextSibling:t.firstChild}}for(;o;)o=gi(o),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),mo.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))},t.prototype.localCompositionInfo=function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(!(e.state.selection instanceof ot)||r<t||o>t+this.node.content.size)){var i=e.root.getSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=No(e)}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(a&&this.dom.contains(a.parentNode)){if(this.node.inlineContent){var s=a.nodeValue,l=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var l=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){var u=s<r?l.lastIndexOf(t,r-s-1):-1;if(u>=0&&u+t.length+s>=n)return s+u;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return l<0?null:{node:a,pos:l,text:s}}return{node:a,pos:-1}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new ri(this,i,n,o);e.compositionNodes.push(a),this.children=ki(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!vi(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=fi(this.dom,this.nodeDOM,pi(this.outerDeco,this.node,t),pi(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(t.prototype,n),t}(Qo);function ai(e,t,n,r,o){return mi(r,t,e),new ii(null,e,t,n,r,r,r,o,0)}var si=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t.prototype.markDirty=function(t,n){e.prototype.markDirty.call(this,t,n),this.dom==this.nodeDOM||0!=t&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(t.prototype,n),t}(ii),li=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(e){return 0==this.dirty&&this.dom.nodeName==e},n.domAtom.get=function(){return!0},n.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(t.prototype,n),t}(Qo),ci=function(e){function t(t,n,r,o,i,a,s,l,c,u){e.call(this,t,n,r,o,i,a,s,c,u),this.spec=l}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(ii);function ui(e){e&&(this.nodeName=e)}ui.prototype=Object.create(null);var di=[new ui];function pi(e,t,n){if(0==e.length)return di;for(var r=n?di[0]:new ui,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new ui(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new ui(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}return o}function fi(e,t,n,r){if(n==di&&r==di)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.tagName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=di[0]),o=l}hi(o,s||di[0],a)}return o}function hi(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):ti,a=n.class?n.class.split(" ").filter(Boolean):ti,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var c,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=u.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function mi(e,t,n){return fi(e,e,di,pi(t,n,1!=e.nodeType))}function vi(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function gi(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var yi=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var l=n.children[r-1];if(!(l instanceof oi)){s=l,r--;break}n=l,r=l.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(e.node.content,e)};function bi(e,t){return e.type.side-t.type.side}function ki(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var l=e[a],c=s,u=s+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=null),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function wi(e,t){var n=e.root.getSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var s,l,c=r.resolve(a);if(Mo(n)){for(s=c;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&at.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(e,t,n){for(var r=0==t,o=t==No(e);r||o;){if(e==n)return!0;var i=wo(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==No(e)}}(n.focusNode,n.focusOffset,o.dom))){var u=o.posBefore;l=new at(a==u?c:r.resolve(u))}}else{var d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(d<0)return null;s=r.resolve(d)}l||(l=Mi(e,s,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1));return l}function Ci(e){return e.editable?e.hasFocus():Di(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Oi(e,t){var n=e.state.selection;if(Ni(e,n),Ci(e)){if(!t&&e.mouseDown&&e.mouseDown.allowDefault&&mo.chrome){var r=e.root.getSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&So(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){var t=e.root.getSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,wo(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&mo.ie&&mo.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var i,a,s=n.anchor,l=n.head;!xi||n instanceof ot||(n.$from.parent.inlineContent||(i=Si(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=Si(e,n.to))),e.docView.setSelection(s,l,e.root,t),xi&&(i&&Ii(i),a&&Ii(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.hideSelectionGuard);var n=e.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.hideSelectionGuard),setTimeout((function(){Ci(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}yi.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}},yi.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},yi.prototype.syncToMarks=function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=oi.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}},yi.prototype.findNodeMatch=function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var l=this.top.children[a];if(l.matchesNode(e,t,n)&&!this.preMatch.matched.has(l)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},yi.prototype.updateNodeAt=function(e,t,n,r,o){return!!this.top.children[r].update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)},yi.prototype.findIndexWithChild=function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}},yi.prototype.updateNextNode=function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof ii){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&vi(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1},yi.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,ii.create(this.top,e,t,n,r,o)),this.changed=!0},yi.prototype.placeWidget=function(e,t,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){var o=new ni(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},yi.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof oi;)e=e.children[e.children.length-1];e&&e instanceof si&&!/\n$/.test(e.node.text)||((mo.safari||mo.chrome)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},yi.prototype.addHackNode=function(e){if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack(e))this.index++;else{var t=document.createElement(e);"IMG"==e&&(t.className="ProseMirror-separator",t.alt=""),"BR"==e&&(t.className="ProseMirror-trailingBreak"),this.top.children.splice(this.index++,0,new li(this.top,ti,t,null)),this.changed=!0}};var xi=mo.safari||mo.chrome&&mo.chrome_version<63;function Si(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(mo.safari&&i&&"false"==i.contentEditable)return Ei(i);if(!(i&&"false"!=i.contentEditable||a&&"false"!=a.contentEditable)){if(i)return Ei(i);if(a)return Ei(a)}}function Ei(e){return e.contentEditable="true",mo.safari&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ii(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Ni(e,t){if(t instanceof at){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ti(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ti(e)}function Ti(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function Mi(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||ot.between(t,n,r)}function Di(e){var t=e.root.getSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Pi(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&tt.findFrom(a,t)}function _i(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ji(e,t,n){var r=e.state.selection;if(!(r instanceof ot)){if(r instanceof at&&r.node.isInline)return _i(e,new ot(t>0?r.$to:r.$from));var o=Pi(e.state,t);return!!o&&_i(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Pi(e.state,t);return!!(i&&i instanceof at)&&_i(e,i)}if(!(mo.mac&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var c=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(c))&&!a.contentDOM)&&(at.isSelectable(l)?_i(e,new at(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!mo.webkit&&_i(e,new ot(e.state.doc.resolve(t<0?c:c+l.nodeSize))))}}function Ri(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ai(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Fi(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(mo.gecko&&1==n.nodeType&&r<Ri(n)&&Ai(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Ai(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Li(n))break;for(var l=n.previousSibling;l&&Ai(l);)o=n.parentNode,i=wo(l),l=l.previousSibling;if(l)r=Ri(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Bi(e,t,n,r):o&&Bi(e,t,o,i)}}function zi(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=Ri(n);;)if(r<a){if(1!=n.nodeType)break;if(!Ai(n.childNodes[r]))break;o=n,i=++r}else{if(Li(n))break;for(var s=n.nextSibling;s&&Ai(s);)o=s.parentNode,i=wo(s)+1,s=s.nextSibling;if(s)r=0,a=Ri(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Bi(e,t,o,i)}}function Li(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Bi(e,t,n,r){if(Mo(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&Oi(e)}),50)}function Vi(e,t,n){var r=e.state.selection;if(r instanceof ot&&!r.empty||n.indexOf("s")>-1)return!1;if(mo.mac&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Pi(e.state,t);if(a&&a instanceof at)return _i(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof lt?tt.near(s,t):tt.findFrom(s,t);return!!l&&_i(e,l)}return!1}function Hi(e,t){if(!(e.state.selection instanceof ot))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function Ki(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Wi(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||mo.mac&&72==n&&"c"==r?Hi(e,-1)||Fi(e):46==n||mo.mac&&68==n&&"c"==r?Hi(e,1)||zi(e):13==n||27==n||(37==n?ji(e,-1,r)||Fi(e):39==n?ji(e,1,r)||zi(e):38==n?Vi(e,-1,r)||Fi(e):40==n?function(e){if(mo.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Ki(e,o,!0),setTimeout((function(){return Ki(e,o,!1)}),20)}}}(e)||Vi(e,1,r)||zi(e):r==(mo.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function $i(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(mo.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||mo.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function qi(e,t,n,r,o){if(t<0){var a=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,s=wi(e,a);if(s&&!e.state.selection.eq(s)){var l=e.state.tr.setSelection(s);"pointer"==a?l.setMeta("pointer",!0):"key"==a&&l.scrollIntoView(),e.dispatch(l)}}else{var c=e.state.doc.resolve(t),u=c.sharedDepth(n);t=c.before(u+1),n=e.state.doc.resolve(n).after(u+1);var d=e.state.selection,p=function(e,t,n){var r=e.docView.parseRange(t,n),o=r.node,i=r.fromOffset,a=r.toOffset,s=r.from,l=r.to,c=e.root.getSelection(),u=null,d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],Mo(c)||u.push({node:c.focusNode,offset:c.focusOffset})),mo.chrome&&8===e.lastKeyCode)for(var p=a;p>i;p--){var f=o.childNodes[p-1],h=f.pmViewDesc;if("BR"==f.nodeName&&!h){a=p;break}if(!h||h.size)break}var m=e.state.doc,v=e.someProp("domParser")||ee.fromSchema(e.state.schema),g=m.resolve(s),y=null,b=v.parse(o,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:a,preserveWhitespace:"pre"!=g.parent.type.whitespace||"full",editableContent:!0,findPositions:u,ruleFromNode:$i,context:g});if(u&&null!=u[0].pos){var k=u[0].pos,w=u[1]&&u[1].pos;null==w&&(w=k),y={anchor:k+s,head:w+s}}return{doc:b,sel:y,from:s,to:l}}(e,t,n);if(mo.chrome&&e.cursorWrapper&&p.sel&&p.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;p.sel={anchor:p.sel.anchor+h,head:p.sel.anchor+h}}var m,v,g=e.state.doc,y=g.slice(p.from,p.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(m=e.state.selection.to,v="end"):(m=e.state.selection.from,v="start"),e.lastKeyCode=null;var b=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,l=a.b;if("end"==o){var c=Math.max(0,i-Math.min(s,l));r-=s+c-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(y.content,p.doc.content,p.from,m,v);if((mo.ios&&e.lastIOSEnter>Date.now()-225||mo.android)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!b||b.endA>=b.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))})))e.lastIOSEnter=0;else{if(!b){if(!(r&&d instanceof ot&&!d.empty&&d.$head.sameParent(d.$anchor))||e.composing||p.sel&&p.sel.anchor!=p.sel.head){if(p.sel){var k=Ui(e,e.state.doc,p.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}b={start:d.from,endA:d.to,endB:d.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&b.start==b.endB&&e.state.selection instanceof ot&&(b.start>e.state.selection.from&&b.start<=e.state.selection.from+2&&e.state.selection.from>=p.from?b.start=e.state.selection.from:b.endA<e.state.selection.to&&b.endA>=e.state.selection.to-2&&e.state.selection.to<=p.to&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),mo.ie&&mo.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>p.from&&"  "==p.doc.textBetween(b.start-p.from-1,b.start-p.from+1)&&(b.start--,b.endA--,b.endB--);var w,C=p.doc.resolveNoCache(b.start-p.from),O=p.doc.resolveNoCache(b.endB-p.from),x=C.sameParent(O)&&C.parent.inlineContent;if((mo.ios&&e.lastIOSEnter>Date.now()-225&&(!x||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!x&&C.pos<p.doc.content.size&&(w=tt.findFrom(p.doc.resolve(C.pos+1),1,!0))&&w.head==O.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))})))e.lastIOSEnter=0;else if(e.state.selection.anchor>b.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Gi(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Gi(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Gi(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(g,b.start,b.endA,C,O)&&e.someProp("handleKeyDown",(function(t){return t(e,Do(8,"Backspace"))})))mo.android&&mo.chrome&&e.domObserver.suppressSelectionUpdates();else{mo.chrome&&mo.android&&b.toB==b.from&&(e.lastAndroidDelete=Date.now()),mo.android&&!x&&C.start()!=O.start()&&0==O.parentOffset&&C.depth==O.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==b.endA&&(b.endB-=2,O=p.doc.resolveNoCache(b.endB-p.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))}))}),20));var S,E,I,N,T=b.start,M=b.endA;if(x)if(C.pos==O.pos)mo.ie&&mo.ie_version<=11&&0==C.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Oi(e)}),20)),S=e.state.tr.delete(T,M),E=g.resolve(b.start).marksAcross(g.resolve(b.endA));else if(b.endA==b.endB&&(N=g.resolve(b.start))&&(I=function(e,t){for(var n,r,o,a=e.firstChild.marks,s=t.firstChild.marks,l=a,c=s,u=0;u<s.length;u++)l=s[u].removeFromSet(l);for(var d=0;d<a.length;d++)c=a[d].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var p=[],f=0;f<t.childCount;f++)p.push(o(t.child(f)));if(i.from(p).eq(e))return{mark:r,type:n}}(C.parent.content.cut(C.parentOffset,O.parentOffset),N.parent.content.cut(N.parentOffset,b.endA-N.start()))))S=e.state.tr,"add"==I.type?S.addMark(T,M,I.mark):S.removeMark(T,M,I.mark);else if(C.parent.child(C.index()).isText&&C.index()==O.index()-(O.textOffset?0:1)){var D=C.parent.textBetween(C.parentOffset,O.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,T,M,D)})))return;S=e.state.tr.insertText(D,T,M)}if(S||(S=e.state.tr.replace(T,M,p.doc.slice(b.start-p.from,b.endB-p.from))),p.sel){var P=Ui(e,S.doc,p.sel);P&&!(mo.chrome&&mo.android&&e.composing&&P.empty&&(b.start!=b.endB||e.lastAndroidDelete<Date.now()-100)&&(P.head==T||P.head==S.mapping.map(M)-1)||mo.ie&&P.empty&&P.head==T)&&S.setSelection(P)}E&&S.ensureMarks(E),e.dispatch(S.scrollIntoView())}}}}function Ui(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Mi(e,t.resolve(n.anchor),t.resolve(n.head))}function Gi(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Xi(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||de.fromSchema(e.state.schema),l=ra(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));for(var u,d=c.firstChild;d&&1==d.nodeType&&(u=ta[d.nodeName.toLowerCase()]);){for(var p=u.length-1;p>=0;p--){for(var f=l.createElement(u[p]);c.firstChild;)f.appendChild(c.firstChild);c.appendChild(f),"tbody"!=u[p]&&(o++,i++)}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(n)),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Ji(e,t,n,r,o){var a,s,l=o.parent.type.spec.code;if(!n&&!t)return null;var c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(function(e){t=e(t,l||r)})),l)return t?new p(i.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):p.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)s=u;else{var d=o.marks(),f=e.state.schema,h=de.fromSchema(f);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=a.appendChild(document.createElement("p"));e&&t.appendChild(h.serializeNode(f.text(e,d)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=ra().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&ta[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),mo.webkit&&function(e){for(var t=e.querySelectorAll(mo.chrome?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);var m=a&&a.querySelector("[data-pm-slice]"),v=m&&/^(\d+) (\d+) (.*)/.exec(m.getAttribute("data-pm-slice"));if(!s){var g=e.someProp("clipboardParser")||e.someProp("domParser")||ee.fromSchema(e.state.schema);s=g.parseSlice(a,{preserveWhitespace:!(!c&&!v),context:o,ruleFromNode:function(e){if("BR"==e.nodeName&&!e.nextSibling&&e.parentNode&&!Yi.test(e.parentNode.nodeName))return{ignore:!0}}})}if(v)s=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}for(var o=e.content,a=e.openStart,s=e.openEnd,l=n.length-2;l>=0;l-=2){var c=r.nodes[n[l]];if(!c||c.hasRequiredAttrs())break;o=i.from(c.create(n[l+1],o)),a++,s++}return new p(o,a,s)}(ea(s,+v[1],+v[2]),v[3]);else if((s=p.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,a=[];if(e.forEach((function(e){if(a){var t,n=r.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&o.length&&function e(t,n,r,o,a){if(a<t.length&&a<n.length&&t[a]==n[a]){var s=e(t,n,r,o.lastChild,a+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(a==t.length-1?r.type:t[a+1]))return o.copy(o.content.append(i.from(Zi(r,t,a+1))))}}(n,o,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=function e(t,n){if(0==n)return t;var r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1)),o=t.contentMatchAt(t.childCount).fillBefore(i.empty,!0);return t.copy(r.append(o))}(a[a.length-1],o.length));var s=Zi(e,n);a.push(s),r=r.matchType(s.type,s.attrs),o=n}}})),a)return{v:i.from(a)}},r=t.depth;r>=0;r--){var o=n(r);if(o)return o.v}return e}(s.content,o),!0)).openStart||s.openEnd){for(var y=0,b=0,k=s.content.firstChild;y<s.openStart&&!k.type.spec.isolating;y++,k=k.firstChild);for(var w=s.content.lastChild;b<s.openEnd&&!w.type.spec.isolating;b++,w=w.lastChild);s=ea(s,y,b)}return e.someProp("transformPasted",(function(e){s=e(s)})),s}var Yi=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Zi(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,i.from(e));return e}function Qi(e,t,n,r,o,a){var s=t<0?e.firstChild:e.lastChild,l=s.content;return o<r-1&&(l=Qi(l,t,n,r,o+1,a)),o>=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(i.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function ea(e,t,n){return t<e.openStart&&(e=new p(Qi(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new p(Qi(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var ta={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},na=null;function ra(){return na||(na=document.implementation.createHTMLDocument("title"))}var oa={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ia=mo.ie&&mo.ie_version<=11,aa=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};aa.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},aa.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var sa=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)n.queue.push(e[t]);mo.ie&&mo.ie_version<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new aa,ia&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};sa.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},sa.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},sa.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,oa),ia&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},sa.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}ia&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},sa.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},sa.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},sa.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},sa.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&Di(e)){var e;if(this.suppressingSelectionUpdates)return Oi(this.view);if(mo.ie&&mo.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&So(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},sa.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},sa.prototype.ignoreSelectionChange=function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0},sa.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Di(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var l=this.registerMutation(e[s],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&(i=!0))}if(mo.gecko&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var u=c[0],d=c[1];u.parentNode&&u.parentNode.parentNode==d.parentNode?d.remove():u.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(la)return;la=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Oi(this.view),this.currentSelection.set(t))}},sa.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(mo.ie&&mo.ie_version<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],l=s.previousSibling,c=s.nextSibling;(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(o=l),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var u=o&&o.parentNode==e.target?wo(o)+1:0,d=n.localPosFromDOM(e.target,u,-1),p=i&&i.parentNode==e.target?wo(i):e.target.childNodes.length;return{from:d,to:n.localPosFromDOM(e.target,p,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}};var la=!1;var ca={},ua={};function da(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function pa(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return fa(e,t)})}))}function fa(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function ha(e){return{left:e.clientX,top:e.clientY}}function ma(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if(l)return l.v}return!1}function va(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ga(e,t,n,r,o){return ma(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof at&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(at.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(va(e,at.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&at.isSelectable(r))&&(va(e,new at(n),"pointer"),!0)}(e,n))}function ya(e,t,n,r){return ma(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ba(e,t,n,r){return ma(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(va(e,ot.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)va(e,ot.create(r,s+1,s+1+a.content.size),"pointer");else{if(!at.isSelectable(a))continue;va(e,at.create(r,s),"pointer")}return!0}}(e,n,r)}function ka(e){return Ia(e)}ua.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!Oa(e,t)&&(e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!mo.android||!mo.chrome||13!=t.keyCode))if(229!=t.keyCode&&e.domObserver.forceFlush(),!mo.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||Wi(e,t)?t.preventDefault():da(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},ua.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},ua.keypress=function(e,t){if(!(Oa(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||mo.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof ot&&n.$from.sameParent(n.$to))){var r=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,r)}))||e.dispatch(e.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}}};var wa=mo.mac?"metaKey":"ctrlKey";ca.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ka(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[wa]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(ha(t));i&&("singleClick"==o?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new Ca(e,i,t,n)):("doubleClick"==o?ya:ba)(e,i.pos,i.inside,t)?t.preventDefault():da(e,"pointer"))};var Ca=function(e,t,n,r){var o,i,a=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=r,this.selectNode=n[wa],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{var s=e.state.doc.resolve(t.pos);o=s.parent,i=s.depth?s.before():0}this.mightDrag=null;var l=r?null:n.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c?c.dom:null;var u=e.state.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||u instanceof at&&u.from<=i&&u.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&mo.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){a.view.mouseDown==a&&a.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),da(e,"pointer")};function Oa(e,t){return!!e.composing||!!(mo.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}Ca.prototype.done=function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return Oi(e.view)})),this.view.mouseDown=null},Ca.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(ha(e))),this.allowDefault||!t?da(this.view,"pointer"):ga(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||mo.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||mo.chrome&&!(this.view.state.selection instanceof ot)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(va(this.view,tt.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):da(this.view,"pointer")}},Ca.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),da(this.view,"pointer"),0==e.buttons&&this.done()},ca.touchdown=function(e){ka(e),da(e,"pointer")},ca.contextmenu=function(e){return ka(e)};var xa=mo.android?5e3:-1;function Sa(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return Ia(e)}),t))}function Ea(e){var t;for(e.composing&&(e.composing=!1,e.compositionEndedAt=((t=document.createEvent("Event")).initEvent("event",!0,!0),t.timeStamp));e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function Ia(e,t){if(!(mo.android&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ea(e),t||e.docView&&e.docView.dirty){var n=wi(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}ua.compositionstart=ua.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),Ia(e,!0),e.markCursor=null;else if(Ia(e),mo.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.composing=!0}Sa(e,xa)},ua.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,Sa(e,20))};var Na=mo.ie&&mo.ie_version<15||mo.ios&&mo.webkit_version<604;function Ta(e,t,n,r){var o=Ji(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||p.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ca.copy=ua.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=Na?null:t.clipboardData,i=Xi(e,n.content()),a=i.dom,s=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},ua.paste=function(e,t){if(!e.composing||mo.android){var n=Na?null:t.clipboardData;n&&Ta(e,n.getData("text/plain"),n.getData("text/html"),t)?t.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ta(e,r.value,null,t):Ta(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)}};var Ma=function(e,t){this.slice=e,this.move=t},Da=mo.mac?"altKey":"ctrlKey";for(var Pa in ca.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var r=e.state.selection,o=r.empty?null:e.posAtCoords(ha(t));if(o&&o.pos>=r.from&&o.pos<=(r instanceof at?r.to-1:r.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(at.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var i=e.docView.nearestDesc(t.target,!0);i&&i.node.type.spec.draggable&&i!=e.docView&&e.dispatch(e.state.tr.setSelection(at.create(e.state.doc,i.posBefore)))}var a=e.state.selection.content(),s=Xi(e,a),l=s.dom,c=s.text;t.dataTransfer.clearData(),t.dataTransfer.setData(Na?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Na||t.dataTransfer.setData("text/plain",c),e.dragging=new Ma(a,!t[Da])}},ca.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},ua.dragover=ua.dragenter=function(e,t){return t.preventDefault()},ua.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var r=e.posAtCoords(ha(t));if(r){var o=e.state.doc.resolve(r.pos);if(o){var i=n&&n.slice;i?e.someProp("transformPasted",(function(e){i=e(i)})):i=Ji(e,t.dataTransfer.getData(Na?"Text":"text/plain"),Na?null:t.dataTransfer.getData("text/html"),!1,o);var a=n&&!t[Da];if(e.someProp("handleDrop",(function(n){return n(e,t,i||p.empty,a)})))t.preventDefault();else if(i){t.preventDefault();var s=i?ze(e.state.doc,o.pos,i):o.pos;null==s&&(s=o.pos);var l=e.state.tr;a&&l.deleteSelection();var c=l.mapping.map(s),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,d=l.doc;if(u?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),!l.doc.eq(d)){var f=l.doc.resolve(c);if(u&&at.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new at(f));else{var h=l.mapping.map(s);l.mapping.maps[l.mapping.maps.length-1].forEach((function(e,t,n,r){return h=r})),l.setSelection(Mi(e,f,l.doc.resolve(h)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}}}}}},ca.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&Oi(e)}),20))},ca.blur=function(e,t){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.set({}),e.focused=!1)},ca.beforeinput=function(e,t){if(mo.chrome&&mo.android&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,Do(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},ua)ca[Pa]=ua[Pa];function _a(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var ja=function(e,t){this.spec=t||Ba,this.side=this.spec.side||0,this.toDOM=e};ja.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new Fa(i-n,i-n,this)},ja.prototype.valid=function(){return!0},ja.prototype.eq=function(e){return this==e||e instanceof ja&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&_a(this.spec,e.spec))},ja.prototype.destroy=function(e){this.spec.destroy&&this.spec.destroy(e)};var Ra=function(e,t){this.spec=t||Ba,this.attrs=e};Ra.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Fa(o,i,this)},Ra.prototype.valid=function(e,t){return t.from<t.to},Ra.prototype.eq=function(e){return this==e||e instanceof Ra&&_a(this.attrs,e.attrs)&&_a(this.spec,e.spec)},Ra.is=function(e){return e.type instanceof Ra};var Aa=function(e,t){this.spec=t||Ba,this.attrs=e};Aa.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Fa(o.pos-n,i.pos-n,this)},Aa.prototype.valid=function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to},Aa.prototype.eq=function(e){return this==e||e instanceof Aa&&_a(this.attrs,e.attrs)&&_a(this.spec,e.spec)};var Fa=function(e,t,n){this.from=e,this.to=t,this.type=n},za={spec:{configurable:!0},inline:{configurable:!0}};Fa.prototype.copy=function(e,t){return new Fa(e,t,this.type)},Fa.prototype.eq=function(e,t){return void 0===t&&(t=0),this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to},Fa.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},Fa.widget=function(e,t,n){return new Fa(e,e,new ja(t,n))},Fa.inline=function(e,t,n,r){return new Fa(e,t,new Ra(n,r))},Fa.node=function(e,t,n,r){return new Fa(e,t,new Aa(n,r))},za.spec.get=function(){return this.type.spec},za.inline.get=function(){return this.type instanceof Ra},Object.defineProperties(Fa.prototype,za);var La=[],Ba={},Va=function(e,t){this.local=e&&e.length?e:La,this.children=t&&t.length?t:La};Va.create=function(e,t){return t.length?Ua(t,e,0,Ba):Ha},Va.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},Va.prototype.findInner=function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}},Va.prototype.map=function(e,t,n){return this==Ha||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Ba)},Va.prototype.mapInner=function(e,t,n,r,o){for(var i,a=0;a<this.local.length;a++){var s=this.local[a].map(e,n,r);s&&s.type.valid(t,s)?(i||(i=[])).push(s):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],c=void 0;if(!(l<0||e>l+i)){var u=s[a]+i;t>=u?s[a+1]=e<=u?-2:-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c)}}},c=0;c<n.maps.length;c++)n.maps[c].forEach(l);for(var u=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){u=!0,s[d+1]=-1;continue}var p=n.map(e[d]+i),f=p-o;if(f<0||f>=r.content.size){u=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(f),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==f&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,p+1,e[d]+i+1,a);b!=Ha?(s[d]=f,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,u=!0)}else u=!0}if(u){var k=Ua(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t||[],n,o,i,a),r,0,a);t=k.local;for(var w=0;w<s.length;w+=3)s[w+1]<0&&(s.splice(w,3),w-=3);for(var C=0,O=0;C<k.children.length;C+=3){for(var x=k.children[C];O<s.length&&s[O]<x;)O+=3;s.splice(O,0,k.children[C],k.children[C+1],k.children[C+2])}}return new Va(t&&t.sort(Ga),s)}(this.children,i,e,t,n,r,o):i?new Va(i.sort(Ga)):Ha},Va.prototype.add=function(e,t){return t.length?this==Ha?Va.create(e,t):this.addInner(e,t,0):this},Va.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach((function(e,a){var s,l=a+n;if(s=$a(t,e,l)){for(r||(r=o.children.slice());i<r.length&&r[i]<a;)i+=3;r[i]==a?r[i+2]=r[i+2].addInner(e,s,l+1):r.splice(i,0,a,a+e.nodeSize,Ua(s,e,l+1,Ba)),i+=3}}));for(var a=Wa(i?qa(t):t,-n),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Va(a.length?this.local.concat(a).sort(Ga):this.local,r||this.children)},Va.prototype.remove=function(e){return 0==e.length||this==Ha?this:this.removeInner(e,0)},Va.prototype.removeInner=function(e,t){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,a=n[o]+t,s=n[o+1]+t,l=0,c=void 0;l<e.length;l++)(c=e[l])&&c.from>a&&c.to<s&&(e[l]=null,(i||(i=[])).push(c));if(i){n==this.children&&(n=this.children.slice());var u=n[o+2].removeInner(i,a+1);u!=Ha?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var d=0,p=void 0;d<e.length;d++)if(p=e[d])for(var f=0;f<r.length;f++)r[f].eq(p,t)&&(r==this.local&&(r=this.local.slice()),r.splice(f--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Va(r,n):Ha},Va.prototype.forChild=function(e,t){if(this==Ha)return this;if(t.isLeaf)return Va.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,a=i+t.content.size,s=0;s<this.local.length;s++){var l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof Ra){var c=Math.max(i,l.from)-i,u=Math.min(a,l.to)-i;c<u&&(r||(r=[])).push(l.copy(c,u))}}if(r){var d=new Va(r.sort(Ga));return n?new Ka([d,n]):d}return n||Ha},Va.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof Va)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(var t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0},Va.prototype.locals=function(e){return Xa(this.localsInner(e))},Va.prototype.localsInner=function(e){if(this==Ha)return La;if(e.inlineContent||!this.local.some(Ra.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Ra||t.push(this.local[n]);return t};var Ha=new Va;Va.empty=Ha,Va.removeOverlap=Xa;var Ka=function(e){this.members=e};function Wa(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new Fa(o.from+t,o.to+t,o.type))}return n}function $a(e,t,n){if(t.isLeaf)return null;for(var r=n+t.nodeSize,o=null,i=0,a=void 0;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function qa(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ua(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=$a(e,t,a+n);if(s){i=!0;var l=Ua(s,t,n+a+1,r);l!=Ha&&o.push(a,a+t.nodeSize,l)}}));for(var a=Wa(i?qa(e):e,-n).sort(Ga),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Va(a,o):Ha}function Ga(e,t){return e.from-t.from||e.to-t.to}function Xa(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Ja(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Ja(t,o+1,i.copy(r.to,i.to)))}}return t}function Ja(e,t,n){for(;t<e.length&&Ga(n,e[t])>0;)t++;e.splice(t,0,n)}function Ya(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=Ha&&t.push(r)})),e.cursorWrapper&&t.push(Va.create(e.state.doc,[e.cursorWrapper.deco])),Ka.from(t)}Ka.prototype.map=function(e,t){var n=this.members.map((function(n){return n.map(e,t,Ba)}));return Ka.from(n)},Ka.prototype.forChild=function(e,t){if(t.isLeaf)return Va.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=Ha&&(o instanceof Ka?n=n.concat(o.members):n.push(o))}return Ka.from(n)},Ka.prototype.eq=function(e){if(!(e instanceof Ka)||e.members.length!=this.members.length)return!1;for(var t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0},Ka.prototype.locals=function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Xa(n?t:t.sort(Ga)):La},Ka.from=function(e){switch(e.length){case 0:return Ha;case 1:return e[0];default:return new Ka(e)}};var Za,Qa,es=function(e,t){this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ss),this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):e.apply?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=is(this),this.markCursor=null,this.cursorWrapper=null,rs(this),this.nodeViews=as(this),this.docView=ai(this.state.doc,ns(this),Ya(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(e){e.shiftKey=!1,e.mouseDown=null,e.lastKeyCode=null,e.lastKeyCodeTime=0,e.lastClick={time:0,x:0,y:0,type:""},e.lastSelectionOrigin=null,e.lastSelectionTime=0,e.lastIOSEnter=0,e.lastIOSEnterFallbackTimeout=null,e.lastAndroidDelete=0,e.composing=!1,e.composingTimeout=null,e.compositionNodes=[],e.compositionEndedAt=-2e8,e.domObserver=new sa(e,(function(t,n,r,o){return qi(e,t,n,r,o)})),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=ca[t];e.dom.addEventListener(t,e.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||fa(e,t)||!e.editable&&t.type in ua||n(e,t)})};for(var n in ca)t(n);mo.safari&&e.dom.addEventListener("input",(function(){return null})),pa(e)}(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()},ts={props:{configurable:!0},root:{configurable:!0},isDestroyed:{configurable:!0}};function ns(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[Fa.node(0,e.state.doc.content.size,t)]}function rs(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Fa.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function is(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function as(e){var t={};return e.someProp("nodeViews",(function(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])})),t}function ss(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}if(ts.props.get=function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props},es.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&pa(this),this._props=e,e.plugins&&(e.plugins.forEach(ss),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)},es.prototype.setProps=function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)},es.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},es.prototype.updateStateInner=function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(Ea(this),i=!0),this.state=e,t){var a=as(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),pa(this)}this.editable=is(this),rs(this);var s=Ya(this),l=ns(this),c=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(e.doc,l,s);!u&&e.selection.eq(r.selection)||(i=!0);var d,p,f,h,m,v,g,y,b,k,w,C="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s!=e.dom&&e.dom.contains(s)){var l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:Ao(e.dom)}}(this);if(i){this.domObserver.stop();var O=u&&(mo.ie||mo.chrome)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&(h=r.selection,m=e.selection,v=Math.min(h.$anchor.sharedDepth(h.head),m.$anchor.sharedDepth(m.head)),h.$anchor.start(v)!=m.$anchor.start(v));if(u){var x=mo.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(e.doc,l,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ai(e.doc,l,s,this.dom,this)),x&&!this.trackWrites&&(O=!0)}O||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(d=this,p=d.docView.domFromPos(d.state.selection.anchor,0),f=d.root.getSelection(),So(p.node,p.offset,f.anchorNode,f.anchorOffset)))?Oi(this,O):(Ni(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==c)this.dom.scrollTop=0;else if("to selection"==c){var S=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof at?Ro(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),S):Ro(this,this.coordsAtPos(e.selection.head,1),S))}else C&&(y=(g=C).refDOM,b=g.refTop,k=g.stack,w=y?y.getBoundingClientRect().top:0,Fo(k,0==w?0:w-b))},es.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},es.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}},es.prototype.someProp=function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var l=a[s].props[e];if(null!=l&&(n=t?t(l):l))return n}},es.prototype.hasFocus=function(){return this.root.activeElement==this.dom},es.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(zo)return e.focus(zo);var t=Ao(e);e.focus(null==zo?{get preventScroll(){return zo={preventScroll:!0},!0}}:void 0),zo||(zo=!1,Fo(t,0))}(this.dom),Oi(this),this.domObserver.start()},ts.root.get=function(){var e=this._root;if(null==e)for(var t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return document.getSelection()}),this._root=t;return e||document},es.prototype.posAtCoords=function(e){return Vo(this,e)},es.prototype.coordsAtPos=function(e,t){return void 0===t&&(t=1),Wo(this,e,t)},es.prototype.domAtPos=function(e,t){return void 0===t&&(t=0),this.docView.domFromPos(e,t)},es.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},es.prototype.posAtDOM=function(e,t,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},es.prototype.endOfTextblock=function(e,t){return Zo(this,t||this.state,e)},es.prototype.destroy=function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.eventHandlers)e.dom.removeEventListener(t,e.eventHandlers[t]);clearTimeout(e.composingTimeout),clearTimeout(e.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ya(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},ts.isDestroyed.get=function(){return null==this.docView},es.prototype.dispatchEvent=function(e){return function(e,t){fa(e,t)||!ca[t.type]||!e.editable&&t.type in ua||ca[t.type](e,t)}(this,e)},es.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(es.prototype,ts),"undefined"!=typeof WeakMap){var ls=new WeakMap;Za=function(e){return ls.get(e)},Qa=function(e,t){return ls.set(e,t),t}}else{var cs=[],us=0;Za=function(e){for(var t=0;t<cs.length;t+=2)if(cs[t]==e)return cs[t+1]},Qa=function(e,t){return 10==us&&(us=0),cs[us++]=e,cs[us++]=t}}var ds=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},ps=function(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r};function fs(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}function hs(e,t){var n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((function(e){return Number(e)})):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(var a in t){var s=t[a].getFromDOM,l=s&&s(e);null!=l&&(i[a]=l)}return i}function ms(e,t){var n={};for(var r in 1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(",")),t){var o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function vs(e){var t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(var r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:function(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:function(e){return hs(e,t)}}],toDOM:function(e){return["td",ms(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return hs(e,t)}}],toDOM:function(e){return["th",ms(e,t),0]}}}}function gs(e){var t=e.cached.tableNodeTypes;if(!t)for(var n in t=e.cached.tableNodeTypes={},e.nodes){var r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}ps.prototype.findCell=function(e){for(var t=0;t<this.map.length;t++){var n=this.map[t];if(n==e){for(var r=t%this.width,o=t/this.width|0,i=r+1,a=o+1,s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(var l=1;a<this.height&&this.map[t+this.width*l]==n;l++)a++;return new ds(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")},ps.prototype.colCount=function(e){for(var t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")},ps.prototype.nextCell=function(e,t,n){var r=this.findCell(e),o=r.left,i=r.right,a=r.top,s=r.bottom;return"horiz"==t?(n<0?0==o:i==this.width)?null:this.map[a*this.width+(n<0?o-1:i)]:(n<0?0==a:s==this.height)?null:this.map[o+this.width*(n<0?a-1:s)]},ps.prototype.rectBetween=function(e,t){var n=this.findCell(e),r=n.left,o=n.right,i=n.top,a=n.bottom,s=this.findCell(t),l=s.left,c=s.right,u=s.top,d=s.bottom;return new ds(Math.min(r,l),Math.min(i,u),Math.max(o,c),Math.max(a,d))},ps.prototype.cellsInRect=function(e){for(var t=[],n={},r=e.top;r<e.bottom;r++)for(var o=e.left;o<e.right;o++){var i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t},ps.prototype.positionAt=function(e,t,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==e){for(var a=t+e*this.width,s=(e+1)*this.width;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}},ps.get=function(e){return Za(e)||Qa(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);for(var t=function(e){for(var t=-1,n=!1,r=0;r<e.childCount;r++){var o=e.child(r),i=0;if(n)for(var a=0;a<r;a++)for(var s=e.child(a),l=0;l<s.childCount;l++){var c=s.child(l);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}for(var u=0;u<o.childCount;u++){var d=o.child(u);i+=d.attrs.colspan,d.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,l=t*n;s<l;s++)r[s]=0;for(var c=0,u=0;c<n;c++){var d=e.child(c);u++;for(var p=0;;p++){for(;o<r.length&&0!=r[o];)o++;if(p==d.childCount)break;for(var f=d.child(p),h=f.attrs,m=h.colspan,v=h.rowspan,g=h.colwidth,y=0;y<v;y++){if(y+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:v-y});break}for(var b=o+y*t,k=0;k<m;k++){0==r[b+k]?r[b+k]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:m-k});var w=g&&g[k];if(w){var C=(b+k)%t*2,O=a[C];null==O||O!=w&&1==a[C+1]?(a[C]=w,a[C+1]=1):O==w&&a[C+1]++}}}o+=m,u+=f.nodeSize}for(var x=(c+1)*t,S=0;o<x;)0==r[o++]&&S++;S&&(i||(i=[])).push({type:"missing",row:c,n:S}),u++}for(var E=new ps(t,n,r,i),I=!1,N=0;!I&&N<a.length;N+=2)null!=a[N]&&a[N+1]<n&&(I=!0);I&&function(e,t,n){e.problems||(e.problems=[]);for(var r=0,o={};r<e.map.length;r++){var i=e.map[r];if(!o[i]){o[i]=!0;for(var a=n.nodeAt(i),s=null,l=0;l<a.attrs.colspan;l++){var c=(r+l)%e.width,u=t[2*c];null==u||a.attrs.colwidth&&a.attrs.colwidth[l]==u||((s||(s=fs(a.attrs)))[l]=u)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(E,a,e);return E}(e))};var ys=new Ot("selectingCells");function bs(e){for(var t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function ks(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function ws(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:bs(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function Cs(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Os(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function xs(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Ss(e){return ps.get(e.node(-1)).findCell(e.pos-e.start(-1))}function Es(e){return ps.get(e.node(-1)).colCount(e.pos-e.start(-1))}function Is(e,t,n){var r=e.start(-1),o=ps.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function Ns(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function Ts(e,t,n){void 0===n&&(n=1);var r=Ns(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function Ms(e,t,n){void 0===n&&(n=1);var r=Ns(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}function Ds(e,t,n){for(var r=gs(t.type.schema).header_cell,o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}var Ps=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=ps.get(r),i=t.start(-1),a=o.rectBetween(t.pos-i,n.pos-i),s=t.node(0),l=o.cellsInRect(a).filter((function(e){return e!=n.pos-i}));l.unshift(n.pos-i);var c=l.map((function(e){var t=r.nodeAt(e),n=e+i+1;return new rt(s.resolve(n),s.resolve(n+t.content.size))}));e.call(this,c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(e,n){var r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(Cs(r)&&Cs(o)&&xs(r,o)){var i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?t.rowSelection(r,o):i&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return ot.between(r,o)},t.prototype.content=function(){for(var e=this.$anchorCell.node(-1),t=ps.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},a=[],s=r.top;s<r.bottom;s++){for(var l=[],c=s*t.width+r.left,u=r.left;u<r.right;u++,c++){var d=t.map[c];if(!o[d]){o[d]=!0;var f=t.findCell(d),h=e.nodeAt(d),m=r.left-f.left,v=f.right-r.right;if(m>0||v>0){var g=h.attrs;m>0&&(g=Ts(g,0,m)),v>0&&(g=Ts(g,g.colspan-v,v)),h=f.left<r.left?h.type.createAndFill(g):h.type.create(g,h.content)}if(f.top<r.top||f.bottom>r.bottom){var y=Ns(h.attrs,"rowspan",Math.min(f.bottom,r.bottom)-Math.max(f.top,r.top));h=f.top<r.top?h.type.createAndFill(y):h.type.create(y,h.content)}l.push(h)}}a.push(e.child(s).copy(i.from(l)))}var b=this.isColSelection()&&this.isRowSelection()?e:a;return new p(i.from(b),1,1)},t.prototype.replace=function(t,n){void 0===n&&(n=p.empty);for(var r=t.steps.length,o=this.ranges,i=0;i<o.length;i++){var a=o[i],s=a.$from,l=a.$to,c=t.mapping.slice(r);t.replace(c.map(s.pos),c.map(l.pos),i?p.empty:n)}var u=e.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);u&&t.setSelection(u)},t.prototype.replaceWith=function(e,t){this.replace(e,new p(i.from(t),0,0))},t.prototype.forEachCell=function(e){for(var t=this.$anchorCell.node(-1),n=ps.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])},t.prototype.isColSelection=function(){var e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=ps.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom<r.height&&(n=s.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(n=s.resolve(o+r.map[a.left])),i.bottom<r.height&&(e=s.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new t(e,n)},t.prototype.isRowSelection=function(){var e=ps.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=ps.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right<r.width&&(n=s.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(n=s.resolve(o+r.map[a.top*r.width])),i.right<r.width&&(e=s.resolve(o+r.map[r.width*(i.top+1)-1]))),new t(e,n)},t.prototype.toJSON=function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}},t.fromJSON=function(e,n){return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,n,r){return void 0===r&&(r=n),new t(e.resolve(n),e.resolve(r))},t.prototype.getBookmark=function(){return new _s(this.$anchorCell.pos,this.$headCell.pos)},t}(tt);Ps.prototype.visible=!1,tt.jsonID("cell",Ps);var _s=function(e,t){this.anchor=e,this.head=t};function js(e){if(!(e.selection instanceof Ps))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(Fa.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Va.create(e.doc,t)}function Rs(e){if(!e.size)return null;for(var t=e.content,n=e.openStart,r=e.openEnd;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,a=o.type.spec.tableRole,s=o.type.schema,l=[];if("row"==a)for(var c=0;c<t.childCount;c++){var u=t.child(c).content,d=c?0:Math.max(0,n-1),f=c<t.childCount-1?0:Math.max(0,r-1);(d||f)&&(u=As(gs(s).row,new p(u,d,f)).content),l.push(u)}else{if("cell"!=a&&"header_cell"!=a)return null;l.push(n||r?As(gs(s).row,new p(t,n,r)).content:t)}return function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=t[r],a=o.childCount-1;a>=0;a--)for(var s=o.child(a).attrs,l=s.rowspan,c=s.colspan,u=r;u<r+l;u++)n[u]=(n[u]||0)+c;for(var d=0,p=0;p<n.length;p++)d=Math.max(d,n[p]);for(var f=0;f<n.length;f++)if(f>=t.length&&t.push(i.empty),n[f]<d){for(var h=gs(e).cell.createAndFill(),m=[],v=n[f];v<d;v++)m.push(h);t[f]=t[f].append(i.from(m))}return{height:t.length,width:d,rows:t}}(s,l)}function As(e,t){var n=e.createAndFill();return new ke(n).replace(0,n.content.size,t).doc}function Fs(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var l=!1,c=o;c<i;c++){var u=a*t.width+c,d=t.map[u];if(t.map[u-t.width]==d){l=!0;var p=n.nodeAt(d),f=t.findCell(d),h=f.top,m=f.left;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,Ns(p.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),p.type.createAndFill(Ns(p.attrs,"rowspan",h+p.attrs.rowspan-a))),c+=p.attrs.colspan-1}}return l}function zs(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;for(var l=!1,c=o;c<i;c++){var u=c*t.width+a,d=t.map[u];if(t.map[u-1]==d){l=!0;var p=n.nodeAt(d),f=t.colCount(d),h=e.mapping.slice(s).map(d+r);e.setNodeMarkup(h,null,Ts(p.attrs,a-f,p.attrs.colspan-(a-f))),e.insert(h+p.nodeSize,p.type.createAndFill(Ts(p.attrs,0,a-f))),c+=p.attrs.rowspan-1}}return l}function Ls(e,t,n,r,o){var a=n?e.doc.nodeAt(n-1):e.doc,s=ps.get(a),l=r.top,c=r.left,u=c+o.width,d=l+o.height,f=e.tr,h=0;function m(){a=n?f.doc.nodeAt(n-1):f.doc,s=ps.get(a),h=f.mapping.maps.length}(function(e,t,n,r,o,a,s){var l,c,u=gs(e.doc.type.schema);if(o>t.width)for(var d=0,p=0;d<t.height;d++){var f=n.child(d);p+=f.nodeSize;var h=[],m=void 0;m=null==f.lastChild||f.lastChild.type==u.cell?l||(l=u.cell.createAndFill()):c||(c=u.header_cell.createAndFill());for(var v=t.width;v<o;v++)h.push(m);e.insert(e.mapping.slice(s).map(p-1+r),h)}if(a>t.height){for(var g=[],y=0,b=(t.height-1)*t.width;y<Math.max(t.width,o);y++){var k=!(y>=t.width)&&n.nodeAt(t.map[b+y]).type==u.header_cell;g.push(k?c||(c=u.header_cell.createAndFill()):l||(l=u.cell.createAndFill()))}for(var w=u.row.create(null,i.from(g)),C=[],O=t.height;O<a;O++)C.push(w);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),C)}return!(!l&&!c)})(f,s,a,n,u,d,h)&&m(),Fs(f,s,a,n,c,u,l,h)&&m(),Fs(f,s,a,n,c,u,d,h)&&m(),zs(f,s,a,n,l,d,c,h)&&m(),zs(f,s,a,n,l,d,u,h)&&m();for(var v=l;v<d;v++){var g=s.positionAt(v,c,a),y=s.positionAt(v,u,a);f.replace(f.mapping.slice(h).map(g+n),f.mapping.slice(h).map(y+n),new p(o.rows[v-l],0,0))}m(),f.setSelection(new Ps(f.doc.resolve(n+s.positionAt(l,c,a)),f.doc.resolve(n+s.positionAt(d-1,u-1,a)))),t(f)}_s.prototype.map=function(e){return new _s(e.map(this.anchor),e.map(this.head))},_s.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&xs(t,n)?new Ps(t,n):tt.near(n,1)};var Bs=ho({ArrowLeft:Hs("horiz",-1),ArrowRight:Hs("horiz",1),ArrowUp:Hs("vert",-1),ArrowDown:Hs("vert",1),"Shift-ArrowLeft":Ks("horiz",-1),"Shift-ArrowRight":Ks("horiz",1),"Shift-ArrowUp":Ks("vert",-1),"Shift-ArrowDown":Ks("vert",1),Backspace:Ws,"Mod-Backspace":Ws,Delete:Ws,"Mod-Delete":Ws});function Vs(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Hs(e,t){return function(n,r,o){var i=n.selection;if(i instanceof Ps)return Vs(n,r,tt.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;var a=Gs(o,e,t);if(null==a)return!1;if("horiz"==e)return Vs(n,r,tt.near(n.doc.resolve(i.head+t),t));var s,l=n.doc.resolve(a),c=Is(l,e,t);return s=c?tt.near(c,1):t<0?tt.near(n.doc.resolve(l.before(-1)),-1):tt.near(n.doc.resolve(l.after(-1)),1),Vs(n,r,s)}}function Ks(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof Ps)){var a=Gs(o,e,t);if(null==a)return!1;i=new Ps(n.doc.resolve(a))}var s=Is(i.$headCell,e,t);return!!s&&Vs(n,r,new Ps(i.$anchorCell,s))}}function Ws(e,t){var n=e.selection;if(!(n instanceof Ps))return!1;if(t){var r=e.tr,o=gs(e.schema).cell.createAndFill().content;n.forEachCell((function(e,t){e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new p(o,0,0))})),r.docChanged&&t(r)}return!0}function $s(e,t){var n=bs(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new Ps(n))),!0)}function qs(e,t,n){if(!ks(e.state))return!1;var r=Rs(n),o=e.state.selection;if(o instanceof Ps){r||(r={width:1,height:1,rows:[i.from(As(gs(e.state.schema).cell,n))]});var a=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=ps.get(a).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=function(e,t,n){var r=e.width,o=e.height,a=e.rows;if(r!=t){for(var s=[],l=[],c=0;c<a.length;c++){for(var u=a[c],d=[],p=s[c]||0,f=0;p<t;f++){var h=u.child(f%u.childCount);p+h.attrs.colspan>t&&(h=h.type.create(Ts(h.attrs,h.attrs.colspan,p+h.attrs.colspan-t),h.content)),d.push(h),p+=h.attrs.colspan;for(var m=1;m<h.attrs.rowspan;m++)s[c+m]=(s[c+m]||0)+h.attrs.colspan}l.push(i.from(d))}a=l,r=t}if(o!=n){for(var v=[],g=0,y=0;g<n;g++,y++){for(var b=[],k=a[y%o],w=0;w<k.childCount;w++){var C=k.child(w);g+C.attrs.rowspan>n&&(C=C.type.create(Ns(C.attrs,"rowspan",Math.max(1,n-C.attrs.rowspan)),C.content)),b.push(C)}v.push(i.from(b))}a=v,o=n}return{width:r,height:o,rows:a}}(r,l.right-l.left,l.bottom-l.top),Ls(e.state,e.dispatch,s,l,r),!0}if(r){var c=ws(e.state),u=c.start(-1);return Ls(e.state,e.dispatch,u,ps.get(c.node(-1)).findCell(c.pos-u),r),!0}return!1}function Us(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=Xs(e,t.target);if(t.shiftKey&&e.state.selection instanceof Ps)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=bs(e.state.selection.$anchor))&&Js(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function o(t,n){var r=Js(e,n),o=null==ys.getState(e.state);if(!r||!xs(t,r)){if(!o)return;r=t}var i=new Ps(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(ys,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=ys.getState(e.state)&&e.dispatch(e.state.tr.setMeta(ys,-1))}function a(n){var a,s=ys.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(Xs(e,n.target)!=r&&!(a=Js(e,t)))return i();a&&o(a,n)}}function Gs(e,t,n){if(!(e.state.selection instanceof ot))return null;for(var r=e.state.selection.$head,o=r.depth-1;o>=0;o--){var i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){var a=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?a:null}}return null}function Xs(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Js(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?bs(e.state.doc.resolve(n.pos)):null}var Ys=new Ot("fix-tables");function Zs(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=ps.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],l=0;l<o.height;l++)s.push(0);for(var c=0;c<o.problems.length;c++){var u=o.problems[c];if("collision"==u.type){for(var d=t.nodeAt(u.pos),p=0;p<d.attrs.rowspan;p++)s[u.row+p]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Ts(d.attrs,d.attrs.colspan-u.n,u.n))}else if("missing"==u.type)s[u.row]+=u.n;else if("overlong_rowspan"==u.type){var f=t.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Ns(f.attrs,"rowspan",f.attrs.rowspan-u.n))}else if("colwidth mismatch"==u.type){var h=t.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Ns(h.attrs,"colwidth",u.colwidth))}}for(var m=0;m<s.length;m++)s[m]&&(null==i&&(i=m),a=m);for(var v=0,g=n+1;v<o.height;v++){var y=t.child(v),b=g+y.nodeSize,k=s[v];if(k>0){var w="cell";y.firstChild&&(w=y.firstChild.type.spec.tableRole);for(var C=[],O=0;O<k;O++)C.push(gs(e.schema)[w].createAndFill());var x=0!=v&&i!=v-1||a!=v?b-1:g+1;r.insert(r.mapping.map(x),C)}g=b}return r.setMeta(Ys,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,o){var i=t.childCount,a=n.childCount;e:for(var s=0,l=0;s<a;s++){for(var c=n.child(s),u=l,d=Math.min(i,s+3);u<d;u++)if(t.child(u)==c){l=u+1,r+=c.nodeSize;continue e}o(c,r),l<i&&t.child(l).sameMarkup(c)?e(t.child(l),c,r+1,o):c.nodesBetween(0,c.content.size,o,r+1),r+=c.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function Qs(e){var t,n=e.selection,r=ws(e),o=r.node(-1),i=r.start(-1),a=ps.get(o);return(t=n instanceof Ps?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i)).tableStart=i,t.map=a,t.table=o,t}function el(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;Ds(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s<r.height;s++){var l=s*r.width+n;if(n>0&&n<r.width&&r.map[l-1]==r.map[l]){var c=r.map[l],u=i.nodeAt(c);e.setNodeMarkup(e.mapping.map(o+c),null,Ms(u.attrs,n-r.colCount(c))),s+=u.attrs.rowspan-1}else{var d=null==a?gs(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,p=r.positionAt(s,n,i);e.insert(e.mapping.map(o+p),d.createAndFill())}}return e}function tl(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(el(e.tr,n,n.left))}return!0}function nl(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(el(e.tr,n,n.right))}return!0}function rl(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=e.mapping.maps.length,s=0;s<r.height;){var l=s*r.width+n,c=r.map[l],u=o.nodeAt(c);if(n>0&&r.map[l-1]==c||n<r.width-1&&r.map[l+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(i+c),null,Ts(u.attrs,n-r.colCount(c)));else{var d=e.mapping.slice(a).map(i+c);e.delete(d,d+u.nodeSize)}s+=u.attrs.rowspan}}function ol(e,t){if(!ks(e))return!1;if(t){var n=Qs(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;rl(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ps.get(n.table);t(r)}return!0}function il(e,t,n){for(var r=gs(t.type.schema).header_cell,o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0}function al(e,t,n){for(var r=t.map,o=t.tableStart,i=t.table,a=o,s=0;s<n;s++)a+=i.child(s).nodeSize;var l=[],c=n>0?-1:0;il(r,i,n+c)&&(c=0==n||n==r.height?null:0);for(var u=0,d=r.width*n;u<r.width;u++,d++)if(n>0&&n<r.height&&r.map[d]==r.map[d-r.width]){var p=r.map[d],f=i.nodeAt(p).attrs;e.setNodeMarkup(o+p,null,Ns(f,"rowspan",f.rowspan+1)),u+=f.colspan-1}else{var h=null==c?gs(i.type.schema).cell:i.nodeAt(r.map[d+c*r.width]).type;l.push(h.createAndFill())}return e.insert(a,gs(i.type.schema).row.create(null,l)),e}function sl(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(al(e.tr,n,n.top))}return!0}function ll(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(al(e.tr,n,n.bottom))}return!0}function cl(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=0,s=0;s<n;s++)a+=o.child(s).nodeSize;var l=a+o.child(n).nodeSize,c=e.mapping.maps.length;e.delete(a+i,l+i);for(var u=0,d=n*r.width;u<r.width;u++,d++){var p=r.map[d];if(n>0&&p==r.map[d-r.width]){var f=o.nodeAt(p).attrs;e.setNodeMarkup(e.mapping.slice(c).map(p+i),null,Ns(f,"rowspan",f.rowspan-1)),u+=f.colspan-1}else if(n<r.width&&p==r.map[d+r.width]){var h=o.nodeAt(p),m=h.type.create(Ns(h.attrs,"rowspan",h.attrs.rowspan-1),h.content),v=r.positionAt(n+1,u,o);e.insert(e.mapping.slice(c).map(i+v),m),u+=h.attrs.colspan-1}}}function ul(e,t){if(!ks(e))return!1;if(t){var n=Qs(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;cl(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ps.get(n.table);t(r)}return!0}function dl(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function pl(e,t){var n=e.selection;if(!(n instanceof Ps)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=Qs(e),o=r.map;if(function(e,t){for(var n=e.width,r=e.height,o=e.map,i=t.top*n+t.left,a=i,s=(t.bottom-1)*n+t.left,l=i+(t.right-t.left-1),c=t.top;c<t.bottom;c++){if(t.left>0&&o[a]==o[a-1]||t.right<n&&o[l]==o[l+1])return!0;a+=n,l+=n}for(var u=t.left;u<t.right;u++){if(t.top>0&&o[i]==o[i-n]||t.bottom<r&&o[s]==o[s+n])return!0;i++,s++}return!1}(o,r))return!1;if(t){for(var a,s,l=e.tr,c={},u=i.empty,d=r.top;d<r.bottom;d++)for(var p=r.left;p<r.right;p++){var f=o.map[d*o.width+p],h=r.table.nodeAt(f);if(!c[f])if(c[f]=!0,null==a)a=f,s=h;else{dl(h)||(u=u.append(h.content));var m=l.mapping.map(f+r.tableStart);l.delete(m,m+h.nodeSize)}}if(l.setNodeMarkup(a+r.tableStart,null,Ns(Ms(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),"rowspan",r.bottom-r.top)),u.size){var v=a+1+s.content.size,g=dl(s)?a+1:v;l.replaceWith(g+r.tableStart,v+r.tableStart,u)}l.setSelection(new Ps(l.doc.resolve(a+r.tableStart))),t(l)}return!0}function fl(e,t){var n=gs(e.schema);return hl((function(e){var t=e.node;return n[t.type.spec.tableRole]}))(e,t)}function hl(e){return function(t,n){var r,o,i=t.selection;if(i instanceof Ps){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(!(r=function(e){for(var t=e.depth;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=bs(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=Ns(a,"rowspan",1)),a.colspan>1&&(a=Ns(a,"colspan",1));for(var c,u=Qs(t),d=t.tr,p=0;p<u.right-u.left;p++)s.push(l?Ns(a,"colwidth",l&&l[p]?[l[p]]:null):a);for(var f=u.top;f<u.bottom;f++){var h=u.map.positionAt(f,u.left,u.table);f==u.top&&(h+=r.nodeSize);for(var m=u.left,v=0;m<u.right;m++,v++)m==u.left&&f==u.top||d.insert(c=d.mapping.map(h+u.tableStart,1),e({node:r,row:f,col:m}).createAndFill(s[v]))}d.setNodeMarkup(o,e({node:r,row:u.top,col:u.left}),s[0]),i instanceof Ps&&d.setSelection(new Ps(d.doc.resolve(i.$anchorCell.pos),c&&d.doc.resolve(c))),n(d)}return!0}}function ml(e,t){return function(n,r){if(!ks(n))return!1;var o=ws(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof Ps?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,Ns(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,Ns(o.nodeAfter.attrs,e,t)),r(i)}return!0}}function vl(e,t,n){for(var r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1}),o=0;o<r.length;o++){var i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function gl(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!ks(t))return!1;if(n){for(var r=gs(t.schema),o=Qs(t),i=t.tr,a=o.map.cellsInRect("column"==e?new ds(o.left,0,o.right,o.map.height):"row"==e?new ds(0,o.top,o.map.width,o.bottom):o),s=a.map((function(e){return o.table.nodeAt(e)})),l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(0==i.steps.length)for(var c=0;c<a.length;c++)i.setNodeMarkup(o.tableStart+a[c],r.header_cell,s[c].attrs);n(i)}return!0}}(e):function(t,n){if(!ks(t))return!1;if(n){var r=gs(t.schema),o=Qs(t),i=t.tr,a=vl("row",o,r),s=vl("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new ds(0,l,1,o.map.height):"row"==e?new ds(l,0,o.map.width,1):o,u="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}var yl=gl("row",{useDeprecatedLogic:!0}),bl=gl("column",{useDeprecatedLogic:!0}),kl=gl("cell",{useDeprecatedLogic:!0});function wl(e){return function(t,n){if(!ks(t))return!1;var r=function(e,t){if(t<0){var n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(var r=e.index(-1)-1,o=e.before();r>=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;for(var a=e.node(-1),s=e.indexAfter(-1),l=e.after();s<a.childCount;s++){var c=a.child(s);if(c.childCount)return l+1;l+=c.nodeSize}}}(ws(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(ot.between(o,Os(o))).scrollIntoView())}return!0}}}function Cl(e,t){for(var n=e.selection.$anchor,r=n.depth;r>0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var Ol=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xl(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function xl(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,c=e.firstChild,u=0,d=0;u<c.childCount;u++)for(var p=c.child(u).attrs,f=p.colspan,h=p.colwidth,m=0;m<f;m++,d++){var v=o==d?i:h&&h[m],g=v?v+"px":"";a+=v||r,v||(s=!1),l?(l.style.width!=g&&(l.style.width=g),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;l;){var y=l.nextSibling;l.parentNode.removeChild(l),l=y}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}Ol.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,xl(e,this.colgroup,this.table,this.cellMinWidth),!0)},Ol.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var Sl=new Ot("tableColumnResizing");function El(e){void 0===e&&(e={});var t=e.handleWidth;void 0===t&&(t=5);var n=e.cellMinWidth;void 0===n&&(n=25);var r=e.View;void 0===r&&(r=Ol);var o=e.lastColumnResizable;return void 0===o&&(o=!0),new kt({key:Sl,state:{init:function(e,t){return this.spec.props.nodeViews[gs(t.schema).table.name]=function(e,t){return new r(e,n,t)},new Il(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Sl.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=Sl.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var l=a.getBoundingClientRect(),c=l.left,u=l.right;t.clientX-c<=n?s=Nl(e,t,"left"):u-t.clientX<=n&&(s=Nl(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var d=e.state.doc.resolve(s),p=d.node(-1),f=ps.get(p),h=d.start(-1);if(f.colCount(d.pos-h)+d.nodeAfter.attrs.colspan-1==f.width-1)return}Ml(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=Sl.getState(e.state);t.activeHandle>-1&&!t.dragging&&Ml(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=Sl.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=r;if(o)for(var c=0;c<r;c++)o[c]&&(s-=o[c],l--);return s/l}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);var r=Sl.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=ps.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr,c=0;c<i.height;c++){var u=c*i.width+s;if(!c||i.map[u]!=i.map[u-i.width]){var d=i.map[u],p=o.nodeAt(d).attrs,f=1==p.colspan?0:s-i.colCount(d);if(!p.colwidth||p.colwidth[f]!=n){var h=p.colwidth?p.colwidth.slice():Dl(p.colspan);h[f]=n,l.setNodeMarkup(a+d,null,Ns(p,"colwidth",h))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,Tl(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Sl,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=Sl.getState(e.state),o=Tl(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ps.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;xl(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(Sl,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=Sl.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=ps.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var c=s+l*i.width-1;if(!(s!=i.width&&i.map[c]==i.map[c+1]||0!=l&&i.map[c-1]==i.map[c-1-i.width])){var u=i.map[c],d=a+u+o.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(Fa.widget(d,p))}}return Va.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})}var Il=function(e,t){this.activeHandle=e,this.dragging=t};function Nl(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=bs(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=ps.get(i.node(-1)),s=i.start(-1),l=a.map.indexOf(i.pos-s);return l%a.width==0?-1:s+a.map[l-1]}function Tl(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Ml(e,t){e.dispatch(e.state.tr.setMeta(Sl,{setHandle:t}))}function Dl(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function Pl(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;return void 0===t&&(t=!1),new kt({key:ys,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(ys);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:js,handleDOMEvents:{mousedown:Us},createSelectionBetween:function(e){if(null!=ys.getState(e.state))return e.state.selection},handleTripleClick:$s,handleKeyDown:Bs,handlePaste:qs},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof at&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=Ps.create(a,i.from);else if("row"==o){var s=a.resolve(i.from+1);r=Ps.rowSelection(s,s)}else if(!n){var l=ps.get(i.node),c=i.from+1,u=c+l.map[l.width*l.height-1];r=Ps.create(a,c+1,u)}}else i instanceof ot&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos<t.pos-6)return!1;for(var r=t.pos,o=n.pos,i=t.depth;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(var a=n.depth;a>=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(i)?r=ot.create(a,i.from):i instanceof ot&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var l=o.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;break}}return t!==n&&0===o.parentOffset}(i)&&(r=ot.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,Zs(r,n),t)}})}Il.prototype.apply=function(e){var t=this,n=e.getMeta(Sl);if(n&&null!=n.setHandle)return new Il(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Il(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);Cs(e.doc.resolve(r))||(r=null),t=new Il(r,t.dragging)}return t};var _l=["blockquote",0],jl=["hr"],Rl=["pre",["code",0]],Al=["ol",0],Fl=["ul",0],zl=["li",0],Ll=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},Bl=function(e){var t={};return e.forEach((function(e){t[e]={default:null}})),t},Vl=function(){return Bl(["style","class","id"])},Hl=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},Kl=function(e,t){void 0===t&&(t=[]);var n={},r=function(r){r&&null!==e[r]&&!t.find((function(e){return e===r}))&&(n[r]=e[r])};for(var o in e)r(o);return n},Wl=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},$l=Ft({link:{attrs:Ft({},Vl(),{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:Ll}],toDOM:function(e){return["a",Kl(e.attrs),0]}}},Wl("strong"),Wl("b"),Wl("em"),Wl("i"),Wl("u"),Wl("del"),Wl("sub"),Wl("sup"),Wl("code"),{style:{attrs:Ft({},Vl()),parseDOM:[{tag:"span",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["span",Kl(e.attrs),0]:["span",0]}}}),ql=function(e){var t;return(t={})[e]={default:null,getFromDOM:function(t){return t.getAttribute(e)},setDOMAttr:function(t,n){n[e]=t}},t},Ul=Ft({},ql("style"),ql("class"),ql("id"),ql("headers")),Gl={doc:{content:"colgroup*"},col:{attrs:Bl(["id","class","style","span"]),parseDOM:[{getAttrs:Ll,tag:"col"}],toDOM:function(e){return["col",e.attrs]}},colgroup:{attrs:Bl(["id","class","style","span"]),content:"col*",parseDOM:[{getAttrs:Ll,tag:"colgroup"}],toDOM:function(e){return["colgroup",e.attrs,0]}},text:{inline:!0,group:"inline"}},Xl=new Z({nodes:Gl,marks:{}}),Jl=function(e){var t=_t(Dt(e),Xl,{preserveWhitespace:!1});return Pt(t).firstChild},Yl=vs({tableGroup:"block",cellContent:"block+",cellAttributes:Ul});Yl.table_row.attrs=Ft({},Yl.table_row.attrs,Bl([xt,"style","class","id"])),Yl.table_row.toDOM=function(e){return["tr",Kl(e.attrs),0]},Yl.table_row.parseDOM=[{tag:"tr",getAttrs:Ll}],Yl.table.attrs=Ft({},Yl.table.attrs,Bl(["style","class","id",St,Et])),Yl.table.toDOM=function(e){var t=Hl(e.attrs)?Kl(e.attrs,[St,Et]):{},n=null;if(e.attrs[St]&&!function(e){for(var t=!1,n=e.child(0),r=0;r<n.childCount;r++){if(n.child(r).attrs.colwidth){t=!0;break}}return t}(e)){var r=Jl(e.attrs[St]);if(r){var o=Array.from(r.children).map((function(e){return["col",Ll(e)]}));n=["colgroup",Ll(r)].concat(o)}}return n?["table",t,n,["tbody",0]]:["table",t,["tbody",0]]},Yl.table.parseDOM=[{tag:"table",getAttrs:function(e){var t=Ll(e),n=Array.from(e.childNodes).find((function(e){return"COLGROUP"===e.nodeName}));return n&&(t[St]=n.outerHTML),t}}];var Zl=Ft({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:Ft({},Vl()),parseDOM:[{tag:"p",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["p",Kl(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:Ft({},Vl()),parseDOM:[{tag:"div",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["div",Kl(e.attrs),0]:["div",0]}},blockquote:{attrs:Ft({},Vl()),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["blockquote",Kl(e.attrs),0]:_l}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return jl}},heading:{attrs:Ft({},Vl(),{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return Ft({},Ll(e),{level:1})}},{tag:"h2",getAttrs:function(e){return Ft({},Ll(e),{level:2})}},{tag:"h3",getAttrs:function(e){return Ft({},Ll(e),{level:3})}},{tag:"h4",getAttrs:function(e){return Ft({},Ll(e),{level:4})}},{tag:"h5",getAttrs:function(e){return Ft({},Ll(e),{level:5})}},{tag:"h6",getAttrs:function(e){return Ft({},Ll(e),{level:6})}}],toDOM:function(e){return Hl(e.attrs,"level")?["h"+e.attrs.level,Kl(e.attrs,["level"]),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return Rl}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:Ft({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},Vl()),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["img",Kl(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:Ft({},Vl()),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["br",Kl(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:Ft({},Vl(),{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return Ft({},Ll(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?Hl(e.attrs,"order")?["ol",Kl(e.attrs,["order"]),0]:Al:["ol",Ft({},Kl(e.attrs,["order"]),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:Ft({},Vl()),parseDOM:[{tag:"ul",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["ul",Kl(e.attrs),0]:Fl}},list_item:{content:"(paragraph | heading) block*",attrs:Ft({},Vl()),parseDOM:[{tag:"li",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["li",Kl(e.attrs),0]:zl},defining:!0}},Yl),Ql=function(){};Ql.prototype.append=function(e){return e.length?(e=Ql.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Ql.prototype.prepend=function(e){return e.length?Ql.from(e).append(this):this},Ql.prototype.appendInner=function(e){return new tc(this,e)},Ql.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Ql.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Ql.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Ql.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Ql.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},Ql.from=function(e){return e instanceof Ql?e:e&&e.length?new ec(e):Ql.empty};var ec=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Ql);Ql.empty=new ec([]);var tc=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(Ql),nc=Ql,rc=function(e,t){this.items=e,this.eventCount=t};rc.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,s,l=e.tr,c=[],u=[];return this.items.forEach((function(e,t){if(!e.step)return r||(r=n.remapping(i,t+1),o=r.maps.length),o--,void u.push(e);if(r){u.push(new oc(e.map));var d,p=e.step.map(r.slice(o));p&&l.maybeStep(p).doc&&(d=l.mapping.maps[l.mapping.maps.length-1],c.push(new oc(d,null,null,c.length+u.length))),o--,d&&r.appendMap(d,o)}else l.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,s=new rc(n.items.slice(0,i).append(u.reverse().concat(c)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:l,selection:a}},rc.prototype.addTransform=function(e,t,n,r){for(var o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,l=0;l<e.steps.length;l++){var c,u=e.steps[l].invert(e.docs[l]),d=new oc(e.mapping.maps[l],u,t);(c=s&&s.merge(d))&&(d=c,l?o.pop():a=a.slice(0,a.length-1)),o.push(d),t&&(i++,t=null),r||(s=d)}var p,f,h,m=i-n.depth;return m>ac&&(f=m,(p=a).forEach((function(e,t){if(e.selection&&0==f--)return h=t,!1})),a=p.slice(h),i-=m),new rc(a.append(o),i)},rc.prototype.remapping=function(e,t){var n=new ye;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,o)}),e,t),n},rc.prototype.addMaps=function(e){return 0==this.eventCount?this:new rc(this.items.append(e.map((function(e){return new oc(e)}))),this.eventCount)},rc.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach((function(e){e.selection&&a--}),r);var s=t;this.items.forEach((function(t){var r=o.getMirror(--s);if(null!=r){i=Math.min(i,r);var l=o.maps[r];if(t.step){var c=e.steps[r].invert(e.docs[r]),u=t.selection&&t.selection.map(o.slice(s+1,r));u&&a++,n.push(new oc(l,c,u))}else n.push(new oc(l))}}),r);for(var l=[],c=t;c<i;c++)l.push(new oc(o.maps[c]));var u=this.items.slice(0,r).append(l).append(n),d=new rc(u,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d},rc.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},rc.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach((function(i,a){if(a>=e)r.push(i),i.selection&&o++;else if(i.step){var s=i.step.map(t.slice(n)),l=s&&s.getMap();if(n--,l&&t.appendMap(l,n),s){var c=i.selection&&i.selection.map(t.slice(n));c&&o++;var u,d=new oc(l.invert(),s,c),p=r.length-1;(u=r.length&&r[p].merge(d))?r[p]=u:r.push(d)}}else i.map&&n--}),this.items.length,0),new rc(nc.from(r.reverse()),o)},rc.empty=new rc(nc.empty,0);var oc=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};oc.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new oc(t.getMap().invert(),t,this.selection)}};var ic=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r},ac=20;function sc(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function lc(e,t){if(!e)return null;for(var n=[],r=0;r<e.length;r+=2){var o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function cc(e,t,n,r){var o=pc(t),i=hc.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(a){var s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),c=new ic(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(hc,{redo:r,historyState:c}).scrollIntoView())}}var uc=!1,dc=null;function pc(e){var t=e.plugins;if(dc!=t){uc=!1,dc=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){uc=!0;break}}return uc}function fc(e){return e.setMeta(mc,!0)}var hc=new Ot("history"),mc=new Ot("closeHistory");function vc(e){return e={depth:e&&e.depth||100,newGroupDelay:e&&e.newGroupDelay||500},new kt({key:hc,state:{init:function(){return new ic(rc.empty,rc.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(hc);if(i)return i.historyState;n.getMeta(mc)&&(e=new ic(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(hc))return a.getMeta(hc).redo?new ic(e.done.addTransform(n,null,r,pc(t)),e.undone,sc(n.mapping.maps[n.steps.length-1]),e.prevTime):new ic(e.done,e.undone.addTransform(n,null,r,pc(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new ic(e.done.rebased(n,o),e.undone.rebased(n,o),lc(e.prevRanges,n.mapping),e.prevTime):new ic(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),lc(e.prevRanges,n.mapping),e.prevTime);var s=0==e.prevTime||!a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,r){for(var o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=a?lc(e.prevRanges,n.mapping):sc(n.mapping.maps[n.steps.length-1]);return new ic(e.done.addTransform(n,s?t.selection.getBookmark():null,r,pc(t)),rc.empty,l,n.time)}(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput:function(e,t){var n="historyUndo"==t.inputType?gc(e.state,e.dispatch):"historyRedo"==t.inputType&&yc(e.state,e.dispatch);return n&&t.preventDefault(),n}}}})}function gc(e,t){var n=hc.getState(e);return!(!n||0==n.done.eventCount)&&(t&&cc(n,e,t,!1),!0)}function yc(e,t){var n=hc.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&cc(n,e,t,!0),!0)}function bc(e){var t=hc.getState(e);return t?t.done.eventCount:0}function kc(e){var t=hc.getState(e);return t?t.undone.eventCount:0}var wc=function(e,t){var n;this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){var i=n;if(t[1]){var a=t[0].lastIndexOf(t[1]);i+=t[0].slice(a+t[1].length);var s=(r+=a)-o;s>0&&(i=t[0].slice(a-s,a)+i,r=o)}return e.tr.insertText(i,r,o)}):t};function Cc(e){var t=e.rules,n=new kt({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return Oc(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&Oc(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function Oc(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r,c=0;c<o.length;c++){var u=o[c].match.exec(l),d=u&&o[c].handler(a,u,t-(u[0].length-r.length),n);if(d)return e.dispatch(d.setMeta(i,{transform:d,from:t,to:n,text:r})),!0}return!1}function xc(e,t){for(var n=e.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){for(var a=e.tr,s=i.transform,l=s.steps.length-1;l>=0;l--)a.step(s.steps[l].invert(s.docs[l]));if(i.text){var c=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else a.delete(i.from,i.to);t(a)}return!0}}return!1}var Sc=new wc(/--$/,"—"),Ec=new wc(/\.\.\.$/,"…"),Ic=new wc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),Nc=new wc(/"$/,"”"),Tc=new wc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),Mc=new wc(/'$/,"’"),Dc=[Ic,Nc,Tc,Mc];function Pc(e,t,n,r){return new wc(e,(function(e,o,i,a){var s=n instanceof Function?n(o):n,l=e.tr.delete(i,a),c=l.doc.resolve(i).blockRange(),u=c&&De(c,t,s);if(!u)return null;l.wrap(c,u);var d=l.doc.resolve(i-1).nodeBefore;return d&&d.type==t&&je(l.doc,i-1)&&(!r||r(o,d))&&l.join(i-1),l}))}function _c(e,t,n){return new wc(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,s):null}))}var jc={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},Rc={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},Ac={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},Fc={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},zc={mark:"sub"},Lc={mark:"sup"},Bc={mark:"link"},Vc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Hc=function(e,t){var n={},r=t&&t.applyToWord||!1;if(n["Mod-z"]=gc,n["Shift-Mod-z"]=yc,n.Backspace=Cr(xc,Gn,Xn,Yn),n.Enter=Cr(ir,lr,cr,dr),Vc||(n["Mod-y"]=yc),e.marks.strong&&(n["Mod-b"]=Yt(fn,Ft({},jc,{applyToWord:r}))),e.marks.em&&(n["Mod-i"]=Yt(fn,Ft({},Rc,{applyToWord:r}))),e.marks.u&&(n["Mod-u"]=Yt(fn,Ft({},Ac,{applyToWord:r}))),e.nodes.hard_break){var o=e.nodes.hard_break,i=Cr(sr,(function(e,t){return t(e.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}));n["Shift-Enter"]=i}return n},Kc=function(e){var t,n={};return e.nodes.list_item&&(n.Enter=(t=e.nodes.list_item,function(e,n){return Bn(t)(e,(function(t){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&t.ensureMarks(r),n(t)}))})),n},Wc=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,$c=function(e){return/^MsoListParagraph/.test(e.className)},qc=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},Uc=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},Gc=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},Xc=function(e,t){var n=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var r=e;r.getAttribute("datalist")?(n.push(e),t.add(n)):$c(r)&&n.length?n.push(e):(n=[],"DIV"===r.nodeName?Xc(r.children,t):"TABLE"===r.nodeName&&Array.from(r.querySelectorAll("td,th")).forEach((function(e){Xc(e.children,t)})))}}))},Jc=function(e){var t,n=e.innerHTML,r=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(n)?{tag:"ul",style:(t=r(qc(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:Gc(r(qc(e)))}:void 0},Yc=function(e){var t,n=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?qc(e):e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r},Zc=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(Wc,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return Xc(t.children,n),n.forEach((function(e){return function(e){var t,n,r,o,i,a,s,l,c,u,d,p,f,h=-1,m={};for(l=0;l<e.length;l++){var v=(f={datalist:(c=e[l]).getAttribute("datalist"),datalevel:c.getAttribute("datalevel")}).datalist,g=Jc(c);if(u=g&&g.tag){if(d=f.datalevel||parseFloat(c.style.marginLeft||0),f.datalevel||c.style.marginLeft){var y=u+v;m[d]||(m[d]={}),(!n||n<0)&&(n=d,r=v,o=(s=e.filter((function(e){return e.getAttribute("datalist")===String(r)})))[s.length-1],a=Uc(u,g&&g.style),c.parentNode.insertBefore(a,c),h=d,m[d][y]=a),i=o===c,p=m[d][y],(d>h||!p)&&(p=Uc(u,g&&g.style),m[d][y]=p,t.appendChild(p)),t=Yc(c),p.appendChild(t),i?n=h=-1:h=d}}else!t||i&&!$c(c)||(c.style.marginLeft&&(c.style.marginLeft=""),c.style.marginLeft&&(c.style.margin=""),t.appendChild(c))}}(e)})),t.innerHTML},Qc=function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},eu=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},tu=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},nu=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},ru=function(e){/^Mso/.test(e.value)&&nu(e)},ou=/\s*;\s*/,iu=/\s*:\s*/,au=function(e){var t,n,r=e.value.split(ou).filter((function(e){return Boolean(e)})),o=e.ownerElement.style,i="";r.forEach((function(e){var r;r=e.split(iu),t=r[0],n=r[1],void 0!==o[t]&&(i+=t+": "+n+"; ")})),(i=i.trim())?e.value=i:nu(e)},su=function(e,t){var n=e;if(t.convertMsLists&&(n=Zc(n)),t.stripTags&&(n=tu(n,t.stripTags)),t.attributes){var r=document.createElement("div");r.innerHTML=n,Array.from(r.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)})),n=r.innerHTML}return n};function lu(e){for(var t=e.length,n=new Array(t/2),r=0;r<t;r+=2)n[r]=String.fromCharCode(parseInt(e.substring(r,r+2),16));return btoa(n.join(""))}var cu=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,uu=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,du=new RegExp("(?:("+uu.source+"))([\\da-fA-F\\s]+)\\}","g"),pu=/[^\da-fA-F]/g,fu=/file:\/[^'"]+\.(jpg|png|gif)/i,hu=/\\(png|jpeg)blip\\/,mu=function(e,t){var n=e.match(cu);if(!n||-1===t.types.indexOf("text/rtf"))return e;var r=t.getData("text/rtf"),o=[],i=r.match(du);if(!r||!i)return e;for(var a=0,s=i;a<s.length;a++){var l=s[a],c=hu.exec(l);if(c){var u=l.replace(uu,"").replace(pu,"");o.push("data:image/"+c[1]+";base64,"+lu(u))}}return n.length!==o.length?e:e.replace(cu,(function(e){var t=o.shift()||"";return e.replace(fu,t)}))},vu=function(e,t,n,r,o){var i,a,s,l,c,u,d=[],p=[],f=t.matchCase,h=t.matchWord,m=t.useRegExp,v=t.text;if(m&&(/^\\$/.test(v)||/[^\\]\\$/.test(v))&&(v=v.substring(0,v.length-1)),!v)return d;var g=f?"g":"gi",y=m?new RegExp(v,g):Ou(v,g);return e.nodesBetween(n,r,(function(t,f,m){if(o(d))return!1;t.inlineContent&&f+t.content.size>=n&&(p.length=0,t.nodesBetween(0,t.content.size,(function(t,m,v,g){if(o(d))return!1;var b=1+f+m;if(t.isText&&b+t.nodeSize>=n){if(c=t.text||"",u=v.childCount-1>=g+1&&v.child(g+1),p.push(n<=b?{text:c,start:b}:{text:c.slice(n-b),start:n}),u&&u.isText)return;for(a=p.map((function(e){return e.text})).join(""),i=y.exec(a);null!==i&&(s=p[0].start+i.index,l=s+i[0].length,n<=s&&r>=l&&Cu(i,h)&&d.push(ot.create(e,s,l)),!o(d));)i=y.exec(a)}else p.length=0})))})),d},gu=function(e,t){var n=t.backward,r=t.matchCyclic,o=zt(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return e.length>0},a=e.doc,s=e.selection,l=[];return n?!(l=vu(a,o,0,s.from,i)).length&&r&&(l=vu(a,o,s.from,a.content.size,i)):!(l=vu(a,o,s.to,a.content.size,i)).length&&r&&(l=vu(a,o,0,s.to,i)),l.length?l[l.length-1]:null},yu=function(e,t){return vu(e,t,0,e.content.size,(function(){return!1}))},bu=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(ot.create(n.doc,r,r+t.length)),n},ku=function(e,t,n){var r=yu(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;i>=0;i--)o.insertText(t,r[i].from,r[i].to);return o},wu=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,Cu=function(e,t){if(t){if(!0===t){var n=e.input,r=n.charAt(e.index-1),o=n.charAt(e.index+e[0].length);return wu.test(r)&&wu.test(o)}return t(e)}return!0},Ou=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)};function xu(e){var t={class:"k-placeholder","data-placeholder":e};return new kt({key:new Ot("placeholder"),props:{decorations:function(e){var n=e.doc,r=n.content.firstChild;if(!(0===n.childCount||1===n.childCount&&r.inlineContent&&0===r.childCount))return Va.empty;var o=[];return n.descendants((function(e,n){o.push(Fa.node(n,n+e.nodeSize,t))})),Va.create(n,o)}}})}var Su=/\s+/g,Eu=/text-align/,Iu=function(){return new kt({key:new Ot("spaces-fix"),props:{decorations:function(e){var t,n,r,o,i=[],a=e.doc;return a.nodesBetween(0,a.content.size,(function(e,a,s){if(e.type.isText&&function(e){return Eu.test(e&&e.attrs&&e.attrs.style||"")}(s))for(n=Su.exec(e.text||"");null!==n;){if(t=a+n.index,r=n[0].length,n.index+r<n.input.length)for(o=0;o<=r-1;o+=2)i.push(Fa.inline(t+o,t+o+1,{style:"white-space: normal"}));n=Su.exec(e.text||"")}})),Va.create(a,i)}}})},Nu=new Ot("highlight");function Tu(e){return void 0===e&&(e=Nu),new kt({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return Fa.inline(e.from,e.to,e.attrs)}));return Va.create(e.doc,t)}}})}var Mu={southeast:{x:1,y:1},east:{x:1,y:0},south:{x:0,y:1},north:{x:0,y:-1},west:{x:-1,y:0},southwest:{x:-1,y:1},northwest:{x:-1,y:-1},northeast:{x:1,y:-1}},Du=Object.keys(Mu),Pu=new Ot("image-resize"),_u=function(e,t,n){e.style[t]=n+"px"},ju=/[^\-]width:|[^\-]height:/,Ru=/^.+$/,Au=function(){function e(e,t,n,r){this.activeHandle=e,this.dragging=t,this.rect=n,this.nodePosition=r}return e.prototype.apply=function(t){var n=t.getMeta(Pu);return n?new e(n.activeHandle,n.setDragging,n.rect,n.nodePosition):this},e}(),Fu=function(e,t,n){var r=t.target.getAttribute("data-dir-image-resize");if(!r)return!1;var o=Pu.getState(e.state);t.preventDefault();var i=e.state.tr;function a(t){!function(e,t,n){var r=Pu.getState(e.state),o=r.rect,i=r.dragging,a=r.nodePosition,s=r.activeHandle;if(i&&o){var l=e.nodeDOM(a),c=Mu[s],u=(t.clientX-i.startX)*c.x,d=(t.clientY-i.startY)*c.y,p=c.x?u+l.width:o.width,f=c.y?d+l.height:o.height;if(n.lockRatio&&c.x&&c.y){var h=Math.min(p/l.width,f/l.height),m=l.width*h,v=l.height*h;i.startX=t.clientX-(p-m)*c.x,i.startY=t.clientY-(f-v)*c.y,p=m,f=v}else i.startX=c.x?t.clientX:i.startX,i.startY=c.y?t.clientY:i.startY;_u(l,"width",p),_u(l,"height",f),o.top=l.offsetTop,o.left=l.offsetLeft,o.width=l.offsetWidth,o.height=l.offsetHeight;var g=l.nextElementSibling;g.style.width=o.width+"px",g.style.height=o.height+"px",g.style.top=o.top+"px",g.style.left=o.left+"px"}}(e,t,n)}return i.setMeta(Pu,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:r,rect:o.rect,nodePosition:o.nodePosition}),i.setMeta("addToHistory",!1),e.dispatch(i),t.view.addEventListener("mouseup",(function t(n){n.view.removeEventListener("mouseup",t),n.view.removeEventListener("mousemove",a),function(e){var t=Pu.getState(e.state),n=t.rect,r=t.dragging,o=t.nodePosition;if(r&&n){var i=e.state.selection;if(i instanceof at){var a=i.node.attrs,s=n.width,l=n.height,c=void 0;if(ju.test(a.style||"")){var u=Lt(a.style,{style:"width",value:Ru,newValue:s+"px"}),d=Lt(u.style||"",{style:"height",value:Ru,newValue:l+"px"}).style;c=Ft({},a,{style:d})}else c=Ft({},a,{width:s,height:l});var p=i.node.type.createAndFill(c);if(p){var f=e.state.tr;f.replaceWith(o,o+1,p),f.setSelection(at.create(f.doc,o)),f.setMeta("commandName","image-resize"),f.setMeta("args",c),f.setMeta(Pu,{setDragging:null,activeHandle:null,rect:n,nodePosition:o}),e.dispatch(f)}}}}(e)})),t.view.addEventListener("mousemove",a),!0},zu=function(e){return void 0===e&&(e={node:"image",lockRatio:!0}),new kt({key:Pu,view:function(t){return{resize:function(){Pu.getState(t.state).rect&&t.dispatch(t.state.tr.setMeta("resize",!0))},get window(){return t.dom.ownerDocument&&t.dom.ownerDocument.defaultView},attachResize:function(){var e=this.window;e&&(e.removeEventListener("resize",this.resize),e.addEventListener("resize",this.resize))},removeResize:function(){var e=this.window;e&&e.removeEventListener("resize",this.resize)},update:function(t,n){var r=t.state,o=r.selection,i=r.schema.nodes[e.node],a=Pu.getState(r),s=a.rect;if(o instanceof at&&i===o.node.type){var l=t.nodeDOM(o.from),c={top:l.offsetTop,left:l.offsetLeft,width:l.offsetWidth,height:l.offsetHeight};if(!n.selection.eq(o)||s&&(s.width!==c.width||s.height!==c.height||s.top!==c.top||s.left!==c.left)){var u=r.tr;u.setMeta(Pu,{rect:c,nodePosition:o.from}),t.dispatch(u),this.attachResize()}}else s&&(a.rect=null,a.nodePosition=-1)},destroy:function(){this.removeResize()}}},state:{init:function(){return new Au("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(t,n){return Fu(t,n,e)}},decorations:function(t){var n=t.selection,r=t.schema.nodes[e.node],o=Pu.getState(t).rect;if(o&&n instanceof at&&r===n.node.type){var i=document.createElement("div");i.className="k-editor-resize-handles-wrapper",i.style.width=o.width+"px",i.style.height=o.height+"px",i.style.top=o.top+"px",i.style.left=o.left+"px";for(var a=0;a<Du.length;a++){var s=document.createElement("div");s.className="k-editor-resize-handle "+Du[a],s.setAttribute("data-dir-image-resize",Du[a]),i.appendChild(s)}return Va.create(t.doc,[Fa.widget(t.selection.from+1,i)])}return Va.empty}}})},Lu=new Ot("caret-color");function Bu(){return new kt({key:Lu,props:{decorations:function(e){var t=e.doc,n=e.selection,r=e.storedMarks;if(!n.empty||!r)return Va.empty;var o=on((r||[]).find((function(e){return"style"===e.type.name})),{name:"color",value:/^.+$/});if(!o)return Va.empty;var i=n.$anchor.parent,a=[];return t.descendants((function(e,t){e.eq(i)&&a.push(Fa.node(t,t+e.nodeSize,{style:"caret-color: "+o}))})),Va.create(t,a)}}})}var Vu=function(){function e(e,t){this.node=e,this.view=t,this.dom=document.createElement("div"),this.dom.className="k-editor-resize-wrap-element",this.table=this.dom.appendChild(document.createElement("table")),e.attrs[St]&&this.renderColgroup(e.attrs[St]);var n=this.table.appendChild(document.createElement("tbody"));this.setAttributes(this.table,e.attrs),this.resizeHandles=Du.map((function(e){var t=document.createElement("span");return t.className="k-editor-resize-handle "+e,t.setAttribute("data-dir-table-resize",e),t})),this.contentDOM=n}return e.prototype.update=function(e){var t=this;if(e.type!==this.node.type)return!1;var n=this.node;return this.node=e,e.attrs[Et]?this.resizeHandles.forEach((function(e){t.dom.appendChild(e)})):Array.from(this.dom.children).filter((function(e){return e.classList.contains("k-editor-resize-handle")})).forEach((function(e){return e.remove()})),this.setAttributes(this.table,e.attrs),n.attrs[St]!==e.attrs[St]&&this.renderColgroup(e.attrs[St]),!0},e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&(e.target===this.table||e.target.firstChild===this.table||this.colgroup&&this.colgroup.contains(e.target))},e.prototype.destroy=function(){this.node=void 0,this.view=void 0,this.table=void 0,this.colgroup=void 0,this.resizeHandles=void 0},e.prototype.renderColgroup=function(e){this.table&&this.table.firstChild&&"COLGROUP"===this.table.firstChild.nodeName&&this.table.removeChild(this.table.firstChild),e&&(this.colgroup=Jl(e),this.table.insertBefore(this.colgroup,this.table.firstChild))},e.prototype.setAttributes=function(e,t){var n=[St,Et];for(var r in t)if(r&&-1===n.indexOf(r)){var o=e.getAttribute(r),i=t[r];i&&i!==o?e.setAttribute(r,i):i||e.removeAttribute(r)}},e}(),Hu=/^.+$/,Ku=function(e){return(e||"").split(/\s*;\s*/).filter(Boolean).map((function(e){var t,n=e.split(/\s*:\s*/);return(t={})[n[0]]=n[1],t})).reduce((function(e,t){return Ft({},e,t)}),{})};function Wu(e,t,n){var r;if(new RegExp("[^-]?"+t+":").test(e.style||"")){var o=Lt(e.style||"",{style:t,value:Hu,newValue:n}).style;r=Ft({},e,{style:o})}else r=e.style?Ft({},e,{style:e.style.replace(/;$/,"")+"; "+t+": "+n+";"}):Ft({},e,{style:t+": "+n+";"});return r}var $u=new Ot("table-resize"),qu=new Ot("table-column-resizing"),Uu=new Ot("table-row-resizing");function Gu(e,t){var n=!1;return n=(n=(n=n||e!==$u&&Boolean($u.get(t))&&$u.getState(t).dragging)||e!==qu&&Boolean(qu.get(t))&&qu.getState(t).dragging)||e!==Uu&&Boolean(Uu.get(t))&&Uu.getState(t).dragging}function Xu(e,t){var n=!1;return n=(n=n||e!==qu&&Boolean(qu.get(t))&&qu.getState(t).activeHandle>-1)||e!==Uu&&Boolean(Uu.get(t))&&Uu.getState(t).activeHandle>-1}function Ju(e){return e&&e.firstChild&&"TABLE"===e.firstChild.nodeName?e.firstChild:e}function Yu(e){for(;e&&"TD"!==e.nodeName&&"TH"!==e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}function Zu(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{node:r,depth:n}}return null}function Qu(){var e=Vu;return new kt({key:qu,state:{init:function(t,n){return this.spec.props.nodeViews[gs(n.schema).table.name]=function(t,n){return new e(t,n)},new ed(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Xu(qu,e)?null:qu.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,t){return Gu(qu,e.state)||function(e,t,n){var r=qu.getState(e.state);if(!r.dragging){var o=Yu(t.target),i=-1;if(o){var a=function(e){var t=e.parentNode;return{cellIndex:e.cellIndex,rowIndex:t.rowIndex}}(o),s=o.getBoundingClientRect(),l=s.left,c=s.right;Math.abs(t.clientX-l)<=n&&a.cellIndex>0?(a.cellIndex--,i=td(e,t,a)):c-t.clientX>0&&c-t.clientX<=n&&(i=td(e,t,a))}i!==r.activeHandle&&rd(e,i)}}(e,t,5),!1},mouseleave:function(e){return function(e){var t=qu.getState(e.state);t.activeHandle>-1&&!t.dragging&&rd(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t,n){var r,o=qu.getState(e.state);if(-1===o.activeHandle||o.dragging)return!1;for(var i=e.state.doc.resolve(o.activeHandle),a=i.parent,s=i.index(),l=0,c=0;c<=s;c++)l+=a.child(c).attrs.colspan;var u,d,p=i.node(i.depth-1),f=e.domAtPos(o.activeHandle),h=f.node.childNodes[f.offset].closest("table");if(p.attrs[St]){var m=h.firstChild;(u=m.children[l-1]).style.width||(u.style.width=u.offsetWidth+"px")}else{var v=0;for(c=0;c<a.childCount;c++)v+=a.child(c).attrs.colspan;m=document.createElement("colgroup");var g=new Array(v);for(c=0;c<v;c++)g[c]=document.createElement("col"),m.appendChild(g[c]);h.insertBefore(m,h.firstChild),(u=g[s]).style.width=u.offsetWidth+"px",d=Ft({},p.attrs,((r={})[St]="<colgroup>"+g.reduce((function(e,t){return e+t.outerHTML}),"")+"</colgroup>",r))}var y=parseFloat(u.style.width),b=e.state.tr.setMeta(qu,{setDragging:{startX:t.clientX,startWidth:y}});if(!h.style.width){var k=Array.from(u.parentNode.children).map((function(e){return e.style.width}));if(k.every(Boolean)){var w=k.reduce((function(e,t){return e+parseFloat(t)}),0);d=Wu(d||p.attrs,"width",w+"px")}}if(d){var C=i.posAtIndex(0,i.depth-1)-1;b.setNodeMarkup(C,null,d)}function O(t){t.view.removeEventListener("mouseup",O),t.view.removeEventListener("mousemove",x);var r=qu.getState(e.state);if(r.dragging){var o=e.state.tr;!function(e,t,n,r){var o,i=e.state.doc.resolve(n),a=i.node(-1),s=i.start(-1),l=i.posAtIndex(0,i.depth-1)-1,c=e.nodeDOM(s).closest("table"),u=a.attrs;if(a&&u[St]){var d=c.firstChild;u=Ft({},u,((o={})[St]=d.outerHTML,o))}var p=c.style.width;c&&p&&Ku(u.style).width!==p&&(u=Wu(u,"width",p),t.setNodeMarkup(l,null,u))}(e,o,r.activeHandle,nd(r.dragging,t,n)),e.dispatch(o.setMeta(qu,{setDragging:null}))}}function x(t){if(!t.which)return O(t);var r=qu.getState(e.state),o=nd(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ps.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;"TABLE"!==l.nodeName&&(l=l.closest("table"));var c=l,u=c.firstChild,d=Array.from(u.children);if(d[s].style.width=n+"px",c.style.width){var p=d.map((function(e){return e.style.width}));if(p.every(Boolean)){var f=p.reduce((function(e,t){return e+parseFloat(t)}),0);c.style.width=f+"px"}}}(e,r.activeHandle,o)}return e.dispatch(b),t.view.addEventListener("mouseup",O),t.view.addEventListener("mousemove",x),t.preventDefault(),!0}(e,t,25)}},decorations:function(e){if(!Gu(qu,e)){var t=qu.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=ps.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var c=s+l*i.width-1;if(!(s!==i.width&&i.map[c]===i.map[c+1]||0!==l&&i.map[c-1]===i.map[c-1-i.width])){var u=i.map[c],d=a+u+o.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(Fa.widget(d,p))}}return Va.create(e.doc,n)}(e,t.activeHandle)}return Va.empty},nodeViews:{}}})}var ed=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(qu);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1&&t.docChanged){var i=t.mapping.map(r.activeHandle,-1);n=t.doc.resolve(i),Boolean("row"===n.parent.type.spec.tableRole&&n.nodeAfter)||(i=-1),r=new e(i,r.dragging)}return r},e}();function td(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=Zu(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ps.get(s);return a+l.map[l.width*n.rowIndex+n.cellIndex]}function nd(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function rd(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(qu,{setHandle:t}),e.dispatch(n)}var od={southeast:!0,southwest:!0,northwest:!0,northeast:!0},id=Ft({east:!0,west:!0},od),ad=Ft({south:!0,north:!0},od),sd=function(){function e(e,t,n){this.activeHandle=e,this.dragging=t,this.nodePosition=n}return e.prototype.apply=function(t){var n=t.getMeta($u);return n?new e(n.activeHandle,n.setDragging,n.nodePosition):this},e}(),ld=function(e){var t=Array.from(e.firstChild.children).map((function(e){return e.offsetWidth})),n=Array.from(e.rows).map((function(e){return e.offsetHeight})),r=t.reduce((function(e,t){return e+t}),0),o=n.reduce((function(e,t){return e+t}),0),i=e.offsetHeight;return{width:r,height:o,colsWidth:t,rowsHeight:n,offsetWidth:e.offsetWidth,offsetHeight:i}},cd=function(e){var t=$u.getState(e.state),n=t.dragging,r=t.nodePosition,o=t.activeHandle;if(n){var i=e.state.doc.nodeAt(r),a=Ju(e.nodeDOM(r)),s=ld(a);if(i){var l=s.offsetWidth+"px",c=s.offsetHeight+"px",u=e.state.tr,d=i.attrs,p=Ku(d.style);id[o]&&a.style.width&&p.width!==l&&(d=Wu(d,"width",l)),ad[o]&&a.style.height&&p.height!==c&&(d=Wu(d,"height",c)),d=function(e,t,n,r){var o=e.state.doc.nodeAt(n),i=Ju(e.nodeDOM(n)),a=(i.ownerDocument&&i.ownerDocument.defaultView||window).getComputedStyle,s=Array.from(i.rows);o.forEach((function(e,r,o){var i=Ku(e.attrs.style).height;i&&!/px$/.test(i)&&t.setNodeMarkup(n+r+1,null,Wu(e.attrs,"height",a(s[o]).height))}));var l=i.firstChild,c=Array.from(l&&l.children||[]),u=!1;c.forEach((function(e,t){e.style.width&&!/px$/.test(e.style.width)&&(e.style.width=a(c[t]).width,u=!0)}));var d=Ft({},r);return u&&(d[St]=l.outerHTML),d}(e,u,r,d),u.setNodeMarkup(r,null,d),u.setMeta("commandName","node-resize"),u.setMeta("args",d),u.setMeta($u,{setDragging:null,activeHandle:null,nodePosition:r}),e.dispatch(u)}}},ud=function(e,t){var n=t.target.getAttribute("data-dir-table-resize");if(!n)return!1;var r=$u.getState(e.state);t.preventDefault();var o=e.state.tr;o.setMeta($u,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:n,nodePosition:r.nodePosition}),o.setMeta("addToHistory",!1),function(e,t,n){var r=e.state.doc.nodeAt(n),o=Ju(e.nodeDOM(n)),i=ld(o),a=i.width,s=i.height,l=i.colsWidth,c=i.rowsHeight,u=i.offsetWidth,d=i.offsetHeight,p=o.firstChild,f=Array.from(p&&p.children||[]),h=!1;f.forEach((function(e,t){e.style.width&&!/%$/.test(e.style.width)&&(e.style.width=100*l[t]/a+"%",h=!0)}));var m=!1;r.forEach((function(e,r,o){var i=Ku(e.attrs.style).height;i&&!/%$/.test(i)&&(t.setNodeMarkup(n+r+1,null,Wu(e.attrs,"height",100*c[o]/s+"%")),m=!0)}));var v=r.attrs;Ku(v.style).width!==u+"px"&&(v=Wu(v,"width",u+"px")),h&&(v[St]=p.outerHTML),m&&(v=Wu(v,"height",d+"px")),(h||m)&&t.setNodeMarkup(n,null,v)}(e,o,r.nodePosition),e.dispatch(o);var i=t.view||window;function a(t){!function(e,t){var n=$u.getState(e.state),r=n.dragging,o=n.nodePosition,i=n.activeHandle;if(!(o<0)&&r){var a=Ju(e.nodeDOM(o)),s=a.getBoundingClientRect(),l=Mu[i],c=(t.clientX-r.startX)*l.x,u=(t.clientY-r.startY)*l.y,d=(a.ownerDocument&&a.ownerDocument.defaultView||window).getComputedStyle(a),p=/px/.test(d.width)?parseFloat(d.width):a.offsetWidth,f=/px/.test(d.height)?parseFloat(d.height):a.offsetHeight,h=l.x?c+p:s.width,m=l.y?u+f:s.height;r.startX=l.x?t.clientX:r.startX,r.startY=l.y?t.clientY:r.startY,id[i]&&(a.style.width=h+"px"),ad[i]&&(a.style.height=m+"px")}}(e,t)}return i.addEventListener("mouseup",(function t(n){i.removeEventListener("mouseup",t),i.removeEventListener("mousemove",a),cd(e)})),i.addEventListener("mousemove",a),!0},dd=function(){function e(){}return e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&"style"===e.attributeName&&"TR"===e.target.nodeName},e}();function pd(){return new kt({key:Uu,state:{init:function(e,t){return this.spec.props.nodeViews[gs(t.schema).row.name]=function(e,t){return new dd},new fd(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Xu(Uu,e)?null:Uu.getState(e).activeHandle>-1?{class:"resize-cursor-vertical"}:null},handleDOMEvents:{mousemove:function(e,t){return Gu(Uu,e.state)||function(e,t,n){var r=Uu.getState(e.state);if(!r.dragging){var o=Yu(t.target),i=-1;if(o){var a=o.parentNode,s=a.getBoundingClientRect();Math.abs(t.clientY-s.top)<=n&&a.rowIndex>0?i=hd(e,t,a.rowIndex-1):s.bottom-t.clientY>0&&s.bottom-t.clientY<=n&&(i=hd(e,t,a.rowIndex))}i!==r.activeHandle&&md(e,i)}}(e,t,5),!1},mouseleave:function(e){return function(e){var t=Uu.getState(e.state);t.activeHandle>-1&&!t.dragging&&md(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t){var n=Uu.getState(e.state);if(-1===n.activeHandle||n.dragging)return!1;var r=e.state.doc,o=r.resolve(n.activeHandle),i=r.nodeAt(n.activeHandle),a=o.parent,s=Ku(i.attrs.style).height,l=Ku(a.attrs.style).height,c=s?parseFloat(s):0;if(!s){var u=e.nodeDOM(n.activeHandle);c=u.offsetHeight}function d(t){t.view.removeEventListener("mouseup",d),t.view.removeEventListener("mousemove",p);var n=Uu.getState(e.state);if(n.dragging){var r=e.state.tr.setMeta(Uu,{setDragging:null});!function(e,t,n){var r=e.state.doc,o=r.nodeAt(n),i=e.nodeDOM(n),a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height,t.setNodeMarkup(n,null,Wu(o.attrs,"height",i.style.height));var s=i&&i.closest("table"),l=s&&s.style.height;if(l){var c=r.resolve(n),u=c.start(c.depth)-1;t.setNodeMarkup(u,null,Wu(c.parent.attrs,"height",l))}}(e,r,n.activeHandle),e.dispatch(r)}}function p(t){if(!t.which)return d(t);var n=Uu.getState(e.state),r=function(e,t){var n=t.clientY-e.startY;return e.startHeight.rowHeight+n}(n.dragging,t),o=t.clientY-n.dragging.startY;!function(e,t,n,r,o){var i=e.nodeDOM(t);if(i){i.style.height=n+"px";var a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height;var s=i.closest("table"),l=parseFloat(o)+r+"px",c=s&&s.style.height;c&&c!==l&&(s.style.height=parseFloat(o)+r+"px",s.style.height=a.getComputedStyle(s).height)}}(e,n.activeHandle,r,o,l)}return e.dispatch(e.state.tr.setMeta(Uu,{setDragging:{startY:t.clientY,startHeight:{rowHeight:c,tableHeight:l}}})),t.view.addEventListener("mouseup",d),t.view.addEventListener("mousemove",p),t.preventDefault(),!0}(e,t)}},decorations:function(e){if(Gu(Uu,e))return Va.empty;var t=Uu.getState(e);return t.activeHandle>-1?function(e,t){var n=[];if("number"!=typeof t)return Va.empty;for(var r=e.doc.resolve(t),o=r.parent,i=ps.get(o),a=r.index(r.depth),s=r.start(r.depth),l=0;l<i.width;l++){var c=l+a*i.width,u=i.map[c],d=o.nodeAt(u),p=s+u+(d?d.nodeSize:0)-1,f=document.createElement("div");f.className="row-resize-handle",n.push(Fa.widget(p,f))}return Va.create(e.doc,n)}(e,t.activeHandle):void 0},nodeViews:{}}})}var fd=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(Uu);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1){var i=t.mapping.map(r.activeHandle,-1);"row"===(n=t.doc.resolve(i)).parent.type.spec.tableRole&&n.nodeAfter||(i=null),r=new e(i,r.dragging)}return r},e}();function hd(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=Zu(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ps.get(s);return a+l.map[l.width*n]-1}function md(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(Uu,{setHandle:t}),e.dispatch(n)}var vd=function(){return[(void 0===e&&(e={node:"table"}),new kt({key:$u,view:function(t){return{selectedNode:function(e,t){var n=e.selection;if(n instanceof at&&t===n.node.type&&n instanceof at)return{node:n.node,pos:n.from};var r=Zu(n.$from,(function(e){return e.type===t})),o=r&&r.node;if(o){var i=new Array(n.$from.depth+1).fill(0).findIndex((function(e,t){return"table"===n.$from.node(t).type.spec.tableRole}));return{node:o,pos:n.$from.start(i)-1}}return null},update:function(t,n){var r,o,i,a,s,l=t.state,c=l.schema.nodes[e.node],u=this.selectedNode(l,c),d=this.selectedNode(n,c);if((u||!d||n.doc.eq(t.state.doc))&&(u||d)){var p=l.tr;p.setMeta("addToHistory",!1),u&&d&&u.pos!==d.pos?(p.setMeta($u,{nodePosition:u.pos}),p.setNodeMarkup(d.pos,c,Ft({},d.node.attrs,((r={})[Et]=!1,r))),p.setNodeMarkup(u.pos,c,Ft({},u.node.attrs,((o={})[Et]=!0,o))),t.dispatch(p)):u&&d&&u.pos===d.pos&&!u.node.attrs[Et]&&!l.selection.eq(n.selection)?(p.setMeta($u,{nodePosition:u.pos}),t.dispatch(p.setNodeMarkup(u.pos,c,Ft({},u.node.attrs,((i={})[Et]=!0,i))))):u&&!d?(p.setMeta($u,{nodePosition:u.pos}),t.dispatch(p.setNodeMarkup(u.pos,c,Ft({},u.node.attrs,((a={})[Et]=!0,a))))):!u&&d&&(p.setMeta($u,{nodePosition:-1}),t.dispatch(p.setNodeMarkup(d.pos,c,Ft({},d.node.attrs,((s={})[Et]=!1,s)))))}}}},state:{init:function(){return new sd("",null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(e,t){return ud(e,t)}}}})),Qu(),pd()];var e};function gd(e){return void 0===e&&(e={}),new kt({view:function(t){return new yd(t,e)}})}var yd=function(e,t){var n=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(t){var r=function(e){return n[t](e)};return e.dom.addEventListener(t,r),{name:t,handler:r}}))};yd.prototype.destroy=function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))},yd.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())},yd.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},yd.prototype.updateOverlay=function(){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){var a=this.editorView.coordsAtPos(this.cursorPos);e={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var s,l,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!c||c==document.body&&"static"==getComputedStyle(c).position)s=-pageXOffset,l=-pageYOffset;else{var u=c.getBoundingClientRect();s=u.left-c.scrollLeft,l=u.top-c.scrollTop}this.element.style.left=e.left-s+"px",this.element.style.top=e.top-l+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"},yd.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)},yd.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){var i=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(i=ze(this.editorView.state.doc,i,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(i),this.scheduleRemoval(5e3)}}},yd.prototype.dragend=function(){this.scheduleRemoval(20)},yd.prototype.drop=function(){this.scheduleRemoval(20)},yd.prototype.dragleave=function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)};var bd=function(e){function t(t){e.call(this,t,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));return t.valid(o)?new t(o):e.near(o)},t.prototype.content=function(){return p.empty},t.prototype.eq=function(e){return e instanceof t&&e.head==this.head},t.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(e.resolve(n.pos))},t.prototype.getBookmark=function(){return new kd(this.anchor)},t.valid=function(e){var t=e.parent;if(t.isTextblock||!function(e){for(var t=e.depth;t>=0;t--){var n=e.index(t),r=e.node(t);if(0!=n)for(var o=r.child(n-1);;o=o.lastChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock},t.findFrom=function(e,n,r){e:for(;;){if(!r&&t.valid(e))return e;for(var o=e.pos,i=null,a=e.depth;;a--){var s=e.node(a);if(n>0?e.indexAfter(a)<s.childCount:e.index(a)>0){i=s.child(n>0?e.indexAfter(a):e.index(a)-1);break}if(0==a)return null;o+=n;var l=e.doc.resolve(o);if(t.valid(l))return l}for(;;){var c=n>0?i.firstChild:i.lastChild;if(!c){if(i.isAtom&&!i.isText&&!at.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=c,o+=n;var u=e.doc.resolve(o);if(t.valid(u))return u}return null}},t}(tt);bd.prototype.visible=!1,tt.jsonID("gapcursor",bd);var kd=function(e){this.pos=e};kd.prototype.map=function(e){return new kd(e.map(this.pos))},kd.prototype.resolve=function(e){var t=e.resolve(this.pos);return bd.valid(t)?new bd(t):tt.near(t)};var wd=function(){return new kt({props:{decorations:Ed,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&bd.valid(n))return new bd(n)},handleClick:xd,handleKeyDown:Cd,handleDOMEvents:{beforeinput:Sd}}})},Cd=ho({ArrowLeft:Od("horiz",-1),ArrowRight:Od("horiz",1),ArrowUp:Od("vert",-1),ArrowDown:Od("vert",1)});function Od(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){var i=e.selection,a=t>0?i.$to:i.$from,s=i.empty;if(i instanceof ot){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}var l=bd.findFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new bd(l))),!0)}}function xd(e,t,n){if(!e.editable)return!1;var r=e.state.doc.resolve(t);if(!bd.valid(r))return!1;var o=e.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(o>-1&&at.isSelectable(e.state.doc.nodeAt(o)))&&(e.dispatch(e.state.tr.setSelection(new bd(r))),!0)}function Sd(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof bd))return!1;var n=e.state.selection.$from,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;for(var o=i.empty,a=r.length-1;a>=0;a--)o=i.from(r[a].createAndFill(null,o));var s=e.state.tr.replace(n.pos,n.pos,new p(o,0,0));return s.setSelection(ot.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function Ed(e){if(!(e.selection instanceof bd))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",Va.create(e.doc,[Fa.widget(e.selection.head,t,{key:"gapcursor"})])}var Id=function(e,t,n){for(var r,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){r=[];for(var c=0;c<n+1;c++)r.push(a.createAndFill());s.push(i.createAndFill(void 0,r))}return o.createAndFill(void 0,s)},Nd=function(e,t){for(var n=e.$head,r=n.depth;r>0;r--){var o=n.node(r);if(o.type.name===t)return{pos:n.before(r),node:o}}return null},Td=function(e,t){return sl(e,t&&function(e){var n,r=Nd(e.selection,"table_row"),o=Nd(e.selection,"table");if(r&&o&&r.node.attrs[xt]){for(var i=0,a=0;a<o.node.nodeSize;a++)if(o.node.child(a).eq(r.node)){i=a;break}var s=o.node.child(i-1),l=r.pos-s.nodeSize;e.setNodeMarkup(l,void 0,((n={})[xt]=r.node.attrs[xt],n))}return t(e)})},Md=function(e,t){return ll(e,t&&function(e){var n,r=Nd(e.selection,"table_row");if(r&&r.node.attrs[xt]){var o=r.pos+r.node.nodeSize;e.setNodeMarkup(o,void 0,((n={})[xt]=r.node.attrs[xt],n))}return t(e)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o="editor.pdf";t.messages=((r={})["editor.bold"]="Bold",r["editor.italic"]="Italic",r["editor.underline"]="Underline",r["editor.strikethrough"]="Strikethrough",r["editor.subscript"]="Subscript",r["editor.superscript"]="Superscript",r["editor.unlink"]="Remove hyperlink",r["editor.undo"]="Undo",r["editor.redo"]="Redo",r["editor.fontSize"]="Font Size",r["editor.fontName"]="Font Name",r["editor.format"]="Format",r["editor.alignLeft"]="Align text left",r["editor.alignRight"]="Align text right",r["editor.alignCenter"]="Center text",r["editor.alignJustify"]="Justify",r["editor.indent"]="Indent",r["editor.outdent"]="Outdent",r["editor.orderedList"]="Insert ordered list",r["editor.bulletList"]="Insert unordered list",r["editor.print"]="Print",r["editor.selectAll"]="Select All",r["editor.cleanFormatting"]="Clean formatting",r[o]="Export as PDF",r["editor.foregroundColor"]="Color",r["editor.backgroundColor"]="Background color",r["editor.createTable"]="Create a table",r["editor.insertTableHint"]="Create a {0} x {1} table",r["editor.addRowBefore"]="Add row above",r["editor.addRowAfter"]="Add row below",r["editor.addColumnBefore"]="Add column on the left",r["editor.addColumnAfter"]="Add column on the right",r["editor.deleteRow"]="Delete row",r["editor.deleteColumn"]="Delete column",r["editor.deleteTable"]="Delete table",r["editor.mergeCells"]="Merge cells",r["editor.splitCell"]="Split cell",r["editor.hyperlink"]="Insert hyperlink",r["editor.hyperlink-dialog-title"]="Insert hyperlink",r["editor.hyperlink-dialog-content-address"]="Web address",r["editor.hyperlink-dialog-content-title"]="Title",r["editor.hyperlink-dialog-content-newwindow"]="Open link in new window",r["editor.hyperlink-dialog-cancel"]="Cancel",r["editor.hyperlink-dialog-insert"]="Insert",r["editor.insertFile"]="Insert file",r["editor.insertfile-dialog-title"]="Insert file",r["editor.insertfile-dialog-content-address"]="Web address",r["editor.insertfile-dialog-content-title"]="Title",r["editor.insertfile-dialog-cancel"]="Cancel",r["editor.insertfile-dialog-insert"]="Insert",r["editor.image"]="Insert image",r["editor.image-dialog-title"]="Insert image",r["editor.image-address"]="Web address",r["editor.image-title"]="Title",r["editor.image-altText"]="Alternate text",r["editor.image-width"]="Width (px)",r["editor.image-height"]="Height (px)",r["editor.image-cancel"]="Cancel",r["editor.image-insert"]="Insert",r["editor.viewHtml"]="View HTML",r["editor.viewHtml-dialog-title"]="View HTML",r["editor.viewHtml-cancel"]="Cancel",r["editor.viewHtml-update"]="Update",r["editor.findReplace-tool-title"]="Find and Replace",r["editor.findReplace-dialog-title"]="Find and Replace",r["editor.findReplace-tab-find"]="Find",r["editor.findReplace-tab-replace"]="Replace",r["editor.findReplace-findWhat"]="Find What:",r["editor.findReplace-replaceWith"]="Replace With",r["editor.findReplace-replace"]="Replace",r["editor.findReplace-replaceAll"]="Replace All",r["editor.findReplace-matchCase"]="Match Case",r["editor.findReplace-matchWord"]="Match whole word only",r["editor.findReplace-matchCyclic"]="Match cyclic (Wrap around)",r["editor.findReplace-useRegExp"]="Regular Expression",r["editor.findReplace-prevMatch"]="Prev",r["editor.findReplace-nextMatch"]="Next",r["editor.findReplace-matches"]="{0} of {1} matches",r),t.keys={bold:"editor.bold",italic:"editor.italic",underline:"editor.underline",strikethrough:"editor.strikethrough",subscript:"editor.subscript",superscript:"editor.superscript",unlink:"editor.unlink",undo:"editor.undo",redo:"editor.redo",fontSize:"editor.fontSize",fontName:"editor.fontName",format:"editor.format",alignLeft:"editor.alignLeft",alignRight:"editor.alignRight",alignCenter:"editor.alignCenter",alignJustify:"editor.alignJustify",indent:"editor.indent",outdent:"editor.outdent",orderedList:"editor.orderedList",bulletList:"editor.bulletList",print:"editor.print",selectAll:"editor.selectAll",cleanFormatting:"editor.cleanFormatting",pdf:o,foregroundColor:"editor.foregroundColor",backgroundColor:"editor.backgroundColor",createTable:"editor.createTable",createTableHint:"editor.insertTableHint",addRowBefore:"editor.addRowBefore",addRowAfter:"editor.addRowAfter",addColumnBefore:"editor.addColumnBefore",addColumnAfter:"editor.addColumnAfter",deleteRow:"editor.deleteRow",deleteColumn:"editor.deleteColumn",deleteTable:"editor.deleteTable",mergeCells:"editor.mergeCells",splitCell:"editor.splitCell",insertHyperlink:"editor.hyperlink",insertHyperlinkDialogTitle:"editor.hyperlink-dialog-title",insertHyperlinkAddress:"editor.hyperlink-dialog-content-address",insertHyperlinkTitle:"editor.hyperlink-dialog-content-title",insertHyperlinkNewWindow:"editor.hyperlink-dialog-content-newwindow",insertHyperlinkCancel:"editor.hyperlink-dialog-cancel",insertHyperlinkInsert:"editor.hyperlink-dialog-insert",insertFile:"editor.insertFile",insertFileDialogTitle:"editor.insertfile-dialog-title",insertFileAddress:"editor.insertfile-dialog-content-address",insertFileTitle:"editor.insertfile-dialog-content-title",insertFileCancel:"editor.insertfile-dialog-cancel",insertFileInsert:"editor.insertfile-dialog-insert",insertImage:"editor.image",insertImageDialogTitle:"editor.image-dialog-title",insertImageAddress:"editor.image-address",insertImageTitle:"editor.image-title",insertImageAltText:"editor.image-altText",insertImageWidth:"editor.image-width",insertImageHeight:"editor.image-height",insertImageCancel:"editor.image-cancel",insertImageInsert:"editor.image-insert",viewHtml:"editor.viewHtml",viewHtmlDialogTitle:"editor.viewHtml-dialog-title",viewHtmlCancel:"editor.viewHtml-cancel",viewHtmlUpdate:"editor.viewHtml-update",findReplaceToolTitle:"editor.findReplace-tool-title",findReplaceDialogTitle:"editor.findReplace-dialog-title",findReplaceTabFind:"editor.findReplace-tab-find",findReplaceTabReplace:"editor.findReplace-tab-replace",findReplaceFindWhat:"editor.findReplace-findWhat",findReplaceReplaceWith:"editor.findReplace-replaceWith",findReplaceReplace:"editor.findReplace-replace",findReplaceReplaceAll:"editor.findReplace-replaceAll",findReplaceMatchCase:"editor.findReplace-matchCase",findReplaceMatchWord:"editor.findReplace-matchWord",findReplaceMatchCyclic:"editor.findReplace-matchCyclic",findReplaceUseRegExp:"editor.findReplace-useRegExp",findReplacePrevMatch:"editor.findReplace-prevMatch",findReplaceNextMatch:"editor.findReplace-nextMatch",findReplaceMatches:"editor.findReplace-matches"}},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.onDownPreventDefault={onMouseDown:function(e){return e.preventDefault()},onPointerDown:function(e){return e.preventDefault()}};t.userSelectNone={userSelect:"none"};t.formatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t,n){e=e.replace("{"+n+"}",String(t))})),e};t.itemRender=function(e,t){return t.dataItem.style?r.cloneElement(e,e.props,r.createElement("span",{style:t.dataItem.style},e.props.children)):e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={},r=function(e){return"object"==typeof e?Object.keys(e).forEach((function(t){n[t]=e[t]})):n[e]=!0},o=function(e){return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?o(e):r(e)}))};return o(e),Object.keys(n).map((function(e){return n[e]&&e||null})).filter((function(e){return null!==e})).join(" ")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652188885,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t){e.exports=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(0),o=n(6),i=r.createContext([void 0,o.a]),a=r.createContext([void 0,o.a]),s=r.createContext([[],o.a,o.a]),l=r.createContext([[],o.a,o.a])},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=n(5);t.listsTypes=r({},i.indentRules.listsTypes),function(e){var n={type:"button"};e.bold=r({},i.bold,{props:r({icon:"bold"},n),messages:{title:o.keys.bold},commandName:"Bold"}),e.italic=r({},i.italic,{props:r({icon:"italic"},n),messages:{title:o.keys.italic},commandName:"Italic"}),e.underline=r({},i.underline,{props:r({icon:"underline"},n),messages:{title:o.keys.underline},commandName:"Underline"}),e.strikethrough=r({},i.strikethrough,{props:r({icon:"strikethrough"},n),messages:{title:o.keys.strikethrough},commandName:"Strikethrough"}),e.subscript=r({},i.subscript,{props:r({icon:"subscript"},n),messages:{title:o.keys.subscript},commandName:"Subscript"}),e.superscript=r({},i.superscript,{props:r({icon:"superscript"},n),messages:{title:o.keys.superscript},commandName:"Superscript"}),e.link=r({},i.link,{props:r({icon:"link-horizontal"},n),messages:{insertHyperlink:o.keys.insertHyperlink,insertHyperlinkDialogTitle:o.keys.insertHyperlinkDialogTitle,insertHyperlinkAddress:o.keys.insertHyperlinkAddress,insertHyperlinkTitle:o.keys.insertHyperlinkTitle,insertHyperlinkNewWindow:o.keys.insertHyperlinkNewWindow,insertHyperlinkCancel:o.keys.insertHyperlinkCancel,insertHyperlinkInsert:o.keys.insertHyperlinkInsert},commandName:"Link"}),e.insertFile=r({},i.link,{props:r({icon:"file-add"},n),messages:{insertHyperlink:o.keys.insertFile,insertHyperlinkDialogTitle:o.keys.insertFileDialogTitle,insertHyperlinkAddress:o.keys.insertFileAddress,insertHyperlinkTitle:o.keys.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:o.keys.insertFileCancel,insertHyperlinkInsert:o.keys.insertFileInsert},commandName:"InsertFile",linkTarget:!1}),e.insertTable={props:r({icon:"table-insert"},n),messages:{createTable:o.keys.createTable,createTableHint:o.keys.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:r({icon:"table-row-insert-above"},n),messages:{title:o.keys.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:r({icon:"table-row-insert-below"},n),messages:{title:o.keys.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:r({icon:"table-column-insert-left"},n),messages:{title:o.keys.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:r({icon:"table-column-insert-right"},n),messages:{title:o.keys.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:r({icon:"table-row-delete"},n),messages:{title:o.keys.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:r({icon:"table-column-delete"},n),messages:{title:o.keys.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:r({icon:"table-delete"},n),messages:{title:o.keys.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:r({icon:"cells-merge"},n),messages:{title:o.keys.mergeCells},commandName:"MergeCells"},e.splitCell={props:r({icon:"cell-split-horizontally"},n),messages:{title:o.keys.splitCell},commandName:"SplitCell"},e.print={props:r({icon:"print"},n),messages:{title:o.keys.print}},e.selectAll={props:r({icon:"select-all"},n),messages:{title:o.keys.selectAll}},e.pdf={props:r({icon:"pdf"},n),messages:{title:o.keys.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:r({icon:"clear-css"},n),messages:{title:o.keys.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:r({icon:"image"},n),messages:{insertImage:o.keys.insertImage,insertImageDialogTitle:o.keys.insertImageDialogTitle,insertImageAddress:o.keys.insertImageAddress,insertImageTitle:o.keys.insertImageTitle,insertImageAltText:o.keys.insertImageAltText,insertImageWidth:o.keys.insertImageWidth,insertImageHeight:o.keys.insertImageHeight,insertImageCancel:o.keys.insertImageCancel,insertImageInsert:o.keys.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:r({icon:"html"},n),messages:{viewHtml:o.keys.viewHtml,viewHtmlDialogTitle:o.keys.viewHtmlDialogTitle,viewHtmlCancel:o.keys.viewHtmlCancel,viewHtmlUpdate:o.keys.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:r({icon:"find"},n),messages:{findReplaceToolTitle:o.keys.findReplaceToolTitle,findReplaceDialogTitle:o.keys.findReplaceDialogTitle,findReplaceTabFind:o.keys.findReplaceTabFind,findReplaceTabReplace:o.keys.findReplaceTabReplace,findReplaceFindWhat:o.keys.findReplaceFindWhat,findReplaceReplaceWith:o.keys.findReplaceReplaceWith,findReplaceReplace:o.keys.findReplaceReplace,findReplaceReplaceAll:o.keys.findReplaceReplaceAll,findReplaceMatchCase:o.keys.findReplaceMatchCase,findReplaceMatchWord:o.keys.findReplaceMatchWord,findReplaceMatchCyclic:o.keys.findReplaceMatchCyclic,findReplaceUseRegExp:o.keys.findReplaceUseRegExp,findReplacePrevMatch:o.keys.findReplacePrevMatch,findReplaceNextMatch:o.keys.findReplaceNextMatch,findReplaceMatches:o.keys.findReplaceMatches}},e.unlink=r({},i.link,{props:r({icon:"unlink-horizontal"},n),messages:{title:o.keys.unlink},commandName:"Unlink"}),e.undo={props:r({icon:"undo"},n),messages:{title:o.keys.undo},commandName:"Undo"},e.redo={props:r({icon:"redo"},n),messages:{title:o.keys.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:o.messages[o.keys.fontSize],value:"",localizationKey:o.keys.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"},e.fontName={style:"font-family",defaultItem:{text:o.messages[o.keys.fontName],value:"",localizationKey:o.keys.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"},e.formatBlock={defaultItem:{text:o.messages[o.keys.format],value:"",localizationKey:o.keys.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"},e.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",view:"palette",title:o.keys.foregroundColor},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"background",view:"palette",title:o.keys.backgroundColor},commandName:"BackColor"},e.alignLeft={actions:i.alignLeftRules.slice(),props:r({icon:"align-left"},n),messages:{title:o.keys.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:i.alignRightRules.slice(),props:r({icon:"align-right"},n),messages:{title:o.keys.alignRight},commandName:"AlignRight"},e.alignCenter={actions:i.alignCenterRules.slice(),props:r({icon:"align-center"},n),messages:{title:o.keys.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:i.alignJustifyRules.slice(),props:r({icon:"align-justify"},n),messages:{title:o.keys.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:i.alignRemoveRules.slice(),props:r({icon:"align-remove"},n),messages:{},commandName:"AlignRemove"},e.indent={actions:i.indentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-increase"},n),messages:{title:o.keys.indent},commandName:"Indent"},e.outdent={actions:i.outdentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-decrease"},n),messages:{title:o.keys.outdent},commandName:"Outdent"},e.orderedList={listType:t.listsTypes.orderedList,props:r({icon:"list-ordered"},n),messages:{title:o.keys.orderedList},commandName:"OrderedList",types:r({},t.listsTypes)},e.bulletList={listType:t.listsTypes.bulletList,props:r({icon:"list-unordered"},n),messages:{title:o.keys.bulletList},commandName:"UnorderedList",types:r({},t.listsTypes)}}(t.EditorToolsSettings||(t.EditorToolsSettings={}))},function(e,t){e.exports=i},,function(e,t,n){"use strict";n.r(t);var r=n(47);n.d(t,"Popup",(function(){return r.a})),n.d(t,"PopupPropsContext",(function(){return r.b}))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var o="labels.optional",i=((r={})[o]="(Optional)",r)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},function(e,t,n){"use strict";t.a={outerHeight:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop),r=parseFloat(t.marginBottom);return e.offsetHeight+n+r},outerWidth:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),r=parseFloat(t.marginRight);return e.offsetWidth+n+r},styles:{"animation-container":"k-animation-container","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8);function o(e){if(void 0!==r)r.validatePackage(e);else{var t="License activation failed for "+e.name+"\n";t+="The @progress/kendo-licensing script is not loaded.\n",t+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),function(e){e.next="next",e.prev="prev",e.current="current",e.reset="reset"}(r||(r={}));var o=function(e,t){var n=t.items.findIndex((function(t){return t===e}));switch(t.type){case r.next:return n===t.items.length-1?e:t.items[n+1];case r.prev:return 0===n?e:t.items[n-1];case r.current:return t.payload;case r.reset:return null;default:return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(0),o=n(1),i=n(25),a=n(35),s=n(26),l=n(39),c=n(10),u=n(22),d=n(23),p=n(36),f=n(27),h=n(21),m=n(11),v=n(38),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},y=r.forwardRef((function(e,t){var n;Object(h.a)(m.a);var o=r.useRef(null),y=r.useRef(null),b=Object(a.a)(y,e.dir);r.useImperativeHandle(o,(function(){return{element:y.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var k=r.useContext(i.d),w=k[0],C=k[1],O=r.useContext(i.c),x=O[0],S=O[1],E=r.useContext(i.b)[1],I=r.useMemo((function(){return e.selected||(Array.isArray(w)?w.some((function(t){return t===e.value})):w===e.value)}),[e.selected,e.value,w]),N=r.useMemo((function(){return x===e.value}),[e.value,x]);r.useEffect((function(){N&&y.current&&y.current.focus()}),[N]);var T=r.useCallback((function(t){C({type:f.a.toggle,payload:e.value,event:t})}),[C,e.value]),M=r.useCallback((function(t){e.removable&&(E({type:p.a.remove,payload:e.value,event:t}),S({type:d.a.reset,payload:e.value,event:t}),C({type:f.a.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:o.current,syntheticEvent:t}))}),[e.onRemove,e.value,e.removable,E,S,C]),D=r.useCallback((function(t){switch(t.keyCode){case s.a.left:S({type:d.a.prev,payload:e.value,event:t});break;case s.a.right:S({type:d.a.next,payload:e.value,event:t});break;case s.a.enter:C({type:f.a.toggle,payload:e.value,event:t});break;case s.a.delete:M(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onKeyDown,e.value,S,C,M]),P=r.useCallback((function(t){S({payload:e.value,type:d.a.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onFocus,e.value,S]),_=r.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onBlur]),j=Object(v.a)(e,o,{onClick:T});return r.createElement("div",g({},j,{role:e.role,id:e.value,style:e.style,ref:y,dir:b,tabIndex:Object(l.a)(e.tabIndex,e.disabled,void 0),className:Object(c.a)("k-chip",(n={"k-rtl":"rtl"===b,"k-disabled":e.disabled,"k-selected":I,"k-focus":N},n["k-chip-"+(u.a.sizeMap[e.size]||e.size)]=e.size,n["k-rounded-"+(u.a.roundedMap[e.rounded]||e.rounded)]=e.rounded,n["k-chip-"+e.fillMode]=e.fillMode,n["k-chip-"+e.fillMode+"-"+e.themeColor]=Boolean(e.fillMode&&e.themeColor),n),e.className),"aria-checked":I,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,onFocus:P,onBlur:_,onKeyDown:D}),I&&e.selectedIcon&&r.createElement("span",{className:Object(c.a)("k-chip-icon","k-icon",e.selectedIcon)}),e.icon&&r.createElement("span",{className:Object(c.a)("k-chip-icon","k-icon",e.icon)}),r.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&r.createElement("span",{"aria-label":e.text,className:"k-chip-label"},e.text)),e.removable&&r.createElement("span",{className:"k-chip-actions"},r.createElement("span",{className:"k-chip-action"},r.createElement("span",{className:Object(c.a)("k-chip-remove-action","k-icon",e.removeIcon),onClick:M}))))})),b={id:o.string,text:o.string,value:o.any,dir:o.oneOf(["ltr","rtl"]),removable:o.bool,removeIcon:o.string,disabled:o.bool,icon:o.string,selectedIcon:o.string,onRemove:o.func,dataItem:o.any,selected:o.bool,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"]),rounded:o.oneOf([null,"small","medium","large","full"]),fillMode:o.oneOf([null,"outline","solid"]),themeColor:o.oneOf([null,"base","info","success","warning","error"])};y.displayName="KendoReactChip",y.propTypes=b,y.defaultProps={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"}},function(e,t,n){"use strict";n.d(t,"d",(function(){return y})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return k})),n.d(t,"a",(function(){return w}));var r=n(0),o=n(1),i=n(35),a=n(37),s=n(38),l=n(39),c=n(10),u=n(22),d=n(27),p=n(23),f=n(36),h=n(24),m=n(21),v=n(11),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},y=r.createContext([null,function(e){}]),b=r.createContext([null,function(e){}]),k=r.createContext([null,function(e){}]),w=r.forwardRef((function(e,t){var n;Object(m.a)(v.a);var o=r.useRef(null),w=r.useRef(null),C=Object(i.a)(w,e.dir),x=e.chip,S=e.id,E=e.style,I=e.tabIndex,N=e.disabled,T=e.size,M=e.className,D=e.ariaDescribedBy,P=e.ariaLabelledBy,_=e.selection,j=void 0===_?O.selection:_,R=e.value,A=void 0===R?O.defaultValue:R,F=e.defaultData,z=void 0===F?O.defaultData:F,L=e.valueField,B=void 0===L?O.valueField:L,V=e.textField,H=void 0===V?O.textField:V,K=e.onChange,W=e.onDataChange,$=r.useMemo((function(){return x||h.a}),[x,h.a]);r.useImperativeHandle(o,(function(){return{element:w.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var q=r.useCallback((function(e,t){K&&o.current&&K.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[K]),U=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=Object(d.b)(t.state||i,g({},e,t));n&&n(r,e.event),a(r)}]}(A,{selection:j,state:A},q),G=U[0],X=U[1],J=r.useCallback((function(e,t){W&&o.current&&W.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[W]),Y=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=Object(f.b)(t.state||i,g({},e,t));n&&n(r,e.event),a(r)}]}(e.data||z,{state:e.data,valueField:B},J),Z=Y[0],Q=Y[1],ee=r.useCallback((function(e,t){return e.push(t[B]),e}),[B]),te=r.useMemo((function(){return e.data||Z}),[e.data,Z]),ne=r.useMemo((function(){return A||G}),[A,G]),re=r.useMemo((function(){return te.reduce(ee,[])}),[te,ee]),oe=r.useCallback((function(e){return Object(a.a)(B)(e)}),[B]),ie=r.useCallback((function(e){return Object(a.a)(H)(e)}),[H]),ae=function(e){var t=r.useState(null),n=t[0],o=t[1];return[n,function(t){var n=Object(p.b)(t.payload,g({},t,e));o(n)}]}({items:re}),se=ae[0],le=ae[1],ce=Object(s.a)(e,o);return r.createElement(y.Provider,{value:[ne,X]},r.createElement(b.Provider,{value:[se,le]},r.createElement(k.Provider,{value:[te,Q]},r.createElement("div",g({ref:w},ce,{role:"listbox",id:S,dir:C,style:E,tabIndex:Object(l.a)(I,N,void 0),className:Object(c.a)("k-chip-list",(n={"k-rtl":"rtl"===C,"k-disabled":N},n["k-chip-list-"+(u.a.sizeMap[T]||T)]=T,n),M),"aria-labelledby":P,"aria-describedby":D}),te.map((function(e,t){return r.createElement($,{role:"option",dataItem:e,size:T,key:[oe(e),t].join("-"),text:ie(e),value:oe(e)})}))))))})),C={id:o.string,className:o.string,tabIndex:o.number,data:o.any,defaultData:o.arrayOf(o.any),onDataChange:o.func,value:o.oneOfType([o.any,o.arrayOf(o.any)]),defaultValue:o.oneOfType([o.any,o.arrayOf(o.any)]),onChange:o.func,selection:o.oneOf(["single","none","multiple"]),textField:o.string,valueField:o.string,disabled:o.bool,dir:o.oneOf(["ltr","rtl"]),ariaLabelledBy:o.string,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"])},O={chip:h.a,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};w.displayName="KendoReactChipList",w.propTypes=C,w.defaultProps=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46}},function(e,t,n){"use strict";var r,o;n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),function(e){e.single="single",e.multiple="multiple",e.none="none"}(r||(r={})),function(e){e.toggle="toggle",e.remove="remove"}(o||(o={}));var i=function(e,t){switch(t.selection){case r.single:switch(t.type){case o.toggle:if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case o.remove:return t.payload===e?null:e;default:return e}case r.multiple:switch(t.type){case o.toggle:if(Array.isArray(e))return e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):e.concat([t.payload]);if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case o.remove:return Array.isArray(e)?e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):e.concat([t.payload]):e;default:return e}case r.none:return null;default:return e}}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71),a=n(72),s=n(73),l=n(62);!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(i.InsertLinkDialog);e.InsertLinkDialog=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(a.InsertImageDialog);e.InsertImageDialog=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s.ViewHtmlDialog);e.ViewHtmlDialog=r;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.FindAndReplaceDialog);e.FindAndReplaceDialog=c}(t.EditorDialogs||(t.EditorDialogs={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=function(){return"undefined"!=typeof document?document:{}},o=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=r();if(!this.scrollbar&&e&&e.createElement){var t=e.createElement("div");t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML="&nbsp;",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=function(e,t){var n=r.useContext(e),o=n[0],i=n[1],a=r.useState(t),s=a[0],l=a[1];return[void 0!==o?o:s,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];void 0!==o?i.apply(void 0,e):l(e[0])}]}},function(e,t,n){"use strict";n.r(t),n.d(t,"Dialog",(function(){return E})),n.d(t,"DialogActionsBar",(function(){return c})),n.d(t,"DialogPropsContext",(function(){return S})),n.d(t,"Window",(function(){return H})),n.d(t,"WindowActionsBar",(function(){return A})),n.d(t,"WindowPropsContext",(function(){return V}));var r=n(0),o=n(15),i=n(1),a=n(50),s=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,i=e.closeIcon;return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},r.createElement("div",{className:"k-window-title k-dialog-title"},t),r.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&r.createElement(a.a,{role:"button","aria-label":"Close",onClick:n,icon:"x",fillMode:"flat",className:"k-window-action k-dialog-action k-dialog-close"})))},l=n(10),c=function(e){var t=e.layout,n=void 0===t?p.layout:t,o=e.children,i=Object(l.a)("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};c.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var u,d,p={layout:"stretched"},f=n(52),h=n(53),m=n(26),v=n(54),g=n(19),y=n(58),b=n(21),k={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189204,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},w=function(e,t,n){var r=e;if(t&&t.defaultView){var o=t.querySelectorAll(".k-window:not(.k-dialog), .k-dialog-wrapper"),i=!1;return o.forEach((function(e){var o=t.defaultView.getComputedStyle(e,null);if(e.getAttribute("data-windowid")!==n&&null!==o.zIndex){var a=parseInt(o.zIndex,10);a>=r&&(r=a,i=!0)}})),i?r+2:r}return r},C=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(){return(O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},x=function(e){function t(t){var n=e.call(this,t)||this;return n._id=Object(f.a)(),n.titleId=n.generateTitleId(),n.onCloseDialog=function(e){e.preventDefault(),Object(h.a)(n.props.onClose,e,n,void 0)},n.onKeyDown=function(e){e.keyCode===m.a.esc&&n.props.onClose&&(e.preventDefault(),n.onCloseDialog(e));var t=n.element;if(t&&e.keyCode===m.a.tab){var r=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=r[0],i=r[r.length-1],a=n.getDocument();e.shiftKey?(a&&a.activeElement===o||a&&a.activeElement===n.element)&&(i.focus(),e.preventDefault()):a&&a.activeElement===i&&(o.focus(),e.preventDefault())}},n.getCurrentZIndex=function(){return n.state?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},Object(b.a)(k),n.state={zIndex:w(n.getCurrentZIndex(),n.getDocument(),n._id)},n}return C(t,e),t.prototype.componentDidMount=function(){this.element&&this.props.autoFocus&&this.element.focus()},t.prototype.render=function(){var e,t=this,n=void 0!==this.props.id?this.props.id:this.titleId,i=this.props,a=i.title,l=i.width,c=i.height,u=i.children,d=i.minWidth,p=i.dir,f=i.style,h=i.contentStyle,m=r.Children.toArray(u),y=this.getContent(m),b=this.getActionBar(m),k=a?{"aria-labelledby":n}:null,w=void 0===this.props.closeIcon||this.props.closeIcon,C=this.getCurrentZIndex(),x=r.createElement(v.a.Provider,{value:C},r.createElement("div",O({},((e={})["data-windowid"]=this._id,e),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:p,style:O({zIndex:C},f),ref:function(e){return t.element=e}}),r.createElement("div",{className:"k-overlay"}),r.createElement("div",O({},k,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:l,height:c,minWidth:d}}),this.props.title&&r.createElement(s,{closeIcon:w,onCloseButtonClick:this.onCloseDialog,id:n},a),r.createElement("div",{className:"k-window-content k-dialog-content",style:h},y),b)));return g.a?null!==this.props.appendTo?o.createPortal(x,this.props.appendTo||document.body):x:null},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===c}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==c}))},t.prototype.generateTitleId=function(){return"dialog-title"+this._id},t.displayName="Dialog",t.propTypes={title:i.any,id:i.string,dir:i.string,style:i.object,closeIcon:i.bool,width:i.oneOfType([i.number,i.string]),height:i.oneOfType([i.number,i.string]),minWidth:i.oneOfType([i.number,i.string]),autoFocus:i.bool},t.defaultProps={autoFocus:!1},t.contextType=v.a,t}(r.Component),S=Object(y.a)(),E=Object(y.b)(S,x);E.displayName="KendoReactDialog",function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(d||(d={}));var I=function(){return(I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},N=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,s=e.onRestoreButtonClick,l=e.onDoubleClick,c=e.stage,u=e.forwardedRef,p=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"window-minimize",onClick:o}),f=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:i,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"window-maximize",onClick:i}),h=e.restoreButton?r.createElement(e.restoreButton,{onClick:s,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"window-restore",onClick:s}),m=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"close",onClick:n});return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:u,onDoubleClick:l},r.createElement("div",{className:"k-window-title"},t||""),r.createElement("div",{className:"k-window-actions"},c===d.DEFAULT&&p,c===d.DEFAULT&&f,c!==d.DEFAULT&&h,m))},T=r.forwardRef((function(e,t){return r.createElement(N,I({},e,{forwardedRef:t}))})),M=n(60),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=["n","e","s","w","se","sw","ne","nw"],_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",null," ",P.map((function(t,n){return r.createElement(M.a,{key:n,onDrag:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!1,direction:t})},onRelease:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!0,direction:t})}},r.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))})))},t}(r.Component),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(r.Component),A=function(e){var t=e.layout,n=void 0===t?F.layout:t,o=e.children,i=Object(l.a)("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};A.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var F={layout:"end"},z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(){return(L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},B=function(e){function t(t){var n=e.call(this,t)||this;return n.offSetCoordinates={x:0,y:0},n._id=Object(f.a)(),n.onKeyDown=function(e){if(e.target===e.currentTarget){var t=n.props.minWidth||120,r=n.props.minHeight||100;if(e.ctrlKey&&n.props.resizable){switch(e.keyCode){case m.a.up:e.preventDefault(),r<=n.height-5&&n.setState({height:n.height-5});break;case m.a.down:e.preventDefault(),n.setState({height:n.height+5});break;case m.a.left:t<=n.width-5&&n.setState({width:n.width-5});break;case m.a.right:n.setState({width:n.width+5});break;default:return}n.dispatchMoveEvent(n.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case m.a.up:n.windowStage===d.MINIMIZED?(n.handleRestore(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleFullscreen(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.FULLSCREEN}));break;case m.a.down:n.windowStage===d.FULLSCREEN?(n.handleRestore(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleMinimize(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case m.a.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case m.a.up:n.setState({top:n.state.top-5});break;case m.a.down:n.setState({top:n.state.top+5});break;case m.a.left:n.setState({left:n.state.left-5});break;case m.a.right:n.setState({left:n.state.left+5});break;default:return}n.dispatchMoveEvent(n.props.onMove,e,!1,void 0)}}},n.onPress=function(e){var t=e.event;n.windowCoordinatesState.differenceLeft=t.pageX-n.left,n.windowCoordinatesState.differenceTop=t.pageY-n.top},n.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),n.windowStage!==d.FULLSCREEN&&n.props.draggable&&(n.setState({top:Math.max(t.pageY-n.windowCoordinatesState.differenceTop,0),left:t.pageX-n.windowCoordinatesState.differenceLeft,isDragging:!0}),n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!1))},n.onRelease=function(e){var t=e.event;n.windowStage!==d.FULLSCREEN&&n.props.draggable&&n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!0),n.setState({isDragging:!1})},n.onFocus=function(){n._blurTimeout?(clearTimeout(n._blurTimeout),n._blurTimeout=void 0):n.setState({focused:!0,zIndex:w(n.getCurrentZIndex(),n.getDocument(),n._id)})},n.onBlur=function(){clearTimeout(n._blurTimeout);var e=n.getWindow();e&&(n._blurTimeout=e.setTimeout((function(){n.setState({focused:!1}),n._blurTimeout=void 0})))},n.getInitialTop=function(){if(void 0!==n.props.top)return n.props.top;if(void 0!==n.props.initialTop)return n.props.initialTop;var e=300;if(void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),n.props.appendTo)return n.props.appendTo.offsetHeight/2-e/2;var t=n.getWindow();return t?t.innerHeight/2-e/2:0},n.getInitialLeft=function(){if(void 0!==n.props.left)return n.props.left;if(void 0!==n.props.initialLeft)return n.props.initialLeft;var e=300;if(void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),n.props.appendTo)return n.props.appendTo.offsetWidth/2-e/2;var t=n.getWindow();return t?t.innerWidth/2-e/2:0},n.getInitialWidth=function(){var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),e},n.getInitialHeight=function(){var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),e},n.handleMinimize=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({stage:d.MINIMIZED,height:0}),Object(h.a)(n.props.onStageChange,e,n,{state:d.MINIMIZED})},n.handleFullscreen=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height;var t=n.getWindow(),r=t?t.innerWidth:0,o=t?t.innerHeight:0;n.setState({left:0,top:0,width:n.props.appendTo?n.props.appendTo.offsetWidth:r,height:n.props.appendTo?n.props.appendTo.offsetHeight:o,stage:d.FULLSCREEN}),Object(h.a)(n.props.onStageChange,e,n,{state:d.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===d.FULLSCREEN?n.setState({stage:d.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===d.MINIMIZED&&n.setState({stage:d.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),Object(h.a)(n.props.onStageChange,e,n,{state:d.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),Object(h.a)(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===d.FULLSCREEN||n.windowStage===d.MINIMIZED?n.handleRestore(e):n.handleFullscreen(e)},n.handleResize=function(e,t){var r=n.props.appendTo?e.pageX-n.offSetCoordinates.x:e.pageX,o=n.props.appendTo?e.pageY-n.offSetCoordinates.y:e.pageY,i=n.width,a=n.height,s=n.props.minWidth||120,l=n.props.minHeight||100,c=n.top-o,u=n.left-r,d=r-n.left,p=o-n.top,f=Object.assign({},n.state,{isDragging:!t.end});t.direction.indexOf("n")>=0&&l-(a+c)<0&&(n.top>0&&(f.height=a+c),f.top=o),t.direction.indexOf("s")>=0&&l-p<0&&(f.height=p),t.direction.indexOf("w")>=0&&s-(i+u)<0&&(n.left>0&&(f.width=i+u),f.left=r),t.direction.indexOf("e")>=0&&s-d<0&&(f.width=d),n.setState(f),n.dispatchMoveEvent(n.props.onResize,e,!0,t.end)},n.dispatchMoveEvent=function(e,t,r,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:r,end:o,target:n,left:n.state.left,top:n.state.top,width:n.state.width,hight:n.state.height,height:n.state.height})},n.handleBrowserWindowResize=function(){if(n.windowStage===d.FULLSCREEN){var e=n.getWindow(),t=e?e.innerWidth:0,r=e?e.innerHeight:0;n.setState({width:n.props.appendTo?n.props.appendTo.offsetWidth:t,height:n.props.appendTo?n.props.appendTo.offsetHeight:r})}},n.getCurrentZIndex=function(){return n.state?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},n.getWindow=function(){var e=n.getDocument();return e&&e.defaultView},Object(b.a)(k),n.state={stage:n.props.stage||d.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0,zIndex:w(n.getCurrentZIndex(),n.getDocument(),n._id)},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return z(t,e),t.prototype.componentDidMount=function(){var e=this.getWindow();e&&e.addEventListener("resize",this.handleBrowserWindowResize);var t=this.getDocument();if(this.props.appendTo&&t){var n=this.props.appendTo.getBoundingClientRect(),r=t.body.getBoundingClientRect();this.offSetCoordinates.x=n.left-r.left,this.offSetCoordinates.y=n.top-r.top}},t.prototype.componentWillUnmount=function(){var e=this.getWindow();e&&e.removeEventListener("resize",this.handleBrowserWindowResize)},t.prototype.componentDidUpdate=function(){var e=this.getDocument();if(this.props.appendTo&&e){var t=this.props.appendTo.getBoundingClientRect(),n=e.body.getBoundingClientRect();this.offSetCoordinates.x=t.left-n.left,this.offSetCoordinates.y=t.top-n.top}},t.prototype.render=function(){var e,t=this,n=r.Children.toArray(this.props.children),i=this.getContent(n),a=this.getActionBar(n),s=this.getCurrentZIndex(),c=Object(l.a)("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),u=r.createElement(v.a.Provider,{value:s},r.createElement(r.Fragment,null,this.props.modal&&r.createElement("div",{className:"k-overlay",style:L({zIndex:s},this.props.overlayStyle)}),r.createElement("div",L({},((e={})["data-windowid"]=this._id,e),{tabIndex:0,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,ref:function(e){t.windowElement=e,t.element=e},className:c,style:L({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:s},this.props.style)}),r.createElement(R,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},r.createElement(M.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},r.createElement(T,{stage:this.windowStage,onDoubleClick:this.props.doubleClickStageChange?this.handleDoubleClick:void 0,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow,closeButton:this.props.closeButton,minimizeButton:this.props.minimizeButton,maximizeButton:this.props.maximizeButton,restoreButton:this.props.restoreButton},this.props.title)),this.windowStage!==d.MINIMIZED?r.createElement(r.Fragment,null,r.createElement("div",{className:"k-window-content"},i),a):null,this.windowStage===d.DEFAULT&&this.props.resizable?r.createElement(_,{onResize:this.handleResize}):null))));return g.a?null!==this.props.appendTo?o.createPortal(u,this.props.appendTo||document.body):u:null},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetWidth;var t=this.getWindow();e=t?t.innerWidth:0}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetHeight;var t=this.getWindow();e=t?t.innerHeight:0}else this.windowStage===d.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===A}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==A}))},t.displayName="Window",t.propTypes={width:i.number,height:i.number,left:i.number,top:i.number,initialWidth:i.number,initialHeight:i.number,initialLeft:i.number,initialTop:i.number,minWidth:i.number,minHeight:i.number,resizable:i.bool,draggable:i.bool,title:i.any,shouldUpdateOnDrag:i.bool,stage:i.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:i.string,style:i.object,overlayStyle:i.object},t.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},t.contextType=v.a,t}(r.Component),V=Object(y.a)(),H=Object(y.b)(V,B);H.displayName="KendoReactWindow"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e){var t=e.onFocus,n=e.onBlur,o=e.onSyncFocus,i=e.onSyncBlur,a=r.useRef(!1),s=r.useRef(0),l=r.useCallback((function(e){clearTimeout(s.current),s.current=window.setTimeout((function(){return e()}))}),[s]),c=r.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(s.current),o&&o.call.apply(o,[void 0].concat(e)),a.current||(a.current=!0,t&&t.call.apply(t,[void 0].concat(e)))}),[a,t,o]),u=r.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i&&i.call.apply(i,[void 0].concat(e)),l((function(){a.current&&n&&(a.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[a,l,n,i]);return r.useEffect((function(){return function(){clearTimeout(s.current)}}),[]),{onFocus:c,onBlur:u}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=function(e,t){return r.useContext(e)(t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=':not(.k-disabled):not([disabled]):not([disabled="true"])',o=["button"+r,".k-button-group > button"+r,".k-dropdown > .k-dropdown-wrap"+r,".k-colorpicker > .k-picker-wrap"+r];t.a={styles:{button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),function(e){e.remove="remove",e.add="add",e.reorder="reorder"}(r||(r={}));var o=function(e,t){switch(t.type){case r.add:break;case r.remove:return e.filter((function(e){return e[t.valueField]!==t.payload}));case r.reorder:break;default:return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(43),o={};function i(e){if(o[e])return o[e];var t=Object(r.a)(e);return o[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},o[e]}o.undefined=function(){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=function(e,t,n){void 0===n&&(n={});var o=r.useCallback((function(r){n.onMouseDown&&n.onMouseDown.call(void 0,r),e.onMouseDown&&e.onMouseDown.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseDown,e.onMouseDown,t]),i=r.useCallback((function(r){n.onMouseUp&&n.onMouseUp.call(void 0,r),e.onMouseUp&&e.onMouseUp.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseUp,e.onMouseUp,t]);return{onClick:r.useCallback((function(r){n.onClick&&n.onClick.call(void 0,r),e.onClick&&e.onClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onClick,e.onClick,t]),onMouseUp:i,onMouseDown:o,onDoubleClick:r.useCallback((function(r){n.onDoubleClick&&n.onDoubleClick.call(void 0,r),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onDoubleClick,e.onDoubleClick,t]),onMouseEnter:r.useCallback((function(r){n.onMouseEnter&&n.onMouseEnter.call(void 0,r),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseEnter,e.onMouseEnter,t]),onMouseLeave:r.useCallback((function(r){n.onMouseLeave&&n.onMouseLeave.call(void 0,r),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseLeave,e.onMouseLeave,t]),onMouseMove:r.useCallback((function(r){n.onMouseMove&&n.onMouseMove.call(void 0,r),e.onMouseMove&&e.onMouseMove.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseMove,e.onMouseMove,t]),onMouseOut:r.useCallback((function(r){n.onMouseOut&&n.onMouseOut.call(void 0,r),e.onMouseOut&&e.onMouseOut.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOut,e.onMouseOut,t]),onMouseOver:r.useCallback((function(r){n.onMouseOver&&n.onMouseOver.call(void 0,r),e.onMouseOver&&e.onMouseOver.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOver,e.onMouseOver,t])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t,n){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:t?n?void 0:-1:0}},function(e,t){e.exports=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189001,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r,o=n(0),i=n(1),a=n(10),s=n(6),l=n(40),c=n(20),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},f=c.a.styles,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=o.createRef(),t}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.elementRef.current},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.children,r=t.style,i=t.appear,s=t.enter,c=t.exit,u=t.transitionName,h=t.transitionEnterDuration,m=t.transitionExitDuration,v=t.className,g=t.onEnter,y=t.onEntering,b=t.onEntered,k=t.onExit,w=t.onExiting,C=t.onExited,O=t.onAfterExited,x=t.mountOnEnter,S=t.unmountOnExit,E=t.animationEnteringStyle,I=t.animationEnteredStyle,N=t.animationExitingStyle,T=t.animationExitedStyle,M=p(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onAfterExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),D=Object(a.a)(v,f["child-animation-container"]),P=d({transitionDelay:"0ms"},r),_={entering:d({transitionDuration:h+"ms"},E),entered:d({},I),exiting:d({transitionDuration:m+"ms"},N),exited:d({},T)},j={in:this.props.in,appear:i,enter:s,exit:c,mountOnEnter:x,unmountOnExit:S,timeout:{enter:h,exit:m},onEnter:function(){g&&g.call(void 0,{animatedElement:e.element,target:e})},onEntering:function(){y&&y.call(void 0,{animatedElement:e.element,target:e})},onEntered:function(){b&&b.call(void 0,{animatedElement:e.element,target:e})},onExit:function(){k&&k.call(void 0,{animatedElement:e.element,target:e})},onExiting:function(){w&&w.call(void 0,{animatedElement:e.element,target:e})},onExited:function(){O&&O.call(void 0,{animatedElement:e.element,target:e}),C&&C.call(void 0,{animatedElement:e.element,target:e})},classNames:{appear:f[u+"-appear"]||u+"-appear",appearActive:f[u+"-appear-active"]||u+"-appear-active",enter:f[u+"-enter"]||u+"-enter",enterActive:f[u+"-enter-active"]||u+"-enter-active",exit:f[u+"-exit"]||u+"-exit",exitActive:f[u+"-exit-active"]||u+"-exit-active"}};return o.createElement(l.CSSTransition,d({},j,M,{nodeRef:this.elementRef}),(function(t){return o.createElement("div",{style:d({},P,_[t]),className:D,ref:e.elementRef},n)}))},t.propTypes={in:i.bool,children:i.oneOfType([i.arrayOf(i.node),i.node]),transitionName:i.string.isRequired,className:i.string,appear:i.bool,enter:i.bool,exit:i.bool,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired,mountOnEnter:i.bool,unmountOnExit:i.bool,animationEnteringStyle:i.object,animationEnteredStyle:i.object,animationExitingStyle:i.object,animationExitedStyle:i.object},t.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:s.a,onEntering:s.a,onEntered:s.a,onExit:s.a,onExiting:s.a,onExited:s.a,onAfterExited:s.a,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}},t}(o.Component),m=n(21),v={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652188841,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(){return(y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},k=c.a.styles,w=function(e){function t(t){var n=e.call(this,t)||this;return Object(m.a)(v),n}return g(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.style,r=e.children,i=e.component,s=e.className,c=e.childFactory,u=(e.stackChildren,e.componentChildStyle),d=e.componentChildClassName,p=b(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),f={id:t,style:n,component:i,childFactory:c,className:Object(a.a)(k["animation-container"],k["animation-container-relative"],s)},m=o.Children.map(r||null,(function(e){return o.createElement(h,y({},p,{style:u,className:d}),e)}));return o.createElement(l.TransitionGroup,y({},f),m)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any,transitionName:i.string.isRequired,appear:i.bool.isRequired,enter:i.bool.isRequired,exit:i.bool.isRequired,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired},t.defaultProps={component:"div"},t}(o.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function o(e){var t=[];return e.replace(r,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);t.editorPropsKey=new r.PluginKey("editor-props")},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(74),i=n(61),a=n(5),s=n(45);!function(e){e.alignBlocks=function(e,t,n){return Boolean(a.alignBlocks(t,n)(e.state,e.dispatch))},e.applyInlineStyle=function(e,t,n){return a.applyInlineStyle(t,n)(e.state,e.dispatch)},e.applyLink=function(e,t,n){return a.applyLink(t,n)(e.state,e.dispatch)},e.canIndentList=function(e,t){return a.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return a.canInsert(e,t)},e.canOutdentList=function(e,t){return a.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return a.convertMsLists(e)},e.createDocument=function(e,t,n){return a.parseContent(a.trimWhitespace(t),e,void 0!==n?n:{preserveWhitespace:"full"})},e.createTable=function(e,t,n){return a.createTable(e,t,n)},e.formatBlockElements=function(e,t,n){return a.formatBlockElements(t,n)(e.state,e.dispatch)},e.getBlockFormats=function(e){return a.getBlockFormats(e)},e.getHtml=function(e){return a.getHtml(e)},e.getInlineStyles=function(e,t){return a.getInlineStyles(e,t)},e.getMark=function(e,t){return a.getMark(e,t)},e.hasMark=function(e,t){return a.hasMark(e,t)},e.hasNode=function(e,t){return a.hasNode(e,t)},e.indentBlocks=function(e,t,n,r){return Boolean(a.indentBlocks(t,n,r)(e.state,e.dispatch))},e.indentHtml=function(e){return a.indentHtml(e)},e.insertNode=function(e,t,n){a.insertNode(t,n)(e.state,e.dispatch)},e.isAligned=function(e,t){return a.isAligned(e,t)},e.isIndented=function(e,t,n){return a.isIndented(e,t,n)},e.removeComments=function(e){return a.removeComments(e)},e.removeTag=function(e,t){return a.removeTag(e,t)},e.pasteCleanup=function(e,t){return a.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){a.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){a.sanitizeStyleAttr(e)},e.removeAttribute=function(e){a.removeAttribute(e)},e.sanitize=function(e){return a.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return a.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return a.textHighlight(e)},e.imageResizing=function(e){return a.imageResizing(e)},e.tableResizing=function(){return a.tableResizing()},e.setHtml=function(e,t,n,r){var o=a.trimWhitespace(t);a.setHtml(o,n,r)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,n,r){return a.toggleInlineFormat(t,n,r)(e.state,e.dispatch)},e.toggleList=function(e,t,n){return a.toggleList(e.state,e.dispatch,e,t,n)},e.getShortcuts=function(e){return o.getShortcuts(e)},e.propsKey=s.editorPropsKey,e.imageResizeKey=a.imageResizeKey,e.marks=r({},i.marks),e.nodes=r({},i.nodes)}(t.EditorUtils||(t.EditorUtils={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return ce})),n.d(t,"a",(function(){return ue}));var r=n(0),o=n(15),i=n(1),a=function(e){e.style.transitionDuration="",Array.from(e.classList).forEach((function(t){t.startsWith("k-slide-")&&e.classList.remove(t)}))},s="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),l=n(21),c=n(19),u=n(54),d=n(10),p="bottom",f="center",h="middle",m="left",v="right",g="top";function y(e){return e.ownerDocument||e.document||e}var b=function(e){return y(e).defaultView},k=function(e){return y(e).documentElement},w=0;function C(){if(!w&&"undefined"!=typeof document){var e=document.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML="&nbsp;",document.body.appendChild(e),w=e.offsetWidth-e.scrollWidth,document.body.removeChild(e)}return w}function O(e){var t=b(e),n=k(e),r={height:t.innerHeight,width:t.innerWidth};return n.scrollHeight-n.clientHeight>0&&(r.width-=C()),r}var x=function(e){for(var t=e.offsetParent;t&&"static"===t.style.position;)t=t.offsetParent;return t||k(e)},S=function(e){var t=e.getBoundingClientRect(),n=t.left,r=t.top;return t.height||t.width||(t=function(e){var t=e.style,n=t.display,r=t.left,o=t.position;e.style.display="",e.style.left="-10000px",e.style.position="absolute";var i=e.getBoundingClientRect();return e.style.display=n,e.style.left=r,e.style.position=o,i}(e)),{top:r,left:n,height:t.height,width:t.width}},E=function(e,t){for(var n=[],r=e.parentNode;r&&(n.push(r),r!==t);)r=r.parentNode;return n};function I(e){var t=k(e),n=b(e);return{x:n.pageXOffset||t.scrollLeft||0,y:n.pageYOffset||t.scrollTop||0}}var N=function(e){return e===(e.ownerDocument||{}).body?I(e):{x:e.scrollLeft,y:e.scrollTop}};var T=function(e,t){var n=b(e),r=n.getComputedStyle(e),o=S(e),i=t||x(e),a=e.ownerDocument,s=i!==a.body&&i!==a.documentElement,l={top:0,left:0};if("fixed"!==r.position&&s){var c=n.getComputedStyle(i);(l=S(i)).top+=parseInt(c.borderTopWidth,10),l.left+=parseInt(c.borderLeftWidth,10)}return{top:o.top-l.top,left:o.left-l.left,height:o.height,width:o.width}},M=function(e,t){return e?N(e):function(e){var t=x(e);return t?N(t):{x:0,y:0}}(t)};var D="fit",P="flip",_="none",j=function(e,t,n){var r=0;return e+t>n&&(r=n-(e+t)),e<0&&(r=-e),r},R=function(e){var t=e.offset,n=e.size,r=e.anchorSize,o=e.viewPortSize,i=e.anchorAlignPoint,a=e.elementAlignPoint,s=0,l=2*e.margin;if(a!==i&&!(a===f||a===h)&&!(i===f||i===h)){var c=i===g||i===m;t<0&&c?t+(s=n+r+l)+n>o&&(s=0):t>=0&&!c&&(t+n>o&&(s+=-(r+n+l)),t+s<0&&(s=0))}return s},A=function(e){for(var t=[],n=e.parentNode.firstElementChild;n;)n!==e&&t.push(n),n=n.nextElementSibling;return t},F=function(e,t){for(var n,r,o=E(e),i=t;i&&(n=A(i),!(r=o.reduce((function(e,t){return e.concat(n.filter((function(e){return e===t})))}),[])[0]));)i=i.parentElement;return r};var z,L,B,V,H=(z=function(e){if(!K())return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var r=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),r},B=!1,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return B||(L=z.apply(void 0,e),B=!0),L}),K=function(){return Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},W={eitherRect:function(e,t){return e||{height:0,left:t.left,top:t.top,width:0}},scaleRect:function(e,t){return e&&1!==t?{height:e.height/t,left:e.left/t,top:e.top/t,width:e.width/t}:e},removeStackingOffset:function(e,t){return t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e},hasRelativeStackingContext:H,canUseDOM:K},$=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],q=function(){return W.canUseDOM()?window:null},U=/auto|scroll/,G=function(e){return function(e){return""+e.style.overflow+e.style.overflowX+e.style.overflowY}(e)||function(e){var t=window.getComputedStyle(e);return""+t.overflow+t.overflowX+t.overflowY}(e)},X=function(e){if(!e||!W.hasRelativeStackingContext())return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},J=function(){return W.canUseDOM()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},Y={addOffset:function(e,t){return{left:e.left+t.left,top:e.top+t.top}},addScroll:function(e,t){return{top:e.top+t.y,left:e.left+t.x,height:e.height,width:e.width}},align:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.margin;void 0===i&&(i={});var a=n.horizontal,s=n.vertical,l=o.horizontal,c=o.vertical,u=i.horizontal||0,d=i.vertical||0,m=t.top,g=t.left;return s===p&&(m+=t.height),s!==f&&s!==h||(m+=Math.round(t.height/2)),c===p&&(m-=r.height,d*=-1),c!==f&&c!==h||(m-=Math.round(r.height/2),d*=-1),a===v&&(g+=t.width),a!==f&&a!==h||(g+=Math.round(t.width/2)),l===v&&(g-=r.width,u*=-1),l!==f&&l!==h||(g-=Math.round(r.width/2),u*=-1),{top:m+d,left:g+u}},boundingOffset:function(e){if(!e.getBoundingClientRect){var t=O(e);return{bottom:t.height,left:0,right:t.width,top:0}}var n=e.getBoundingClientRect();return{bottom:n.bottom,left:n.left,right:n.right,top:n.top}},getFontStyles:function(e){var t=q();if(!t||!e)return[];var n=t.getComputedStyle(e);return $.map((function(e){return{key:e,value:n[e]}}))},getWindow:q,hasOffsetParent:function(e){return!!e&&Boolean(e.offsetParent)},offset:function(e){return e?S(e):null},offsetAtPoint:function(e,t){if(!e)return null;var n=e.style,r=n.left,o=n.top,i=n.transition;e.style.transition="none",e.style.left=t.left+"px",e.style.top=t.top+"px";var a=S(e);return e.style.left=r,e.style.top=o,e.offsetHeight,e.style.transition=i,a},position:function(e,t,n){return e&&t?function(e,t,n){void 0===n&&(n=1);var r=t?x(t):null,o=T(e,r),i=o.top,a=o.left,s=o.height,l=o.width,c=M(r,e),u=c.x,d=c.y,p=e.ownerDocument,f=r===p.body||r===p.documentElement?1:n;return{top:i+d*f,left:a+u*f,height:s,width:l}}(e,t,n||1):null},removeScroll:function(e,t){return{top:e.top-t.y,left:e.left-t.x,height:e.height,width:e.width}},restrictToView:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.collisions,a=e.viewPort,s=e.margin;void 0===s&&(s={});var l=r.top,c=r.left,u=r.height,d=r.width,p=a.height,f=a.width,h=s.horizontal||0,m=s.vertical||0,v=0,g=0,y=i.vertical===D,b=i.horizontal===D,k=i.vertical===P,w=i.horizontal===P;y&&(g+=j(l,u,p)),b&&(v+=j(c,d,f)),k&&(g+=R({margin:m,offset:l,size:u,anchorSize:t.height,viewPortSize:p,anchorAlignPoint:n.vertical,elementAlignPoint:o.vertical})),w&&(v+=R({margin:h,offset:c,size:d,anchorSize:t.width,viewPortSize:f,anchorAlignPoint:n.horizontal,elementAlignPoint:o.horizontal}));var C=k&&0!==g,O=w&&0!==v,x=y&&0!==g,S=b&&0!==v;return{flipped:O||C,fitted:x||S,flip:{horizontal:O,vertical:C},fit:{horizontal:S,vertical:x},offset:{left:v,top:g}}},scrollPosition:I,scrollableParents:function(e){var t=[];if(!W.canUseDOM())return t;for(var n=e.parentElement;n;)(U.test(G(n))||n.hasAttribute("data-scrollable"))&&t.push(n),n=n.parentElement;return t.push(window),t},getRelativeContextElement:X,stackingElementOffset:function(e){var t=X(e);return t?S(t):null},stackingElementScroll:function(e){var t=X(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},stackingElementViewPort:function(e){var t=X(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},useRelativePosition:function(e){return Boolean(X(e))},windowViewPort:O,zoomLevel:J,isZoomed:function(){return J()>1},zIndex:function(e,t){if(!e||!W.canUseDOM())return null;var n=F(e,t);if(!n)return null;var r=[e].concat(E(e,n)).reduce((function(e,t){var n=t.style.zIndex||window.getComputedStyle(t).zIndex,r=parseInt(n,10);return r>e?r:e}),0);return r?r+1:null}},Z=function(e,t){return e?{x:0,y:0}:Y.scrollPosition(t)},Q=function(e){var t=e.anchor,n=e.element,r=e.anchorAlign,o=e.elementAlign,i=e.margin,a=e.offset,s=e.positionMode,l=e.scale||1,c="fixed"===s||!Y.hasOffsetParent(n)?function(e,t,n,r){var o=Z(e,t),i=W.eitherRect(Y.offset(e),n),a=2*r,s=Y.stackingElementScroll(t);1!==r&&s&&(s.x/=a,s.y/=a);var l=Y.stackingElementOffset(t);return 1!==r&&l&&(l.left/=a,l.top/=a),Y.removeScroll(Y.addScroll(W.removeStackingOffset(W.scaleRect(i,r),l),s),o)}(t,n,a,l):function(e,t,n,r){var o=W.eitherRect(Y.position(e,t,r),n);return W.scaleRect(o,r)}(t,n,a,l),u=W.scaleRect(Y.offset(n),l);return Y.align({anchorAlign:r,anchorRect:c,elementAlign:o,elementRect:u,margin:i})},ee=function(e){var t=e.anchor,n=e.currentLocation,r=e.element,o=e.anchorAlign,i=e.elementAlign,a=e.collisions,s=e.margin,l=e.scale||1,c=Y.offsetAtPoint(r,n),u=W.scaleRect(c,l),d=W.scaleRect(Y.offset(t),l),p=W.eitherRect(d,n),f=e.viewPort||Y.windowViewPort(r);f.width=f.width/l,f.height=f.height/l;var h=Y.restrictToView({anchorAlign:o,anchorRect:p,collisions:a,elementAlign:i,elementRect:u,margin:s,viewPort:f}),m=Y.addOffset(n,h.offset);return{flip:h.flip,flipped:h.flipped,offset:m}},te={name:"@progress/kendo-react-popup",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652188863,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},ne=(V=function(e,t){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),re=function(){return(re=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function oe(e,t){if(e===t)return!0;if(!!e!=!!t)return!1;var n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(e[i]!==t[i])return!1}return!0}var ie,ae={left:-1e3,top:0};!function(e){e.hiding="hiding",e.hidden="hidden",e.showing="showing",e.shown="shown",e.reposition="reposition"}(ie||(ie={}));var se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={current:ie.hidden,previous:ie.hidden,props:{}},n._popup=null,n.show=function(e){n.setPosition(e),n.animate(e.firstChild,"enter",n.onOpened),n.setState({current:ie.shown,previous:n.state.current})},n.setPosition=function(e){var t=n.props,r=t.anchorAlign,o=t.popupAlign,i=t.collision,a=t.offset,s=t.anchor,l=t.margin,c=t.scale,u=t.positionMode,d=Q({anchor:s,anchorAlign:r,element:e,elementAlign:o,offset:a,margin:l,positionMode:u,scale:c}),p=ee({anchor:s,anchorAlign:r,element:e,elementAlign:o,collisions:i,currentLocation:d,margin:n.props.margin});if(e.style.top=p.offset.top+"px",e.style.left=p.offset.left+"px",n._collisions={fit:p.fit,fitted:p.fitted,flip:p.flip,flipped:p.flipped},n.props.onPosition){var f={target:n,flipped:p.flipped,fitted:p.fitted};n.props.onPosition.call(void 0,f)}},n.onOpened=function(){var e=n._popup;e&&(n.props.show&&e.classList.add("k-animation-container-shown"),n.attachRepositionHandlers(e),n.props.onOpen&&n.props.onOpen.call(void 0,{target:n}))},n.animate=function(e,t,r){if(n.props.popupAlign){var o,i=n.props.popupAlign,l=i.horizontal,c=i.vertical;o="left"===l&&"center"===c?"right":"right"===l&&"center"===c?"left":"top"===c?"down":"up";n._collisions&&n._collisions.flipped&&(o={down:"up",up:"down",left:"right",right:"left"}[o]),function(e,t,n,r,o){if(0===n)return o();var i="k-slide-"+t+"-"+r,l=i+"-active",c=function(t){t.target===e&&(e.removeEventListener("transitionend",c),a(e),o())};e.addEventListener("transitionend",c);var u=e.ownerDocument;if(u){var d=u.defaultView;if(d){var p=function(){a(e),e.classList.add(i),d.requestAnimationFrame((function(){e.style.transitionDuration=n+"ms",e.classList.add(l)}))};s?d.requestAnimationFrame(p):p()}}}(e,o,n.animationDuration[t],t,r)}},n.onClosing=function(e){n.props.show||e.classList.remove("k-animation-container-shown"),n.detachRepositionHandlers()},n.onClosed=function(){n.state.current===ie.hiding&&n.state.previous===ie.shown&&n.setState({current:ie.hidden,previous:n.state.current}),n.props.onClose&&n.props.onClose.call(void 0,{target:n})},n.getCurrentZIndex=function(){return n.context?n.context+1:100},Object(l.a)(te),n.reposition=function(e,t,n){var r,o,i,a;void 0===n&&(n={});var s=0;n=n||{};var l=function(){s=!1===n.leading?0:(new Date).getTime(),r=null,a=e.apply(o,i),r||(o=i=null)};return function(){var c=(new Date).getTime();s||!1!==n.leading||(s=c);var u=t-(c-s);return o=this,i=arguments,u<=0||u>t?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=window.setTimeout(l,u)),a}}(n.reposition.bind(n),1e3/60),n}return ne(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._popup},enumerable:!0,configurable:!0}),t.getDerivedStateFromProps=function(e,t){var n=e.show,r=e.anchor,o=e.anchorAlign,i=e.appendTo,a=e.collision,s=e.popupAlign,l=e.className,c=e.popupClass,u=e.style,d=e.offset,p=e.contentKey,f=re({},t,{props:{show:n,anchor:r,anchorAlign:o,appendTo:i,collision:a,popupAlign:s,className:l,popupClass:c,style:u,offset:d,contentKey:p}});return e.show?t.current===ie.hidden||t.current===ie.hiding?re({},f,{current:ie.showing,previous:t.current}):t.current===ie.showing?re({},f,{current:ie.shown,previous:t.current}):t.current!==ie.shown||oe(d,t.props.offset)&&oe(o,t.props.anchorAlign)&&oe(i,t.props.appendTo)&&oe(a,t.props.collision)&&oe(s,t.props.popupAlign)&&oe(u,t.props.style)&&r===t.props.anchor&&c===t.props.popupClass&&l===t.props.className?f:re({},f,{current:ie.reposition,previous:t.current}):t.current===ie.hiding||t.current===ie.hidden?re({},f,{current:ie.hidden,previous:t.current}):re({},f,{current:ie.hiding,previous:t.current})},t.prototype.componentDidUpdate=function(e){this.state.current===ie.showing&&this._popup?this.show(this._popup):this.state.current===ie.hiding&&this._popup?(this.onClosing(this._popup),this.animate(this._popup.firstChild,"exit",this.onClosed)):this.state.current===ie.reposition&&this.state.previous===ie.shown?this.setState({current:ie.shown,previous:this.state.current}):this.state.current===ie.shown&&e.contentKey!==this.props.contentKey&&this._popup&&this.setPosition(this._popup)},t.prototype.componentDidMount=function(){this.state.current===ie.showing&&this._popup&&this.show(this._popup)},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers()},t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=t.className,a=t.popupClass,s=t.show,l=t.id,p=t.positionMode,f=this.props.appendTo?this.props.appendTo:c.a?this.props.anchor&&this.props.anchor.ownerDocument?this.props.anchor.ownerDocument.body:document.body:void 0;this.state.current===ie.reposition&&this.state.previous===ie.shown&&this._popup&&this.setPosition(this._popup);var h=Object.assign({},{position:p,top:0,left:-1e4},this.props.style||{}),m=this.state.current===ie.hiding;if((s||m)&&f){var v=this.getCurrentZIndex(),g=r.createElement(u.a.Provider,{value:v},r.createElement("div",{className:Object(d.a)("k-animation-container","k-animation-container-relative",i),id:l,ref:function(t){return e._popup=t},style:re({zIndex:v},h)},r.createElement("div",{className:Object(d.a)("k-popup",a,"k-child-animation-container"),style:{transitionDelay:"0ms"}},n)));return null!==this.props.appendTo?o.createPortal(g,f):g}return null},Object.defineProperty(t.prototype,"animationDuration",{get:function(){var e=this.props.animate,t=0,n=0;return e&&(!0===e?t=n=300:(t=e.openDuration||0,n=e.closeDuration||0)),{enter:t,exit:n}},enumerable:!0,configurable:!0}),t.prototype.attachRepositionHandlers=function(e){var t=this;this.detachRepositionHandlers(),this._scrollableParents=Y.scrollableParents(this.props.anchor||e),this._scrollableParents.map((function(e){return e.addEventListener("scroll",t.reposition)})),window.addEventListener("resize",this.reposition)},t.prototype.detachRepositionHandlers=function(){var e=this;this._scrollableParents&&(this._scrollableParents.map((function(t){return t.removeEventListener("scroll",e.reposition)})),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},t.prototype.reposition=function(){this.setState({current:ie.reposition,previous:this.state.current})},t.propTypes={anchor:function(e){var t=e.anchor;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed."):null},appendTo:function(e){var t=e.appendTo;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed."):null},className:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),id:i.string,popupClass:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),collision:i.shape({horizontal:i.oneOf([D,P,_]),vertical:i.oneOf([D,P,_])}),anchorAlign:i.shape({horizontal:i.oneOf([m,f,v]),vertical:i.oneOf([g,f,p])}),popupAlign:i.shape({horizontal:i.oneOf([m,f,v]),vertical:i.oneOf([g,f,p])}),offset:i.shape({left:i.number,top:i.number}),children:i.oneOfType([i.element,i.node]),show:i.bool,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),margin:i.shape({horizontal:i.number,vertical:i.number}),positionMode:i.oneOf(["fixed","absolute"]),scale:i.number,style:i.object,onClose:i.func,onPosition:i.func,onOpen:i.func},t.defaultProps={collision:{horizontal:D,vertical:P},anchorAlign:{horizontal:m,vertical:p},popupAlign:{horizontal:m,vertical:g},offset:ae,animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},t.contextType=u.a,t.displayName="PopupComponent",t}(r.Component),le=function(){return(le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ce=r.createContext((function(e){return e})),ue=r.forwardRef((function(e,t){var n=r.useContext(ce).call(void 0,e);return r.createElement(se,le({ref:t},n))}));ue.displayName="Popup"},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(0),i=function(e,t){var n=0,r=null;return t.forEach((function(t){if(t&&e){var o=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=Math.max(r.top,n.top),i=Math.max(r.left,n.left),a=Math.min(r.left+r.width,n.left+n.width),s=Math.min(r.top+r.height,n.top+n.height),l=a-i,c=s-o;if(i<a&&o<s){var u=r.width*r.height,d=n.width*n.height,p=l*c;return Number((p/(u+d-p)).toFixed(4))}return 0}(e,t);o>n&&(n=o,r=t)}})),r},a=function(){var e=window&&window.navigator.userAgent;if(!e)return!1;var t=!1,n=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var o in r)if(r.hasOwnProperty(o)&&(n=e.match(r[o]))){(t={})[o]=!0,t[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.DOCUMENT_NODE||n[2],10);break}return t},s=function(e){return e&&e.ownerDocument||window.document},l=function(e){var t=a(),n=s(e);return t.edge||t.safari?n.body:n.documentElement},c=function(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=window.getComputedStyle(e,"overflow").overflow;return t.indexOf("auto")>-1||t.indexOf("scroll")>-1},u=function(e){var t=l(e);if(!e||e===document.body||e===document.documentElement)return t;for(var n=e;n&&n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&!c(n);)n=n.parentNode;return n===document.body||n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t:n};!function(e){e.POINTER_DOWN="pointerdown",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.POINTER_CANCEL="pointercancel",e.MOUSE_DOWN="mousedown",e.MOUSE_MOVE="mousemove",e.MOUSE_UP="mouseup",e.CONTEXT_MENU="contextmenu",e.TOUCH_START="touchstart",e.TOUCH_MOVE="touchmove",e.TOUCH_END="touchend",e.TOUCH_CANCEL="touchcancel",e.SCROLL="scroll",e.START="KENDO_DRAG_AND_DROP_START",e.MOVE="KENDO_DRAG_AND_DROP_MOVE",e.END="KENDO_DRAG_AND_DROP_END",e.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(r||(r={}));var d=function(){},p=function(e,t,n){void 0===n&&(n={});var o,a,c,p,f=n.onIsPressedChange,h=void 0===f?d:f,m=n.onIsScrollingChange,v=void 0===m?d:m,g=n.onVelocityChange,y=void 0===g?d:g,b=n.onOffsetChange,k=void 0===b?d:b,w=n.onPageOffsetChange,C=void 0===w?d:w,O=n.onClientOffsetChange,x=void 0===O?d:O,S=n.onScrollOffsetChange,E=void 0===S?d:S,I=n.onInitialScrollOffsetChange,N=void 0===I?d:I,T=t.payload,M=T.element,D=T.hint,P=e.autoScrollDirection,_=e.scrollableParent,j=function(e,t){return function(e){return/^touch/.test(e.type)}(e)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(e){return/^(scroll)/.test(e.type)}(e)?{pageX:t.pageOffset.x,pageY:t.pageOffset.y,clientX:t.clientOffset.x,clientY:t.clientOffset.y,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,originalEvent:e}}(t.event,e);switch(j.type){case r.POINTER_DOWN:if(j.type===r.POINTER_DOWN&&(!j.originalEvent.isPrimary||0!==j.originalEvent.button))break;case r.MOUSE_DOWN:if(j.type===r.MOUSE_DOWN&&j.originalEvent.which&&j.originalEvent.which>1||e.ignoreMouse)break;case r.TOUCH_START:if(j.type===r.TOUCH_START&&1!==j.originalEvent.touches.length)break;case r.START:var R=_||u(t.payload.element);N(R instanceof Window?{x:R.scrollX,y:R.scrollY}:{x:R.scrollLeft,y:R.scrollTop}),x({x:j.clientX,y:j.clientY}),C({x:j.pageX,y:j.pageY}),k({x:j.offsetX,y:j.offsetY}),h(!0),T.onPress&&T.onPress(j);break;case r.SCROLL:if(j.type===r.SCROLL&&!e.pressed)break;var A=_||u(M),F=A instanceof Window?{x:A.scrollX,y:A.scrollY}:{x:A.scrollLeft,y:A.scrollTop};j.scrollX=F.x-e.initialScrollOffset.x,j.scrollY=F.y-e.initialScrollOffset.y,E({x:j.scrollX,y:j.scrollY});case r.POINTER_MOVE:if(j.type===r.POINTER_MOVE&&!j.originalEvent.isPrimary)break;case r.MOUSE_MOVE:case r.TOUCH_MOVE:if(j.type===r.TOUCH_MOVE&&1!==j.originalEvent.touches.length)break;case r.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==j.originalEvent.type&&M){var z=s(M),L=_||u(z.elementFromPoint(j.clientX,j.clientY)),B=function(e,t,n){var r={x:0,y:0};return e-n.left<50?r.x=-(50-(e-n.left)):n.right-e<50&&(r.x=50-(n.right-e)),t-n.top<50?r.y=-(50-(t-n.top)):n.bottom-t<50&&(r.y=50-(n.bottom-t)),r}(j.pageX,j.pageY,function(e,t){var n=l(e);if(e===n)return{top:n.scrollTop,left:n.scrollLeft,bottom:n.scrollTop+t.innerHeight,right:n.scrollLeft+t.innerWidth};var r=e.getBoundingClientRect();return{bottom:r.top+r.height,right:r.left+r.width,left:r.left,top:r.top}}(L,function(e){var t=s(e);return t&&t.defaultView||window}(M)));y({x:P&&!1===P.horizontal?0:B.x,y:P&&!1===P.vertical?0:B.y}),v(0!==B.y||0!==B.x)}!e.drag&&T.onDragStart&&T.onDragStart(j),T.onDrag&&T.onDrag(j);var V=i(D||M,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(D||M)}))),H=e.drops.find((function(e){return e.element===V}));H&&V&&(o=j.clientX,a=j.clientY,c=_||u(V),(p=c.getBoundingClientRect()).top<=a&&p.left<=o&&a<=p.bottom&&o<=p.right)&&V!==M?(e.drop&&e.drop.element)!==V?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(j),H.onDragEnter&&H.onDragEnter(j)):H.onDragOver&&H.onDragOver(j):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(j)}x({x:j.clientX,y:j.clientY}),C({x:j.pageX,y:j.pageY});break;case r.POINTER_UP:if(j.type===r.POINTER_UP&&!j.originalEvent.isPrimary)break;case r.MOUSE_UP:case r.TOUCH_END:if(j.type===r.TOUCH_END&&1!==j.originalEvent.touches.length)break;case r.END:h(!1),v(!1),T.onRelease&&T.onRelease(j),e.drop&&e.drop.onDrop&&e.drop.onDrop(j),T.onDragEnd&&T.onDragEnd(j);break;case r.POINTER_CANCEL:case r.CONTEXT_MENU:case r.TOUCH_CANCEL:case r.CANCEL:h(!1),v(!1),T.onDragEnd&&T.onDragEnd(j),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(j)}},f=function(e,t){if(e){var n,r;e===l(e)?(n=document.body.scrollHeight>window.innerHeight,r=document.body.scrollWidth>window.innerWidth):(n=e.offsetHeight<=e.scrollHeight,r=e.offsetWidth<=e.scrollWidth);var o=e.scrollTop+t.y,i=n&&o>0&&o<e.scrollHeight,a=e.scrollLeft+t.x,s=r&&a>0&&a<e.scrollWidth;i?e.scrollTop+=t.y:n&&o<0&&(e.scrollTop=0),s?e.scrollLeft+=t.x:r&&a<0&&(e.scrollLeft=0)}},h=n(6),m=n(30),v=n(13);function g(e,t,n){void 0===n&&(n={});var r=t.onPress,i=void 0===r?h.a:r,a=t.onRelease,s=void 0===a?h.a:a,l=t.onDragStart,c=void 0===l?h.a:l,d=t.onDrag,g=void 0===d?h.a:d,y=t.onDragEnd,b=void 0===y?h.a:y,k=n.hint,w=void 0===k?null:k,C=n.mouseOnly,O=void 0!==C&&C,x=n.autoScroll,S=void 0===x||x,E=n.scrollContainer,I=void 0===E?null:E,N=o.useState(!1),T=N[0],M=N[1],D=o.useState(!1),P=D[0],_=D[1],j=Object(m.a)(v.c)[0],R=Object(m.a)(v.a),A=R[0],F=R[1],z=o.useContext(v.d)[0],L=o.useContext(v.b),B=L[0],V=L[1],H=L[2],K=o.useRef({x:0,y:0}),W=o.useRef(),$=o.useRef(!1),q=o.useRef(),U=o.useRef(null),G=o.useRef(!1),X=o.useRef({x:0,y:0}),J=o.useRef({x:0,y:0}),Y=o.useRef({x:0,y:0}),Z=o.useRef({x:0,y:0}),Q=o.useRef({x:0,y:0}),ee=o.useRef({x:0,y:0}),te=Boolean("undefined"!=typeof window&&window.PointerEvent),ne=!O&&te,re=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),oe=o.useCallback((function(){return w&&w.current&&w.current.element?w.current.element:w?w.current:null}),[w]),ie=o.useCallback((function(){return I&&I.current&&I.current.element?I.current.element:I?I.current:null}),[I]),ae=o.useCallback((function(){return"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current&&S.boundaryElementRef.current.element?S.boundaryElementRef.current.element:"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current?S.boundaryElementRef.current:null}),[S]),se=o.useRef(null);o.useImperativeHandle(se,(function(){return{element:re(),hint:oe(),onPress:ke,onDragStart:Ce,onDrag:Oe,onDragEnd:xe,onRelease:we,data:e.current}}));var le=o.useCallback((function(){var e=re();return e&&e.ownerDocument||document}),[re]),ce=o.useCallback((function(){var e=le();return e&&e.defaultView||window}),[le]),ue=o.useCallback((function(){return{drag:A?A.current:null,drop:j?j.current:null,drags:B.map((function(e){return e.current})),drops:z.map((function(e){return e.current})),pressed:T,ignoreMouse:$.current,scrollOffset:Q.current,offset:X.current,pageOffset:J.current,initialScrollOffset:ee.current,clientOffset:Y.current,initialClientOffset:Z.current,velocity:K.current,autoScroll:Boolean("object"==typeof S?!1!==S.enabled:S),scrollableParent:ae(),autoScrollDirection:"object"==typeof S?S.direction:{horizontal:!0,vertical:!0},isScrolling:P}}),[A,j,B,z,T,S,ae,P]),de=o.useCallback((function(e){M(e)}),[]),pe=o.useCallback((function(e){_(e)}),[]),fe=o.useCallback((function(e){K.current=e}),[]),he=o.useCallback((function(e){X.current=e}),[]),me=o.useCallback((function(e){Y.current=e}),[]),ve=o.useCallback((function(e){J.current=e}),[]),ge=o.useCallback((function(e){Z.current=e}),[]),ye=o.useCallback((function(e){Q.current=e}),[]),be=o.useCallback((function(e){ee.current=e}),[]),ke=o.useCallback((function(e){i(e)}),[i]),we=o.useCallback((function(e){s(e)}),[s]),Ce=o.useCallback((function(t){F(se,{target:e.current,event:t}),c(t)}),[F,e,c]),Oe=o.useCallback((function(e){g(e)}),[g]),xe=o.useCallback((function(t){G.current||(F(null,{target:e.current,event:t}),b(t))}),[b,F,e]),Se=o.useCallback((function(e){p(ue(),{event:e,payload:se.current},{onVelocityChange:fe,onOffsetChange:he,onClientOffsetChange:me,onPageOffsetChange:ve,onInitialClientOffsetChange:ge,onScrollOffsetChange:ye,onInitialScrollOffsetChange:be,onIsPressedChange:de,onIsScrollingChange:pe})}),[ue,fe,he,ve,me,ge,be,de,ye,pe]),Ee=o.useCallback((function(e){Se(e)}),[Se]),Ie=o.useCallback((function(e){Se(e)}),[Se]),Ne=o.useCallback((function(e){Se(e)}),[Se]),Te=o.useCallback((function(e){Se(e)}),[Se]),Me=o.useCallback((function(e){Se(e)}),[Se]),De=o.useCallback((function(e){Se(e)}),[Se]),Pe=o.useCallback((function(e){Se(e)}),[Se]),_e=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),je=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),Re=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),Ae=o.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=ce();$.current=!0,q.current=t.setTimeout((function(){$.current=!1}),2e3)}Se(e)}),[Se,ce]),Fe=o.useCallback((function(e){Se(e)}),[Se]),ze=o.useCallback((function(){var e=re();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[re]),Le=o.useCallback((function(){return V(se),function(){H(se)}}),[H,V]);o.useEffect((function(){var e=ce();if(P){var t=ie()||u(document.elementFromPoint(Y.current.x,Y.current.y));e.clearInterval(W.current),W.current=e.setInterval((function(){f(t,{x:K.current.x,y:K.current.y})}),50)}return function(){e.clearInterval(W.current)}}),[re,ie,ce,P]),o.useEffect(ze,[ze]),o.useEffect((function(){var e=ce(),t=re(),n=le();return ne?(t&&(U.current=u(t),U.current&&U.current.addEventListener("scroll",Fe,{passive:!0}),t.addEventListener("pointerdown",Ee,{passive:!0})),T&&(n.addEventListener("pointermove",Ie),n.addEventListener("pointerup",Te,!0),n.addEventListener("contextmenu",_e),n.addEventListener("pointercancel",Ne,{passive:!0}))):(e.addEventListener("touchmove",h.a,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",Me,{passive:!0}),O||(t.addEventListener("touchstart",je,{passive:!0}),T&&(t.addEventListener("touchmove",Re,{passive:!0}),t.addEventListener("touchend",Ae,{passive:!0})))),T&&(n.addEventListener("mousemove",De,{passive:!0}),n.addEventListener("mouseup",Pe,{passive:!0}))),function(){U.current&&U.current.removeEventListener("scroll",Fe),t&&(t.removeEventListener("pointerdown",Ee),t.removeEventListener("mousedown",Me),t.removeEventListener("touchstart",je),t.removeEventListener("touchmove",Re),t.removeEventListener("touchend",Ae)),n.removeEventListener("pointermove",Ie),n.removeEventListener("pointerup",Te,!0),n.removeEventListener("contextmenu",_e),n.removeEventListener("pointercancel",Ne),n.removeEventListener("mousemove",De),n.removeEventListener("mouseup",Pe),e.removeEventListener("touchmove",h.a),e.clearTimeout(q.current)}}),[T,ce,re,le,O,ne,_e,Me,De,Pe,Ne,Ee,Ie,Te,Ae,Re,je,Fe]),o.useEffect((function(){return function(){G.current=!0}}),[]),o.useLayoutEffect(Le,[Le])}},,function(e,t,n){"use strict";var r,o=n(0),i=n(1),a=n(10),s=n(22),l=n(21),c=n(11),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};var f=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,n.handleClick=function(e){n.toggleIfApplicable(),n.props.onClick&&n.props.onClick.call(void 0,e)},Object(l.a)(c.a),n.state={selected:!0===n.props.togglable&&!0===n.props.selected},n}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return void 0!==this._selectedTemp?this._selectedTemp:this.state.selected},enumerable:!0,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.togglable&&void 0!==e.selected&&e.selected!==t.selected?{selected:e.selected}:null},t.prototype.render=function(){var e,n=this,r=this.props,i=r.children,l=r.togglable,c=r.icon,u=r.iconClass,f=r.imageUrl,h=r.imageAlt,m=(r.className,r.onClick,r.size),v=void 0===m?t.defaultProps.size:m,g=r.shape,y=void 0===g?t.defaultProps.shape:g,b=r.rounded,k=void 0===b?t.defaultProps.rounded:b,w=r.fillMode,C=void 0===w?t.defaultProps.fillMode:w,O=r.themeColor,x=void 0===O?t.defaultProps.themeColor:O,S=p(r,["children","togglable","icon","iconClass","imageUrl","imageAlt","className","onClick","size","shape","rounded","fillMode","themeColor"]),E=void 0!==c||void 0!==u||void 0!==f,I=void 0!==i,N=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass,i=e.imageAlt;if(t)return o.createElement("img",{role:"presentation",className:"k-button-icon",alt:i,src:t});if(n){var s=Object(a.a)("k-button-icon k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:s})}return r?o.createElement("span",{role:"presentation",className:Object(a.a)("k-button-icon",r)}):null}({icon:c,iconClass:u,imageUrl:f,imageAlt:h});return o.createElement("button",d({ref:function(e){return n._element=e},role:l?"checkbox":void 0,"aria-disabled":this.props.disabled||void 0,"aria-checked":l?this.state.selected:void 0},S,{onClick:this.handleClick,className:Object(a.a)("k-button",(e={},e["k-button-"+(s.a.sizeMap[v]||v)]=v,e["k-button-"+y]=y,e["k-button-"+C]=C,e["k-button-"+C+"-"+x]=Boolean(C&&x),e["k-rounded-"+(s.a.roundedMap[k]||k)]=k,e["k-icon-button"]=!I&&E,e["k-disabled"]=this.props.disabled,e["k-selected"]=this.state.selected,e["k-rtl"]="rtl"===this.props.dir,e),this.props.className)}),N,i&&o.createElement("span",{className:"k-button-text"},i))},t.prototype.toggleIfApplicable=function(){var e=this;if(this.props.togglable&&void 0===this.props.selected){var t=!this.state.selected;this._selectedTemp=t,this.setState({selected:t},(function(){return e._selectedTemp=void 0}))}},t.propTypes={children:i.node,selected:i.bool,togglable:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,imageAlt:i.string,size:i.oneOf([null,"small","medium","large"]),shape:i.oneOf([null,"rectangle","square"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"flat","link","outline","solid"]),themeColor:i.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},t.defaultProps={togglable:!1,size:"medium",shape:"rectangle",rounded:"medium",fillMode:"solid",themeColor:"base"},t}(o.Component);t.a=f},function(e,t,n){"use strict";var r,o=n(0),i=n(1),a=n(10),s=n(21),l=n(11),c=n(34),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=c.a.styles,f=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,Object(s.a)(l.a),n}return u(t,e),t.prototype.render=function(){var e,t=this,n=this.mapButtons(this.props.children),r=Object(a.a)([p["button-group"]],((e={})["k-disabled"]=this.props.disabled,e[p["button-group-stretched"]]=!!this.props.width,e),this.props.className),i={className:r,style:{width:""+this.props.width},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return o.createElement("div",d({ref:function(e){t._element=e}},i,{className:r}),n)},t.prototype.mapButtons=function(e){var t=this,n=o.Children.count(e),r=void 0!==this.props.dir?"rtl"===this.props.dir:this._element&&"rtl"===getComputedStyle(this._element).direction||!1;return o.Children.map(e,(function(e,i){return o.isValidElement(e)?t.renderButton(e,i,i===n-1,r):e}))},t.prototype.renderButton=function(e,t,n,r){var i,s=Object(a.a)(e.props.className,((i={})[p["group-start"]]=r?n:0===t,i[p["group-end"]]=r?0===t:n,i)),l=d({},this.props.width?{width:this.props.width}:{},e.props.style||{}),c=this.props.disabled||e.props.disabled,u=d({},e.props,s?{className:s}:{},Object.keys(l).length?{style:l}:{},void 0!==c?{disabled:c}:{});return o.Children.count(e.props.children)>0?o.cloneElement(e,u,e.props.children):o.cloneElement(e,u)},t.propTypes={children:i.oneOfType([i.arrayOf(i.element),i.element]),className:i.string,disabled:i.bool,width:i.string,dir:i.string},t}(o.Component);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}},function(e,t,n){"use strict";function r(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(0),o=r.createContext(0),i=function(){return r.useContext(o)};o.displayName="KendoReactZIndexContext"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var t=e.querySelector('input, [tabindex]:not([tabindex="-1"])');t&&t.focus&&t.focus()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(29),o=n(19),i=function(){return!(!o.a||!document.body)&&(new r.a).scrollbarWidth},a=function(){if(!o.a||!document.body)return!1;var e=(new r.a).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n){var o;return n?r({},e,((o={})[t]=n.length?n.slice():void 0,o)):e&&e[t]?e[t].slice():[]}var i=function(e,t,n){return e.map((function(e){return function e(t,n,r){if(t[n]){var i=o(t,n).map((function(t){return e(t,n,r)}));return r(o(t,n,i))}return r(t)}(e,t,n)})).slice()},a=function(e,t,n,r){for(var o=e,i=[],a=0;a<t.length;a++)o=o[t[a]],o=Array.isArray(o)?o:o[n],i.push(o);var s=i.length>1?i[i.length-2]:e,l=t[t.length-1],c=r(s[l]);s.splice(l,1,c)},s=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},l=function(e,t,n){var r=[],o=t.slice();if(o.length){var i=e[o.shift()||0];for(r.push(i);o.length&&n;)i=i[n][o.shift()||0],r.push(i)}return r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),o=n(33),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=function(){return r.createContext((function(e){return e}))},s=function(e,t){return r.forwardRef((function(n,a){var s=Object(o.a)(e,n);return r.createElement(t,i({},s,{ref:a}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(48),i=r.forwardRef((function(e,t){var n=r.useRef(null),i=r.useRef(null),a=r.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);r.useImperativeHandle(i,(function(){return{element:a()||null}})),r.useImperativeHandle(t,(function(){return i.current})),r.useImperativeHandle(e.childRef,(function(){return n.current}));var s=r.useCallback((function(t){e.onPress&&e.onPress({element:a(),target:i.current,event:t})}),[a,e.onPress]),l=r.useCallback((function(t){e.onRelease&&e.onRelease({element:a(),target:i.current,event:t})}),[a,e.onRelease]),c=r.useCallback((function(t){e.onDragStart&&e.onDragStart({element:a(),target:i.current,event:t})}),[e,a]),u=r.useCallback((function(t){e.onDrag&&e.onDrag({element:a(),target:i.current,event:t})}),[a,e.onDrag]),d=r.useCallback((function(t){e.onDragEnd&&e.onDragEnd({element:a(),target:i.current,event:t})}),[a,e.onDragEnd]);return Object(o.a)(n,{onPress:s,onRelease:l,onDragStart:c,onDrag:u,onDragEnd:d},{mouseOnly:e.mouseOnly,autoScroll:e.autoScroll,hint:e.hint,scrollContainer:e.scrollContainer}),e.children?r.cloneElement(r.Children.only(e.children),{ref:n}):null}));i.displayName="KendoReactDraggable"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);t.marks=r.marks,t.nodes=r.nodes},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(4),l=n(31),c=n(102),u=n(3),d=n(7),p=n(14),f=n(9),h=n(5),m={className:"k-checkbox k-checkbox-md k-rounded-md",type:"checkbox"},v=p.EditorToolsSettings.findAndReplace,g=function(e){function t(t){var n=e.call(this,t)||this;return n.onTabSelect=function(e){n.setState({selectedTab:e.selected})},n.onClose=function(){var e=n.props.view,t=e.state,r=t.tr.setSelection(h.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(r)),e.focus(),n.props.onClose.call(void 0)},n.matchesMessage=function(e){var t=n.state.matches,r=n.state.nextMatch,o=0,i=0;if(t&&r){var a=t.findIndex((function(e){return e.eq(r)}));o=-1===a?t.length:a+1,i=t.length}return f.formatString(e,o,i)},n.onFindNext=function(){n.onFind()},n.onFindPrev=function(){n.onFind(!0)},n.onFind=function(e){void 0===e&&(e=!1);var t=n.props.view,r=n.state,o=r.searchText,i=r.matchCase,a=r.matchCyclic,s={text:o,matchWord:r.matchWord,matchCase:i,useRegExp:r.useRegExp,backward:e,matchCyclic:a},l=h.find(t.state,s);if(l){var c=t.state.tr.setSelection(l);c.scrollIntoView(),t.updateState(t.state.apply(c)),n.setState({nextMatch:l})}},n.onReplace=function(){var e=n.props.view,t=e.state.selection,r=n.state.replaceText;if(!t.empty){var o=t.from,i=o+r.length,a=h.replace(t,r,e.state.tr);a.setSelection(h.TextSelection.create(a.doc,o,i)),a.scrollIntoView(),e.dispatch(a),n.setNextState({})}},n.onReplaceAll=function(){var e=n.props.view,t=n.state,r=t.searchText,o=t.replaceText,i=t.matchCase,a={text:r,matchWord:t.matchWord,matchCase:i,useRegExp:t.useRegExp};e.dispatch(h.replaceAll(e.state,o,a)),n.setNextState({})},n.onKeyDown=function(e){13===e.keyCode?n.onFindNext():27===e.keyCode&&n.onClose()},n.onMatchCaseChecked=function(e){return n.setNextState({matchCase:e.target.checked})},n.onMatchWordChecked=function(e){return n.setNextState({matchWord:e.target.checked})},n.onMatchCyclicChecked=function(e){return n.setNextState({matchCyclic:e.target.checked})},n.onUseRegExpChecked=function(e){return n.setNextState({useRegExp:e.target.checked})},n.onSearchChange=function(e){return n.setNextState({searchText:e.target.value})},n.onReplaceChange=function(e){return n.setNextState({replaceText:e.target.value})},n.setNextState=function(e){var t=i({},n.state,e,{matches:void 0,nextMatch:void 0}),r=n.props.view;if(t.searchText){var o=t.searchText,a=t.matchWord,s=t.matchCase,l=t.useRegExp,c=t.matchCyclic,u={text:o,matchWord:a,matchCase:s,useRegExp:l},d=r.state.selection,p=h.findAll(r.state.doc,u),f=!n.state.searchText&&p[0]||p.find((function(e){return e.from>=d.from}))||c&&p[0]||void 0;n.setState(i({},t,{matches:p,nextMatch:f}))}else n.setState(t)},n.state={selectedTab:0,searchText:h.selectedLineTextOnly(t.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1},n}return o(t,e),Object.defineProperty(t.prototype,"settings",{get:function(){return this.props.settings||v},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.view,r=this.state,o=r.matches,i=void 0===o?[]:o,a=r.nextMatch;if(t.nextMatch!==a){var s=n.state,l=s.tr,c=[];i.forEach((function(e){c.push({from:e.from,to:e.to,attrs:{class:a&&e.eq(a)?"k-text-selected":"k-text-highlighted"}})})),l.setMeta(h.textHighlightKey,c),l.setSelection(a||h.TextSelection.create(s.doc,s.selection.from)),n.dispatch(l)}},t.prototype.render=function(){var e=u.provideLocalizationService(this),t=this.settings.messages,n=t.findReplaceDialogTitle,r=t.findReplaceTabFind,o=t.findReplaceTabReplace,p=t.findReplaceFindWhat,f=t.findReplaceReplaceWith,h=t.findReplaceReplace,v=t.findReplaceReplaceAll,g=t.findReplaceMatchCase,y=t.findReplaceMatchWord,b=t.findReplaceMatchCyclic,k=t.findReplaceUseRegExp,w=t.findReplacePrevMatch,C=t.findReplaceNextMatch,O=t.findReplaceMatches,x=this.state,S=x.matchCase,E=x.matchWord,I=x.matchCyclic,N=x.useRegExp,T=x.searchText,M=x.replaceText,D=x.nextMatch,P=a.createElement("div",{className:"k-search-options"},a.createElement("span",null,a.createElement("input",i({},m,{id:"match-case",checked:S,onChange:this.onMatchCaseChecked})),a.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(g,d.messages[g]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-whole",checked:E,onChange:this.onMatchWordChecked})),a.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(y,d.messages[y]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-cyclic",checked:I,onChange:this.onMatchCyclicChecked})),a.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(b,d.messages[b]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"regular-expression",checked:N,onChange:this.onUseRegExpChecked})),a.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(k,d.messages[k])))),_=a.createElement("div",{className:"k-matches-container"},a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},a.createElement("span",{className:"k-icon k-i-arrow-chevron-left"}),e.toLanguageString(w,d.messages[w])),a.createElement("span",null,this.matchesMessage(e.toLanguageString(O,d.messages[O]))),a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(C,d.messages[C]),a.createElement("span",{className:"k-icon k-i-arrow-chevron-right"}))),j=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"findWhat"},e.toLanguageString(p,d.messages[p]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"findWhat",type:"text",className:"k-input",value:T,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))),R=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"replaceWith"},e.toLanguageString(f,d.messages[f]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"replaceWith",className:"k-input",type:"text",value:M,onChange:this.onReplaceChange})));return a.createElement(l.Window,{title:e.toLanguageString(n,d.messages[n]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:function(){return null},maximizeButton:function(){return null},appendTo:document.body},a.createElement(c.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},a.createElement(c.TabStripTab,{title:e.toLanguageString(r,d.messages[r])},a.createElement("div",{className:"k-edit-form-container"},j),P,_),a.createElement(c.TabStripTab,{title:e.toLanguageString(o,d.messages[o])},a.createElement("div",{className:"k-edit-form-container"},j,R),a.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplace},e.toLanguageString(h,d.messages[h])),a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplaceAll},e.toLanguageString(v,d.messages[v]))),P,_)))},t}(a.Component);t.FindAndReplaceDialog=g,u.registerForLocalization(g)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),s=n(17),l=n(81);!function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pointerdown=!1,t.onWindowDown=function(e){var n=t.props.anchor;(!n||n!==e.target&&n.firstElementChild!==e.target)&&(t.props.show&&!t.pointerdown&&t.props.onClose(),t.pointerdown=!1)},t.onPointerDown=function(){return t.pointerdown=!0},t}return o(t,e),t.prototype.componentDidUpdate=function(e){e.show&&this.props.show&&this.props.onClose()},t.prototype.componentDidMount=function(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)},t.prototype.componentWillUnmount=function(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)},t.prototype.render=function(){var e=this.props,n=e.show,r=e.anchor,o=e.dir,a=e.rows,c=void 0===a?t.defaultProps.rows:a,u=e.columns,d=void 0===u?t.defaultProps.columns:u,p="rtl"===o?"right":"left";return i.createElement(s.Popup,{anchor:r,anchorAlign:{horizontal:p,vertical:"bottom"},popupAlign:{horizontal:p,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:n,style:"rtl"===o?{direction:"rtl"}:void 0},i.createElement(l.default,{rows:c,columns:d,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))},t.propTypes={show:a.bool.isRequired,createTableMessage:a.string.isRequired,createTableHintMessage:a.string.isRequired,onClose:a.func.isRequired,onTableInsert:a.func.isRequired,anchor:a.any,rows:a.number,columns:a.number,dir:a.string},t.defaultProps={rows:6,columns:8},t}(i.Component);e.InsertTablePopup=t}(t.InsertTablePopupNS||(t.InsertTablePopupNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(9),u=n(3),d=n(7);t.createProseMirrorTool=function(e,t){var n=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return o(r,n),r.prototype.render=function(){var n=this.props,r=n.view,o=n.render,p=a(n,["view","render"]),f=u.provideLocalizationService(this),h=e.messages.title,m=r&&r.state,v=!!m&&!t(m),g=s.createElement(l.Button,i({onClick:function(){return r&&t(r.state,(function(t){return r.dispatch(t.setMeta("commandName",e.commandName))}))},disabled:v},c.onDownPreventDefault,{title:f.toLanguageString(h,d.messages[h])},e.props,p));return o?o.call(void 0,g,{view:r}):g},r}(s.Component);return u.registerForLocalization(n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"getValueMap",(function(){return Ut})),n.d(t,"getMultiSelectTreeValue",(function(){return Gt})),n.d(t,"AutoComplete",(function(){return we})),n.d(t,"AutoCompletePropsContext",(function(){return ke})),n.d(t,"DropDownList",(function(){return ne})),n.d(t,"DropDownListPropsContext",(function(){return te})),n.d(t,"ComboBox",(function(){return he})),n.d(t,"ComboBoxPropsContext",(function(){return fe})),n.d(t,"MultiSelect",(function(){return Fe})),n.d(t,"MultiSelectPropsContext",(function(){return Ae})),n.d(t,"MultiColumnComboBox",(function(){return qe})),n.d(t,"MultiColumnComboBoxPropsContext",(function(){return $e})),n.d(t,"DropDownTree",(function(){return zt})),n.d(t,"DropDownTreePropsContext",(function(){return Ft})),n.d(t,"MultiSelectTree",(function(){return $t})),n.d(t,"MultiSelectTreePropsContext",(function(){return Wt}));var r,o,i=n(0),a=n(1),s=n(22),l=n(10),c=n(26),u=n(39),d=n(58),p=n(107),f=n(47),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.width,r=e.dir,o=e.itemsCount,a=e.popupSettings;return i.createElement(f.a,m({style:{width:n,direction:r},contentKey:o&&o.join()},a),t)},t}(i.Component),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=s.a.sizeMap,b=s.a.roundedMap,k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.size,o=n.rounded,a=n.fillMode,s=n.inputRef;return i.createElement("div",{className:"k-list-filter"},i.createElement("span",{className:Object(l.a)("k-searchbox k-input",(e={},e["k-input-"+(y[r]||r)]=r,e["k-rounded-"+(b[o]||o)]=o,e["k-input-"+a]=a,e))},i.createElement("span",{className:"k-input-icon k-icon k-i-search"}),i.createElement("input",{ref:s||function(e){return t.input=e},value:this.props.value||"",className:"k-input-inner",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown,tabIndex:this.props.tabIndex,onClick:function(e){return e.stopPropagation()}})))},t}(i.Component),w=function(e){return null!=e},C=function(e,t,n){if(!w(e))return!1;var r=String(e);return n&&(r=r.toLowerCase()),0===r.indexOf(t)},O=function(e,t,n){var r=-1;if(t){t=t.toLowerCase();for(var o=0;o<e.length;o++){var i=(S(e[o],n)||"")+"";if(i&&i.toLowerCase().startsWith(t)){r=o;break}}}return r},x=function(e,t,n,r){void 0===r&&(r=!1);var o=function(e){return r?e:e.toLowerCase()};return e.findIndex((function(e){return n?o(S(e,n))===o(t):o(t)===o(e.toString())}))},S=function(e,t){if(t&&w(e)){var n=t.split("."),r=e;return n.forEach((function(e){r=r?r[e]:void 0})),r}return e},E=function(e,t,n){t.forEach((function(t){var r=e.findIndex((function(e){return I(e,t,n)}));-1!==r&&e.splice(r,1)}))},I=function(e,t,n){return e===t||w(e)===w(t)&&S(e,n)===S(t,n)},N=function(e,t,n){if(t){var r=x(e,t,n,!0);return-1!==r?e[r]:e[O(e,t,n)]}return e[0]},T=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},M=function(e,t,n){return!!e==!!t&&e.text===t.text&&(e===t||function(e,t,n){if(void 0===e&&(e=[]),void 0===t&&(t=[]),e===t)return!0;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!I(e[r],t[r],n))return!1;return!0}(e.data,t.data,n))},D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){return e.preventDefault()},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.defaultItem,r=e.textField;return i.createElement("div",{onClick:this.props.onClick,onMouseDown:P,style:{position:"unset"},className:Object(l.a)("k-list-optionlabel",{"k-selected":t})},S(n,r)||"")},t}(i.Component),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.index,e)},t}return j(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.group,r=e.dataItem,o=e.virtual,a=e.render,s=i.createElement("li",{id:this.props.id,role:"option","aria-selected":t,className:Object(l.a)("k-list-item",{"k-selected":t,"k-focus":this.props.focused,"k-first":Boolean(n)}),onClick:this.handleClick,style:{position:o?"relative":"unset"}},i.createElement("span",{className:"k-list-item-text"},S(r,this.props.textField).toString()),void 0!==n?i.createElement("div",{className:"k-list-item-group-label"},n):null);return void 0!==a?a.call(void 0,s,this.props):s},t}(i.Component),A=n(3),F="dropdowns.nodata",z="dropdowns.clear",L=((o={})[z]="clear",o[F]="NO DATA FOUND.",o),B=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.prototype.renderItems=function(){var e=this,t=this.props,n=t.textField,r=t.valueField,o=t.groupField,a=t.optionsGuid,s=t.skip,l=void 0===s?0:s,c=t.virtual,u=t.focusedIndex,d=t.highlightSelected,p=void 0===d||d,f=t.value,h=t.data,m=t.itemRender,v=Array.isArray(f);return h.map((function(t,s){var d,g,y=l+s,b=p&&(!v&&I(t,f,r)||v&&-1!==f.findIndex((function(e){return I(e,t,r)}))),k=void 0;return s>0&&void 0!==o&&(d=S(t,o),g=S(h[s-1],o),d&&g&&d!==g&&(k=d)),i.createElement(R,{id:"option-"+a+"-"+y,virtual:c,dataItem:t,selected:b,focused:u===s,index:y,key:y,onClick:e.props.onClick,textField:n,group:k,render:m})}))},t.prototype.renderNoValueElement=function(e){var t=this.props.noDataRender,n=i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.toLanguageString(F,L[F])));return t?t.call(void 0,n):n},t.prototype.render=function(){var e=Object(A.provideLocalizationService)(this),t=this.props,n=t.id,r=t.show,o=t.wrapperCssClass,a=t.wrapperStyle,s=t.listStyle,l=t.listRef,c=t.wrapperRef,u=t.listClassName,d=void 0===u?"k-list-ul":u,p=this.renderItems();return p.length?i.createElement("div",{className:o,style:a,ref:c,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onScroll:this.props.onScroll,unselectable:"on"},i.createElement("ul",{id:n,role:"listbox","aria-hidden":!r||void 0,className:d,ref:l,style:s},p),this.props.scroller&&i.createElement("div",{className:"k-height-container"},this.props.scroller)):this.renderNoValueElement(e)},t}(i.Component),H=V;Object(A.registerForLocalization)(V);var K=function(){function e(){var e=this;this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.scrollerRef=function(t){var n=e;n.container=t,t&&(t.setAttribute("unselectable","on"),window.setTimeout(n.calcScrollElementHeight.bind(n),0))},this.calcScrollElementHeight=function(){e.scrollSyncing=!0;var t=!1;e.itemHeight=e.list?e.list.children[0].offsetHeight:e.itemHeight,e.containerHeight=Math.min(1533915,e.itemHeight*e.total);var n=e.containerHeight;return e.scrollElement&&(t=e.scrollElement.style.height!==n+"px")&&(e.scrollElement.style.height=n+"px"),e.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}return Object.defineProperty(e.prototype,"translate",{get:function(){return this.listTranslate},enumerable:!0,configurable:!0}),e.prototype.changePage=function(e,t){var n=Math.min(Math.max(0,e),this.total-this.pageSize);n!==this.skip&&this.PageChange({skip:n,take:this.pageSize},t)},e.prototype.translateTo=function(e){this.listTranslate=e,this.list&&(this.list.style.transform="translateY("+e+"px)")},e.prototype.reset=function(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0))},e.prototype.scrollToEnd=function(){this.container&&this.list&&(this.calcScrollElementHeight(),this.container.scrollTop=this.container.scrollHeight-this.container.offsetHeight,this.translateTo(this.container.scrollHeight))},e.prototype.localScrollUp=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=r-o;if(!(i>n)){for(t=0;t<this.skip&&!(o+n+i<=r);t++)o-=n;if(o=this.validateTranslate(o),this.skip-t<=0&&o>=r)return this.translateTo(0),this.changePage(0,e),void(this.container.scrollTop=0);o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip-t,e))}},e.prototype.localScrollDown=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=this.list.children.length;for(t=0;t<i&&!(o+n>=r);t++)o+=n;o=this.validateTranslate(o),t>=i&&this.skip+t>=this.total?(this.translateTo(o),this.changePage(this.total-1,e)):o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip+t,e))},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.min(Math.floor(t),this.total-1),r=this.containerHeight*t/this.total;r=this.validateTranslate(r),this.translateTo(r),this.changePage(n,e)},e.prototype.scrollHandler=function(e){var t=this.container?this.container.scrollTop:0,n=this.prevScrollPos;this.prevScrollPos=t,this.enabled&&this.list&&this.container&&!this.scrollSyncing&&(t-n<=0&&t>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(e):t-n>0&&t<this.listTranslate+2*this.list.scrollHeight/3?this.localScrollDown(e):this.scrollNonStrict(e))},e.prototype.validateTranslate=function(e){return e=Math.max(0,e),e=Math.min(this.containerHeight,e)},e}(),W=function(){function e(){}return e.prototype.navigate=function(e){var t=e.keyCode;return t===c.a.up||t===c.a.left?this.next({current:e.current,min:e.min,max:e.max,step:-1}):t===c.a.down||t===c.a.right?this.next({current:e.current,min:e.min,max:e.max,step:1}):t===c.a.home?0:t===c.a.end?e.max:void 0},e.prototype.next=function(e){return w(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}(),$=n(52),q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},U=function(){function e(e){var t=this;this.vs=new K,this.navigation=new W,this.handleItemClick=function(e,n){var r=t.initState();r.syntheticEvent=n,n.stopPropagation(),t.component.handleItemSelect(e,r),t.togglePopup(r),t.applyState(r)},this.handleFocus=function(e){if(!t.component.state.focused){var n=t.initState();n.data.focused=!0,n.events.push({type:"onFocus"}),n.syntheticEvent=e,t.applyState(n)}},this.filterChanged=function(e,n){var r=t.component.props,o=r.textField;r.filterable&&n.events.push({type:"onFilterChange",filter:{field:o,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=function(e){var n=t.component.props,r=void 0!==n.opened?n.opened:t.component.state.opened;void 0===n.opened&&(e.data.opened=!r),r?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),t.calculatePopupWidth())},this.pageChange=function(e,n){var r=t.initState();r.syntheticEvent=n,t.triggerOnPageChange(r,e.skip,e.take),t.applyState(r)},this.scrollToVirtualItem=function(e,n){var r=t.vs;if(r.enabled=!1,0===e.skip)r.reset();else if(e.skip+e.pageSize===e.total)r.scrollToEnd();else{var o=r.translate;0===o&&(r.calcScrollElementHeight(),o=r.itemHeight*e.skip,r.translateTo(o-r.itemHeight)),r.container&&(r.container.scrollTop=o),t.scrollToItem(n,!0)}window.setTimeout((function(){return r.enabled=!0}),10)},this.renderScrollElement=function(){var e=t.vs;return e.enabled&&i.createElement("div",{ref:function(t){return e.scrollElement=t},key:"scrollElementKey"})},this.listBoxId=Object($.a)(),this.guid=Object($.a)(),this.component=e,this.vs.PageChange=this.pageChange}return e.prototype.didMount=function(){var e=this.component.props,t=e.popupSettings||{},n=e.style||{},r=t.width,o=!0===e.opened;void 0===r&&this.calculatePopupWidth(),void 0===e.dir&&void 0===n.direction&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()},e.prototype.calculateDir=function(){var e=this.component.element;e&&e.ownerDocument&&e.ownerDocument.defaultView&&(this.dirCalculated=e.ownerDocument.defaultView.getComputedStyle(e).direction||void 0)},e.prototype.calculatePopupWidth=function(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")},e.prototype.scrollToItem=function(e,t){var n=this.list||this.vs.list;if(n&&e>=0){var r=this.vs,o=r.container||n.parentNode,i=void 0!==t?t:r.enabled;!function(e,t,n,r,o){var i=e.offsetHeight,a=t.children.item(n),s=a.offsetTop+(o?r-e.scrollTop:0),l=a.offsetHeight;if(o){var c=0;s+l>i?c=s+l-i:s<0&&(c=s),0!==c?e.scrollTop+=c:0===e.scrollTop&&0!==r&&(e.scrollTop=r)}else s+l>i+e.scrollTop?e.scrollTop=s+l-i:s<e.scrollTop&&(e.scrollTop-=e.scrollTop-s)}(o,n,e,r.translate,i)}},e.prototype.initState=function(){return{data:{},events:[],syntheticEvent:void 0}},e.prototype.applyState=function(e){var t=this;Object.keys(e.data).length>0&&this.component.setState(e.data);var n={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};e.events.forEach((function(e){var r=e.type;delete e.type;var o=r&&t.component.props[r];o&&o.call(void 0,q({},n,e))}))},e.prototype.triggerOnPageChange=function(e,t,n){var r=this.component.props.virtual;if(r){var o=Math.min(Math.max(0,t),Math.max(0,r.total-n));o!==r.skip&&e.events.push({type:"onPageChange",page:{skip:o,take:n}})}},e.prototype.triggerPageChangeCornerItems=function(e,t){var n=this.component.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=void 0!==n.opened?n.opened:this.component.state.opened;e&&a&&this.vs.enabled&&(a.skip>0&&I(e,o[0],i)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!s&&a.skip+a.pageSize<a.total&&I(e,o[o.length-1],i)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))},e.prototype.getPopupSettings=function(){return Object.assign({},e.defaultProps.popupSettings,this.component.props.popupSettings)},e.basicPropTypes={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,textField:a.string,className:a.string,label:a.string,loading:a.bool,popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.element,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,itemRender:a.func,listNoDataRender:a.func,focusedItemIndex:a.func,header:a.node,footer:a.node},e.propTypes=q({},e.basicPropTypes,{value:a.any,defaultValue:a.any,filterable:a.bool,filter:a.string,virtual:a.shape({pageSize:a.number.isRequired,skip:a.number.isRequired,total:a.number.isRequired}),onFilterChange:a.func,onPageChange:a.func}),e.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0},e}(),G=n(21),X={name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189085,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Z=s.a.sizeMap,Q=s.a.roundedMap,ee=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new U(n),n.searchState={word:"",last:""},n._skipFocusEvent=!1,n._filterInput=null,n._navigated=!1,n.focus=function(){n.base.wrapper&&n.base.wrapper.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=r.defaultItem,c=a?a.skip:0,u=-1===e&&void 0!==l?l:i[e-c],d=!I(u,n.value,s);n.triggerOnChange(u,t),d&&n.base.triggerPageChangeCornerItems(u,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.dummySelect=function(e){return i.createElement("select",{name:n.props.name,ref:function(e){n._select=e},tabIndex:-1,"aria-hidden":!0,title:n.props.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:n.props.valueMap?n.props.valueMap.call(void 0,e):e}))},n.renderListContainer=function(){var e,t=n.props,r=t.header,o=t.footer,a=t.dir,s=t.data,c=void 0===s?[]:s,u=t.size,d=n.base,p=d.getPopupSettings(),f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=void 0!==p.width?p.width:d.popupWidth,m={dir:void 0!==a?a:d.dirCalculated,width:h,popupSettings:{popupClass:Object(l.a)(p.popupClass,"k-list",(e={},e["k-list-"+(Z[u]||u)]=u,e["k-virtual-list"]=n.base.vs.enabled,e)),className:p.className,animate:p.animate,anchor:n.element,show:f,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:p.appendTo},itemsCount:[c.length]};return i.createElement(v,Y({},m),n.renderListFilter(),n.renderDefaultItem(),r&&i.createElement("div",{className:"k-list-header"},r),n.renderList(),o&&i.createElement("div",{className:"k-list-footer"},o))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,o=e.textField,a=e.dataItemKey,s=e.virtual,l=void 0===s?{skip:0}:s,c=e.listNoDataRender,u=e.itemRender,d=n.base.vs,p=l.skip,f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=n.base.getPopupSettings(),m="translateY("+d.translate+"px)";return i.createElement(H,{id:n.base.listBoxId,show:f,data:r.slice(),focusedIndex:n.focusedIndex(),value:n.value,textField:o,valueField:a,optionsGuid:n.base.guid,listRef:function(e){return d.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:d.enabled?{transform:m}:void 0,key:"listkey",skip:p,onClick:n.handleItemClick,itemRender:u,noDataRender:c,onScroll:function(e){d.scrollHandler(e)},wrapperRef:d.scrollerRef,scroller:n.base.renderScrollElement()})},n.renderListFilter=function(){var e=void 0!==n.props.filter?n.props.filter:n.state.text;return n.props.filterable&&i.createElement(k,{value:e,ref:function(e){return n._filterInput=e&&e.input},onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown,size:n.props.size,rounded:n.props.rounded,fillMode:n.props.fillMode})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,r=e.defaultItem,o=e.dataItemKey;return void 0!==r&&i.createElement(_,{defaultItem:r,textField:t,selected:I(n.value,r,o),key:"defaultitemkey",onClick:n.handleDefaultItemClick})},n.search=function(e){clearTimeout(n._typingTimeout),n.props.filterable||(n._typingTimeout=window.setTimeout((function(){return n.searchState.word=""}),n.props.delay),n.selectNext(e))},n.selectNext=function(e){var t,r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=i.map((function(e,t){return{item:e,itemIndex:t}})),l=n.searchState.word,c=n.searchState.last,u=function(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}(l,c),d=s.length,p=Math.max(0,i.findIndex((function(e){return I(e,n.value,a)})));n.props.defaultItem&&(t={item:n.props.defaultItem,itemIndex:-1},d+=1,p+=1),s=function(e,t,n){var r=e;return n&&(r=[n].concat(r)),r.slice(t).concat(r.slice(0,t))}(s,p+=u?1:0,t);for(var f,h,m,v=0,g=n.props,y=g.textField,b=g.ignoreCase;v<d;v++)if(f=S(s[v].item,y),h=u&&C(f,c,b),m=C(f,l,b),h||m){v=s[v].itemIndex;break}if(v!==d){var k=n.base.initState();k.syntheticEvent=e,n.handleItemSelect(v,k),n.applyState(k),n._valueDuringOnChange=void 0}},n.handleKeyDown=function(e){var t=n.props,r=t.data,o=void 0===r?[]:r,i=t.filterable,a=t.disabled,s=t.leftRightKeysNavigation,l=void 0===s||s,u=t.virtual,d=void 0===u?{skip:0,total:0,pageSize:0}:u,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=e.keyCode,h=f===c.a.home||f===c.a.end,m=f===c.a.up||f===c.a.down,v=!p&&(e.altKey&&f===c.a.down||f===c.a.enter||f===c.a.space),g=p&&(e.altKey&&f===c.a.up||f===c.a.esc),y=l&&(f===c.a.left||f===c.a.right),b=m||!i&&(y||h),k=n.base.initState();if(k.syntheticEvent=e,!a){if(h&&n.base.vs.enabled)f===c.a.home?0!==d.skip?(n.base.triggerOnPageChange(k,0,d.pageSize),n._navigated=!0):n.triggerOnChange(o[0],k):d.skip<d.total-d.pageSize?(n.base.triggerOnPageChange(k,d.total-d.pageSize,d.pageSize),n._navigated=!0):n.triggerOnChange(o[o.length-1],k);else if(p&&f===c.a.enter){var w=n.focusedIndex();void 0!==w&&n.handleItemSelect(w,k),n.base.togglePopup(k),e.preventDefault()}else v||g?(n.base.togglePopup(k),e.preventDefault()):b&&(n.onNavigate(k,f),e.preventDefault());n.applyState(k)}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.handleBlur=function(e){if(!n._skipFocusEvent&&n.state.focused){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&n.base.togglePopup(r),n.applyState(r)}},n.handleDefaultItemClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.triggerOnChange(n.props.defaultItem,t),n.applyState(t)},n.handleWrapperClick=function(e){if(!e.isPropagationStopped()){var t=n.base.initState();t.syntheticEvent=e,n.state.focused||(t.data.focused=!0),n.base.togglePopup(t),n.applyState(t)}},n.handleKeyPress=function(e){if(!n.props.filterable&&0!==e.which&&e.keyCode!==c.a.enter){var t=String.fromCharCode(e.charCode||e.keyCode);n.props.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n.searchState={word:n.searchState.word+t,last:n.searchState.last+t},n.search(e)}},n.handleListFilterChange=function(e){var t=n.base.initState();t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=e.target.value),n.base.filterChanged(e.target.value,t),n.applyState(t)},n.onPopupOpened=function(){n._filterInput&&n.focusElement(n._filterInput)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.base.wrapper&&n.focusElement(n.base.wrapper)}))},n.setValidity=function(){n._select&&n._select.setCustomValidity&&n._select.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please select a value from the list!")},Object(G.a)(X),n}return J(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e;return void 0!==this._valueDuringOnChange?e=this._valueDuringOnChange:void 0!==this.props.value?e=this.props.value:void 0!==this.state.value?e=this.state.value:void 0!==this.props.defaultValue&&(e=this.props.defaultValue),w(e)||void 0===this.props.defaultItem||(e=this.props.defaultItem),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return I(e,o,r)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l;if(this.base.getPopupSettings().animate||u&&this.onPopupOpened(),a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var d=this.value,p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return I(e,d,i)})),h=!I(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):u&&!a||l&&c&&d&&h&&!this._navigated?this.base.scrollToItem(f):l&&c&&this._navigated&&(this._navigated&&a&&0===a.skip?this.base.vs.reset():this._navigated&&a&&a.skip===a.total-a.pageSize&&this.base.vs.scrollToEnd())}this._navigated=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t,n=this.props,r=n.style,o=n.className,a=n.label,s=n.dir,c=n.virtual,d=n.size,f=n.rounded,h=n.fillMode,m=void 0!==this.props.opened?this.props.opened:this.state.opened,v=this.value,g=S(v,this.props.textField),y=!this.validityStyles||this.validity.valid,b=this.base;b.vs.enabled=void 0!==c,void 0!==c&&(b.vs.skip=c.skip,b.vs.total=c.total,b.vs.pageSize=c.pageSize);var k=this.props,w=k.dataItemKey,C=k.data,O=void 0===C?[]:C,x=k.disabled,E=k.tabIndex,N=k.loading,M=k.iconClassName,D=k.valueRender,P=this.state.focused,_=O.findIndex((function(e){return I(e,v,w)})),j=i.createElement("span",{className:"k-input-inner"},i.createElement("span",{className:"k-input-value-text"},g)),R=void 0!==D?D.call(void 0,j,v):j,A=i.createElement("span",{ref:this.componentRef,className:Object(l.a)("k-dropdownlist k-picker",o,(e={},e["k-picker-"+(Z[d]||d)]=d,e["k-rounded-"+(Q[f]||f)]=f,e["k-picker-"+h]=h,e["k-focus"]=P,e["k-disabled"]=x,e["k-invalid"]=!y,e["k-loading"]=N,e["k-required"]=this.required,e)),style:a?Y({},r,{width:void 0}):r,dir:s,onMouseDown:m?T:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:Object(u.a)(E,x),accessKey:this.props.accessKey,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,onClick:x?void 0:this.handleWrapperClick,role:"listbox","aria-disabled":x||void 0,"aria-haspopup":!0,"aria-expanded":m||!1,"aria-owns":this.base.listBoxId,"aria-activedescendant":m?"option-"+this.base.guid+"-"+(_+(c?c.skip:0)):void 0,"aria-label":this.props.ariaLabel||this.props.label,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,id:this.props.id,title:this.props.title},R,N&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),i.createElement("button",{tabIndex:-1,type:"button","aria-hidden":!0,className:Object(l.a)("k-input-button k-button k-icon-button",(t={},t["k-button-"+(Z[d]||d)]=d,t["k-button-"+h]=h,t["k-button-"+h+"-base"]=h,t)),onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:Object(l.a)("k-button-icon k-icon k-i-arrow-s",M)})),this.dummySelect(v),this.renderListContainer());return a?i.createElement(p.a,{label:a,editorValue:g,editorValid:y,editorDisabled:this.props.disabled,style:{width:r?r.width:void 0},children:A}):A},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.defaultItem,a=n.dataItemKey,s=n.virtual,l=void 0===s?{skip:0,total:0,pageSize:0}:s,c=this.base.vs,u=this.value,d=o.findIndex((function(e){return I(e,u,a)})),p=this.base.navigation.navigate({current:l.skip+d,max:(c.enabled?l.total:o.length)-1,min:void 0!==i?-1:0,keyCode:t});void 0!==p&&this.handleItemSelect(p,e),this.applyState(e)},t.prototype.focusedIndex=function(){var e=w(this.props.filter)?this.props.filter:this.state.text,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=void 0===o?{skip:0}:o,a=t.dataItemKey,s=t.textField,l=t.focusedItemIndex,c=this.value,u=!(r.findIndex((function(e){return I(e,c,a)}))<0&&!this.props.defaultItem);return!u&&e&&0===i.skip?l?l(r,e,s):r.indexOf(N(r,e,s)):u||0!==i.skip?void 0:0},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),30)},t.prototype.triggerOnChange=function(e,t){I(this.value,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="DropDownList",t.propTypes=Y({delay:a.number,ignoreCase:a.bool,iconClassName:a.string,defaultItem:a.any,valueRender:a.func,valueMap:a.func,validationMessage:a.string,required:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string,leftRightKeysNavigation:a.bool,title:a.string},U.propTypes),t.defaultProps=Y({delay:500,tabIndex:0,ignoreCase:!0},U.defaultProps,{required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(i.Component),te=Object(d.a)(),ne=Object(d.b)(te,ee);ne.displayName="KendoReactDropDownList";var re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return re(t,e),Object.defineProperty(t.prototype,"input",{get:function(){return this._input},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t=e.value,n=e.suggestedText,r=this.props,o=r.value,i=r.suggestedText,a=r.focused,s=this.input,l=t!==o||i!==n,c=l&&t.startsWith(o)&&!(n&&i&&n.endsWith(i));a&&s&&document.activeElement!==s&&s.focus(),i&&l&&!c&&s&&s.setSelectionRange(o.length-i.length,o.length)},t.prototype.render=function(){var e=this,t=this.props,n=t.expanded,r=void 0!==n&&n,o=t.disabled,a=t.role,s=void 0===a?"listbox":a,l=t.render,c=i.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:function(t){return e._input=t},onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,"aria-disabled":o||void 0,disabled:o||void 0,readOnly:this.props.readOnly||void 0,"aria-haspopup":"listbox","aria-expanded":r,"aria-owns":this.props.owns,"aria-activedescendant":r?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy});return l?l.call(void 0,c):c},t}(i.Component),ie=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ae=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){return e.preventDefault()},t}return ie(t,e),t.prototype.render=function(){var e=Object(A.provideLocalizationService)(this).toLanguageString(z,L[z]);return i.createElement("span",{className:"k-clear-value",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"},i.createElement("span",{className:"k-icon k-i-x"}))},t}(i.Component),se=ae;Object(A.registerForLocalization)(ae);var le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(){return(ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ue=s.a.sizeMap,de=s.a.roundedMap,pe=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new U(n),n._inputId=Object($.a)(),n._suggested="",n.itemHeight=0,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=i[e-(a?a.skip:0)],c=!I(l,n.value,s);n.triggerOnChange(l,t),void 0!==n.state.text&&(t.data.text=void 0),c&&n.base.triggerPageChangeCornerItems(l,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.toggleBtnClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.applyState(t)},n.onScroll=function(e){var t=n.base,r=t.vs,o=t.list;r.scrollHandler(e);var i=n.props,a=i.data,s=void 0===a?[]:a,l=i.groupField;if(l&&s.length){for(var c=n.itemHeight=n.itemHeight||(r.enabled?r.itemHeight:o?o.children[0].offsetHeight:0),u=e.target.scrollTop-r.skip*c,d=s[0][l],p=1;p<s.length&&!(c*p>u);p++)s[p]&&s[p][l]&&(d=s[p][l]);d!==n.state.group&&(n.setState({group:d}),n.props.onGroupScroll&&n.props.onGroupScroll.call(void 0,{group:d}))}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyValueOnRejectSuggestions(e.currentTarget.value,t)}},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();if(o.syntheticEvent=e,!e.altKey&&(t===c.a.up||t===c.a.down))return e.preventDefault(),n.onNavigate(o,t),void n.applyState(o);var i=function(){e.preventDefault(),n.base.togglePopup(o),n.applyState(o)};r?e.altKey&&t===c.a.up?i():t===c.a.enter?(e.preventDefault(),n.applyValueOnEnter(e.currentTarget.value,o)):t===c.a.esc&&n.applyValueOnRejectSuggestions(e.currentTarget.value,o):e.altKey&&t===c.a.down&&i()},n.inputOnChange=function(e){var t=n.base.initState();t.syntheticEvent=e;var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=e.currentTarget,i=o.value;if(n.props.suggest){var a=o.selectionEnd===i.length,s=void 0!==n.props.filter?n.props.filter:n.state.text;w(s)||(s=S(n.value,n.props.textField)||"");var l=s&&s===i,c=s&&s.length>i.length;l||c||!a?n._suggested="":n.suggestValue(i)}void 0===n.props.filter&&(t.data.text=i),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r||n.base.togglePopup(t),n.base.filterChanged(i,t),n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState();t.syntheticEvent=e,e.stopPropagation(),n._suggested="",n.base.filterChanged("",t),void 0===n.props.filter&&void 0!==n.state.text&&(t.data.text=void 0),n.triggerOnChange(null,t),(void 0!==n.props.opened?n.props.opened:n.state.opened)&&n.base.togglePopup(t),n.applyState(t)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},Object(G.a)(X),n}return le(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return I(e,o,r)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l,d=this.value;if(this._valueOnDidUpdate=d,a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return I(e,d,i)})),h=!I(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):(u&&!a||l&&c&&d&&h)&&this.base.scrollToItem(f)}u&&this._input&&this._input.focus(),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,n,r=this.props,o=r.dir,a=r.disabled,s=r.clearButton,c=void 0===s?t.defaultProps.clearButton:s,u=r.label,d=r.textField,f=r.className,h=r.style,m=r.loading,v=r.iconClassName,g=r.virtual,y=r.size,b=r.rounded,k=r.fillMode,C=!this.validityStyles||this.validity.valid,O=void 0!==this.props.filter?this.props.filter:this.state.text,x=S(this.value,d),E=w(O)?O:x,I=c&&(!!E||w(this.value)),N=this.base.vs,T=this.props.id||this._inputId;N.enabled=void 0!==g,void 0!==g&&(N.skip=g.skip,N.total=g.total,N.pageSize=g.pageSize);var M=i.createElement("span",{className:Object(l.a)("k-combobox k-input",(e={},e["k-input-"+(ue[y]||y)]=y,e["k-rounded-"+(de[b]||b)]=b,e["k-input-"+k]=k,e["k-invalid"]=!C,e["k-loading"]=m,e["k-required"]=this.required,e["k-disabled"]=a,e),f),ref:this.componentRef,style:u?ce({},h,{width:void 0}):h,dir:o},this.renderSearchBar(E||"",T),I&&!m&&i.createElement(se,{onClick:this.clearButtonClick,key:"clearbutton"}),m&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),i.createElement("button",{tabIndex:-1,type:"button",className:Object(l.a)("k-input-button k-button k-icon-button",(n={},n["k-button-"+(ue[y]||y)]=y,n["k-button-"+k]=k,n["k-button-"+k+"-base"]=k,n)),onClick:this.toggleBtnClick,onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:Object(l.a)("k-button-icon k-icon k-i-arrow-s",v)})),this.renderListContainer());return u?i.createElement(p.a,{label:u,editorId:T,editorValue:E,editorValid:C,editorDisabled:a,style:{width:h?h.width:void 0},children:M}):M},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.virtual,a=void 0===i?{skip:0}:i,s=this.props.filter?this.props.filter:this.state.text,l=this.getFocusedIndex(),c=this.base.vs,u=this.value;if(this._suggested="",-1===l||w(u))if(""===s)this.handleItemSelect(0,e);else{var d=a.skip+l,p=this.base.navigation.navigate({keyCode:t,current:d,max:(c.enabled?c.total:o.length)-1,min:0});void 0!==p&&this.handleItemSelect(p,e)}else this.handleItemSelect(l,e)},t.prototype.applyValueOnEnter=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=S(this.value,a)===e?this.index:x(i,e,a),u=-1!==c,d=void 0;if(this._suggested="",u)d=i[c];else{if(!s)return this.selectFocusedItem(e,t);d=void 0!==a?((n={})[a]=e,n):e}this.triggerOnChange(d,t),l&&this.base.togglePopup(t),void 0===this.props.filter&&void 0!==this.state.text&&(t.data.text=void 0),this.applyState(t)},t.prototype.applyValueOnRejectSuggestions=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=S(this.value,a);if(this._suggested="",e===c||""===e&&!w(c))return l&&this.base.togglePopup(t),this.applyState(t);var u=x(i,e,a,!0),d=null;-1!==u?d=i[u]:s&&(d=e?a?((n={})[a]=e,n):e:null),this.triggerOnChange(d,t),void 0!==this.state.text&&(t.data.text=void 0,this.base.filterChanged("",t)),l&&this.base.togglePopup(t),this.applyState(t)},t.prototype.selectFocusedItem=function(e,t){var n=void 0!==this.props.opened?this.props.opened:this.state.opened,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.virtual,l=void 0===s?{skip:0}:s,c=r.focusedItemIndex,u=void 0===c?O:c,d=l.skip,p=""===e&&0===d?0:u(i,e,a);return-1!==p?this.handleItemSelect(p+d,t):(this.triggerOnChange(null,t),void 0!==this.state.text&&(t.data.text=void 0)),n&&this.base.togglePopup(t),this.applyState(t)},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,o=n.header,a=n.footer,s=n.data,c=void 0===s?[]:s,u=n.groupField,d=n.size,p=n.list,f=n.virtual,h=void 0!==this.props.opened?this.props.opened:this.state.opened,m=t.getPopupSettings(),g=void 0!==m.width?m.width:t.popupWidth,y=this.state.group;return void 0===y&&void 0!==u&&(y=S(c[0],u)),i.createElement(v,{width:g,popupSettings:{animate:m.animate,anchor:this.element,show:h,popupClass:Object(l.a)(m.popupClass,"k-reset"),className:m.className,appendTo:m.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},i.createElement("div",{className:Object(l.a)((e={},e["k-list"]=!p,e["k-list-"+(ue[d]||d)]=!p&&d,e["k-virtual-list"]=f,e["k-data-table"]=p,e["k-table-"+(ue[d]||d)]=p&&d,e))},o&&i.createElement("div",{className:"k-table-header"},o),!p&&y&&i.createElement("div",{className:"k-list-group-sticky-header"},y),this.renderList(),a&&i.createElement("div",{className:"k-list-footer"},a)))},t.prototype.renderList=function(){var e,t=this,n=this.base,r=this.props,o=r.textField,a=r.dataItemKey,s=r.listNoDataRender,c=r.itemRender,u=r.data,d=void 0===u?[]:u,p=r.virtual,f=void 0===p?{skip:0}:p,h=n.getPopupSettings(),m=n.vs,v=f.skip,g=void 0!==this.props.opened?this.props.opened:this.state.opened,y="translateY("+m.translate+"px)",b=g?this.getFocusedIndex():void 0,k=void 0!==this.props.filter?this.props.filter:this.state.text,C=S(this.value,o),O=w(k)&&k!==C?null:this.value,x=this.props.list||H;return i.createElement(x,{id:n.listBoxId,virtual:Boolean(f),show:g,data:d,focusedIndex:b,value:O,textField:o,valueField:a,groupField:this.props.groupField,optionsGuid:n.guid,listRef:function(e){m.list=t.base.list=e,t.itemHeight=0},wrapperStyle:{maxHeight:h.height},wrapperCssClass:Object(l.a)("k-list-content",(e={},e["k-list-scroller"]=!f,e["k-virtual-content"]=f,e)),listStyle:m.enabled?{transform:y}:void 0,key:"listkey",skip:v,onClick:this.handleItemClick,itemRender:c,noDataRender:s,onMouseDown:function(e){return e.preventDefault()},onScroll:this.onScroll,wrapperRef:m.scrollerRef,scroller:this.base.renderScrollElement()})},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.props,o=r.placeholder,a=r.tabIndex,s=r.disabled,l=r.data,c=void 0===l?[]:l,u=r.dataItemKey,d=r.virtual,p=void 0===d?{skip:0}:d,f=void 0!==this.props.opened?this.props.opened:this.state.opened,h=this.value,m=Math.max(0,c.findIndex((function(e){return I(e,h,u)})));return this._suggested&&!I(this._valueOnDidUpdate,h,u)&&(this._suggested=""),i.createElement(oe,{id:t,placeholder:o,tabIndex:a||void 0,accessKey:this.props.accessKey,value:e+this._suggested,suggestedText:this._suggested,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:s,expanded:f,owns:this.base.listBoxId,activedescendant:this.base.guid+"-"+(m+p.skip),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.triggerOnChange=function(e,t){var n=this.value;!w(n)&&!w(e)||I(n,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.getFocusedIndex=function(){var e=this.value,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=t.dataItemKey,a=t.virtual,s=void 0===a?{skip:0}:a,l=t.focusedItemIndex,c=void 0===l?O:l,u=this.props.filter?this.props.filter:this.state.text;return w(e)&&void 0===u?r.findIndex((function(t){return I(t,e,i)})):u?c(r,u,o):0===s.skip?0:-1},t.prototype.suggestValue=function(e){var t=this.props,n=t.data,r=t.textField;this._suggested=function(e,t,n){void 0===t&&(t=[]);var r="";if(e){var o=t[O(t,e,n)];if(o){var i=S(o,n);e.toLowerCase()!==i.toLowerCase()&&(r=i.substring(e.length))}}return r}(e,n,r)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="ComboBox",t.propTypes=ce({},U.propTypes,{size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"]),dataItemKey:a.string,groupField:a.string,suggest:a.bool,placeholder:a.string,allowCustom:a.bool,clearButton:a.bool,iconClassName:a.string,validationMessage:a.string,required:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,list:a.any,valueRender:a.func}),t.defaultProps=ce({},U.defaultProps,{size:"medium",rounded:"medium",fillMode:"solid",allowCustom:!1,clearButton:!0,required:!1}),t}(i.Component),fe=Object(d.a)(),he=Object(d.b)(fe,pe);he.displayName="KendoReactComboBox";var me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=s.a.sizeMap,ye=s.a.roundedMap,be=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new U(n),n._inputId=Object($.a)(),n._suggested="",n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props.data,o=S((void 0===r?[]:r)[e],n.props.textField);n.triggerOnChange(o,t)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=i[e];I(n.state.focusedItem,s,a)||(t.data.focusedItem=s)},n.togglePopup=function(e){n.base.togglePopup(e)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget,o=r.value,i=r.selectionEnd===o.length;t.syntheticEvent=e;var a=n._suggested,s=n.value,l=s&&s.substring(0,s.length-a.length),c=l&&l===o,u=l&&l.length>o.length,d=n.props.suggest,p=void 0!==n.props.opened?n.props.opened:n.state.opened;if(void 0!==d&&!1!==d){c||u||!i?n._suggested="":n.suggestValue(o);var f=o+n._suggested,h={userInput:o,value:n._suggested};n.triggerOnChange(f,t,{suggestion:h})}else n._suggested="",n.triggerOnChange(o,t);(!p&&o||p&&!o)&&n.togglePopup(t),t.data.focusedItem=void 0,n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState(),r=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e;n._suggested="",n.triggerOnChange("",t),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r&&n.togglePopup(t),n.applyState(t)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=e;var i=function(){r&&e.preventDefault()};t===c.a.enter||t===c.a.esc?(i(),n.applyInputValue(e.currentTarget.value,o,e.keyCode)):t!==c.a.up&&t!==c.a.down||(i(),n.onNavigate(o,t))},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyInputValue(e.currentTarget.value,t)}},Object(G.a)(X),n}return me(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||""!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.data,r=void 0===n?[]:n,o=e.data,i=void 0===o?[]:o,a=this.focusedIndex(),s=r[a],l=i!==r,c=void 0!==s&&t.focusedItem!==s,u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=void 0!==e.opened?e.opened:t.opened;(u&&(c||l)||!d&&u)&&this.base.scrollToItem(a),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t=this,n=this.props,r=n.dir,o=n.disabled,a=n.label,s=n.className,c=n.style,u=n.loading,d=n.suggest,f=n.size,h=n.rounded,m=n.fillMode,v=!this.validityStyles||this.validity.valid,g=this.base,y=this.value,b=!1!==this.props.clearButton&&!u&&!!y,k=this.props.id||this._inputId;"string"==typeof d&&(this._suggested=d);var w=i.createElement("span",{className:Object(l.a)("k-autocomplete k-input",s,(e={},e["k-input-"+(ge[f]||f)]=f,e["k-rounded-"+(ye[h]||h)]=h,e["k-input-"+m]=m,e["k-invalid"]=!v,e["k-loading"]=u,e["k-required"]=this.required,e["k-disabled"]=o,e)),ref:function(e){t._element=e,g.wrapper=e},style:a?ve({},c,{width:void 0}):c,dir:r},this.renderSearchBar(y||"",k),u&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),b&&!u&&i.createElement(se,{onClick:this.clearButtonClick,key:"clearbutton"}),this.renderListContainer());return a?i.createElement(p.a,{label:a,editorId:k,editorValue:y,editorValid:v,editorDisabled:o,style:{width:c?c.width:void 0},children:w}):w},t.prototype.onNavigate=function(e,t){var n=this,r=this.value,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField,l=o.focusedItemIndex,c=void 0!==this.state.focusedItem?a.findIndex((function(e){return I(e,n.state.focusedItem,s)})):l?l(a,r,s):a.indexOf(N(a,r,s)),u=this.base.navigation.navigate({keyCode:t,current:c,max:a.length-1,min:0});void 0!==u&&this.itemFocus(u,e),this.applyState(e)},t.prototype.applyInputValue=function(e,t,n){var r=void 0!==this.props.opened?this.props.opened:this.state.opened,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField;if(this._suggested="",r&&n===c.a.enter){var l=S(a[this.focusedIndex(e)],s);this.triggerOnChange(l,t)}r&&this.togglePopup(t),this.applyState(t)},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.base,o=this.props,a=o.placeholder,s=o.tabIndex,l=o.disabled,c=o.readonly,u=this.state.focused,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return i.createElement(oe,{id:t,placeholder:a,tabIndex:s||void 0,accessKey:this.props.accessKey,value:e,suggestedText:this._suggested,focused:u,name:this.props.name,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:r.handleFocus,onBlur:this.handleBlur,disabled:l,readOnly:c,expanded:d,owns:r.listBoxId,activedescendant:"option-"+r.guid+"-"+this.focusedIndex(),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,o=n.header,a=n.footer,s=n.data,c=void 0===s?[]:s,u=n.size,d=t.getPopupSettings(),p=void 0!==this.props.opened?this.props.opened:this.state.opened,f=void 0!==d.width?d.width:t.popupWidth;return i.createElement(v,{width:f,popupSettings:{animate:d.animate,anchor:this.element,show:p,popupClass:Object(l.a)(d.popupClass,"k-list",(e={},e["k-list-"+(ge[u]||u)]=u,e)),className:d.className,appendTo:d.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},o&&i.createElement("div",{className:"k-list-header"},o),this.renderList(),a&&i.createElement("div",{className:"k-list-footer"},a))},t.prototype.renderList=function(){var e=this.base,t=e.getPopupSettings(),n=this.props,r=n.textField,o=n.data,a=void 0===o?[]:o,s=n.listNoDataRender,l=n.itemRender,c=this.value,u=void 0!==this.props.opened?this.props.opened:this.state.opened;return i.createElement(H,{id:e.listBoxId,show:u,data:a.slice(),focusedIndex:this.focusedIndex(),value:c,textField:r,valueField:r,highlightSelected:!1,optionsGuid:e.guid,listRef:function(t){return e.list=t},wrapperStyle:{maxHeight:t.height},wrapperCssClass:"k-list-content",onClick:this.handleItemClick,itemRender:l,noDataRender:s,onMouseDown:function(e){return e.preventDefault()}})},t.prototype.triggerOnChange=function(e,t,n){(this.value!==e||n)&&(t.data.value=e,this._valueDuringOnChange=e,t.events.push(ve({type:"onChange"},n||{})))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.prototype.suggestValue=function(e){if(this._suggested="",e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=r[O(r,e,o)];if(i){var a=S(i,o);e.toLowerCase()!==a.toLowerCase()&&(this._suggested=a.substring(e.length))}}},t.prototype.focusedIndex=function(e){var t=this,n=this.props,r=n.data,o=void 0===r?[]:r,i=n.textField,a=n.focusedItemIndex,s=void 0!==e?e:this.value;return void 0!==this.state.focusedItem?o.findIndex((function(e){return I(e,t.state.focusedItem,i)})):a?a(o,s,i):Math.max(0,o.indexOf(N(o,s,i)))},t.displayName="AutoComplete",t.propTypes=ve({},U.basicPropTypes,{size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"]),suggest:a.oneOfType([a.bool,a.string]),placeholder:a.string,value:a.string,defaultValue:a.string,validationMessage:a.string,required:a.bool,readonly:a.bool,clearButton:a.bool,valueRender:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string}),t.defaultProps=ve({},U.defaultProps,{size:"medium",rounded:"medium",fillMode:"solid"}),t}(i.Component),ke=Object(d.a)(),we=Object(d.b)(ke,be);we.displayName="KendoReactAutoComplete";var Ce,Oe=n(24),xe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(e){return e.syntheticEvent.preventDefault()},Ee=function(e){return e.syntheticEvent.stopPropagation()},Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.render=function(){var e=this.props,t=e.data,n=e.guid,r=e.focused,o=e.tagRender,a=e.tag,s=e.onTagDelete,l=e.size;return i.createElement(i.Fragment,null,t.map((function(e,c){var u=a?i.createElement(a,{key:e.text+c,tagData:e,guid:n,focusedTag:r,onTagDelete:s}):i.createElement(Oe.a,{id:"tag-"+n+"-"+e.text.replace(/\s+/g,"-"),"aria-selected":!0,role:"option","aria-setsize":t.length,key:e.text+c,text:e.text,removable:!0,removeIcon:"k-i-close",onRemove:function(t){return s.call(void 0,e.data,t.syntheticEvent)},onMouseDown:Se,onClick:Ee,className:e===r?"k-focus":void 0,size:l});return o?o(e,u):u})),this.props.children)},t}(i.Component);!function(e){e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList"}(Ce||(Ce={}));var Ne,Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(){return(Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},De=s.a.sizeMap,Pe=s.a.roundedMap,_e=function(e){return e.preventDefault()},je=function(e){return e===Ne.CustomItem};!function(e){e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem"}(Ne||(Ne={}));var Re=function(e){function t(t){var n=e.call(this,t)||this;return n.state={activedescendant:Ce.PopupList},n._valueItemsDuringOnChange=null,n._inputId=Object($.a)(),n.base=new U(n),n._tags=[],n._skipFocusEvent=!1,n.scrollToFocused=!1,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=r.virtual,l=i[e-(s?s.skip:0)],c=n.value.findIndex((function(e){return I(e,l,a)})),u=[];-1!==c?(u=n.value).splice(c,1):u=n.value.concat([l]),(void 0!==n.props.filter?n.props.filter:n.state.text)&&(n.state.text&&(t.data.text=""),n.base.filterChanged("",t)),void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.triggerOnChange(u,t),n.base.triggerPageChangeCornerItems(l,t)},n.onTagDelete=function(e,t){var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=t,r&&n.base.togglePopup(o),n.state.focused||(o.data.focused=!0,n.focus());var i=n.value;E(i,e,n.props.dataItemKey),n.triggerOnChange(i,o),n.applyState(o)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.allowCustom,s=r.virtual,l=s?s.skip:0,c=void 0!==n.props.filter?n.props.filter:n.state.text,u=n.getFocusedState().focusedIndex,d=a&&c,p=i[e-l];p&&u!==e?n.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=Ce.PopupList):d&&-1===e&&void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.base.triggerPageChangeCornerItems(p,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.searchbarRef=function(e){var t=n._input=e&&e.input;t&&n.state.focused&&window.setTimeout((function(){return t.focus()}),0)},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget.value,o=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=r),t.data.focusedIndex=void 0,o||n.base.togglePopup(t),n.base.filterChanged(r,t),n.applyState(t)},n.clearButtonClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,e.stopPropagation(),n.value.length>0&&n.triggerOnChange([],r),void 0!==n.state.focusedIndex&&(r.data.focusedIndex=void 0),t&&n.base.togglePopup(r);var o=void 0!==n.props.filter?n.props.filter:n.state.text;w(o)&&""!==o&&n.base.filterChanged("",r),n.state.text&&(r.data.text=""),n.applyState(r)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=void 0!==n.props.opened?n.props.opened:n.state.opened,i=n.getFocusedState().focusedItem,a=n.base.initState();if(a.syntheticEvent=e,!r&&n.value.length>0&&(t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end||t===c.a.delete||t===c.a.backspace))return n.onTagsNavigate(e,a);var s=function(){e.preventDefault(),n.base.togglePopup(a),n.applyState(a)};o?e.altKey&&t===c.a.up?s():t===c.a.up||t===c.a.down?(e.preventDefault(),n.onNavigate(a,t)):t===c.a.enter?(e.preventDefault(),n.props.allowCustom&&r&&null===i?n.customItemSelect(e):n.selectFocusedItem(e)):t===c.a.esc&&s():e.altKey&&t===c.a.down&&s()},n.renderListContainer=function(){var e,t,r=n.base,o=n.props,a=o.header,s=o.footer,c=o.allowCustom,u=o.dir,d=o.data,p=void 0===d?[]:d,f=o.size,h=n.base.getPopupSettings(),m=void 0!==n.props.opened?n.props.opened:n.state.opened,g=void 0!==n.props.filter?n.props.filter:n.state.text,y=void 0!==h.width?h.width:r.popupWidth,b={dir:void 0!==u?u:r.dirCalculated,width:y,popupSettings:{popupClass:Object(l.a)(h.popupClass,"k-list",(e={},e["k-list-"+(De[f]||f)]=f,e["k-virtual-list"]=n.base.vs.enabled,e)),className:h.className,animate:h.animate,anchor:n.element,show:m,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:h.appendTo},itemsCount:[p.length,n.value.length]},k=n.getFocusedState().focusedType,w=c&&g&&i.createElement("div",{className:Object(l.a)("k-list",(t={},t["k-list-"+(De[f]||f)]=f,t)),key:"customitem",onClick:n.customItemSelect,onMouseDown:_e},i.createElement("div",{className:Object(l.a)("k-list-item k-custom-item",{"k-focus":je(k)}),style:{fontStyle:"italic"}},g,i.createElement("span",{className:"k-icon k-i-plus",style:{position:"absolute",right:"0.5em"}})));return i.createElement(v,Me({},b),a&&i.createElement("div",{className:"k-list-header"},a),w,n.renderList(),s&&i.createElement("div",{className:"k-list-footer"},s))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,o=e.textField,a=e.listNoDataRender,s=e.itemRender,l=e.dataItemKey,c=e.virtual,u=n.base.vs,d=c?c.skip:0,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=n.getFocusedState().focusedIndex,h=n.base.getPopupSettings(),m="translateY("+u.translate+"px)";return i.createElement(H,{id:n.base.listBoxId,show:p,data:r.slice(),focusedIndex:f-d,value:n.value,textField:o,valueField:l,optionsGuid:n.base.guid,listRef:function(e){u.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:u.enabled?{transform:m}:void 0,key:"listKey",skip:d,onClick:n.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:_e,onBlur:n.handleBlur,onScroll:function(e){u.scrollHandler(e)},wrapperRef:u.scrollerRef,scroller:n.base.renderScrollElement()})},n.customItemSelect=function(e){var t,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=n.props.textField;if(r){var i=n.base.initState();i.syntheticEvent=e;var a=o?((t={})[o]=r,t):r;void 0!==n.state.text&&(i.data.text=""),i.data.focusedIndex=void 0,n.base.filterChanged("",i);var s=n.value.concat([a]);n.triggerOnChange(s,i),n.base.togglePopup(i),n.applyState(i)}},n.handleWrapperClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n._input;!t&&r&&n.focusElement(r);var o=n.base.initState();o.syntheticEvent=e,n.state.focused||(o.events.push({type:"onFocus"}),o.data.focused=!0),n.base.togglePopup(o),n.applyState(o)},n.handleItemClick=function(e,t){var r=n.base.initState();r.syntheticEvent=t,n.handleItemSelect(e,r),n.props.autoClose&&n.base.togglePopup(r),t.stopPropagation(),n.applyState(r)},n.handleBlur=function(e){if(n.state.focused&&!n._skipFocusEvent){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState(),o=n.props,i=o.allowCustom,a=o.filterable;r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&(n.state.opened&&(r.data.opened=!1),r.events.push({type:"onClose"})),i||a||!n.state.text||(r.data.text=""),n.applyState(r)}},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.onPopupOpened=function(){n._input&&n.state.focused&&n.focusElement(n._input)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.focusElement(n._input)}),0)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},Object(G.a)(X),n}return Te(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=[];return this._valueItemsDuringOnChange?e.push.apply(e,this._valueItemsDuringOnChange):this.props.value?e.push.apply(e,this.props.value):this.state.value?e.push.apply(e,this.state.value):this.props.defaultValue&&e.push.apply(e,this.props.defaultValue),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&this.value.length>0&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.virtual,r=n?n.skip:0,o=e.virtual?e.virtual.total:0,i=void 0!==this.props.opened?this.props.opened:this.state.opened,a=void 0!==e.opened?e.opened:t.opened,s=!a&&i,l=a&&!i;if(!this.base.getPopupSettings().animate&&l&&this.onPopupClosed(),n&&n.total!==o)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var c=this.getFocusedState(),u=c.focusedItem,d=c.focusedIndex;s&&n?this.base.scrollToVirtualItem(n,d-r):s&&!n?this.base.scrollToItem(d):i&&a&&u&&this.scrollToFocused&&this.base.scrollToItem(d-r)}this.scrollToFocused=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.allowCustom,o=n.data,i=void 0===o?[]:o,a=void 0!==this.props.opened?this.props.opened:this.state.opened,s=void 0!==this.props.filter?this.props.filter:this.state.text,l=this.getFocusedState(),u=l.focusedType,d=l.focusedIndex,p=r&&s,f=je(u),h=this.base,m=h.vs;if(a&&t===c.a.up&&f)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{var v=h.navigation.navigate({keyCode:t,current:d,max:(m.enabled?m.total:i.length)-1,min:p?-1:0});void 0!==v&&(this.itemFocus(v,e),this.scrollToFocused=!0)}this.applyState(e)},t.prototype.render=function(){var e,t,n=this.props,r=n.style,o=n.className,a=n.label,s=n.dir,c=n.disabled,u=n.tags,d=n.textField,f=n.dataItemKey,h=n.virtual,m=n.size,v=n.rounded,g=n.fillMode,y=n.loading,b=n.filter,k=this.state,w=k.text,C=k.focused,O=k.focusedTag,x=this.base.vs,E=this.props.id||this._inputId;x.enabled=void 0!==h,void 0!==h&&(x.skip=h.skip,x.total=h.total,x.pageSize=h.pageSize);var I=[];void 0===u?this.value.forEach((function(e){I.push({text:S(e,d),data:[e]})})):I.push.apply(I,u),this.setItems(I,this._tags);var N=!this.validityStyles||this.validity.valid,D=Boolean(void 0!==b?b:w)||this.value.length>0,P=i.createElement("div",{ref:this.componentRef,className:Object(l.a)("k-multiselect k-input",o,(e={},e["k-input-"+(De[m]||m)]=m,e["k-rounded-"+(Pe[v]||v)]=v,e["k-input-"+g]=g,e["k-focus"]=C&&!c,e["k-invalid"]=!N,e["k-disabled"]=c,e["k-loading"]=y,e["k-required"]=this.required,e)),style:a?Me({},r,{width:void 0}):r,dir:s,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleWrapperClick,onMouseDown:T},i.createElement("div",{className:Object(l.a)("k-input-values k-chip-list k-selection-multiple",(t={},t["k-chip-list-"+(De[m]||m)]=m,t)),role:"listbox",id:"tagslist-"+this.base.guid},I.length>0&&i.createElement(Ie,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:I,guid:this.base.guid,focused:O?I.find((function(e){return M(e,O,f)})):void 0,size:m}),this.renderSearchbar(E)),y&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),D&&i.createElement(se,{onClick:this.clearButtonClick}),this.renderListContainer());return a?i.createElement(p.a,{label:a,editorId:E,editorValue:w||S(this.value[0],d),editorValid:N,editorDisabled:c,style:{width:r?r.width:void 0},children:P}):P},t.prototype.renderSearchbar=function(e){var t=this.state,n=t.activedescendant,r=t.focusedTag,o=this.props,a=o.disabled,s=o.placeholder,l=o.ariaDescribedBy,c=(void 0!==this.props.filter?this.props.filter:this.state.text)||"",u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=this.getFocusedState().focusedIndex,p=0!==this.value.length||c?void 0:s,f=n===Ce.TagsList&&void 0!==r?"tag-"+this.base.guid+"-"+r.text.replace(/\s+/g,"-"):"option-"+this.base.guid+"-"+d;return i.createElement(oe,{id:e,size:Math.max((p||"").length,c.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:p,value:c,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:a,expanded:u,owns:this.base.listBoxId,activedescendant:f,ariaDescribedBy:"tagslist-"+this.base.guid+(l?" "+l:""),ariaLabelledBy:this.props.ariaLabelledBy})},t.prototype.onTagsNavigate=function(e,t){var n=e.keyCode,r=this.state.focusedTag,o=this._tags,i=this.props.dataItemKey,a=r?o.findIndex((function(e){return M(e,r,i)})):-1,s=void 0,l=-1!==a;if(n===c.a.left)s=o[a=l?Math.max(0,a-1):o.length-1];else if(n===c.a.right)a===o.length-1?s=void 0:l&&(s=o[a=Math.min(o.length-1,a+1)]);else if(n===c.a.home)s=o[0];else if(n===c.a.end)s=o[o.length-1];else if(n===c.a.delete){if(l){var u=this.value;E(u,o[a].data,i),this.triggerOnChange(u,t)}}else if(n===c.a.backspace){u=this.value;if(l)E(u,o[a].data,i),this.triggerOnChange(u,t);else if(!l&&o.length){var d=o.pop();E(u,d.data,i),this.triggerOnChange(u,t)}}s!==r&&(t.data.focusedTag=s,t.data.activedescendant=Ce.TagsList),this.applyState(t)},t.prototype.triggerOnChange=function(e,t){void 0===this.props.value&&(t.data.value=e.slice()),this._valueItemsDuringOnChange=[],this.setItems(e,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})},t.prototype.selectFocusedItem=function(e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=this.getFocusedState().focusedIndex;void 0!==r[i-(o?o.skip:0)]&&this.handleItemClick(i,e)},t.prototype.setItems=function(e,t){t.length=0,t.push.apply(t,e)},t.prototype.getFocusedState=function(){var e,t=this.state.focusedIndex,n=void 0!==this.props.filter?this.props.filter:this.state.text,r=this.props,o=r.allowCustom,i=r.data,a=void 0===i?[]:i,s=r.dataItemKey,l=r.virtual,c=r.textField,u=r.focusedItemIndex,d=void 0===u?O:u,p=l&&l.skip||0;if(void 0!==t)return{focusedIndex:t,focusedItem:a[t-p],focusedType:Ne.ListItem};var f=this.value;if(o&&n)return{focusedItem:null,focusedIndex:-1,focusedType:Ne.CustomItem};if(n)return{focusedItem:a[e=d(a,n,c)],focusedIndex:e+p,focusedType:Ne.ListItem};if(f.length){var h=f[f.length-1];return e=a.findIndex((function(e){return I(e,h,s)})),void 0!==a[e]?{focusedIndex:e+p,focusedItem:a[e],focusedType:Ne.ListItem}:{focusedType:Ne.None,focusedIndex:-1}}return 0===p?{focusedItem:a[0],focusedIndex:0,focusedType:Ne.ListItem}:{focusedType:Ne.None,focusedIndex:-1}},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),0)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueItemsDuringOnChange=null},t.displayName="MultiSelect",t.propTypes=Me({},U.propTypes,{autoClose:a.bool,value:a.arrayOf(a.any),defaultValue:a.arrayOf(a.any),dataItemKey:a.string,placeholder:a.string,tags:a.arrayOf(a.shape({text:a.string,data:a.arrayOf(a.any)})),tagRender:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string}),t.defaultProps=Me({},U.defaultProps,{autoClose:!0,required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(i.Component),Ae=Object(d.a)(),Fe=Object(d.b)(Ae,Re);Fe.displayName="KendoReactMultiSelect";var ze=function(){return(ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Le=function(e){return i.createElement(H,ze({},e,{wrapperCssClass:"k-table-body k-table-scroller",listClassName:"k-table k-table-list",listStyle:ze({},e.listStyle)}))},Be=n(33),Ve=n(56),He=n(37),Ke=function(){return(Ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},We=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},$e=Object(d.a)(),qe=i.forwardRef((function(e,t){var n=Object(Be.a)($e,e),r=i.useRef(null),o=i.useRef(null),a=Object(Ve.a)(),s=n.columns,c=void 0===s?Ge.columns:s,u=n.popupSettings,d=void 0===u?Ge.popupSettings:u,p=(n.size,n.onOpen),f=n.onClose,h=n.onFocus,m=n.onBlur,v=n.onChange,g=n.onFilterChange,y=n.onPageChange,b=We(n,["columns","popupSettings","size","onOpen","onClose","onFocus","onBlur","onChange","onFilterChange","onPageChange"]);i.useImperativeHandle(r,(function(){return{element:o.current&&o.current.element,focus:function(){o.current&&o.current.focus()},get value(){return o.current&&o.current.value},get name(){return o.current&&o.current.name},props:n}})),i.useImperativeHandle(t,(function(){return r.current}));var k=i.useMemo((function(){if(void 0===k&&void 0!==n.groupField&&n.data)return S(n.data[0],n.groupField)}),[n.data,n.groupField]),w=i.useState(k),C=w[0],O=w[1],x=i.useMemo((function(){return i.createElement(i.Fragment,null,n.header,i.createElement("div",{className:"k-table-header-wrap"},i.createElement("table",{className:"k-table",role:"presentation"},i.createElement("colgroup",null,c.map((function(e,t){return i.createElement("col",{key:e.uniqueKey?e.uniqueKey:t,style:{width:e.width?e.width:Ge.width}})}))),i.createElement("thead",{className:"k-table-thead"},i.createElement("tr",{className:"k-table-row"},c.map((function(e,t){return i.createElement("th",{className:"k-table-th",key:e.uniqueKey?e.uniqueKey:t},e.header||" ")}))),C&&i.createElement("tr",{className:"k-table-group-row"},i.createElement("th",{className:"k-table-th",colSpan:c.length},C))))))}),[n.header,c,C]),E=i.useMemo((function(){return"calc("+c.map((function(e){return t=e.width,n=Ge.width,t?"number"==typeof t?t+"px":t:n;var t,n})).filter(Boolean).join(" + ")+" + "+a+"px + 4px)"}),[c,a]),I=n.virtual?n.virtual.skip:0,N=i.useCallback((function(e,t){var r,o,a,s=c.map((function(e,n){return i.createElement("span",{className:"k-table-td",style:{width:e.width?e.width:Ge.width},key:e.uniqueKey?e.uniqueKey:n},e.field?Object(He.a)(e.field)(t.dataItem):"")})),u=void 0,d=n.data||[],p=t.index-I;void 0!==n.groupField&&(r=(a=Object(He.a)(n.groupField))(d[p]),o=a(d[p-1]),r&&o&&r!==o&&(u=r)),u&&s.push(i.createElement("div",{key:"group",className:"k-table-td k-table-group-td"},i.createElement("span",null,u)));var f=i.cloneElement(e,Ke({},e.props,{className:Object(l.a)("k-table-row",{"k-table-alt-row":t.index%2!=0,"k-focus":t.focused,"k-selected":t.selected,"k-first":Boolean(u)})}),s);return n.itemRender?n.itemRender.call(void 0,f,t):f}),[c,n.groupField,n.itemRender,n.data,I]),T=i.useCallback((function(e,t){e&&e.call(void 0,Ke({},t,{target:r.current}))}),[]),M=i.useCallback((function(e){return T(p,e)}),[p]),D=i.useCallback((function(e){return T(f,e)}),[f]),P=i.useCallback((function(e){return T(h,e)}),[h]),_=i.useCallback((function(e){return T(m,e)}),[m]),j=i.useCallback((function(e){return T(v,e)}),[v]),R=i.useCallback((function(e){return T(g,e)}),[g]),A=i.useCallback((function(e){return T(y,e)}),[y]),F=i.useCallback((function(e){O(e.group)}),[]);i.useEffect((function(){Object(Ve.b)()}));var z=i.useCallback((function(e){return i.createElement(Le,Ke({},e))}),[]);return i.createElement(he,Ke({},b,{list:z,popupSettings:Ke({width:E},d,{popupClass:"k-dropdowngrid-popup k-reset",className:d.className}),ref:o,header:x,itemRender:N,size:n.size,rounded:n.rounded,fillMode:n.fillMode,onOpen:M,onClose:D,onFocus:P,onBlur:_,onChange:j,onFilterChange:R,onPageChange:A,onGroupScroll:F,className:"k-dropdowngrid"}))})),Ue=Ke({},pe.propTypes,{columns:a.any.isRequired}),Ge={columns:[],popupSettings:{},width:"200px",size:"medium",rounded:"medium",fillMode:"solid"};qe.displayName="KendoMultiColumnComboBox",qe.propTypes=Ue,qe.defaultProps=Ge;var Xe=n(6),Je=n(59),Ye=n(57),Ze=n(53);function Qe(e,t,n){if(at(e))return t[Number(e)];var r=t[Number(et(e))],o=r&&r[n]||[];return o.length?Qe(tt(e),o,n):void 0}function et(e){return it(e)?e:e.split("_")[0]}function tt(e){if(it(e))return e;var t=e.indexOf("_");return e.substring(t+1)}function nt(e){return rt("0",e)}function rt(e,t){return e=e.toString(),t?t+"_"+e:e}function ot(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function it(e){return""===e||e.indexOf("_")<0}function at(e){return""!==e&&e.indexOf("_")<0}function st(e){return e.split("_")}function lt(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}var ct=function(){function e(){this.objects=[]}return e.prototype.init=function(e){for(var t,n=0;n<e.length;n++)n%5e4==0&&(t={},this.objects.push(t)),t[e[n]]=!0},e.prototype.hasId=function(e){return this.objects.some((function(t){return t[e]}))},e}();function ut(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}function dt(e,t){var n=ut(t,e);return Boolean(n&&n.length)}function pt(e,t){return t.expanded(e)&&dt(e,t.getChildrenField())}function ft(e,t,n,r){var o=function(e,t,n,r){var o=[],i=new ct;return i.init(e),function e(t,n,r,o,i,a){for(var s=0;s<r.length;s++){var l=r[s],c=rt(s,o);t.hasId(ut(n,l))&&i.push(c),dt(l,a)&&e(t,n,ut(a,l),c,i,a)}}(i,t,n,"",o,r),o}([e],t,n,r);return o.length?o[0]:void 0}function ht(e,t,n){for(var r=st(e),o=t,i=0;i<r.length;i++){var a=o[Number(r[i])];if(n.disabled(a))return!1;o=a[n.getChildrenField()]}return!0}function mt(e,t,n,r,o){switch(r){case c.a.left:return at(t)||o.expanded(e)&&ht(t,n,o)?t:ot(t);case c.a.right:return pt(e,o)?nt(t):t;case c.a.up:return i=Number(lt(t)),a=ot(t),i?function e(t,n,r){var o=Qe(t,n,r.getChildrenField());return pt(o,r)?e(rt(o[r.getChildrenField()].length-1,t),n,r):t}(rt(i-1,a),n,o):at(t)?t:a;case c.a.down:return pt(e,o)?nt(t):function e(t,n,r){var o=ot(t),i=o?Qe(o,n,r.getChildrenField()):void 0,a=i?i[r.getChildrenField()]:n,s=Number(lt(t));return s<a.length-1?rt(s+1,o):i?e(o,n,r):void 0}(t,n,o)||t;case c.a.home:return"0";case c.a.end:return function(){var e,t=(n.length-1).toString(),r=n[n.length-1];for(;pt(r,o);)e=r[o.getChildrenField()],t=rt(e.length-1,t),r=e[e.length-1];return t}();default:return t}var i,a}var vt=n(60),gt=n(106),yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bt=function(){return(bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},kt=s.a.sizeMap,wt=i.createContext((function(e){return e})),Ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=Object($.a)(),t.onCheckChange=function(e){t.props.onCheckChange(e,t.item,t.itemId)},t.onExpandChange=function(e){t.props.onExpandChange(e,t.item,t.itemId)},t.onItemClick=function(e){t.props.onItemClick(e,t.item,t.itemId)},t.onPress=function(e){t.props.onPress(e.event,t.item,t.itemId)},t.onDrag=function(e){t.props.onDrag(e.event,t.item,t.itemId)},t.onRelease=function(e){t.props.onRelease(e.event,t.item,t.itemId)},t.assignDraggableMeta=function(e){e&&(e._kendoItemId=t.props.itemId,e._kendoTreeViewGuid=t.props.treeGuid)},t}return yt(t,e),t.prototype.render=function(){var e=this,t=this.renderSubitemsIfApplicable(),n=this.renderItemInPart();return i.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-checked":this.ariaChecked,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(t){return e.itemElement=t}},i.createElement("div",{className:"k-treeview-"+this.props.position,ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?i.createElement(vt.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},n):n),this.props.animate?i.createElement(gt.a,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:t}):t)},t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement){var n=this.fieldsSvc.checkIndeterminate(this.item);n!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=n)}},t.prototype.renderCheckbox=function(){var e,t=this;if(this.props.checkboxes){var n=this.props.size;return i.createElement("div",{className:"k-checkbox-wrap"},i.createElement("input",{type:"checkbox",className:Object(l.a)("k-checkbox k-rounded-md",(e={},e["k-checkbox-"+(kt[n]||n)]=n,e)),checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(e){return t.checkboxElement=e}}),i.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid}))}},t.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||dt(this.item,this.fieldsSvc.getChildrenField()))&&i.createElement("span",{className:"k-treeview-toggle"},i.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}))},t.prototype.renderSubitemsIfApplicable=function(){var e=this,t=this.fieldsSvc.children(this.item);return pt(this.item,this.fieldsSvc)?i.createElement("ul",{className:"k-treeview-group",role:"group"},t.map((function(n,r){return i.createElement(Ot,{item:n,position:0===r?"top":r===t.length-1?"bot":"mid",itemId:rt(r,e.itemId),treeGuid:e.props.treeGuid,animate:e.props.animate,focusedItemId:e.props.focusedItemId,tabbableItemId:e.props.tabbableItemId,fieldsService:e.props.fieldsService,itemUI:e.props.itemUI,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.props.ariaMultiSelectable,onItemClick:e.props.onItemClick,onFocusDomElNeeded:e.props.onFocusDomElNeeded,draggable:e.props.draggable,onPress:e.props.onPress,onDrag:e.props.onDrag,onRelease:e.props.onRelease,expandIcons:e.props.expandIcons,onExpandChange:e.props.onExpandChange,onCheckChange:e.props.onCheckChange,key:r,size:e.props.size})}))):void 0},t.prototype.renderItemInPart=function(){return i.createElement("span",{className:this.getContentClassName(),style:{touchAction:"none"},onClick:this.onItemClick},i.createElement("span",{className:"k-treeview-leaf-text"},this.props.itemUI?i.createElement(this.props.itemUI,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item)))},Object.defineProperty(t.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||dt(this.item,this.fieldsSvc.getChildrenField())?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaChecked",{get:function(){return this.props.checkboxes?this.fieldsSvc.checked(this.item)?"true":this.fieldsSvc.checkIndeterminate(this.item)?"mixed":"false":void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!0,configurable:!0}),t.prototype.getIconClassName=function(){var e=this.fieldsSvc.expanded(this.item);return Object(l.a)("k-icon",{"k-i-expand":!e,"k-i-collapse":e,"k-i-loading":e&&!dt(this.item,this.fieldsSvc.getChildrenField())})},t.prototype.getRootClassName=function(){return Object(l.a)("k-treeview-item",{"k-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return Object(l.a)("k-treeview-leaf",{"k-focus":this.props.focusedItemId===this.itemId,"k-selected":this.fieldsSvc.selected(this.item)})},t.defaultProps={position:"top"},t}(i.Component),Ot=i.forwardRef((function(e,t){var n=i.useContext(wt).call(void 0,e);return i.createElement(Ct,bt({ref:t},n))}));Ot.displayName="TreeViewItem";var xt=function(){function e(e){this.expandField=e.expandField,this.selectField=e.selectField,this.hasChildrenField=e.hasChildrenField,this.childrenField=e.childrenField,this.textField=e.textField,this.disableField=e.disableField,this.checkField=e.checkField,this.checkIndeterminateField=e.checkIndeterminateField,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return ut(this.expandField,e)},e.prototype.selected=function(e){return ut(this.selectField,e)},e.prototype.text=function(e){return ut(this.textField,e)},e.prototype.disabled=function(e){return ut(this.disableField,e)},e.prototype.hasChildren=function(e){return ut(this.hasChildrenField,e)},e.prototype.children=function(e){var t=ut(this.childrenField,e);return t||[]},e.prototype.checked=function(e){return ut(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return ut(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&ut(this.focusIdField,e)},e.prototype.getChildrenField=function(){return this.childrenField},e}(),St={name:"@progress/kendo-react-treeview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189062,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},Et=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),It=s.a.sizeMap,Nt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:"0"},n.allowExplicitFocus=!1,n.treeGuid=Object($.a)(),n._element=null,n.onFocusDomElNeeded=function(e){n.allowExplicitFocus&&n.focusDomItem(e)},n.onCheckChange=function(e,t,r){n.setFocus(r),n.dispatchCheckChange(e,t,r)},n.onExpandChange=function(e,t,r){n.setFocus(r),n.dispatchExpandChange(e,t,r)},n.onPress=function(e,t,r){n.props.onItemDragStart&&n.props.onItemDragStart.call(void 0,{target:n,item:t,itemHierarchicalIndex:r})},n.onDrag=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragOver&&n.props.onItemDragOver.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onRelease=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragEnd&&n.props.onItemDragEnd.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onItemClick=function(e,t,r){n.setFocus(r),n.dispatchItemClick(e,t,r)},n.onFocus=function(){clearTimeout(n.blurRequest),void 0===n.state.focusedItemId&&n.data.length&&n.setFocus(n.state.tabbableItemId)},n.onBlur=function(){clearTimeout(n.blurRequest),n.blurRequest=window.setTimeout((function(){return n.setFocus(void 0)}),0)},n.onKeyDown=function(e){var t=n.getFocusedItem();if(t){var r=mt(t,n.state.focusedItemId,n.data,e.keyCode,n.fieldsSvc);r!==n.state.focusedItemId&&(e.preventDefault(),n.allowExplicitFocus=!0,n.setFocus(r)),n.dispatchEventsOnKeyDown(e,t)}},Object(G.a)(St),n}return Et(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e,t=this;this.fieldsSvc=new xt(this.props);var n=this.props,r=n.size,o=n.className;return i.createElement("div",{className:Object(l.a)("k-treeview",(e={},e["k-treeview-"+(It[r]||r)]=r,e),o),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],ref:function(e){return t._element=e},tabIndex:this.props.tabIndex},i.createElement("ul",{className:"k-treeview-lines k-treeview-group",role:"group"},this.data.map((function(e,n){return i.createElement(Ot,{item:e,position:0===n?"top":n===t.data.length-1?"bot":"mid",itemId:n.toString(),treeGuid:t.treeGuid,animate:t.props.animate,focusedItemId:t.state.focusedItemId,tabbableItemId:t.state.tabbableItemId,fieldsService:t.fieldsSvc,itemUI:t.props.item,checkboxes:t.props.checkboxes,ariaMultiSelectable:t.ariaMultiSelectable,onItemClick:t.onItemClick,onFocusDomElNeeded:t.onFocusDomElNeeded,draggable:t.props.draggable,onPress:t.onPress,onDrag:t.onDrag,onRelease:t.onRelease,expandIcons:t.props.expandIcons,onExpandChange:t.onExpandChange,onCheckChange:t.onCheckChange,key:n,size:r})}))))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,r=function(){return ht(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===c.a.left&&this.fieldsSvc.expanded(t)&&r()||e.keyCode===c.a.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||dt(t,this.props.childrenField))&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===c.a.enter&&r()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===c.a.space&&r()&&(e.preventDefault(),this.dispatchCheckChange(e,t,this.state.focusedItemId))},t.prototype.setFocus=function(e){if(e)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState((function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}}))},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return Qe(e,this.data,this.props.childrenField||"items")},t.prototype.dispatchCheckChange=function(e,t,n){Object(Ze.a)(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){Object(Ze.a)(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){Object(Ze.a)(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.refocusDueToFocusIdField=function(){if(this.fieldsSvc.focusIdField){var e=this.state.focusedItemPublicId;if(e){var t=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(e):ft(e,this.fieldsSvc.focusIdField,this.data,this.props.childrenField);t!==this.state.focusedItemId&&(this.allowExplicitFocus=!0,this.setState({focusedItemId:t}))}}},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.data||[]},enumerable:!0,configurable:!0}),t.prototype.focusDomItem=function(e){e.focus()},Object.defineProperty(t.prototype,"guid",{get:function(){return this.treeGuid},enumerable:!0,configurable:!0}),t.propTypes={data:a.arrayOf(a.any),animate:a.bool,tabIndex:a.number,focusIdField:a.string,getHierarchicalIndexById:a.func,onExpandChange:a.func,onItemClick:a.func,expandField:a.string,selectField:a.string,childrenField:a.string,hasChildrenField:a.string,textField:a.string,disableField:a.string,item:a.any,"aria-multiselectable":function(e,t,n){return void 0!==e[t]&&!0!==e[t]&&!1!==e[t]&&"true"!==e[t]&&"false"!==e[t]?new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed."):null},"aria-label":a.string,"aria-labelledby":a.string,size:a.oneOf([null,"small","medium","large"])},t.defaultProps={animate:!0,expandField:"expanded",selectField:"selected",hasChildrenField:"hasChildren",childrenField:"items",textField:"text",disableField:"disabled",checkField:"checked",checkIndeterminateField:"checkIndeterminate",size:"medium"},t}(i.Component);function Tt(e,t,n){var r=i.useState(t),o=r[0],a=r[1];return i.useEffect((function(){void 0!==o&&e.current&&a(e.current.offsetWidth)}),n),o}var Mt=function(e){return i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.children))},Dt=function(){return(Dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pt=s.a.sizeMap,_t=s.a.roundedMap,jt=function(e){return i.createElement("span",{className:"k-input-value-text"},e.children)},Rt=function(e){return e.split("_").map((function(e){return parseInt(e,10)}))},At={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},Ft=Object(d.a)(),zt=i.forwardRef((function(e,t){var n,r;Object(G.a)(X);var o=Object(Be.a)(Ft,e),a=i.useMemo((function(){return Object($.a)()}),[]),s=o.id||a,d=o.data,h=void 0===d?[]:d,m=o.dataItemKey,v=o.popupSettings,g=void 0===v?{}:v,y=o.style,b=void 0===y?{}:y,C=o.opened,O=o.disabled,x=o.onOpen,E=void 0===x?Xe.a:x,N=o.onClose,T=void 0===N?Xe.a:N,M=o.placeholder,D=o.label,P=o.name,_=o.selectField,j=void 0===_?At.selectField:_,R=o.subItemsField,B=void 0===R?At.subItemsField:R,V=o.validationMessage,H=o.valid,K=o.required,W=o.validityStyles,q=Object(u.a)(o.tabIndex,O),U=i.useRef(null),J=i.useRef(null),Y=i.useRef(null),Z=i.useRef(null),Q=i.useRef(null),ee=i.useRef(!1),te=i.useState(void 0),ne=te[0],re=te[1],oe=void 0!==o.value,ie=oe?o.value:void 0!==ne?ne:o.defaultValue,ae=w(ie),se=ae?S(ie,o.textField):"",le=function(e,t){var n=e.validationMessage,r=e.valid,o=e.required;return{customError:void 0!==n,valid:Boolean(void 0!==r?r:!o||t),valueMissing:!t}}({validationMessage:V,valid:H,required:K},ae),ce=i.useCallback((function(){return J.current&&J.current.focus()}),[]);i.useImperativeHandle(U,(function(){return{props:o,element:J.current,focus:ce}})),i.useImperativeHandle(t,(function(){return U.current}));var ue=Object(Je.a)(J,o.dir),de=void 0!==g.width?g.width:void 0!==b.width?b.width:At.popupSettings.width,pe=Tt(J,de),fe=Dt({width:pe},void 0!==ue?{direction:ue}:{}),he=i.useState(!1),me=he[0],ve=he[1],ge=void 0!==C?C:me,ye=i.useState(!1),be=ye[0],ke=ye[1],we=i.useState(""),Ce=we[0],Oe=we[1],xe=i.useCallback((function(){Z.current&&Z.current.setCustomValidity&&Z.current.setCustomValidity(le.valid?"":void 0===V?"Please select a value from the list!":V)}),[V,le]);i.useEffect(xe);var Se=i.useCallback((function(e){if(!ge){if(E){var t=Dt({},e);E.call(void 0,t)}void 0===C&&ve(!0)}}),[ge,C,E]),Ee=i.useCallback((function(e){if(ge){if(T){var t=Dt({},e);T.call(void 0,t)}void 0===C&&ve(!1)}}),[ge,C,T]),Ie=i.useCallback((function(e){if(!e.isDefaultPrevented()&&U.current){ke(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};(ge?Ee:Se)(t)}}),[ge,C,E,T]),Ne=i.useCallback((function(e){ee.current=!0,e(),window.setTimeout((function(){return ee.current=!1}),0)}),[]),Te=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=Q.current&&Q.current.element;if(U.current&&(!e.isDefaultPrevented()||Y.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};if(ge)if(t===c.a.esc||n&&t===c.a.up)e.preventDefault(),Ee(o);else if(r&&r.querySelector(".k-focus")&&(t===c.a.up||t===c.a.down||t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end)){if(t===c.a.up&&Y.current){var i=Array.from(r.querySelectorAll(".k-treeview-item")),a=i.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(a&&0===i.indexOf(a))return Ne((function(){De(Y.current)}))}Ne(Xe.a)}else t===c.a.down&&Ne((function(){De(Y.current||r)}));else n&&t===c.a.down&&(e.preventDefault(),Se(o))}}),[ge,C,E,T]),Me=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==c.a.up&&t!==c.a.down||(e.preventDefault(),Ne(t===c.a.up?function(){De(J.current)}:function(){De(Q.current&&Q.current.element)}))}),[]),De=i.useCallback((function(e){e&&Ne((function(){return e.focus()}))}),[]),Pe=i.useCallback((function(){!be&&ge?Ee({target:U.current}):o.filterable?De(Y.current):De(Q.current&&Q.current.element)}),[T,o.filterable,be,C,ge]),_e=i.useCallback((function(){be&&De(J.current)}),[be]),je=i.useCallback((function(e){if(!be&&!ee.current&&(ke(!0),o.onFocus&&U.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};o.onFocus.call(void 0,t)}}),[be,o.onFocus]),Re=i.useCallback((function(e){if(be&&!ee.current&&U.current){ke(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};if(o.onBlur){var n=Dt({},t);o.onBlur.call(void 0,n)}Ee(t)}}),[be,o.onBlur,ge,C,T]),Ae=i.useCallback((function(){be&&Ne(Xe.a)}),[be]),Fe=i.useCallback((function(e,t,n){if(o.onChange){var r=Dt({value:t,level:n?Rt(n):[]},e);o.onChange.call(void 0,r)}oe||re(t)}),[o.onChange,oe]),ze=i.useCallback((function(e){if(!I(e.item,ie,m)&&U.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o={syntheticEvent:e.syntheticEvent,nativeEvent:r,target:U.current};Fe(o,t,n),Ee(o)}}),[oe,ie,o.onChange,m,ge,C,T]),Le=i.useCallback((function(e){if(U.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};Fe(t,null),Ee(t),e.preventDefault()}}),[oe,o.onChange,ge,C,T]),Ve=i.useCallback((function(e){if(e.syntheticEvent.stopPropagation(),o.onExpandChange&&U.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,i=e.syntheticEvent,a={level:Rt(n),item:t,nativeEvent:r,syntheticEvent:i,target:U.current};o.onExpandChange.call(void 0,a)}}),[o.onExpandChange]),He=i.useCallback((function(e){if(o.onFilterChange&&U.current){var t={filter:{field:o.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};o.onFilterChange.call(void 0,t),void 0===o.filter&&Oe(e.target.value)}}),[o.onFilterChange,o.filter,o.textField]),Ke=i.useMemo((function(){return oe||!ae?h:Object(Ye.c)(h,B,(function(e){var t;return Object(Ye.a)(e,B,((t={})[j]=I(e,ie,m),t))}))}),[h,ie,oe,ae,j,B]),We=o.listNoData||Mt,$e=o.valueHolder||jt,qe=Object(A.useLocalization)(),Ue=!W||le.valid,Ge=o.size,Ze=o.rounded,Qe=o.fillMode,et=i.createElement("span",{className:Object(l.a)("k-dropdowntree k-picker",o.className,(n={},n["k-picker-"+(Pt[Ge]||Ge)]=Ge,n["k-rounded-"+(_t[Ze]||Ze)]=Ze,n["k-picker-"+Qe]=Qe,n["k-focus"]=be,n["k-invalid"]=!Ue,n["k-loading"]=o.loading,n["k-required"]=K,n["k-disabled"]=o.disabled,n)),tabIndex:q,accessKey:o.accessKey,id:s,style:D?Dt({},b,{width:void 0}):b,dir:ue,ref:J,onKeyDown:O?void 0:Te,onMouseDown:Ae,onClick:O?void 0:Ie,onFocus:je,onBlur:Re,role:"listbox","aria-haspopup":"true","aria-expanded":ge,"aria-disabled":O,"aria-label":D,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy},i.createElement("span",{className:"k-input-inner"},i.createElement($e,{item:ie},se||M)),o.loading&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),ae&&!O&&i.createElement("span",{onClick:Le,className:"k-clear-value",title:qe.toLanguageString(z,L[z]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:"k-icon k-i-x"})),i.createElement("button",{tabIndex:-1,type:"button","aria-label":"select",className:Object(l.a)("k-input-button k-button k-icon-button",(r={},r["k-button-"+(Pt[Ge]||Ge)]=Ge,r["k-button-"+Qe]=Qe,r["k-button-"+Qe+"-base"]=Qe,r))},i.createElement("span",{className:"k-button-icon k-icon k-i-arrow-s"})),i.createElement("select",{name:P,ref:Z,tabIndex:-1,"aria-hidden":!0,title:D,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:o.valueMap?o.valueMap.call(void 0,ie):ie})),i.createElement(f.a,{className:Object(l.a)(g.className,{"k-rtl":"rtl"===ue}),popupClass:g.popupClass,style:fe,animate:g.animate,anchor:J.current,show:ge,onOpen:Pe,onClose:_e,appendTo:g.appendTo},o.filterable&&i.createElement(k,{value:void 0===o.filter?Ce:o.filter,inputRef:Y,onChange:He,onKeyDown:Me,size:Ge,rounded:Ze,fillMode:Qe}),h.length>0?i.createElement(Nt,{ref:Q,tabIndex:q,data:Ke,focusIdField:m,textField:o.textField,selectField:j,expandField:o.expandField,childrenField:B,expandIcons:!0,onItemClick:ze,onExpandChange:Ve,size:Ge,item:o.item}):i.createElement(We,null,qe.toLanguageString(F,L[F]))));return D?i.createElement(p.a,{label:D,editorValue:se,editorPlaceholder:M,editorValid:Ue,editorDisabled:O,editorId:s,style:{width:b?b.width:void 0},children:et,dir:ue}):et})),Lt={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,value:a.any,valueMap:a.func,placeholder:a.string,dataItemKey:a.string.isRequired,textField:a.string.isRequired,selectField:a.string,expandField:a.string,subItemsField:a.string,className:a.string,style:a.object,label:a.string,validationMessage:a.string,validityStyles:a.bool,valid:a.bool,required:a.bool,name:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,filterable:a.bool,filter:a.string,loading:a.bool,popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.any,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,onFilterChange:a.func,onExpandChange:a.func,item:a.func,valueHolder:a.func,listNoData:a.func};zt.displayName="KendoReactDropDownTree",zt.defaultProps=At,zt.propTypes=Lt;var Bt=function(){return(Bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vt=s.a.sizeMap,Ht=s.a.roundedMap,Kt={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},Wt=Object(d.a)(),$t=i.forwardRef((function(e,t){var n,r,o=Object(Be.a)(Wt,e);Object(G.a)(X);var a=i.useMemo((function(){return Object($.a)()}),[]),s=o.id||a,d=o.data,h=void 0===d?[]:d,m=o.dataItemKey,v=o.popupSettings,g=void 0===v?{}:v,y=o.style,b=void 0===y?{}:y,w=o.opened,C=o.disabled,O=o.onOpen,x=void 0===O?Xe.a:O,E=o.onClose,N=void 0===E?Xe.a:E,T=o.placeholder,D=o.label,P=o.name,_=o.checkField,j=void 0===_?Kt.checkField:_,R=o.checkIndeterminateField,z=void 0===R?Kt.checkIndeterminateField:R,B=o.subItemsField,V=void 0===B?Kt.subItemsField:B,H=o.validationMessage,K=o.valid,W=o.tags,q=o.value,U=o.required,J=void 0===U?Kt.required:U,Y=o.validityStyles,Z=void 0===Y?Kt.validityStyles:Y,Q=Object(u.a)(o.tabIndex,C),ee=i.useRef(null),te=i.useRef(null),ne=i.useRef(null),re=i.useRef(null),oe=i.useRef(null),ie=i.useRef(!1),ae=i.useRef([]),le=i.useRef(null),ce=i.useState(),ue=ce[0],de=ce[1],pe=i.useState(!1),fe=pe[0],he=pe[1],me=i.useState(!1),ve=me[0],ge=me[1],ye=i.useState(""),be=ye[0],ke=ye[1],we=void 0!==w?w:fe,Ce=Boolean(Array.isArray(q)&&q.length),Oe=function(e,t){var n=e.validationMessage,r=e.valid,o=e.required;return{customError:void 0!==n,valid:Boolean(void 0!==r?r:!o||t),valueMissing:!t}}({validationMessage:H,valid:K,required:J},Ce),xe=Object(Je.a)(te,o.dir),Se=void 0!==g.width?g.width:void 0!==b.width?b.width:Kt.popupSettings.width,Ee=Tt(te,Se),Ne=Bt({width:Ee},void 0!==xe?{direction:xe}:{}),Te=i.useCallback((function(){return te.current&&te.current.focus()}),[]);ae.current=void 0===W?(q||[]).map((function(e){return{text:S(e,o.textField),data:[e]}})):W.slice(),i.useImperativeHandle(ee,(function(){return{props:o,element:te.current,focus:Te}})),i.useImperativeHandle(t,(function(){return ee.current}));var Me=i.useCallback((function(){re.current&&re.current.setCustomValidity&&re.current.setCustomValidity(Oe.valid?"":void 0===H?"Please select a value from the list!":H)}),[H,Oe]);i.useEffect(Me),i.useEffect((function(){le.current&&we&&le.current.setPosition(le.current._popup)}),[q,we]);var De=i.useCallback((function(e,t,n){if(o.onChange){var r=Bt({items:t,operation:n},e);o.onChange.call(void 0,r)}}),[o.onChange]),Pe=i.useCallback((function(e){if(!I(e.item,q,m)&&ee.current){var t=e.item,n=e.nativeEvent,r={syntheticEvent:e.syntheticEvent,nativeEvent:n,target:ee.current};De(r,[t],"toggle")}}),[q,m,De]),_e=i.useCallback((function(e){if(!we){if(x){var t=Bt({},e);x.call(void 0,t)}void 0===w&&he(!0)}}),[we,w,x]),je=i.useCallback((function(e){if(we){if(N){var t=Bt({},e);N.call(void 0,t)}void 0===w&&he(!1)}}),[we,w,N]),Re=i.useCallback((function(e){ie.current=!0,e(),window.setTimeout((function(){return ie.current=!1}),0)}),[]),Ae=i.useCallback((function(e){e&&Re((function(){return e.focus()}))}),[Re]),Fe=i.useCallback((function(){!ve&&we?je({target:ee.current}):o.filterable?Ae(ne.current):Ae(oe.current&&oe.current.element)}),[ve,we,Ae,je,o.filterable]),ze=i.useCallback((function(){ve&&Ae(te.current)}),[ve,Ae]),Le=i.useCallback((function(e){if(!ve&&!ie.current&&(ge(!0),o.onFocus&&ee.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};o.onFocus.call(void 0,t)}}),[ve,o.onFocus]),Ve=i.useCallback((function(e){if(ve&&!ie.current&&ee.current){ge(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};if(o.onBlur){var n=Bt({},t);o.onBlur.call(void 0,n)}je(t)}}),[ve,o.onBlur,we,w,N]),He=i.useCallback((function(){ve&&Re(Xe.a)}),[ve,Re]),Ke=i.useCallback((function(e){if(!e.isDefaultPrevented()&&ee.current){ge(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};we||_e(t)}}),[we,_e]),We=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=oe.current&&oe.current.element;if(ee.current&&(!e.isDefaultPrevented()||ne.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};if(q&&q.length>0&&(t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end||t===c.a.delete)){var i=ae.current,a=ue?i.findIndex((function(e){return M(e,ue,m)})):-1,s=void 0,l=-1!==a;t===c.a.left?s=i[a=l?Math.max(0,a-1):i.length-1]:t===c.a.right?a===i.length-1?s=void 0:l&&(s=i[a=Math.min(i.length-1,a+1)]):t===c.a.home?s=i[0]:t===c.a.end?s=i[i.length-1]:t===c.a.delete&&l&&De(o,i[a].data,"delete"),s!==ue&&de(s)}if(we)if(t===c.a.esc||n&&t===c.a.up)e.preventDefault(),je(o);else if(r&&r.querySelector(".k-focus")&&(t===c.a.up||t===c.a.down||t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end)){if(t===c.a.up&&ne.current){var u=Array.from(r.querySelectorAll(".k-treeview-item")),d=u.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(d&&0===u.indexOf(d))return Re((function(){Ae(ne.current)}))}Re(Xe.a)}else t===c.a.down&&Re((function(){Ae(ne.current||r)}));else n&&t===c.a.down&&(e.preventDefault(),_e(o))}}),[we,je,Ae,Re,_e,ue,m,q,De]),$e=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==c.a.up&&t!==c.a.down||(e.preventDefault(),Re(t===c.a.up?function(){Ae(te.current)}:function(){Ae(oe.current&&oe.current.element)}))}),[Ae,Re]),qe=i.useCallback((function(e){if(ee.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};De(t,[],"clear"),je(t),e.preventDefault()}}),[De,je]),Ue=i.useCallback((function(e,t){je({target:ee.current}),ve||Ae(ne.current),De({syntheticEvent:t,nativeEvent:t.nativeEvent,target:ee.current},e,"delete")}),[De,je,Ae,ve]),Ge=i.useCallback((function(e){if(o.onExpandChange&&ee.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,i=e.syntheticEvent,a={level:(s=n,s.split("_").map((function(e){return parseInt(e,10)}))),item:t,nativeEvent:r,syntheticEvent:i,target:ee.current};o.onExpandChange.call(void 0,a)}var s}),[o.onExpandChange]),Ye=i.useCallback((function(e){if(o.onFilterChange&&ee.current){var t={filter:{field:o.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};o.onFilterChange.call(void 0,t),void 0===o.filter&&ke(e.target.value)}}),[o.onFilterChange,o.filter,o.textField]),Ze=o.listNoData||Mt,Qe=Object(A.useLocalization)(),et=!Z||Oe.valid,tt=o.size,nt=o.rounded,rt=o.fillMode,ot=i.createElement("span",{className:Object(l.a)("k-multiselect k-input",o.className,(n={},n["k-input-"+(Vt[tt]||tt)]=tt,n["k-rounded-"+(Ht[nt]||nt)]=nt,n["k-input-"+rt]=rt,n["k-focus"]=ve&&!C,n["k-invalid"]=!et,n["k-disabled"]=C,n["k-loading"]=o.loading,n["k-required"]=J,n)),tabIndex:Q,accessKey:o.accessKey,id:s,style:D?Bt({},b,{width:void 0}):b,dir:xe,ref:te,onKeyDown:C?void 0:We,onMouseDown:He,onFocus:Le,onBlur:Ve,role:"listbox","aria-haspopup":"true","aria-expanded":we,"aria-disabled":C,"aria-label":D,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,onClick:C?void 0:Ke},ae.current.length>0&&i.createElement("div",{className:Object(l.a)("k-input-values k-chip-list k-selection-multiple",(r={},r["k-chip-list-"+(Vt[tt]||tt)]=tt,r)),role:"listbox",id:"tagslist-"+s},i.createElement(Ie,{tag:o.tag,onTagDelete:Ue,data:ae.current,guid:s,focused:ue?ae.current.find((function(e){return M(e,ue,m)})):void 0,size:tt})),!Ce&&i.createElement("span",{className:"k-input-inner"},i.createElement("span",{className:"k-input-value-text"}," ")),o.loading&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),Ce&&!C&&i.createElement(se,{onClick:qe}),i.createElement("select",{name:P,ref:re,tabIndex:-1,"aria-hidden":!0,title:D,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:o.valueMap?o.valueMap.call(void 0,q):q})),i.createElement(f.a,{popupClass:g.popupClass,className:Object(l.a)(g.className,{"k-rtl":"rtl"===xe}),style:Ne,animate:g.animate,anchor:te.current,show:we,onOpen:Fe,onClose:ze,appendTo:g.appendTo,ref:le},o.filterable&&i.createElement(k,{value:void 0===o.filter?be:o.filter,inputRef:ne,onChange:Ye,onKeyDown:$e,tabIndex:Q,size:tt,rounded:nt,fillMode:rt}),h.length>0?i.createElement(Nt,{ref:oe,tabIndex:Q,data:h,focusIdField:m,textField:o.textField,checkField:j,checkIndeterminateField:z,expandField:o.expandField,childrenField:V,expandIcons:!0,onItemClick:Pe,onCheckChange:Pe,onExpandChange:Ge,checkboxes:!0,size:tt,item:o.item}):i.createElement(Ze,null,Qe.toLanguageString(F,L[F]))));return D?i.createElement(p.a,{label:D,editorValue:Ce,editorPlaceholder:T,editorValid:et,editorDisabled:C,editorId:s,style:{width:b?b.width:void 0},children:ot,dir:xe}):ot})),qt={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,value:a.any,valueMap:a.func,placeholder:a.string,dataItemKey:a.string.isRequired,textField:a.string.isRequired,checkField:a.string,checkIndeterminateField:a.string,expandField:a.string,subItemsField:a.string,className:a.string,style:a.object,label:a.string,validationMessage:a.string,validityStyles:a.bool,valid:a.bool,required:a.bool,name:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,filterable:a.bool,filter:a.string,loading:a.bool,tags:a.arrayOf(a.shape({text:a.string,data:a.arrayOf(a.any)})),popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.any,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,onFilterChange:a.func,onExpandChange:a.func,item:a.func,listNoData:a.func};$t.displayName="KendoReactMultiSelectTree",$t.defaultProps=Kt,$t.propTypes=qt;var Ut=function(e,t){var n={};return e&&e.length&&e.forEach((function(e){n[t(e)]=!0})),n},Gt=function(e,t){var n=t.items,r=t.dataItemKey,o=t.value,i=t.subItemsField,a=void 0===i?"items":i,s=t.operation,l=Object(He.a)(r),c=Ut(o,l);if("clear"===s)return[];if("delete"===s){var u=Ut(n,l);return o.filter((function(e){return!u[l(e)]}))}for(var d,p,f=n[0],h=l(f),m=Object(He.a)(a),v=e.slice(),g=[];v.length;){var y=v.pop();if(h===l(y)){d=g.map((function(e){return e.item})),p=y;break}g&&g.length&&g[g.length-1].parentPosition===v.length&&g.pop(),(S=m(y))&&S.length&&(g.push({item:y,parentPosition:v.length}),v.push.apply(v,S))}for(var b=(m(p)||[]).slice(),k=[];b.length;){y=b.pop();k.push(y),(S=m(y))&&S.length&&b.push.apply(b,S)}var w=[];if(!c[h]){w.push.apply(w,o),w.push(p),w.push.apply(w,k.filter((function(e){return!c[l(e)]})));for(var C=d.filter((function(e){return!c[l(e)]})),O=Ut(w,l),x=C.length-1;x>-1;x--){var S,E=C[x];if((S=m(E)).filter((function(e){return O[l(e)]})).length<S.length)break;w.push(E),O[l(E)]=!0}}else{var I=l(p),N=Ut(k,l),T=Ut(d,l);w.push.apply(w,o.filter((function(e){var t=l(e);return!N[t]&&I!==t&&!T[t]})))}return w}},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(69);t.Editor=r.default;var o=n(78);t.EditorTools=o.EditorTools;var i=n(14);t.EditorToolsSettings=i.EditorToolsSettings;var a=n(46);t.EditorUtils=a.EditorUtils;var s=n(28);t.EditorDialogs=s.EditorDialogs;var l=n(5);t.ProseMirror={Selection:l.Selection,SelectionRange:l.SelectionRange,TextSelection:l.TextSelection,NodeSelection:l.NodeSelection,AllSelection:l.AllSelection,EditorState:l.EditorState,Plugin:l.Plugin,PluginKey:l.PluginKey,Transaction:l.Transaction,Decoration:l.Decoration,DecorationSet:l.DecorationSet,EditorView:l.EditorView,Node:l.Node,ResolvedPos:l.ResolvedPos,NodeRange:l.NodeRange,Fragment:l.Fragment,Slice:l.Slice,ReplaceError:l.ReplaceError,Mark:l.Mark,Schema:l.Schema,NodeType:l.NodeType,MarkType:l.MarkType,ContentMatch:l.ContentMatch,DOMParser:l.DOMParser,DOMSerializer:l.DOMSerializer,Transform:l.Transform,Step:l.Step,StepResult:l.StepResult,joinPoint:l.joinPoint,canJoin:l.canJoin,canSplit:l.canSplit,insertPoint:l.insertPoint,dropPoint:l.dropPoint,liftTarget:l.liftTarget,findWrapping:l.findWrapping,StepMap:l.StepMap,MapResult:l.MapResult,Mapping:l.Mapping,AddMarkStep:l.AddMarkStep,RemoveMarkStep:l.RemoveMarkStep,ReplaceStep:l.ReplaceStep,ReplaceAroundStep:l.ReplaceAroundStep,replaceStep:l.replaceStep,deleteSelection:l.deleteSelection,joinBackward:l.joinBackward,selectNodeBackward:l.selectNodeBackward,joinForward:l.joinForward,selectNodeForward:l.selectNodeForward,joinUp:l.joinUp,joinDown:l.joinDown,lift:l.lift,newlineInCode:l.newlineInCode,exitCode:l.exitCode,createParagraphNear:l.createParagraphNear,liftEmptyBlock:l.liftEmptyBlock,splitBlock:l.splitBlock,splitBlockKeepMarks:l.splitBlockKeepMarks,selectParentNode:l.selectParentNode,selectAll:l.selectAll,wrapIn:l.wrapIn,setBlockType:l.setBlockType,toggleMark:l.toggleMark,autoJoin:l.autoJoin,chainCommands:l.chainCommands,pcBaseKeymap:l.pcBaseKeymap,macBaseKeymap:l.macBaseKeymap,baseKeymap:l.baseKeymap,history:l.history,undo:l.undo,redo:l.redo,undoDepth:l.undoDepth,redoDepth:l.redoDepth,InputRule:l.InputRule,inputRules:l.inputRules,undoInputRule:l.undoInputRule,emDash:l.emDash,ellipsis:l.ellipsis,openDoubleQuote:l.openDoubleQuote,closeDoubleQuote:l.closeDoubleQuote,openSingleQuote:l.openSingleQuote,closeSingleQuote:l.closeSingleQuote,smartQuotes:l.smartQuotes,wrappingInputRule:l.wrappingInputRule,textblockTypeInputRule:l.textblockTypeInputRule,keymap:l.keymap,keydownHandler:l.keydownHandler,orderedList:l.orderedList,bulletList:l.bulletList,listItem:l.listItem,addListNodes:l.addListNodes,wrapInList:l.wrapInList,splitListItem:l.splitListItem,liftListItem:l.liftListItem,sinkListItem:l.sinkListItem,dropCursor:l.dropCursor,gapCursor:l.gapCursor,tableEditing:l.tableEditing,fixTables:l.fixTables,fixTablesKey:l.fixTablesKey,cellAround:l.cellAround,isInTable:l.isInTable,selectionCell:l.selectionCell,moveCellForward:l.moveCellForward,inSameTable:l.inSameTable,findCell:l.findCell,colCount:l.colCount,nextCell:l.nextCell,removeColSpan:l.removeColSpan,addColSpan:l.addColSpan,columnIsHeader:l.columnIsHeader,tableNodes:l.tableNodes,tableNodeTypes:l.tableNodeTypes,CellSelection:l.CellSelection,TableMap:l.TableMap,tableEditingKey:l.tableEditingKey,columnResizing:l.columnResizing,columnResizingPluginKey:l.columnResizingPluginKey,updateColumnsOnResize:l.updateColumnsOnResize,selectedRect:l.selectedRect,addColumn:l.addColumn,addColumnBefore:l.addColumnBefore,addColumnAfter:l.addColumnAfter,deleteColumn:l.deleteColumn,rowIsHeader:l.rowIsHeader,addRow:l.addRow,addRowBefore:l.addRowBefore,addRowAfter:l.addRowAfter,deleteRow:l.deleteRow,mergeCells:l.mergeCells,splitCell:l.splitCell,splitCellWithType:l.splitCellWithType,setCellAttr:l.setCellAttr,toggleHeader:l.toggleHeader,toggleHeaderRow:l.toggleHeaderRow,toggleHeaderColumn:l.toggleHeaderColumn,toggleHeaderCell:l.toggleHeaderCell,goToNextCell:l.goToNextCell,deleteTable:l.deleteTable}},,function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(1),l=n(4),c=n(2),u=n(5),d=n(61),p=n(70),f=n(14),h=n(28),m=n(46),v=n(45),g=n(75),y=f.EditorToolsSettings.link,b=f.EditorToolsSettings.bold,k=f.EditorToolsSettings.italic,w=f.EditorToolsSettings.underline,C=n(76),O=n(8),x=n(77),S=function(e){function t(t){var n=e.call(this,t)||this;if(n.state={view:void 0,linkDialog:!1},n.trOnChange=null,n.htmlOnChange=null,n.focus=function(){n.view&&n.view.focus()},n.renderDialog=function(e,t,r){return n.state[r]&&a.createElement(e,{view:n.view,settings:t,dir:n.props.dir,onClose:function(){var e;return n.setState(((e={})[r]=!1,e))}})},n.renderTool=function(e,t){var r=a.createElement(e,{view:n.view,dir:n.props.dir,key:t});return r.type===l.ToolbarSeparator?a.createElement(e,{key:t}):r},n.updateTools=function(e,t){n.setState({view:e})},n.filterTransaction=function(e,t){var r={target:n,transaction:e,state:t};return!1!==(n.props.onExecute&&n.props.onExecute.call(void 0,r))},n.onPasteHtml=function(e){if(n.props.onPasteHtml&&n.pasteEvent){var t={target:n,pastedHtml:e,nativeEvent:n.pasteEvent},r=n.props.onPasteHtml.call(void 0,t);if(n.pasteEvent=void 0,"string"==typeof r)return r}return e},n.dispatchTransaction=function(e){var t=e.docChanged;if(n.props.onChange&&t){n.trOnChange=e;var r=e.doc,o=e.doc.type.schema,i=n,a={target:i,value:r,get html(){return i.htmlOnChange=m.EditorUtils.getHtml({doc:r,schema:o}),i.htmlOnChange},transaction:e,schema:o};n.props.onChange.call(void 0,a)}!n.view||void 0!==n.props.value&&t||n.view.updateState(n.view.state.apply(e))},n.onFocus=function(e,t){if(n.props.onFocus){var r={target:n,nativeEvent:t};n.props.onFocus.call(void 0,r)}return!1},n.onBlur=function(e,t){if(n.props.onBlur){var r={target:n,nativeEvent:t};n.props.onBlur.call(void 0,r)}return!1},n.onPaste=function(e,t){return n.props.onPasteHtml&&(n.pasteEvent=t),!1},void 0!==O)O.validatePackage(x.packageMetadata);else{var r="License activation failed for "+x.packageMetadata.name+"\n";r+="The @progress/kendo-licensing script is not loaded.\n",r+="See "+x.packageMetadata.licensingDocsUrl+" for more information.\n",console.warn(r)}return n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentElement",{get:function(){return this._contentElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.iframe&&C.firefox||this.initialize()},t.prototype.componentDidUpdate=function(e){var t=this.props.value,n=this.view;void 0!==t&&n&&(g.updateEditorValue(n,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)},t.prototype.componentWillUnmount=function(){this.view&&this.view.destroy(),this._view=void 0},t.prototype.render=function(){var e=this,t=this.props,n=t.tools,r=void 0===n?[]:n,o=t.defaultEditMode,i=void 0===o?"iframe":o,s=t.preserveWhitespace,u=void 0===s?"full":s,d=t.style,p=t.className;this.view&&(v.editorPropsKey.getState(this.view.state).preserveWhitespace=u);var f=this.props.contentStyle;void 0===f&&void 0===(d||{}).height&&(f={height:"300px"});var m=r.map((function(t,n){return Array.isArray(t)?a.createElement(l.ButtonGroup,{key:n},t.map(e.renderTool,n)):e.renderTool(t,n)}));return a.createElement("div",{ref:function(t){return e._element=t},className:c.classNames("k-widget k-editor",p,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:d},m.length>0&&a.createElement(l.Toolbar,{keyboardNavigation:this.props.keyboardNavigation},m),"iframe"===i?a.createElement("div",{className:"k-editor-content"},a.createElement("iframe",{onLoad:C.firefox?function(){e.initialize()}:void 0,ref:function(t){return e.iframe=t},frameBorder:"0",style:f,className:"k-iframe"})):a.createElement("div",{style:f,className:"k-editor-content"},a.createElement("div",{ref:function(t){return e._contentElement=t},suppressContentEditableWarning:!0})),this.renderDialog(h.EditorDialogs.InsertLinkDialog,y,"linkDialog"))},t.prototype.initialize=function(){var e=this,t=this.iframe&&this.iframe.contentWindow;if(t){var n=t.document;[p.defaultStyle,p.tablesStyles,"rtl"===this.props.dir?p.rtlStyles:void 0].forEach((function(e){if(e){var t=n.createElement("style");t.appendChild(n.createTextNode(e)),n.head.appendChild(t)}}));var r=n.createElement("meta");r.setAttribute("charset","utf-8"),n.head.appendChild(r),this._contentElement=n.createElement("div"),n.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content")}var o=this._contentElement;if(o){var a=this.props.preserveWhitespace,s=void 0===a?"full":a,l=[new u.Plugin({view:function(){return{update:e.updateTools}},key:new u.PluginKey("toolbar-tools-update-plugin")}),new u.Plugin({filterTransaction:this.filterTransaction,key:new u.PluginKey("onExecute-event-plugin")}),new u.Plugin({key:v.editorPropsKey,state:{init:function(){return{preserveWhitespace:s}},apply:function(e,t){return t}}}),u.spacesFix(),u.caretColor(),u.history(),u.dropCursor(),u.gapCursor(),u.tableEditing()],c=i({},m.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:b,italic:k,underline:w}}),{"Mod-k":function(){var t=e.state.linkDialog,n=e.view;if(n){var r=n.state,o=r.selection.empty,i=u.getMark(r,r.schema.marks[y.mark]);t||o&&!i||e.setState({linkDialog:!0})}return!t}}),f=this.props,h=f.defaultContent,g=void 0===h?"":h,C=f.value,O=f.onMount,x=C&&"string"!=typeof C?C:m.EditorUtils.createDocument(new u.Schema({nodes:d.nodes,marks:d.marks}),C||g,{preserveWhitespace:s}),S={state:u.EditorState.create({plugins:l.concat([u.keymap(c),u.keymap(u.baseKeymap)]),doc:x}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste}},E={plugins:l,shortcuts:c,target:this,viewProps:S,dom:o},I=this._view=O&&O.call(void 0,E)||new u.EditorView({mount:o},S);this.setState({view:I})}},t.propTypes={defaultContent:s.string,value:s.oneOfType([s.object,s.string]),defaultEditMode:s.oneOf(["iframe","div"]),contentStyle:s.object,dir:s.string,className:s.string,style:s.object,tools:s.arrayOf(s.any),keyboardNavigation:s.bool,resizable:s.bool,preserveWhitespace:s.oneOf([!0,!1,"full"]),onMount:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,onPasteHtml:s.func,onExecute:s.func},t}(a.Component);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStyle='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\n\n.ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n\n.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\n\n.k-editor-resize-wrap-element table td p,\n.k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n}\n',t.tablesStyles='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n',t.rtlStyles="body { direction: rtl }"},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(31),s=n(4),l=n(5),c=n(3),u=n(7),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.href=null,t.title=null,t.target=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props.view,n=t.props.settings.mark,r={href:t.href?t.href.value:void 0,title:t.title?t.title.value:void 0,target:t.target&&t.target.checked?"_blank":void 0};l.applyLink({mark:n,attrs:r},t.props.settings.commandName)(e.state,e.dispatch),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,d=t.render,p=c.provideLocalizationService(this),f=r.messages,h=f.insertHyperlinkDialogTitle,m=f.insertHyperlinkAddress,v=f.insertHyperlinkTitle,g=f.insertHyperlinkNewWindow,y=f.insertHyperlinkCancel,b=f.insertHyperlinkInsert,k=!!n&&l.getMark(n.state,n.state.schema.marks[r.mark]),w=i.createElement("div",{className:"k-edit-form-container"},i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-link-url"},p.toLanguageString(m,u.messages[m]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-url",ref:function(t){return e.href=t},defaultValue:k&&k.attrs.href||void 0,autoFocus:!0})),i.createElement("div",{className:"k-edit-label k-editor-link-text-row"},i.createElement("label",{htmlFor:"k-editor-link-text"},p.toLanguageString(v,u.messages[v]))),i.createElement("div",{className:"k-edit-field k-editor-link-text-row"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-text",ref:function(t){return e.title=t},defaultValue:k&&k.attrs.title||void 0})),!1!==r.linkTarget&&i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",id:"k-editor-link-target",ref:function(t){return e.target=t},defaultChecked:k&&!!k.attrs.target||void 0}),i.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},p.toLanguageString(g,u.messages[g])))),C=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},p.toLanguageString(y,u.messages[y])),i.createElement(s.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},p.toLanguageString(b,u.messages[b]))],O=i.createElement(a.Dialog,{title:p.toLanguageString(h,u.messages[h]),onClose:this.onClose,closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},w,i.createElement(a.DialogActionsBar,null,C));return d?d(O,{content:w,actionButtons:C}):O},t}(i.Component);t.InsertLinkDialog=d,c.registerForLocalization(d)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(31),s=n(4),l=n(5),c=n(3),u=n(7),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.src=null,t.altText=null,t.title=null,t.width=null,t.height=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props,n=e.view,r=e.settings,o=n.state.schema.nodes[r.node],i={src:t.src?t.src.value:null,title:t.title?t.title.value:null,alt:t.altText?t.altText.value:null,width:t.width?t.width.value:null,height:t.height?t.height.value:null},a=Object.keys(i).filter((function(e){return null!==i[e]&&""!==i[e]})).reduce((function(e,t){var n;return Object.assign(e,((n={})[t]=i[t],n))}),{}),s=o.createAndFill(a);l.insertNode(s,!0)(n.state,(function(e){return n.dispatch(e.setMeta("commandName",r.commandName).setMeta("args",a))})),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,d=t.render,p=r.messages,f=p.insertImageDialogTitle,h=p.insertImageAddress,m=p.insertImageTitle,v=p.insertImageAltText,g=p.insertImageWidth,y=p.insertImageHeight,b=p.insertImageCancel,k=p.insertImageInsert,w=c.provideLocalizationService(this),C=n&&n.state,O={};C&&C.selection instanceof l.NodeSelection&&C.selection.node.type===C.schema.nodes[r.node]&&(O=C.selection.node.attrs);var x=i.createElement("div",{className:"k-edit-form-container"},i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-url"},w.toLanguageString(h,u.messages[h]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-url",defaultValue:O.src,ref:function(t){return e.src=t},autoFocus:!0})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-alt"},w.toLanguageString(v,u.messages[v]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-alt",defaultValue:O.alt,ref:function(t){return e.altText=t}})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-title"},w.toLanguageString(m,u.messages[m]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-title",defaultValue:O.title,ref:function(t){return e.title=t}})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-width"},w.toLanguageString(g,u.messages[g]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-width",defaultValue:O.width,ref:function(t){return e.width=t}})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-height"},w.toLanguageString(y,u.messages[y]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-height",defaultValue:O.height,ref:function(t){return e.height=t}}))),S=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},w.toLanguageString(b,u.messages[b])),i.createElement(s.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},w.toLanguageString(k,u.messages[k]))],E=i.createElement(a.Dialog,{title:w.toLanguageString(f,u.messages[f]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},x,i.createElement(a.DialogActionsBar,null,S));return d?d(E,{content:x,actionButtons:S}):E},t}(i.Component);t.InsertImageDialog=d,c.registerForLocalization(d)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(31),s=n(4),l=n(5),c=n(3),u=n(7),d=n(45),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.htmlArea=null,t.onUpdate=function(){var e=t.props,n=e.view,r=e.settings,o=l.trimWhitespace(t.htmlArea?t.htmlArea.value:""),i=d.editorPropsKey.getState(n.state).preserveWhitespace;l.setHtml(o,r.commandName,{preserveWhitespace:i})(n.state,n.dispatch),t.onClose()},t.onClose=function(){t.props.view.focus(),t.props.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,d=t.render,p=c.provideLocalizationService(this),f=r.messages,h=f.viewHtmlDialogTitle,m=f.viewHtmlCancel,v=f.viewHtmlUpdate,g=i.createElement("textarea",{className:"k-textarea k-editor-textarea",style:{height:"280px",width:"490px"},ref:function(t){return e.htmlArea=t},defaultValue:l.indentHtml(l.getHtml(n.state)),autoFocus:!0}),y=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},p.toLanguageString(m,u.messages[m])),i.createElement(s.Button,{onClick:this.onUpdate,themeColor:"primary",dir:o,key:"update"},p.toLanguageString(v,u.messages[v]))],b=i.createElement(a.Dialog,{title:p.toLanguageString(h,u.messages[h]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},g,i.createElement(a.DialogActionsBar,null,y));return d?d(b,{content:g,actionButtons:y}):b},t}(i.Component);t.ViewHtmlDialog=p,c.registerForLocalization(p)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=n(14),a=i.EditorToolsSettings.bold,s=i.EditorToolsSettings.underline,l=i.EditorToolsSettings.italic,c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.getShortcuts=function(e){var t=o.chainCommands(o.exitCode,(function(t,n){var r=e&&e.types&&e.types.hardBreak||"hard_break",o=t.schema.nodes[r];return n&&n(t.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0})),n=e&&e.types&&e.types.listItem||"list_item",i=e&&e.toolsSettings||{};return r({"Mod-b":function(e,t){return o.toggleInlineFormat(i.bold||a)(e,t)},"Mod-i":function(e,t){return o.toggleInlineFormat(i.italic||l)(e,t)},"Mod-u":function(e,t){return o.toggleInlineFormat(i.underline||s)(e,t)},"Mod-z":o.undo,"Shift-Mod-z":o.redo},r({},c?{}:{"Mod-y":o.redo}),{Backspace:o.undoInputRule,"Mod-Enter":t,"Shift-Enter":t},r({},c?{"Ctrl-Enter":t}:{}),{Enter:function(e,t){return o.splitListItem(e.schema.nodes[n])(e,t)},Tab:o.goToNextCell(1),"Shift-Tab":o.goToNextCell(-1)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(46),i=function(e,t){var n=t.tr||e.state.tr.setSelection(new r.AllSelection(e.state.doc)).replaceSelectionWith(t.doc||o.EditorUtils.createDocument(e.state.schema,t.html||"")).setMeta("commandName","setHTML");e.updateState(e.state.apply(n))};t.updateEditorValue=function(e,t,n,r,o){"string"==typeof t?r&&t===o?i(e,{tr:r}):t!==n&&i(e,{html:t}):r&&t.eq(r.doc)?i(e,{tr:r}):e.state.doc.eq(t)||i(e,{doc:t})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firefox="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-editor",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189313,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(14),l=n(79),c=n(82),u=n(83),d=n(84),p=n(85),f=n(86),h=n(87),m=n(88),v=n(89),g=n(90),y=n(91),b=n(92),k=n(93),w=n(94),C=n(95),O=n(96),x=n(97),S=n(98),E=n(99),I=n(100),N=n(101);!function(e){function t(e){return c.createAlignTool(e)}e.createAlignTool=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignLeft));e.AlignLeft=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignRight));e.AlignRight=r;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignCenter));e.AlignCenter=T;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignJustify));function D(e){return l.InsertTableToolNS.createInsertTableTool(e)}e.AlignJustify=M,e.createInsertTableTool=D;var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(D(s.EditorToolsSettings.insertTable));e.InsertTable=P;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.InsertTablePopupNS.InsertTablePopup);function j(e){return u.FontStyleToolNS.createStyleDropDownList(e)}e.InsertTablePopup=_,e.createStyleDropDownList=j;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(j(s.EditorToolsSettings.fontSize));e.FontSize=R;var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(j(s.EditorToolsSettings.fontName));function F(e){return p.FormatBlockToolNS.createFormatBlockDropDownList(e)}e.FontName=A,e.ForeColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.foreColor,e))},e.BackColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.backColor,e))},e.createFormatBlockDropDownList=F;var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(F(s.EditorToolsSettings.formatBlock));function L(e){return f.HistoryToolNS.createUndoTool(e)}function B(e){return f.HistoryToolNS.createRedoTool(e)}e.FormatBlock=z,e.createUndoTool=L,e.createRedoTool=B;var V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(L(s.EditorToolsSettings.undo));e.Undo=V;var H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(B(s.EditorToolsSettings.redo));function K(e){return h.IndentToolNS.createIndentTool(e)}e.Redo=H,e.createIndentTool=K;var W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(K(s.EditorToolsSettings.indent));function $(e){return m.InlineFormatToolNS.createInlineFormatTool(e)}e.Indent=W,e.createInlineFormatTool=$;var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.bold));e.Bold=q;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.italic));e.Italic=U;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.underline));e.Underline=G;var X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.strikethrough));e.Strikethrough=X;var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.subscript));e.Subscript=J;var Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.superscript));function Z(e){return v.createInsertImageTool(e)}e.Superscript=Y,e.createInsertImageTool=Z;var Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Z(s.EditorToolsSettings.image));function ee(e){return g.LinkToolNS.createLinkTool(e)}e.InsertImage=Q,e.createLinkTool=ee;var te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.link));e.Link=te;var ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.insertFile));function re(e){return y.ListToolNS.createListTool(e)}e.InsertFile=ne,e.createListTool=re;var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.orderedList));e.OrderedList=oe;var ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.bulletList));function ae(e){return b.OutdentToolNS.createOutdentTool(e)}e.UnorderedList=ie,e.BulletedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.bulletList.listType,items:[{icon:"list-unordered",text:"Disc",style:"disc"},{icon:"list-unordered-outline",text:"Circle",style:"circle"},{icon:"list-unordered-square",text:"Square",style:"square"}],icon:"list-unordered"},e))},e.NumberedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.orderedList.listType,items:[{icon:"list-ordered",text:"Decimal"},{icon:"list-roman-upper",text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",text:"Lower latin",style:"lower-latin"}],icon:"list-ordered"},e))},e.createOutdentTool=ae;var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ae(s.EditorToolsSettings.outdent));function le(e){return k.TableEditNS.createAddRowBeforeTool(e)}function ce(e){return k.TableEditNS.createAddRowAfterTool(e)}function ue(e){return k.TableEditNS.createAddColumnBeforeTool(e)}function de(e){return k.TableEditNS.createAddColumnAfterTool(e)}function pe(e){return k.TableEditNS.createDeleteRowTool(e)}function fe(e){return k.TableEditNS.createDeleteColumnTool(e)}function he(e){return k.TableEditNS.createDeleteTableTool(e)}function me(e){return k.TableEditNS.createMergeCellsTool(e)}function ve(e){return k.TableEditNS.createSplitCellTool(e)}e.Outdent=se,e.Print=function(e){return a.createElement(O.Print,i({},e))},e.Pdf=function(e){return a.createElement(x.Pdf,i({},e))},e.SelectAll=function(e){return a.createElement(S.SelectAll,i({},e))},e.CleanFormatting=function(e){return a.createElement(E.CleanFormatting,i({},e))},e.createAddRowBeforeTool=le,e.createAddRowAfterTool=ce,e.createAddColumnBeforeTool=ue,e.createAddColumnAfterTool=de,e.createDeleteRowTool=pe,e.createDeleteColumnTool=fe,e.createDeleteTableTool=he,e.createMergeCellsTool=me,e.createSplitCellTool=ve;var ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(le(s.EditorToolsSettings.addRowBefore));e.AddRowBefore=ge;var ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ce(s.EditorToolsSettings.addRowAfter));e.AddRowAfter=ye;var be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ue(s.EditorToolsSettings.addColumnBefore));e.AddColumnBefore=be;var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(de(s.EditorToolsSettings.addColumnAfter));e.AddColumnAfter=ke;var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(pe(s.EditorToolsSettings.deleteRow));e.DeleteRow=we;var Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(fe(s.EditorToolsSettings.deleteColumn));e.DeleteColumn=Ce;var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(he(s.EditorToolsSettings.deleteTable));e.DeleteTable=Oe;var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(me(s.EditorToolsSettings.mergeCells));e.MergeCells=xe;var Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ve(s.EditorToolsSettings.splitCell));function Ee(e){return w.UnlinkToolNS.createUnlinkTool(e)}e.SplitCell=Se,e.createUnlinkTool=Ee;var Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ee(s.EditorToolsSettings.unlink));function Ne(e){return C.ViewHtmlToolNS.createViewHtmlTool(e)}e.Unlink=Ie,e.createViewHtmlTool=Ne;var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ne(s.EditorToolsSettings.viewHtml));e.ViewHtml=Te;var Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(I.FindAndReplace);e.FindAndReplace=Me}(t.EditorTools||(t.EditorTools={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80);t.InsertTableToolNS=r.InsertTableToolNS;var o=n(63);t.InsertTablePopupNS=o.InsertTablePopupNS},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(9),u=n(3),d=n(7),p=n(63),f=n(5);!function(e){e.createInsertTableTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedPopup:!1},e.button=null,e.togglePopup=function(){e.setState({openedPopup:!e.state.openedPopup})},e.closePopup=function(){e.state.openedPopup&&e.togglePopup()},e.onTableInsert=function(t,n){var r=e.props.view;if(r){var o=f.createTable(r.state.schema.nodes,t,n);o&&f.insertNode(o,!0)(r.state,r.dispatch),r.focus(),e.closePopup()}},e}return o(n,t),n.prototype.render=function(){var t=this,n=this.props,r=n.view,o=n.render,h=a(n,["view","render"]),m=r&&r.state,v=u.provideLocalizationService(this),g=e.messages,y=g.createTable,b=g.createTableHint,k=v.toLanguageString(y,d.messages[y]),w=v.toLanguageString(b,d.messages[b]),C=[s.createElement(l.Button,i({onClick:this.togglePopup,ref:function(e){return t.button=e&&e.element},key:"InsertTable",disabled:!m||!f.canInsert(m,m.schema.nodes.table)},c.onDownPreventDefault,{title:k},e.props,h)),r&&s.createElement(p.InsertTablePopupNS.InsertTablePopup,{key:"insertTablePopup",createTableMessage:k,createTableHintMessage:w,dir:h.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return o?o.call(void 0,C,{view:r}):C},n}(s.Component);return u.registerForLocalization(t),t}}(t.InsertTableToolNS||(t.InsertTableToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(9),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={row:-1,col:-1},t}return o(t,e),t.prototype.renderCell=function(e,t,n){var r=this,o=Math.floor(e/this.props.columns),a=e%this.props.columns,s=a<=n&&o<=t;return i.createElement("span",{className:"k-ct-cell k-disabled"+(s?" k-selected":""),onMouseEnter:function(){return r.setState({row:o,col:a})},onClick:function(){return r.props.onCellClick.call(void 0,o,a)},key:e})},t.prototype.render=function(){var e=this,t=[],n=this.props.columns*this.props.rows,r=this.state,o=r.row,s=r.col,l=this.props.onDown,c=this.props.createTableMessage;s>-1&&(c=a.formatString(this.props.createTableHintMessage,o+1,s+1));for(var u=0;u<n;u++)t.push(this.renderCell(u,o,s));return[i.createElement("div",{onMouseLeave:function(){return e.setState({row:-1,col:-1})},key:"cells",style:{borderColor:"inherit"},onPointerDown:l,onMouseDown:l},t),i.createElement("div",{className:"k-status",key:"status",onPointerDown:l,onMouseDown:l},c)]},t}(i.Component);t.default=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(14),u=n(5),d=n(9),p=n(3),f=n(7),h=c.EditorToolsSettings.alignRemove;t.createAlignTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),c=n&&n.state,m=!!c&&u.isAligned(c,e.actions),v=m?h.actions:e.actions,g=m?h.commandName:e.commandName,y=p.provideLocalizationService(this),b=e.messages.title,k=s.createElement(l.Button,i({onClick:function(){return n&&u.alignBlocks(v,g)(n.state,n.dispatch)},selected:m,togglable:!0},d.onDownPreventDefault,{title:y.toLanguageString(b,f.messages[b])},e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return p.registerForLocalization(t),t}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(65),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createStyleDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view,i=e.style;if(o){c.applyInlineStyle({style:i,value:r.value},e.commandName)(o.state,o.dispatch);var a=t.syntheticEvent;a&&"click"===a.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=e.style,n=this.props,r=n.view,o=n.render,f=n.data,h=n.defaultItem,m=a(n,["view","render","data","defaultItem"]),v=f||e.items,g=h||e.defaultItem,y=r?c.getInlineStyles(r.state,{name:t,value:/^.+$/}):[],b=d.provideLocalizationService(this);g&&g.localizationKey&&((g=i({},g)).text=g.localizationKey?b.toLanguageString(g.localizationKey,p.messages[g.localizationKey]):g.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?v.find((function(e){return e.value===k})):k,data:v,defaultItem:g,itemRender:u.itemRender,textField:"text",dataItemKey:"value",onChange:this.onChange,style:u.userSelectNone,leftRightKeysNavigation:!1},m));return o?o.call(void 0,w,{view:r}):w},n}(s.Component);return d.registerForLocalization(t),t}}(t.FontStyleToolNS||(t.FontStyleToolNS={}))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(103),a=n(5),s=n(3),l=n(7);t.ApplyColorTool=function(e){var t=e.view,n=e.style,c=e.colorPickerProps,u=e.commandName,d=c.title,p=c.view,f=void 0===p?"palette":p,h=o.useCallback((function(e){t&&(a.applyInlineStyle({style:n,value:e.value},u)(t.state,t.dispatch),"palette"===f&&t.focus())}),[t,n,f,u]);return o.createElement(i.ColorPicker,r({onChange:h,onActiveColorClick:h},c,{title:d?s.useLocalization().toLanguageString(d,l.messages[d]):d}))}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(65),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createFormatBlockDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view;if(o&&c.formatBlockElements(r.value,e.commandName)(o.state,o.dispatch)){var i=t.syntheticEvent;i&&"click"===i.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=t.data,f=t.defaultItem,h=a(t,["view","render","data","defaultItem"]),m=o||e.items,v=f||e.defaultItem,g=n&&n.state,y=g?c.getBlockFormats(g):[],b=d.provideLocalizationService(this);v&&v.localizationKey&&((v=i({},v)).text=v.localizationKey?b.toLanguageString(v.localizationKey,p.messages[v.localizationKey]):v.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?m.find((function(e){return e.value===k})):k,onChange:this.onChange,itemRender:u.itemRender,data:m,defaultItem:v,textField:"text",dataItemKey:"value",style:u.userSelectNone,leftRightKeysNavigation:!1},h));return r?r.call(void 0,w,{view:n}):w},n}(s.Component);return d.registerForLocalization(t),t}}(t.FormatBlockToolNS||(t.FormatBlockToolNS={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(64);!function(e){e.createUndoTool=function(e){return o.createProseMirrorTool(e,r.undo)},e.createRedoTool=function(e){return o.createProseMirrorTool(e,r.redo)}}(t.HistoryToolNS||(t.HistoryToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createIndentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h=f&&f.schema.nodes,m=h&&h[e.listsTypes.listItem],v=e.actions,g=!!f&&(c.isIndented(f,v,o.dir)||v.some((function(e){return h[e.node]&&c.hasNode(f,h[e.node])})))&&!c.hasNode(f,m),y=!!f&&c.canIndentAsListItem(f,m),b=g||y,k=d.provideLocalizationService(this),w=e.messages.title,C=s.createElement(l.Button,i({onClick:function(){n&&y?c.sinkListItem(m)(n.state,n.dispatch):n&&g&&c.indentBlocks(v,e.commandName,o.dir)(n.state,n.dispatch)},title:k.toLanguageString(w,p.messages[w]),disabled:!b},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return d.registerForLocalization(t),t}}(t.IndentToolNS||(t.IndentToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createInlineFormatTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h={mark:e.mark,altMarks:e.altMarks,altStyle:e.altStyle},m=d.provideLocalizationService(this),v=e.messages.title,g=s.createElement(l.Button,i({onClick:function(){return n&&c.toggleInlineFormat(h,f&&f.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},selected:!!f&&c.hasMark(f,h),togglable:!0},u.onDownPreventDefault,{title:m.toLanguageString(v,p.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return d.registerForLocalization(t),t}}(t.InlineFormatToolNS||(t.InlineFormatToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(5),c=n(4),u=n(9),d=n(28),p=n(3),f=n(7);t.createInsertImageTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=h?h.schema.nodes[e.node]:void 0,v=p.provideLocalizationService(this),g=e.messages.insertImage,y=[s.createElement(c.Button,i({onClick:this.toggleDialog,key:"insertImage",disabled:!m||!h||!l.canInsert(h,m)},u.onDownPreventDefault,{title:v.toLanguageString(g,f.messages[g])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,y,{view:n}):y},n}(s.Component);return p.registerForLocalization(t),t}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(28),p=n(3),f=n(7);!function(e){e.createLinkTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=!h||h.selection.empty,v=h&&c.getMark(h,h.schema.marks[e.mark]),g=p.provideLocalizationService(this),y=e.messages.insertHyperlink,b=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"link",disabled:m&&!v},u.onDownPreventDefault,{title:g.toLanguageString(y,f.messages[y])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:e,dir:o.dir,view:n,onClose:this.toggleDialog})||null];return r?r.call(void 0,b,{view:n}):b},n}(s.Component);return p.registerForLocalization(t),t}}(t.LinkToolNS||(t.LinkToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createListTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=!1,h=d.provideLocalizationService(this),m=e.messages.title,v=e.types,g=e.listType;if(n){var y=n.state,b=y.schema.nodes,k=c.hasNode(y,b[v.orderedList]),w=c.hasNode(y,b[v.bulletList]);f=g===v.orderedList?k&&!w:!k&&w}var C=s.createElement(l.Button,i({onClick:function(){return n&&c.toggleList(n.state,n.dispatch,n,i({listType:g},v),e.commandName)},togglable:!0,selected:f,title:h.toLanguageString(m,p.messages[m])},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return d.registerForLocalization(t),t}}(t.ListToolNS||(t.ListToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createOutdentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h=!!f&&c.isIndented(f,e.actions,o.dir),m=f&&f.schema.nodes[e.listsTypes.listItem],v=!!f&&c.canOutdentAsListItem(f,{nodes:e.actions,listsTypes:e.listsTypes}),g=h||v,y=d.provideLocalizationService(this),b=e.messages.title,k=s.createElement(l.Button,i({onClick:function(){n&&v?c.liftListItem(m)(n.state,n.dispatch):n&&h&&c.indentBlocks(e.actions,e.commandName,o.dir)(n.state,n.dispatch)},title:y.toLanguageString(b,p.messages[b]),disabled:!g},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return d.registerForLocalization(t),t}}(t.OutdentToolNS||(t.OutdentToolNS={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(64),i=function(e,t){var n=r.deleteColumn(e,t);if(n&&!t){var o=r.selectionCell(e),i=o&&o.node(o.depth);if(i&&1===i.content.childCount)return!1}return n},a=function(e,t){var n=r.deleteRow(e,t);if(n&&!t){var o=r.selectionCell(e),i=o&&o.node(o.depth-1);if(i&&1===i.content.childCount)return!1}return n};!function(e){e.createAddRowBeforeTool=function(e){return o.createProseMirrorTool(e,r.addRowBefore)},e.createAddRowAfterTool=function(e){return o.createProseMirrorTool(e,r.addRowAfter)},e.createAddColumnBeforeTool=function(e){return o.createProseMirrorTool(e,r.addColumnBefore)},e.createAddColumnAfterTool=function(e){return o.createProseMirrorTool(e,r.addColumnAfter)},e.createDeleteRowTool=function(e){return o.createProseMirrorTool(e,a)},e.createDeleteColumnTool=function(e){return o.createProseMirrorTool(e,i)},e.createDeleteTableTool=function(e){return o.createProseMirrorTool(e,r.deleteTable)},e.createMergeCellsTool=function(e){return o.createProseMirrorTool(e,r.mergeCells)},e.createSplitCellTool=function(e){return o.createProseMirrorTool(e,r.splitCell)}}(t.TableEditNS||(t.TableEditNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createUnlinkTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f={mark:e.mark},h=!!n&&c.hasMark(n.state,f),m=d.provideLocalizationService(this),v=e.messages.title,g=s.createElement(l.Button,i({onClick:function(){return n&&c.removeLink(f,n.state.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},disabled:!h},u.onDownPreventDefault,{title:m.toLanguageString(v,p.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return d.registerForLocalization(t),t}}(t.UnlinkToolNS||(t.UnlinkToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(9),u=n(28),d=n(3),p=n(7);!function(e){e.createViewHtmlTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=d.provideLocalizationService(this),h=e.messages.viewHtml,m=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"viewHtml"},c.onDownPreventDefault,{title:f.toLanguageString(h,p.messages[h])},e.props,o)),this.state.openedDialog&&n&&s.createElement(u.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,m,{view:n}):m},n}(s.Component);return d.registerForLocalization(t),t}}(t.ViewHtmlToolNS||(t.ViewHtmlToolNS={}))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(9),c=n(7),u=n(14).EditorToolsSettings.print;t.Print=function(e){var t=e.view,n=e.render,d=e.settings,p=void 0===d?u:d,f=o(e,["view","render","settings"]),h=t&&t.dom,m=h&&h.ownerDocument,v=m&&m.defaultView,g=p.messages.title,y=i.useCallback((function(){v&&v.print()}),[v]),b=i.createElement(a.Button,r({onClick:y,disabled:!v||v===window,title:s.useLocalization().toLanguageString(g,c.messages[g])},l.onDownPreventDefault,p.props,f));return n?n.call(void 0,b,{view:t}):b}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(104),c=n(9),u=n(7),d=n(14),p=d.EditorToolsSettings.pdf,f=d.EditorToolsSettings.savePdfOptions;t.Pdf=function(e){var t=e.view,n=e.render,d=e.settings,h=void 0===d?p:d,m=e.savePdfOptions,v=e.savePdfCallback,g=o(e,["view","render","settings","savePdfOptions","savePdfCallback"]),y=h.messages.title,b=i.useCallback((function(){t&&l.savePDF(t.dom,r({},f,m||{}),v)}),[t,m,v]),k=i.createElement(a.Button,r({onClick:b,title:s.useLocalization().toLanguageString(y,u.messages[y])},c.onDownPreventDefault,h.props,g));return n?n.call(void 0,k,{view:t}):k}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(9),c=n(7),u=n(5),d=n(14).EditorToolsSettings.selectAll;t.SelectAll=function(e){var t=e.view,n=e.render,p=e.settings,f=void 0===p?d:p,h=o(e,["view","render","settings"]),m=f.messages.title,v=i.useCallback((function(){t&&(u.selectAll(t.state,t.dispatch),t.focus())}),[t]),g=i.createElement(a.Button,r({onClick:v,title:s.useLocalization().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,g,{view:t}):g}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(9),c=n(7),u=n(5),d=n(14).EditorToolsSettings.cleanFormatting,p=u.cleanFormatting();t.CleanFormatting=function(e){var t=e.view,n=e.render,u=e.settings,f=void 0===u?d:u,h=o(e,["view","render","settings"]),m=f.messages.title,v=i.useCallback((function(){t&&p(t.state,(function(e){e.setMeta("commandName",f.commandName),t.dispatch(e)}))}),[t]),g=i.createElement(a.Button,r({onClick:v,disabled:!t||!p(t.state),title:s.useLocalization().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,g,{view:t}):g}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(62),u=n(9),d=n(7),p=n(14),f=n(3),h=p.EditorToolsSettings.findAndReplace,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showDialog:!1},t.onClose=function(){return t.setState({showDialog:!1})},t.onOpen=function(){return t.setState({showDialog:!0})},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.view,n=a(e,["view"]),r=h.props,o=f.provideLocalizationService(this),p=h.messages.findReplaceToolTitle;return[s.createElement(l.Button,i({onClick:this.onOpen},u.onDownPreventDefault,{disabled:!t,title:o.toLanguageString(p,d.messages[p]),key:"tool"},r,n)),this.state.showDialog&&t&&s.createElement(c.FindAndReplaceDialog,{view:t,onClose:this.onClose,dir:n.dir,key:"dialog"})]},t}(s.Component);t.FindAndReplace=m,f.registerForLocalization(m)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),a=n(4),s=n(14),l=function(e,t){var n=e.selection,r=n.from,o=n.to,i=null;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||(e.type===t?e:null))})),i};t.ListTool=function(e){var t,n,c=!1,u=e.view,d=s.listsTypes,p=e.listType,f=(e.items||[]).slice();if(u){var h=u.state,m=h&&h.schema.nodes;t=m&&l(h,m[d.orderedList]),n=m&&l(h,m[d.bulletList]),c=Boolean(p===d.orderedList?t&&!n:!t&&n)}if(c&&(t||n)){var v=i.listStyle((t||n).attrs);f=f.map((function(e,t){return r({},e,{selected:v?e.style===v:0===t})}))}return o.createElement("span",{onMouseDown:function(e){e.preventDefault()}},o.createElement(a.SplitButton,{textField:"text",items:f,icon:e.icon,onButtonClick:function(e){u&&(i.toggleList(u.state,u.dispatch,u,r({listType:p},d,{listAttrs:{}}),"InsertList"),u.focus())},onItemClick:function(e){if(u){var o=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},a=t||n;if(a&&i.listStyle(a.attrs)!==e.item.style){var s=u.state.selection.$head.posAtIndex(0,-2)-1;u.dispatch(u.state.tr.setNodeMarkup(s,u.state.schema.nodes[p],o))}else i.toggleList(u.state,u.dispatch,u,r({listType:p},d,{listAttrs:o}),"InsertList");u.focus()}},buttonClass:c?"k-selected":void 0}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"TabStrip",(function(){return I})),n.d(t,"TabStripContent",(function(){return w})),n.d(t,"TabStripNavigation",(function(){return p})),n.d(t,"TabStripNavigationItem",(function(){return c})),n.d(t,"TabStripTab",(function(){return T})),n.d(t,"PanelBar",(function(){return G})),n.d(t,"PanelBarItem",(function(){return _})),n.d(t,"renderChildren",(function(){return R})),n.d(t,"getFirstId",(function(){return A})),n.d(t,"getInitialState",(function(){return F})),n.d(t,"flatVisibleItems",(function(){return L})),n.d(t,"flatChildren",(function(){return B})),n.d(t,"flatVisibleChildren",(function(){return V})),n.d(t,"isPresent",(function(){return K})),n.d(t,"PanelBarUtils",(function(){return H})),n.d(t,"isArrayEqual",(function(){return $})),n.d(t,"Menu",(function(){return We})),n.d(t,"MenuItemLink",(function(){return Me})),n.d(t,"MenuItem",(function(){return se})),n.d(t,"downArrowClass",(function(){return Pe})),n.d(t,"rightArrowClass",(function(){return _e})),n.d(t,"leftArrowClass",(function(){return je})),n.d(t,"MenuItemArrow",(function(){return Re})),n.d(t,"Splitter",(function(){return et})),n.d(t,"SplitterPane",(function(){return qe})),n.d(t,"Card",(function(){return rt})),n.d(t,"CardHeader",(function(){return ot})),n.d(t,"CardTitle",(function(){return it})),n.d(t,"CardBody",(function(){return at})),n.d(t,"CardActions",(function(){return st})),n.d(t,"CardImage",(function(){return lt})),n.d(t,"CardSubtitle",(function(){return ct})),n.d(t,"CardFooter",(function(){return ut})),n.d(t,"Avatar",(function(){return pt})),n.d(t,"Drawer",(function(){return Ot})),n.d(t,"DrawerNavigation",(function(){return wt})),n.d(t,"DrawerContent",(function(){return xt})),n.d(t,"DrawerItem",(function(){return gt})),n.d(t,"Stepper",(function(){return Ht})),n.d(t,"Step",(function(){return _t})),n.d(t,"AppBar",(function(){return Wt})),n.d(t,"AppBarSection",(function(){return qt})),n.d(t,"AppBarSpacer",(function(){return Ut})),n.d(t,"TileLayout",(function(){return an})),n.d(t,"BottomNavigation",(function(){return fn})),n.d(t,"BottomNavigationItem",(function(){return dn})),n.d(t,"StackLayout",(function(){return gn})),n.d(t,"GridLayout",(function(){return kn})),n.d(t,"GridLayoutItem",(function(){return On})),n.d(t,"Breadcrumb",(function(){return _n})),n.d(t,"BreadcrumbOrderedList",(function(){return Mn})),n.d(t,"BreadcrumbListItem",(function(){return xn})),n.d(t,"BreadcrumbDelimiter",(function(){return En})),n.d(t,"BreadcrumbLink",(function(){return Nn})),n.d(t,"ExpansionPanel",(function(){return Fn})),n.d(t,"ExpansionPanelContent",(function(){return Ln}));var r,o=n(0),i=n(1),a=n(10),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(){t.props.onSelect&&t.props.onSelect(t.props.index)},t}return s(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.active,i=t.disabled,s=t.title,c=void 0===s?"Untitled":s,u=t.first,d=t.last,p={id:n,"aria-selected":r,"aria-controls":n,"aria-disabled":i,"aria-hidden":i,role:"tab",onClick:i?void 0:this.onClick},f=Object(a.a)("k-item",((e={})["k-first"]=u,e["k-last"]=d,e["k-disabled"]=i,e["k-active"]=r,e));return o.createElement("li",l({},p,{className:f}),o.createElement("span",{className:"k-link"},c))},t.propTypes={active:i.bool,disabled:i.bool,index:i.number,onSelect:i.func,title:i.oneOfType([i.string,i.element]),first:i.bool,last:i.bool},t}(o.Component),u=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.selected,i=n.tabPosition,s=n.children,l=n.onSelect,u=n.onKeyDown,p=o.Children.count(s),f=o.Children.toArray(s);s&&(e=(t=p,Array.apply(null,Array(t))).map((function(e,t,n){var i={active:r===t,disabled:f[t].props.disabled,index:t,title:f[t].props.title,first:0===t,last:t===n.length-1,onSelect:l};return o.createElement(c,d({key:t},i))})));var h=Object(a.a)("k-tabstrip-items-wrapper",{"k-hstack":"top"===i||"bottom"===i,"k-vstack":"left"===i||"right"===i}),m=Object(a.a)("k-tabstrip-items","k-reset");return o.createElement("div",{className:h},o.createElement("ul",{className:m,role:"tablist",tabIndex:this.props.tabIndex,onKeyDown:u},e))},t.propTypes={children:i.oneOfType([i.element,i.arrayOf(i.element)]),onSelect:i.func,onKeyDown:i.func,selected:i.number,tabIndex:i.number},t}(o.Component),f=n(42),h=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=v(e,["children"]);return o.createElement(f.a,m({},{transitionName:"fade"},n),t)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500},t}(o.Component),y=n(52),b=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contentId=Object(y.a)(),t.childFactory=function(e){return o.cloneElement(e,k({},e.props,{in:e.props.children.props.id===String(t.contentId+t.props.selected)}))},t}return b(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.selected,r=t&&"number"==typeof n&&o.Children.toArray(t)[n],i=Object(a.a)("k-content","k-active",r&&r.props.contentClassName);return o.createElement("div",{className:i,style:this.props.style},this.renderContent(t))},t.prototype.renderContent=function(e){var t=this;return this.props.keepTabsMounted?o.Children.map(this.props.children,(function(e,n){return t.renderChild(e,n)})):this.renderChild(o.Children.toArray(e)[this.props.selected],this.props.selected)},t.prototype.renderChild=function(e,t){var n=t===this.props.selected,r={role:"tabpanel","aria-expanded":!0,"aria-labelledby":t.toString(),style:{display:n?void 0:"none"}},i={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?o.createElement(g,{appear:!0,exit:this.props.keepTabsMounted,style:i,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},o.createElement("div",k({},r,{id:String(this.contentId+t),key:t}),e.props.children)):o.createElement("div",k({},r,{key:t}),e.props.children)},t.propTypes={animation:i.bool,children:i.oneOfType([i.element,i.arrayOf(i.element)]),selected:i.number,style:i.object},t}(o.Component),C=n(26),O=n(21),x={name:"@progress/kendo-react-layout",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189252,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},I=function(e){function t(t){var n,r=e.call(this,t)||this;return r._element=null,r.keyBinding=((n={})[C.a.left]=function(){return r.prevNavigatableTab()},n[C.a.right]=function(){return r.nextNavigatableTab()},n[C.a.down]=function(){return r.nextNavigatableTab()},n[C.a.up]=function(){return r.prevNavigatableTab()},n[C.a.home]=function(){return 0},n[C.a.end]=function(){return o.Children.count(r.props.children)-1},n),r.onSelect=function(e){r.props.selected!==e&&r.props.onSelect&&r.props.onSelect({selected:e})},r.onKeyDown=function(e){var t;switch(e.keyCode){case C.a.left:t=r.keyBinding[r.invertKeys(C.a.left,C.a.right)];break;case C.a.right:t=r.keyBinding[r.invertKeys(C.a.right,C.a.left)];break;case C.a.up:t=r.keyBinding[C.a.up];break;case C.a.down:t=r.keyBinding[C.a.down];break;case C.a.home:t=r.keyBinding[C.a.home];break;case C.a.end:t=r.keyBinding[C.a.end]}t&&(e.preventDefault(),r.onSelect(t()))},r.renderContent=function(e){var t=e.selected,n=e.children,r=e.tabContentStyle;return t<o.Children.count(n)&&t>-1?o.createElement(w,E({index:t},e,{style:r})):null},r.firstNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=0;n<t;n++)if(!e[n].props.disabled)return n},r.lastNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=t-1;n>0;n--)if(!e[n].props.disabled)return n},r.prevNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t-1:-1;if(n<0)return r.lastNavigatableTab();if(e)for(var o=n;o>-1;o--){if(!e[o].props.disabled)return o;if(0===o)return r.lastNavigatableTab()}},r.nextNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t+1:1,i=o.Children.count(e);if(n>=i)return r.firstNavigatableTab();if(e)for(var a=n;a<i;a++){if(!e[a].props.disabled)return a;if(a+1===i)return r.firstNavigatableTab()}},Object(O.a)(x),r}return S(t,e),t.prototype.render=function(){var e=this,t=E({},this.props,{children:this.children(),onKeyDown:this.onKeyDown,onSelect:this.onSelect}),n=t.tabPosition,r=t.tabIndex,i=void 0===r?0:r,s="bottom"===n,l=Object(a.a)("k-tabstrip","k-floatwrap",{"k-tabstrip-left":"left"===n,"k-tabstrip-right":"right"===n,"k-tabstrip-bottom":"bottom"===n,"k-tabstrip-top":"top"===n},this.props.className);return o.createElement("div",{id:this.props.id,ref:function(t){return e._element=t},dir:this.props.dir,className:l,style:this.props.style},!s&&o.createElement(p,E({},t,{tabIndex:i})),this.renderContent(t),s&&o.createElement(p,E({},t,{tabIndex:i})))},t.prototype.invertKeys=function(e,t){return this._element&&"rtl"===getComputedStyle(this._element).direction||!1?t:e},t.prototype.children=function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},t.propTypes={animation:i.bool,children:i.node,onSelect:i.func,selected:i.number,style:i.object,tabContentStyle:i.object,tabPosition:i.string,tabIndex:i.number,className:i.string,dir:i.string},t.defaultProps={animation:!0,tabPosition:"top",keepTabsMounted:!1},t}(o.Component),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.propTypes={disabled:i.bool,contentClassName:i.string,children:i.oneOfType([i.element,i.node]),title:i.oneOfType([i.string,i.element,i.node])},t}(o.Component),M=n(106),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var _=function(e){function t(t){var n=e.call(this,t)||this;return n.handleItemClick=function(){var e=n.props,t=e.onSelect,r=e.disabled,o=e.id;t&&!r&&t.call(void 0,{uniquePrivateKey:n.props.uniquePrivateKey,id:o,target:n})},n.childFactory=function(e){return n.props.keepItemsMounted?o.cloneElement(e,P({},e.props,{in:n.props.expanded})):e},n.state={show:t.expanded},n}return D(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.id,i=n.children,s=n.title,l=n.uniquePrivateKey,c=n.disabled,u=n.selected,d=n.focused,p=n.expanded,f=n.className,h=n.level,m=n.headerClassName,v=n.animation,g=n.keepItemsMounted,y={role:"treeitem","aria-disabled":c,"aria-hidden":!c&&!p,"aria-selected":!c&&u,"aria-expanded":!c&&p&&!!i},b=Object(a.a)("k-item",{"k-panelbar-header":0===h,"k-panelbar-item":0!==h,"k-state-expanded":p&&!!i},"k-level-"+h,f),k=Object(a.a)("k-link",{"k-selected":!c&&u,"k-focus":!c&&d,"k-disabled":c},m),w=Object(a.a)("k-panelbar-toggle","k-icon",((e={})["k-i-arrow-chevron-up"]=p&&!!i,e["k-panelbar-collapse"]=p&&!!i,e["k-i-arrow-chevron-down"]=!p&&!!i,e["k-panelbar-expand"]=!p&&!!i,e)),C=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass;if(t)return o.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:t});if(n){var i=Object(a.a)("k-panelbar-item-icon","k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:i})}return r?o.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+r}):null}(this.props),O=!c&&i?o.createElement("span",{className:w}):null,x=!c&&p||g?o.createElement("ul",{role:"group",className:"k-panelbar-group k-panel k-group",style:{display:g?this.state.show?"block":"none":"block"}},i):null,S=void 0!==v&&!v||c||!i?x:o.createElement(M.a,{transitionEnterDuration:200,transitionExitDuration:200,key:l+"_animation",style:{display:"block"},children:x,childFactory:g&&this.childFactory,unmountOnExit:!g,onBeforeEnter:function(){return g&&t.setState({show:!0})},onAfterExited:function(){return g&&t.setState({show:!1})}});return o.createElement("li",P({id:r,className:b},y),o.createElement("span",{className:k,onClick:this.handleItemClick},C,o.createElement("span",{className:"k-panelbar-item-text"},s),O),S)},t.propTypes={animation:i.bool,children:i.any,className:i.string,expanded:i.bool,disabled:i.bool,onSelect:i.func,selected:i.bool,level:i.number,title:i.oneOfType([i.string,i.element]),id:i.oneOfType([i.string,i.number]),focused:i.bool,keepItemsMounted:i.bool},t.defaultProps={title:"Untitled"},t}(o.PureComponent),j=function(){return(j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},R=function(e){var t=e.animation,n=void 0===t||t,r=e.keepItemsMounted,i=void 0!==r&&r,a=e.state,s=e.expanded,l=e.handleSelect,c=e.children,u=e.parentExpanded,d=void 0===u||u,p=e.level,f=void 0===p?0:p,h=e.parentPrivateKey,m=void 0===h?[]:h;return o.Children.map(c,(function(e,t){if(e&&e.type===_){var r=void 0,c=z(e,m,t);if(e.props.children){var u={animation:n,keepItemsMounted:i,state:a,expanded:s,handleSelect:l,children:e.props.children,parentExpanded:(s||[]).indexOf(c)>-1,level:f+1,parentPrivateKey:m.concat([c])};r=R(u)}return o.cloneElement(e,j({},e.props,{animation:void 0!==e.props.animation?e.props.animation:n,keepItemsMounted:i,id:e.props.id||"k-panelbar-item-default-"+c,uniquePrivateKey:c,parentUniquePrivateKey:m,parentExpanded:d,level:f,expanded:(s||[]).indexOf(c)>-1,focused:a.focused===c&&a.wrapperFocused,selected:a.selected===c,children:r,onSelect:l}))}return o.createElement("div",{className:"k-panelbar-content k-content"},e)}))},A=function(e){var t=o.Children.toArray(e.children)[0];return t?z(t,[],0):""},F=function(e,t,n,r,i){return void 0===n&&(n={expanded:e.expanded||[],selected:e.selected||"",focused:e.focused||"",wrapperFocused:!1}),void 0===r&&(r=!0),void 0===i&&(i=[]),o.Children.map(e.children,(function(e,o){if(e&&e.type===_){var a=z(e,i,o);!e.props.disabled&&r&&(e.props.selected&&(n.selected=a),e.props.focused&&(n.focused=a),e.props.expanded&&("multiple"===t?n.expanded.push(a):"single"===t&&(n.expanded=[a])),e.props.children&&(n=F(e.props,t,n,!!e.props.expanded,i.concat([a]))))}})),n},z=function(e,t,n){return e&&e.props&&e.props.id?e.props.id:t.length?t[t.length-1]+"."+n:"."+n};function L(e,t){return void 0===t&&(t=[]),(e||[]).forEach((function(e){e.disabled||(t.push(e),e.expanded&&e.children&&L(e.children,t))})),t}function B(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(t.push(e),e.props.children&&B(e.props.children,t))})),t}function V(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(e.props.expanded||e.props.parentExpanded)&&(t.push(e),e.props.children&&V(e.props.children,t))})),t}var H,K=function(e){return null!=e};(H||(H={})).mapItemsToComponents=function e(t){return t.map((function(t,n){var r;return t.content&&(r=t.content),t.children&&(r=e(t.children)),o.createElement(_,j({},t,{children:r,key:t.id||n}))}))};var W,$=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))};!function(e){e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous"}(W||(W={}));var q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(){return(U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},G=function(e){function t(t){var n=e.call(this,t)||this;n._element=null,n.handleSelect=function(e){n.onSelect(e),n.onFocus(e)},n.onSelect=function(e){var t,r;switch(B(o.Children.toArray(n.children)).forEach((function(r){r.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)&&(t=r)})),n.expandMode){case"single":r=t.props.parentUniquePrivateKey.concat([t.props.uniquePrivateKey]),$(n.expandedItems,r)&&(r=t.props.parentUniquePrivateKey?t.props.parentUniquePrivateKey.slice():[]);break;case"multiple":var i=(r=n.expandedItems.slice()).indexOf(t.props.uniquePrivateKey);-1===i?r.push(t.props.uniquePrivateKey):r.splice(i,1);break;default:r=n.expandedItems.slice()}n.setState({selected:t.props.uniquePrivateKey,expanded:r}),n.props.onSelect&&n.props.onSelect.call(void 0,{target:t,expandedItems:r})},n.onFocus=function(e,t){void 0===t&&(t=0);var r,i=V(o.Children.toArray(n.children));i.forEach((function(o,a){if(o.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)){var s=a+t<0?0:a+t>i.length?i.length-1:a+t;r=i[s]}})),r&&(n.activeDescendant=r.props.id,n.setState({focused:r.props.uniquePrivateKey}))},n.onNavigate=function(e,t){var r;switch(t){case W.Previous:r=-1,n.onFocus(e,r);break;case W.Next:r=1,n.onFocus(e,r);break;case W.Toggle:n.onSelect(e)}},n.handleWrapperFocus=function(){clearTimeout(n.nextTickId),n.state.wrapperFocused||n.setState({wrapperFocused:!0})},n.handleWrapperBlur=function(){n.nextTick((function(){n.setState({wrapperFocused:!1})}))},n.handleKeyDown=function(e){var t=n._element&&"rtl"===getComputedStyle(n._element).direction||!1;if(e.target===e.currentTarget){var r=void 0;switch(e.keyCode){case C.a.left:r=t?W.Next:W.Previous;break;case C.a.up:r=W.Previous;break;case C.a.right:r=t?W.Previous:W.Next;break;case C.a.down:r=W.Next;break;case C.a.space:case C.a.enter:r=W.Toggle;break;default:r=null}null!==r&&(e.preventDefault(),n.onNavigate(e,r))}},Object(O.a)(x);var r=F(t,n.expandMode);return r.focused||(r.focused=A(t)),n.state=r,n}return q(t,e),Object.defineProperty(t.prototype,"expandMode",{get:function(){return this.props.expandMode||"multiple"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItem",{get:function(){var e=this.props.selected;return void 0===e?this.state.selected:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expandedItems",{get:function(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){var e=U({},this.state,{selected:this.selectedItem}),t={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:e,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return R(t)},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t={"aria-activedescendant":this.activeDescendant},n=Object(a.a)("k-panelbar",this.props.className);return o.createElement("ul",U({ref:function(t){e._element=t},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:n,style:this.props.style},t),this.children)},t.prototype.nextTick=function(e){this.nextTickId=window.setTimeout((function(){return e()}))},t.propTypes={animation:i.bool,children:function(e,t){var n=e[t];if(n){if(Array.isArray(n))for(var r=0,o=n;r<o.length;r++){var i=o[r];if(!i.type||i.type!==_)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(n.type!==_)return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");return null}},dir:i.string,selected:i.string,expanded:i.arrayOf(i.string),focused:i.string,expandMode:i.oneOf(["single","multiple"]),className:i.string,keepItemsMounted:i.bool,onSelect:i.func,style:i.object},t.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1},t}(o.Component),X=n(53);function J(e,t){if(ne(e))return t[Number(e)];var n=t[Number(Y(e))];return n.items?J(function(e){if(te(e))return e;var t=e.indexOf("_");return e.substring(t+1)}(e),n.items):void 0}function Y(e){return te(e)?e:e.split("_")[0]}function Z(e){return Q("0",e)}function Q(e,t){return t?t+"_"+e:e}function ee(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function te(e){return""===e||e.indexOf("_")<0}function ne(e){return""!==e&&e.indexOf("_")<0}function re(e){return 1===function(e){return e.split("_").length-1}(e)}function oe(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}function ie(e,t,n){return ne(t)?e?Number(t)<n-1?(Number(t)+1).toString():"0":Number(t)>0?(Number(t)-1).toString():(n-1).toString():t}var ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ae(t,e),t.prototype.render=function(){return null},t.propTypes={text:i.string,url:i.string,icon:i.string,disabled:i.bool,cssClass:i.string,cssStyle:i.object,render:i.any,linkRender:i.any,contentRender:i.any,data:i.any},t}(o.Component);function le(e,t){if(e&&e.length>0)return{items:de(e),inputItems:e};if(ue(t).length>0){var n=function e(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=ce(void 0,o),a=e(ue(o.props.children));a.length>0&&(i.items=a),n.push(i)}return n}(ue(t));return{items:de(n),inputItems:n}}return{items:[],inputItems:[]}}function ce(e,t){var n={},r=e||t.props,o=r.text,i=r.url,a=r.icon,s=r.disabled,l=r.cssClass,c=r.cssStyle,u=r.render,d=r.linkRender,p=r.contentRender,f=r.data;return void 0!==o&&(n.text=o),void 0!==i&&(n.url=i),void 0!==a&&(n.icon=a),void 0!==s&&(n.disabled=s),void 0!==l&&(n.cssClass=l),void 0!==c&&(n.cssStyle=c),void 0!==u&&(n.render=u),void 0!==d&&(n.linkRender=d),void 0!==p&&(n.contentRender=p),void 0!==f&&(n.data=f),n}function ue(e){return o.Children.toArray(e).filter((function(e){return e&&e.type===se}))}function de(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=ce(o);i.id=Q(r.toString(),t),i.isLastFromSiblings=r===e.length-1,i.items=pe(o,i),n.push(i)}return n}function pe(e,t){return e.contentRender?[{contentParentItemId:t.id,id:Q("0",t.id),isLastFromSiblings:!0,contentRender:e.contentRender,items:[]}]:e.items?de(e.items,t.id):[]}var fe=/\S/;function he(e,t,n,r,o,i){var a,s=h();switch(n){case C.a.left:return o?i?d():c():i?u():l();case C.a.right:return o?i?c():d():i?l():u();case C.a.up:return o?v():ne(t)?f():v();case C.a.down:return o?g():ne(t)?p():g();case C.a.enter:case C.a.space:return s.disabled?t:m()?Z(t):Y(t);case C.a.home:return y()[0].id;case C.a.end:return(a=y())[a.length-1].id;case C.a.esc:return ne(t)?t:ee(t);default:return 1===r.length&&fe.test(r)?function(){var e=r.toLowerCase(),n=y(),o=Number(oe(t)),i=n.slice(o+1).concat(n.slice(0,o+1)).find((function(t){return(t.text||"").toLowerCase().startsWith(e)}));return i?i.id:t}():t}function l(){return ne(t)?v():re(t)?p(v(Y(t))):ee(t)}function c(){return ne(t)?f():ee(t)}function u(){return ne(t)?g():p(m()?t:g(Y(t)))}function d(){return p(ne(t)||m()?t:g(Y(t)))}function p(e){return b(!0,e)}function f(e){return b(!1,e)}function h(n,r){return void 0===n&&(n=t),void 0===r&&(r=e),J(n,r)}function m(e){return h(e).items.length>0}function v(e){return k(!1,e)}function g(e){return k(!0,e)}function y(){return ne(t)?e:h(ee(t),e).items}function b(e,n){void 0===n&&(n=t);var r=h(n);return m(n)&&!r.disabled?e?Z(n):function(e){var t=h(e).items;return t[t.length-1].id}(n):n}function k(n,r){if(void 0===r&&(r=t),ne(r))return ie(n,r,e.length);var o=ee(r);return Q(ie(n,oe(r),h(o).items.length),o)}}var me=n(47),ve={vertical:"top",horizontal:"left"},ge={vertical:"top",horizontal:"right"},ye={vertical:"flip",horizontal:"fit"},be={vertical:"fit",horizontal:"flip"},ke={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:ge,collision:ye},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:ge,collision:be}},we={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:ve,collision:ye},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:ve,collision:be}};function Ce(e,t,n){return ne(e)?t?n?"leftward":"rightward":"downward":n?"leftward":"rightward"}function Oe(e){return e?"rtl":"ltr"}function xe(e,t){return e+"_"+t}var Se,Ee,Ie,Ne,Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Te(t,e),t.prototype.render=function(){return this.props.url?o.createElement("a",{className:this.getMenuItemClassName(),role:"presentation",href:this.props.url,tabIndex:-1},this.props.children):o.createElement("span",{className:this.getMenuItemClassName(),role:"presentation"},this.props.children)},t.prototype.getMenuItemClassName=function(){return Object(a.a)("k-link","k-menu-link",{"k-active":this.props.opened})},t.propTypes={opened:i.bool,url:i.string},t}(o.Component),De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pe="k-i-arrow-60-down",_e="k-i-arrow-60-right",je="k-i-arrow-60-left",Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.render=function(){return o.createElement("span",{className:"k-menu-expand-arrow",role:"presentation"},o.createElement("span",{className:this.getArrowClassName()}))},t.prototype.getArrowClassName=function(){var e,t=Ce(this.props.itemId,!0===this.props.verticalMenu,"rtl"===this.props.dir);return Object(a.a)("k-icon",((e={})[Pe]="downward"===t,e[_e]="rightward"===t,e[je]="leftward"===t,e))},t.propTypes={itemId:i.string,dir:i.string,verticalMenu:i.bool},t}(o.Component),Ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(e){function t(t){var n=e.call(this,t)||this;return n.isFirstRender=!0,n.onMouseOver=function(e){n.props.onMouseOver(n.props.item.id),e.stopPropagation()},n.onMouseLeave=function(e){n.props.onMouseLeave(n.props.item.id),e.stopPropagation()},n.state={opened:!1},n}return Ae(t,e),t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.props.item.id;e&&e===t&&this.itemElement.focus(),this.isFirstRender=!1},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId,n=this.props.item.id;t?e.focusedItemId===t||t!==n||this.itemElement.contains(document.activeElement)||this.itemElement.focus():document.activeElement===this.itemElement&&this.itemElement.blur()},t.prototype.render=function(){var e=this,t=this.props.item,n=t.id;return o.createElement(o.Fragment,null,o.createElement("li",{className:this.getMenuItemClassName(t),style:t.cssStyle,tabIndex:n===this.props.tabbableItemId?0:-1,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:function(t){return e.props.onMouseDown(t)},onBlur:function(){return e.props.onBlur(n)},onFocus:function(){return e.props.onFocus(n)},onClick:function(t){return e.props.onClick(t,n)},role:"menuitem","aria-disabled":!!t.disabled||void 0,"aria-haspopup":t.items.length>0||void 0,"aria-expanded":t.items.length>0?this.Opened:void 0,"aria-label":t.text,"aria-owns":this.Opened?xe(this.props.menuGuid,n):void 0,ref:function(t){return e.itemElement=t},key:"0"},this.contentRender?this.renderContent():this.renderMenuItemLink()),this.renderPopupIfOpened())},t.prototype.renderContent=function(){var e=this.props.item.contentParentItemId;return o.createElement("div",{className:"k-content",role:"presentation"},o.createElement(this.contentRender,{item:this.props.onOriginalItemNeeded(e),itemId:e}))},t.prototype.renderMenuItemLink=function(){var e=this.props.item;if(this.linkRender)return o.createElement(this.linkRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,opened:this.Opened,dir:Oe(this.props.isDirectionRightToLeft)});var t=this.itemRender?o.createElement(this.itemRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,key:"1"}):o.createElement("span",{className:"k-menu-link-text"},e.text);return o.createElement(Me,{url:e.url,opened:this.Opened},this.renderMenuIconIfApplicable(),t,this.renderArrowIfApplicable())},t.prototype.renderPopupIfOpened=function(){if(this.Opened){var e=this.props.item.id,t=function(e,t,n){var r=Ce(e,t,n);return n?"downward"===r?ke.downward:ke.leftward:"downward"===r?we.downward:we.rightward}(e,this.props.isMenuVertical,this.props.isDirectionRightToLeft),n=t.anchorAlign,r=t.popupAlign,i=t.collision;return o.createElement(me.a,{anchor:this.itemElement,show:!0,popupClass:this.getPopupClassName(),anchorAlign:n,popupAlign:r,collision:i,animate:!1,key:"1"},o.createElement(Le,{parentItemId:e,items:this.props.item.items,menuGuid:this.props.menuGuid,focusedItemId:this.props.focusedItemId,lastItemIdToBeOpened:this.props.lastItemIdToBeOpened,tabbableItemId:this.props.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,isMenuVertical:this.props.isMenuVertical,isDirectionRightToLeft:this.props.isDirectionRightToLeft,className:"k-group k-menu-group k-reset",onMouseOver:this.props.onMouseOver,onMouseLeave:this.props.onMouseLeave,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:this.props.onClick,onOriginalItemNeeded:this.props.onOriginalItemNeeded}))}return null},t.prototype.renderMenuIconIfApplicable=function(){return this.props.item.icon?o.createElement("span",{className:"k-icon k-i-"+this.props.item.icon,role:"presentation",key:"0"}):null},t.prototype.renderArrowIfApplicable=function(){return this.props.item.items.length>0?o.createElement(Re,{itemId:this.props.item.id,verticalMenu:this.props.isMenuVertical,dir:Oe(this.props.isDirectionRightToLeft),key:"2"}):null},Object.defineProperty(t.prototype,"itemRender",{get:function(){return this.props.item.render||this.props.itemRender},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkRender",{get:function(){return this.props.item.linkRender||this.props.linkRender},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentRender",{get:function(){return this.props.item.contentParentItemId?this.props.item.contentRender:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Opened",{get:function(){var e,t,n=this.props;return n.item.items.length>0&&(e=n.item.id,0===(t=n.lastItemIdToBeOpened).indexOf(e)&&(t.length===e.length||"_"===t.charAt(e.length)))&&!this.isFirstRender},enumerable:!0,configurable:!0}),t.prototype.getPopupClassName=function(){return Object(a.a)("k-menu-popup",{"k-rtl":this.props.isDirectionRightToLeft})},t.prototype.getMenuItemClassName=function(e){return Object(a.a)("k-item","k-menu-item",{"k-first":(t=e.id,"0"===oe(t)),"k-last":e.isLastFromSiblings,"k-disabled":e.disabled},e.cssClass);var t},t}(o.Component),ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Le=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseOver=function(e){t.props.onMouseOver(t.props.parentItemId),e.stopPropagation()},t.onMouseLeave=function(e){t.props.onMouseLeave(t.props.parentItemId),e.stopPropagation()},t}return ze(t,e),t.prototype.render=function(){var e=this.props.parentItemId;return o.createElement("ul",{className:this.props.className,role:void 0!==e?"menu":"menubar",id:void 0!==e?xe(this.props.menuGuid,e):void 0,onMouseOver:void 0!==e?this.onMouseOver:void 0,onMouseLeave:void 0!==e?this.onMouseLeave:void 0,"aria-orientation":this.props["aria-orientation"]},this.renderChildItems())},t.prototype.renderChildItems=function(){var e=this;return this.props.items.length>0?this.props.items.map((function(t,n){return o.createElement(Fe,{item:t,isMenuVertical:e.props.isMenuVertical,isDirectionRightToLeft:e.props.isDirectionRightToLeft,focusedItemId:e.props.focusedItemId,lastItemIdToBeOpened:e.props.lastItemIdToBeOpened,tabbableItemId:e.props.tabbableItemId,itemRender:e.props.itemRender,linkRender:e.props.linkRender,menuGuid:e.props.menuGuid,onMouseOver:e.props.onMouseOver,onMouseLeave:e.props.onMouseLeave,onMouseDown:e.props.onMouseDown,onBlur:e.props.onBlur,onFocus:e.props.onFocus,onClick:e.props.onClick,onOriginalItemNeeded:e.props.onOriginalItemNeeded,key:n})})):null},t}(o.Component),Be=function(){function e(){this.phase="Initialized"}return e.prototype.getIsDirectionRightToLeft=function(){return this.isDirectionRightToLeft},e.prototype.setIsDirectionRightToLeft=function(e){this.phase="NotInitialized"===this.phase?"Initialized":"NewValueReceived",this.previousIsDirectionRightToLeft=this.isDirectionRightToLeft,this.isDirectionRightToLeft=e},e.prototype.hasDirectionChanged=function(){return"NewValueReceived"===this.phase&&this.previousIsDirectionRightToLeft!==this.isDirectionRightToLeft},e}(),Ve=function(){function e(e,t,n){this.openOnClick=e,this.resetMenu=t,this.openItem=n,this.openOnClick=e,this.isMouseOverEnabled=!e}return Object.defineProperty(e.prototype,"OpenOnClick",{set:function(e){Boolean(e)!==Boolean(this.openOnClick)&&(this.mouseDown=!1,this.isMouseOverEnabled=!e),this.openOnClick=e},enumerable:!0,configurable:!0}),e.prototype.handleItemSelectedViaKeyboard=function(){this.openOnClick&&(this.isMouseOverEnabled=!1,this.resetMenu())},Object.defineProperty(e.prototype,"IsMouseOverEnabled",{get:function(){return this.isMouseOverEnabled},enumerable:!0,configurable:!0}),e.prototype.handleItemMouseDown=function(){this.mouseDown=!0},e.prototype.handleItemFocus=function(){this.openOnClick&&!this.mouseDown&&(this.isMouseOverEnabled=!0),this.mouseDown=!1},e.prototype.handleItemClick=function(e,t){this.openOnClick&&(this.isMouseOverEnabled?t&&(this.isMouseOverEnabled=!1,this.resetMenu()):(this.isMouseOverEnabled=!0,this.openItem(e)))},e}(),He=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke={focusedItemId:"",hoveredItemId:"",tabbableItemId:"0"},We=function(e){function t(t){var n=e.call(this,t)||this;return n.guid=Object(y.a)(),n.directionHolder=new Be,n.reset=function(){n.clearItemHoverAndLeaveRequestsIfApplicable(),n.setState(Ke)},n.onKeyDown=function(e){if(""!==n.state.focusedItemId){var t=J(n.state.focusedItemId,n.items),r=he(n.items,t.id,e.keyCode,e.key,n.props.vertical,n.directionHolder.getIsDirectionRightToLeft());t.id!==r&&(e.preventDefault(),n.setFocusedItemId(r)),e.keyCode!==C.a.enter&&e.keyCode!==C.a.space||t.disabled||(n.mouseOverHandler.handleItemSelectedViaKeyboard(),n.dispatchSelectEventIfWired(e,t.id),!e.isDefaultPrevented()&&0===t.items.length&&t.url&&window.location.assign(t.url))}},n.onItemMouseOver=function(e){n.mouseOverHandler.IsMouseOverEnabled&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemHoverRequest=window.setTimeout((function(){n.setHoveredItemId(e),n.itemHoverRequest=null}),function(e){return void 0!==e.hoverOpenDelay?e.hoverOpenDelay:e.openOnClick?0:100}(n.props)))},n.onItemMouseLeave=function(e){n.mouseOverHandler.IsMouseOverEnabled&&n.isItemWithDefaultClose(e)&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemLeaveRequest=window.setTimeout((function(){n.setHoveredItemId(""),n.itemLeaveRequest=null}),function(e){return void 0!==e.hoverCloseDelay?e.hoverCloseDelay:100}(n.props)))},n.onItemMouseDown=function(){n.mouseOverHandler.handleItemMouseDown()},n.onItemFocus=function(e){n.setFocusedItemId(e),n.mouseOverHandler.handleItemFocus()},n.onItemClick=function(e,t){var r=J(t,n.items);r.disabled||(n.setFocusedItemId(t),n.mouseOverHandler.handleItemClick(t,n.isItemWithDefaultClose(t)),n.dispatchSelectEventIfWired(e,t),!e.isDefaultPrevented()&&r.url&&window.location.assign(r.url))},n.onItemBlur=function(e){n.isItemWithDefaultClose(e)&&n.setFocusedItemId("")},n.getInputItem=function(e){return J(e,n.inputItems)},Object(O.a)(x),n.mouseOverHandler=new Ve(n.props.openOnClick,n.reset,n.onItemMouseOver),n.state=Object.assign({},Ke,{isFirstRender:!0}),n}return He(t,e),t.prototype.render=function(){var e=this;this.prepareItems(),this.state.isFirstRender||this.directionHolder.setIsDirectionRightToLeft(this.checkIsDirectionRightToLeft());var t=this.state.hoveredItemId?this.state.hoveredItemId:this.state.focusedItemId?ee(this.state.focusedItemId):"";return o.createElement("div",{onKeyDown:this.onKeyDown,style:this.props.style,className:this.getMenuWrapperClassName(),ref:function(t){return e.menuWrapperEl=t}},o.createElement(Le,{className:this.getMenuClassName(),"aria-orientation":this.props.vertical?"vertical":void 0,items:this.items,isMenuVertical:this.props.vertical,isDirectionRightToLeft:this.directionHolder.getIsDirectionRightToLeft(),focusedItemId:this.state.focusedItemId,lastItemIdToBeOpened:t,tabbableItemId:this.state.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,menuGuid:this.guid,onMouseLeave:this.onItemMouseLeave,onMouseOver:this.onItemMouseOver,onMouseDown:this.onItemMouseDown,onFocus:this.onItemFocus,onClick:this.onItemClick,onBlur:this.onItemBlur,onOriginalItemNeeded:this.getInputItem}))},t.prototype.componentDidMount=function(){this.setState({isFirstRender:!1})},t.prototype.componentDidUpdate=function(e){(Boolean(e.vertical)!==Boolean(this.props.vertical)||this.directionHolder.hasDirectionChanged())&&this.reset(),this.mouseOverHandler.OpenOnClick=this.props.openOnClick},t.prototype.componentWillUnmount=function(){this.clearItemHoverAndLeaveRequestsIfApplicable()},t.prototype.setFocusedItemId=function(e){this.setState((function(t){var n=""===e?t.tabbableItemId:Y(e);return{hoveredItemId:""===e||te(t.hoveredItemId)&&te(e)?t.hoveredItemId:"",focusedItemId:e,tabbableItemId:n}}))},t.prototype.setHoveredItemId=function(e){this.setState((function(t){return te(e)&&te(t.focusedItemId)?{hoveredItemId:e,focusedItemId:t.focusedItemId,tabbableItemId:t.tabbableItemId}:{hoveredItemId:e,focusedItemId:"",tabbableItemId:"0"}}))},t.prototype.getMenuWrapperClassName=function(){return Object(a.a)({"k-rtl":this.directionHolder.getIsDirectionRightToLeft()},this.props.className)},t.prototype.getMenuClassName=function(){return Object(a.a)("k-widget","k-reset","k-header","k-menu",{"k-menu-horizontal":!this.props.vertical},{"k-menu-vertical":this.props.vertical})},t.prototype.clearItemHoverAndLeaveRequestsIfApplicable=function(){this.itemHoverRequest&&(clearTimeout(this.itemHoverRequest),this.itemHoverRequest=null),this.itemLeaveRequest&&(clearTimeout(this.itemLeaveRequest),this.itemLeaveRequest=null)},t.prototype.isItemWithDefaultClose=function(e){return!this.props.customCloseItemIds||-1===this.props.customCloseItemIds.indexOf(e)},t.prototype.checkIsDirectionRightToLeft=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:this.menuWrapperEl&&"rtl"===getComputedStyle(this.menuWrapperEl).direction},t.prototype.prepareItems=function(){var e=le(this.props.items,this.props.children),t=e.items,n=e.inputItems;this.items=t,this.inputItems=n},t.prototype.dispatchSelectEventIfWired=function(e,t){Object(X.a)(this.props.onSelect,e,this,{item:this.getInputItem(t),itemId:t})},t.propTypes={vertical:i.bool,items:i.arrayOf(i.object),style:i.object,dir:i.string,hoverOpenDelay:i.number,hoverCloseDelay:i.number,openOnClick:i.bool,itemRender:i.any,linkRender:i.any,customCloseItemIds:i.arrayOf(i.string),onSelect:i.func},t.defaultProps={vertical:!1},t}(o.Component),$e=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $e(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.size,i=t.collapsed,s=t.overlay,l=t.containsSplitter,c=t.collapsible,u=t.resizable,d=t.scrollable,p=t.keepMounted,f=r&&r.length>0,h={flexBasis:r},m=Object(a.a)("k-pane",((e={})["k-state-hidden"]=i,e.hidden=i,e["k-pane-flex"]=l,e["k-pane-static"]=!u&&!c||f,e["k-scrollable"]=d,e));return o.createElement("div",{id:n,style:h,className:m},!i||p?this.props.children:void 0,s?o.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)},t}(o.Component),Ue=n(60),Ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(t){var n=e.call(this,t)||this;return n.onDrag=function(e,t,r){var o=e.event,i=n.props,a=i.onDrag,s=i.index,l=n.draggable&&n.draggable.element;!r&&o&&o.originalEvent.preventDefault(),l&&!n.isStatic&&n.isDraggable&&a(o,l,s,t,r)},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onToggle=function(e){var t=n.props,r=t.onToggle,o=t.index,i=t.prev,a=t.next;(i.collapsible||a.collapsible)&&r(i.collapsible?o:o+1,e)},n.onPrevToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.prev.collapsible&&r(o,e)},n.onNextToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.next.collapsible&&r(o+1,e)},n.onKeyDown=function(e){var t=e&&e.keyCode,r=n.isHorizontal,o=n.props.index,i=n.draggable&&n.draggable.element,a=function(t,r,o){e.preventDefault(),n.props.onKeyboardResize(t,r,o,e)};i&&(t===C.a.enter?(e.preventDefault(),n.onToggle(e)):n.isDraggable&&(r&&t===C.a.left?a(i,o,-10):r&&t===C.a.right?a(i,o,10):r||t!==C.a.up?r||t!==C.a.down||a(i,o,10):a(i,o,-10)))},n.previousArrowClass=function(e){var t,r=n.props.prev,o=r.collapsible,i=r.collapsed;return Object(a.a)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-prev"]=o,t["k-i-arrow-60-left"]=o&&e&&!i,t["k-i-arrow-60-right"]=o&&e&&i,t["k-i-arrow-60-up"]=o&&!e&&!i,t["k-i-arrow-60-down"]=o&&!e&&i,t))},n.nextArrowClass=function(e){var t,r=n.props.next,o=r.collapsible,i=r.collapsed;return Object(a.a)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-next"]=o,t["k-i-arrow-60-right"]=o&&e&&!i,t["k-i-arrow-60-left"]=o&&e&&i,t["k-i-arrow-60-down"]=o&&!e&&!i,t["k-i-arrow-60-up"]=o&&!e&&i,t))},n.state={focused:!1},n}return Ge(t,e),Object.defineProperty(t.prototype,"isStatic",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsible||n.collapsible;return!r&&!o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDraggable",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsed||n.collapsed;return!!r&&!o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHorizontal",{get:function(){return"horizontal"===this.props.orientation},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e,t=this,n=this.isDraggable,r=this.isStatic,i=this.isHorizontal,s=Object(a.a)("k-splitbar",((e={})["k-focus"]=this.state.focused,e["k-splitbar-horizontal"]=i,e["k-splitbar-vertical"]=!i,e["k-splitbar-draggable-horizontal"]=i&&n,e["k-splitbar-draggable-vertical"]=!i&&n,e["k-splitbar-static-horizontal"]=i&&r,e["k-splitbar-static-vertical"]=!i&&r,e)),l=this.previousArrowClass(i),c=this.nextArrowClass(i);return o.createElement(Ue.a,{onPress:function(e){return t.onDrag(e,!0,!1)},onDrag:function(e){return t.onDrag(e,!1,!1)},onRelease:function(e){return t.onDrag(e,!1,!0)},ref:function(e){t.draggable=e}},o.createElement("div",{tabIndex:r?-1:0,role:"separator",className:s,style:{touchAction:"none"},onFocus:this.onFocus,onBlur:this.onBlur,onDoubleClick:this.onToggle,onKeyDown:this.onKeyDown},o.createElement("div",{className:l,onClick:this.onPrevToggle}),o.createElement("div",{className:"k-resize-handle"}),o.createElement("div",{className:c,onClick:this.onNextToggle})))},t}(o.Component),Je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(){return(Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ze=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},Qe={collapsible:!1,collapsed:!1,resizable:!0,scrollable:!0},et=function(e){function t(t){var n=e.call(this,t)||this;return n.validatePanes=function(e){if(!e.filter((function(e){return void 0===e.size})).length)throw new Error("The Splitter should have at least one pane without a set size.")},n.mapPaneOptions=function(e,t){for(var r=n.orientation,i=n.state,a=i.dragIndex,s=i.isDragging,l=[],c=0;c<t.length;c++){var u=!1,d=t[c];o.isValidElement(d)&&(u="Splitter"===d.type.displayName);var p=!1;s&&void 0!==a&&(p=a===c||a+1===c),l.push(Ye({},Qe,{orientation:r,containsSplitter:u,overlay:p},(e||[])[c]))}return l},n.mapSplitterPanes=function(e,t){return e.map((function(r,i){var a,s=2*i,l=s+1;if(i+1<e.length){var c=e[i+1];a=o.createElement(Xe,{key:l,index:i,orientation:r.orientation,prev:r,next:c,onDrag:n.onBarDragResize,onToggle:n.onBarToggle,onKeyboardResize:n.onBarKeyboardResize})}return[o.createElement(qe,Ye({key:s},r),t[i]),a]}))},n.onBarToggle=function(e,t){var r=n.panesOptions(n.panesContent).map((function(t,r){var o=n.getPaneProps(t);return r===e?Ye({},o,{collapsed:!t.collapsed}):Ye({},o)}));n.props.onChange&&n.props.onChange({newState:r,isLast:!0,nativeEvent:t})},n.onBarDragResize=function(e,t,r,o,i){var a=(new Date).getTime(),s=e.pageX,l=e.pageY,c=n.surroudingPanes(t),u=c.prevElement,d=c.nextElement;if(u&&d)if(o)n.setState({isDragging:!0,dragIndex:r,startTime:a,originalX:s,originalY:l,originalPrevSize:n.elementSize(u),originalNextSize:n.elementSize(d)});else{var p,f=n.state,h=f.originalPrevSize,m=f.originalNextSize,v=f.startTime,g=f.originalX,y=f.originalY;if(!o&&a-v<150)i&&n.resetDragState();else p="vertical"===n.orientation?l-y:n.isRtl?g-s:s-g,n.resize(r,r+1,h,m,p,i,e),i&&n.resetDragState()}},n.onBarKeyboardResize=function(e,t,r,o){var i=n.surroudingPanes(e),a=i.prevElement,s=i.nextElement,l=n.elementSize(a),c=n.elementSize(s);n.resize(t,t+1,l,c,r,!0,o)},n.containerSize=function(){return n._container?n.elementSize(n._container,!0):0},n.panesOptions=function(e){return n.mapPaneOptions(n.panes,e)},n.elementSize=function(e,t){var r=t?"client":"offset";return"vertical"===n.orientation?e[r+"Height"]:e[r+"Width"]},n.clamp=function(e,t,n){return Math.min(t,Math.max(e,n))},n.fixedSize=function(e){return e&&e.length>0},Object(O.a)(x),n.state={isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0,panes:t.defaultPanes||[]},n}return Je(t,e),Object.defineProperty(t.prototype,"isControlledState",{get:function(){return void 0!==this.props.panes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panes",{get:function(){return void 0!==this.panesDuringOnChange?this.panesDuringOnChange:this.isControlledState?this.props.panes:this.state.panes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this.props.orientation||"horizontal"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRtl",{get:function(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panesContent",{get:function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.panesContent,n=this.panesOptions(t),r=Object(a.a)("k-widget","k-splitter","k-splitter-flex","k-splitter-"+this.orientation,this.props.className);return this.validatePanes(n),o.createElement("div",{style:this.props.style,ref:function(t){return e._container=t},className:r},this.mapSplitterPanes(n,t))},t.prototype.surroudingPanes=function(e){return{prevElement:e.previousElementSibling,nextElement:e.nextElementSibling}},t.prototype.isPercent=function(e){return/%$/.test(e)},t.prototype.toPixels=function(e,t){var n=parseInt(e,10);return this.isPercent(e)&&(n=t*n/100),n},t.prototype.resetDragState=function(){this.setState({isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0})},t.prototype.resize=function(e,t,n,r,o,i,a){var s,l,c=this,u=this.panesOptions(this.panesContent),d=u[e],p=u[t],f=n+r,h=this.containerSize(),m=function(e){return c.toPixels(e,h)},v={index:e,initialSize:n,min:m(d.min)||f-m(p.max)||0,max:m(d.max)||f-m(p.min)||f},g={index:t,initialSize:r,min:m(p.min)||f-m(d.max)||0,max:m(p.max)||f-m(d.min)||f},y=function(e,t){var n=u[e.index],r=c.clamp(e.min,e.max,e.initialSize+t);return c.isPercent(n.size||"")?100*r/h+"%":r+"px"};this.fixedSize(d.size)&&this.fixedSize(p.size)?(s=y(v,o),l=y(g,-o)):p.collapsible||this.fixedSize(p.size)?l=y(g,-o):s=y(v,o);var b=u.map((function(n,r){var o=c.getPaneProps(n);return r===e?Ye({},o,{size:s}):r===t?Ye({},o,{size:l}):Ye({},o)}));this.panesDuringOnChange=b,this.isControlledState||this.setState({panes:b}),this.props.onChange&&this.props.onChange({newState:b,isLast:i,nativeEvent:a}),this.panesDuringOnChange=void 0},t.prototype.getPaneProps=function(e){e.orientation,e.overlay,e.containsSplitter;return Ze(e,["orientation","overlay","containsSplitter"])},t.displayName="Splitter",t}(o.Component);!function(e){e.TEXT="text",e.IMAGE="image",e.ICON="icon"}(Se||(Se={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(Ee||(Ee={})),function(e){e.DEFAULT="default",e.primary="primary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(Ie||(Ie={})),function(e){e.START="start",e.CENTER="center",e.END="end",e.STRETCHED="stretched"}(Ne||(Ne={}));var tt=function(){return(tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},nt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},rt=o.forwardRef((function(e,t){var n;Object(O.a)(x);var r=e.children,i=e.dir,s=e.style,l=e.className,c=e.type,u=e.orientation,d=nt(e,["children","dir","style","className","type","orientation"]),p=o.useRef(null),f=o.useRef(null);return o.useImperativeHandle(p,(function(){return{element:f.current,props:e}})),o.useImperativeHandle(t,(function(){return p.current})),o.createElement("div",tt({dir:i,style:s,ref:f,className:Object(a.a)("k-card",l,(n={},n["k-card-"+c]=c!==Ie.DEFAULT,n),u!==Ee.HORIZONTAL?"k-card-vertical":"k-card-horizontal")},d),r)}));rt.displayName="KendoReactCard",rt.propTypes={children:i.node,className:i.string,dir:i.string,orientation:i.oneOf(["horizontal","vertical"]),style:i.object,type:i.oneOf(["default","primary","info","success","warning","error"])},rt.defaultProps={type:Ie.DEFAULT,orientation:Ee.VERTICAL,dir:"ltr"};var ot=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-header",e.className)},e.children)};ot.propTypes={className:i.string};var it=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-title",e.className)},e.children)};it.propTypes={className:i.string};var at=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-body",e.className)},e.children)};at.propTypes={className:i.string};var st=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-actions",e.className,"k-card-actions-"+e.layout,e.orientation!==Ee.VERTICAL?"k-card-actions-horizontal":"k-card-actions-vertical")},e.children)};st.propTypes={layout:i.oneOf(["stretched","start","center","end"]),orientation:i.oneOf(["horizontal","vertical"])},st.defaultProps={layout:Ne.START,orientation:Ee.HORIZONTAL};var lt=function(e){return o.createElement("img",{style:e.style,className:Object(a.a)("k-card-image",e.className),src:e.src})};lt.propTypes={className:i.string,src:i.string},lt.defaultProps={src:""};var ct=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-subtitle",e.className)},e.children)};ct.propTypes={className:i.string};var ut=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-footer",e.className)},e.children)};ut.propTypes={className:i.string};var dt=n(22),pt=function(e){var t;return Object(O.a)(x),o.createElement("div",{style:e.style,className:Object(a.a)("k-avatar",(t={},t["k-avatar-bordered"]=e.border,t["k-rounded-"+(dt.a.roundedMap[e.rounded]||e.rounded)]=e.rounded,t["k-avatar-"+(dt.a.sizeMap[e.size]||e.size)]=e.size,t["k-avatar-"+e.fillMode]=e.fillMode,t["k-avatar-"+e.fillMode+"-"+e.themeColor]=Boolean(e.fillMode&&e.themeColor),t),e.className)},o.createElement("span",{className:"k-avatar-"+e.type},e.children))};pt.propTypes={className:i.string,type:i.oneOf(["text","image","icon"]),size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","outline"]),themeColor:i.oneOf([null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"])},pt.defaultProps={type:Se.TEXT,size:"medium",rounded:"full",fillMode:"solid",themeColor:"primary"};var ft=o.createContext({animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50}),ht=n(39),mt=function(){return(mt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},vt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},gt=o.forwardRef((function(e,t){var n=e.className,r=e.style,i=e.text,s=e.icon,l=e.separator,c=e.disabled,u=e.selected,d=e.onSelect,p=e.index,f=e.tabIndex,h=e.children,m=vt(e,["className","style","text","icon","separator","disabled","selected","onSelect","index","tabIndex","children"]),v=o.useContext(ft),g=v.expanded,y=v.mini,b=v.item,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:k.current,focus:w,props:e}}));var C=Object(a.a)("k-drawer-item",{"k-selected":u,"k-disabled":c},n),O=o.useCallback((function(){if(d&&!c){var t={element:k.current,focus:w,props:e};d(t,p)}}),[d,p,c]),x=o.createElement(o.Fragment,null,s&&o.createElement("span",{className:"k-icon "+s}),!g&&y?null:o.createElement("span",{className:"k-item-text"},i));return l?o.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"presentation"}):o.createElement("li",mt({ref:k,className:C,style:r,role:"option","aria-selected":u,"aria-disabled":c,onClick:O,tabIndex:Object(ht.a)(f,c)},m),b?h:x)}));gt.propTypes={className:i.string,style:i.object,text:i.string,icon:i.string,separator:i.bool,selected:i.bool,disabled:i.bool,targetItem:i.any},gt.displayName="KendoDrawerItem";var yt=function(){return(yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},bt={type:"slide",duration:200},kt={type:"slide",duration:0},wt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useContext(ft),l=s.animation,c=s.expanded,u=s.mode,d=s.position,p=s.onOverlayClick,f=s.mini,h=s.dir,m=s.width,v=s.miniWidth,g=s.items,y=s.item,b=s.onSelect,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]),C="boolean"!=typeof l?l:!1===l?kt:bt,O=m||240,x=v||50;o.useImperativeHandle(t,(function(){return{element:k.current,focus:w}}));var S=o.useMemo((function(){return"k-widget k-drawer "+Object(a.a)({"k-drawer-start":"start"===d,"k-drawer-end":"end"===d},r)}),[d]),E={opacity:1,flexBasis:O,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},I={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},N={opacity:f?1:0,flexBasis:f?x:0,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},T={opacity:0,transform:"translateX(-100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},M={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},D={transform:"translateX(0%)",WebkitTransitionDuration:(C&&C.duration)+"ms",transitionDuration:(C&&C.duration)+"ms"},P=c?"push"===u?E:I:"push"===u?N:"ltr"===h&&"start"===d||"rtl"===h&&"end"===d?f?D:T:f?D:M,_=g&&o.createElement("ul",{className:"k-drawer-items",role:"listbox","aria-label":"drawer-list","aria-expanded":c},g.map((function(e,t){var n=yt({index:t},e,{onSelect:b}),r=y||gt;return o.createElement(r,yt({key:t},n))}))),j=o.createElement("div",{style:C?yt({},P,i):i,className:S,ref:k},o.createElement("div",{className:"k-drawer-wrapper",style:!c&&f&&"overlay"===u?{width:x}:{width:O}},_||n));return"overlay"===u?o.createElement(o.Fragment,null,c&&o.createElement("div",{className:"k-overlay",onClick:p}),j):j}));wt.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number},wt.displayName="KendoDrawerNavigation";var Ct=n(35),Ot=o.forwardRef((function(e,t){Object(O.a)(x);var n=e.expanded,r=e.mode,i=e.position,s=e.className,l=e.children,c=e.style,u=e.animation,d=e.mini,p=e.width,f=e.miniWidth,h=e.items,m=e.item,v=e.tabIndex,g=e.onOverlayClick,y=e.onSelect,b=o.useRef(null),k=o.useCallback((function(){b.current&&b.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:b.current,focus:k}}));var w=o.useCallback((function(e,t){h&&y&&y.call(void 0,{itemTarget:e,itemIndex:t})}),[h,y]),C=Object(Ct.a)(b,e.dir),S=Object(a.a)({"k-drawer-container":!0,"k-drawer-expanded":n,"k-drawer-overlay":"overlay"===r,"k-drawer-push":"push"===r,"k-drawer-mini":d},s);return o.createElement(ft.Provider,{value:{animation:u,expanded:n,mode:r,position:i,mini:d,dir:C,items:h,item:m,width:p,miniWidth:f,onOverlayClick:g,onSelect:w}},o.createElement("div",{className:S,ref:b,dir:C,style:c,tabIndex:v},h&&o.createElement(wt,null),l))}));Ot.propTypes={animation:i.any,expanded:i.bool,children:i.any,className:i.string,dir:i.string,mode:i.string,position:i.string,mini:i.bool,style:i.object,tabIndex:i.number,width:i.number,miniWidth:i.number,selected:i.number,onSelect:i.func,onOverlayClick:i.func};Ot.defaultProps={animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50},Ot.displayName="KendoDrawer";var xt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:s.current}}));var l=Object(a.a)({"k-drawer-content":!0},r);return o.createElement("div",{className:l,style:i,ref:s},n)}));xt.propTypes={children:i.any,className:i.string,style:i.object},xt.displayName="KendoDrawerContent";var St,Et=o.createContext({linear:!1,mode:"steps",value:0}),It=n(55),Nt=n(59),Tt=n(3),Mt=((St={})["stepper.optionalText"]="(Optional)",St),Dt=function(){return(Dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},_t=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.current,s=e.disabled,l=e.focused,c=e.icon,u=e.index,d=e.isValid,p=e.label,f=e.optional,h=e.style,m=e.tabIndex,v=e.text,g=Pt(e,["children","className","current","disabled","focused","icon","index","isValid","label","optional","style","tabIndex","text"]),y=o.useContext(Et),b=y.animationDuration,k=y.isVertical,w=y.item,C=y.linear,O=y.mode,x=y.numOfSteps,S=y.value,E=y.successIcon,I=y.errorIcon,N=y.onChange,T=y.onFocus,M=o.useRef(null),D=o.useCallback((function(){M.current&&Object(It.a)(M.current)}),[]),P=o.useCallback((function(){return{element:M.current,focus:D}}),[D]);o.useImperativeHandle(t,P);var _,j=!C||u===S-1||u===S||u===S+1,R="labels"===O||Boolean(c)&&Boolean(p),A=Object(Tt.useLocalization)(),F=(_="stepper.optionalText",A.toLanguageString(_,Mt[_])),z="number"==typeof b?b:!1!==b?400:0,L=o.useCallback((function(e){N&&!s&&Object(X.a)(N,e,P(),{value:u})}),[N,S,s]),B=o.useCallback((function(e){T&&!s&&Object(X.a)(T,e,P(),void 0)}),[T,s]),V=o.useMemo((function(){return Object(a.a)("k-step",{"k-step-first":0===u,"k-step-last":x&&u===x-1,"k-step-done":u<S,"k-step-current":i,"k-step-optional":f,"k-step-disabled":s,"k-step-focus":l,"k-step-error":void 0!==d&&!d,"k-step-success":d},r)}),[u,x,S,i,f,s,l,d,r]),H=o.useMemo((function(){return Dt({maxWidth:k?void 0:"calc(100% / "+x+")",maxHeight:k?"calc(100% / "+x+")":void 0,pointerEvents:j?void 0:"none"},h)}),[k,x,h,j]),K=d?E?""+E:"k-icon k-i-check":I?""+I:"k-icon k-i-warning",W=o.createElement("span",{className:"k-step-indicator-icon "+K,"aria-hidden":"true"}),$=o.createElement(o.Fragment,null,"labels"!==O?o.createElement("span",{className:"k-step-indicator","aria-hidden":!0,style:{transitionDuration:z+"ms"}},c?R||void 0===d?o.createElement("span",{className:"k-step-indicator-icon k-icon "+c}):W:void 0!==d?W:o.createElement("span",{className:"k-step-indicator-text"},v||u+1)):null),q=o.createElement("span",{className:"k-step-label"},p&&o.createElement("span",{className:"k-step-text"},p),R&&void 0!==d&&W,f&&o.createElement("span",{className:"k-step-label-optional"},F)),U=o.createElement(o.Fragment,null,$,q);return o.createElement("li",Dt({ref:M,className:V,style:H},g),o.createElement("a",{className:"k-step-link",title:p||void 0,onClick:L,onFocus:B,tabIndex:m||(l?0:-1),"aria-current":i?"step":void 0,"aria-disabled":s||!j||void 0,"aria-invalid":void 0!==d&&!d||void 0},w?n:U))}));_t.propTypes={children:i.any,className:i.string,current:i.bool,disabled:i.bool,icon:i.string,index:i.number,isValid:i.bool,label:i.string,optional:i.bool,style:i.object,tabIndex:i.number,text:i.string};_t.defaultProps={tabIndex:0},_t.displayName="KendoStep";var jt=function(e,t){var n=o.useRef(0),r=o.useRef(!1),i=o.useRef();o.useEffect((function(){return function(e){var t,r=e.duration,o=n.current&&1-n.current;e.onStart&&e.onStart();var a=function(s){t||(t=s);var l=(s-t+1)/r+o;l<=1?(e.onUpdate&&e.onUpdate(l),i.current=window.requestAnimationFrame(a),n.current=l):(e.onEnd&&e.onEnd(1),n.current=0)};i.current=window.requestAnimationFrame(a)}(e),function(){i.current&&window.cancelAnimationFrame(i.current)}}),t),o.useEffect((function(){r.current=!0}),[])},Rt=function(e,t,n){var r=Math.abs((t-e)/100);return Math.abs((n-e)/r)},At=function(e,t,n,r){var o=Math.max(n,.01),i=100/o*100;e.current&&t.current&&(e.current.style.width=r?"100%":o+"%",t.current.style.width=r?"100%":i+"%",e.current.style.height=r?o+"%":"100%",t.current.style.height=r?i+"%":"100%")},Ft={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189230,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},zt=function(){return(zt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Lt=o.forwardRef((function(e,t){Object(O.a)(Ft);var n=e.animation,r=e.disabled,i=e.reverse,s=void 0===i?Bt.reverse:i,l=e.orientation,c=e.labelVisible,u=e.labelPlacement,d=e.max,p=void 0===d?Bt.max:d,f=e.min,h=void 0===f?Bt.min:f,m=e.tabIndex,v=e.className,g=e.style,y=e.emptyStyle,b=e.emptyClassName,k=e.progressStyle,w=e.progressClassName,C=o.useRef(null),x=o.useRef(null),S=o.useRef(null),E=o.useCallback((function(){C.current&&C.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:C.current,progressStatusElement:x.current,progressStatusWrapElement:S.current,focus:E}}));var I=e.value||Bt.value,N=function(e){var t=o.useRef();return o.useEffect((function(){t.current=e})),t.current}(I),T=null===e.value,M=Object(Nt.a)(C,e.dir),D="vertical"===l,P=function(e){var t=e.toString().split(".");return 1===t.length?""+t[0]:t[0]+"."+t[1].substr(0,3)}(I),_={value:I},j=c?e.label?o.createElement("span",{className:"k-progress-status"},o.createElement(e.label,zt({},_))):o.createElement("span",{className:"k-progress-status"},P):void 0,R={className:Object(a.a)("k-widget k-progressbar",{"k-progressbar-horizontal":!D,"k-progressbar-vertical":D,"k-progressbar-reverse":s,"k-progressbar-indeterminate":T,"k-disabled":r},v),ref:C,dir:M,tabIndex:Object(ht.a)(m,r),role:"progressbar","aria-valuemin":h,"aria-valuemax":p,"aria-valuenow":T?void 0:I,"aria-disabled":r,style:g},A=Object(a.a)("k-progress-status-wrap",{"k-progress-start":"start"===u,"k-progress-center":"center"===u,"k-progress-end":"end"===u||void 0===u}),F="boolean"!=typeof n&&void 0!==n?n.duration:n?400:0,z=o.useCallback((function(){var e=Rt(h,p,N);At(x,S,e,D)}),[D,p,h,N]),L=o.useCallback((function(e){var t=Rt(h,p,N+(I-N)*e);At(x,S,t,D)}),[h,p,N,I,D]),B=o.useCallback((function(){var e=Rt(h,p,I);At(x,S,e,D)}),[D,p,h,I]);return jt({duration:F,onStart:z,onUpdate:L,onEnd:B},[I,F]),o.createElement("div",zt({},R),o.createElement("span",{className:A+(b?" "+b:""),style:y},j),o.createElement("div",{className:"k-selected",style:k,ref:x},o.createElement("span",{className:A+(w?" "+w:""),ref:S},j)))}));Lt.propTypes={animation:i.any,disabled:i.bool,reverse:i.bool,label:i.any,labelVisible:i.bool,labelPlacement:i.oneOf(["start","center","end"]),max:i.number,min:i.number,value:i.number,tabIndex:i.number,emptyStyle:i.object,emptyClassName:i.string,progressStyle:i.object,progressClassName:i.string};var Bt={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};Lt.defaultProps=Bt,Lt.displayName="KendoProgressBar";var Vt=function(){return(Vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ht=o.forwardRef((function(e,t){Object(O.a)(x);var n=e.animationDuration,r=e.children,i=e.className,s=e.disabled,l=e.errorIcon,c=e.item,u=e.items,d=e.linear,p=e.mode,f=e.orientation,h=e.style,m=e.successIcon,v=e.onChange,g=e.onFocus,y=o.useRef(null),b=o.useCallback((function(){y.current&&Object(It.a)(y.current)}),[]),k=o.useCallback((function(){return{element:y.current,focus:b}}),[b]);o.useImperativeHandle(t,k);var w=e.value||Kt.value,S=o.useState(w),E=S[0],I=S[1],N=u?u.length:0,T="vertical"===f,M=Object(Nt.a)(y,e.dir),D="number"==typeof n?n:!1!==n?400:0,P=o.useCallback((function(e,t){w!==t&&v&&!s&&(!d||t===w-1||t===w||t===w+1)&&(Object(X.a)(v,e,k(),{value:t}),I(t))}),[w,d,v,s,I]),_=o.useCallback((function(e){var t=e.value,n=e.syntheticEvent;P(n,t)}),[P]),j=o.useCallback((function(e){g&&!s&&Object(X.a)(g,e.syntheticEvent,k(),void 0)}),[g,s]),R=o.useCallback((function(e){P(e,E)}),[P,E]),A=o.useCallback((function(e){var t="rtl"===M,n=E,r=u.length-1;switch(e.keyCode){case C.a.left:e.preventDefault(),!t&&n>0&&I(n-1),t&&n<r&&I(n+1);break;case C.a.right:e.preventDefault(),!t&&n<r&&I(n+1),t&&n>0&&I(n-1);break;case C.a.up:e.preventDefault(),!t&&n>0&&I(n-1),t&&n>0&&I(n-1);break;case C.a.down:e.preventDefault(),!t&&n<r&&I(n+1),t&&n<r&&I(n+1);break;case C.a.home:e.preventDefault(),I(0);break;case C.a.end:e.preventDefault(),I(r);break;case C.a.space:case C.a.enter:e.preventDefault(),u[n].disabled||R(e)}}),[u,I,E,M,R]),F=o.useMemo((function(){return Object(a.a)("k-stepper",{"k-stepper-linear":d},i)}),[d,i]),z=o.useMemo((function(){return Vt({display:"grid",gridTemplateColumns:T?void 0:"repeat("+2*N+", 1fr)",gridTemplateRows:T?"repeat("+N+", 1fr)":void 0},h)}),[T,N,h]),L=o.useMemo((function(){return Object(a.a)("k-step-list",{"k-step-list-horizontal":!T,"k-step-list-vertical":T})}),[T]),B=o.useMemo((function(){return{gridColumnStart:T?void 0:1,gridColumnEnd:T?void 0:-1,gridRowStart:T?1:void 0,gridRowEnd:T?-1:void 0}}),[T]),V=o.useMemo((function(){return{gridColumnStart:T?void 0:2,gridColumnEnd:T?void 0:2*N,gridRowStart:T?1:void 0,gridRowEnd:T?N:void 0,top:T?17:void 0}}),[T,N]),H=u&&u.map((function(e,t){var n=Vt({index:t,disabled:s||e.disabled,focused:t===E,current:t===w},e),r=c||_t;return o.createElement(r,Vt({key:t},n))}));return o.createElement(Et.Provider,{value:{animationDuration:n,isVertical:T,item:c,linear:d,mode:p,numOfSteps:N,value:w,successIcon:m,errorIcon:l,onChange:_,onFocus:j}},o.createElement("nav",{className:F,style:z,dir:M,onKeyDown:A},o.createElement("ol",{className:L,style:B},H||r),o.createElement(Lt,{style:V,animation:{duration:D},"aria-hidden":!0,max:N-1,labelVisible:!1,orientation:f,reverse:"vertical"===f,value:w,disabled:s,tabIndex:-1})))}));Ht.propTypes={animationDuration:i.oneOfType([i.bool,i.number]),className:i.string,dir:i.string,disabled:i.bool,item:i.any,items:i.arrayOf(i.any),linear:i.bool,mode:i.oneOf(["steps","labels"]),orientation:i.oneOf(["horizontal","vertical"]),style:i.object,value:i.number.isRequired,onChange:i.func,onFocus:i.func};var Kt={value:0};Ht.defaultProps=Kt,Ht.displayName="KendoStepper";var Wt=o.forwardRef((function(e,t){Object(O.a)(x);var n=e.children,r=e.className,i=e.style,s=e.id,l=o.useRef(null),c=o.useCallback((function(){l.current&&Object(It.a)(l.current)}),[]),u=o.useCallback((function(){return{element:l.current,focus:c}}),[c]);o.useImperativeHandle(t,u);var d=o.useMemo((function(){return Object(y.a)()}),[]),p=o.useMemo((function(){return e.themeColor||$t.themeColor}),[e.themeColor]),f=o.useMemo((function(){return e.position||$t.position}),[e.position]),h=o.useMemo((function(){return e.positionMode||$t.positionMode}),[e.positionMode]),m=o.useMemo((function(){return Object(a.a)("k-appbar",{"k-appbar-top":"top"===f,"k-appbar-bottom":"bottom"===f,"k-appbar-static":"static"===h,"k-appbar-sticky":"sticky"===h,"k-appbar-fixed":"fixed"===h,"k-appbar-light":"light"===p,"k-appbar-dark":"dark"===p,"k-appbar-inherit":"inherit"===p},r)}),[f,h,p,r]);return o.createElement("div",{className:m,style:i,id:s||d},n)}));Wt.propTypes={children:i.any,className:i.string,style:i.object,id:i.string,themeColor:i.string,position:i.oneOf(["top","bottom"]),positionMode:i.oneOf(["static","sticky","fixed"])};var $t={themeColor:"light",position:"top",positionMode:"static"};Wt.displayName="KendoAppBar";var qt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&Object(It.a)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return Object(a.a)("k-appbar-section",r)}),[r]);return o.createElement("div",{className:u,style:i},n)}));qt.propTypes={children:i.any,className:i.string,style:i.object},qt.displayName="KendoAppBarSection";var Ut=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&Object(It.a)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return Object(a.a)("k-appbar-spacer",{"k-appbar-spacer-sized":i&&i.width&&null!==i.width},r)}),[r,i]),d=o.useMemo((function(){return{flexBasis:i&&i.width?i.width:void 0}}),[i]);return o.createElement("span",{className:u,style:d},n)}));Ut.propTypes={children:i.any,className:i.string,style:i.object},Ut.displayName="KendoAppBarSpacer";var Gt=n(37),Xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jt=function(){return(Jt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Yt=function(e){return o.createElement(Ue.a,{onPress:e.onPress,onDrag:function(t){e.onResize(t.event,!1,e.d)},onRelease:function(t){e.onResize(t.event,!0,e.d)}},o.createElement("div",{className:"k-resize-handle k-cursor-"+e.d+"-resize",style:Jt({bottom:0,right:0},e.style)}))},Zt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleResize=function(e,n,r){e.originalEvent.preventDefault(),t.props.onResize(e,{end:n,direction:r})},t}return Xt(t,e),t.prototype.render=function(){var e=this.props,t=e.resizable,n=e.onPress,r=e.rtl;return t?o.createElement(o.Fragment,null,"vertical"!==t&&o.createElement(Yt,{onPress:n,onResize:this.handleResize,d:"ew",style:r?{top:0,width:9,left:0,right:""}:{top:0,width:9,right:0,left:""}}),"horizontal"!==t&&o.createElement(Yt,{onPress:n,onResize:this.handleResize,d:"ns",style:{left:0,height:9}}),!0===t&&o.createElement(Yt,{onPress:n,onResize:this.handleResize,d:r?"nesw":"nwse",style:r?{width:9,height:9,right:"",left:0}:{width:9,height:9,right:0,left:""}})):null},t}(o.Component),Qt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(){return(en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={rtl:!1},t.oldSize={},t.draggable=null,t.dragging=!1,t.resizing=!1,t.element=null,t.ignoreDrag=!1,t.pressOffset={x:0,y:0},t.pressXY={x:0,y:0},t.currentTranslate={x:0,y:0},t.preventDataOps=void 0,t.handleResize=function(e,n){if(n.end)t.handleRelease();else if(t.element){var r=e.clientX,o=e.clientY;t.resizing=!0;var i=("ns"!==n.direction?r-t.pressXY.x:0)*(t.state.rtl?-1:1),a="ew"!==n.direction?o-t.pressXY.y:0;if(t.dragElement&&(t.state.rtl?t.dragElement.style.marginLeft=-i+"px":t.dragElement.style.marginRight=-i+"px",t.dragElement.style.height="calc(100% + "+a+"px)"),t.element.classList.add("k-layout-item-hint","k-layout-item-hint-resize"),!t.preventDataOps){var s=0,l=0,c=t.element.getBoundingClientRect();i>c.width/t.props.defaultPosition.colSpan/3&&(s=1),i<-c.width/t.props.defaultPosition.colSpan/1.25&&(s=-1),a>c.height/t.props.defaultPosition.rowSpan/3&&(l=1),a<-c.height/t.props.defaultPosition.rowSpan/1.25&&(l=-1),0===s&&0===l||t.props.update(t.props.index,0,0,l,s)}}},t.handlePress=function(e){if(t.reorderable&&t.dragElement)if(t.ignoreDrag=!1,t.props.ignoreDrag&&t.props.ignoreDrag(e.event.originalEvent))t.ignoreDrag=!0;else{t.element&&(t.element.style.zIndex="10",t.element.classList.add("k-layout-item-hint")),t.dragElement.classList.remove("k-cursor-grab"),t.dragElement.classList.add("k-cursor-grabbing");var n=t.dragElement.getBoundingClientRect();t.pressXY={x:e.event.clientX,y:e.event.clientY},t.pressOffset={x:e.event.clientX-n.x,y:e.event.clientY-n.y}}},t.handleDrag=function(e){if(t.reorderable&&!t.ignoreDrag){var n=t.dragElement;if(!e.event.originalEvent.defaultPrevented&&n){t.dragging=!0,e.event.originalEvent.preventDefault();var r=n.getBoundingClientRect();if(t.currentTranslate={x:e.event.clientX-r.x-t.pressOffset.x+t.currentTranslate.x,y:e.event.clientY-r.y-t.pressOffset.y+t.currentTranslate.y},n.style.transform="translate("+t.currentTranslate.x+"px, "+t.currentTranslate.y+"px)",n.style.transition="transform 0s",!t.preventDataOps){var o=0,i=0;t.currentTranslate.y>.7*r.height/t.props.defaultPosition.rowSpan&&(i=1),t.currentTranslate.y<.7*-r.height/t.props.defaultPosition.rowSpan&&(i=-1),t.currentTranslate.x>.7*r.width/t.props.defaultPosition.colSpan&&(o=1),t.currentTranslate.x<.7*-r.width/t.props.defaultPosition.colSpan&&(o=-1),t.props.update(t.props.index,i,t.state.rtl?-o:o,0,0)}}}},t.handleRelease=function(){if(t.reorderable){t.dragging=t.resizing=!1,t.currentTranslate={x:0,y:0},t.element&&(t.element.style.zIndex="1",t.element.classList.remove("k-layout-item-hint","k-layout-item-hint-resize"));var e=t.dragElement;e&&(e.style.transform="translate(0px, 0px)",e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",e.style.marginRight="0px",e.style.marginLeft="0px",e.style.height="100%",e.classList.remove("k-cursor-grabbing"),e.classList.add("k-cursor-grab"))}},t}return Qt(t,e),Object.defineProperty(t.prototype,"reorderable",{get:function(){return void 0!==this.props.reorderable?this.props.reorderable:t.defaultProps.reorderable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dragElement",{get:function(){return this.draggable?this.draggable.element:void 0},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.element&&"rtl"===getComputedStyle(this.element).direction&&this.setState({rtl:!0})},t.prototype.render=function(){var e=this;clearTimeout&&"function"==typeof clearTimeout&&(clearTimeout(this.preventDataOps),this.preventDataOps=window.setTimeout((function(){e.preventDataOps=void 0}),200));var n=this.props.defaultPosition,r=void 0!==this.props.resizable?this.props.resizable:t.defaultProps.resizable,i=en({gridColumnStart:n.col,gridColumnEnd:"span "+n.colSpan,gridRowStart:n.row,gridRowEnd:"span "+n.rowSpan,outline:"none",order:n.order},this.props.hintStyle),s=o.createElement("div",{ref:function(t){e.draggable=t?{element:t}:null},className:Object(a.a)("k-tilelayout-item k-card",{"k-cursor-grab":this.reorderable},this.props.className),style:en({height:"100%"},this.props.style)},this.props.children,o.createElement(Zt,{onPress:this.handlePress,onResize:this.handleResize,resizable:r,rtl:this.state.rtl}));return o.createElement("div",{ref:function(t){e.element=t},style:i,className:this.props.hintClassName},o.createElement(Ue.a,{ref:function(t){e.draggable=t},onDrag:this.handleDrag,onRelease:this.handleRelease,onPress:this.handlePress},s))},t.prototype.getSnapshotBeforeUpdate=function(e){return this.oldSize={},this.dragElement&&(this.oldSize=this.dragElement.getBoundingClientRect()),null},t.prototype.componentDidUpdate=function(e){var t=this,n=this.dragElement;if(n){var r=n.getBoundingClientRect(),o=this.oldSize;if(this.resizing){var i=r.width-o.width;if(this.state.rtl){var a=parseFloat(n.style.marginLeft||"0");n.style.marginLeft=a-i+"px"}else{a=parseFloat(n.style.marginRight||"0");n.style.marginRight=a+i+"px"}this.pressXY.x+=this.state.rtl?-i:i;var s=r.height-o.height,l=parseFloat(n.style.height.substring(12));n.style.height="calc(100% + "+(l+s)+"px)",this.pressXY.y+=s}var c=o.left-r.left,u=o.top-r.top;0===c&&0===u||(this.dragging?e.defaultPosition.order===this.props.defaultPosition.order&&e.defaultPosition.col===this.props.defaultPosition.col||(this.currentTranslate.x=0,this.currentTranslate.y=0,n.style.transform=""):Math.abs(u)<15&&Math.abs(c)<15||requestAnimationFrame((function(){var e=t.element;e&&(e.style.transform="translate("+c+"px, "+u+"px)",e.style.transition="transform 0s",requestAnimationFrame((function(){e.style.transform="",e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s"})))})))}},t.propTypes={defaultPosition:i.object.isRequired,style:i.object,className:i.string,hintStyle:i.object,hintClassName:i.string,header:i.any,body:i.any,item:i.any,resizable:i.oneOf(["horizontal","vertical",!0,!1]),reorderable:i.bool},t.displayName="KendoTileLayoutItem",t.defaultProps={resizable:!0,reorderable:!0},t}(o.Component),nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(){return(rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},on={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},an=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t.state={positions:(t.props.items||[]).map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))},t.focus=function(){t._element&&t._element.focus()},t.update=function(e,n,r,o,i){if(void 0===o&&(o=0),void 0===i&&(i=0),0!==n||0!==r||i||o){var a=!1,s=t.state.positions.map((function(e){return Object.assign({},e)})),l=s[e],c=s.find((function(e){return e.order===l.order+n}));c&&c!==l&&(l.order+=n,c.order+=-n,a=!0);var u=l.col+r;0!==r&&u>=1&&u+l.colSpan<=(t.props.columns||3)+1&&(l.col=u,a=!0);var d=l.colSpan+i;i&&d>=1&&d+l.col<=(t.props.columns||3)+1&&(l.colSpan=d,a=!0);var p=l.rowSpan+o;o&&p>=1&&(l.rowSpan=p,a=!0),a&&(t.setState({positions:s}),Object(X.a)(t.props.onReposition,{},t,{value:s}))}},t}return nn(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.positions?{positions:e.positions.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e)}))}:!e.items||t.positions&&e.items.length===t.positions.length?null:{positions:e.items.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.columns,i=void 0===r?3:r,s=t.columnWidth,l=void 0===s?"1fr":s,c=t.gap,u=t.rowHeight,d=void 0===u?"1fr":u,p=t.style,f=t.autoFlow,h=void 0===f?"column":f,m=t.items,v=void 0===m?[]:m,g=c?("number"==typeof c.rows?c.rows+"px":c.rows)+" "+("number"==typeof c.columns?c.columns+"px":c.columns):16,y=rn({gridTemplateColumns:"repeat("+i+", minmax(0px, "+("number"==typeof l?l+"px":l)+"))",gridAutoRows:"minmax(0px, "+("number"==typeof d?d+"px":d)+")",gap:g,padding:g},p);return o.createElement("div",{ref:function(t){e._element=t},dir:this.props.dir,className:Object(a.a)("k-tilelayout",on[h],n),style:y,id:this.props.id,children:v.map((function(t,n){return o.createElement(tn,{key:e.props.dataItemKey?Object(Gt.a)(e.props.dataItemKey)(t):n,update:e.update,defaultPosition:e.state.positions[n],index:n,resizable:t.resizable,reorderable:t.reorderable,style:t.style,className:t.className,hintClassName:t.hintClassName,hintStyle:t.hintStyle,ignoreDrag:e.props.ignoreDrag},t.item?t.item:o.createElement(o.Fragment,null,o.createElement("div",{className:"k-tilelayout-item-header k-card-header"},o.isValidElement(t.header)?t.header:o.createElement("h5",{className:"k-card-title"},t.header)),o.createElement("div",{className:"k-tilelayout-item-body k-card-body"},t.body)))}))})},t.propTypes={id:i.string,style:i.object,className:i.string,dir:i.string,gap:i.object,columns:i.number,columnWidth:i.oneOfType([i.number,i.string]),rowHeight:i.oneOfType([i.number,i.string]),dataItemKey:i.string,items:i.array,positions:i.array,autoFlow:i.oneOf(["column","row","column dense","row dense","unset"]),onReposition:i.func,ignoreDrag:i.func},t.displayName="KendoTileLayout",t}(o.Component),sn={primary:"k-bottom-nav-primary",secondary:"k-bottom-nav-secondary",tertiary:"k-bottom-nav-tertiary",info:"k-bottom-nav-info",success:"k-bottom-nav-success",warning:"k-bottom-nav-warning",error:"k-bottom-nav-error",dark:"k-bottom-nav-dark",light:"k-bottom-nav-light",inverse:"k-bottom-nav-inverse"},ln={flat:"k-bottom-nav-flat",solid:"k-bottom-nav-solid"},cn={vertical:"k-bottom-nav-item-flow-vertical",horizontal:"k-bottom-nav-item-flow-horizontal"},un={fixed:"k-pos-fixed",sticky:"k-pos-sticky"},dn=o.forwardRef((function(e,t){Object(O.a)(x);var n=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:n.current}}));var r=e.className,i=e.style,s=e.selected,l=e.disabled,c=e.item,u=e.render,d=e.dataItem,p=e.icon,f=e.text,h=e.id,m=e.onSelect,v=e.onKeyDown,g=e.index,y=e.tabIndex,b=o.useMemo((function(){return Object(a.a)("k-bottom-nav-item",{"k-selected":s,"k-disabled":l},r)}),[s,l,r]),k=o.useCallback((function(e){m&&void 0!==g&&!l&&m(e,g)}),[m,g,l]),w=o.useCallback((function(e){v&&void 0!==g&&!l&&v(e,g)}),[v,g,l]),C=u,S=c,E=o.createElement("span",{ref:n,className:b,style:i,role:"link",id:h,tabIndex:y,onClick:k,onKeyDown:w,"aria-selected":s,"aria-disabled":l},S?o.createElement(S,{itemIndex:g,item:d}):o.createElement(o.Fragment,null,p&&o.createElement("span",{className:"k-bottom-nav-item-icon k-icon k-i-"+p}),f&&o.createElement("span",{className:"k-bottom-nav-item-text",style:{userSelect:"none"}},f)));return void 0!==C?C.call(void 0,E,e):E}));dn.propTypes={className:i.string,style:i.object,id:i.string,disabled:i.bool,selected:i.bool,icon:i.string,text:i.string,tabIndex:i.number},dn.defaultProps={tabIndex:0},dn.displayName="KendoReactBottomNavigationItem";var pn=function(){return(pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fn=o.forwardRef((function(e,t){Object(O.a)(x);var n=o.useRef(null),r=o.useCallback((function(){n.current&&Object(It.a)(n.current)}),[]),i=o.useCallback((function(){return{element:n.current,focus:r}}),[r]);o.useImperativeHandle(t,i);var s=e.themeColor,l=void 0===s?hn.themeColor:s,c=e.fill,u=void 0===c?hn.fill:c,d=e.positionMode,p=void 0===d?hn.positionMode:d,f=e.itemFlow,h=void 0===f?hn.itemFlow:f,m=e.border,v=void 0===m?hn.border:m,g=e.className,b=e.items,k=e.item,w=e.itemRender,S=e.disabled,E=e.style,I=e.id,N=e.onSelect,T=e.onKeyDown,M=o.useMemo((function(){return Object(y.a)()}),[]),D=Object(Ct.a)(n,e.dir),P=o.useMemo((function(){return Object(a.a)("k-bottom-nav",un[p],sn[l],ln[u],cn[h],{"k-bottom-nav-border":v,"k-disabled":S},g)}),[p,l,u,h,v,S,g]),_=o.useCallback((function(e,t){b&&!b[t].disabled&&N&&Object(X.a)(N,e,i(),{itemTarget:b[t],itemIndex:t})}),[b,N]),j=o.useCallback((function(e,t){_(e,t)}),[_]),R=o.useCallback((function(e,t){switch(e.keyCode){case C.a.enter:case C.a.space:_(e,t),e.preventDefault()}Object(X.a)(T,e,i(),void 0)}),[_,T]);return o.createElement("nav",{ref:n,className:P,style:E,id:I||M,dir:D},b&&b.map((function(e,t){return o.createElement(dn,pn({},e,{key:t,index:t,id:(I||M)+"-"+t,disabled:S||e.disabled,selected:e.selected,dataItem:e,item:k,render:w,onSelect:j,onKeyDown:R}))})))})),hn={themeColor:"primary",fill:"flat",itemFlow:"vertical",positionMode:"fixed",border:!0};fn.propTypes={className:i.string,style:i.object,id:i.string,dir:i.string,themeColor:i.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),fill:i.oneOf(["solid","flat"]),itemFlow:i.oneOf(["vertical","horizontal"]),border:i.bool,disabled:i.bool,selected:i.number,onSelect:i.func},fn.defaultProps=hn,fn.displayName="KendoReactBottomNavigation";var mn=n(8),vn=function(){return(vn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},gn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=o.useMemo((function(){return Object(y.a)()}),[]),d=o.useMemo((function(){return e.orientation||yn.orientation}),[e.orientation]),p="horizontal"===d,f=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:yn.hAlign}),[e.align]),h=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:yn.vAlign}),[e.align]),m=o.useMemo((function(){return Object(a.a)("k-stack-layout",{"k-hstack":"horizontal"===d,"k-vstack":"vertical"===d,"k-justify-content-start":p&&"start"===f||!p&&"top"===h,"k-justify-content-center":p&&"center"===f||!p&&"middle"===h,"k-justify-content-end":p&&"end"===f||!p&&"bottom"===h,"k-justify-content-stretch":p&&"stretch"===f||!p&&"stretch"===h,"k-align-items-start":!p&&"start"===f||p&&"top"===h,"k-align-items-center":!p&&"center"===f||p&&"middle"===h,"k-align-items-end":!p&&"end"===f||p&&"bottom"===h,"k-align-items-stretch":!p&&"stretch"===f||p&&"stretch"===h},i)}),[d,p,f,h,i]),v=vn({gap:""+("number"==typeof e.gap?e.gap+"px":e.gap)},s);return o.createElement("div",{ref:n,className:m,style:v,id:l||u},c)})),yn={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};gn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,orientation:i.oneOf(["horizontal","vertical"]),gap:i.oneOfType([i.string,i.number]),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},gn.defaultProps=yn,gn.displayName="KendoReactStackLayout";var bn=function(){return(bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},kn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=e.gap,d=o.useMemo((function(){return Object(y.a)()}),[]),p=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:wn.hAlign}),[e.align]),f=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:wn.vAlign}),[e.align]),h=o.useMemo((function(){return Object(a.a)("k-grid-layout",{"k-justify-items-start":"start"===p,"k-justify-items-center":"center"===p,"k-justify-items-end":"end"===p,"k-justify-items-stretch":"stretch"===p,"k-align-items-start":"top"===f,"k-align-items-center":"middle"===f,"k-align-items-end":"bottom"===f,"k-align-items-stretch":"stretch"===f},i)}),[p,f,i]),m=u?("number"==typeof u.rows?u.rows+"px":u.rows)+" "+("number"==typeof u.cols?u.cols+"px":u.cols):void 0,v=e.rows&&e.rows.map((function(e){return""+("number"==typeof e.height?e.height+"px":e.height)})).join(" "),g=e.cols&&e.cols.map((function(e){return""+("number"==typeof e.width?e.width+"px":e.width)})).join(" "),b=bn({gap:m,gridTemplateColumns:g,gridTemplateRows:v},s);return o.createElement("div",{ref:n,className:h,style:b,id:l||d},c)})),wn={hAlign:"stretch",vAlign:"stretch",gap:void 0};kn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,gap:i.shape({rows:i.oneOfType([i.string,i.number]),columns:i.oneOfType([i.string,i.number])}),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},kn.defaultProps=wn,kn.displayName="KendoReactGridLayout";var Cn=function(){return(Cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},On=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,a=e.style,s=e.id,l=e.children,c=e.row,u=e.col,d=e.rowSpan,p=e.colSpan,f=o.useMemo((function(){return Object(y.a)()}),[]),h=Cn({gridArea:(c||"auto")+" / "+(u||"auto")+" / "+(d?"span "+d:"auto")+" / "+(p?"span "+p:"auto")},a);return o.createElement("div",{ref:n,className:i,style:h,id:s||f},l)}));On.propTypes={className:i.string,style:i.object,children:i.any,id:i.string},On.displayName="KendoReactGridLayoutItem";var xn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);return o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("li",{ref:r,id:e.id,style:e.style,className:Object(a.a)("k-flex-none k-breadcrumb-item",e.className)},e.children)})),Sn={id:i.string,className:i.string,children:i.any,style:i.object};xn.displayName="KendoReactBreadcrumbListItem",xn.propTypes=Sn;var En=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("span",{ref:r,id:e.id,tabIndex:e.tabIndex,style:e.style,className:Object(a.a)("k-icon k-i-arrow-chevron-right k-breadcrumb-delimiter-icon",e.className)})})),In={id:i.string,className:i.string,style:i.object,tabIndex:i.number};En.displayName="KendoReactBreadcrumbDelimiter",En.propTypes=In;var Nn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var s=o.useCallback((function(t){e.id&&Object(X.a)(e.onItemSelect,t,t.target,{id:e.id})}),[e.onItemSelect]),l=o.useCallback((function(t){e.id&&Object(X.a)(e.onKeyDown,t,t.target,{id:e.id})}),[e.onKeyDown]);return o.createElement("span",{"aria-current":e.ariaCurrent?e.ariaCurrent:e.isLast,id:e.id,ref:r,style:e.style,dir:Object(Ct.a)(r,e.dir),tabIndex:Object(ht.a)(e.tabIndex,e.disabled),className:Object(a.a)("k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link",{"k-disabled":e.disabled}),onClick:s,onKeyDown:l},e.iconClass?o.createElement("span",{className:Object(a.a)("k-icon",e.iconClass)}):e.icon?e.icon:"",e.text)})),Tn={id:i.string,className:i.string,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool,text:i.string,icon:i.node,iconClass:i.string,onClick:i.func,ariaCurrent:i.bool};Nn.displayName="KendoReactBreadcrumbLink",Nn.propTypes=Tn;var Mn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("ol",{id:e.id,ref:r,style:e.style,dir:Object(Ct.a)(r,e.dir),tabIndex:Object(ht.a)(e.tabIndex,e.disabled),className:Object(a.a)("k-breadcrumb-container k-flex-wrap",{"k-disabled":e.disabled},e.className)},e.children)})),Dn={id:i.string,className:i.string,children:i.element,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool};Mn.displayName="KendoReactBreadcrumbOrderedList",Mn.propTypes=Dn;var Pn=function(){return(Pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_n=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useMemo((function(){return e.breadcrumbOrderedList||Mn}),[e.breadcrumbOrderedList]),s=o.useMemo((function(){return e.breadcrumbListItem||xn}),[e.breadcrumbListItem]),l=o.useMemo((function(){return e.breadcrumbDelimiter||En}),[e.breadcrumbDelimiter]),c=o.useMemo((function(){return e.breadcrumbLink||Nn}),[e.breadcrumbLink]),u=o.useCallback((function(){r.current&&r.current.focus()}),[r]),d=o.useMemo((function(){return e.disabled||!1}),[e.disabled]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:u,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var p=Object(Ct.a)(r,e.dir),f=function(t){n.current&&Object(X.a)(e.onItemSelect,t,t.target,{id:t.target.id})},h=function(t){n.current&&Object(X.a)(e.onKeyDown,t,t.target,{id:t.target.id})};return o.createElement("nav",{"aria-label":e.ariaLabel,id:e.id,style:e.style,ref:r,dir:p,className:Object(a.a)("k-breadcrumb",{"k-rtl":"rtl"===p,"k-disabled":d},e.className)},o.createElement(i,null,o.createElement(o.Fragment,null,Object.keys(e.data).map((function(t){return o.createElement(s,{key:e.data[t][e.valueField||Rn.valueField]},"0"!==t&&o.createElement(l,null),o.createElement(c,Pn({isLast:e.data.length-1===Number(t),id:e.data[t][e.valueField||Rn.valueField],icon:e.data[t][e.iconField||Rn.iconField],iconClass:e.data[t][e.iconClassField||Rn.iconClassField],text:e.data[t][e.textField||Rn.textField],disabled:e.data[t].disabled||!1,onItemSelect:f,onKeyDown:h},e)))})))))})),jn={id:i.string,style:i.object,className:i.string,breadcrumbOrderedList:i.elementType,breadcrumbListItem:i.elementType,breadcrumbDelimiter:i.elementType,breadcrumbLink:i.elementType,data:i.arrayOf(i.shape({id:i.string,text:i.string,icon:i.any,iconClass:i.string})),dir:i.oneOf(["ltr","rtl"]),disabled:i.bool,valueField:i.string,textField:i.string,iconField:i.string,iconClassField:i.string,onItemSelect:i.func,ariaLabel:i.string},Rn={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass"};_n.displayName="KendoReactBreadcrumb",_n.propTypes=jn,_n.defaultProps=Rn;var An=n(32),Fn=o.forwardRef((function(e,t){var n;Object(O.a)(x);var r=o.useRef(null),i=o.useState(!1),s=i[0],l=i[1],c=o.useCallback((function(){return{element:r.current}}),[]);o.useImperativeHandle(t,c);var u=e.expanded,d=void 0!==u&&u,p=e.disabled,f=e.title,h=e.subtitle,m=e.onAction,v=e.expandIcon,g=e.collapseIcon,y=o.useCallback((function(e){Object(X.a)(m,e,c(),{expanded:d})}),[m,d]),b=o.useCallback((function(e){e.keyCode!==C.a.enter&&e.keyCode!==C.a.space||Object(X.a)(m,e,c(),{expanded:d})}),[m,d]),k=o.useCallback((function(){e.disabled||l(!0)}),[e.disabled]),w=o.useCallback((function(){e.disabled||l(!1)}),[e.disabled]),S=Object(An.a)({onFocus:k,onBlur:w}),E=S.onFocus,I=S.onBlur;return o.createElement("div",{ref:r,className:Object(a.a)("k-expander",e.className,{"k-expanded":d,"k-focus":s&&!p,"k-disabled":p}),onFocus:E,onBlur:I,style:e.style,id:e.id,"aria-expanded":d,"aria-disabled":p,dir:Object(Nt.a)(r,e.dir),tabIndex:Object(ht.a)(e.tabIndex,p),onKeyDown:p?void 0:b},o.createElement("div",{className:"k-expander-header",onClick:p?void 0:y},void 0!==f?o.createElement("div",{className:"k-expander-title"},f):void 0,o.createElement("span",{className:"k-spacer"}),void 0!==h?o.createElement("div",{className:"k-expander-sub-title"},h):void 0,o.createElement("span",{className:"k-expander-indicator"},o.createElement("span",{className:Object(a.a)((n={},n[String(v)]=Boolean(!d&&v),n["k-icon k-i-arrow-chevron-down"]=!d&&!v,n[String(g)]=Boolean(d&&g),n["k-icon k-i-arrow-chevron-up"]=d&&!g,n))}))),e.children)}));Fn.propTypes={children:i.node,className:i.string,style:i.object,dir:i.string,id:i.string,tabIndex:i.number,title:i.node,subtitle:i.node,expandIcon:i.string,collapseIcon:i.string,expanded:i.bool,disabled:i.bool,onAction:i.func},Fn.displayName="KendoReactExpansionPanel";var zn=function(){return(zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ln=o.forwardRef((function(e,t){return o.createElement("div",zn({ref:t},e,{className:Object(a.a)("k-expander-content-wrapper",e.className)}),o.createElement("div",{className:"k-expander-content"},e.children))}));Ln.displayName="KendoReactExpansionPanelContent"},function(e,t,n){"use strict";n.r(t),n.d(t,"ColorGradient",(function(){return Be})),n.d(t,"ColorGradientPropsContext",(function(){return Le})),n.d(t,"ColorPalette",(function(){return qe})),n.d(t,"ColorPalettePropsContext",(function(){return $e})),n.d(t,"ColorPickerPropsContext",(function(){return Qe})),n.d(t,"ColorPicker",(function(){return et})),n.d(t,"FlatColorPicker",(function(){return ot})),n.d(t,"Input",(function(){return ke})),n.d(t,"InputPropsContext",(function(){return be})),n.d(t,"MaskedTextBox",(function(){return xt})),n.d(t,"MaskedTextBoxPropsContext",(function(){return Ot})),n.d(t,"NumericTextBoxPropsContext",(function(){return fe})),n.d(t,"NumericTextBox",(function(){return he})),n.d(t,"Slider",(function(){return N})),n.d(t,"SliderPropsContext",(function(){return I})),n.d(t,"SLIDER_LABEL_ATTRIBUTE",(function(){return w})),n.d(t,"SliderLabel",(function(){return C})),n.d(t,"RangeSliderPropsContext",(function(){return Mt})),n.d(t,"RangeSlider",(function(){return Dt})),n.d(t,"Switch",(function(){return Lt})),n.d(t,"SwitchPropsContext",(function(){return zt})),n.d(t,"CheckboxPropsContext",(function(){return Ht})),n.d(t,"Checkbox",(function(){return Kt})),n.d(t,"RadioGroupPropsContext",(function(){return Jt})),n.d(t,"RadioGroup",(function(){return Yt})),n.d(t,"RadioButtonPropsContext",(function(){return qt})),n.d(t,"RadioButton",(function(){return Ut})),n.d(t,"TextAreaPropsContext",(function(){return tn})),n.d(t,"TextArea",(function(){return nn})),n.d(t,"RatingPropsContext",(function(){return hn})),n.d(t,"Rating",(function(){return mn})),n.d(t,"RatingItem",(function(){return rn}));var r,o,i=n(0),a=n(1),s=n(55),l=n(52),c=n(10),u=n(39),d=n(60),p=n(58),f=n(21),h={name:"@progress/kendo-react-inputs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189121,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},m=n(26),v=n(53),g=n(3),y=((r={})["numerictextbox.increment"]="Increase value",r["numerictextbox.decrement"]="Decrease value",r["slider.increment"]="Increase",r["slider.decrement"]="Decrease",r["slider.dragTitle"]="Drag",r["colorGradient.r"]="r",r["colorGradient.g"]="g",r["colorGradient.b"]="b",r["colorGradient.a"]="a",r["colorGradient.hex"]="hex",r["colorGradient.contrastRatio"]="Contrast ratio",r["colorGradient.colorGradientAALevel"]="AA",r["colorGradient.colorGradientAAALevel"]="AAA",r["colorGradient.colorGradientPass"]="Pass",r["colorGradient.colorGradientFail"]="Fail",r["flatColorPicker.cancelBtn"]="Cancel",r["flatColorPicker.applyBtn"]="Apply",r["checkbox.validation"]="Please check this box if you want to proceed!",r["checkbox.optionalText"]="(Optional)",r["radioButton.validation"]="Please select option if you want to proceed!",r["switch.validation"]="Please turn on if you want to proceed!",r["colorPicker.dropdownButtonAriaLabel"]="Select",r),b=n(35),k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},w="data-slider-label",C=function(e){var t,n,r=i.useRef(null),o=Object(b.a)(r),a=e.vertical?{bottom:e.position+"%",height:"1px",width:"100%"}:((t={})["rtl"===o?"right":"left"]=e.position+"%",t.width="1px",t.height="-webkit-fill-available",t);return i.createElement("li",{ref:r,role:"presentation",className:"k-tick k-tick-large",title:e.title,style:k({zIndex:1,position:"absolute"},a)},i.createElement("span",k({},((n={})[w]=!0,n),{className:"k-label",onClick:e.onClick}),e.children))},O=n(50),x=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},E=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:void 0===n.props.defaultValue?n.props.min:n.props.defaultValue,focused:!1,dir:n.props.dir},n.buttons=function(e){return e.enabled?i.createElement(i.Fragment,null,i.createElement(O.a,{className:"k-button-decrease k-rounded-full",icon:n.props.vertical?"arrow-s":"arrow-w",title:e.decrementTitle,onClick:e.decrement}),e.children,i.createElement(O.a,{className:"k-button-increase k-rounded-full",icon:n.props.vertical?"arrow-n":"arrow-e",title:e.incrementTitle,onClick:e.increment})):e.children},n.focus=function(){n._element&&n._element.focus()},n.isLabel=function(e){for(var t=e;t;){if(Boolean(t.getAttribute(w)))return!0;t=t.parentElement}return!1},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onKeyDown=function(e){var t=void 0;e.keyCode===m.a.left||e.keyCode===m.a.down?t=n.state.value-(n.props.step||0):e.keyCode===m.a.right||e.keyCode===m.a.up?t=n.state.value+(n.props.step||0):e.keyCode===m.a.home?t=n.props.min:e.keyCode===m.a.end&&(t=n.props.max),void 0!==t&&(e.preventDefault(),n.change(e,t))},n.decrement=function(e){e.preventDefault(),n.change(e,n.state.value-(n.props.step||0))},n.increment=function(e){e.preventDefault(),n.change(e,n.state.value+(n.props.step||0))},n.dragStart=function(e){n.isLabel(e.event.originalEvent.target)||(e.event.isTouch&&e.event.originalEvent.preventDefault(),n.drag(e))},n.dragOver=function(e){e.event.originalEvent.preventDefault(),n.drag(e)},n.drag=function(e){var t=e.element.getBoundingClientRect(),r=(n.props.vertical?t.bottom-e.event.clientY:"rtl"===n.state.dir?t.right-e.event.clientX:e.event.clientX-t.left)/(n.props.vertical?t.height:t.width);n.change(e,n.props.min+r*(n.props.max-n.props.min))},Object(f.a)(h),n}return x(t,e),t.getDerivedStateFromProps=function(e,t){var n=void 0!==e.value?e.value:t.value,r=e.min,o=e.max;return void 0===n?null:{value:Math.min(Math.max(n,r),o)}},t.prototype.componentDidMount=function(){if(!this.state.dir&&window&&this._element){var e=window.getComputedStyle(this._element).direction;e&&this.setState({dir:e})}},t.prototype.render=function(){var e,t=this,n=Object(g.provideLocalizationService)(this),r=(this.state.value-this.props.min)/(this.props.max-this.props.min)*100,o=this.props.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},a=this.props.vertical?{paddingTop:0,height:"100%"}:{};return i.createElement("div",{ref:function(e){return t._element=e},"aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":this.state.value,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,dir:this.state.dir,role:"slider",id:this.props.id,style:S({gap:0},this.props.style),tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled,void 0),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,className:Object(c.a)("k-slider k-widget",{"k-focus":this.state.focused,"k-disabled":this.props.disabled,"k-slider-horizontal":!this.props.vertical,"k-slider-vertical":this.props.vertical},this.props.className)},i.createElement(this.buttons,{enabled:this.props.buttons,decrement:this.decrement,increment:this.increment,incrementTitle:n.toLanguageString("slider.increment",y["slider.increment"]),decrementTitle:n.toLanguageString("slider.decrement",y["slider.decrement"])},i.createElement(d.a,{onDrag:this.dragOver,onPress:this.dragStart},i.createElement("div",{className:"k-slider-track-wrap",style:S({flexGrow:1,position:"relative",touchAction:"none"},o)},this.props.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:S({margin:0},a)},i.Children.map(this.props.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-t.props.min)/(t.props.max-t.props.min),vertical:t.props.vertical},e.props.children)}))),i.createElement("div",{className:"k-slider-track",style:this.props.vertical?{bottom:0,height:"100%"}:(e={},e["rtl"===this.state.dir?"right":"left"]=0,e.width="100%",e),ref:function(e){return t._sliderTrack=e}},i.createElement("div",{className:"k-slider-selection",style:this.props.vertical?{height:r+"%"}:{width:r+"%"}}),i.createElement("a",{className:"k-draghandle",title:n.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:this.props.vertical?{bottom:"calc("+r+"%)",zIndex:1}:"rtl"===this.state.dir?{right:"calc("+r+"% - 13px)",zIndex:1}:{left:"calc("+r+"%)",zIndex:1}}))))))},Object.defineProperty(t.prototype,"sliderTrack",{get:function(){return this._sliderTrack},enumerable:!0,configurable:!0}),t.prototype.change=function(e,t){t=Math.min(Math.max(t,this.props.min),this.props.max),this.setState({value:t}),Object(v.a)(this.props.onChange,e,this,{value:t})},t.displayName="Slider",t.propTypes={min:a.number.isRequired,max:a.number.isRequired,value:a.number,vertical:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t}(i.Component),I=Object(p.a)(),N=Object(p.b)(I,E);N.displayName="KendoReactSlider",Object(g.registerForLocalization)(E);var T=function(e){return null!=e},M=function(e,t,n){return!T(e)||isNaN(e)||e<=t?t:e>=n?n:e},D=n(12),P=function(e,t,n){void 0===n&&(n=!0);if(-1===["hex","rgba"].indexOf(t))throw new Error("Unsupported color output format '"+t+"'. The available options are 'hex' or 'rgba'.");if(T(e)){var r=Object(D.parseColor)(e.trim(),n);if(T(r))return"hex"===t?r.toCss():r.toCssRgba()}},_=function(e,t){void 0===t&&(t=!0);var n=Object(D.parseColor)(e,t);return T(n)?n.toHSV():{}},j=function(e,t){void 0===t&&(t=!0);var n=Object(D.parseColor)(e,t);return T(n)?n.toBytes():{}},R=function(e){var t=M(e.h,0,359.9),n=M(e.s,0,1),r=M(e.v,0,1),o=M(e.a,0,1);return D.Color.fromHSV(t,n,r,o).toCssRgba()},A=function(e){return R({h:e,s:1,v:1,a:1})},F=function(e,t){var n=M(e.r,0,255),r=M(e.g,0,255),o=M(e.b,0,255),i=M(e.a,0,1),a=M(t.r,0,255),s=M(t.g,0,255),l=M(t.b,0,255);return{r:Math.round((1-i)*a+i*n),g:Math.round((1-i)*s+i*r),b:Math.round((1-i)*l+i*o)}},z=function(e){var t=[e.r,e.g,e.b].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]},L=function(e,t){return n=z(F(e,t)),r=z(F(t,{r:0,g:0,b:0,a:1})),(Math.max(n,r)+.05)/(Math.min(n,r)+.05);var n,r},B={};var V=n(33),H=n(22),K=n(107),W=function(){return(W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$=/\d/,q=function(e,t){return void 0!==e?e:t},U=function(e,t,n){return null===e&&void 0===e?"":"string"==typeof e?e:n.formatNumber(e,t)},G=function(e){return(String(e).split(".")[1]||"").length},X=function(e,t){return Math.max(G(e),G(t))},J=function(e,t){var n=function(e){return Math.min(e,15)}(t);return parseFloat(e.toFixed(n))},Y=function(e,t,n,r,o,i,a){var s=X(e||0,n||0),l=Q(J((e||0)+(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=U(l,i,a),t.selectionStart=t.selectionEnd=ie(t.currentLooseValue,$)},Z=function(e,t,n,r,o,i,a){var s=X(e||0,n||0),l=Q(J((e||0)-(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=U(l,i,a),t.selectionStart=t.selectionEnd=ie(t.currentLooseValue,$)},Q=function(e,t,n){return null==e?e:e>1||e<1||1===e?void 0!==n&&void 0!==t&&n<t?null:(void 0!==n&&e>n&&(e=n),void 0!==t&&e<t&&(e=t),e):null},ee=function(e,t,n){var r=function(e,t){var n=t.findIndex((function(t){t[0];var n=t[1];return Boolean(n)&&e.indexOf(n)===e.length-n.length}));if(-1===n)return-1;var r=t[n][1];return e.length-r.length}(e,t);if(-1!==r&&n.selectionStart>r)n.selectionStart=n.selectionEnd=r;else{n.selectionStart>e.length&&(n.selectionStart=n.selectionEnd=e.length);var o=function(e,t){var n=t.findIndex((function(t){var n=t[0];t[1];return Boolean(n)&&0===e.indexOf(n)}));return-1===n?-1:t[n][0].length}(e,t);-1!==o&&n.selectionStart<o&&(n.selectionStart=n.selectionEnd=o),-1===n.selectionStart&&(n.selectionStart=n.selectionEnd=0)}},te=function(e,t,n,r){e.selectionStart=e.selectionEnd=t,ee(n,r,e)},ne=function(e,t,n,r){e.eventValue=r.parseNumber(e.prevLooseValue,t),e.currentLooseValue=e.prevLooseValue,e.valueIsCorrected=!0,te(e,e.selectionStart,e.currentLooseValue,n)},re=function(e,t){var n=e.indexOf(t.decimal);return n>-1?n:ie(e,$)},oe=function(e){return e.split("").reverse().join("")},ie=function(e,t){return e.length-oe(e).search(t)},ae=function(e){return e.split(e[e.search($)])[0]},se=function(e){var t=oe(e);return oe(t.split(t[t.search($)])[0])},le=function(e,t){return e.search(t)},ce=function(e,t){var n=e.indexOf(t);return n>-1?e.length-n-1:0},ue=function(e,t,n,r,o){var i="0"===e.replace(o,"")[0],a="0"===t.replace(o,"")[0];if(i&&!a)return n-1;if(a&&r)return n+1;for(var s=0,l=0;l<n;l++)$.test(e.charAt(l))&&s++;for(var c=0;s>0&&t.length>c;)$.test(t.charAt(c))&&s--,c++;return c},de=function(e,t,n){var r=W({},e),o=r.prevLooseValue,i=n.numberSymbols(),a=function(e,t){var n=t.formatNumber(1111111.1111111,e),r=t.formatNumber(-1111111.1111111,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=t.numberSymbols(),s=new RegExp("[\\d\\"+a.decimal+a.group+"]","g");return[n,r,o,i].map((function(e){return e.replace(s,"")})).join("").split("").filter((function(e,t,n){return n.indexOf(e)===t})).join("")}(t,n),s=String(r.currentLooseValue),l=String(o),c=new RegExp("[^\\d\\"+i.decimal+"]","g"),u=new RegExp("[^\\d\\"+i.decimal+"\\"+i.group+"]","g"),d=new RegExp("[\\d\\"+i.decimal+"\\"+i.group+"]"),p=s.replace(c,""),f=le(s,$),h=-1===f?-1:ie(s,$),m=s.indexOf(i.decimal),v=(s.substring(0,f)+s.substring(f,h).replace(u,"")+s.substring(h,s.length)).split("").filter((function(e){return-1!==a.indexOf(e)||-1!==e.search(d)})).join(""),g=n.formatNumber(.31111111111111117,t).replace(c,""),y=g.indexOf(i.decimal),b=y>-1?g.length-y-1:0,k=n.formatNumber(1,t).replace(c,""),w=k.indexOf(i.decimal),C=w>-1?k.length-w-1:0,O=function(e,t){var n=t.formatNumber(1111111.1111111,e),r=t.formatNumber(-1111111.1111111,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=ae(n),s=ae(r),l=ae(o),c=ae(i);return{positiveInfo:[a,se(n)],negativeInfo:[s,se(r)],zeroInfo:[l,se(o)],oneInfo:[c,se(i)]}}(t,n),x=[O.positiveInfo,O.negativeInfo,O.zeroInfo,O.oneInfo],S=1!==x.findIndex((function(e){return-1!==e.findIndex((function(e){return Boolean(e)}))})),E=s.length>0&&s.length<l.length,I=t&&"p"===t[0]&&s&&-1===s.indexOf(i.percentSign);if(!r.isPaste){if(""===s)return r.eventValue=null,r.currentLooseValue="",r;if(r.currentLooseValue===i.minusSign&&n.formatNumber(-0,t)!==l)return r.eventValue=-0,r.currentLooseValue=U(r.eventValue,t,n),te(r,re(r.currentLooseValue,i),r.currentLooseValue,x),r;if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return n.split(t.minusSign).length!==r.split(t.minusSign).length&&n.length===r.length+t.minusSign.length}(r,i)){var N=n.parseNumber(o,t);r.eventValue=-(null!==N?N:0),r.currentLooseValue=U(r.eventValue,t,n);var T=le(r.currentLooseValue,$),M=le(l,$);return te(r,r.selectionEnd-1+(T-M),r.currentLooseValue,x),r}if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return-1===n.indexOf(t.minusSign)&&-1!==r.indexOf(t.minusSign)}(r,i))return r.eventValue=n.parseNumber(r.currentLooseValue,t),te(r,r.selectionStart,r.currentLooseValue,x),r;if(r.currentLooseValue===i.decimal){r.eventValue=0;var D=U(r.eventValue,t,n);if(0===C&&b>0){var P=ie(D,$);r.currentLooseValue=D.substring(0,P)+i.decimal+D.substring(P)}else r.currentLooseValue=D;return te(r,re(r.currentLooseValue,i)+1,r.currentLooseValue,x),r}if(function(e,t){return String(e.currentLooseValue).split(t.decimal).length>2}(r,i))return ne(r,t,x,n),r;if(I)return r.eventValue=n.parseNumber(s,t)/100,r.currentLooseValue=U(r.eventValue,t,n),r;if(String(r.currentLooseValue).replace(/[^\d]/g,"").length>15)return ne(r,t,x,n),r;if(p!==s&&s&&S)if(-1===x.findIndex((function(e){var t=e[0],n=e[1],r=s.indexOf(t),o=s.indexOf(n),a=0===r,l=o===s.length-n.length,c=r+t.length!==f&&-1!==f&&s[r+t.length]!==i.decimal,u=o!==h&&-1!==h&&s[o-1]!==i.decimal;return t&&n?!c&&!u&&(a&&l):t?!c&&a:!!n&&(!u&&l)})))return ne(r,t,x,n),r;if(p[p.length-1]===i.decimal&&b>0)return r.eventValue=n.parseNumber(s,t),r.currentLooseValue=v,r;if(r.currentLooseValue&&o)if((a+i.decimal+i.group).split("").findIndex((function(e){return s.split("").filter((function(t){return t===e})).length<l.split("").filter((function(t){return t===e})).length&&s.length+1===l.length&&(e!==i.decimal||0!==ce(l.replace(c,""),i.decimal))}))>-1)return r.eventValue=n.parseNumber(e.prevLooseValue,t),r.currentLooseValue=e.prevLooseValue,r;var _=ce(p,i.decimal),j="0"===p[p.length-1];if(E&&j&&_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=U(r.eventValue,t,n),r;if(_>0){var R=s.substring(0,m);if(j&&(!R||0!==l.indexOf(R))){r.eventValue=n.parseNumber(r.currentLooseValue,t);var A=U(r.eventValue,t,n);return te(r,ue(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A,r}if(_>b){var F=s.indexOf(i.decimal),z=s.substring(0,F)+s.substring(F,F+1+b)+s.substring(h,String(r.currentLooseValue).length);return r.eventValue=n.parseNumber(z,t),r.currentLooseValue=z,te(r,r.selectionStart,z,x),r}if(C!==b&&_<=b&&j)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=v,r;if(_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=U(r.eventValue,t,n),r}}if(r.eventValue=n.parseNumber(r.currentLooseValue,t),I&&(r.eventValue=r.eventValue/100),"number"==typeof r.eventValue){A=U(r.eventValue,t,n);1===s.length?te(r,re(A,i),A,x):te(r,ue(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A}else r.currentLooseValue=U(n.parseNumber(p),t,n);return r},pe=function(){return(pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fe=Object(p.a)(),he=i.forwardRef((function(e,t){var n;Object(f.a)(h);var r=Object(V.a)(fe,e),o=i.useMemo((function(){return Object(l.a)()}),[]),a=r.id||o,s=Object(g.useInternationalization)(),d=Object(g.useLocalization)(),p=i.useRef(null),m=i.useRef(),b=i.useState(!1),k=b[0],w=b[1],C=i.useRef({eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1}),x=i.useRef(!1),S=i.useRef(),E=i.useRef(r.defaultValue),I=U(C.current.focused&&!r.disabled?C.current.currentLooseValue:q(r.value,E.current),r.format,s);S.current=I,i.useEffect((function(){p.current&&p.current.setCustomValidity&&p.current.setCustomValidity(P().valid?"":r.validationMessage||"Please enter a valid value!")}));var N=i.useCallback((function(){p.current&&p.current.focus()}),[]),T=i.useCallback((function(){return void 0!==m.current?m.current:q(r.value,E.current)}),[r.value]),M=i.useCallback((function(){return r.name}),[r.name]),D=i.useCallback((function(){return r.required}),[r.required]),P=i.useCallback((function(){var e=void 0!==r.validationMessage,t=T();return{customError:e,valid:void 0!==r.valid?r.valid:!(C.current.valueIsOutOfRange||D()&&null==t),valueMissing:null==t}}),[r.validationMessage,r.valid,T,D]),_=i.useCallback((function(){return r.validityStyles}),[r.validityStyles]),j=i.useCallback((function(){return r}),[r]),R=i.useCallback((function(){var e={element:p.current,focus:N};return Object.defineProperty(e,"name",{get:M}),Object.defineProperty(e,"value",{get:T}),Object.defineProperty(e,"validity",{get:P}),Object.defineProperty(e,"validityStyles",{get:_}),Object.defineProperty(e,"required",{get:D}),Object.defineProperty(e,"props",{get:j}),e}),[M,T,P,_,D,N,j]);i.useImperativeHandle(t,R);var A=i.useCallback((function(){return{eventValue:q(r.value,E.current),prevLooseValue:S.current,currentLooseValue:p.current.value,selectionStart:p.current.selectionStart,selectionEnd:p.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:x.current,focused:C.current.focused}}),[r.value]),F=i.useCallback((function(e,t){if(!r.disabled){m.current=t.eventValue,E.current=t.eventValue;var n=U(Q(t.eventValue,r.min,r.max),r.format,s),o=Q(s.parseNumber(n,r.format),r.min,r.max);o!==t.eventValue&&(t.valueIsOutOfRange=!0,t.eventValue=o,E.current=o),r.value!==t.eventValue&&Object(v.a)(r.onChange,e,R(),{value:t.eventValue}),m.current=void 0,C.current=t,w((function(e){return!e}))}}),[r.value,r.onChange,r.disabled,w,R]),z=i.useCallback((function(e){var t=A();x.current=!1,F(e,de(t,r.format,s))}),[r.format,r.onChange,s,F,A]),L=i.useCallback((function(e){var t=A(),n=s.parseNumber(String(t.currentLooseValue),r.format);if(t.selectionEnd>t.selectionStart&&t.selectionEnd-t.selectionStart===String(t.currentLooseValue).length)x.current=!0;else{switch(e.keyCode){case 38:Y(n,t,r.step,r.min,r.max,r.format,s);break;case 40:Z(n,t,r.step,r.min,r.max,r.format,s);break;case 13:if(!1===r.rangeOnEnter)return;var o=U(Q(n,r.min,r.max),r.format,s),i=Q(s.parseNumber(o,r.format),r.min,r.max);t.eventValue=i,t.currentLooseValue=U(i,r.format,s),t.selectionStart=t.selectionEnd=t.currentLooseValue.length;break;case 110:var a=p.current,l=s.numberSymbols();a&&(t.currentLooseValue=t.currentLooseValue.slice(0,t.selectionStart)+l.decimal+t.currentLooseValue.slice(t.selectionEnd),t.selectionStart=t.selectionEnd=t.selectionStart+1,t=de(t,r.format,s));break;default:return}e.preventDefault(),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.rangeOnEnter,F,A]),B=i.useCallback((function(){x.current=!0}),[]),W=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=A();Y(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,A]),$=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=A();Z(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,A]),G=i.useCallback((function(e){document&&document.activeElement===p.current&&p.current&&!r.readOnly&&!r.disabled&&(e.nativeEvent.deltaY<0&&W(e),e.nativeEvent.deltaY>0&&$(e))}),[W,$,r.disabled,r.readOnly]),X=i.useCallback((function(e){C.current.currentLooseValue=S.current,C.current.focused=!0,Object(v.a)(r.onFocus,e,R(),{}),w((function(e){return!e}))}),[r.onFocus,w,R]),J=i.useCallback((function(e){C.current={eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1},Object(v.a)(r.onBlur,e,R(),{}),w((function(e){return!e}))}),[r.onBlur,w,R]),ee=i.useCallback((function(e){document&&p.current&&(e.preventDefault(),document.activeElement!==p.current&&p.current.focus())}),[]);i.useLayoutEffect((function(){p.current&&void 0!==C.current.selectionStart&&void 0!==C.current.selectionEnd&&(p.current.selectionStart=C.current.selectionStart,p.current.selectionEnd=C.current.selectionEnd,C.current.selectionStart=void 0,C.current.selectionEnd=void 0)}),[k]);var te=!_()||P().valid,ne=i.createElement("span",{dir:r.dir,style:r.label?r.style:pe({width:r.width},r.style),className:Object(c.a)("k-input","k-numerictextbox",(n={},n["k-input-"+(H.a.sizeMap[r.size]||r.size)]=r.size,n["k-input-"+r.fillMode]=r.fillMode,n["k-rounded-"+(H.a.roundedMap[r.rounded]||r.rounded)]=r.rounded,n["k-invalid"]=!te,n["k-required"]=r.required,n["k-disabled"]=r.disabled,n),r.className),"aria-disabled":r.disabled?"true":void 0},i.createElement("input",{value:null===I?"":I,tabIndex:Object(u.a)(r.tabIndex,r.disabled),accessKey:r.accessKey,disabled:r.disabled,title:r.title,"aria-valuemin":r.min,"aria-valuemax":r.max,"aria-label":r.ariaLabel,"aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,placeholder:r.placeholder,spellCheck:!1,autoComplete:"off",autoCorrect:"off",type:r.inputType||"tel",className:"k-input-inner",id:a,name:r.name,readOnly:r.readOnly,style:r.inputStyle,onChange:z,onFocus:X,onBlur:J,onKeyDown:L,onPaste:B,onWheel:G,ref:p}),r.children,r.spinners&&i.createElement("span",{className:"k-input-spinner k-spin-button",onMouseDown:ee},i.createElement(O.a,{tabIndex:-1,type:"button",icon:"arrow-n",rounded:null,className:"k-spinner-increase","aria-label":d.toLanguageString("numerictextbox.increment",y["numerictextbox.increment"]),title:d.toLanguageString("numerictextbox.increment",y["numerictextbox.increment"]),onClick:W}),i.createElement(O.a,{tabIndex:-1,type:"button",icon:"arrow-s",rounded:null,className:"k-spinner-decrease","aria-label":d.toLanguageString("numerictextbox.decrement",y["numerictextbox.decrement"]),title:d.toLanguageString("numerictextbox.decrement",y["numerictextbox.decrement"]),onClick:$})));return r.label?i.createElement(K.a,{label:r.label,editorId:a,editorValue:null===I?"":I,editorValid:te,editorDisabled:r.disabled,editorPlaceholder:r.placeholder,children:ne,style:{width:r.width},dir:r.dir}):ne}));he.propTypes={value:a.number,defaultValue:a.number,step:a.number,format:a.oneOfType([a.string,a.shape({style:a.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:a.string,currencyDisplay:a.oneOf(["symbol","code","name"]),useGrouping:a.bool,minimumIntegerDigits:a.number,minimumFractionDigits:a.number,maximumFractionDigits:a.number})]),width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,title:a.string,placeholder:a.string,min:a.number,max:a.number,spinners:a.bool,disabled:a.bool,readOnly:a.bool,dir:a.string,name:a.string,label:a.string,validationMessage:a.string,required:a.bool,id:a.string,rangeOnEnter:a.bool,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string,onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},he.displayName="KendoNumericTextBox",he.defaultProps={step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,onChange:function(e){},onFocus:function(e){},onBlur:function(e){},size:"medium",rounded:"medium",fillMode:"solid"};var me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},ye=function(e){function t(n){var r=e.call(this,n)||this;return r._inputId=Object(l.a)(),r.focus=function(){r._input&&r._input.focus()},r.isInvalid=function(e){var t=!1;for(var n in e)e.hasOwnProperty(n)&&(t=t||e[n]);return t},r.setValidity=function(){r._input&&r._input.setCustomValidity&&(r.validity.valid||!r.validityStyles?r._input.classList.remove("k-invalid"):r._input.classList.add("k-invalid"),r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||""))},r.handleChange=function(e){r.setState({value:e.target.value}),r.valueDuringOnChange=e.target.value,r.props.onChange&&r.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:e.target.value,target:r}),r.valueDuringOnChange=void 0},r.handleAutoFill=function(e){if("autoFillStart"===e.animationName){var t=e.target.parentNode;t&&t.classList.contains("k-empty")&&t.classList.remove("k-empty")}},Object(f.a)(h),r.state={value:r.props.defaultValue||t.defaultProps.defaultValue},r}return me(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e={badInput:!!this._input&&this._input.validity.badInput,patternMismatch:!!this._input&&this._input.validity.patternMismatch,rangeOverflow:!!this._input&&this._input.validity.rangeOverflow,rangeUnderflow:!!this._input&&this._input.validity.rangeUnderflow,stepMismatch:!!this._input&&this._input.validity.stepMismatch,tooLong:!!this._input&&this._input.validity.tooLong,typeMismatch:!!this._input&&this._input.validity.typeMismatch,valueMissing:!!this._input&&this._input.validity.valueMissing};return ve({},e,{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!this._input||!this.isInvalid(e)})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.label,o=t.id,a=(t.validationMessage,t.defaultValue,t.valid,t.visited,t.touched,t.modified,t.ariaLabelledBy),s=t.ariaDescribedBy,l=(t.validityStyles,t.style),u=ge(t,["className","label","id","validationMessage","defaultValue","valid","visited","touched","modified","ariaLabelledBy","ariaDescribedBy","validityStyles","style"]),d=o||this._inputId,p=!this.validityStyles||this.validity.valid,f=Object(c.a)(n,"k-input k-input-md k-rounded-md k-input-solid"),h=i.createElement("input",ve({"aria-labelledby":a,"aria-describedby":s},u,{style:r?void 0:l,value:this.value,id:d,className:f,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:function(t){e._input=t}}));return r?i.createElement(K.a,{label:r,editorId:d,editorValue:String(this.value),editorValid:p,editorDisabled:u.disabled,editorPlaceholder:u.placeholder,children:h,style:l,dir:u.dir}):h},t.displayName="Input",t.propTypes={label:a.string,validationMessage:a.string,required:a.bool,validate:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={defaultValue:"",required:!1,validityStyles:!0},t}(i.Component),be=Object(p.a)(),ke=Object(p.b)(be,ye);ke.displayName="KendoReactInput";var we=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ce=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=function(e){var t=e.target.value,r=P(t,"rgba");n.setState({hex:t}),T(r)&&n.props.onHexChange(t,r,e)},n.onBlur=function(){T(P(n.state.hex,"rgba"))||n.setState({hex:n.state.originalHex})},n.state={hex:n.props.hex,originalHex:n.props.hex},n}return we(t,e),t.prototype.render=function(){return i.createElement(ke,{value:this.state.hex,onChange:this.onChange,onBlur:this.onBlur,disabled:this.props.disabled})},t.getDerivedStateFromProps=function(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null},t}(i.Component),Oe=n(18),xe=n(41),Se=function(e){Object(f.a)(xe.a);var t=e.id,n=e.editorId,r=e.editorRef,o=e.editorDisabled,a=e.children,s=e.editorValid,l=e.style,u=e.className,d=e.optional,p=Object(g.useLocalization)(),h=d?p.toLanguageString(Oe.a,Oe.b[Oe.a]):"",m=h&&i.createElement("span",{className:"k-label-optional"},h),v=i.useCallback((function(e){if(r&&r.current&&!o){r.current.focus&&(e.preventDefault(),r.current.focus());var t=r.current.actionElement;t&&(e.preventDefault(),t.click())}}),[r]),y=Object(c.a)({"k-label":!0,"k-label-empty":!a,"k-text-error":!1===s,"k-text-disabled":!0===o},u);return i.createElement("label",{id:t,htmlFor:n,onClick:v,style:l,className:y},a,m)};Se.propTypes={id:a.string,editorId:a.string,editorRef:a.oneOfType([a.func,a.shape({current:a.any})]),editorValid:a.bool,editorDisabled:a.bool,style:a.object,className:a.string,optional:a.bool},Se.displayName="KendoReactLabel";var Ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(){return(Ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ne=["rgba","rgb","hex"],Te=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={inputMode:Ne[1]},t.onRgbaRChange=function(e){t.dispatchRgbaChange({r:e.value},e)},t.onRgbaGChange=function(e){t.dispatchRgbaChange({g:e.value},e)},t.onRgbaBChange=function(e){t.dispatchRgbaChange({b:e.value},e)},t.onRgbaAChange=function(e){t.dispatchRgbaChange({a:e.value},e)},t}return Ee(t,e),t.prototype.render=function(){var e=Object(g.provideLocalizationService)(this),t=e.toLanguageString("colorGradient.r",y["colorGradient.hex"]),n=e.toLanguageString("colorGradient.r",y["colorGradient.r"]),r=e.toLanguageString("colorGradient.r",y["colorGradient.g"]),o=e.toLanguageString("colorGradient.r",y["colorGradient.b"]),a=e.toLanguageString("colorGradient.r",y["colorGradient.a"]);return i.createElement("div",{className:"k-colorgradient-inputs k-hstack"},i.createElement("div",{className:"k-vstack"},i.createElement(O.a,{fillMode:"flat",icon:"arrows-kpi",className:"k-colorgradient-toggle-mode k-icon-button",onClick:this.onToggleModeChange.bind(this)})),"hex"===this.state.inputMode&&i.createElement("div",{className:"k-vstack k-flex-1"},i.createElement("span",{className:"k-hex-value k-textbox k-input"},i.createElement(Ce,{hex:this.props.hex,onHexChange:this.props.onHexChange,disabled:this.props.disabled})),i.createElement(Se,{className:"k-colorgradient-input-label"},t)),("rgb"===this.state.inputMode||"rgba"===this.state.inputMode)&&i.createElement(i.Fragment,null,i.createElement("div",{className:"k-vstack"},i.createElement(he,{value:this.props.rgba.r,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaRChange,disabled:this.props.disabled}),i.createElement(Se,{className:"k-colorgradient-input-label"},n)),i.createElement("div",{className:"k-vstack"},i.createElement(he,{value:this.props.rgba.g,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaGChange,disabled:this.props.disabled}),i.createElement(Se,{className:"k-colorgradient-input-label"},r)),i.createElement("div",{className:"k-vstack"},i.createElement(he,{value:this.props.rgba.b,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaBChange,disabled:this.props.disabled}),i.createElement(Se,{className:"k-colorgradient-input-label"},o))),"rgba"===this.state.inputMode&&i.createElement("div",{className:"k-vstack"},this.props.opacity&&i.createElement(he,{value:this.props.rgba.a,min:0,max:1,step:.01,spinners:!1,format:"n2",onChange:this.onRgbaAChange,disabled:this.props.disabled}),this.props.opacity&&i.createElement(Se,{className:"k-colorgradient-input-label"},a)))},t.prototype.dispatchRgbaChange=function(e,t){var n=Ie({},this.props.rgba);void 0!==e.r&&(n.r=e.r),void 0!==e.g&&(n.g=e.g),void 0!==e.b&&(n.b=e.b),void 0!==e.a&&(n.a=e.a),this.props.onRgbaChange(n,t)},t.prototype.onToggleModeChange=function(){var e=Ne.length-1===Ne.indexOf(this.state.inputMode)?0:Ne.indexOf(this.state.inputMode)+1;if(this.props.opacity)this.setState({inputMode:Ne[e]});else{var t="rgba"===Ne[e]?e+1:e;this.setState({inputMode:Ne[t]})}},t}(i.Component),Me=Te;Object(g.registerForIntl)(Te),Object(g.registerForLocalization)(Te);var De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.render=function(){var e=Object(g.provideLocalizationService)(this),t=e.toLanguageString("colorGradient.contrastRatio",y["colorGradient.contrastRatio"]),n=e.toLanguageString("colorGradient.colorGradientAALevel",y["colorGradient.colorGradientAALevel"]),r=e.toLanguageString("colorGradient.colorGradientAAALevel",y["colorGradient.colorGradientAAALevel"]),o=e.toLanguageString("colorGradient.colorGradientPass",y["colorGradient.colorGradientPass"]),a=e.toLanguageString("colorGradient.colorGradientFail",y["colorGradient.colorGradientFail"]),s=L(this.props.rgba,this.props.bgColor),l=4.5.toFixed(1),c=7..toFixed(1),u=t+": "+s.toFixed(2),d=n+": "+l,p=r+": "+c,f=i.createElement("span",{className:"k-contrast-validation k-text-success"},o," ",i.createElement("span",{className:"k-icon k-i-check"})),h=i.createElement("span",{className:"k-contrast-validation k-text-error"},a," ",i.createElement("span",{className:"k-icon k-i-close"}));return i.createElement("div",{className:"k-vbox k-colorgradient-color-contrast"},i.createElement("div",{className:"k-contrast-ratio"},i.createElement("span",{className:"k-contrast-ratio-text"},u),s>=4.5?i.createElement("span",{className:"k-contrast-validation k-text-success"},i.createElement("span",{className:"k-icon k-i-check"}),s>=7&&i.createElement("span",{className:"k-icon k-i-check"})):i.createElement("span",{className:"k-contrast-validation k-text-error"},i.createElement("span",{className:"k-icon k-i-close"}))),i.createElement("div",null,i.createElement("span",null,d),s>=4.5?f:h),i.createElement("div",null,i.createElement("span",null,p),s>=7?f:h))},t}(i.Component);Object(g.registerForLocalization)(Pe);var _e=function(e,t){return 0===e.length?"":'<path d="'+e.reduce((function(e,n,r,o){return 0===r?"M "+n[0]+","+n[1]:e+" "+t(n,r,o)}),"")+'" fill="none" stroke="white" stroke-width="1"/>'},je=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}},Re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Re(t,e),t.prototype.renderSvgCurveLine=function(){var e,t,n=this,r=this.props.metrics,o=function(e,t,i,a,s){var l=(i+a)/2,c=Object.assign({},n.props.hsva,{s:t/r.width,v:1-l/r.height}),u=L(j(R(c)),j(n.props.backgroundColor||""));return i+.5>a?u<e+1&&u>e-1?l:null:s(u,e)?o(e,t,i,a-(a-i)/2,s):o(e,t,i+(a-i)/2,a,s)},i=function(e,t,n){void 0===n&&(n=!1);for(var i=[],a=0;a<=r.width;a+=r.width/t){var s=o(e,a,0,r.height,n?function(e,t){return e<t}:function(e,t){return e>t});null!==s&&i.push([a,s])}return i},a=(t=je,e=function(e,n,r,o){var i=t(n||e,r||e),a=i.angle+(o?Math.PI:0),s=.1*i.length;return[e[0]+Math.cos(a)*s,e[1]+Math.sin(a)*s]},function(t,n,r){var o=e(r[n-1],r[n-2],t),i=o[0],a=o[1],s=e(t,r[n-1],r[n+1],!0);return"C "+i+","+a+" "+s[0]+","+s[1]+" "+t[0]+","+t[1]});return _e(i(4.5,16),a)+_e(i(4.5,16,!0),a)+_e(i(7,16),a)+_e(i(7,16,!0),a)},t.prototype.shouldComponentUpdate=function(e){return e.hsva.h!==this.props.hsva.h||e.hsva.a!==this.props.hsva.a||this.props.backgroundColor!==e.backgroundColor},t.prototype.render=function(){return i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"k-color-contrast-svg",dangerouslySetInnerHTML:{__html:this.renderSvgCurveLine()},style:{position:"absolute",overflow:"visible",pointerEvents:"none",left:0,top:0,zIndex:3}})},t}(i.Component),Fe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ze=function(e){function t(n){var r=e.call(this,n)||this;r.onHexChange=function(e,t,n){if(r.isUncontrolled){var o=_(t);r.setState({hsva:o,backgroundColor:A(o.h),rgba:j(t),hex:e})}else!function(e,t,n){B[e]={value:t,hex:n}}(r.state.guid,t,e);r.dispatchChangeEvent(t,n,n.nativeEvent)},r.onRgbaChange=function(e,t){var n=function(e){var t=M(e.r,0,255),n=M(e.g,0,255),r=M(e.b,0,255),o=M(e.a,0,1);return D.Color.fromBytes(t,n,r,o).toCssRgba()}(e);if(r.isUncontrolled){var o=_(n),i=P(n,"hex");r.setState({hsva:o,backgroundColor:A(o.h),rgba:e,hex:i})}else!function(e,t,n){B[e]={value:t,rgba:n}}(r.state.guid,n,e);r.dispatchChangeEvent(n,t.syntheticEvent,t.nativeEvent)},r.onAlphaSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{a:e.value/100}),e.syntheticEvent,e.nativeEvent)},r.onHueSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{h:e.value}),e.syntheticEvent,e.nativeEvent)},r.onDrag=function(e){r.gradientWrapper.classList.add("k-dragging"),r.changePosition(e.event)},r.onRelease=function(){r.gradientWrapper.classList.remove("k-dragging")},r.onGradientWrapperClick=function(e){r.changePosition(e)},r.changePosition=function(e){var t=r.getGradientRectMetrics(),n=e.clientX-t.left,o=e.clientY-t.top,i=M(n,0,t.width),a=M(o,0,t.height),s=Object.assign({},r.state.hsva,{s:i/t.width,v:1-a/t.height});r.handleHsvaChange(s,e,e.nativeEvent)},r.onFocus=function(e){r.props.onFocus&&r.props.onFocus.call(void 0,{nativeEvent:e,target:r})},r.focus=function(){Object(s.a)(r.wrapper)},Object(f.a)(h);var o=n.value||n.defaultValue||P("rgba(255, 255, 255, 1)","rgba");return r.state=Object.assign({},t.getStateFromValue(o),{isFirstRender:!0,guid:Object(l.a)()}),r}return Fe(t,e),t.getDerivedStateFromProps=function(e,n){return e.value&&!n.isFirstRender?t.getStateFromValue(e.value,n.guid):null},t.prototype.componentDidMount=function(){this.setAlphaSliderBackground(this.state.backgroundColor),this.state.isFirstRender&&this.setState({isFirstRender:!1})},t.prototype.componentWillUnmount=function(){var e;e=this.state.guid,delete B[e]},t.prototype.componentDidUpdate=function(e,t){t.backgroundColor!==this.state.backgroundColor&&this.setAlphaSliderBackground(this.state.backgroundColor)},t.prototype.renderRectangleDragHandle=function(){var e={};if(!this.state.isFirstRender){var t=this.getGradientRectMetrics(),n=(1-this.state.hsva.v)*t.height,r=this.state.hsva.s*t.width;e.top=n+"px",e.left=r+"px"}return i.createElement("div",{className:"k-hsv-draghandle k-draghandle",style:e})},t.prototype.handleHsvaChange=function(e,t,n){var r=R(e);if(this.isUncontrolled){var o=P(r,"hex");this.setState({hsva:e,backgroundColor:A(e.h),rgba:j(r),hex:o})}else!function(e,t,n){B[e]={value:t,hsva:n}}(this.state.guid,r,e);this.dispatchChangeEvent(r,t,n)},t.prototype.dispatchChangeEvent=function(e,t,n){this.props.onChange&&this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:n,target:this,value:e})},t.getStateFromValue=function(e,t){T(P(e,"hex"))||(e="rgba(255, 255, 255, 1)");var n=function(e,t){if(e){var n=B[e];return n&&n.value===t?n.hsva:void 0}}(t,e)||_(e),r=function(e,t){if(e){var n=B[e];return n&&n.value===t?n.rgba:void 0}}(t,e)||j(e),o=function(e,t){if(e){var n=B[e];return n&&n.value===t?n.hex:void 0}}(t,e)||P(e,"hex");return{hsva:n,backgroundColor:A(n.h),rgba:r,hex:o}},t.prototype.setAlphaSliderBackground=function(e){this.props.opacity&&this.alphaSlider&&this.alphaSlider.sliderTrack&&(this.alphaSlider.sliderTrack.style.background="linear-gradient(to top, transparent, "+e+")")},Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!0,configurable:!0}),t.prototype.getGradientRectMetrics=function(){return this.gradientWrapper.getBoundingClientRect()},t.prototype.render=function(){var e=this,t=Object(c.a)("k-colorgradient",{"k-disabled":this.props.disabled});return i.createElement("div",{id:this.props.id,className:t,"aria-disabled":this.props.disabled?"true":void 0,style:this.props.style,ref:function(t){return e.wrapper=t},tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,onFocus:this.onFocus},i.createElement("div",{className:"k-colorgradient-canvas k-hstack"},i.createElement("div",{className:"k-hsv-rectangle",style:{background:this.state.backgroundColor}},i.createElement(d.a,{onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.gradientWrapper=t?t.element:void 0}},i.createElement("div",{className:"k-hsv-gradient",style:{touchAction:"none"},onClick:this.onGradientWrapperClick},this.renderRectangleDragHandle())),this.props.backgroundColor&&!this.state.isFirstRender&&i.createElement(Ae,{metrics:this.gradientWrapper?this.getGradientRectMetrics():void 0,hsva:this.state.hsva,backgroundColor:this.props.backgroundColor})),i.createElement("div",{className:"k-hsv-controls k-hstack"},i.createElement(N,{value:this.state.hsva.h,buttons:!1,vertical:!0,min:0,max:360,step:5,onChange:this.onHueSliderChange,className:"k-hue-slider k-colorgradient-slider",disabled:this.props.disabled}),this.props.opacity&&i.createElement(N,{value:T(this.state.hsva.a)?100*this.state.hsva.a:100,buttons:!1,vertical:!0,min:0,max:100,step:1,onChange:this.onAlphaSliderChange,className:"k-alpha-slider k-colorgradient-slider",disabled:this.props.disabled,ref:function(t){return e.alphaSlider=t}}))),i.createElement(Me,{rgba:this.state.rgba,onRgbaChange:this.onRgbaChange,hex:this.state.hex,onHexChange:this.onHexChange,opacity:this.props.opacity,disabled:this.props.disabled}),this.props.backgroundColor&&i.createElement(Pe,{bgColor:j(this.props.backgroundColor),rgba:this.state.rgba}))},t.displayName="ColorGradient",t.propTypes={defaultValue:a.string,value:a.string,onChange:a.func,onFocus:a.func,opacity:a.bool,backgroundColor:a.string,disabled:a.bool,style:a.any,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={opacity:!0},t}(i.Component),Le=Object(p.a)(),Be=Object(p.b)(Le,ze);Be.displayName="KendoReactColorGradient";var Ve=function(){function e(){this.colorRows=[]}return e.prototype.setColorMatrix=function(e,t){if(this.colorRows=[],T(e)&&e.length){t=t||e.length;for(var n=0;n<e.length;n+=t){var r=e.slice(n,t+n);this.colorRows.push(r)}}},e.prototype.getCellCoordsFor=function(e){var t=this;if(T(e)){var n=e?Object(D.parseColor)(e,!0):e,r=[e];T(n)&&r.push(n.toCss(),n.toCssRgba());for(var o=function(e){for(var n=function(n){if(r.some((function(r){return r===t.colorRows[e][n]})))return{value:{row:e,col:n}}},o=0;o<i.colorRows[e].length;o++){var a=n(o);if("object"==typeof a)return a}},i=this,a=0;a<this.colorRows.length;a++){var s=o(a);if("object"==typeof s)return s.value}}},e.prototype.getColorAt=function(e){if(T(e)&&T(this.colorRows[e.row]))return this.colorRows[e.row][e.col]},e.prototype.getNextCell=function(e,t,n){if(!(T(e)&&T(e.row)&&T(e.col)))return{row:0,col:0};var r=this.clampIndex(e.row+n,this.colorRows.length-1);return{row:r,col:this.clampIndex(e.col+t,this.colorRows[r].length-1)}},e.prototype.clampIndex=function(e,t){return e<0?0:e>t?t:e},e}(),He={basic:{colors:["#000000","#7f7f7f","#880015","#ed1c24","#ff7f27","#fff200","#22b14c","#00a2e8","#3f48cc","#a349a4"," ffffff","#c3c3c3","#b97a57","#ffaec9","#ffc90e","#efe4b0","#b5e61d","#99d9ea","#7092be","#c8bfe7"],columns:10},office:{colors:["#ffffff","#000000","#e6e6e6","#435569","#4371c4","#ed7e32","#a5a4a5","#febf04","#5a9bd5","#71ae48","#f2f2f3","#7f7f7f","#d1cece","#d5dde3","#dae1f4","#fce5d4","#deeded","#fff2cc","#deeaf6","#e1efd9","#d7d8d8","#585959","#aeabab","#adbaca","#b4c5e7","#f6caac","#dbdbdb","#ffe498","#bcd6ee","#c5e0b2","#bfbfc0","#3f3f3f","#767070","#8595b1","#8fabdb","#f5b183","#c9c8c9","#fed965","#9bc4e5","#a8d08d","#a5a5a6","#262625","#393939","#334050","#2e5496","#c45a11","#7b7b7a","#bf9000","#2f75b5","#548235","#7f7f7f","#0b0c0c","#161616","#222a34","#203764","#843d0b","#525252","#7f6000","#1d4d79","#375623"],columns:10},apex:{colors:["#ffffff","#000000","#c9c2d1","#69676d","#ceb966","#9cb084","#6bb1c9","#6585cf","#7e6bc9","#a379bb","#f2f2f2","#7f7f7f","#f4f2f5","#e0e0e2","#f5f1e0","#ebefe6","#e1eff4","#e0e6f5","#e5e1f4","#ece4f1","#d8d8d8","#595959","#e9e6ec","#c2c1c5","#ebe3c1","#d7dfcd","#c3dfe9","#c1ceeb","#cbc3e9","#dac9e3","#bfbfbf","#3f3f3f","#dedae3","#a4a3a8","#e1d5a3","#c3cfb5","#a6d0de","#a2b5e2","#b1a6de","#c7aed6","#a5a5a5","#262626","#9688a5","#4e4d51","#ae9638","#758c5a","#3d8da9","#365bb0","#533da9","#7d4d99","#7f7f7f","#0c0c0c","#635672","#343336","#746425","#4e5d3c","#295e70","#243c75","#372970","#533366"],columns:10},austin:{colors:["#ffffff","#000000","#caf278","#3e3d2d","#94c600","#71685a","#ff6700","#909465","#956b43","#fea022","#f2f2f2","#7f7f7f","#f4fce4","#dddcd0","#efffc0","#e3e1dc","#ffe0cb","#e8e9df","#ece1d6","#feecd2","#d8d8d8","#595959","#e9f9c9","#bbb9a1","#dfff82","#c8c3ba","#ffc299","#d2d4c0","#dac3ad","#fed9a6","#bfbfbf","#3f3f3f","#dff7ae","#ada598","#cfff43","#ada598","#ffa365","#bcbfa1","#c8a585","#fec67a","#a5a5a5","#262626","#a9ea25","#2e2d21","#6f9400","#544e43","#bf4d00","#6c6f4b","#6f5032","#d77b00","#7f7f7f","#0c0c0c","#74a50f","#1f1e16","#4a6300","#38342d","#7f3300","#484a32","#4a3521","#8f5200"],columns:10},clarity:{colors:["#ffffff","#292934","#f3f2dc","#d2533c","#93a299","#ad8f67","#726056","#4c5a6a","#808da0","#79463d","#f2f2f2","#e7e7ec","#e7e5b9","#f6dcd8","#e9ecea","#eee8e0","#e4dedb","#d8dde3","#e5e8ec","#e9d6d3","#d8d8d8","#c4c4d1","#d5d185","#edbab1","#d3d9d6","#ded2c2","#c9beb8","#b2bcc8","#ccd1d9","#d3aea7","#bfbfbf","#8a8aa3","#aca73b","#e4978a","#bec7c1","#cdbba3","#af9e94","#8c9bac","#b2bac6","#bd857c","#a5a5a5","#56566e","#56531d","#a43925","#6b7c72","#866b48","#554840","#39434f","#5c697b","#5a342d","#7f7f7f","#3b3b4b","#22210b","#6d2619","#47534c","#594730","#39302b","#262d35","#3d4652","#3c231e"],columns:10},slipstream:{colors:["#ffffff","#000000","#b4dcfa","#212745","#4e67c8","#5eccf3","#a7ea52","#5dceaf","#ff8021","#f14124","#f2f2f2","#7f7f7f","#8bc9f7","#c7cce4","#dbe0f4","#def4fc","#edfadc","#def5ef","#ffe5d2","#fcd9d3","#d8d8d8","#595959","#4facf3","#909aca","#b8c2e9","#beeafa","#dbf6b9","#beebdf","#ffcca6","#f9b3a7","#bfbfbf","#3f3f3f","#0d78c9","#5967af","#94a3de","#9ee0f7","#caf297","#9de1cf","#ffb279","#f68d7b","#a5a5a5","#262626","#063c64","#181d33","#31479f","#11b2eb","#81d319","#34ac8b","#d85c00","#c3260c","#7f7f7f","#0c0c0c","#021828","#101322","#202f6a","#0b769c","#568c11","#22725c","#903d00","#821908"],columns:10},metro:{colors:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],columns:10},flow:{colors:["#ffffff","#000000","#dbf5f9","#04617b","#0f6fc6","#009dd9","#0bd0d9","#10cf9b","#7cca62","#a5c249","#f2f2f2","#7f7f7f","#b2e9f2","#b4ecfc","#c7e2fa","#c4eeff","#c9fafc","#c9faed","#e4f4df","#edf2da","#d8d8d8","#595959","#76d9e8","#6adafa","#90c6f6","#89deff","#93f5f9","#94f6db","#cae9c0","#dbe6b6","#bfbfbf","#3f3f3f","#21b2c8","#20c8f7","#59a9f2","#4fceff","#5df0f6","#5ff2ca","#b0dfa0","#c9da91","#a5a5a5","#262626","#105964","#02485c","#0b5394","#0075a2","#089ca2","#0b9b74","#54a838","#7e9532","#7f7f7f","#0c0c0c","#062328","#01303d","#073763","#004e6c","#05686c","#07674d","#387025","#546321"],columns:10},hardcover:{colors:["#ffffff","#000000","#ece9c6","#895d1d","#873624","#d6862d","#d0be40","#877f6c","#972109","#aeb795","#f2f2f2","#7f7f7f","#e1dca5","#f2e0c6","#f0d0c9","#f6e6d5","#f5f2d8","#e7e5e1","#fbc7bc","#eef0e9","#d8d8d8","#595959","#d0c974","#e6c28d","#e2a293","#eeceaa","#ece5b2","#cfccc3","#f78f7a","#dee2d4","#bfbfbf","#3f3f3f","#a29a36","#daa454","#d4735e","#e6b681","#e2d88c","#b7b2a5","#f35838","#ced3bf","#a5a5a5","#262626","#514d1b","#664515","#65281a","#a2641f","#a39428","#655f50","#711806","#879464","#7f7f7f","#0c0c0c","#201e0a","#442e0e","#431b11","#6c4315","#6d621a","#433f35","#4b1004","#5a6243"],columns:10},trek:{colors:["#ffffff","#000000","#fbeec9","#4e3b30","#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529","#f2f2f2","#7f7f7f","#f7e09e","#e1d6cf","#fcecd5","#eddfda","#f0e7e5","#f3eae1","#ece9e3","#f5e3d1","#d8d8d8","#595959","#f3cc5f","#c4ad9f","#f9d9ab","#dcc0b6","#e1d0cc","#e7d5c4","#d9d4c7","#ebc7a3","#bfbfbf","#3f3f3f","#d29f0f","#a78470","#f6c781","#cba092","#d2b9b2","#dbc1a7","#c6bfab","#e1ac76","#a5a5a5","#262626","#694f07","#3a2c24","#c87d0e","#7b4b3a","#926255","#a17242","#7b7153","#90571e","#7f7f7f","#0c0c0c","#2a1f03","#271d18","#855309","#523226","#614138","#6b4c2c","#524b37","#603a14"],columns:10},verve:{colors:["#ffffff","#000000","#d2d2d2","#666666","#ff388c","#e40059","#9c007f","#68007f","#005bd3","#00349e","#f2f2f2","#7f7f7f","#bdbdbd","#e0e0e0","#ffd7e8","#ffc6dc","#ffb8f1","#f1b2ff","#c3dcff","#b8cfff","#d8d8d8","#595959","#9d9d9d","#c1c1c1","#ffafd1","#ff8eba","#ff71e4","#e365ff","#87baff","#72a0ff","#bfbfbf","#3f3f3f","#696969","#a3a3a3","#ff87ba","#ff5597","#ff2ad7","#d519ff","#4b98ff","#2b71ff","#a5a5a5","#262626","#343434","#4c4c4c","#e90062","#ab0042","#75005f","#4e005f","#00449e","#002676","#7f7f7f","#0c0c0c","#151515","#333333","#9b0041","#72002c","#4e003f","#34003f","#002d69","#00194f"],columns:10},monochrome:{colors:["#000000","#1a1a1a","#333333","#4d4d4d","#666666","#808080","#999999","#b3b3b3","#cccccc","#e6e6e6","#f2f2f2","#ffffff"],columns:12}},Ke=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),We=function(e){function t(t){var n=e.call(this,t)||this;return n.wrapper=null,n.guid=Object(l.a)(),n.focus=function(){n.wrapper&&n.wrapper.focus()},n.onKeyDown=function(e){switch(e.keyCode){case m.a.down:n.handleCellNavigation(0,1);break;case m.a.up:n.handleCellNavigation(0,-1);break;case m.a.right:n.handleCellNavigation(1,0);break;case m.a.left:n.handleCellNavigation(-1,0);break;case m.a.enter:n.handleEnter(e);break;default:return}e.preventDefault()},n.onColorClick=function(e,t){n.isUncontrolled?n.setState({selectedColor:e,focusedColor:e}):n.setState({focusedColor:e}),n.dispatchChangeEvent(e,t)},n.onFocus=function(e){n.setState({focusedColor:n.state.selectedColor||n.paletteService.colorRows[0][0]}),n.props.onFocus&&n.props.onFocus.call(void 0,{nativeEvent:e,target:n})},n.onBlur=function(){n.setState({focusedColor:void 0})},Object(f.a)(h),n.state={selectedColor:void 0!==n.props.value?n.props.value:n.props.defaultValue,isFirstRender:!0},n}return Ke(t,e),t.prototype.render=function(){var e=this,t=this.getPaletteInfo(),n=this.paletteService=new Ve;n.setColorMatrix(t.colors,t.columns);var r=n.getCellCoordsFor(this.state.selectedColor),o=n.getCellCoordsFor(this.state.focusedColor),a=Object(c.a)("k-colorpalette",{"k-disabled":this.props.disabled});return t.colors.length?i.createElement("div",{id:this.props.id,className:a,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,"aria-disabled":this.props.disabled?"true":void 0,"aria-activedescendant":r&&this.createCellId(r),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled),ref:function(t){return e.wrapper=t}},i.createElement("div",{className:"k-colorpalette-table-wrap",role:"grid"},i.createElement("table",{className:"k-colorpalette-table k-palette",role:"presentation"},i.createElement("tbody",null,this.renderRows(n.colorRows,r,o))))):""},t.getDerivedStateFromProps=function(e,t){if(t.isFirstRender||void 0===e.value){if(t.isFirstRender)return{isFirstRender:!1}}else{if(""===e.value&&void 0!==t.selectedColor)return{selectedColor:void 0};if(""!==e.value&&e.value!==t.selectedColor)return{selectedColor:e.value}}return null},t.prototype.handleCellNavigation=function(e,t){if(this.focusedColorCooridanates){var n=this.paletteService.getNextCell(this.focusedColorCooridanates,e,t);this.setState({focusedColor:this.paletteService.getColorAt(n)})}else this.setState({focusedColor:this.paletteService.colorRows[0][0]})},t.prototype.handleEnter=function(e){this.isUncontrolled&&this.setState({selectedColor:this.state.focusedColor}),this.dispatchChangeEvent(this.state.focusedColor,e)},t.prototype.dispatchChangeEvent=function(e,t){Object(v.a)(this.props.onChange,t,this,{value:e,rgbaValue:P(e,"rgba")})},Object.defineProperty(t.prototype,"focusedColorCooridanates",{get:function(){return this.state.focusedColor?this.paletteService.getCellCoordsFor(this.state.focusedColor):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!0,configurable:!0}),t.prototype.getPaletteInfo=function(){if("string"==typeof this.props.palette){var e=He[this.props.palette];return T(e)?{colors:e.colors,columns:this.props.columns||e.columns||10}:{colors:[],columns:0}}return{colors:this.props.palette||[],columns:this.props.columns||10}},t.prototype.renderRows=function(e,t,n){var r=this;return e.map((function(e,o){return i.createElement("tr",{role:"row",key:o},r.renderColumns(e,o,t,n))}))},t.prototype.renderColumns=function(e,t,n,r){var o=this,a=void 0!==n&&n.row===t,s=n&&n.col,l=void 0!==r&&r.row===t,u=r&&r.col,d="number"!=typeof this.props.tileSize?this.props.tileSize:{width:this.props.tileSize,height:this.props.tileSize},p=d.width+"px",f=d.height+"px";return e.map((function(e,n){var r=a&&s===n,d=Object(c.a)("k-colorpalette-tile",{"k-selected":r,"k-focus":l&&u===n});return i.createElement("td",{className:d,"aria-label":e,"aria-selected":!!r||!!o.props.disabled&&void 0,style:{backgroundColor:e,width:p,height:f,minWidth:p},onClick:function(t){return o.onColorClick(e,t)},id:o.createCellId({row:t,col:n}),key:n})}))},t.prototype.createCellId=function(e){return this.guid+"_"+e.row+"_"+e.col},t.displayName="ColorPalette",t.propTypes={palette:a.oneOfType([a.arrayOf(a.string.isRequired),a.string]),columns:a.number,tileSize:a.any,defaultValue:a.string,value:a.string,disabled:a.bool,tabIndex:a.number,onChange:a.func,onFocus:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={palette:"office",tileSize:24},t}(i.Component),$e=Object(p.a)(),qe=Object(p.b)($e,We);qe.displayName="KendoReactColorPalette";var Ue=n(47),Ge=function(){return(Ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Xe=function(e){var t=e.popupSettings||{},n="rtl"===e.dir?"right":"left",r=i.useMemo((function(){return{horizontal:n,vertical:"bottom"}}),[n]),o=i.useMemo((function(){return{horizontal:n,vertical:"top"}}),[n]);return i.createElement(i.Fragment,null,e.input,e.button,i.createElement(Ue.a,Ge({style:Ge({},(t||{}).style,{direction:e.dir})},t,{anchor:e.popupAnchor,anchorAlign:r,popupAlign:o,show:e.open,onOpen:e.onOpen,onClose:e.onClose,className:Object(c.a)("k-reset",t.className)}),e.content))};Xe.displayName="KendoPickerComponent";var Je=function(){return(Je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ye={palette:"office",tileSize:24},Ze=function(e){return void 0!==e},Qe=Object(p.a)(),et=i.forwardRef((function(e,t){var n,r;Object(f.a)(h);var o=Object(V.a)(Qe,e),a=Object(g.useLocalization)(),s=o.size,l=void 0===s?tt.size:s,d=o.rounded,p=void 0===d?tt.rounded:d,v=o.fillMode,k=void 0===v?tt.fillMode:v,w=o.popupSettings,C=o.gradientSettings,x=o.paletteSettings,S=o.valid,E=o.disabled,I=o.tabIndex,N=o.view,T=o.icon,M=o.iconClassName,D=o.onChange,P=o.onFocus,_=o.onBlur,j=o.onActiveColorClick,R=i.useRef(null),A=i.useRef(null),F=i.useRef(null),z=i.useRef(),L=i.useRef(null),B=i.useCallback((function(){R.current&&R.current.focus()}),[]);i.useImperativeHandle(t,(function(){return{element:R.current,actionElement:L.current,focus:B}}));var K=i.useState(!1),W=K[0],$=K[1],q=i.useState(o.defaultValue),U=q[0],G=q[1],X=i.useState(!1),J=X[0],Y=X[1],Z=Ze(o.value),Q=Ze(o.open),ee=Z?o.value:U,te=Q?o.open:J,ne=i.useCallback((function(e,t){Q||(!e&&!t&&R&&R.current&&R.current.focus(),Y(e))}),[Q]),re=i.useCallback((function(e){var t=e.altKey,n=e.keyCode;if(n!==m.a.esc)return n!==m.a.enter||Q?void(!t||n!==m.a.up&&n!==m.a.down||(e.preventDefault(),e.stopPropagation(),n===m.a.up&&R&&R.current&&(R.current.focus(),ne(!1)),n===m.a.down&&ne(!0))):(e.preventDefault(),e.stopPropagation(),void ne(!te));ne(!1)}),[te,Q]),oe=i.useCallback((function(){Q||(A.current?A.current.focus():F.current&&F.current.focus())}),[Q]),ie=i.useCallback((function(){ne(!te,!0)}),[te]),ae=i.useCallback((function(e){j&&j.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:ee})}),[j,ee]),se=i.useCallback((function(e){z.current?(clearTimeout(z.current),z.current=void 0):$(!0),P&&P.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[P]),le=i.useCallback((function(){ne(!1,!0),$(!1),z.current=void 0}),[]),ce=i.useCallback((function(e){clearTimeout(z.current),z.current=window.setTimeout(le),_&&_.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[_]),ue=i.useCallback((function(e,t){var n=t?e.rgbaValue:e.value;Z||G(n),t&&ne(!1),D&&D.call(void 0,{value:n,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent})}),[Z,D]),de=i.useCallback((function(e){return ue(e,!0)}),[Ze,ue]),pe=Object(b.a)(R,o.dir),fe=!1!==S;return i.createElement("span",{id:o.id,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,className:Object(c.a)("k-colorpicker","k-picker","k-icon-picker",(n={},n["k-picker-"+(H.a.sizeMap[l]||l)]=l,n["k-picker-"+k]=k,n["k-rounded-"+(H.a.roundedMap[p]||p)]=p,n["k-invalid"]=!fe,n["k-disabled"]=E,n["k-focus"]=W,n)),ref:R,tabIndex:Object(u.a)(I,E),title:o.title,onKeyDown:re,onFocus:se,onBlur:ce,dir:pe},i.createElement(Xe,{dir:pe,open:te,onOpen:oe,popupAnchor:R.current||void 0,popupSettings:Je({},w),input:i.createElement("span",{onClick:ae,className:"k-input-inner"},i.createElement("span",{className:Object(c.a)("k-value-icon","k-color-preview",{"k-no-color":!ee,"k-icon-color-preview":T||M})},(M||T)&&i.createElement("span",{className:Object(c.a)("k-color-preview-icon",M,(r={},r["k-icon k-i-"+T]=T&&!M,r))}),i.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:ee}}))),button:i.createElement(O.a,{tabIndex:-1,type:"button",onClick:ie,className:"k-input-button",rounded:null,icon:"arrow-s","aria-label":a.toLanguageString("colorPicker.dropdownButtonAriaLabel",y["colorPicker.dropdownButtonAriaLabel"])}),content:i.createElement(i.Fragment,null,("combo"===N||"gradient"===N)&&i.createElement(Be,Je({},C,{tabIndex:0,ref:A,value:ee,onChange:ue})),("combo"===N||"palette"===N)&&i.createElement(qe,Je({},x,{ref:F,value:ee,onChange:de})))}))}));et.propTypes={value:a.string,defaultValue:a.string,disabled:a.bool,view:a.oneOf(["gradient","palette","combo"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])};var tt={size:"medium",rounded:"medium",fillMode:"solid",view:"palette",gradientSettings:{opacity:!0},paletteSettings:Ye};et.defaultProps=tt,et.displayName="KendoColorPicker";var nt,rt=n(51),ot=i.forwardRef((function(e,t){Object(f.a)(h);var n=i.useRef(null),r=i.useRef(null),o=i.useRef(null),a=i.useState("ColorGradient"===(e.view||"ColorGradient")),s=a[0],l=a[1],d=i.useState("rgba(255, 255, 255, 1)"),p=d[0],m=d[1],v=i.useState("rgba(255, 255, 255, 1)"),g=v[0],b=v[1],k=i.useCallback((function(){n.current&&n.current.focus()}),[n]);i.useImperativeHandle(n,(function(){return{element:r.current,focus:k,props:e}})),i.useImperativeHandle(t,(function(){return n.current}));var w=i.useCallback((function(e){("ColorGradient"===e&&!s||"ColorPalette"===e&&s)&&l(!s)}),[s]),C=i.useCallback((function(){m("rgba(255, 255, 255, 1)")}),[]),x=i.useCallback((function(e){m(e.value)}),[]),S=i.useCallback((function(){b(p)}),[p]),E=i.useCallback((function(){b("rgba(255, 255, 255, 1)")}),[]),I=i.useCallback((function(){m(g)}),[g]),N=i.useCallback((function(){r.current&&r.current.focus()}),[r]),T=i.useCallback((function(){b(p)}),[p]);return i.createElement("div",{id:e.id,style:e.style,ref:r,tabIndex:Object(u.a)(e.tabIndex,e.disabled),className:Object(c.a)("k-flatcolorpicker k-coloreditor",{"k-disabled":e.disabled},e.className),onBlur:T},e.header||i.createElement("div",{className:"k-coloreditor-header k-hstack"},i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},i.createElement(rt.a,null,i.createElement(O.a,{type:"button",togglable:!0,fillMode:"flat",selected:s,onClick:function(){return w("ColorGradient")}},i.createElement("span",{className:"k-icon k-i-color-canvas"})),i.createElement(O.a,{type:"button",togglable:!0,fillMode:"flat",selected:!s,onClick:function(){return w("ColorPalette")}},i.createElement("span",{className:"k-icon k-i-palette"})))),i.createElement("div",{className:"k-spacer"}),i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},e.showClearButton&&at.showClearButton&&i.createElement(O.a,{type:"button",fillMode:"flat",onClick:C},i.createElement("span",{className:"k-icon k-i-reset-color"})),e.showPreview&&at.showPreview&&i.createElement("div",{className:"k-coloreditor-preview k-vstack"},i.createElement("span",{className:"k-coloreditor-preview-color k-color-preview",style:{background:p}}),i.createElement("span",{className:"k-coloreditor-current-color k-color-preview",style:{background:g},onClick:I})))),i.createElement("div",{className:"k-coloreditor-views k-vstack"},s?i.createElement(Be,{ref:o,value:p,onChange:x,onFocus:N}):i.createElement(qe,{value:p,onChange:x,onFocus:N})),e.showButtons&&at.showButtons&&i.createElement("div",{className:"k-coloreditor-footer k-actions k-actions-end"},i.createElement(O.a,{type:"button",className:"k-coloreditor-cancel",onClick:E},y["flatColorPicker.cancelBtn"]),i.createElement(O.a,{type:"button",className:"k-coloreditor-apply k-primary",onClick:S},y["flatColorPicker.applyBtn"])))})),it={id:a.string,value:a.string,view:a.string,header:a.elementType,showClearButton:a.bool,showPreview:a.bool,showButtons:a.bool},at={showClearButton:!0,showPreview:!0,showButtons:!0};ot.displayName="KendoFlatColorPicker",ot.propTypes=it,ot.defaultProps=at,function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(nt||(nt={}));var st=function(){function e(e,t,n){void 0===n&&(n=nt.Undefined),this.value=e,this.rest=t,this.type=n}return e.prototype.map=function(t){return new e(t(this.value),this.rest)},e.prototype.chain=function(e){return e(this.value,this.rest)},e.prototype.fold=function(e,t){return e(this.value,this.rest)},e.prototype.concat=function(e){return this.map((function(t,n){return e.chain((function(e,n){return t.concat([e])}))}))},e.prototype.toString=function(){return"Result({ value: '"+this.value+"', rest: "+this.rest+" })"},e}(),lt=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.input=e,this.control=t,this.inputCursor=0,this.controlCursor=0}return e.prototype.eof=function(){return this.inputCursor>=this.input.length},e.prototype.next=function(){return{char:this.input[this.inputCursor++],control:this.control[this.controlCursor++]}},e.prototype.peek=function(){return{char:this.input[this.inputCursor],control:this.control[this.controlCursor]}},e.prototype.eat_input=function(){this.inputCursor++},e.prototype.eat_control=function(){this.controlCursor++},e.prototype.eat=function(){this.inputCursor++,this.controlCursor++},e}(),ct=function(e){return(e||"").split("")},ut=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof lt?this.parse(e):this.parse(new lt(ct(e),ct(t)))},e.prototype.map=function(t){var n=this;return new e((function(e){return n.parse(e).map(t)}))},e.prototype.chain=function(t){var n=this;return new e((function(e){return n.parse(e).chain((function(e,n){return t(e).run(n)}))}))},e.prototype.isLiteral=function(e){return this.run(e).type===nt.Literal},e}(),dt=function(e,t){return new ut((function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new st(t.literal(r),n)):new st(o?t.mask(o):t.literal(r),n)}))},pt=function(e){var t=e.prompt,n=e.promptPlaceholder;return new ut((function(e){var r=e.next().char;return new st(r===t?n:r,e)}))},ft=function(e){return new ut((function(t){var n=t.next().char;return new st(e?n:"",t)}))},ht=function(e){return e.reduce((function(e,t){return n=t,e.chain((function(e){return n.map((function(t){return e.concat([t])}))}));var n}),(t=[],new ut((function(e){return new st(t,e)}))));var t},mt=function(e){return new ut((function(t){for(var n=new st([],t);!t.eof();)n=n.concat(e.run(t));return n}))},vt=function(){function e(){this.rules={},this.prompt="_",this.mask="",this.promptPlaceholder=" ",this.includeLiterals=!1,this.maskTokens=[],this.unmaskTokens=[],this.rawTokens=[],this.validationTokens=[]}return e.prototype.update=function(e){var t=e.mask,n=void 0===t?"":t,r=e.prompt,o=void 0===r?"":r,i=e.promptPlaceholder,a=void 0===i?" ":i,s=e.rules,l=void 0===s?{}:s,c=e.includeLiterals,u=void 0!==c&&c;this.mask=n,this.prompt=o,this.promptPlaceholder=a,this.rules=l,this.includeLiterals=u,this.tokenize()},e.prototype.validationValue=function(e){void 0===e&&(e="");var t=e;return ht(this.validationTokens).run(e).fold((function(e){t=e.join("")})),t},e.prototype.rawValue=function(e){void 0===e&&(e="");var t=e;return this.rawTokens.length?(ht(this.rawTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskRaw=function(e){void 0===e&&(e="");var t=e;return this.maskTokens.length?(ht(this.maskTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskInput=function(e,t,n){return e.length<t.length?this.maskRemoved(e,t,n):this.maskInserted(e,t,n)},e.prototype.maskInRange=function(e,t,n,r){var o="",i=r,a=t.split("").slice(0,n),s=t.split("").slice(r);return ht(this.maskTokens.slice(n,r)).run(e).fold((function(e){o=a.concat(e).concat(s).join("")})),{selection:i,value:o}},e.prototype.maskRemoved=function(e,t,n){var r=this,o="",i=n,a=e.split("").slice(n),s=e.split("").slice(0,n).join(""),l=this.maskTokens.length-(e.length-n);return ht(this.maskTokens.slice(0,l)).run(s,t).fold((function(e){i=r.adjustPosition(e,i),o=e.concat(a).join("")})),{selection:i,value:o}},e.prototype.adjustPosition=function(e,t){var n=e[t];return this.maskTokens[t].isLiteral(n)||n===this.prompt?t:t+1},e.prototype.maskInserted=function(e,t,n){var r=this,o="",i=n,a=e.slice(0,n);return ht(this.unmaskTokens).run(a,t).chain((function(e){i=e.join("").length;var n=t.slice(i);return ht(r.maskTokens).run(e.join("")+n,t)})).fold((function(e){o=e.join("")})),{selection:i,value:o}},Object.defineProperty(e.prototype,"maskTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder;return{literal:function(e){return t=e,new ut((function(e){return e.peek().char===t?(e.eat(),new st(t,e,nt.Literal)):new st(t,e,nt.Literal)}));var t},mask:function(n){return function(e){var t=e.prompt,n=e.promptPlaceholder;return function(e){return new ut((function(r){for(;!r.eof();){var o=r.peek(),i=o.char,a=o.control;if(i===a&&a===t)return r.eat(),new st(t,r,nt.Mask);if(e.test(i))return r.eat(),new st(i,r,nt.Mask);if(i===n)return r.eat(),new st(t,r,nt.Mask);r.eat_input()}return r.eat(),new st(t,r,nt.Mask)}))}}({prompt:e,promptPlaceholder:t})(n)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unmaskTokenCreator",{get:function(){var e=this;return{literal:function(e){return t=e,new ut((function(e){return e.eof()?new st("",e):(e.peek().char===t&&e.eat(),new st(t,e))}));var t},mask:function(t){return(n=e.prompt,function(e){return new ut((function(t){for(;!t.eof();){var r=t.peek(),o=r.char,i=r.control;if(o===n&&i===n)return t.eat(),new st(o,t);if(e.test(o))return t.eat(),new st(o,t);t.eat_input()}return t.eat(),new st("",t)}))})(t);var n}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder,n=this.includeLiterals;return{literal:function(e){return ft(n)},mask:function(n){return pt({prompt:e,promptPlaceholder:t})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return ft(!1)},mask:function(t){return pt({prompt:e,promptPlaceholder:""})}}},enumerable:!0,configurable:!0}),e.prototype.tokenize=function(){var e=this;mt(dt(this.rules,this.maskTokenCreator)).run(this.mask).fold((function(t,n){e.maskTokens=t})),mt(dt(this.rules,this.unmaskTokenCreator)).run(this.mask).fold((function(t,n){e.unmaskTokens=t})),mt(dt(this.rules,this.rawTokenCreator)).run(this.mask).fold((function(t,n){e.rawTokens=t})),mt(dt(this.rules,this.validationTokenCreator)).run(this.mask).fold((function(t,n){e.validationTokens=t}))},e}(),gt={"#":/[\d\s\+\-]/,"&":/[\S]/,0:/[\d]/,9:/[\d\s]/,"?":/[a-zA-Z\s]/,A:/[a-zA-Z0-9]/,C:/./,L:/[a-zA-Z]/,a:/[a-zA-Z0-9\s]/},yt=function(){return!1},bt=function(e,t){if(!!e!=!!t)return!1;if(e===t||!e||!t)return!0;var n=!0;for(var r in e)if(e[r]!==t[r]){n=!1;break}if(n)for(var r in t)if(!e.hasOwnProperty(r)){n=!1;break}return n},kt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(){return(wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ct=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._inputId="k-"+Object(l.a)(),n._service=new vt,n._isPasted=!1,n._selection=[null,null],n._input=null,n.focus=function(){n._input&&n._input.focus()},n.pasteHandler=function(e){var t=e.target,r=t.selectionStart,o=t.selectionEnd;o!==r&&(n._isPasted=!0,n._selection=[r||0,o||0])},n.onChangeHandler=function(e){var t=e.currentTarget,r=t.value,o=n._selection[0]||0,i=n._selection[1]||0;if(!n.props.mask)return n._isPasted=!1,n._selection=[null,null],void n.triggerOnChange(r,e);var a,s=n.value;if(n._isPasted){n._isPasted=!1;var l=s.length-i,c=r.length-l;a=n._service.maskInRange(r.slice(o,c),s,o,i)}else a=n._service.maskInput(r,s,t.selectionStart||0);n._selection=[a.selection,a.selection],n.triggerOnChange(a.value,e)},n.focusHandler=function(e){n.state.focused||(n.setState({focused:!0}),n.props.onFocus&&n.props.onFocus.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.blurHandler=function(e){n.state.focused&&(n.setState({focused:!1}),n.props.onBlur&&n.props.onBlur.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.setValidity=function(){n.element&&n.element.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"")},Object(f.a)(h),n}return kt(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this._service.rawValue(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=this.value,t=this._service.validationValue(e);return{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!(this.required&&!t||this.props.maskValidation&&this.props.prompt&&-1!==e.indexOf(this.props.prompt)),valueMissing:!t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){if(this.element&&this.state.focused&&t.focused){var n=this._selection,r=n[0],o=n[1],i=e.selection,a=this.props.selection;(!i&&a||i&&a&&(i.start!==a.start||i.end!==a.end))&&(r=a.start,o=a.end),null!==r&&null!==o&&this.element.setSelectionRange(r,o)}var s,l;s=e,l=this.props,s.includeLiterals===l.includeLiterals&&s.mask===l.mask&&s.prompt===l.prompt&&s.promptPlaceholder===l.promptPlaceholder&&bt(s.rules,l.rules)||this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e,n=this,r=this.props,o=r.size,a=void 0===o?t.defaultProps.size:o,s=r.fillMode,l=void 0===s?t.defaultProps.fillMode:s,d=r.rounded,p=void 0===d?t.defaultProps.rounded:d,f=this.props.id||this._inputId,h=!this.validityStyles||this.validity.valid,m=this.props.style||{},v=i.createElement("span",{dir:this.props.dir,className:Object(c.a)("k-maskedtextbox k-input",(e={},e["k-input-"+(H.a.sizeMap[a]||a)]=a,e["k-input-"+l]=l,e["k-rounded-"+(H.a.roundedMap[p]||p)]=p,e["k-invalid"]=!h,e["k-required"]=this.required,e["k-disabled"]=this.props.disabled,e),this.props.className),style:this.props.label?m:wt({width:this.props.width},m)},i.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-input-inner",value:this.value,id:f,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,name:this.props.name,tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled,!0),accessKey:this.props.accessKey,title:this.props.title,disabled:this.props.disabled||void 0,readOnly:this.props.readonly||void 0,placeholder:this.props.placeholder,ref:function(e){return n._input=e},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:yt,onDrop:yt}));return this.props.label?i.createElement(K.a,{label:this.props.label,editorId:f,editorValue:this.value,editorValid:h,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:v,style:{width:this.props.width},dir:this.props.dir}):v},t.prototype.triggerOnChange=function(e,t){this.setState({value:e}),this.props.onChange&&(this._valueDuringOnChange=e,this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,selectionStart:this._selection[0],selectionEnd:this._selection[1],target:this,value:this.value}),this._valueDuringOnChange=void 0)},t.prototype.updateService=function(e){var t=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(t)},Object.defineProperty(t.prototype,"rules",{get:function(){return Object.assign({},gt,this.props.rules)},enumerable:!0,configurable:!0}),t.displayName="MaskedTextBox",t.propTypes={value:a.string,defaultValue:a.string,placeholder:a.string,title:a.string,dir:a.string,id:a.string,style:a.object,className:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,disabled:a.bool,readonly:a.bool,prompt:a.string,promptPlaceholder:a.string,includeLiterals:a.bool,maskValidation:a.bool,mask:a.string,rules:function(e,t,n){var r=e.rules;if(void 0!==r&&!Object.entries(r).some((function(e){return"string"!=typeof e||!(r[e]instanceof RegExp)})))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed.");return null},selection:a.shape({start:a.number.isRequired,end:a.number.isRequired}),name:a.string,label:a.string,validationMessage:a.string,required:a.bool,valid:a.bool,validityStyles:a.bool,onChange:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:gt,required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},t}(i.Component),Ot=Object(p.a)(),xt=Object(p.b)(Ot,Ct);xt.displayName="KendoReactMaskedTextBox";var St,Et=n(48),It=function(){return(It=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e.start="start",e.end="end",e.min="min",e.max="max",e.increase="increase",e.decrease="decrease"}(St||(St={}));var Nt=function(){return(Nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Tt=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1],s=i.useCallback((function(e){var r=function(e,t){var n,r;switch(t.type){case St.start:if(void 0===t.payload)return e;n={start:t.payload>e.end?e.end:Math.max(t.payload,t.min),end:e.end};break;case St.end:if(void 0===t.payload)return e;n={start:e.start,end:t.payload<e.start?e.start:Math.min(t.payload,t.max)};break;case St.min:n="start"===t.key?It({},e,{start:t.min}):It({},e,{end:Math.max(t.min,e.start)});break;case St.max:n="start"===t.key?It({},e,{start:Math.min(t.max,e.end)}):It({},e,{end:t.max});break;case St.increase:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]+t.step,n="start"===t.key?r<t.min?It({},e,{start:t.min}):It({},e,{start:Math.min(r,e.end)}):r>t.max?It({},e,{end:t.max}):It({},e,{end:Math.max(r,e.start)});break;case St.decrease:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]-t.step,n="start"===t.key?r<t.min?It({},e,{start:t.min}):It({},e,{start:Math.min(r,e.end)}):r>t.max?It({},e,{end:t.max}):It({},e,{end:Math.max(r,e.start)});break;default:n=e}return n}(t.state||o,Nt({},e,t));n&&n(r,e.event),a(r)}),[t,n]);return[o,s]},Mt=Object(p.a)(),Dt=i.forwardRef((function(e,t){var n,r;Object(f.a)(h);var o=Object(V.a)(Mt,e),a=i.useRef(null),s=i.useRef(null),l=i.useRef(null),d=i.useRef(null),p=i.useRef(null),v=i.useCallback((function(){d.current&&d.current.focus()}),[d]);i.useImperativeHandle(a,(function(){return{element:s.current,focus:v,props:o}})),i.useImperativeHandle(t,(function(){return a.current}));var k=i.useMemo((function(){return o.min}),[o.min]),w=i.useMemo((function(){return o.max}),[o.max]),C=i.useMemo((function(){return void 0!==o.step?o.step:_t.step}),[o.step,_t.step]),O=Object(b.a)(s,o.dir),x=i.useState(""),S=x[0],E=x[1],I=Tt(o.defaultValue||_t.defaultValue,{min:k,max:w,step:C,state:o.value},(function(e,t){o.onChange&&a.current&&o.onChange.call(void 0,{value:e,target:a.current,syntheticEvent:t})})),N=I[0],T=I[1],M=i.useMemo((function(){return o.value||N}),[o.value,N]),D=i.useRef(null),P=i.useRef(null),_=i.useMemo((function(){return(M.start-k)/(w-k)*100}),[M.start,k,w]),j=i.useMemo((function(){return(M.end-k)/(w-k)*100}),[M.end,k,w]),R=i.useMemo((function(){return o.vertical?{paddingTop:0,height:"100%"}:{}}),[o.vertical]),A=i.useMemo((function(){return o.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"}}),[o.vertical]),F=Object(g.useLocalization)(),z=i.useCallback((function(e){if(P.current){e.originalEvent.preventDefault();var t=P.current.getBoundingClientRect(),n=o.vertical?t.bottom-e.clientY:"rtl"===O?t.right-e.clientX:e.clientX-t.left,r=o.vertical?t.height:t.width;return k+n/r*(w-k)}}),[P,o.vertical,O,k,w,N.start,N.end,o.value&&o.value.start,o.value&&o.value.end]),L=i.useCallback((function(e){return e<=M.start?"start":e>=M.end?"end":2*e<M.end+M.start?"start":"end"}),[N.start,N.end,o.value&&o.value.start,o.value&&o.value.end]),B=i.useCallback((function(e){switch(e.keyCode){case m.a.right:e.preventDefault(),T({type:"rtl"===O?St.decrease:St.increase,key:"start",event:e});break;case m.a.up:e.preventDefault(),T({type:St.increase,key:"start",event:e});break;case m.a.left:e.preventDefault(),T({type:"rtl"===O?St.increase:St.decrease,key:"start",event:e});break;case m.a.down:e.preventDefault(),T({type:St.decrease,key:"start",event:e});break;case m.a.home:e.preventDefault(),T({type:St.min,key:"start",event:e});break;case m.a.end:e.preventDefault(),T({type:St.max,key:"start",event:e})}}),[T]),H=i.useCallback((function(e){switch(e.keyCode){case m.a.right:e.preventDefault(),T({type:"rtl"===O?St.decrease:St.increase,key:"end",event:e});break;case m.a.up:e.preventDefault(),T({type:St.increase,key:"end",event:e});break;case m.a.left:e.preventDefault(),T({type:"rtl"===O?St.increase:St.decrease,key:"end",event:e});break;case m.a.down:e.preventDefault(),T({type:St.decrease,key:"end",event:e});break;case m.a.home:e.preventDefault(),T({type:St.min,key:"end",event:e});break;case m.a.end:e.preventDefault(),T({type:St.max,key:"end",event:e})}}),[T,O]),K=i.useCallback((function(e){var t=z(e),n=L(t);E(n),"end"===n?p.current.focus():d.current.focus();var r="end"===n?St.end:St.start;T({type:r,payload:t,event:e})}),[o.vertical,k,w,T]);return Object(Et.a)(P,{onPress:K,onDrag:function(e){var t=z(e),n="end"===S?St.end:St.start;T({type:n,payload:t,event:e})},onRelease:function(e){var t=z(e),n="end"===S?St.end:St.start;T({type:n,payload:t,event:e}),E("")}}),i.createElement("div",{role:"slider",id:o.id,style:o.style,ref:s,dir:O,className:Object(c.a)("k-widget k-slider",{"k-rtl":"rtl"===O,"k-disabled":o.disabled,"k-slider-vertical":o.vertical,"k-slider-horizontal":!o.vertical},o.className),"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy},i.createElement("div",{ref:P,className:"k-slider-track-wrap",style:Nt({flexGrow:1,position:"relative",touchAction:"none"},A)},o.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:Nt({},R)},i.Children.map(o.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-o.min)/(o.max-o.min),vertical:o.vertical},e.props.children)}))),i.createElement("div",{ref:D,className:"k-slider-track",style:o.vertical?{bottom:0,height:"100%"}:(n={},n["rtl"===O?"right":"left"]=0,n.width="100%",n)},null!==_&&null!==j&&i.createElement("div",{"data-selection":!0,ref:l,title:M.start+" - "+M.end,className:"k-slider-selection",style:o.vertical?{height:j-_+"%",bottom:_+"%"}:(r={},r["rtl"===O?"right":"left"]=_+"%",r.width=j-_+"%",r)}),i.createElement("a",{ref:d,role:"slider",tabIndex:Object(u.a)(o.startTabIndex,o.disabled,void 0),"aria-valuemin":k,"aria-valuemax":Math.max(w,M.end),"aria-valuenow":M.start,"aria-disabled":o.disabled?"true":void 0,className:"k-draghandle",title:F.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:o.vertical?{bottom:"calc("+_+"%)",zIndex:1}:"rtl"===O?{right:"calc("+_+"% - 13px)",zIndex:1}:{left:"calc("+_+"%)",zIndex:1},onKeyDown:B}),i.createElement("a",{ref:p,role:"slider",tabIndex:Object(u.a)(o.endTabIndex,o.disabled,void 0),"aria-valuemin":Math.min(k,M.start),"aria-valuemax":w,"aria-valuenow":M.end,"aria-disabled":o.disabled?"true":void 0,className:"k-draghandle",title:F.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:o.vertical?{bottom:"calc("+j+"%)",zIndex:1}:"rtl"===O?{right:"calc("+j+"% - 13px)",zIndex:1}:{left:"calc("+j+"%)",zIndex:1},onKeyDown:H}))))})),Pt={value:function(e,t,n){if(e.value){var r=e.value.start,o=e.value.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + "+t+" supplied to "+n+".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n ")}return null},defaultValue:function(e,t,n){if(e.defaultValue){var r=e.defaultValue.start,o=e.defaultValue.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + "+t+" supplied to "+n+".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n ")}return null},onChange:a.func,step:a.number,min:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===o?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be undefined.\n "):r&&o>=i?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be equal to or bigger than the max value.\n "):null},max:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===i?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be undefined.\n "):r&&i<=o?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be equal to or smaller than the min value.\n "):null},vertical:a.bool,disabled:a.bool,dir:a.oneOf(["ltr","rtl"])},_t={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};Dt.displayName="KendoReactRangeSlider",Dt.propTypes=Pt,Dt.defaultProps=_t;var jt=n(6),Rt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=function(){return(At=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ft=function(e){function t(n){var r=e.call(this,n)||this;return r.setValidity=function(){r._input&&r._input.setCustomValidity&&r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||r.defaultValidationMessage.toLanguageString("switch.validation",y["switch.validation"]))},r.limit=function(e,t,n){var r=n.offsetWidth,o=t.offsetWidth;return e<0?0:e>r-o?r-o:e},r.toggle=function(e,t){r.setState({checked:e}),r.valueDuringOnChange=e,Object(v.a)(r.props.onChange,t,r,{value:e}),r.valueDuringOnChange=void 0},r._id=Object(l.a)(),r.defaultValidationMessage=Object(g.provideLocalizationService)(r),r.focus=function(){r._element&&r._element.focus()},r.dummyInput=function(e){return i.createElement("input",{type:"checkbox",checked:r.props.checked,ref:function(e){r._input=e},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:jt.a})},r.handleClick=function(e){r.eventTimeStamp!==e.timeStamp&&(r.eventTimeStamp=e.timeStamp,r.toggle(!r.value,e))},r.handleKeyDown=function(e){if(!r.props.disabled){var t=e.keyCode;t!==m.a.space&&t!==m.a.enter||r.toggle(!r.value,e)}},r.handleWrapperFocus=function(e){if(!r.props.disabled){r.setState({focused:!0});var t=r.props.onFocus;t&&t.call(void 0,e)}},r.handleWrapperBlur=function(e){if(!r.props.disabled){r.setState({focused:!1});var t=r.props.onBlur;t&&t.call(void 0,e)}},Object(f.a)(h),r.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},r}return Rt(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.checked?this.props.checked:this.state.checked},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){return this._wrapper},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=void 0!==this.props.valid?this.props.valid:!this.props.required||!!this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.setValidity(),this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e,t,n,r=this,o=this.state.focused,a=this.props,s=a.dir,l=a.disabled,d=a.trackRounded,p=a.thumbRounded,f=a.size,h=a.id,m=a.offLabel,v=a.onLabel,g=a.tabIndex;this.dir=s||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var y=!this.validityStyles||this.validity.valid,b=Object(c.a)("k-switch",((e={})["k-switch-"+(H.a.sizeMap[f]||f)]=f,e["k-rounded-"+(H.a.roundedMap[d]||d)]=d,e["k-switch-on"]=this.value,e["k-switch-off"]=!this.value,e["k-focus"]=o,e["k-disabled"]=l,e["k-invalid"]=!y,e),this.props.className),k={"aria-checked":this.value,"aria-disabled":l||void 0};return i.createElement("span",{ref:function(e){r._wrapper=e},className:b,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},i.createElement("span",At({className:Object(c.a)("k-switch-track",(t={},t["k-rounded-"+(H.a.roundedMap[d]||d)]=d,t)),id:h||this._id,role:"switch"},k,{"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,ref:function(e){r._element=e},tabIndex:Object(u.a)(g,l,void 0),accessKey:this.props.accessKey}),this.dummyInput(this.value),i.createElement("span",{className:"k-switch-label-on"},v),i.createElement("span",{className:"k-switch-label-off"},m),i.createElement("span",{className:"k-switch-thumb-wrap"},i.createElement("span",{className:Object(c.a)("k-switch-thumb",(n={},n["k-rounded-"+p]=p,n))}))))},t.displayName="Switch",t.propTypes={accessKey:a.string,checked:a.bool,className:a.string,disabled:a.bool,defaultChecked:a.bool,size:a.oneOf([null,"small","medium","large"]),trackRounded:a.oneOf([null,"small","medium","large","full"]),thumbRounded:a.oneOf([null,"small","medium","large","full"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,offLabel:a.string,required:a.bool,tabIndex:a.number,valid:a.bool,validate:a.bool,validationMessage:a.string,onBlur:a.any,onChange:a.any,onFocus:a.any,onLabel:a.string},t.defaultProps={disabled:!1,defaultChecked:!1,size:"medium",trackRounded:"full",thumbRounded:"full",offLabel:"OFF",onBlur:jt.a,onFocus:jt.a,onLabel:"ON",required:!1,validityStyles:!0},t}(i.Component),zt=Object(p.a)(),Lt=Object(p.b)(zt,Ft);Lt.displayName="KendoReactSwitch";var Bt=function(){return(Bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},Ht=Object(p.a)(),Kt=i.forwardRef((function(e,t){var n;Object(f.a)(h);var r=Object(V.a)(Ht,e),o=r,a=o.ariaDescribedBy,s=o.ariaLabelledBy,d=o.checked,p=o.className,k=o.children,w=o.defaultChecked,C=o.disabled,O=o.defaultValue,x=o.id,S=o.size,E=o.rounded,I=o.label,N=o.labelPlacement,T=o.name,M=o.labelOptional,D=o.onChange,P=o.onFocus,_=o.onBlur,j=o.tabIndex,R=o.value,A=o.required,F=o.valid,z=o.validationMessage,L=o.validityStyles,B=(o.visited,o.touched,o.modified,Vt(o,["ariaDescribedBy","ariaLabelledBy","checked","className","children","defaultChecked","disabled","defaultValue","id","size","rounded","label","labelPlacement","name","labelOptional","onChange","onFocus","onBlur","tabIndex","value","required","valid","validationMessage","validityStyles","visited","touched","modified"])),K=i.useRef(null),W=i.useCallback((function(){K.current&&K.current.focus()}),[]),$=i.useCallback((function(){return{element:K.current,focus:W,get name(){return K.current&&K.current.name}}}),[W]);i.useImperativeHandle(t,$);var q=i.useState(w),U=q[0],G=q[1],X=i.useState(O),J=X[0],Y=X[1],Z="boolean"==typeof R||null===R,Q=void 0!==d,ee=Z,te=ee?R:J,ne=Q?d:ee?void 0:U,re=void 0===ne&&te,oe=re?te:ne,ie=re||ee?null===R?R:void 0:R||te,ae=null===oe||null===ie,se=i.useMemo((function(){return Object(l.a)()}),[]),le=Object(g.useLocalization)(),ce=function(e){return le.toLanguageString(e,y[e])},ue=ce("checkbox.validation"),de=ce("checkbox.optionalText"),pe=void 0!==F?F:!A||!!ne;i.useEffect((function(){K.current&&K.current.setCustomValidity&&K.current.setCustomValidity(pe?"":z||ue)}),[pe,z,ue]);var fe=i.useCallback((function(e,t){ee||C||(Y(t),Q||C||G(t)),D&&!C&&Object(v.a)(D,e,Bt({},$(),{value:t}),{value:t})}),[Q,C,D,ee,$]),he=i.useCallback((function(e){var t=e.target.checked;fe(e,t)}),[fe,R]),me=i.useCallback((function(e){if(!C){var t=e.keyCode,n=e.currentTarget.checked;t===m.a.space&&(e.preventDefault(),e.stopPropagation(),fe(e,!n))}}),[C,fe]),ve=i.useCallback((function(e){C||e.keyCode===m.a.space&&e.preventDefault()}),[C]),ge=i.useCallback((function(e){P&&!C&&Object(v.a)(P,e,$(),void 0)}),[P,C,$]),ye=i.useCallback((function(e){_&&!C&&Object(v.a)(_,e,$(),void 0)}),[_,C,$]),be=Object(b.a)(K,r.dir),ke=Object(c.a)({"k-disabled":C},p),we=Bt({type:"checkbox",className:Object(c.a)("k-checkbox",(n={},n["k-checkbox-"+(H.a.sizeMap[S]||S)]=S,n["k-rounded-"+(H.a.roundedMap[E]||E)]=E,n["k-indeterminate"]=ae,n["k-invalid k-invalid"]=!(pe||void 0!==L||!0===L),n)),ref:K,name:T,id:x||se,"aria-labelledby":s,"aria-describedby":a,checked:Boolean(oe),disabled:C,tabIndex:Object(u.a)(j,C),role:"checkbox",required:void 0!==A&&A,"aria-checked":!(!ne&&!oe)||!!ae&&"mixed","aria-disabled":C||void 0},B,{onChange:he,onKeyDown:me,onKeyUp:ve,onFocus:ge,onBlur:ye}),Ce=i.createElement(i.Fragment,null,void 0===ie?i.createElement("input",Bt({},we)):i.createElement("input",Bt({},we,{value:Z?void 0:null===ie?"":ie}))),Oe=i.createElement(i.Fragment,null,void 0!==I?i.createElement("label",{className:"k-checkbox-label",htmlFor:x||se,style:{userSelect:"none"}},I,M&&i.createElement("span",{className:"k-label-optional"},de)):null);return i.createElement(i.Fragment,null,"before"===N?i.createElement("span",{className:ke,dir:"rtl"},Ce,Oe,k):i.createElement("span",{className:ke,dir:be},Ce,Oe,k))}));Kt.propTypes={checked:a.bool,className:a.string,defaultChecked:a.bool,defaultValue:a.any,dir:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large"]),ariaLabelledBy:a.string,ariaDescribedBy:a.string,label:a.any,labelPlacement:a.string,labelOptional:a.bool,name:a.string,tabIndex:a.number,value:a.any,validationMessage:a.string,required:a.bool,validate:a.bool,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func};Kt.defaultProps={size:"medium",rounded:"medium"},Kt.displayName="KendoCheckbox";var Wt=function(){return(Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},qt=Object(p.a)(),Ut=i.forwardRef((function(e,t){var n;Object(f.a)(h);var r=Object(V.a)(qt,e),o=r.ariaDescribedBy,a=r.checked,s=r.children,d=r.className,p=r.disabled,m=r.id,g=r.size,y=r.label,b=r.labelPlacement,k=r.name,w=r.style,C=r.tabIndex,O=r.value,x=r.valid,S=r.onChange,E=r.onFocus,I=r.onBlur,N=$t(r,["ariaDescribedBy","checked","children","className","disabled","id","size","label","labelPlacement","name","style","tabIndex","value","valid","onChange","onFocus","onBlur"]),T=i.useRef(null),M=i.useCallback((function(){T.current&&T.current.focus()}),[]),D=i.useCallback((function(){return{element:T.current,focus:M}}),[M]);i.useImperativeHandle(t,D);var P=i.useMemo((function(){return Object(l.a)()}),[]),_=i.useCallback((function(e){Object(v.a)(S,e,D(),{value:O})}),[S,O,p]),j=i.useCallback((function(e){E&&!p&&Object(v.a)(E,e,D(),void 0)}),[E,p]),R=i.useCallback((function(e){I&&!p&&Object(v.a)(I,e,D(),void 0)}),[I,p]),A=Wt({type:"radio",id:m||P,name:k,className:Object(c.a)("k-radio",(n={},n["k-radio-"+(H.a.sizeMap[g]||g)]=g,n["k-invalid"]=!1===x,n),d),ref:T,disabled:p,tabIndex:Object(u.a)(C,p),checked:a,style:w,"aria-describedby":o,value:O,onChange:_,onFocus:j,onBlur:R},N),F=i.createElement(i.Fragment,null,void 0!==y?i.createElement("label",{className:"k-radio-label",htmlFor:m||P,style:{userSelect:"none"},"aria-label":y},y):null),z=i.createElement("input",Wt({},A));return"before"===b?i.createElement(i.Fragment,null,F,z,s):i.createElement(i.Fragment,null,z,F,s)}));Ut.propTypes={ariaDescribedBy:a.string,checked:a.bool,className:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),label:a.string,labelPlacement:a.string,name:a.string,style:a.object,tabIndex:a.number,value:a.any,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func};Ut.displayName="KendoRadioButton",Ut.defaultProps={size:"medium"};var Gt=n(59),Xt=function(){return(Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Jt=Object(p.a)(),Yt=i.forwardRef((function(e,t){Object(f.a)(h);var n=Object(V.a)(Jt,e),r=n.ariaLabelledBy,o=n.ariaDescribedBy,a=n.className,u=n.data,d=n.defaultValue,p=n.disabled,m=n.name,g=n.labelPlacement,y=n.layout,b=n.style,k=n.value,w=n.valid,C=n.item,O=void 0===C?Zt.item:C,x=n.onChange,S=n.onFocus,E=i.useRef(null),I=i.useCallback((function(){E.current&&Object(s.a)(E.current)}),[]),N=i.useCallback((function(){return{element:E.current,focus:I}}),[I]);i.useImperativeHandle(t,N);var T=i.useState(d),M=T[0],D=T[1],P=void 0!==k,_=P?k:M,j=i.useCallback((function(e){var t=e.value;P||p||D(t),x&&!p&&Object(v.a)(x,e.syntheticEvent,N(),{value:t})}),[D,x,p]),R=i.useCallback((function(e){S&&!p&&Object(v.a)(S,e.syntheticEvent,N(),void 0)}),[S,p]),A=i.useMemo((function(){return Object(l.a)()}),[]),F=Object(c.a)("k-radio-list",{"k-list-horizontal":"horizontal"===y,"k-list-vertical":"vertical"===y||void 0===y},a),z=Object(Gt.a)(E,n.dir),L=u&&u.map((function(e,t){var n=_===e.value,r=null==_,o=Xt({},e,{valid:w,checked:n,disabled:!(!e.disabled&&!p),labelPlacement:e.labelPlacement?e.labelPlacement:g,tabIndex:e.tabIndex?e.tabIndex:r&&0===t||n?0:-1,index:t,name:m||A,onChange:j,onFocus:R});return i.createElement(O,{className:Object(c.a)("k-radio-item",{"k-disabled":o.disabled||p}),key:t,role:"radio"},i.createElement(Ut,Xt({},o)))}));return i.createElement("ul",{role:"radiogroup",className:F,ref:E,dir:z,style:b,"aria-labelledby":r,"aria-describedby":o},L)})),Zt={item:function(e){return i.createElement("li",Xt({},e))}};Yt.propTypes={ariaLabelledBy:a.string,ariaDescribedBy:a.string,className:a.string,data:a.arrayOf(a.object),defaultValue:a.any,dir:a.string,disabled:a.bool,labelPlacement:a.string,layout:a.string,name:a.string,style:a.object,value:a.any,onChange:a.func,onFocus:a.func},Yt.defaultProps=Zt,Yt.displayName="KendoRadioGroup";var Qt=function(){return(Qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},en=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},tn=Object(p.a)(),nn=i.forwardRef((function(e,t){var n,r=Object(V.a)(tn,e),o=r,a=o.size,s=o.rounded,d=o.fillMode,p=o.ariaDescribedBy,f=o.ariaLabelledBy,h=o.autoSize,m=o.className,g=o.defaultValue,y=o.disabled,k=o.readOnly,w=o.required,C=o.rows,O=o.id,x=o.name,S=o.placeholder,E=o.style,I=o.tabIndex,N=o.value,T=o.valid,M=o.validationMessage,D=o.validityStyles,P=o.onChange,_=o.onFocus,j=o.onBlur,R=(o.visited,o.touched,o.modified,en(o,["size","rounded","fillMode","ariaDescribedBy","ariaLabelledBy","autoSize","className","defaultValue","disabled","readOnly","required","rows","id","name","placeholder","style","tabIndex","value","valid","validationMessage","validityStyles","onChange","onFocus","onBlur","visited","touched","modified"])),A=i.useRef(null),F=i.useCallback((function(){A.current&&A.current.focus()}),[]),z=i.useCallback((function(){return{element:A,focus:F,get name(){return A.current&&A.current.name}}}),[F]);i.useImperativeHandle(t,z);var L=i.useState(g),B=L[0],K=L[1],W=i.useState("auto"),$=W[0],q=W[1],U=i.useMemo((function(){return Object(l.a)()}),[]),G=Object(b.a)(A,r.dir),X=void 0!==N,J=X?N:B,Y=void 0!==T?T:!w||!!J;i.useEffect((function(){A.current&&A.current.setCustomValidity&&A.current.setCustomValidity(Y?"":M||"")}),[Y,M]),i.useLayoutEffect((function(){A.current&&q(A.current.scrollHeight+"px")}),[J]);var Z=i.useCallback((function(e){var t=e.target.value;X||y||(q("auto"),K(t)),P&&!y&&Object(v.a)(P,e,z(),{value:t})}),[K,P,y,X]),Q=i.useCallback((function(e){_&&!y&&Object(v.a)(_,e,z(),void 0)}),[_,y]),ee=i.useCallback((function(e){j&&!y&&Object(v.a)(j,e,z(),void 0)}),[j,y]),te=Qt({id:O||U,name:x,className:"k-input-inner !k-overflow-auto",ref:A,disabled:y,rows:C,placeholder:S,readOnly:k,required:w,tabIndex:Object(u.a)(I,y),style:h?{resize:"none",overflow:"hidden",height:$}:{},"aria-labelledby":f,"aria-describedby":p,"aria-multiline":!0,"aria-disabled":y||void 0,value:X?N:B},R,{onChange:Z,onFocus:Q,onBlur:ee});return i.createElement("span",{className:Object(c.a)("k-input","k-textarea",(n={},n["k-input-"+(H.a.sizeMap[a]||a)]=a,n["k-input-"+d]=d,n["k-rounded-"+(H.a.roundedMap[s]||s)]=s,n["k-invalid"]=!(Y||void 0!==D||!0===D),n["k-required"]=w,n["k-disabled"]=y,n),m),style:E,dir:G},i.createElement("textarea",Qt({},te)))}));nn.propTypes={ariaDescribedBy:a.string,ariaLabelledBy:a.string,autoSize:a.bool,className:a.string,defaultValue:a.string,dir:a.string,disabled:a.bool,readOnly:a.bool,rows:a.number,id:a.string,name:a.string,placeholder:a.string,style:a.object,tabIndex:a.number,value:a.oneOfType([a.string,a.arrayOf(a.string),a.number]),onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])};nn.displayName="KendoTextArea",nn.defaultProps={size:"medium",rounded:"medium",fillMode:"solid"};var rn=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null),o=Object(b.a)(r,e.dir);i.useImperativeHandle(n,(function(){return{element:r.current,props:e,value:e.value}})),i.useImperativeHandle(t,(function(){return n.current}));var a=i.useCallback((function(t){e.onClick&&e.onClick.call(void 0,{value:e.value,target:n.current,syntheticEvent:t})}),[e.onClick,e.value]),s=i.useCallback((function(t){e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onKeyDown]),l=i.useCallback((function(t){e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onFocus]),u=i.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onBlur]),d=i.useCallback((function(t){e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseMove]),p=i.useCallback((function(t){e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseEnter]),f=i.useCallback((function(t){e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseLeave]);return i.createElement("span",{id:e.id,ref:r,dir:o,"data-half":e.half,tabIndex:e.tabIndex,title:e.title,style:e.style,className:Object(c.a)("k-rating-item",{"k-rtl":"rtl"===o,"k-selected":e.selected,"k-hover":e.hovered},e.className),onClick:a,onKeyDown:s,onFocus:l,onBlur:u,onMouseEnter:p,onMouseLeave:f,onMouseMove:d},e.children)})),on={id:a.string,icon:a.any,dir:a.oneOf(["ltr","rtl"]),title:a.string,value:a.number,half:a.bool,selected:a.bool,hovered:a.bool};rn.displayName="KendoReactRatingItem",rn.propTypes=on,rn.defaultProps={dir:"ltr"};var an,sn=function(e,t){if(e%1){var n=Math.pow(10,(t.toString().split(".")[1]||t.toString().split(".")[0]).length);return Math.round(e*n)/n}return e},ln=function(e,t,n){return sn(e-n,n)<t&&t<e},cn=function(e,t,n,r){return null!==t&&("continues"===r?ln(e,t,n)?sn(e-n/2,n/2)<=t:e<=t:"single"===r&&(ln(e,t,n)?sn(e-n/2,n/2)===t:e===t))},un=function(e,t,n){return"ltr"===e?n<t.x+t.width/2:n>t.x+t.width/2},dn=function(e,t,n,r){for(var o=e;o<=t;o+=n)if(r===o)return!0;return!1};!function(e){e.select="select",e.deselect="deselect",e.increase="increase",e.decrease="decrease",e.min="min",e.max="max",e.reset="reset"}(an||(an={}));var pn=function(){return(pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fn=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1];return[o,function(e){var r=function(e,t){switch(t.type){case an.select:return void 0===t.payload||void 0===t.step?e:t.payload===e?null:t.payload>=t.min?t.payload<t.max?sn(t.payload,t.step):t.max:t.min;case an.deselect:return null;case an.increase:return void 0===t.step?e:e<t.min?t.min:e+t.step<t.max?sn(e+t.step,t.step):t.max;case an.decrease:return void 0===t.step?e:sn(e-t.step,t.step)>=t.min?sn(e-t.step,t.step):t.min;case an.min:return void 0===t.step?e:t.min;case an.max:return t.max;case an.reset:return null;default:return e}}(t.state||o,pn({},e,t));n&&n(r,e.event),a(r)}]},hn=Object(p.a)(),mn=i.forwardRef((function(e,t){var n,r,o,a,s=Object(V.a)(hn,e),l=i.useRef(null),d=i.useRef(null),p=Object(b.a)(d,s.dir);i.useImperativeHandle(l,(function(){return{element:d.current,props:s}})),i.useImperativeHandle(t,(function(){return l.current}));for(var f,h,v=i.useCallback((function(e,t){s.onChange&&l.current&&s.onChange.call(void 0,{value:e,target:l.current,syntheticEvent:t})}),[s.onChange]),g=i.useMemo((function(){return void 0!==s.min?s.min:gn.min}),[s.min]),y=i.useMemo((function(){return void 0!==s.max?s.max:gn.max}),[s.max]),k=i.useMemo((function(){return s.precision||gn.precision}),[s.precision]),w=i.useMemo((function(){return void 0!==s.step?s.step:gn.step}),[s.step]),C=i.useMemo((function(){return s.readonly||gn.readonly}),[s.readonly]),O=i.useMemo((function(){return s.disabled||gn.disabled}),[s.disabled]),x=i.useMemo((function(){return s.item||gn.item}),[s.item]),S=fn(s.defaultValue||gn.defaultValue,{state:s.value,min:g,max:y,step:"half"===k?w/2:w},v),E=S[0],I=S[1],N=fn(null,{state:s.value,min:g,max:y,step:"half"===k?w/2:w,precision:k}),T=N[0],M=N[1],D=i.useMemo((function(){return s.value||E}),[s.value,E]),P=i.useMemo((function(){return T}),[T]),_=i.useMemo((function(){return s.selection||gn.selection}),[s.selection]),j=i.useMemo((function(){return w/("half"===k?2:1)}),[w,k]),R=i.useCallback((function(e){if(e.target&&e.target.element&&!C&&!O){if("half"===k){var t=e.target.element.getBoundingClientRect(),n=un(p||"ltr",t,e.syntheticEvent.clientX)?sn(e.target.value-w/2,j):e.target.value;I({type:an.select,payload:n,event:e.syntheticEvent})}else I({type:an.select,payload:e.target.value,event:e.syntheticEvent});s.onClick&&s.onClick.call(void 0,{value:D,target:l.current,syntheticEvent:e.syntheticEvent})}}),[s.onClick,I,D]),A=i.useCallback((function(e){if(!C&&!O){switch(e.keyCode){case m.a.right:e.preventDefault(),I({type:"rtl"===p?an.decrease:an.increase,event:e});break;case m.a.left:e.preventDefault(),I({type:"rtl"===p?an.increase:an.decrease,event:e});break;case m.a.home:e.preventDefault(),I({type:"rtl"===p?an.min:an.max,event:e});break;case m.a.end:e.preventDefault(),I({type:"rtl"===p?an.max:an.min,event:e});break;case m.a.esc:e.preventDefault(),I({type:an.deselect,event:e})}s.onKeyDown&&s.onKeyDown.call(void 0,{value:D,target:l.current,syntheticEvent:e})}}),[s.onKeyDown,I,D]),F=i.useCallback((function(e){s.onFocus&&s.onFocus.call(void 0,{target:l.current,syntheticEvent:e})}),[s.onFocus]),z=i.useCallback((function(e){s.onBlur&&s.onBlur.call(void 0,{target:l.current,syntheticEvent:e})}),[s.onBlur]),L=i.useCallback((function(e){if(e.target&&e.target.element)if("half"===k){var t=e.target.element.getBoundingClientRect(),n=un(p||"ltr",t,e.syntheticEvent.clientX)?e.target.value-w/2:e.target.value;M({type:an.select,payload:n,event:e.syntheticEvent})}else M({type:an.select,payload:e.target.value,event:e.syntheticEvent})}),[k,w,p]),B=i.useCallback((function(e){M({type:an.reset,event:e.syntheticEvent})}),[]),H=[],K=(f=sn(y-g,j))-(h=w)*Math.floor(f/h),W=g;W<=y;W=sn(W+w,j)){var $=sn(W+K,j),q="half"===k&&ln($,null!==P?P:null!==D?D:0,w),U=cn($,D,w,_),G=cn($,null!==P?P:D,w,_),X=cn($,P,w,_);H.push(i.createElement(x,{key:$,value:$,dir:p,title:String(q?sn($-w/2,j):$),icon:s.icon,half:q,selected:U||G,hovered:X,onClick:R,onMouseMove:L,onMouseLeave:B},q&&i.createElement("span",{className:"k-rating-precision-complement",style:(n={width:"12px"},n["rtl"===p?"right":"left"]="50%",n)},i.createElement("span",{className:Object(c.a)("k-icon",(r={"k-i-star-outline":!s.icon},r[s.icon+"-outline"]=s.icon,r))})),q&&i.createElement("span",{className:"k-rating-precision-part",style:{width:"12px"}},i.createElement("span",{className:Object(c.a)("k-icon",(o={"k-i-star":!s.icon},o[""+s.icon]=s.icon,o))})),q&&i.createElement("span",{style:{width:"24px",height:"24px",display:"block"}}),!q&&i.createElement("span",{className:Object(c.a)("k-icon",(a={"k-i-star":!s.icon&&(X||G&&!X),"k-i-star-outline":!s.icon&&!X},a[""+s.icon]=s.icon&&(X||G&&!X),a[s.icon+"-outline"]=s.icon&&!X,a))})))}return i.createElement("span",{id:s.id,style:s.style,ref:d,role:"slider",dir:p,tabIndex:Object(u.a)(s.tabIndex,s.disabled,void 0),className:Object(c.a)("k-rating k-widget",{"k-rtl":"rtl"===p,"k-state-readonly":C,"k-disabled":O},s.className),onKeyDown:A,onFocus:F,onBlur:z,"aria-valuemin":g,"aria-valuemax":y,"aria-valuenow":null!==D?D:void 0,"aria-disabled":O?"true":void 0,"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy},i.createElement("input",{id:"rating",className:"k-hidden",readOnly:C,disabled:O}),i.createElement("span",{className:"k-rating-container"},H),s.label&&i.createElement("span",{className:"k-rating-label"},s.label))})),vn={id:a.string,dir:a.oneOf(["ltr","rtl"]),selection:a.oneOf(["continues","single"]),precision:a.oneOf(["item","half"]),value:function(e,t,n){if(e.value&&e.min&&e.max&&e.step&&(!("half"===e.precision?dn(e.min,e.max,e.step/2,e.value):dn(e.min,e.max,e.step,e.value))&&"half"===e.precision))return new Error("Invalid prop + "+t+" supplied to "+n+".\n The value of the { value } property is not correct, please check your values.\n ");return null},defaultValue:a.number,min:a.number,max:a.number,step:function(e,t,n){return void 0!==e.step&&e.step<=0?new Error("Invalid prop + "+t+" supplied to "+n+'.\n The value of the { step } property is cannot be equal or less than "0", please check your values.\n '):null},hovered:a.number,label:a.string,readonly:a.bool,disabled:a.bool,half:a.bool,icon:a.string,ariaDescribedBy:a.string},gn={dir:"ltr",min:1,max:5,step:1,item:rn,defaultValue:null,readonly:!1,disabled:!1,selection:"continues",precision:"item"};mn.displayName="KendoReactRating",mn.propTypes=vn,mn.defaultProps=gn},function(e,t,n){"use strict";n.r(t),n.d(t,"PDFExport",(function(){return C})),n.d(t,"PDFMargin",(function(){return h})),n.d(t,"savePDF",(function(){return O})),n.d(t,"getPageMargin",(function(){return v})),n.d(t,"GridPDFExport",(function(){return L})),n.d(t,"TreeListPDFExport",(function(){return W}));var r=n(0),o=n(1),i=n(12);function a(e,t,n){void 0===n&&(n={});var r=d;if(n.forceProxy&&!n.proxyURL)throw new Error("No proxyURL is set, but forceProxy is true");n.forceProxy||(l()&&(r=u),navigator.msSaveBlob&&(r=c)),r(e,t,n)}var s=function(){return document.createElement("a")},l=function(){return"download"in s()};function c(e,t){var n=e;if("string"==typeof e){for(var r=e.split(";base64,"),o=r[0],i=atob(r[1]),a=new Uint8Array(i.length),s=0;s<i.length;s++)a[s]=i.charCodeAt(s);n=new Blob([a.buffer],{type:o})}navigator.msSaveBlob(n,t)}function u(e,t){var n=e;window.Blob&&e instanceof Blob&&(n=URL.createObjectURL(e));var r=s();r.download=t,r.href=n;var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o),setTimeout((function(){return URL.revokeObjectURL(n)}))}function d(e,t,n){if(n.proxyURL){var r=document.createElement("form");r.setAttribute("action",n.proxyURL),r.setAttribute("method","POST"),r.setAttribute("target",n.proxyTarget||"_self");var o=n.proxyData||{};o.fileName=t;var i=e.split(";base64,");for(var a in o.contentType=i[0].replace("data:",""),o.base64=i[1],o)if(o.hasOwnProperty(a)){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",a),s.setAttribute("value",o[a]),r.appendChild(s)}document.body.appendChild(r),r.submit(),document.body.removeChild(r)}}String.fromCharCode;var p,f=(p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.render=function(){return null},t.propTypes={left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])},t}(r.Component),m=["bottom","left","right","top"];function v(e){var t=r.Children.toArray(e.children).find((function(e){return e&&e.type===h}));return t?function(e){for(var t={},n=0;n<m.length;n++){var r=m[n],o=e.props[r];void 0!==o&&(t[r]=o)}return t}(t):e.margin}var g=n(66),y=function(){function e(e,t,n,o,i){void 0===i&&(i={});var a=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=n,this.domElement=o,this.options=i,this.convertPageTemplateToHtml=function(e){return"<span>"+g.renderToStaticMarkup(r.createElement(a.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}))+"</span>"}}return e.prototype.savePDF=function(e){var t=this,n=this.drawDOM(this.domElement,this.getDrawOptions()).then((function(e){return t.exportPDF(e,t.getPDFOptions())})).then((function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())}));e&&n.then(e,e)},e.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},e.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},e.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},e}(),b=n(8),k={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652189291,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},w=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C=function(e){function t(t){var n=e.call(this,t)||this;if(void 0!==b)b.validatePackage(k);else{var r="License activation failed for "+k.name+"\n";r+="The @progress/kendo-licensing script is not loaded.\n",r+="See "+k.licensingDocsUrl+" for more information.\n",console.warn(r)}return n}return w(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{ref:function(t){e.rootElForPDF=t}},this.props.children)},t.prototype.save=function(e){new y(i.drawDOM,i.exportPDF,a,this.rootElForPDF,this.getOptions()).savePDF(e)},t.prototype.getOptions=function(){return Object.assign({},this.props,{margin:v(this.props)})},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component);function O(e,t,n){void 0===t&&(t={}),new y(i.drawDOM,i.exportPDF,a,e,t).savePDF(n)}var x=n(15),S={},E=function(e){return String(e).trim().split(" ")},I=function(e){return function(t){return function(e,t){var n=E(t);return Boolean(E(e.className).find((function(e){return n.indexOf(e)>=0})))}(t,e)}},N=function(e){return S[e]||(S[e]=function(t){return String(t.nodeName).toLowerCase()===e.toLowerCase()}),S[e]},T=function(e,t,n){if(void 0===n&&(n=!0),e){if(n&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var r=T(e,t);if(r)return r}e=e.nextSibling}}},M=N("TABLE"),D=function(e){return e?"locked":"wrap"},P=function(){function e(e){this.element=e,this.list=T(e,I("k-grid-container"))}return e.prototype.content=function(e){return T(this.list,I("k-grid-content"+(e?"-locked":"")))},e.prototype.header=function(e){return this.headerWrap=this.headerWrap||T(this.element,I("k-grid-header")),T(this.headerWrap,I("k-grid-header-"+D(e)))},e.prototype.footer=function(e){return this.footerWrap=this.footerWrap||T(this.element,I("k-grid-footer")),T(this.footerWrap,I("k-grid-footer-"+D(e)))},e.prototype.table=function(){return T(this.element,M)},e}(),_=function(e,t){for(var n=t.length,r=0;r<n;r++)e.appendChild(t[r].cloneNode(!0))},j=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},R=function(e){var t=e.length,n=e[0].cloneNode(!0),r=n.rows.length;if(t>1)for(var o=0;o<r;o++)for(var i=1;i<t;i++)_(n.rows[o],e[i].rows[o].cells);return n},A=function(e,t,n,r){for(var o=document.createElement("table"),i=e[0].cloneNode(!0),a=1;a<e.length;a++)_(i,e[a].querySelectorAll("col"));var s=R(t),l=R(n);if(s.className="k-grid-header",function(e,t){if(t.length>1&&e.rows.length>1)for(var n=1;n<e.rows.length;n++){var r=t[0].rows[n].cells.length,o=e.rows[n].cells[r];-1===String(o.className).indexOf("k-first")&&(o.className+=" k-first")}}(s,t),o.appendChild(i),o.appendChild(s),o.appendChild(l),r.length){var c=R(r);c.className="k-grid-footer",o.appendChild(c)}return j(o)};function F(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){void 0===n&&(n={});var s,l,c;function u(){e(function(){(c=document.createElement("div")).className="k-grid-pdf-export-element";var e=function(e){var t,n=new P(e),r=n.content();if(r){var o=[r.querySelector("colgroup")],i=[n.header().querySelector("thead")],a=[r.querySelector("tbody")],s=n.footer(),l=s?[s.querySelector("tfoot")]:[];t=A(o,i,a,l)}else t=j(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),e}(),n,d)}function d(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),x.render(function(){var e=i&&{data:i,total:i.length,pageSize:i.length,skip:0},n={style:Object.assign({},t.props.style,{width:"1000px"})},o=Object.assign({},e,n);if(a&&a.length>0){var s=function(e){return r.Children.toArray(e.props.children).filter((function(e){return e&&"KendoReactGridColumn"!==e.type.displayName}))}(t);return r.cloneElement(t,o,a.concat(s))}return r.cloneElement(t,o)}(),l,u)}(e,t,n,o,i,a)}}var z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e){function t(t){var n=e.call(this,t)||this;return n.saveGridPDF=F(n.getSavePDF()),n}return z(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:v(this.props)}),t,e,this.getCustomColumns())},t.prototype.getSavePDF=function(){return O},t.prototype.getGrid=function(){return r.Children.toArray(this.props.children).find((function(e){return e&&"KendoReactGrid"===e.type.displayName}))},t.prototype.getCustomColumns=function(){return r.Children.toArray(this.props.children).filter((function(e){return e&&"KendoReactGridColumn"===e.type.displayName}))},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component),B=N("TABLE"),V=function(){function e(e){this.element=e,this.list=T(e,I("k-grid"))}return e.prototype.content=function(){return T(this.list,I("k-grid"))},e.prototype.header=function(){return this.headerWrap=this.headerWrap||T(this.element,I("k-grid-header")),T(this.headerWrap,I("k-grid-header"))},e.prototype.footer=function(){return this.footerWrap=this.footerWrap||T(this.element,I("k-grid-footer")),T(this.footerWrap,I("k-grid-footer"))},e.prototype.table=function(){return T(this.element,B)},e}();function H(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){void 0===n&&(n={});var s,l,c;function u(){e(function(){(c=document.createElement("div")).className="k-treelist-pdf-export-element";var e=function(e){var t,n=new V(e),r=n.content(),o=n.header();if(o.childNodes.length>1&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach((function(e){return e.style.top=0})),r){var i=[r.querySelector("colgroup")],a=[o],s=[r.querySelector("tbody")],l=n.footer(),c=l?[l.querySelector("tfoot")]:[];t=A(i,a,s,c)}else t=j(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),c}(),n,d)}function d(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),x.render((p=n.allPages&&i?{data:i,take:Number.MAX_VALUE,skip:0}:{},f={style:Object.assign({},t.props.style,{width:"1000px"})},h=Object.assign({},p,f),a&&a.length>0?r.cloneElement(t,Object.assign({},h,{columns:a})):r.cloneElement(t,h)),l,u);var p,f,h}(e,t,n,o,i,a)}}var K=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=function(e){function t(t){var n=e.call(this,t)||this;return n.saveTreeListPDF=H(n.getSavePDF()),n}return K(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t,n){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:v(this.props)}),n,e,t||[])},t.prototype.getSavePDF=function(){return O},t.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string,allPages:o.bool},t}(r.Component)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(0),i=n(1),a=n(42),s=n(6),l=n(20),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={maxHeight:void 0,maxWidth:void 0},t.componentWillEnter=function(e){var n=t.props,r=n.onEnter,o=n.onBeforeEnter;o&&o.call(void 0,e),t.updateContainerDimensions(e.animatedElement,(function(){r&&r.call(void 0,e)}))},t.componentIsEntering=function(e){var n=t.props.onEntering;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.componentWillExit=function(e){var n=t.props.onExit;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.updateContainerDimensions=function(e,n){void 0===n&&(n=s.a);var r=e.firstChild;if(r){var o=l.a.outerHeight(r),i=l.a.outerWidth(r);t.setState({maxHeight:o,maxWidth:i},n)}},t}return c(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.children,i=t.childFactory,s=d(t,["direction","children","childFactory"]),l=this.state,c=l.maxHeight,p=l.maxWidth,f={maxHeight:(e="vertical"===n?{maxHeight:c?c+"px":null}:{maxWidth:p?p+"px":null}).maxHeight,maxWidth:e.maxWidth};return o.createElement(a.a,u({},s,{childFactory:function(t){var n=i?i(t):t;return n.props.in?n:o.cloneElement(n,u({},n.props,{style:u({},n.props.style,{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:f,transitionName:"reveal-"+n}),r)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(o.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(0),i=n(1),a=n(10),s=n(3),l=n(18),c=n(21),u=n(41),d=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1},n.handleFocus=function(e){n.setState({focused:!0})},n.handleBlur=function(e){n.setState({focused:!1})},Object(c.a)(u.a),n}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.editorId,r=e.className,i=e.editorValue,c=e.editorPlaceholder,u=e.editorValid,d=e.editorDisabled,p=e.style,f=e.id,h=e.optional,m=Object(s.provideLocalizationService)(this),v=h?m.toLanguageString(l.a,l.b[l.a]):"",g=v&&o.createElement("span",{className:"k-label-optional"},v),y=Object(a.a)({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!c&&!i&&0!==i,"k-text-disabled":d,"k-rtl":"rtl"===this.props.dir},r),b=Object(a.a)({"k-label":!0,"k-text-error":!1===u,"k-text-disabled":d});return o.createElement("span",{id:this.props.id,className:y,onFocus:this.handleFocus,onBlur:this.handleBlur,style:p,dir:this.props.dir},this.props.children,t?n?o.createElement("label",{id:f,htmlFor:n,className:b},t,g):o.createElement("span",{id:f,className:b},t,g):null)},t.propTypes={label:i.string,editorId:i.string,editorValue:i.oneOfType([i.string,i.bool,i.number]),editorPlaceholder:i.string,editorValid:i.bool,editorDisabled:i.bool,id:i.string,style:i.object,className:i.string,optional:i.bool},t}(o.Component);Object(s.registerForLocalization)(p)}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-drawing"),require("react-dom"),require("react-transition-group"),require("react-dom/server")):"function"==typeof define&&define.amd?define(["react","prop-types","@progress/kendo-react-intl","@progress/kendo-licensing","@progress/kendo-drawing","react-dom","react-transition-group","react-dom/server"],t):"object"==typeof exports?exports.KendoReactEditor=t(require("react"),require("prop-types"),require("@progress/kendo-react-intl"),require("@progress/kendo-licensing"),require("@progress/kendo-drawing"),require("react-dom"),require("react-transition-group"),require("react-dom/server")):e.KendoReactEditor=t(e.React,e.PropTypes,e.KendoReactIntl,e.KendoLicensing,e.KendoDrawing,e.ReactDOM,e.ReactTransitionGroup,e.ReactDOMServer)}(window,(function(e,t,n,r,o,i,a,s){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=67)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t),n.d(t,"ZIndexContext",(function(){return r.a})),n.d(t,"useZIndexContext",(function(){return r.b})),n.d(t,"BrowserSupportService",(function(){return o.a})),n.d(t,"canUseDOM",(function(){return i.a})),n.d(t,"canUseRef",(function(){return a})),n.d(t,"classNames",(function(){return s.a})),n.d(t,"cloneDate",(function(){return c})),n.d(t,"clone",(function(){return u})),n.d(t,"cloneObject",(function(){return d})),n.d(t,"cloneValue",(function(){return p})),n.d(t,"cloneArray",(function(){return f})),n.d(t,"focusFirstFocusableChild",(function(){return h.a})),n.d(t,"FormComponent",(function(){return m})),n.d(t,"getTabIndex",(function(){return v.a})),n.d(t,"getter",(function(){return g.a})),n.d(t,"guid",(function(){return y.a})),n.d(t,"Keys",(function(){return b.a})),n.d(t,"noop",(function(){return k.a})),n.d(t,"getScrollbarWidth",(function(){return w.a})),n.d(t,"setScrollbarWidth",(function(){return w.b})),n.d(t,"setter",(function(){return S})),n.d(t,"mapTree",(function(){return I.c})),n.d(t,"mapTreeItem",(function(){return I.d})),n.d(t,"extendDataItem",(function(){return I.a})),n.d(t,"getItemPath",(function(){return I.b})),n.d(t,"validatePackage",(function(){return N.a})),n.d(t,"hasRelativeStackingContext",(function(){return T})),n.d(t,"dispatchEvent",(function(){return M.a})),n.d(t,"AsyncFocusBlur",(function(){return _})),n.d(t,"createPropsContext",(function(){return j.a})),n.d(t,"withPropsContext",(function(){return j.b})),n.d(t,"useDir",(function(){return R.a})),n.d(t,"useAsyncFocusBlur",(function(){return D.a})),n.d(t,"useRtl",(function(){return A.a})),n.d(t,"useMouse",(function(){return F.a})),n.d(t,"useCustomComponent",(function(){return z})),n.d(t,"usePropsContext",(function(){return L.a})),n.d(t,"COLLECTION_ACTION",(function(){return E})),n.d(t,"useCollection",(function(){return B})),n.d(t,"Icon",(function(){return $})),n.d(t,"SvgIcon",(function(){return X})),n.d(t,"Typography",(function(){return le})),n.d(t,"DragAndDrop",(function(){return pe})),n.d(t,"Draggable",(function(){return fe.a})),n.d(t,"Droppable",(function(){return ve})),n.d(t,"useDraggable",(function(){return ge.a})),n.d(t,"useDroppable",(function(){return me})),n.d(t,"kendoThemeMaps",(function(){return ye.a}));var r=n(54),o=n(29),i=n(19),a=function(e){return"string"!=typeof Comment&&(function(e){return Boolean("function"==typeof e&&!!e.prototype.isReactComponent)}(e)||function(e){return Boolean(e.$$typeof&&"function"==typeof e.render)}(e))},s=n(10),l=n(0),c=function(e){return e?new Date(e.getTime()):null};function u(e){var t={};return d(e,t),t}function d(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t[n]=p(r,t[n])}}function p(e,t){if(Array.isArray(e))return f(e);if(e instanceof Date)return c(e);if(l.isValidElement(e))return l.cloneElement(e,e.props);if(e&&"object"==typeof e){var n=t||{};return d(e,n),n}return e}function f(e){return e.map((function(e){return p(e,void 0)}))}var h=n(55),m=function(){},v=n(39),g=n(37),y=n(52),b=n(26),k=n(6),w=n(56),C=n(43),O={undefined:function(e){return e}},x=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function S(e){if(O[e])return O[e];var t=Object(C.a)(e);return O[e]=function(e,n,r){for(var o=e,i=t.length-1,a=0;a<i&&o;a++)o=o[t[a]]=o[t[a]]||x(t[a+1],r);o[t[i]]=n},O[e]}var E,I=n(57),N=n(21),T=function(e){if(!i.a)return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var r=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),r},M=n(53),D=n(32),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_=function(e){var t=e.children,n=e.onFocus,r=e.onBlur,o=e.onSyncFocus,i=e.onSyncBlur,a=Object(D.a)({onFocus:n,onBlur:r,onSyncFocus:o,onSyncBlur:i});return t.call(void 0,P({},a))},j=n(58),R=n(35),A=n(59),F=n(38),z=function(e){return l.isValidElement(e)?[e.type,e.props]:[e,{}]},L=n(33);!function(e){e[e.add=0]="add",e[e.remove=1]="remove"}(E||(E={}));var B=function(e){void 0===e&&(e=[]);var t=l.useRef(e),n=l.useCallback((function(e){switch(e.type){case E.add:t.current.push(e.item);break;case E.remove:var n=t.current.indexOf(e.item);t.current.splice(n,1)}}),[]);return[t.current,n]},V=n(1),H={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},K=function(){return(K=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},W=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},$=l.forwardRef((function(e,t){var n=e.className,r=e.name,o=e.themeColor,i=e.size,a=e.flip,c=e.style,u=W(e,["className","name","themeColor","size","flip","style"]),d=l.useRef(null),p=l.useRef(null);l.useImperativeHandle(d,(function(){return{element:p.current}})),l.useImperativeHandle(t,(function(){return d.current}));var f=l.useMemo((function(){return o||q.themeColor}),[o]),h=l.useMemo((function(){return i||q.size}),[i]),m=l.useMemo((function(){return a||q.flip}),[a]),v=l.useMemo((function(){return Object(s.a)("k-icon","k-i-"+r,"k-color-"+f,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},H[h],n)}),[r,f,h,m,n]),g=Object(F.a)(e,d);return l.createElement("span",K({ref:p},u,g,{className:v,style:c,role:"presentation"}))}));$.propTypes={style:V.object,classNames:V.string,name:V.string,themeColor:V.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:V.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:V.oneOf(["default","horizontal","vertical","both"])};var q={size:"default",themeColor:"inherit",flip:"default"};$.displayName="KendoIcon";var U=function(){return(U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},X=l.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.svgClassName,i=e.icon,a=e.flip,c=e.size,u=e.style,d=e.svgStyle,p=e.themeColor,f=e.viewBox,h=G(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=l.useRef(null);l.useImperativeHandle(t,(function(){return{element:m.current}}));var v=l.useMemo((function(){return i?i.name:J.icon}),[i]),g=l.useMemo((function(){return p||J.themeColor}),[p]),y=l.useMemo((function(){return c||J.size}),[c]),b=l.useMemo((function(){return a||J.flip}),[a]),k=l.useMemo((function(){return f||J.viewBox}),[f]),w=l.useMemo((function(){return Object(s.a)("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},H[y],r)}),[v,g,y,b,r]),C=l.useMemo((function(){return e.width&&e.height?U({width:e.width,height:e.height},u):e.width?U({width:e.width,height:e.width},u):e.height?U({width:e.height,height:e.height},u):U({},u)}),[e.width,e.height,u]);return l.createElement("span",{className:w,style:C,ref:m},l.createElement("svg",U({className:o,style:d,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:i?i.viewBox:k,dangerouslySetInnerHTML:i?{__html:i.content}:void 0},h),i?void 0:n))}));X.propTypes={style:V.object,classNames:V.string,children:V.any,icon:V.object,themeColor:V.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:V.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:V.oneOf(["default","horizontal","vertical","both"])};var J={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};X.displayName="KendoSvgIcon";var Y={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},Z={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},Q={xsmall:"k-m-xs",small:"k-m-sm",medium:"k-m-md",large:"k-m-lg",xlarge:"k-m-xl",thin:"k-m-thin",hair:"k-m-hair"},ee={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},te={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},ne={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},re={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},oe={inherit:"k-color-inherit",primary:"k-color-primary",secondary:"k-color-secondary",tertiary:"k-color-tertiary",info:"k-color-info",success:"k-color-success",warning:"k-color-warning",error:"k-color-error",dark:"k-color-dark",light:"k-color-light",inverse:"k-color-inverse"},ie=function(){return(ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ae=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},se=function(e){var t=l.forwardRef((function(t,n){var r=t.id,o=t.style,i=t.className,a=t.fontSize,s=t.fontWeight,c=t.textAlign,u=t.textTransform,d=t.themeColor,p=t.margin,f=ae(t,["id","style","className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),h=l.useRef(null),m=l.useRef(null);l.useImperativeHandle(h,(function(){return{element:m.current,props:t}})),l.useImperativeHandle(n,(function(){return h.current}));var v=e,g=function(){if(void 0!==p){if("string"==typeof p)return[Q[p]];if("number"==typeof p&&p>=0&&p<=24)return["k-m-"+p];if("object"==typeof p){var e=[];return Object.keys(p).forEach((function(t){var n,r;null!==p[t]&&void 0!==p[t]&&e.push((n=t,r=p[t],""+te[n]+("string"==typeof r?ee[r]:r)))})),e.join(" ")}}};return l.createElement(v,ie({id:r,ref:m,className:["k-"+("p"===e?"paragraph":e),Y[a],Z[s],ne[c],re[u],oe[d],g(),i].filter((function(e){return void 0!==e})).join(" "),style:o},f),t.children)}));return t.propTypes={style:V.object,className:V.string,fontSize:V.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:V.oneOf(["light","normal","bold"]),margin:V.oneOfType([V.number,V.object,V.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:V.oneOf(["left","right","center","justify"]),textTransform:V.oneOf(["lowercase","uppercase","capitalize"]),themeColor:V.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},le={h1:se("h1"),h2:se("h2"),h3:se("h3"),h4:se("h4"),h5:se("h5"),h6:se("h6"),p:se("p"),code:se("code"),pre:se("pre")},ce=function(){return(ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ue=function(e,t,n){var r=l.useState(t||e),o=r[0],i=r[1];return[void 0!==t?t:o,l.useCallback((function(e,t){i(e),n&&n.call(void 0,ce({},t,{value:e}))}),[n,i])]},de=n(13),pe=function(e){var t=ue(null,void 0),n=t[0],r=t[1],o=ue(null,void 0),i=o[0],a=o[1],s=B([]),c=s[0],u=s[1],d=B([]),p=d[0],f=d[1];return l.createElement(de.a.Provider,{value:[n,r]},l.createElement(de.c.Provider,{value:[i,a]},l.createElement(de.b.Provider,{value:[c,function(e){u({type:E.add,item:e})},function(e){u({type:E.remove,item:e})}]},l.createElement(de.d.Provider,{value:[p,function(e){f({type:E.add,item:e})},function(e){f({type:E.remove,item:e})}]},e.children))))};pe.displayName="KendoReactDragAndDrop";var fe=n(60),he=n(30);function me(e,t){void 0===t&&(t={onDragEnter:k.a,onDragOver:k.a,onDragLeave:k.a,onDrop:k.a});var n=t.onDragEnter,r=void 0===n?k.a:n,o=t.onDragOver,i=void 0===o?k.a:o,a=t.onDragLeave,s=void 0===a?k.a:a,c=t.onDrop,u=void 0===c?k.a:c,d=Object(he.a)(de.c)[1],p=l.useContext(de.d),f=p[1],h=p[2],m=l.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),v=l.useRef(null);l.useImperativeHandle(v,(function(){return{element:m(),onDragEnter:g,onDragOver:y,onDragLeave:b,onDrop:w,data:e.current}}));var g=l.useCallback((function(t){d(v,{target:e.current,event:t}),r(t)}),[d,e,r]),y=l.useCallback((function(e){i(e)}),[i]),b=l.useCallback((function(t){d(null,{target:e.current,event:t}),s(t)}),[d,e,s]),w=l.useCallback((function(t){d(null,{target:e.current,event:t}),u(t)}),[d,e,u]),C=l.useCallback((function(){return f(v),function(){h(v)}}),[h,f]);l.useLayoutEffect(C,[C])}var ve=l.forwardRef((function(e,t){var n=l.useRef(null),r=l.useRef(null),o=l.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);l.useImperativeHandle(r,(function(){return{element:o()||void 0}})),l.useImperativeHandle(t,(function(){return r.current})),l.useImperativeHandle(e.childRef,(function(){return n.current}));var i=l.useCallback((function(t){e.onDragEnter&&e.onDragEnter({element:o(),target:r.current,event:t})}),[e.onDragEnter,o]),a=l.useCallback((function(t){e.onDragOver&&e.onDragOver({element:o(),target:r.current,event:t})}),[o,e.onDragOver]),s=l.useCallback((function(t){e.onDragLeave&&e.onDragLeave({element:o(),target:r.current,event:t})}),[e.onDragLeave,o]),c=l.useCallback((function(t){e.onDrop&&e.onDrop({element:o(),target:r.current,event:t})}),[e.onDrop,o]);return me(n,{onDragEnter:i,onDragOver:a,onDragLeave:s,onDrop:c}),e.children?l.cloneElement(l.Children.only(e.children),{ref:n}):null}));ve.displayName="KendoReactDroppable";var ge=n(48),ye=n(22)},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"Toolbar",(function(){return _})),n.d(t,"ToolbarItem",(function(){return R})),n.d(t,"ToolbarSeparator",(function(){return F})),n.d(t,"ToolbarSpacer",(function(){return z})),n.d(t,"Button",(function(){return r.a})),n.d(t,"ButtonGroup",(function(){return o.a})),n.d(t,"SplitButton",(function(){return x})),n.d(t,"SplitButtonItem",(function(){return v})),n.d(t,"DropDownButton",(function(){return T})),n.d(t,"DropDownButtonItem",(function(){return E})),n.d(t,"Chip",(function(){return L.a})),n.d(t,"ChipList",(function(){return B.a})),n.d(t,"FloatingActionButton",(function(){return ee})),n.d(t,"FloatingActionButtonItem",(function(){return q}));var r=n(50),o=n(51),i=n(0),a=n(1),s=n(52),l=n(26),c=n(10),u=n(22),d=n(53),p=function(e){var t,n=i.useCallback((function(t){e.onClick(t,e.index)}),[e]),r=e.dataItem.render||e.item||(void 0===e.item?e.render:null),o=void 0!==e.dataItem.text?e.dataItem.text:e.textField?e.dataItem[e.textField]:e.dataItem,a=i.createElement("li",{id:e.id,className:Object(c.a)("k-item",e.className,{"k-focus":e.focused}),onClick:n,onMouseDown:e.onDown,onPointerDown:e.onDown,role:"menuitem","aria-disabled":e.dataItem.disabled||void 0},i.createElement("span",{tabIndex:-1,className:Object(c.a)("k-link k-menu-link",{"k-selected":e.dataItem.selected,"k-disabled":e.dataItem.disabled}),key:"icon"},r?i.createElement(r,{item:e.dataItem,itemIndex:e.index}):i.createElement(i.Fragment,null,(e.dataItem.icon||e.dataItem.iconClass)&&i.createElement("span",{className:Object(c.a)("k-icon",(t={},t["k-i-"+e.dataItem.icon]=e.dataItem.icon,t[""+e.dataItem.iconClass]=e.dataItem.iconClass,t))}),e.dataItem.imageUrl&&i.createElement("img",{role:"presentation",alt:"",src:e.dataItem.imageUrl,className:"k-icon"}),o&&i.createElement("span",{className:"k-menu-link-text"},o))));return void 0!==e.item&&void 0!==e.render?e.render.call(void 0,a,e):a};p.displayName="KendoReactButtonItem";var f,h=p,m=(f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,disabled:a.bool,render:a.any},t}(i.Component),g=function(e,t,n,r){if(n)return e;switch(t){case l.a.enter:case l.a.space:case l.a.esc:return-1;case l.a.up:case l.a.left:return Math.max(0,e-1);case l.a.down:case l.a.right:return Math.min(r-1,e+1);default:return e}},y=n(47);function b(e){var t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function k(e){var t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}var w=n(21),C=n(11),O=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1,focusedIndex:-1,opened:!1},n.wrapper=null,n.mainButton=null,n.guid=Object(s.a)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.a.down?n.opened&&e.keyCode===l.a.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=void 0;if(e.keyCode===l.a.enter||e.keyCode===l.a.space?(e.preventDefault(),n.dispatchClickEvent(e,t),t>=0&&(r={focusedIndex:n.opened?-1:0,opened:!n.opened},n.dispatchPopupEvent(e,r.opened))):n.opened&&e.keyCode===l.a.esc&&(r={focusedIndex:-1,opened:!1},n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);o!==t&&((r=r||{}).focusedIndex=o);var i=e.keyCode===l.a.up||e.keyCode===l.a.down||e.keyCode===l.a.left||e.keyCode===l.a.right;!e.altKey&&i&&e.preventDefault()}r&&n.setState(r)}},n.onFocus=function(e){Object(d.a)(n.props.onFocus,e,n,void 0),n.setState({focused:!0,focusedIndex:-1})},n.onItemClick=function(e,t){var r=n.opened;r&&n.setState({focusedIndex:0,opened:!1}),n.dispatchClickEvent(e,t),r&&n.dispatchPopupEvent(e,!1)},n.onBlur=function(e){n.setState({focused:!1,focusedIndex:-1,opened:!1}),Object(d.a)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1)},n.onSplitPartClick=function(e){if(n.buttonsData.length){var t=!n.opened;n.dispatchPopupEvent(e,t),n.setState({focusedIndex:t?0:-1,opened:t,focused:!0})}},n.onDownSplitPart=function(e){e.preventDefault(),n.element&&document.activeElement!==n.element&&n.element.focus()},n.onItemDown=function(e){document.activeElement===n.element&&e.preventDefault()},n.dispatchPopupEvent=function(e,t){Object(d.a)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(w.a)(C.a),n}return O(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===v})).map((function(e){return e.props}));var t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,d=o.disabled,p=this.state.focusedIndex;return i.createElement("div",{id:a,style:s,className:Object(c.a)("k-split-button","k-button-group",{"k-focus":this.state.focused},"k-rounded-"+u.a.roundedMap[this.props.rounded||"medium"],this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.a,{ref:function(t){return e.mainButton=t&&t.element},type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:function(t){return e.onItemClick(t,-1)},disabled:d||void 0,tabIndex:l,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,dir:n,"aria-disabled":d,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" splitbutton","aria-owns":this.guid,"aria-activedescendant":p>=0?this.guid+"-"+p:void 0},this.props.text),i.createElement(r.a,{type:"button",size:this.props.size,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,icon:"arrow-s",className:"k-split-button-arrow",disabled:d||void 0,tabIndex:-1,onClick:this.onSplitPartClick,onMouseDown:this.onDownSplitPart,onPointerDown:this.onDownSplitPart,dir:n,"aria-label":"menu toggling button"}),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!0,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||(-1===t?Object(d.a)(this.props.onButtonClick,e,this,void 0):Object(d.a)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n;return i.createElement(y.a,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:Object(c.a)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||b(e),popupAlign:r.popupAlign||k(e),style:e?{direction:"rtl"}:void 0},i.createElement("ul",{role:"menu",id:this.guid,className:Object(c.a)("k-group k-menu-group k-reset",(t={},t["k-menu-group-"+(u.a.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(h,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,key:a,index:a,id:e.guid+"-"+a})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,onButtonClick:a.func,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,text:a.string,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.any,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(t,e),t.prototype.render=function(){return null},t.propTypes={text:a.string,icon:a.string,iconClass:a.string,imageUrl:a.string,selected:a.bool,disabled:a.bool,render:a.any},t}(i.Component),I=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(){return(N=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},T=function(e){function t(t){var n=e.call(this,t)||this;return n.state={opened:!1,focused:!1,focusedIndex:-1},n.wrapper=null,n.mainButton=null,n.guid=Object(s.a)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==l.a.down?n.opened&&e.keyCode===l.a.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=N({},n.state);if(e.keyCode===l.a.enter||e.keyCode===l.a.space?(t>=0&&n.dispatchClickEvent(e,t),e.preventDefault(),r.focusedIndex=n.opened?-1:0,r.opened=!n.opened,n.dispatchPopupEvent(e,r.opened)):n.opened&&e.keyCode===l.a.esc&&(r.focusedIndex=-1,r.opened=!1,n.dispatchPopupEvent(e,r.opened)),n.opened){var o=g(t,e.keyCode,e.altKey,n.buttonsData.length);r.focusedIndex=o;var i=e.keyCode===l.a.up||e.keyCode===l.a.down||e.keyCode===l.a.left||e.keyCode===l.a.right;!e.altKey&&i&&e.preventDefault()}n.setState(r)}},n.handleFocus=function(e){n.setState({focused:!0,focusedIndex:n.opened?0:-1}),Object(d.a)(n.props.onFocus,e,n,void 0)},n.handleBlur=function(e){n.setState({focused:!1,opened:!1,focusedIndex:-1}),Object(d.a)(n.props.onBlur,e,n,void 0),n.opened&&n.dispatchPopupEvent(e,!1)},n.onItemClick=function(e,t){n.setState({focusedIndex:-1,opened:!1}),n.dispatchClickEvent(e,t),n.dispatchPopupEvent(e,!1)},n.onItemDown=function(e){document.activeElement===n.element&&e.preventDefault()},n.mouseDown=function(e){e.preventDefault()},n.onClickMainButton=function(e){if(n.buttonsData.length){var t=!n.opened;n.setState({opened:t,focused:!0,focusedIndex:t?0:-1}),n.dispatchPopupEvent(e,t)}},n.dispatchPopupEvent=function(e,t){Object(d.a)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(w.a)(C.a),n}return I(t,e),Object.defineProperty(t.prototype,"opened",{get:function(){return void 0===this.props.opened?this.state.opened:this.props.opened},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.isRtl(),n=t?"rtl":void 0,o=this.props,a=o.id,s=o.style,l=o.tabIndex,u=o.disabled,d=this.state.focusedIndex;return this.buttonsData=this.props.items||i.Children.toArray(this.props.children).filter((function(e){return e&&e.type===E})).map((function(e){return e.props})),i.createElement("div",{id:a,style:s,className:Object(c.a)("k-dropdown-button",{"k-focus":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,dir:n,ref:function(t){return e.wrapper=t}},i.createElement(r.a,{size:this.props.size,shape:this.props.shape,rounded:this.props.rounded,fillMode:this.props.fillMode,themeColor:this.props.themeColor,onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:u||void 0,tabIndex:l,accessKey:this.props.accessKey,icon:this.props.icon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":u,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" dropdownbutton","aria-owns":this.guid,"aria-activedescendant":d>=0?this.guid+"-"+d:void 0},this.props.text),this.renderPopup(t))},t.prototype.componentDidMount=function(){(void 0===this.props.dir&&this.isRtl()||this.opened)&&this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.state.focused&&this.element&&this.element.focus()},Object.defineProperty(t.prototype,"element",{get:function(){return this.mainButton},enumerable:!0,configurable:!0}),t.prototype.dispatchClickEvent=function(e,t){this.isItemDisabled(t)||Object(d.a)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})},t.prototype.renderPopup=function(e){var t,n=this.props.popupSettings,r=void 0===n?{}:n;return i.createElement(y.a,{anchor:this.wrapper,show:this.opened,animate:r.animate,popupClass:Object(c.a)("k-menu-popup",r.popupClass),anchorAlign:r.anchorAlign||b(e),popupAlign:r.popupAlign||k(e),style:e?{direction:"rtl"}:void 0},i.createElement("ul",{role:"menu",id:this.guid,className:Object(c.a)("k-group k-menu-group k-reset",(t={},t["k-menu-group-"+(u.a.sizeMap[this.props.size]||this.props.size)]=this.props.size,t))},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,o=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return i.createElement(h,{className:"k-menu-item",dataItem:t,textField:o,focused:e.state.focusedIndex===a,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,index:a,key:a,id:e.guid+"-"+a})})):null},t.prototype.isItemDisabled=function(e){return this.buttonsData[e]?this.buttonsData[e].disabled:this.props.disabled},t.prototype.isRtl=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:!!this.wrapper&&"rtl"===getComputedStyle(this.wrapper).direction},t.propTypes={accessKey:a.string,onFocus:a.func,onBlur:a.func,onItemClick:a.func,onOpen:a.func,onClose:a.func,items:a.arrayOf(a.any),textField:a.string,tabIndex:a.number,disabled:a.bool,icon:a.string,iconClass:a.string,imageUrl:a.string,popupSettings:a.object,itemRender:a.func,item:a.func,className:a.string,buttonClass:a.string,dir:a.string},t.defaultProps={size:"medium",rounded:"medium",shape:"rectangle",fillMode:"solid",themeColor:"base"},t}(i.Component),M=n(34),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_=function(e){function t(n){var r=e.call(this,n)||this;return r._element=null,r.offsetHeight=0,r.offsetWidth=0,r.buttons=[],r.focusedSelector=r.selectors.map((function(e){return e+":focus"})).join(","),r.setTabIndex=function(e){var n=r.props.tabIndex,o=void 0===n?t.defaultProps.tabIndex:n;r.buttons.forEach((function(t,n){t.tabIndex=n===e?o:-1}))},r.onKeyDown=function(e){var t=e.target;if((e.keyCode===l.a.left||e.keyCode===l.a.right)&&!e.defaultPrevented&&-1!==r.buttons.findIndex((function(e){return e===t}))){var n=r.focusedIndex;e.keyCode===l.a.left?r.focusButton(n,n-1):r.focusButton(n,n+1)}},r.onWindowResize=function(e){var t=r.element;if(t){var n=t.offsetWidth,o=t.offsetHeight;if(r.offsetWidth!==n||r.offsetHeight!==o){r.offsetWidth=n,r.offsetHeight=o;var i={offsetWidth:r.offsetWidth,offsetHeight:r.offsetHeight};r.props.onResize&&r.props.onResize.call(void 0,P({target:r},i,{nativeEvent:e}))}}},Object(w.a)(C.a),r}return D(t,e),Object.defineProperty(t.prototype,"selectors",{get:function(){return this.props.buttons||M.b},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"focusedIndex",{get:function(){var e=this.element&&this.element.querySelector(this.focusedSelector);return Math.max(0,this.buttons.findIndex((function(t){return t===e})))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){window.addEventListener("resize",this.onWindowResize);var e=this.element;e&&(this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(0)))},t.prototype.componentDidUpdate=function(){var e=this.element;e&&!1!==this.props.keyboardNavigation&&(this.buttons=Array.from(e.querySelectorAll(this.selectors.join(","))),this.setTabIndex(this.focusedIndex))},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.onWindowResize),this.buttons.length=0},t.prototype.render=function(){var e=this;return i.createElement("div",{id:this.props.id,className:Object(c.a)("k-widget k-toolbar",this.props.className),style:this.props.style,role:"toolbar",dir:this.props.dir,ref:function(t){return e._element=t},onKeyDown:!1!==this.props.keyboardNavigation?this.onKeyDown:void 0},this.props.children)},t.prototype.focusButton=function(e,n){var r=this.props.tabIndex,o=void 0===r?t.defaultProps.tabIndex:r,i=this.buttons[n];if(i){i.tabIndex=o,i.focus();var a=this.buttons[e];a&&(a.tabIndex=-1)}},t.propTypes={tabIndex:a.number,dir:a.string,keyboardNavigation:a.bool,style:a.object,className:a.string,onResize:a.func,buttons:a.arrayOf(a.string)},t.defaultProps={tabIndex:0},t}(i.Component),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t}return j(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;return i.createElement("span",{id:this.props.id,className:this.props.className,style:this.props.style,ref:function(t){return e._element=t}},this.props.children)},t.propTypes={className:a.string},t}(i.PureComponent),A=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return A(t,e),t.prototype.render=function(){return i.createElement(R,{className:"k-separator"})},t}(i.PureComponent),z=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null);i.useImperativeHandle(r,(function(){return{element:n.current}})),i.useImperativeHandle(t,(function(){return{element:n.current}}));var o=i.useMemo((function(){return Object(c.a)("k-spacer",e.className)}),[e.className]);return i.createElement("span",{ref:n,className:o})}));z.propTypes={className:a.string};var L=n(24),B=n(25),V=n(54),H=n(35),K=n(39),W=function(){return(W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},q=i.forwardRef((function(e,t){var n=e.className,r=e.disabled,o=e.text,a=e.icon,s=e.style,l=e.id,u=e.focused,d=e.tabIndex,p=e.index,f=e.dataItem,h=e.item,m=e.onDown,v=e.onClick,g=$(e,["className","disabled","text","icon","style","id","focused","tabIndex","index","dataItem","item","onDown","onClick"]),y=i.useRef(null),b=i.useCallback((function(){y.current&&y.current.focus()}),[]),k=i.useCallback((function(){return{element:y.current,focus:b}}),[b]);i.useImperativeHandle(t,k);var w=i.useCallback((function(e){v&&void 0!==p&&!r&&v(e,p)}),[v,p]),C=i.useMemo((function(){return Object(c.a)("k-fab-item",{"k-focus":u,"k-disabled":r},n)}),[n,r,u]),O=h;return i.createElement("li",W({ref:y,id:l,className:C,style:s,role:"menuitem",tabIndex:Object(K.a)(d,r),"aria-disabled":r,"aria-label":(o||"")+" floatingactionbutton item",onClick:w,onMouseDown:m,onPointerDown:m},g),O?i.createElement(O,{itemIndex:p,item:f}):i.createElement(i.Fragment,null,o&&i.createElement("span",{className:"k-fab-item-text"},o),a&&i.createElement("span",{className:Object(c.a)("k-fab-item-icon k-icon k-i-"+a)})))}));q.propTypes={className:a.string,style:a.object,children:a.any,disabled:a.bool,focused:a.bool,index:a.number,icon:a.string,text:a.string,tabIndex:a.number,customProp:a.any},q.displayName="KendoFloatingActionButtonItem";var U=function(e){return"number"==typeof e?e+"px":e},G=function(e,t){var n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},X=function(e,t){var n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},J=function(e,t){return{end:t?"left":"right",center:"left",start:t?"right":"left"}[e.horizontal||"end"]},Y=function(e){return{top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]},Z=function(){return(Z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Q=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},ee=i.forwardRef((function(e,t){Object(w.a)(C.a);var n=e.align,r=void 0===n?te.align:n,o=e.alignOffset,a=e.className,p=e.disabled,f=e.icon,h=e.iconClass,m=e.id,v=e.items,g=e.item,b=e.text,k=e.positionMode,O=void 0===k?te.positionMode:k,x=e.shape,S=void 0===x?te.shape:x,E=e.size,I=void 0===E?te.size:E,N=e.style,T=e.rounded,M=void 0===T?te.rounded:T,D=e.themeColor,P=void 0===D?te.themeColor:D,_=e.overlayStyle,j=e.tabIndex,R=e.accessKey,A=e.popupSettings,F=void 0===A?{}:A,z=e.modal,L=e.onClick,B=e.onItemClick,W=e.onFocus,$=e.onBlur,ee=e.onKeyDown,ne=e.onOpen,re=e.onClose,oe=Q(e,["align","alignOffset","className","disabled","icon","iconClass","id","items","item","text","positionMode","shape","size","style","rounded","themeColor","overlayStyle","tabIndex","accessKey","popupSettings","modal","onClick","onItemClick","onFocus","onBlur","onKeyDown","onOpen","onClose"]),ie=Object(V.b)(),ae=ie?ie+2:100,se=i.useRef(null),le=i.useRef(null),ce=i.useRef(null),ue=i.useRef(null),de=i.useCallback((function(){le.current&&le.current.focus()}),[]),pe=i.useCallback((function(){return{element:le.current,focus:de}}),[de]);i.useImperativeHandle(se,pe),i.useImperativeHandle(t,(function(){return se.current}));var fe=i.useState(!1),he=fe[0],me=fe[1],ve=i.useState(!1),ge=ve[0],ye=ve[1],be=i.useState(-1),ke=be[0],we=be[1],Ce=i.useMemo((function(){return Object(s.a)()}),[]),Oe=Object(H.a)(le,e.dir),xe="rtl"===Oe,Se=i.useMemo((function(){return Object(s.a)()}),[]);i.useEffect((function(){!function(e,t,n,r){var o=t.horizontal,i=t.vertical;if(e.current){var a=n&&void 0!==n.x?U(n.x):"16px",s=n&&void 0!==n.x?"calc(50% + "+U(n.x)+")":"50%",l=n&&void 0!==n.y?U(n.y):"16px",c=n&&void 0!==n.y?"calc(50% + "+U(n.y)+")":"50%";e.current.style.setProperty(J(t,r),"center"===o?s:a),e.current.style.setProperty(Y(t),"middle"===i?c:l),r&&("top"!==i&&"bottom"!==i||"start"!==o||e.current.style.setProperty("left","unset"),"middle"===i&&"end"===o&&e.current.style.setProperty("right","unset"),"middle"===i&&"start"===o&&e.current.style.setProperty("left","unset"))}}(le,r,o,xe)}),[le,r,o,xe]),i.useEffect((function(){ge&&le&&le.current&&le.current.focus()}),[ge,le]);var Ee=i.useCallback((function(e,t){v&&Object(d.a)(t?ne:re,e,pe(),void 0)}),[ne,re,v]),Ie=i.useCallback((function(e){e.target&&!p&&(!v&&L?Object(d.a)(L,e,pe(),void 0):(me(!he),ye(!0),we(he?-1:0),Ee(e,!he)))}),[me,ye,we,L,Ee,he,v,p]),Ne=i.useCallback((function(e){ye(!0),we(he?0:-1),W&&Object(d.a)(W,e,pe(),void 0)}),[W,ye,we]),Te=i.useCallback((function(e){ye(!1),me(!1),we(-1),Object(d.a)($,e,pe(),void 0),he&&Ee(e,!1)}),[$,ye,me,we,Ee]),Me=i.useCallback((function(e){e.preventDefault()}),[]),De=i.useCallback((function(e,t){v&&(v[t].disabled||Object(d.a)(B,e,pe(),{itemProps:v[t],itemIndex:t}))}),[B]),Pe=i.useCallback((function(e,t){e.target&&v&&(we(t),me(!1),De(e,t),Ee(e,!1))}),[we,me,De,Ee]),_e=i.useCallback((function(e){document.activeElement===le.current&&e.preventDefault()}),[le,document.activeElement]),je=i.useCallback((function(e){var t=ke,n=v?v.length-1:-1,o="bottom"===r.vertical;switch(e.keyCode){case l.a.enter:case l.a.space:t>=0&&De(e,t),e.preventDefault(),me(!he),we(he?-1:0);break;case l.a.esc:e.preventDefault(),me(!1),we(-1);break;case l.a.home:e.preventDefault(),we(0);break;case l.a.end:e.preventDefault(),we(n);break;case l.a.down:case l.a.right:e.preventDefault(),t<n&&!o&&we(t+1),t>0&&o&&we(t-1);break;case l.a.up:case l.a.left:e.preventDefault(),t>0&&!o&&we(t-1),t<n&&o&&we(t+1)}Object(d.a)(ee,e,pe(),void 0)}),[ee,ke,we,xe,me]),Re=i.useMemo((function(){var e;return Object(c.a)("k-fab k-fab-solid",((e={})["k-fab-"+S]=S,e["k-fab-sm"]="small"===I,e["k-fab-md"]="medium"===I,e["k-fab-lg"]="large"===I,e["k-disabled"]=p,e["k-pos-absolute"]="absolute"===O,e["k-pos-fixed"]="fixed"===O,e["k-focus"]=ge,e["k-rounded-"+(u.a.roundedMap[M]||M)]=M,e["k-fab-solid-"+P]=P,e),"k-"+r.vertical+"-"+r.horizontal,a)}),[P,I,M,S,p,O,r,ge,a]),Ae=v&&v.map((function(e,t){return i.createElement(q,Z({},e,{key:t,index:t,id:Se+"-"+t,disabled:p||e.disabled,focused:ke===t,dataItem:e,item:g,className:Object(c.a)(e.className,(n=Oe||"ltr",o=r.horizontal,{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[n]["end"===o?"end":"start"])),onClick:Pe,onDown:_e}));var n,o})),Fe=f&&!b,ze=(le.current?le.current.offsetWidth:0)/2-16;return i.createElement(V.a.Provider,{value:ae},i.createElement(i.Fragment,null,i.createElement("button",Z({ref:le,id:m||Ce,role:v?"menubutton":"button",type:"button","aria-disabled":p,"aria-expanded":v?he:void 0,"aria-haspopup":!!v,"aria-label":(b||"")+" floatingactionbutton","aria-owns":v?Se:void 0,"aria-activedescendant":ke>=0&&v?Se+"-"+ke:void 0,tabIndex:Object(K.a)(j,p),accessKey:R,dir:Oe,disabled:p,className:Re,style:N,onClick:Ie,onMouseDown:Me,onFocus:Ne,onBlur:Te,onKeyDown:je},oe),f?i.createElement("span",{role:"presentation",className:Object(c.a)("k-fab-icon k-icon k-i-"+f)}):h?i.createElement("span",{role:"presentation",className:h}):null,b&&i.createElement("span",{className:"k-fab-text"},b)),z&&he&&i.createElement("div",{className:"k-overlay",style:Z({zIndex:ae},_)}),i.createElement(y.a,{ref:ue,anchor:le.current,show:he,animate:F.animate,popupClass:Object(c.a)("k-popup-transparent k-fab-popup",F.popupClass),anchorAlign:F.anchorAlign||G(r,xe),popupAlign:F.popupAlign||X(r,xe),style:{boxShadow:"none"}},i.createElement("ul",{ref:ce,role:"menu","aria-labelledby":m,id:Se,className:Object(c.a)("k-fab-items",{"k-fab-items-bottom":"bottom"!==r.vertical,"k-fab-items-top":"bottom"===r.vertical}),style:{paddingLeft:Fe?ze:void 0,paddingRight:Fe?ze:void 0}},Ae))))}));ee.propTypes={className:a.string,style:a.object,id:a.string,dir:a.string,tabIndex:a.number,accessKey:a.string,disabled:a.bool,icon:a.string,iconClass:a.string,text:a.string,alignOffset:a.shape({x:a.oneOfType([a.number,a.string]),y:a.oneOfType([a.number,a.string])}),align:a.shape({vertical:a.oneOf(["top","middle","bottom"]),horizontal:a.oneOf(["start","center","end"])}),positionMode:a.oneOf(["absolute","fixed"]),shape:a.oneOf([null,"rectangle","square"]),size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),themeColor:a.oneOf([null,"primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),modal:a.bool,overlayStyle:a.object};var te={align:{vertical:"bottom",horizontal:"end"},shape:"rectangle",size:"medium",rounded:"full",themeColor:"primary",positionMode:"fixed"};ee.displayName="KendoFloatingActionButton"},function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"getHtml",(function(){return Rt})),n.d(t,"setHtml",(function(){return At})),n.d(t,"parseContent",(function(){return jt})),n.d(t,"trimWhitespace",(function(){return Mt})),n.d(t,"htmlToFragment",(function(){return Dt})),n.d(t,"domToPmDoc",(function(){return _t})),n.d(t,"pmDocToFragment",(function(){return Pt})),n.d(t,"applyInlineStyle",(function(){return hn})),n.d(t,"getInlineStyles",(function(){return dn})),n.d(t,"toggleInlineFormat",(function(){return fn})),n.d(t,"applyLink",(function(){return vn})),n.d(t,"removeLink",(function(){return mn})),n.d(t,"insertText",(function(){return gn})),n.d(t,"insertImage",(function(){return yn})),n.d(t,"alignBlocks",(function(){return Nn})),n.d(t,"isAligned",(function(){return Tn})),n.d(t,"cleanFormatting",(function(){return Mn})),n.d(t,"hasNode",(function(){return Sn})),n.d(t,"activeNode",(function(){return In})),n.d(t,"formatBlockElements",(function(){return wn})),n.d(t,"getBlockFormats",(function(){return On})),n.d(t,"parentBlockFormat",(function(){return En})),n.d(t,"changeTextBlock",(function(){return bn})),n.d(t,"blockNodes",(function(){return kn})),n.d(t,"cleanTextBlockFormatting",(function(){return Cn})),n.d(t,"hasMark",(function(){return rn})),n.d(t,"getMark",(function(){return sn})),n.d(t,"getActiveMarks",(function(){return ln})),n.d(t,"removeAllMarks",(function(){return tn})),n.d(t,"cleanMarks",(function(){return nn})),n.d(t,"selectionMarks",(function(){return an})),n.d(t,"indent",(function(){return Ar})),n.d(t,"canIndentAsListItem",(function(){return _r})),n.d(t,"outdent",(function(){return Fr})),n.d(t,"canOutdentAsListItem",(function(){return jr})),n.d(t,"isIndented",(function(){return Pr})),n.d(t,"canBeIndented",(function(){return Rr})),n.d(t,"indentBlocks",(function(){return Dr})),n.d(t,"toggleOrderedList",(function(){return qr})),n.d(t,"toggleUnorderedList",(function(){return $r})),n.d(t,"toggleList",(function(){return Wr})),n.d(t,"listStyle",(function(){return Kr})),n.d(t,"blockquote",(function(){return Tr})),n.d(t,"liftBlockquote",(function(){return Mr})),n.d(t,"hasSameMarkup",(function(){return Wt})),n.d(t,"getSelectionText",(function(){return $t})),n.d(t,"getNodeFromSelection",(function(){return qt})),n.d(t,"selectedLineTextOnly",(function(){return Ut})),n.d(t,"expandSelection",(function(){return Jt})),n.d(t,"expandToWordWrap",(function(){return Yt})),n.d(t,"canInsert",(function(){return Bt})),n.d(t,"insertNode",(function(){return Kt})),n.d(t,"indentHtml",(function(){return Gt})),n.d(t,"alignLeftRules",(function(){return Gr})),n.d(t,"alignCenterRules",(function(){return Jr})),n.d(t,"alignRightRules",(function(){return Xr})),n.d(t,"alignJustifyRules",(function(){return Yr})),n.d(t,"alignRemoveRules",(function(){return Zr})),n.d(t,"indentRules",(function(){return qn})),n.d(t,"outdentRules",(function(){return Un})),n.d(t,"nodes",(function(){return Zl})),n.d(t,"marks",(function(){return $l})),n.d(t,"buildKeymap",(function(){return Hc})),n.d(t,"buildListKeymap",(function(){return Kc})),n.d(t,"bold",(function(){return jc})),n.d(t,"italic",(function(){return Rc})),n.d(t,"underline",(function(){return Ac})),n.d(t,"strikethrough",(function(){return Fc})),n.d(t,"subscript",(function(){return zc})),n.d(t,"superscript",(function(){return Lc})),n.d(t,"link",(function(){return Bc})),n.d(t,"sanitize",(function(){return Qc})),n.d(t,"removeComments",(function(){return eu})),n.d(t,"removeTag",(function(){return tu})),n.d(t,"pasteCleanup",(function(){return su})),n.d(t,"sanitizeClassAttr",(function(){return ru})),n.d(t,"sanitizeStyleAttr",(function(){return au})),n.d(t,"removeAttribute",(function(){return nu})),n.d(t,"replaceImageSourcesFromRtf",(function(){return mu})),n.d(t,"convertMsLists",(function(){return Zc})),n.d(t,"find",(function(){return gu})),n.d(t,"findAt",(function(){return vu})),n.d(t,"findAll",(function(){return yu})),n.d(t,"replace",(function(){return bu})),n.d(t,"replaceAll",(function(){return ku})),n.d(t,"placeholder",(function(){return xu})),n.d(t,"spacesFix",(function(){return Iu})),n.d(t,"textHighlight",(function(){return Tu})),n.d(t,"textHighlightKey",(function(){return Nu})),n.d(t,"imageResizing",(function(){return zu})),n.d(t,"imageResizeKey",(function(){return Pu})),n.d(t,"caretColor",(function(){return Bu})),n.d(t,"caretColorKey",(function(){return Lu})),n.d(t,"tableResizing",(function(){return vd})),n.d(t,"tableResizeKey",(function(){return $u})),n.d(t,"tableColumnResizeKey",(function(){return qu})),n.d(t,"tableRowResizeKey",(function(){return Uu})),n.d(t,"autoJoin",(function(){return wr})),n.d(t,"baseKeymap",(function(){return Nr})),n.d(t,"chainCommands",(function(){return Cr})),n.d(t,"createParagraphNear",(function(){return lr})),n.d(t,"deleteSelection",(function(){return Gn})),n.d(t,"exitCode",(function(){return sr})),n.d(t,"joinBackward",(function(){return Xn})),n.d(t,"joinDown",(function(){return rr})),n.d(t,"joinForward",(function(){return Qn})),n.d(t,"joinUp",(function(){return nr})),n.d(t,"lift",(function(){return or})),n.d(t,"liftEmptyBlock",(function(){return cr})),n.d(t,"macBaseKeymap",(function(){return Er})),n.d(t,"newlineInCode",(function(){return ir})),n.d(t,"pcBaseKeymap",(function(){return Sr})),n.d(t,"selectAll",(function(){return fr})),n.d(t,"selectNodeBackward",(function(){return Yn})),n.d(t,"selectNodeForward",(function(){return er})),n.d(t,"selectParentNode",(function(){return pr})),n.d(t,"selectTextblockEnd",(function(){return gr})),n.d(t,"selectTextblockStart",(function(){return vr})),n.d(t,"setBlockType",(function(){return br})),n.d(t,"splitBlock",(function(){return ur})),n.d(t,"splitBlockKeepMarks",(function(){return dr})),n.d(t,"toggleMark",(function(){return kr})),n.d(t,"wrapIn",(function(){return yr})),n.d(t,"dropCursor",(function(){return gd})),n.d(t,"GapCursor",(function(){return bd})),n.d(t,"gapCursor",(function(){return wd})),n.d(t,"HistoryState",(function(){return ic})),n.d(t,"closeHistory",(function(){return fc})),n.d(t,"history",(function(){return vc})),n.d(t,"redo",(function(){return yc})),n.d(t,"redoDepth",(function(){return kc})),n.d(t,"undo",(function(){return gc})),n.d(t,"undoDepth",(function(){return bc})),n.d(t,"InputRule",(function(){return wc})),n.d(t,"closeDoubleQuote",(function(){return Nc})),n.d(t,"closeSingleQuote",(function(){return Mc})),n.d(t,"ellipsis",(function(){return Ec})),n.d(t,"emDash",(function(){return Sc})),n.d(t,"inputRules",(function(){return Cc})),n.d(t,"openDoubleQuote",(function(){return Ic})),n.d(t,"openSingleQuote",(function(){return Tc})),n.d(t,"smartQuotes",(function(){return Dc})),n.d(t,"textblockTypeInputRule",(function(){return _c})),n.d(t,"undoInputRule",(function(){return xc})),n.d(t,"wrappingInputRule",(function(){return Pc})),n.d(t,"keydownHandler",(function(){return ho})),n.d(t,"keymap",(function(){return fo})),n.d(t,"ContentMatch",(function(){return _})),n.d(t,"DOMParser",(function(){return ee})),n.d(t,"DOMSerializer",(function(){return de})),n.d(t,"Fragment",(function(){return i})),n.d(t,"Mark",(function(){return u})),n.d(t,"MarkType",(function(){return Y})),n.d(t,"Node",(function(){return T})),n.d(t,"NodeRange",(function(){return E})),n.d(t,"NodeType",(function(){return U})),n.d(t,"ReplaceError",(function(){return d})),n.d(t,"ResolvedPos",(function(){return w})),n.d(t,"Schema",(function(){return Z})),n.d(t,"Slice",(function(){return p})),n.d(t,"addListNodes",(function(){return zn})),n.d(t,"bulletList",(function(){return Rn})),n.d(t,"liftListItem",(function(){return Vn})),n.d(t,"listItem",(function(){return An})),n.d(t,"orderedList",(function(){return jn})),n.d(t,"sinkListItem",(function(){return Hn})),n.d(t,"splitListItem",(function(){return Bn})),n.d(t,"wrapInList",(function(){return Ln})),n.d(t,"AllSelection",(function(){return lt})),n.d(t,"EditorState",(function(){return gt})),n.d(t,"NodeSelection",(function(){return at})),n.d(t,"Plugin",(function(){return kt})),n.d(t,"PluginKey",(function(){return Ot})),n.d(t,"Selection",(function(){return tt})),n.d(t,"SelectionRange",(function(){return rt})),n.d(t,"TextSelection",(function(){return ot})),n.d(t,"Transaction",(function(){return pt})),n.d(t,"TableMap",(function(){return ps})),n.d(t,"tableEditing",(function(){return Pl})),n.d(t,"tableEditingKey",(function(){return ys})),n.d(t,"tableNodeTypes",(function(){return gs})),n.d(t,"tableNodes",(function(){return vs})),n.d(t,"fixTables",(function(){return Zs})),n.d(t,"fixTablesKey",(function(){return Ys})),n.d(t,"isInTable",(function(){return ks})),n.d(t,"deleteTable",(function(){return Cl})),n.d(t,"inSameTable",(function(){return xs})),n.d(t,"CellSelection",(function(){return Ps})),n.d(t,"selectedRect",(function(){return Qs})),n.d(t,"selectionCell",(function(){return ws})),n.d(t,"setCellAttr",(function(){return ml})),n.d(t,"goToNextCell",(function(){return wl})),n.d(t,"toggleHeader",(function(){return gl})),n.d(t,"toggleHeaderCell",(function(){return kl})),n.d(t,"toggleHeaderColumn",(function(){return bl})),n.d(t,"toggleHeaderRow",(function(){return yl})),n.d(t,"splitCell",(function(){return fl})),n.d(t,"splitCellWithType",(function(){return hl})),n.d(t,"mergeCells",(function(){return pl})),n.d(t,"deleteColumn",(function(){return ol})),n.d(t,"deleteRow",(function(){return ul})),n.d(t,"rowIsHeader",(function(){return il})),n.d(t,"addRow",(function(){return al})),n.d(t,"addColSpan",(function(){return Ms})),n.d(t,"addColumn",(function(){return el})),n.d(t,"addColumnAfter",(function(){return nl})),n.d(t,"addColumnBefore",(function(){return tl})),n.d(t,"colCount",(function(){return Es})),n.d(t,"columnIsHeader",(function(){return Ds})),n.d(t,"columnResizing",(function(){return El})),n.d(t,"columnResizingPluginKey",(function(){return Sl})),n.d(t,"updateColumnsOnResize",(function(){return xl})),n.d(t,"cellAround",(function(){return bs})),n.d(t,"findCell",(function(){return Ss})),n.d(t,"removeColSpan",(function(){return Ts})),n.d(t,"moveCellForward",(function(){return Os})),n.d(t,"nextCell",(function(){return Is})),n.d(t,"AddMarkStep",(function(){return Be})),n.d(t,"MapResult",(function(){return ve})),n.d(t,"Mapping",(function(){return ye})),n.d(t,"RemoveMarkStep",(function(){return Ve})),n.d(t,"ReplaceAroundStep",(function(){return Ie})),n.d(t,"ReplaceStep",(function(){return Ee})),n.d(t,"Step",(function(){return xe})),n.d(t,"StepMap",(function(){return ge})),n.d(t,"StepResult",(function(){return Se})),n.d(t,"Transform",(function(){return ke})),n.d(t,"TransformError",(function(){return be})),n.d(t,"canJoin",(function(){return je})),n.d(t,"canSplit",(function(){return _e})),n.d(t,"dropPoint",(function(){return ze})),n.d(t,"findWrapping",(function(){return De})),n.d(t,"insertPoint",(function(){return Fe})),n.d(t,"joinPoint",(function(){return Ae})),n.d(t,"liftTarget",(function(){return Me})),n.d(t,"replaceStep",(function(){return He})),n.d(t,"Decoration",(function(){return Fa})),n.d(t,"DecorationSet",(function(){return Va})),n.d(t,"EditorView",(function(){return es})),n.d(t,"__endComposition",(function(){return Ia})),n.d(t,"__parseFromClipboard",(function(){return Ji})),n.d(t,"__serializeForClipboard",(function(){return Xi})),n.d(t,"createTable",(function(){return Id})),n.d(t,"addRowAfter",(function(){return Md})),n.d(t,"addRowBefore",(function(){return Td})),n.d(t,"pmAddRowAfter",(function(){return ll})),n.d(t,"pmAddRowBefore",(function(){return sl})),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var o=n&&n!=e?this.remove(n):this,i=o.find(e),a=o.content.slice();return-1==i?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new r(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var o=this.remove(t),i=o.content.slice(),a=o.find(e);return i.splice(-1==a?i.length:a,0,t,n),new r(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;n<e.length;n++)this.size+=e[n].nodeSize},a={firstChild:{configurable:!0},lastChild:{configurable:!0},childCount:{configurable:!0}};i.prototype.nodesBetween=function(e,t,n,r,o){void 0===r&&(r=0);for(var i=0,a=0;a<t;i++){var s=this.content[i],l=a+s.nodeSize;if(l>e&&!1!==n(s,r+a,o,i)&&s.content.size){var c=a+1;s.nodesBetween(Math.max(0,e-c),Math.min(s.content.size,t-c),n,r+c)}a=l}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+="function"==typeof r?r(a):r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new i(r,this.size+e.size)},i.prototype.cut=function(e,t){if(null==t&&(t=this.size),0==e&&t==this.size)return this;var n=[],r=0;if(t>e)for(var o=0,a=0;a<t;o++){var s=this.content[o],l=a+s.nodeSize;l>e&&((a<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=l}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0},a.firstChild.get=function(){return this.content.length?this.content[0]:null},a.lastChild.get=function(){return this.content.length?this.content[this.content.length-1]:null},a.childCount.get=function(){return this.content.length},i.prototype.child=function(e){var t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t},i.prototype.maybeChild=function(e){return this.content[e]},i.prototype.forEach=function(e){for(var t=0,n=0;t<this.content.length;t++){var r=this.content[t];e(r,n,t),n+=r.nodeSize}},i.prototype.findDiffStart=function(e,t){return void 0===t&&(t=0),function e(t,n,r){for(var o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;var i=t.child(o),a=n.child(o);if(i!=a){if(!i.sameMarkup(a))return r;if(i.isText&&i.text!=a.text){for(var s=0;i.text[s]==a.text[s];s++)r++;return r}if(i.content.size||a.content.size){var l=e(i.content,a.content,r+1);if(null!=l)return l}r+=i.nodeSize}else r+=i.nodeSize}}(this,e,t)},i.prototype.findDiffEnd=function(e,t,n){return void 0===t&&(t=this.size),void 0===n&&(n=e.size),function e(t,n,r,o){for(var i=t.childCount,a=n.childCount;;){if(0==i||0==a)return i==a?null:{a:r,b:o};var s=t.child(--i),l=n.child(--a),c=s.nodeSize;if(s!=l){if(!s.sameMarkup(l))return{a:r,b:o};if(s.isText&&s.text!=l.text){for(var u=0,d=Math.min(s.text.length,l.text.length);u<d&&s.text[s.text.length-u-1]==l.text[l.text.length-u-1];)u++,r--,o--;return{a:r,b:o}}if(s.content.size||l.content.size){var p=e(s.content,l.content,r-1,o-1);if(p)return p}r-=c,o-=c}else r-=c,o-=c}}(this,e,t,n)},i.prototype.findIndex=function(e,t){if(void 0===t&&(t=-1),0==e)return l(0,e);if(e==this.size)return l(this.content.length,e);if(e>this.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?l(n+1,o):l(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;r<e.length;r++){var o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new i(t||e,n)},i.from=function(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))},Object.defineProperties(i.prototype,a);var s={index:0,offset:0};function l(e,t){return s.index=e,s.offset=t,s}function c(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!c(e[r],t[r]))return!1}else{for(var o in e)if(!(o in t)||!c(e[o],t[o]))return!1;for(var i in t)if(!(i in e))return!1}return!0}i.empty=new i([],0);var u=function(e,t){this.type=e,this.attrs=t};function d(e){var t=Error.call(this,e);return t.__proto__=d.prototype,t}u.prototype.addToSet=function(e){for(var t,n=!1,r=0;r<e.length;r++){var o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},u.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e},u.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1},u.prototype.eq=function(e){return this==e||this.type==e.type&&c(this.attrs,e.attrs)},u.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return e},u.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");var n=e.marks[t.type];if(!n)throw new RangeError("There is no mark type "+t.type+" in this schema");return n.create(t.attrs)},u.sameSet=function(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0},u.setFrom=function(e){if(!e||0==e.length)return u.none;if(e instanceof u)return[e];var t=e.slice();return t.sort((function(e,t){return e.type.rank-t.type.rank})),t},u.none=[],d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d.prototype.name="ReplaceError";var p=function(e,t,n){this.content=e,this.openStart=t,this.openEnd=n},f={size:{configurable:!0}};function h(e,t,n){if(n.openStart>e.depth)throw new d("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new d("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o<t.depth-r.openStart){var l=e(t,n,r,o+1);return s.copy(s.content.replaceChild(a,l))}if(r.content.size){if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){var c=function(e,t){for(var n=t.depth-e.openStart,r=t.node(n).copy(e.content),o=n-1;o>=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),u=c.start,d=c.end;return b(s,function e(t,n,r,o,a){var s=t.depth>a&&v(t,n,a+1),l=o.depth>a&&v(r,o,a+1),c=[];y(null,t,a,c),s&&l&&n.index(a)==r.index(a)?(m(s,l),g(b(s,e(t,n,r,o,a+1)),c)):(s&&g(b(s,k(t,n,a+1)),c),y(n,r,a,c),l&&g(b(l,k(r,o,a+1)),c));return y(o,null,a,c),new i(c)}(t,u,d,n,o))}var p=t.parent,f=p.content;return b(p,f.cut(0,t.parentOffset).append(r.content).append(f.cut(n.parentOffset)))}return b(s,k(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new d("Cannot join "+t.type.name+" onto "+e.type.name)}function v(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function g(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function y(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(g(e.nodeAfter,r),i++));for(var s=i;s<a;s++)g(o.child(s),r);t&&t.depth==n&&t.textOffset&&g(t.nodeBefore,r)}function b(e,t){if(!e.type.validContent(t))throw new d("Invalid content for node "+e.type.name);return e.copy(t)}function k(e,t,n){var r=[];(y(null,e,n,r),e.depth>n)&&g(b(v(e,t,n+1),k(e,t,n+1)),r);return y(t,null,n,r),new i(r)}f.size.get=function(){return this.content.size-this.openStart-this.openEnd},p.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,l=t.maybeChild(a);if(s==n||l.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var c=e(l.content,n-s-1,r);return c&&t.replaceChild(a,l.copy(c))}(this.content,e+this.openStart,t,null);return n&&new p(n,this.openStart,this.openEnd)},p.prototype.removeBetween=function(e,t){return new p(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),l=t.findIndex(r),c=l.index,u=l.offset;if(a==n||s.isText){if(u!=r&&!t.child(c).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=c)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},p.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},p.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},p.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},p.fromJSON=function(e,t){if(!t)return p.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(i.fromJSON(e,t.content),n,r)},p.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new p(e,n,r)},Object.defineProperties(p.prototype,f),p.empty=new p(i.empty,0,0);var w=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},C={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};w.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},C.parent.get=function(){return this.node(this.depth)},C.doc.get=function(){return this.node(0)},w.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},w.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},w.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},w.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},w.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},w.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},w.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},C.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},C.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},C.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},w.prototype.posAtIndex=function(e,t){t=this.resolveDepth(t);for(var n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1,o=0;o<e;o++)r+=n.child(o).nodeSize;return r},w.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a<i.length;a++)!1!==i[a].type.spec.inclusive||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i},w.prototype.marksAcross=function(e){var t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;for(var n=t.marks,r=e.parent.maybeChild(e.index()),o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n},w.prototype.sharedDepth=function(e){for(var t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},w.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos<this.pos)return e.blockRange(this);for(var n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new E(this,e,n)},w.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},w.prototype.max=function(e){return e.pos>this.pos?e:this},w.prototype.min=function(e){return e.pos<this.pos?e:this},w.prototype.toString=function(){for(var e="",t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset},w.resolve=function(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,l=a.offset,c=o-l;if(n.push(i,s,r+l),!c)break;if((i=i.child(s)).isText)break;o=c-1,r+=l+1}return new w(t,n,o)},w.resolveCached=function(e,t){for(var n=0;n<O.length;n++){var r=O[n];if(r.pos==t&&r.doc==e)return r}var o=O[x]=w.resolve(e,t);return x=(x+1)%S,o},Object.defineProperties(w.prototype,C);var O=[],x=0,S=12,E=function(e,t,n){this.$from=e,this.$to=t,this.depth=n},I={start:{configurable:!0},end:{configurable:!0},parent:{configurable:!0},startIndex:{configurable:!0},endIndex:{configurable:!0}};I.start.get=function(){return this.$from.before(this.depth+1)},I.end.get=function(){return this.$to.after(this.depth+1)},I.parent.get=function(){return this.$from.node(this.depth)},I.startIndex.get=function(){return this.$from.index(this.depth)},I.endIndex.get=function(){return this.$to.indexAfter(this.depth)},Object.defineProperties(E.prototype,I);var N=Object.create(null),T=function(e,t,n,r){this.type=e,this.attrs=t,this.content=n||i.empty,this.marks=r||u.none},M={nodeSize:{configurable:!0},childCount:{configurable:!0},textContent:{configurable:!0},firstChild:{configurable:!0},lastChild:{configurable:!0},isBlock:{configurable:!0},isTextblock:{configurable:!0},inlineContent:{configurable:!0},isInline:{configurable:!0},isText:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0}};M.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},M.childCount.get=function(){return this.content.childCount},T.prototype.child=function(e){return this.content.child(e)},T.prototype.maybeChild=function(e){return this.content.maybeChild(e)},T.prototype.forEach=function(e){this.content.forEach(e)},T.prototype.nodesBetween=function(e,t,n,r){void 0===r&&(r=0),this.content.nodesBetween(e,t,n,r,this)},T.prototype.descendants=function(e){this.nodesBetween(0,this.content.size,e)},M.textContent.get=function(){return this.textBetween(0,this.content.size,"")},T.prototype.textBetween=function(e,t,n,r){return this.content.textBetween(e,t,n,r)},M.firstChild.get=function(){return this.content.firstChild},M.lastChild.get=function(){return this.content.lastChild},T.prototype.eq=function(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)},T.prototype.sameMarkup=function(e){return this.hasMarkup(e.type,e.attrs,e.marks)},T.prototype.hasMarkup=function(e,t,n){return this.type==e&&c(this.attrs,t||e.defaultAttrs||N)&&u.sameSet(this.marks,n||u.none)},T.prototype.copy=function(e){return void 0===e&&(e=null),e==this.content?this:new this.constructor(this.type,this.attrs,e,this.marks)},T.prototype.mark=function(e){return e==this.marks?this:new this.constructor(this.type,this.attrs,this.content,e)},T.prototype.cut=function(e,t){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))},T.prototype.slice=function(e,t,n){if(void 0===t&&(t=this.content.size),void 0===n&&(n=!1),e==t)return p.empty;var r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),a=r.start(i),s=r.node(i).content.cut(r.pos-a,o.pos-a);return new p(s,r.depth-i,o.depth-i)},T.prototype.replace=function(e,t,n){return h(this.resolve(e),this.resolve(t),n)},T.prototype.nodeAt=function(e){for(var t=this;;){var n=t.content.findIndex(e),r=n.index,o=n.offset;if(!(t=t.maybeChild(r)))return null;if(o==e||t.isText)return t;e-=o+1}},T.prototype.childAfter=function(e){var t=this.content.findIndex(e),n=t.index,r=t.offset;return{node:this.content.maybeChild(n),index:n,offset:r}},T.prototype.childBefore=function(e){if(0==e)return{node:null,index:0,offset:0};var t=this.content.findIndex(e),n=t.index,r=t.offset;if(r<e)return{node:this.content.child(n),index:n,offset:r};var o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}},T.prototype.resolve=function(e){return w.resolveCached(this,e)},T.prototype.resolveNoCache=function(e){return w.resolve(this,e)},T.prototype.rangeHasMark=function(e,t,n){var r=!1;return t>e&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},M.isBlock.get=function(){return this.type.isBlock},M.isTextblock.get=function(){return this.type.isTextblock},M.inlineContent.get=function(){return this.type.inlineContent},M.isInline.get=function(){return this.type.isInline},M.isText.get=function(){return this.type.isText},M.isLeaf.get=function(){return this.type.isLeaf},M.isAtom.get=function(){return this.type.isAtom},T.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),P(this.marks,e)},T.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},T.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0},T.prototype.canReplaceWith=function(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;var o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd},T.prototype.canAppend=function(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)},T.prototype.check=function(){if(!this.type.validContent(this.content))throw new RangeError("Invalid content for node "+this.type.name+": "+this.content.toString().slice(0,50));for(var e=u.none,t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!u.sameSet(e,this.marks))throw new RangeError("Invalid collection of marks for node "+this.type.name+": "+this.marks.map((function(e){return e.type.name})));this.content.forEach((function(e){return e.check()}))},T.prototype.toJSON=function(){var e={type:this.type.name};for(var t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((function(e){return e.toJSON()}))),e},T.fromJSON=function(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");var n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}var r=i.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)},Object.defineProperties(T.prototype,M);var D=function(e){function t(t,n,r,o){if(e.call(this,t,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={textContent:{configurable:!0},nodeSize:{configurable:!0}};return t.prototype.toString=function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):P(this.marks,JSON.stringify(this.text))},n.textContent.get=function(){return this.text},t.prototype.textBetween=function(e,t){return this.text.slice(e,t)},n.nodeSize.get=function(){return this.text.length},t.prototype.mark=function(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)},t.prototype.withText=function(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)},t.prototype.cut=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.text.length),0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))},t.prototype.eq=function(e){return this.sameMarkup(e)&&this.text==e.text},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.text=this.text,t},Object.defineProperties(t.prototype,n),t}(T);function P(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var _=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},j={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};_.parse=function(e,t){var n=new R(e,t);if(null==n.next)return _.empty;var r=F(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];K(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new _(r.indexOf(e.length-1)>-1),a=0;a<o.length;a+=2){var s=o[a+1].sort(H);i.next.push(o[a],t[s.join(",")]||n(s))}return i}(K(e,0))}(function(e){var t=[[]];return o(function e(t,i){if("choice"==t.type)return t.exprs.reduce((function(t,n){return t.concat(e(n,i))}),[]);if("seq"==t.type)for(var a=0;;a++){var s=e(t.exprs[a],i);if(a==t.exprs.length-1)return s;o(s,i=n())}else{if("star"==t.type){var l=n();return r(i,l),o(e(t.expr,l),l),[r(l)]}if("plus"==t.type){var c=n();return o(e(t.expr,i),c),o(e(t.expr,c),c),[r(c)]}if("opt"==t.type)return[r(i)].concat(e(t.expr,i));if("range"==t.type){for(var u=i,d=0;d<t.min;d++){var p=n();o(e(t.expr,u),p),u=p}if(-1==t.max)o(e(t.expr,u),u);else for(var f=t.min;f<t.max;f++){var h=n();r(u,h),o(e(t.expr,u),h),u=h}return[r(u)]}if("name"==t.type)return[r(i,null,t.value)]}}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){var o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((function(e){return e.to=t}))}}(r));return function(e,t){for(var n=0,r=[e];n<r.length;n++){for(var o=r[n],i=!o.validEnd,a=[],s=0;s<o.next.length;s+=2){var l=o.next[s],c=o.next[s+1];a.push(l.name),!i||l.isText||l.hasRequiredAttrs()||(i=!1),-1==r.indexOf(c)&&r.push(c)}i&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o},_.prototype.matchType=function(e){for(var t=0;t<this.next.length;t+=2)if(this.next[t]==e)return this.next[t+1];return null},_.prototype.matchFragment=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.childCount);for(var r=this,o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r},j.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},j.defaultType.get=function(){for(var e=0;e<this.next.length;e+=2){var t=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}},_.prototype.compatible=function(e){for(var t=0;t<this.next.length;t+=2)for(var n=0;n<e.next.length;n+=2)if(this.next[t]==e.next[n])return!0;return!1},_.prototype.fillBefore=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=0);var r=[this];return function o(a,s){var l=a.matchFragment(e,n);if(l&&(!t||l.validEnd))return i.from(s.map((function(e){return e.createAndFill()})));for(var c=0;c<a.next.length;c+=2){var u=a.next[c],d=a.next[c+1];if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(d)){r.push(d);var p=o(d,s.concat(u));if(p)return p}}}(this,[])},_.prototype.findWrapping=function(e){for(var t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];var n=this.computeWrapping(e);return this.wrapCache.push(e,n),n},_.prototype.computeWrapping=function(e){for(var t=Object.create(null),n=[{match:this,type:null,via:null}];n.length;){var r=n.shift(),o=r.match;if(o.matchType(e)){for(var i=[],a=r;a.type;a=a.via)i.push(a.type);return i.reverse()}for(var s=0;s<o.next.length;s+=2){var l=o.next[s];l.isLeaf||l.hasRequiredAttrs()||l.name in t||r.type&&!o.next[s+1].validEnd||(n.push({match:l.contentMatch,type:l,via:r}),t[l.name]=!0)}}},j.edgeCount.get=function(){return this.next.length>>1},_.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},_.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r<n.next.length;r+=2)-1==e.indexOf(n.next[r])&&t(n.next[r])}(this),e.map((function(t,n){for(var r=n+(t.validEnd?"*":" ")+" ",o=0;o<t.next.length;o+=2)r+=(o?", ":"")+t.next[o].name+"->"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(_.prototype,j),_.empty=new _(!0);var R=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()},A={next:{configurable:!0}};function F(e){var t=[];do{t.push(z(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function z(e){var t=[];do{t.push(L(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function L(e){for(var t=function(e){if(e.eat("(")){var t=F(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=V(e,t)}return t}function B(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function V(e,t){var n=B(e),r=n;return e.eat(",")&&(r="}"!=e.next?B(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function H(e,t){return t-e}function K(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i<o.length;i++){var a=o[i],s=a.term,l=a.to;s||-1!=n.indexOf(l)||t(l)}}(t),n.sort(H)}function W(e){var t=Object.create(null);for(var n in e){var r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function $(e,t){var n=Object.create(null);for(var r in e){var o=t&&t[r];if(void 0===o){var i=e[r];if(!i.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=i.default}n[r]=o}return n}function q(e){var t=Object.create(null);if(e)for(var n in e)t[n]=new X(e[n]);return t}A.next.get=function(){return this.tokens[this.pos]},R.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},R.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(R.prototype,A);var U=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=q(n.attrs),this.defaultAttrs=W(this.attrs),this.contentMatch=null,this.markSet=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e},G={isInline:{configurable:!0},isTextblock:{configurable:!0},isLeaf:{configurable:!0},isAtom:{configurable:!0},whitespace:{configurable:!0}};G.isInline.get=function(){return!this.isBlock},G.isTextblock.get=function(){return this.isBlock&&this.inlineContent},G.isLeaf.get=function(){return this.contentMatch==_.empty},G.isAtom.get=function(){return this.isLeaf||this.spec.atom},G.whitespace.get=function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")},U.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},U.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},U.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:$(this.attrs,e)},U.prototype.create=function(e,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new T(this,this.computeAttrs(e),i.from(t),u.setFrom(n))},U.prototype.createChecked=function(e,t,n){if(t=i.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new T(this,this.computeAttrs(e),t,u.setFrom(n))},U.prototype.createAndFill=function(e,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){var r=this.contentMatch.fillBefore(t);if(!r)return null;t=r.append(t)}var o=this.contentMatch.matchFragment(t).fillBefore(i.empty,!0);return o?new T(this,e,t.append(o),u.setFrom(n)):null},U.prototype.validContent=function(e){var t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(var n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0},U.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},U.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0},U.prototype.allowedMarks=function(e){if(null==this.markSet)return e;for(var t,n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:u.empty:e},U.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new U(e,t,r)}));var r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(var o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n},Object.defineProperties(U.prototype,G);var X=function(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default},J={isRequired:{configurable:!0}};J.isRequired.get=function(){return!this.hasDefault},Object.defineProperties(X.prototype,J);var Y=function(e,t,n,r){this.name=e,this.schema=n,this.spec=r,this.attrs=q(r.attrs),this.rank=t,this.excluded=null;var o=W(this.attrs);this.instance=o&&new u(this,o)};Y.prototype.create=function(e){return!e&&this.instance?this.instance:new u(this,$(this.attrs,e))},Y.compile=function(e,t){var n=Object.create(null),r=0;return e.forEach((function(e,o){return n[e]=new Y(e,r++,t,o)})),n},Y.prototype.removeFromSet=function(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e},Y.prototype.isInSet=function(e){for(var t=0;t<e.length;t++)if(e[t].type==this)return e[t]},Y.prototype.excludes=function(e){return this.excluded.indexOf(e)>-1};var Z=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.from(e.nodes),this.spec.marks=o.from(e.marks),this.nodes=U.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=_.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?Q(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var l in this.marks){var c=this.marks[l],u=c.spec.excludes;c.excluded=null==u?[c]:""==u?[]:Q(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Q(e,t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=e.marks[o],a=i;if(i)n.push(i);else for(var s in e.marks){var l=e.marks[s];("_"==o||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}Z.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof U))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Z.prototype.text=function(e,t){var n=this.nodes.text;return new D(n,n.defaultAttrs,e,u.setFrom(t))},Z.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Z.prototype.nodeFromJSON=function(e){return T.fromJSON(this,e)},Z.prototype.markFromJSON=function(e){return u.fromJSON(this,e)},Z.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)})),this.normalizeLists=!this.tags.some((function(t){if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;var n=e.nodes[t.node];return n.contentMatch.matchType(n)}))};ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),p.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t,n){for(var r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){var o=this.tags[r];if(le(e,o.tag)&&(void 0===o.namespace||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){var i=o.getAttrs(e);if(!1===i)continue;o.attrs=i}return o}}},ee.prototype.matchStyle=function(e,t,n,r){for(var o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){var i=this.styles[o];if(!(0!=i.style.indexOf(e)||i.context&&!n.matchesContext(i.context)||i.style.length>e.length&&(61!=i.style.charCodeAt(e.length)||i.style.slice(e.length+1)!=t))){if(i.getAttrs){var a=i.getAttrs(t);if(!1===a)continue;i.attrs=a}return i}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r<t.length;r++){var o=t[r];if((null==o.priority?50:o.priority)<n)break}t.splice(r,0,e)}var r=function(t){var r=e.marks[t].spec.parseDOM;r&&r.forEach((function(e){n(e=ce(e)),e.mark=t}))};for(var o in e.marks)r(o);var i;for(var a in e.nodes)i=void 0,(i=e.nodes[a].spec.parseDOM)&&i.forEach((function(e){n(e=ce(e)),e.node=a}));return t},ee.fromSchema=function(e){return e.cached.domParser||(e.cached.domParser=new ee(e,ee.schemaRules(e)))};var te={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},ne={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},re={ol:!0,ul:!0};function oe(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}var ie=function(e,t,n,r,o,i,a){this.type=e,this.attrs=t,this.solid=o,this.match=i||(4&a?null:e.contentMatch),this.options=a,this.content=[],this.marks=n,this.activeMarks=u.none,this.pendingMarks=r,this.stashMarks=[]};ie.prototype.findWrapping=function(e){if(!this.match){if(!this.type)return[];var t=this.type.contentMatch.fillBefore(i.from(e));if(!t){var n,r=this.type.contentMatch;return(n=r.findWrapping(e.type))?(this.match=r,n):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)},ie.prototype.finish=function(e){if(!(1&this.options)){var t,n=this.content[this.content.length-1];n&&n.isText&&(t=/[ \t\r\n\u000c]+$/.exec(n.text))&&(n.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length)))}var r=i.from(this.content);return!e&&this.match&&(r=r.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r},ie.prototype.popFromStashMark=function(e){for(var t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]},ie.prototype.applyPending=function(e){for(var t=0,n=this.pendingMarks;t<n.length;t++){var r=n[t];(this.type?this.type.allowsMarkType(r.type):ue(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}},ie.prototype.inlineContext=function(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!te.hasOwnProperty(e.parentNode.nodeName.toLowerCase())};var ae=function(e,t,n){this.parser=e,this.options=t,this.isOpen=n;var r,o=t.topNode,i=oe(null,t.preserveWhitespace,0)|(n?4:0);r=o?new ie(o.type,o.attrs,u.none,u.none,!0,t.topMatch||o.type.contentMatch,i):new ie(n?null:e.schema.topNodeType,null,u.none,u.none,!0,null,i),this.nodes=[r],this.open=0,this.find=t.findPositions,this.needsBlock=!1},se={top:{configurable:!0},currentPos:{configurable:!0}};function le(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function ce(e){var t={};for(var n in e)t[n]=e[n];return t}function ue(e,t){var n=t.schema.nodes,r=function(r){var o=n[r];if(o.allowsMarkType(e)){var i=[],a=function(e){i.push(e);for(var n=0;n<e.edgeCount;n++){var r=e.edge(n),o=r.type,s=r.next;if(o==t)return!0;if(i.indexOf(s)<0&&a(s))return!0}};return a(o.contentMatch)?{v:!0}:void 0}};for(var o in n){var i=r(o);if(i)return i.v}}se.top.get=function(){return this.nodes[this.open]},ae.prototype.addDOM=function(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){var t=e.getAttribute("style"),n=t?this.readStyles(function(e){var t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(var o=0;o<n.length;o++)this.addPendingMark(n[o]);if(this.addElement(e),null!=n)for(var i=0;i<n.length;i++)this.removePendingMark(n[i],r)}},ae.prototype.addTextNode=function(e){var t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){var r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)},ae.prototype.addElement=function(e,t){var n,r=e.nodeName.toLowerCase();re.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(var t=e.firstChild,n=null;t;t=t.nextSibling){var r=1==t.nodeType?t.nodeName.toLowerCase():null;r&&re.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):"li"==r?n=t:r&&(n=null)}}(e);var o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:ne.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);var i,a=this.top,s=this.needsBlock;if(te.hasOwnProperty(r))i=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),i&&this.sync(a),this.needsBlock=s}else this.addElementByRule(e,o,!1===o.consuming?n:null)},ae.prototype.leafFallback=function(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))},ae.prototype.ignoreFallback=function(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))},ae.prototype.readStyles=function(e){var t=u.none;e:for(var n=0;n<e.length;n+=2)for(var r=null;;){var o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t},ae.prototype.addElementByRule=function(e,t,n){var r,o,i,a=this;t.node?(o=this.parser.schema.nodes[t.node]).isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs,t.preserveWhitespace):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));var s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((function(e){return a.insertNode(e)}));else{var l=t.contentElement;"string"==typeof l?l=e.querySelector(l):"function"==typeof l&&(l=l(e)),l||(l=e),this.findAround(e,l,!0),this.addAll(l,r)}r&&(this.sync(s),this.open--),i&&this.removePendingMark(i,s)},ae.prototype.addAll=function(e,t,n,r){for(var o=n||0,i=n?e.childNodes[n]:e.firstChild,a=null==r?null:e.childNodes[r];i!=a;i=i.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(i),t&&te.hasOwnProperty(i.nodeName.toLowerCase())&&this.sync(t);this.findAtPoint(e,o)},ae.prototype.findPlace=function(e){for(var t,n,r=this.open;r>=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;a<t.length;a++)this.enterInner(t[a],null,!1);return!0},ae.prototype.insertNode=function(e){if(e.isInline&&this.needsBlock&&!this.top.type){var t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();var n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));for(var r=n.activeMarks,o=0;o<e.marks.length;o++)n.type&&!n.type.allowsMarkType(e.marks[o].type)||(r=e.marks[o].addToSet(r));return n.content.push(e.mark(r)),!0}return!1},ae.prototype.enter=function(e,t,n){var r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r},ae.prototype.enterInner=function(e,t,n,r){this.closeExtra();var o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e,t);var i=oe(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new ie(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++},ae.prototype.closeExtra=function(e){var t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},se.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ae.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)},ae.prototype.findInside=function(e){if(this.find)for(var t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)},ae.prototype.findAround=function(e,t,n){if(e!=t&&this.find)for(var r=0;r<this.find.length;r++){if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node))t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}},ae.prototype.findInText=function(e){if(this.find)for(var t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))},ae.prototype.matchesContext=function(e){var t=this;if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(e,s){for(;e>=0;e--){var l=n[e];if(""==l){if(e==n.length-1||0==e)continue;for(;s>=i;s--)if(a(e-1,s))return!0;return!1}var c=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!c||c.name!=l&&-1==c.groups.indexOf(l))return!1;s--}return!0};return a(n.length-1,this.open)},ae.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},ae.prototype.addPendingMark=function(e){var t=function(e,t){for(var n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ae.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);var o=r.popFromStashMark(e);o&&r.type&&r.type.allowsMarkType(o.type)&&(r.activeMarks=o.addToSet(r.activeMarks))}if(r==t)break}},Object.defineProperties(ae.prototype,se);var de=function(e,t){this.nodes=e||{},this.marks=t||{}};function pe(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function fe(e){return e.document||window.document}de.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=fe(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n<i.length&&a<e.marks.length;){var s=e.marks[a];if(r.marks[s.type.name]){if(!s.eq(i[n])||!1===s.type.spec.spanning)break;n+=2,a++}else a++}for(;n<i.length;)o=i.pop(),i.pop();for(;a<e.marks.length;){var l=e.marks[a++],c=r.serializeMark(l,e.isInline,t);c&&(i.push(l,o),o.appendChild(c.dom),o=c.contentDOM||c.dom)}}o.appendChild(r.serializeNodeInner(e,t))})),n},de.prototype.serializeNodeInner=function(e,t){void 0===t&&(t={});var n=de.renderSpec(fe(t),this.nodes[e.type.name](e)),r=n.dom,o=n.contentDOM;if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");t.onContent?t.onContent(e,o,t):this.serializeFragment(e.content,t,o)}return r},de.prototype.serializeNode=function(e,t){void 0===t&&(t={});for(var n=this.serializeNodeInner(e,t),r=e.marks.length-1;r>=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},de.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&de.renderSpec(fe(n),r(e,t))},de.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],l=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var c in l=2,s)if(null!=s[c]){var u=c.indexOf(" ");u>0?a.setAttributeNS(c.slice(0,u),c.slice(u+1),s[c]):a.setAttribute(c,s[c])}for(var d=l;d<t.length;d++){var p=t[d];if(0===p){if(d<t.length-1||d>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var f=de.renderSpec(e,p,n),h=f.dom,m=f.contentDOM;if(a.appendChild(h),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:a,contentDOM:i}},de.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new de(this.nodesFromSchema(e),this.marksFromSchema(e)))},de.nodesFromSchema=function(e){var t=pe(e.nodes);return t.text||(t.text=function(e){return e.text}),t},de.marksFromSchema=function(e){return pe(e.marks)};var he=Math.pow(2,16);function me(e){return 65535&e}var ve=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n},ge=function e(t,n){if(void 0===n&&(n=!1),!t.length&&e.empty)return e.empty;this.ranges=t,this.inverted=n};ge.prototype.recover=function(e){var t=0,n=me(e);if(!this.inverted)for(var r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/he}(e)},ge.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},ge.prototype.map=function(e,t){return void 0===t&&(t=1),this._map(e,t,!0)},ge.prototype._map=function(e,t,n){for(var r=0,o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?r:0);if(s>e)break;var l=this.ranges[a+o],c=this.ranges[a+i],u=s+l;if(e<=u){var d=s+r+((l?e==s?-1:e==u?1:t:t)<0?0:c);if(n)return d;var p=e==(t<0?s:u)?null:a/3+(e-s)*he;return new ve(d,t<0?e!=s:e!=u,p)}r+=c-l}return n?e+r:new ve(e+r)},ge.prototype.touches=function(e,t){for(var n=0,r=me(t),o=this.inverted?2:1,i=this.inverted?1:2,a=0;a<this.ranges.length;a+=3){var s=this.ranges[a]-(this.inverted?n:0);if(s>e)break;var l=this.ranges[a+o];if(e<=s+l&&a==3*r)return!0;n+=this.ranges[a+i]-l}return!1},ge.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r<this.ranges.length;r+=3){var i=this.ranges[r],a=i-(this.inverted?o:0),s=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(a,a+l,s,s+c),o+=c-l}},ge.prototype.invert=function(){return new ge(this.ranges,!this.inverted)},ge.prototype.toString=function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)},ge.offset=function(e){return 0==e?ge.empty:new ge(e<0?[0,-e,0]:[0,0,e])},ge.empty=new ge([]);var ye=function(e,t,n,r){this.maps=e||[],this.from=n||0,this.to=null==r?this.maps.length:r,this.mirror=t};function be(e){var t=Error.call(this,e);return t.__proto__=be.prototype,t}ye.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.maps.length),new ye(this.maps,this.mirror,e,t)},ye.prototype.copy=function(){return new ye(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)},ye.prototype.appendMap=function(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)},ye.prototype.appendMapping=function(e){for(var t=0,n=this.maps.length;t<e.maps.length;t++){var r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:null)}},ye.prototype.getMirror=function(e){if(this.mirror)for(var t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]},ye.prototype.setMirror=function(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)},ye.prototype.appendMappingInverted=function(e){for(var t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},ye.prototype.invert=function(){var e=new ye;return e.appendMappingInverted(this),e},ye.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e},ye.prototype.mapResult=function(e,t){return void 0===t&&(t=1),this._map(e,t,!1)},ye.prototype._map=function(e,t,n){for(var r=!1,o=this.from;o<this.to;o++){var i=this.maps[o].mapResult(e,t);if(null!=i.recover){var a=this.getMirror(o);if(null!=a&&a>o&&a<this.to){o=a,e=this.maps[a].recover(i.recover);continue}}i.deleted&&(r=!0),e=i.pos}return n?e:new ve(e,r)},be.prototype=Object.create(Error.prototype),be.prototype.constructor=be,be.prototype.name="TransformError";var ke=function(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ye},we={before:{configurable:!0},docChanged:{configurable:!0}};function Ce(){throw new Error("Override me")}we.before.get=function(){return this.docs.length?this.docs[0]:this.doc},ke.prototype.step=function(e){var t=this.maybeStep(e);if(t.failed)throw new be(t.failed);return this},ke.prototype.maybeStep=function(e){var t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t},we.docChanged.get=function(){return this.steps.length>0},ke.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(ke.prototype,we);var Oe=Object.create(null),xe=function(){};xe.prototype.apply=function(e){return Ce()},xe.prototype.getMap=function(){return ge.empty},xe.prototype.invert=function(e){return Ce()},xe.prototype.map=function(e){return Ce()},xe.prototype.merge=function(e){return null},xe.prototype.toJSON=function(){return Ce()},xe.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=Oe[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},xe.jsonID=function(e,t){if(e in Oe)throw new RangeError("Duplicate use of step JSON ID "+e);return Oe[e]=t,t.prototype.jsonID=e,t};var Se=function(e,t){this.doc=e,this.failed=t};Se.ok=function(e){return new Se(e,null)},Se.fail=function(e){return new Se(null,e)},Se.fromReplace=function(e,t,n,r){try{return Se.ok(e.replace(t,n,r))}catch(e){if(e instanceof d)return Se.fail(e.message);throw e}};var Ee=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&Ne(e,this.from,this.to)?Se.fail("Structure replace would overwrite content"):Se.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new ge([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?p.empty:new p(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var r=this.slice.size+e.slice.size==0?p.empty:new p(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),r,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,p.fromJSON(e,n.slice),!!n.structure)},t}(xe);xe.jsonID("replace",Ee);var Ie=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(Ne(e,this.from,this.gapFrom)||Ne(e,this.gapTo,this.to)))return Se.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Se.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?Se.fromReplace(e,this.from,this.to,n):Se.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new ge([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,p.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(xe);function Ne(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function Te(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Me(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!Te(r,o,i))break}}function De(e,t,n,r){void 0===r&&(r=e);var o=function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;var a=i.length?i[0]:t;return n.canReplaceWith(r,o,a)?i:null}(e,t),i=o&&function(e,t){var n=e.parent,r=e.startIndex,o=e.endIndex,i=n.child(r),a=t.contentMatch.findWrapping(i.type);if(!a)return null;for(var s=(a.length?a[a.length-1]:t).contentMatch,l=r;s&&l<o;l++)s=s.matchType(n.child(l).type);if(!s||!s.validEnd)return null;return a}(r,t);return i?o.map(Pe).concat({type:t,attrs:n}).concat(i.map(Pe)):null}function Pe(e){return{type:e,attrs:null}}function _e(e,t,n,r){void 0===n&&(n=1);var o=e.resolve(t),i=o.depth-n,a=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(var s=o.depth-1,l=n-2;s>i;s--,l--){var c=o.node(s),u=o.index(s);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(u,c.childCount),p=r&&r[l]||c;if(p!=c&&(d=d.replaceChild(0,p.type.create(p.attrs))),!c.canReplace(u+1,c.childCount)||!p.type.validContent(d))return!1}var f=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(f,f,h?h.type:o.node(i+1).type)}function je(e,t){var n=e.resolve(t),r=n.index();return Re(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Re(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function Ae(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&Re(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function Fe(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s<r.node(a).childCount)return null}}function ze(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var o=n.content,i=0;i<n.openStart;i++)o=o.firstChild.content;for(var a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(var s=r.depth;s>=0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(l>0?1:0),u=r.node(s),d=!1;if(1==a)d=u.canReplace(c,c,o);else{var p=u.contentMatchAt(c).findWrapping(o.firstChild.type);d=p&&u.canReplaceWith(c,c,p[0])}if(d)return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Le(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var a=e.child(o);a.content.size&&(a=a.copy(Le(a.content,t,a))),a.isInline&&(a=t(a,n,o)),r.push(a)}return i.fromArray(r)}xe.jsonID("replaceAround",Ie),ke.prototype.lift=function(e,t){for(var n=e.$from,r=e.$to,o=e.depth,a=n.before(o+1),s=r.after(o+1),l=a,c=s,u=i.empty,d=0,f=o,h=!1;f>t;f--)h||n.index(f)>0?(h=!0,u=i.from(n.node(f).copy(u)),d++):l--;for(var m=i.empty,v=0,g=o,y=!1;g>t;g--)y||r.after(g+1)<r.end(g)?(y=!0,m=i.from(r.node(g).copy(m)),v++):c++;return this.step(new Ie(l,c,a,s,new p(u.append(m),d,v),u.size-d,!0))},ke.prototype.wrap=function(e,t){for(var n=i.empty,r=t.length-1;r>=0;r--){if(n.size){var o=t[r].type.contentMatch.matchFragment(n);if(!o||!o.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=i.from(t[r].type.create(t[r].attrs,n))}var a=e.start,s=e.end;return this.step(new Ie(a,s,a,s,new p(n,0,0),t.length,!0))},ke.prototype.setBlockType=function(e,t,n,r){var o=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,r)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(o.doc,o.mapping.slice(a).map(t),n)){o.clearIncompatible(o.mapping.slice(a).map(t,1),n);var s=o.mapping.slice(a),l=s.map(t,1),c=s.map(t+e.nodeSize,1);return o.step(new Ie(l,c,l+1,c-1,new p(i.from(n.create(r,null,e.marks)),0,0),1,!0)),!1}})),this},ke.prototype.setNodeMarkup=function(e,t,n,r){var o=this.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);var a=t.create(n,null,r||o.marks);if(o.isLeaf)return this.replaceWith(e,e+o.nodeSize,a);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new Ie(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new p(i.from(a),0,0),1,!0))},ke.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var r=this.doc.resolve(e),o=i.empty,a=i.empty,s=r.depth,l=r.depth-t,c=t-1;s>l;s--,c--){o=i.from(r.node(s).copy(o));var u=n&&n[c];a=i.from(u?u.type.create(u.attrs,a):r.node(s).copy(a))}return this.step(new Ee(e,e,new p(o.append(a),t,t),!0))},ke.prototype.join=function(e,t){void 0===t&&(t=1);var n=new Ee(e-t,e+t,p.empty,!0);return this.step(n)};var Be=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new p(Le(n.content,(function(e,n){return e.isAtom&&n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return Se.fromReplace(e,this.from,this.to,i)},t.prototype.invert=function(){return new Ve(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(xe);xe.jsonID("addMark",Be);var Ve=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),r=new p(Le(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return Se.fromReplace(e,this.from,this.to,r)},t.prototype.invert=function(){return new Be(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(xe);function He(e,t,n,r){if(void 0===n&&(n=t),void 0===r&&(r=p.empty),t==n&&!r.size)return null;var o=e.resolve(t),i=e.resolve(n);return Ke(o,i,r)?new Ee(t,n,r):new We(o,i,r).fit()}function Ke(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}xe.jsonID("removeMark",Ve),ke.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,c){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){for(var d=Math.max(l,e),p=Math.min(l+r.nodeSize,t),f=n.addToSet(u),h=0;h<u.length;h++)u[h].isInSet(f)||(a&&a.to==d&&a.mark.eq(u[h])?a.to=p:o.push(a=new Ve(d,p,u[h])));s&&s.to==d?s.to=p:i.push(s=new Be(d,p,n))}}})),o.forEach((function(e){return r.step(e)})),i.forEach((function(e){return r.step(e)})),this},ke.prototype.removeMark=function(e,t,n){var r=this;void 0===n&&(n=null);var o=[],i=0;return this.doc.nodesBetween(e,t,(function(r,a){if(r.isInline){i++;var s=null;if(n instanceof Y)for(var l,c=r.marks;l=n.isInSet(c);)(s||(s=[])).push(l),c=l.removeFromSet(c);else n?n.isInSet(r.marks)&&(s=[n]):s=r.marks;if(s&&s.length)for(var u=Math.min(a+r.nodeSize,t),d=0;d<s.length;d++){for(var p=s[d],f=void 0,h=0;h<o.length;h++){var m=o[h];m.step==i-1&&p.eq(o[h].style)&&(f=m)}f?(f.to=u,f.step=i):o.push({style:p,from:Math.max(a,e),to:u,step:i})}}})),o.forEach((function(e){return r.step(new Ve(e.from,e.to,e.style))})),this},ke.prototype.clearIncompatible=function(e,t,n){void 0===n&&(n=t.contentMatch);for(var r=this.doc.nodeAt(e),o=[],a=e+1,s=0;s<r.childCount;s++){var l=r.child(s),c=a+l.nodeSize,u=n.matchType(l.type,l.attrs);if(u){n=u;for(var d=0;d<l.marks.length;d++)t.allowsMarkType(l.marks[d].type)||this.step(new Ve(a,c,l.marks[d]))}else o.push(new Ee(a,c,p.empty));a=c}if(!n.validEnd){var f=n.fillBefore(i.empty,!0);this.replace(a,a,new p(f,0,0))}for(var h=o.length-1;h>=0;h--)this.step(o[h]);return this},ke.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=p.empty);var r=He(this.doc,e,t,n);return r&&this.step(r),this},ke.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new p(i.from(n),0,0))},ke.prototype.delete=function(e,t){return this.replace(e,t,p.empty)},ke.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var We=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var r=0;r<=e.depth;r++){var o=e.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(r))})}this.placed=i.empty;for(var a=e.depth;a>0;a--)this.placed=i.from(e.node(a).copy(this.placed))},$e={depth:{configurable:!0}};function qe(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(qe(e.firstChild.content,t-1,n)))}function Ue(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Ue(e.lastChild.content,t-1,n)))}function Ge(e,t){for(var n=0;n<t;n++)e=e.firstChild.content;return e}function Xe(e,t,n){if(t<=0)return e;var r=e.content;return t>1&&(r=r.replaceChild(0,Xe(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(i.empty,!0)))),e.copy(r)}function Je(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,a)?s:null}function Ye(e){return e.spec.defining||e.spec.definingForContent}function Ze(e,t,n,r,o){if(t<n){var a=e.firstChild;e=e.replaceChild(0,a.copy(Ze(a.content,t+1,n,r,a)))}if(t>r){var s=o.contentMatchAt(0),l=s.fillBefore(e).append(e);e=l.append(s.matchFragment(l).fillBefore(i.empty,!0))}return e}function Qe(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}$e.depth.get=function(){return this.frontier.length-1},We.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(t<0?this.$to:r.doc.resolve(t));if(!o)return null;for(var i=this.placed,a=r.depth,s=o.depth;a&&s&&1==i.childCount;)i=i.firstChild.content,a--,s--;var l=new p(i,a,s);return t>-1?new Ie(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Ee(r.pos,o.pos,l):void 0},We.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,r=(t?(n=Ge(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var a=this.frontier[o],s=a.type,l=a.match,c=void 0,u=void 0;if(1==e&&(r?l.matchType(r.type)||(u=l.fillBefore(i.from(r),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:u};if(2==e&&r&&(c=l.findWrapping(r.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:c};if(n&&l.matchType(n.type))break}},We.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Ge(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new p(t,n+1,Math.max(r,o.size+n>=t.size-r?n+1:0)),!0)},We.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,r=e.openEnd,o=Ge(t,n);if(o.childCount<=1&&n>0){var i=t.size-n<=n+o.size;this.unplaced=new p(qe(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new p(qe(t,n,1),n,r)},We.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,r=e.parent,o=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s<a.length;s++)this.openFrontierNode(a[s]);var l=this.unplaced,c=r?r.content:l.content,u=l.openStart-t,d=0,f=[],h=this.frontier[n],m=h.match,v=h.type;if(o){for(var g=0;g<o.childCount;g++)f.push(o.child(g));m=m.matchFragment(o)}for(var y=c.size+t-(l.content.size-l.openEnd);d<c.childCount;){var b=c.child(d),k=m.matchType(b.type);if(!k)break;(++d>1||0==u||b.content.size)&&(m=k,f.push(Xe(b.mark(v.allowedMarks(b.marks)),1==d?u:0,d==c.childCount?y:-1)))}var w=d==c.childCount;w||(y=-1),this.placed=Ue(this.placed,n,i.from(f)),this.frontier[n].match=m,w&&y<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var C=0,O=c;C<y;C++){var x=O.lastChild;this.frontier.push({type:x.type,match:x.contentMatchAt(x.childCount)}),O=x.content}this.unplaced=w?0==t?p.empty:new p(qe(l.content,t-1,1),t-1,y<0?l.openEnd:t-1):new p(qe(l.content,t,d),l.openStart,l.openEnd)},We.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock)return-1;var e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Je(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;for(var n=this.$to.depth,r=this.$to.after(n);n>1&&r==this.$to.end(--n);)++r;return r},We.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=n.type,i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Je(e,t,o,r,i);if(a){for(var s=t-1;s>=0;s--){var l=this.frontier[s],c=l.match,u=Je(e,s,l.type,c,!0);if(!u||u.childCount)continue e}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}},We.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Ue(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return e},We.prototype.openFrontierNode=function(e,t,n){var r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=Ue(this.placed,this.depth,i.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},We.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(i.empty,!0);e.childCount&&(this.placed=Ue(this.placed,this.frontier.length,e))},Object.defineProperties(We.prototype,$e),ke.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var r=this.doc.resolve(e),o=this.doc.resolve(t);if(Ke(r,o,n))return this.step(new Ee(e,t,n));var i=Qe(r,this.doc.resolve(t));0==i[i.length-1]&&i.pop();var a=-(r.depth+1);i.unshift(a);for(var s=r.depth,l=r.pos-1;s>0;s--,l--){var c=r.node(s).type.spec;if(c.defining||c.definingAsContext||c.isolating)break;i.indexOf(s)>-1?a=s:r.before(s)==l&&i.splice(1,0,-s)}for(var u=i.indexOf(a),d=[],f=n.openStart,h=n.content,m=0;;m++){var v=h.firstChild;if(d.push(v),m==n.openStart)break;h=v.content}for(var g=f-1;g>=0;g--){var y=d[g].type,b=Ye(y);if(b&&r.node(u).type!=y)f=g;else if(b||!y.isTextblock)break}for(var k=n.openStart;k>=0;k--){var w=(k+f+1)%(n.openStart+1),C=d[w];if(C)for(var O=0;O<i.length;O++){var x=i[(O+u)%i.length],S=!0;x<0&&(S=!1,x=-x);var E=r.node(x-1),I=r.index(x-1);if(E.canReplaceWith(I,I,C.type,C.marks))return this.replace(r.before(x),S?o.after(x):t,new p(Ze(n.content,0,n.openStart,w),w,n.openEnd))}}for(var N=this.steps.length,T=i.length-1;T>=0&&(this.replace(e,t,n),!(this.steps.length>N));T--){var M=i[T];M<0||(e=r.before(M),t=o.after(M))}return this},ke.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var r=Fe(this.doc,e,n.type);null!=r&&(e=t=r)}return this.replaceRange(e,t,new p(i.from(n),0,0))},ke.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=Qe(n,r),i=0;i<o.length;i++){var a=o[i],s=i==o.length-1;if(s&&0==a||n.node(a).type.contentMatch.validEnd)return this.delete(n.start(a),r.end(a));if(a>0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var l=1;l<=n.depth&&l<=r.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(n.before(l),t);return this.delete(e,t)};var et=Object.create(null),tt=function(e,t,n){this.ranges=n||[new rt(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},nt={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};nt.anchor.get=function(){return this.$anchor.pos},nt.head.get=function(){return this.$head.pos},nt.from.get=function(){return this.$from.pos},nt.to.get=function(){return this.$to.pos},nt.$from.get=function(){return this.ranges[0].$from},nt.$to.get=function(){return this.ranges[0].$to},nt.empty.get=function(){for(var e=this.ranges,t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0},tt.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},tt.prototype.replace=function(e,t){void 0===t&&(t=p.empty);for(var n=t.content.lastChild,r=null,o=0;o<t.openEnd;o++)r=n,n=n.lastChild;for(var i=e.steps.length,a=this.ranges,s=0;s<a.length;s++){var l=a[s],c=l.$from,u=l.$to,d=e.mapping.slice(i);e.replaceRange(d.map(c.pos),d.map(u.pos),s?p.empty:t),0==s&&dt(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}},tt.prototype.replaceWith=function(e,t){for(var n=e.steps.length,r=this.ranges,o=0;o<r.length;o++){var i=r[o],a=i.$from,s=i.$to,l=e.mapping.slice(n),c=l.map(a.pos),u=l.map(s.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),dt(e,n,t.isInline?-1:1))}},tt.findFrom=function(e,t,n){var r=e.parent.inlineContent?new ot(e):ut(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(var o=e.depth-1;o>=0;o--){var i=t<0?ut(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):ut(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},tt.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new lt(e.node(0))},tt.atStart=function(e){return ut(e,e,0,0,1)||new lt(e)},tt.atEnd=function(e){return ut(e,e,e.content.size,e.childCount,-1)||new lt(e)},tt.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=et[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},tt.jsonID=function(e,t){if(e in et)throw new RangeError("Duplicate use of selection JSON ID "+e);return et[e]=t,t.prototype.jsonID=e,t},tt.prototype.getBookmark=function(){return ot.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(tt.prototype,nt),tt.prototype.visible=!0;var rt=function(e,t){this.$from=e,this.$to=t},ot=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=p.empty),e.prototype.replace.call(this,t,n),n==p.empty){var r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new it(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos<r.pos!=i<0)&&(n=r),new t(n,r)},Object.defineProperties(t.prototype,n),t}(tt);tt.jsonID("text",ot);var it=function(e,t){this.anchor=e,this.head=t};it.prototype.map=function(e){return new it(e.map(this.anchor),e.map(this.head))},it.prototype.resolve=function(e){return ot.between(e.resolve(this.anchor),e.resolve(this.head))};var at=function(e){function t(t){var n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);e.call(this,t,r),this.node=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=r.mapResult(this.anchor),i=o.deleted,a=o.pos,s=n.resolve(a);return i?e.near(s):new t(s)},t.prototype.content=function(){return new p(i.from(this.node),0,0)},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor},t.prototype.toJSON=function(){return{type:"node",anchor:this.anchor}},t.prototype.getBookmark=function(){return new st(this.anchor)},t.fromJSON=function(e,n){if("number"!=typeof n.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new t(e.resolve(n.anchor))},t.create=function(e,t){return new this(e.resolve(t))},t.isSelectable=function(e){return!e.isText&&!1!==e.type.spec.selectable},t}(tt);at.prototype.visible=!1,tt.jsonID("node",at);var st=function(e){this.anchor=e};st.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new it(r,r):new st(r)},st.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&at.isSelectable(n)?new at(t):tt.near(t)};var lt=function(e){function t(t){e.call(this,t.resolve(0),t.resolve(t.content.size))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.replace=function(t,n){if(void 0===n&&(n=p.empty),n==p.empty){t.delete(0,t.doc.content.size);var r=e.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else e.prototype.replace.call(this,t,n)},t.prototype.toJSON=function(){return{type:"all"}},t.fromJSON=function(e){return new t(e)},t.prototype.map=function(e){return new t(e)},t.prototype.eq=function(e){return e instanceof t},t.prototype.getBookmark=function(){return ct},t}(tt);tt.jsonID("all",lt);var ct={map:function(){return this},resolve:function(e){return new lt(e)}};function ut(e,t,n,r,o,i){if(t.inlineContent)return ot.create(e,n);for(var a=r-(o>0?0:1);o>0?a<t.childCount:a>=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&at.isSelectable(s))return at.create(e,n-(o<0?s.nodeSize:0))}else{var l=ut(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function dt(e,t,n){var r=e.steps.length-1;if(!(r<t)){var o,i=e.steps[r];if(i instanceof Ee||i instanceof Ie)e.mapping.maps[r].forEach((function(e,t,n,r){null==o&&(o=r)})),e.setSelection(tt.near(e.doc.resolve(o),n))}}var pt=function(e){function t(t){e.call(this,t.doc),this.time=Date.now(),this.curSelection=t.selection,this.curSelectionFor=0,this.storedMarks=t.storedMarks,this.updated=0,this.meta=Object.create(null)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={selection:{configurable:!0},selectionSet:{configurable:!0},storedMarksSet:{configurable:!0},isGeneric:{configurable:!0},scrolledIntoView:{configurable:!0}};return n.selection.get=function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection},t.prototype.setSelection=function(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this},n.selectionSet.get=function(){return(1&this.updated)>0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return u.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||u.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(tt.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(ke);function ft(e,t){return t&&e?e.bind(t):e}var ht=function(e,t,n){this.name=e,this.init=ft(t.init,n),this.apply=ft(t.apply,n)},mt=[new ht("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new ht("selection",{init:function(e,t){return e.selection||tt.atStart(t.doc)},apply:function(e){return e.selection}}),new ht("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new ht("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],vt=function(e,t){var n=this;this.schema=e,this.fields=mt.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new ht(e.key,e.spec.state,e))}))},gt=function(e){this.config=e},yt={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};yt.schema.get=function(){return this.config.schema},yt.plugins.get=function(){return this.config.plugins},gt.prototype.apply=function(e){return this.applyTransaction(e).state},gt.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n<this.config.plugins.length;n++)if(n!=t){var r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0},gt.prototype.applyTransaction=function(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};for(var t=[e],n=this.applyInner(e),r=null;;){for(var o=!1,i=0;i<this.config.plugins.length;i++){var a=this.config.plugins[i];if(a.spec.appendTransaction){var s=r?r[i].n:0,l=r?r[i].state:this,c=s<t.length&&a.spec.appendTransaction.call(a,s?t.slice(s):t,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(var u=0;u<this.config.plugins.length;u++)r.push(u<i?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}},gt.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new gt(this.config),n=this.config.fields,r=0;r<n.length;r++){var o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}for(var i=0;i<bt.length;i++)bt[i](this,e,t);return t},yt.tr.get=function(){return new pt(this)},gt.create=function(e){for(var t=new vt(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new gt(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},gt.prototype.reconfigure=function(e){for(var t=new vt(this.schema,e.plugins),n=t.fields,r=new gt(t),o=0;o<n.length;o++){var i=n[o].name;r[i]=this.hasOwnProperty(i)?this[i]:n[o].init(e,r)}return r},gt.prototype.toJSON=function(e){var t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((function(e){return e.toJSON()}))),e&&"object"==typeof e)for(var n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");var r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t},gt.fromJSON=function(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");var r=new vt(e.schema,e.plugins),o=new gt(r);return r.fields.forEach((function(r){if("doc"==r.name)o.doc=T.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=tt.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(var i in n){var a=n[i],s=a.spec.state;if(a.key==r.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(t,i))return void(o[r.name]=s.fromJSON.call(a,e,t[i],o))}o[r.name]=r.init(e,o)}})),o},gt.addApplyListener=function(e){bt.push(e)},gt.removeApplyListener=function(e){var t=bt.indexOf(e);t>-1&&bt.splice(t,1)},Object.defineProperties(gt.prototype,yt);var bt=[];var kt=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:Ct("plugin")};kt.prototype.getState=function(e){return e[this.key]};var wt=Object.create(null);function Ct(e){return e in wt?e+"$"+ ++wt[e]:(wt[e]=0,e+"$")}var Ot=function(e){void 0===e&&(e="key"),this.key=Ct(e)};Ot.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Ot.prototype.getState=function(e){return e[this.key]};var xt="k-parent-node",St="k-colgroup-data",Et="k-resizable-node",It=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"],Nt=function(e,t){var n=(e.ownerDocument||document).createElement(t);Array.from(e.rows).filter((function(e){return e.getAttribute(xt)===t})).forEach((function(e){e.removeAttribute(xt),n.appendChild(e)})),n.children.length&&e.appendChild(n)},Tt=function(e,t){var n=t.toUpperCase();e.filter((function(e){return e.nodeName===n})).forEach((function(e){Array.from(e.children).forEach((function(n){n.setAttribute(xt,t),e.parentNode&&e.parentNode.insertBefore(n,e)})),e.remove()}))},Mt=function(e,t){void 0===t&&(t=It);var n=t.join("|");return e.replace(new RegExp("\\s*(<(?:"+n+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+n+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},Dt=function(e){var t,n=document.createElement("template");if("content"in n)n.innerHTML=e,t=n.content;else{var r=(new DOMParser).parseFromString(e,"text/html");t=document.createDocumentFragment();for(var o=r.body;o&&o.firstChild;)t.appendChild(o.firstChild)}return t},Pt=function(e){var t=de.fromSchema(e.type.schema).serializeFragment(e.content);return function(e){Array.from(e.querySelectorAll("table")).forEach((function(e){Nt(e,"thead"),Nt(e,"tbody"),Nt(e,"tfoot");var t=Array.from(e.children).find((function(e){return 0===e.children.length}));t&&t.remove()}))}(t),t},_t=function(e,t,n){return ee.fromSchema(t).parse(e,n)},jt=function(e,t,n){var r,o=Dt(e);return r=o,Array.from(r.querySelectorAll("table")).forEach((function(e){var t=Array.from(e.children);t.some((function(e){return"THEAD"===e.nodeName||"TFOOT"===e.nodeName}))&&(Tt(t,"thead"),Tt(t,"tbody"),Tt(t,"tfoot"));var n=t.find((function(e){return"COLGROUP"===e.nodeName}));n&&(e.setAttribute(St,n.outerHTML),n.remove())})),_t(o,t,n)},Rt=function(e){var t=Pt(e.doc),n=document.createElement("div");return n.appendChild(t),n.innerHTML},At=function(e,t,n){return void 0===t&&(t="setHTML"),void 0===n&&(n={preserveWhitespace:"full"}),function(r,o){return o(r.tr.setSelection(new lt(r.doc)).replaceSelectionWith(jt(e,r.schema,n)).setMeta("commandName",t))}};var Ft=function(){return(Ft=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function zt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}var Lt=function(e,t){var n=t.style,r=t.value,o=t.newValue;if(!e)return{changed:!1,style:null};var i=e.split(/\s*;\s*/).filter((function(e){return Boolean(e)})),a=i.filter((function(e){var t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===n&&r.test(t[1]))}));return o&&a.push(n+": "+o),{style:a.join("; ")+(a.length?";":""),changed:Boolean(o)||a.length!==i.length}},Bt=function(e,t){for(var n=e.selection.$from,r=n.depth;r>=0;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1},Vt=function(e){return e instanceof T?e.type.name:e.name},Ht=function(e,t){return void 0===t&&(t=1),function(n){return function(e,t){return void 0===t&&(t=1),function(n){for(var r=n.$from,o=r.depth;o>0;o--){var i=r.node(o);if(e(i)&&0===(t-=1))return{depth:o,node:i}}}}((function(t){return Vt(t)===Vt(e)}),t)(n)}},Kt=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},Wt=function(e,t,n,r){var o=i.from(jt(e,n,r)),a=i.from(jt(t,n,r));return o.eq(a)},$t=function(e){var t=e.selection;if(t instanceof ot||t instanceof lt){var n=t.content().content;return n.textBetween(0,n.size)}return""},qt=function(e){if(e.selection instanceof at)return e.selection.node},Ut=function(e){var t="",n=!1,r=e.selection,o=e.doc,i=r.$from,a=r.$to,s=r.from,l=r.to;return i.sameParent(a)&&(o.nodesBetween(s,l,(function(e){n=n||e.isLeaf&&!e.isText})),n||(t=$t(e))),t},Gt=function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")},Xt={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i},Jt=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r=!0===n.applyToWord?Xt:n.applyToWord,o=null,i=e.tr,a=e.selection,s=a.$head.nodeBefore,l=a.$head.nodeAfter;if(s&&"text"===s.type.name&&s.text&&l&&"text"===l.type.name&&l.text){var c=[];a.$head.parent.descendants((function(e,t){return c.push({node:e,pos:t}),!1}));for(var u=a.$head.parentOffset,d=c.findIndex((function(e){var t=e.node,n=e.pos;return n<=u&&n+t.nodeSize>=u})),p=c[d].node.text,f=!1,h=d-1;h>=0;h--){var m=c[h];!f&&m&&"text"===m.node.type.name?p=m.node.text+p:(f=!0,u-=m.node.nodeSize)}for(h=d+1;h<c.length;h++){if(!(m=c[h])||"text"!==m.node.type.name)break;p+=m.node.text}var v=p.substring(0,u),g=p.substring(u),y=r.before.exec(v),b=r.after.exec(g);if(y&&b){var k=y[0].length,w=b[0].length,C=o=a.from;i.setSelection(ot.create(e.doc,C-k,C+w));return{state:{tr:i,selection:i.selection,doc:i.doc,storedMarks:null,schema:i.doc.type.schema},dispatch:function(e){e.setSelection(ot.create(e.doc,o)),t(e)}}}}return{state:e,dispatch:t}},Yt=function(e,t){return function(n,r,o){var i=Jt(n,r,t),a=i.state,s=i.dispatch;return e(t)(a,s)}},Zt=function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0===i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1},Qt=function(e,t,n){return function(r,o){var i=r.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Zt(r.doc,l,e))return!1;if(o)if(s)e.isInSet(r.storedMarks||s.marks())?o(n.removeStoredMark(e)):o(n.addStoredMark(e.create(t)));else{for(var c=!1,u=0;!c&&u<l.length;u++){var d=l[u],p=d.$from,f=d.$to;c=r.doc.rangeHasMark(p.pos,f.pos,e)}for(u=0;u<l.length;u++){var h=l[u];p=h.$from,f=h.$to;c?n.removeMark(p.pos,f.pos,e):n.addMark(p.pos,f.pos,e.create(t))}o(n.scrollIntoView())}return!0}},en=function(e,t,n,r){void 0===r&&(r=null);var o=[],i=0;return e.doc.nodesBetween(t,n,(function(e,a){if(e.isInline){i++;var s=null;if(r instanceof Y){var l=r.isInSet(e.marks);l&&(s=[l])}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length)for(var c=Math.min(a+e.nodeSize,n),u=0;u<s.length;u++){for(var d=s[u],p=void 0,f=0;f<o.length;f++){var h=o[f];h.step===i-1&&d.eq(h.style)&&(p=h)}p?(p.to=c,p.step=i):o.push({style:d,from:Math.max(a,t),to:c,step:i})}}})),o.forEach((function(t){return e.step(new Ve(t.from,t.to,t.style))})),e},tn=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.tr;nn(o,{except:(r=n,r instanceof Array?r:[r])}),o.docChanged&&t(o)}},nn=function(e,t){var n=t.except,r=e.doc,o=e.selection,i=r.type.schema,a=o.empty,s=o.ranges,l=(n||[]).map((function(e){return e.name}));if(!a){var c=Object.keys(i.marks).map((function(e){return i.marks[e]})).filter((function(e){return-1===l.indexOf(e.name)}));s.forEach((function(t){var n=t.$from,r=t.$to;c.forEach((function(t){return e.removeMark(n.pos,r.pos,t)}))}))}},rn=function(e,t){var n,r=e.schema.marks,o=(t.altMarks||[]).filter((function(e){return r[e]})),i=t.altStyle,a=e.selection,s=a.from,l=a.$from,c=a.to,u=a.empty,d=r[t.mark],p=e.doc,f=!1;return u?(n=e.storedMarks||l.marks(),f=d&&d.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):f=d&&p.rangeHasMark(s,c,d)||o.some((function(e){return p.rangeHasMark(s,c,r[e])})),!f&&i&&r.style?an(e,r.style).some((function(e){return null!==on(e,i)})):Boolean(f)},on=function(e,t){for(var n=(e&&e.attrs.style||"").split(/\s*;\s*/).filter((function(e){return Boolean(e)})),r=0;r<n.length;r++){var o=n[r].split(/\s*:\s*/);if(o[0].toLowerCase()===t.name&&t.value.test(o[1]))return o[1]}return null},an=function(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to,a=n.empty,s=[];return a?s.push(t.isInSet(e.storedMarks||o.marks())):e.doc.nodesBetween(r,i,(function(e){e.isInline&&s.push(t.isInSet(e.marks))})),s},sn=function(e,t){var n=an(e,t),r=n.filter((function(e){return Boolean(e)}));return n.length===r.length?n[0]:void 0},ln=function(e,t){var n=an(e,t),r=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==r.length,marks:r}},cn=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return Lt(r,t)},un=function(e,t,n,r,o){var i=o.create({style:r.style}),a=[],s=[],l=null,c=null;return e.doc.nodesBetween(t,n,(function(e,u,d){if(e.isInline){var p=e.marks;if(!i.isInSet(p)&&d.type.allowsMarkType(i.type)){var f=Math.max(u,t),h=Math.min(u+e.nodeSize,n),m=cn(p,r);if(m.changed||r.newValue){for(var v=m.changed?{style:m.style||null}:{style:[r.style]+": "+r.newValue+";"},g=o.isInSet(p)?p.find((function(e){return"style"===e.type.name})):null,y=g?Ft({},g.attrs,v):v,b=o.create(y),k=b.addToSet(p),w=0;w<p.length;w++)p[w].isInSet(k)||(l&&l.to===f&&l.mark.eq(p[w])?l.to=h:(l=new Ve(f,h,p[w]),a.push(l)));var C=c&&c.to===f,O=C&&b.attrs.style===c.mark.attrs.style;C&&O?c.to=h:Object.keys(y).some((function(e){return null!==y[e]}))&&(c=new Be(f,h,b),s.push(c))}}}})),a.forEach((function(t){return e.step(t)})),s.forEach((function(t){return e.step(t)})),a.length+s.length>0},dn=function(e,t){var n=e.schema.marks.style;return(n?an(e,n):[]).map((function(e){return on(e,t)})).filter((function(e){return null!==e}))},pn=function(e,t){return function(n,r,o){var i=n.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Zt(n.doc,l,e))return!1;var c,u,d,p,f=!1;if(r){var h=o||n.tr;if(s){var m=n.storedMarks||s.marks();if(e.isInSet(m)){var v=cn(m,t),g=m.find((function(e){return"style"===e.type.name})),y=Ft({},g?g.attrs:{},{style:v.style||null});if(c=g.attrs,u=y,d=Object.keys(c),p=Object.keys(u),d.length===p.length&&d.every((function(e){return c[e]===u[e]})))return!1;r(h.removeStoredMark(e)),Object.keys(y).some((function(e){return null!==y[e]}))&&r(h.addStoredMark(e.create(y))),f=!0}}else{for(var b=0;b<l.length;b++){var k=l[b],w=k.$from,C=k.$to;f=un(h,w.pos,C.pos,t,e)}f&&(h.scrollIntoView(),r(h))}}return f}},fn=function(e,t,n){return function(r,o){var i=r.schema.marks,a=e.altStyle,s=e.altMarks,l=void 0===s?[]:s,c=e.mark,u=t||r.tr,d=!1,p=!1,f=function(){return p=!0};a&&i.style&&(d=pn(i.style,{style:a.name,value:a.value})(r,f,u));var h=[c].concat(l).filter((function(e){return i[e]})).map((function(e){return rn(r,{mark:e})&&i[e]})).filter((function(e){return e}));return h.length?function(e,t,n,r){var o=t.selection,i=o.$cursor,a=o.ranges;if(r=r||t.tr,i)e.forEach((function(e){e.isInSet(t.storedMarks||i.marks())&&n(r.removeStoredMark(e))}));else{for(var s=function(t){var n=a[t],o=n.$from,i=n.$to;e.forEach((function(e){en(r,o.pos,i.pos,e)}))},l=0;l<a.length;l++)s(l);n(r.scrollIntoView())}}(h,r,f,u):d||Qt(i[c],n,u)(r,f),p&&o(u),p}},hn=function(e,t){return function(n,r){var o=n.schema.marks.style,i={style:e.style,value:/^.+$/,newValue:e.value},a=n.tr;t&&a.setMeta("commandName",t),a.setMeta("args",e);var s=n.selection,l=s.empty,c=s.$cursor,u=s.ranges;if(l&&!c||!o||!Zt(n.doc,u,o))return!1;if(c){var d=n.storedMarks||c.marks(),p=o.isInSet(d)?d.find((function(e){return"style"===e.type.name})):null,f={style:null};if(p&&p.attrs.style){var h=Lt(p.attrs.style,i);h.changed&&h.style&&(f.style=h.style)}else i.newValue&&(f.style=[i.style]+": "+i.newValue+";");var m=p?Ft({},p.attrs,f):f;return Object.keys(m).some((function(e){return null!==m[e]}))?r(a.addStoredMark(o.create(m))):r(a.removeStoredMark(o)),!0}return pn(o,i)(n,r,a)}},mn=function(e,t){return function(n,r){var o=n.selection.$cursor;if(o){var i=o.parent,a=o.index(),s=n.schema.marks[e.mark],l=i.child(a).marks.find((function(e){return e.type===s})),c=i.childCount,u=o.pos-o.textOffset,d=i.child(a).nodeSize,p=void 0,f=void 0;for(p=a-1;p>=0&&l.isInSet(i.child(p).marks);)d+=f=i.child(p).nodeSize,u-=f,p-=1;for(p=a+1;p<c&&l.isInSet(i.child(p).marks);)d+=i.child(p).nodeSize,p+=1;r(en(t||n.tr,u,u+d,l))}else fn(e,t)(n,r)}},vn=function(e,t){var n=e.mark,r=e.attrs;return void 0===t&&(t="link"),function(e,o){var i=e.schema.marks,a=e.tr;t&&(a.setMeta("commandName",t),a.setMeta("args",r));var s=!1,l=function(){return s=!0};if(function(e,t){var n=an(e,t);return 1===n.length&&n[0]?n[0]:null}(e,i[n]))!function(e,t){return function(n,r){var o=n.selection,i=o.$cursor,a=o.from,s=o.to,l=n.schema.marks[e.mark];if(i){var c=i.parent,u=i.index(),d=c.child(u).marks.find((function(e){return e.type===l})),p=c.childCount,f=i.pos-i.textOffset,h=c.child(u).nodeSize,m=void 0,v=void 0;for(m=u-1;m>=0&&d.isInSet(c.child(m).marks);)h+=v=c.child(m).nodeSize,f-=v,m-=1;for(m=u+1;m<p&&d.isInSet(c.child(m).marks);)h+=c.child(m).nodeSize,m+=1;t.removeMark(f,f+h,l),t.addMark(f,f+h,l.create(e.attrs)),r(t)}else t.doc.nodesBetween(a,s,(function(n,o){n.isInline&&l.isInSet(n.marks)&&(t.removeMark(o,o+n.nodeSize,l),t.addMark(o,o+n.nodeSize,l.create(e.attrs)),r(t))}))}}({mark:n,attrs:r},a)(e,l);else{var c=e;rn(e,{mark:n})&&(mn({mark:n,attrs:r},a)(e,l),c=gt.create({doc:a.doc,selection:a.selection})),s?Qt(i[n],r,a)(c,l):fn({mark:n},a,r)(c,l)}return s&&o(a),s}},gn=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}},yn=function(e){return function(t,n){var r=t.schema.nodes.image,o=r.createAndFill(e);Kt(o)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}},bn=function(e,t,n,r){if(!n.isTextblock)return!1;e.selection.ranges.forEach((function(o){var a=e.steps.length,s=o.$from.pos,l=o.$to.pos;e.doc.nodesBetween(s,l,(function(o,s){if(o.eq(t)&&o.isTextblock&&!o.hasMarkup(n,r)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(a).map(s),n)){e.clearIncompatible(e.mapping.slice(a).map(s,1),n);var l=e.mapping.slice(a),c=l.map(s,1),u=l.map(s+o.nodeSize,1),d=new p(i.from(n.create(r,null,o.marks)),0,0);return e.step(new Ie(c,u,c+1,u-1,d,1,!0)),!1}}))}))},kn=function(e,t){void 0===t&&(t={blocksInSelection:!1});var n=e.doc,r=e.selection,o=r.$from,i=r.ranges,a=t.blocksInSelection,s=[],l=r instanceof at?r.node:void 0;return l?l.isBlock?(s.push(l),l.nodesBetween(0,l.content.size,(function(e){e.isBlock&&s.push(e)}))):!a&&o.parent&&o.parent.isBlock&&s.push(o.parent):i.forEach((function(e){var t=e.$from.pos,r=e.$to.pos;n.nodesBetween(t,r,(function(e,n,o,i){e.isBlock&&(!a||n>=t&&n+e.content.size+2<=r)&&s.push(e)}))})),s},wn=function(e,t){return function(n,r){var o=kn(n),i=n.schema.nodes,a=n.tr;a.setMeta("commandName",t),a.setMeta("args",{value:e}),o.forEach((function(t){if(t.type.isTextblock)if("p"===e){var n=t.attrs,r=n.level,o=zt(n,["level"]);bn(a,t,i.paragraph,o)}else if(/^h[1-6]$/i.test(e)){r=parseInt(e.substr(1),10);bn(a,t,i.heading,Ft({},t.attrs,{level:r}))}else if("blockquote"===e){var s=t.attrs;r=s.level,o=zt(s,["level"]);bn(a,t,i.blockquote,o)}}));var s=a.docChanged;return s&&r(a.scrollIntoView()),s}},Cn=function(e,t){void 0===t&&(t={blocksInSelection:!0});var n=e.doc,r=e.selection,o=t.blocksInSelection,i=t.blockNodeType;kn({doc:n,selection:r},{blocksInSelection:o}).filter((function(e){return e.isTextblock})).forEach((function(t){var n=t.attrs||{},r=n.style,o=void 0===r?"":r,a=n.class,s=void 0===a?"":a,l=zt(n,["style","class"]),c=i||t.type;(o||s||c!==t.type)&&bn(e,t,c,l)}))},On=function(e){var t=kn(e),n=e.schema.nodes,r=[];return t.forEach((function(e){e.type===n.paragraph?r.push("p"):e.type===n.heading?r.push("h"+e.attrs.level):e.type===n.blockquote&&n.blockquote.isTextblock&&r.push("blockquote")})),r},xn=function(e,t){var n,r,o=e.attrs.style;o&&t.forEach((function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=Lt(o,r),o=n.changed?n.style:o}));return o=o||t.reduce((function(e,t){return(e&&t.value?e+" ":"")+t.value?t.name+": "+t.value+";":""}),""),Object.assign({},e.attrs,{style:o||null})},Sn=function(e,t){var n=e.selection,r=n.from,o=n.to,i=!1;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||e.type===t)})),i},En=function(e){var t=On(e);return 1===new Set(t).size?t[0]:null},In=function(e){return{tag:En(e)||""}},Nn=function(e,t){return function(n,r){var o=kn(n),i=n.tr;i.setMeta("commandName",t),o.forEach((function(t){if(t.type.isTextblock){var n={},r=e.find((function(e){return e.node===t.type.name}));r&&(n=xn(t,r.style)),bn(i,t,t.type,n)}}));var a=i.docChanged;return a&&r(i.scrollIntoView()),a}},Tn=function(e,t){var n=kn(e),r=!1;return n.forEach((function(e){if(!r&&e.type.isTextblock&&e.attrs.style){var n=t.find((function(t){return t.node===e.type.name}));n&&(r=n.style.every((function(t){return!!t.value&&new RegExp(t.name+":\\s?"+t.value,"i").test(e.attrs.style)})))}})),r},Mn=function(e){return void 0===e&&(e={blocksInSelection:!0}),function(t,n){var r=t.tr,o=e.blocksInSelection,i=e.blockNodeType,a=(e.exceptMarks||[t.schema.marks.link]).filter(Boolean);nn(r,{except:a}),Cn(r,{blocksInSelection:o,blockNodeType:i});var s=r.docChanged;return s&&n&&n(r),s}},Dn=["ol",0],Pn=["ul",0],_n=["li",0],jn={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:function(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1}}}],toDOM:function(e){return 1==e.attrs.order?Dn:["ol",{start:e.attrs.order},0]}},Rn={parseDOM:[{tag:"ul"}],toDOM:function(){return Pn}},An={parseDOM:[{tag:"li"}],toDOM:function(){return _n},defining:!0};function Fn(e,t){var n={};for(var r in e)n[r]=e[r];for(var o in t)n[o]=t[o];return n}function zn(e,t,n){return e.append({ordered_list:Fn(jn,{content:"list_item+",group:n}),bullet_list:Fn(Rn,{content:"list_item+",group:n}),list_item:Fn(An,{content:t})})}function Ln(e,t){return function(n,r){var o=n.selection,a=o.$from,s=o.$to,l=a.blockRange(s),c=!1,u=l;if(!l)return!1;if(l.depth>=2&&a.node(l.depth-1).type.compatibleContent(e)&&0==l.startIndex){if(0==a.index(l.depth-1))return!1;var d=n.doc.resolve(l.start-2);u=new E(d,d,l.depth),l.endIndex<l.parent.childCount&&(l=new E(a,n.doc.resolve(s.end(l.depth)),l.depth)),c=!0}var f=De(u,e,t,l);return!!f&&(r&&r(function(e,t,n,r,o){for(var a=i.empty,s=n.length-1;s>=0;s--)a=i.from(n[s].type.create(n[s].attrs,a));e.step(new Ie(t.start-(r?2:0),t.end,t.start,t.end,new p(a,0,0),n.length,!0));for(var l=0,c=0;c<n.length;c++)n[c].type==o&&(l=c+1);for(var u=n.length-l,d=t.start+n.length-(r?2:0),f=t.parent,h=t.startIndex,m=t.endIndex,v=!0;h<m;h++,v=!1)!v&&_e(e.doc,d,u)&&(e.split(d,u),d+=2*u),d+=f.child(h).nodeSize;return e}(n.tr,l,f,c,e).scrollIntoView()),!0)}}function Bn(e){return function(t,n){var r=t.selection,o=r.$from,a=r.$to,s=r.node;if(s&&s.isBlock||o.depth<2||!o.sameParent(a))return!1;var l=o.node(-1);if(l.type!=e)return!1;if(0==o.parent.content.size&&o.node(-1).childCount==o.indexAfter(-1)){if(2==o.depth||o.node(-3).type!=e||o.index(-2)!=o.node(-2).childCount-1)return!1;if(n){for(var c=i.empty,u=o.index(-1)?1:o.index(-2)?2:3,d=o.depth-u;d>=o.depth-3;d--)c=i.from(o.node(d).copy(c));var f=o.indexAfter(-1)<o.node(-2).childCount?1:o.indexAfter(-2)<o.node(-3).childCount?2:3;c=c.append(i.from(e.createAndFill()));var h=o.before(o.depth-(u-1)),m=t.tr.replace(h,o.after(-f),new p(c,4-u,0)),v=-1;m.doc.nodesBetween(h,m.doc.content.size,(function(e,t){if(v>-1)return!1;e.isTextblock&&0==e.content.size&&(v=t+1)})),v>-1&&m.setSelection(t.selection.constructor.near(m.doc.resolve(v))),n(m.scrollIntoView())}return!0}var g=a.pos==o.end()?l.contentMatchAt(0).defaultType:null,y=t.tr.delete(o.pos,a.pos),b=g&&[null,{type:g}];return!!_e(y.doc,o.pos,2,b)&&(n&&n(y.split(o.pos,2,b).scrollIntoView()),!0)}}function Vn(e){return function(t,n){var r=t.selection,o=r.$from,a=r.$to,s=o.blockRange(a,(function(t){return t.childCount&&t.firstChild.type==e}));return!!s&&(!n||(o.node(s.depth-1).type==e?function(e,t,n,r){var o=e.tr,a=r.end,s=r.$to.end(r.depth);a<s&&(o.step(new Ie(a-1,s,a,s,new p(i.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new E(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));return t(o.lift(r,Me(r)).scrollIntoView()),!0}(t,n,e,s):function(e,t,n){for(var r=e.tr,o=n.parent,a=n.end,s=n.endIndex-1,l=n.startIndex;s>l;s--)a-=o.child(s).nodeSize,r.delete(a-1,a+1);var c=r.doc.resolve(n.start),u=c.nodeAfter;if(r.mapping.map(n.end)!=n.start+c.nodeAfter.nodeSize)return!1;var d=0==n.startIndex,f=n.endIndex==o.childCount,h=c.node(-1),m=c.index(-1);if(!h.canReplace(m+(d?0:1),m+1,u.content.append(f?i.empty:i.from(o))))return!1;var v=c.pos,g=v+u.nodeSize;return r.step(new Ie(v-(d?1:0),g+(f?1:0),v+1,g-1,new p((d?i.empty:i.from(o.copy(i.empty))).append(f?i.empty:i.from(o.copy(i.empty))),d?0:1,f?0:1),d?0:1)),t(r.scrollIntoView()),!0}(t,n,s)))}}function Hn(e){return function(t,n){var r=t.selection,o=r.$from,a=r.$to,s=o.blockRange(a,(function(t){return t.childCount&&t.firstChild.type==e}));if(!s)return!1;var l=s.startIndex;if(0==l)return!1;var c=s.parent,u=c.child(l-1);if(u.type!=e)return!1;if(n){var d=u.lastChild&&u.lastChild.type==c.type,f=i.from(d?e.create():null),h=new p(i.from(e.create(null,i.from(c.type.create(null,f)))),d?3:1,0),m=s.start,v=s.end;n(t.tr.step(new Ie(m-(d?3:1),v,m,v,h,1,!0)).scrollIntoView())}return!0}}var Kn={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},Wn={listType:Kn.orderedList,types:Ft({},Kn)},$n={listType:Kn.bulletList,types:Ft({},Kn)},qn={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:30,unit:"px"}],listsTypes:Ft({},Kn)},Un={nodes:[{node:"paragraph",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"},{node:"heading",style:"margin-left",rtlStyle:"margin-right",step:-30,unit:"px"}],listsTypes:Ft({},Kn)};function Gn(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function Xn(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=Zn(r);if(!o){var i=r.blockRange(),a=i&&Me(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&hr(e,o,t))return!0;if(0==r.parent.content.size&&(Jn(s,"end")||at.isSelectable(s))){var l=He(e.doc,r.before(),r.after(),p.empty);if(l.slice.size<l.to-l.from){if(t){var c=e.tr.step(l);c.setSelection(Jn(s,"end")?tt.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):at.create(c.doc,o.pos-s.nodeSize)),t(c.scrollIntoView())}return!0}}return!(!s.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0)}function Jn(e,t,n){for(;e;e="start"==t?e.firstChild:e.lastChild){if(e.isTextblock)return!0;if(n&&1!=e.childCount)return!1}return!1}function Yn(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):o.parentOffset>0)return!1;i=Zn(o)}var a=i&&i.nodeBefore;return!(!a||!at.isSelectable(a))&&(t&&t(e.tr.setSelection(at.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)}function Zn(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Qn(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;var o=tr(r);if(!o)return!1;var i=o.nodeAfter;if(hr(e,o,t))return!0;if(0==r.parent.content.size&&(Jn(i,"start")||at.isSelectable(i))){var a=He(e.doc,r.before(),r.after(),p.empty);if(a.slice.size<a.to-a.from){if(t){var s=e.tr.step(a);s.setSelection(Jn(i,"start")?tt.findFrom(s.doc.resolve(s.mapping.map(o.pos)),1):at.create(s.doc,s.mapping.map(o.pos))),t(s.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)}function er(e,t,n){var r=e.selection,o=r.$head,i=o;if(!r.empty)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):o.parentOffset<o.parent.content.size)return!1;i=tr(o)}var a=i&&i.nodeAfter;return!(!a||!at.isSelectable(a))&&(t&&t(e.tr.setSelection(at.create(e.doc,i.pos)).scrollIntoView()),!0)}function tr(e){if(!e.parent.type.spec.isolating)for(var t=e.depth-1;t>=0;t--){var n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function nr(e,t){var n,r=e.selection,o=r instanceof at;if(o){if(r.node.isTextblock||!je(e.doc,r.from))return!1;n=r.from}else if(null==(n=Ae(e.doc,r.from,-1)))return!1;if(t){var i=e.tr.join(n);o&&i.setSelection(at.create(i.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0}function rr(e,t){var n,r=e.selection;if(r instanceof at){if(r.node.isTextblock||!je(e.doc,r.to))return!1;n=r.to}else if(null==(n=Ae(e.doc,r.to,1)))return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0}function or(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&Me(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function ir(e,t){var n=e.selection,r=n.$head,o=n.$anchor;return!(!r.parent.type.spec.code||!r.sameParent(o))&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)}function ar(e){for(var t=0;t<e.edgeCount;t++){var n=e.edge(t).type;if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function sr(e,t){var n=e.selection,r=n.$head,o=n.$anchor;if(!r.parent.type.spec.code||!r.sameParent(o))return!1;var i=r.node(-1),a=r.indexAfter(-1),s=ar(i.contentMatchAt(a));if(!i.canReplaceWith(a,a,s))return!1;if(t){var l=r.after(),c=e.tr.replaceWith(l,l,s.createAndFill());c.setSelection(tt.near(c.doc.resolve(l),1)),t(c.scrollIntoView())}return!0}function lr(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof lt||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=ar(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){var a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(a,i.createAndFill());s.setSelection(ot.create(s.doc,a+1)),t(s.scrollIntoView())}return!0}function cr(e,t){var n=e.selection.$cursor;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){var r=n.before();if(_e(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&Me(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)}function ur(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof at&&e.selection.node.isBlock)return!(!r.parentOffset||!_e(e.doc,r.pos))&&(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.parent.isBlock)return!1;if(t){var i=o.parentOffset==o.parent.content.size,a=e.tr;(e.selection instanceof ot||e.selection instanceof lt)&&a.deleteSelection();var s=0==r.depth?null:ar(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=i&&s?[{type:s}]:null,c=_e(a.doc,a.mapping.map(r.pos),1,l);if(l||c||!_e(a.doc,a.mapping.map(r.pos),1,s&&[{type:s}])||(l=[{type:s}],c=!0),c&&(a.split(a.mapping.map(r.pos),1,l),!i&&!r.parentOffset&&r.parent.type!=s)){var u=a.mapping.map(r.before()),d=a.doc.resolve(u);r.node(-1).canReplaceWith(d.index(),d.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0}function dr(e,t){return ur(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})}function pr(e,t){var n,r=e.selection,o=r.$from,i=r.to,a=o.sharedDepth(i);return 0!=a&&(n=o.before(a),t&&t(e.tr.setSelection(at.create(e.doc,n))),!0)}function fr(e,t){return t&&t(e.tr.setSelection(new lt(e.doc))),!0}function hr(e,t,n){var r,o,a=t.nodeBefore,s=t.nodeAfter;if(a.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){var r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!(!t.parent.canReplace(i,i+1)||!o.isTextblock&&!je(e.doc,t.pos))&&(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0))}(e,t,n))return!0;var l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(r=(o=a.contentMatchAt(a.childCount)).findWrapping(s.type))&&o.matchType(r[0]||s.type).validEnd){if(n){for(var c=t.pos+s.nodeSize,u=i.empty,d=r.length-1;d>=0;d--)u=i.from(r[d].create(null,u));u=i.from(a.copy(u));var f=e.tr.step(new Ie(t.pos-1,c,t.pos,c,new p(u,1,0),r.length,!0)),h=c+2*r.length;je(f.doc,h)&&f.join(h),n(f.scrollIntoView())}return!0}var m=tt.findFrom(t,1),v=m&&m.$from.blockRange(m.$to),g=v&&Me(v);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(v,g).scrollIntoView()),!0;if(l&&Jn(s,"start",!0)&&Jn(a,"end")){for(var y=a,b=[];b.push(y),!y.isTextblock;)y=y.lastChild;for(var k=s,w=1;!k.isTextblock;k=k.firstChild)w++;if(y.canReplace(y.childCount,y.childCount,k.content)){if(n){for(var C=i.empty,O=b.length-1;O>=0;O--)C=i.from(b[O].copy(C));n(e.tr.step(new Ie(t.pos-b.length,t.pos+s.nodeSize,t.pos+w,t.pos+s.nodeSize-w,new p(C,b.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function mr(e){return function(t,n){for(var r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(ot.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}var vr=mr(-1),gr=mr(1);function yr(e,t){return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=s&&De(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}function br(e,t){return function(n,r){var o=n.selection,i=o.from,a=o.to,s=!1;return n.doc.nodesBetween(i,a,(function(r,o){if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{var i=n.doc.resolve(o),a=i.index();s=i.parent.canReplaceWith(a,a+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(i,a,e,t).scrollIntoView()),!0)}}function kr(e,t){return function(n,r){var o=n.selection,i=o.empty,a=o.$cursor,s=o.ranges;if(i&&!a||!function(e,t,n){for(var r=function(r){var o=t[r],i=o.$from,a=o.$to,s=0==i.depth&&e.type.allowsMarkType(n);if(e.nodesBetween(i.pos,a.pos,(function(e){if(s)return!1;s=e.inlineContent&&e.type.allowsMarkType(n)})),s)return{v:!0}},o=0;o<t.length;o++){var i=r(o);if(i)return i.v}return!1}(n.doc,s,e))return!1;if(r)if(a)e.isInSet(n.storedMarks||a.marks())?r(n.tr.removeStoredMark(e)):r(n.tr.addStoredMark(e.create(t)));else{for(var l=!1,c=n.tr,u=0;!l&&u<s.length;u++){var d=s[u],p=d.$from,f=d.$to;l=n.doc.rangeHasMark(p.pos,f.pos,e)}for(var h=0;h<s.length;h++){var m=s[h],v=m.$from,g=m.$to;if(l)c.removeMark(v.pos,g.pos,e);else{var y=v.pos,b=g.pos,k=v.nodeAfter,w=g.nodeBefore,C=k&&k.isText?/^\s*/.exec(k.text)[0].length:0,O=w&&w.isText?/\s*$/.exec(w.text)[0].length:0;y+C<b&&(y+=C,b-=O),c.addMark(y,b,e.create(t))}}r(c.scrollIntoView())}return!0}}function wr(e,t){if(Array.isArray(t)){var n=t;t=function(e){return n.indexOf(e.type.name)>-1}}return function(n,r,o){return e(n,r&&function(e,t){return function(n){if(!n.isGeneric)return e(n);for(var r=[],o=0;o<n.mapping.maps.length;o++){for(var i=n.mapping.maps[o],a=0;a<r.length;a++)r[a]=i.map(r[a]);i.forEach((function(e,t,n,o){return r.push(n,o)}))}for(var s=[],l=0;l<r.length;l+=2)for(var c=r[l],u=r[l+1],d=n.doc.resolve(c),p=d.sharedDepth(u),f=d.node(p),h=d.indexAfter(p),m=d.after(p+1);m<=u;++h){var v=f.maybeChild(h);if(!v)break;if(h&&-1==s.indexOf(m)){var g=f.child(h-1);g.type==v.type&&t(g,v)&&s.push(m)}m+=v.nodeSize}s.sort((function(e,t){return e-t}));for(var y=s.length-1;y>=0;y--)je(n.doc,s[y])&&n.join(s[y]);e(n)}}(r,t),o)}}function Cr(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t,n,r){for(var o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}var Or=Cr(Gn,Xn,Yn),xr=Cr(Gn,Qn,er),Sr={Enter:Cr(ir,lr,cr,ur),"Mod-Enter":sr,Backspace:Or,"Mod-Backspace":Or,"Shift-Backspace":Or,Delete:xr,"Mod-Delete":xr,"Mod-a":fr},Er={"Ctrl-h":Sr.Backspace,"Alt-Backspace":Sr["Mod-Backspace"],"Ctrl-d":Sr.Delete,"Ctrl-Alt-Backspace":Sr["Mod-Delete"],"Alt-Delete":Sr["Mod-Delete"],"Alt-d":Sr["Mod-Delete"],"Ctrl-a":vr,"Ctrl-e":gr};for(var Ir in Sr)Er[Ir]=Sr[Ir];var Nr=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?Er:Sr,Tr=function(e,t){return yr(e.schema.nodes.blockquote)(e,t)},Mr=function(e,t){var n=e.selection,r=n.$from,o=n.$to,i=e.schema.nodes.blockquote,a=e.doc,s=-1,l=r.blockRange(o);l&&a.nodesBetween(l.start,l.end,(function(e,t,n,r){e.type===i&&(s=t)}));var c=-1!==s;return t&&c&&t(e.tr.lift(l,a.resolve(s).depth)),c},Dr=function(e,t,n){return function(r,o){var i=kn(r),a=r.tr;a.setMeta("commandName",t),i.forEach((function(t){if(t.type.isTextblock){var r=void 0,o=e.find((function(e){return e.node===t.type.name}));if(o){var i="rtl"===n?o.rtlStyle:o.style,s={name:i,value:o.step>0?""+o.step+o.unit:""};if(t.attrs.style){var l=new RegExp(i+":\\s?(\\d+)"+o.unit,"i"),c=t.attrs.style.match(l);if(c){var u=parseFloat(c[1])+o.step;u=u<=0?"":u,s.value=""+u+(u?o.unit:"")}}r=xn(t,[s])}r&&bn(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},Pr=function(e,t,n){var r=kn(e),o=!1;return r.forEach((function(e){if(!o&&e.type.isTextblock&&e.attrs.style){var r=t.find((function(t){return t.node===e.type.name}));if(r){var i="rtl"===n?r.rtlStyle:r.style,a=new RegExp(i+":\\s?\\d+"+r.unit,"i");o=a.test(e.attrs.style)}}})),o},_r=function(e,t){return Hn(t)(e)},jr=function(e,t){var n=e.schema.nodes[t.listsTypes.listItem],r=e.schema.nodes[t.listsTypes.orderedList],o=e.schema.nodes[t.listsTypes.bulletList],i=!!Ht(r,2)(e.selection),a=!!Ht(o,2)(e.selection);return(i||a)&&Vn(n)(e)},Rr=function(e,t){var n=e.schema.nodes,r=n[qn.listsTypes.listItem];return(Pr(e,t.nodes)||qn.nodes.some((function(t){return n[t.node]&&Sn(e,n[t.node])})))&&!Sn(e,r)},Ar=function(e,t){var n=e.schema.nodes[qn.listsTypes.listItem],r=Rr(e,qn);_r(e,n)?Hn(n)(e,t):r&&Dr(qn.nodes)(e,t)},Fr=function(e,t){var n=e.schema.nodes,r=n[Un.listsTypes.listItem],o=Rr(e,Un);Sn(e,n.blockquote)?Mr(e,t):jr(e,Un)?Vn(r)(e,t):o&&Dr(Un.nodes)(e,t)},zr=function(e,t,n){for(var r=t.depth,o=e.nodes[n.bulletList],i=e.nodes[n.orderedList],a=e.nodes[n.listItem],s=t.depth;s>0;s--){var l=t.node(s);if(l.type!==o&&l.type!==i||(r=s),l.type!==o&&l.type!==i&&l.type!==a)break}return r-1};function Lr(e){return function(t,n,r){if(!r)return!1;var o=(t=r.state).schema.nodes[e.listType],i=t.selection,a=i.$from,s=i.$to,l=a.node(-2),c=a.node(-3),u=function(e,t,n,r){return 0===function(e,t,n){var r=Array(),o=function(e,t){var n=["blockquote","bulletList","orderedList"];if(1===t.depth)return t;var r=t.node(t.depth),o=t;for(;t.depth>=1;)t=e.resolve(t.before(t.depth)),(r=t.node(t.depth))&&-1!==n.indexOf(r.type.name)&&(o=t);return o}(e,t).depth,i=e.resolve(t.start(o));for(;i.pos<=n.start(n.depth);){var a=Math.min(i.depth,o),s=i.node(a);if(s&&r.push(s),0===a)break;var l=e.resolve(i.after(a));if(l.start(a)>=e.nodeSize-2)break;l.depth!==i.depth&&(l=e.resolve(l.pos+2)),i=l.depth?e.resolve(l.start(l.depth)):e.resolve(l.end(l.depth))}return r}(e,t,n).filter((function(e){return e.type!==r})).length}(t.doc,a,s,o);return(l&&l.type===o||c&&c.type===o)&&u?Vr(e)(t,n):(u||(Vr(e)(t,n),t=r.state),function(e,t){void 0===t&&(t={});return wr(Ln(e,t),(function(t,n){return t.type===n.type&&t.type===e}))}(o,e.listAttrs)(t,n))}}function Br(e,t,n,r){var o=r||e.schema.nodes.listItem,a=t.$from,s=t.$to,l=a.blockRange(s,(function(e){return e.childCount&&e.firstChild.type===o}));if(!l||l.depth<2||a.node(l.depth-1).type!==o)return n;var c=l.end,u=s.end(l.depth);return c<u&&(n.step(new Ie(c-1,u,c,u,new p(i.from(o.create(void 0,l.parent.copy())),1,0),1,!0)),l=new E(n.doc.resolve(a.pos),n.doc.resolve(u),l.depth)),n.lift(l,Me(l)).scrollIntoView()}function Vr(e){return function(t,n){var r=t.tr,o=t.selection,i=o.$from,a=o.$to;return r.doc.nodesBetween(i.pos,a.pos,(function(n,o){if(n.isTextblock||"blockquote"===n.type.name||"div"===n.type.name){var i=new at(r.doc.resolve(r.mapping.map(o))),a=i.$from.blockRange(i.$to);if(!a||i.$from.parent.type!==t.schema.nodes[e.listItem])return!1;var s=a&&Me(a);if(null==s)return!1;r.lift(a,s)}})),n&&n(r),!0}}var Hr=/list\-style\-type:\s?([\w-]+)/,Kr=function(e){var t=e.style||"",n=Hr.exec(t);return n&&n[1]||""},Wr=function(e,t,n,r,o){var i=r.listType,a=r.listAttrs,s=void 0===a?{style:null}:a,l=e.selection,c=l.$from.node(l.$from.depth-2),u=l.$to.node(l.$to.depth-2);if(c&&c.type.name===i&&Kr(c.attrs)===Kr(s)&&u&&u.type.name===i&&Kr(u.attrs)===Kr(s)){var d=n.state.schema.nodes,p={bulletList:d[r.bulletList],orderedList:d[r.orderedList],listItem:d[r.listItem]},f=function(e,t){for(var n,r=t.bulletList,o=t.orderedList,i=t.listItem,a=e.depth-1;a>0;a--){var s=e.node(a);if(s.type!==r&&s.type!==o||(n=a),s.type!==r&&s.type!==o&&s.type!==i)break}return n}(l.$to,p),h=function(e,t,n,r,o,i){i||(i=e.schema.nodes.listItem);var a=!1;return o.doc.nodesBetween(t,n,(function(n,s){if(!a&&n.type===i&&s>t){a=!0;for(var l=r+3;l>r+2;){var c=o.doc.resolve(o.mapping.map(s));l=c.depth;var u=o.doc.resolve(o.mapping.map(s+n.textContent.length)),d=new ot(c,u);o=Br(e,d,o,i)}}})),o}(e,l.$to.pos,l.$to.end(f),f,n.state.tr,p.listItem);return(h=function(e,t,n){var r=e.selection,o=r.from,i=r.to,a=e.schema.nodes,s=a.paragraph,l=a.heading,c=[];t.doc.nodesBetween(o,i,(function(e,t){e.type!==s&&e.type!==l||c.push({node:e,pos:t})}));for(var u=c.length-1;u>=0;u--){var d=c[u],p=t.doc.resolve(t.mapping.map(d.pos));if(p.depth>0){var f=void 0;f=d.node.textContent&&d.node.textContent.length>0?t.doc.resolve(t.mapping.map(d.pos+d.node.textContent.length)):t.doc.resolve(t.mapping.map(d.pos+1));var h=p.blockRange(f);h&&t.lift(h,zr(e.schema,p,n))}}return t}(e,h,r)).setMeta("commandName",o),t(h),!0}return Lr(r)(e,t,n)};function $r(e,t,n){return Wr(e,t,n,Ft({listType:$n.listType},$n.types))}function qr(e,t,n){return Wr(e,t,n,Ft({listType:Wn.listType},Wn.types))}for(var Ur=function(e,t){return{name:e,value:t}},Gr=[{node:"paragraph",style:[Ur("text-align","left")]},{node:"heading",style:[Ur("text-align","left")]}],Xr=[{node:"paragraph",style:[Ur("text-align","right")]},{node:"heading",style:[Ur("text-align","right")]}],Jr=[{node:"paragraph",style:[Ur("text-align","center")]},{node:"heading",style:[Ur("text-align","center")]}],Yr=[{node:"paragraph",style:[Ur("text-align","justify")]},{node:"heading",style:[Ur("text-align","justify")]}],Zr=[{node:"paragraph",style:[Ur("text-align","")]},{node:"heading",style:[Ur("text-align","")]}],Qr={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},eo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},to="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),no="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),ro="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),oo="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),io="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ao=to&&(oo||+to[1]<57)||ro&&oo,so=0;so<10;so++)Qr[48+so]=Qr[96+so]=String(so);for(so=1;so<=24;so++)Qr[so+111]="F"+so;for(so=65;so<=90;so++)Qr[so]=String.fromCharCode(so+32),eo[so]=String.fromCharCode(so);for(var lo in Qr)eo.hasOwnProperty(lo)||(eo[lo]=Qr[lo]);var co="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function uo(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s<i.length-1;s++){var l=i[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);co?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function po(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function fo(e){return new kt({props:{handleKeyDown:ho(e)}})}function ho(e){var t=function(e){var t=Object.create(null);for(var n in e)t[uo(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(ao&&(e.ctrlKey||e.altKey||e.metaKey)||(no||io)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?eo:Qr)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,a=t[po(o,n,!i)];if(a&&a(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Qr[n.keyCode])&&r!=o){var s=t[po(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var l=t[po(o,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}return!1}}var mo={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var vo=/Edge\/(\d+)/.exec(navigator.userAgent),go=/MSIE \d/.test(navigator.userAgent),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),bo=mo.ie=!!(go||yo||vo);mo.ie_version=go?document.documentMode||6:yo?+yo[1]:vo?+vo[1]:null,mo.gecko=!bo&&/gecko\/(\d+)/i.test(navigator.userAgent),mo.gecko_version=mo.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var ko=!bo&&/Chrome\/(\d+)/.exec(navigator.userAgent);mo.chrome=!!ko,mo.chrome_version=ko&&+ko[1],mo.safari=!bo&&/Apple Computer/.test(navigator.vendor),mo.ios=mo.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),mo.mac=mo.ios||/Mac/.test(navigator.platform),mo.android=/Android \d/.test(navigator.userAgent),mo.webkit="webkitFontSmoothing"in document.documentElement.style,mo.webkit_version=mo.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var wo=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Co=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},Oo=null,xo=function(e,t,n){var r=Oo||(Oo=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},So=function(e,t,n,r){return n&&(Io(e,t,n,r,-1)||Io(e,t,n,r,1))},Eo=/^(img|br|input|textarea|hr)$/i;function Io(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:No(e))){var i=e.parentNode;if(!i||1!=i.nodeType||To(e)||Eo.test(e.nodeName)||"false"==e.contentEditable)return!1;t=wo(e)+(o<0?0:1),e=i}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?No(e):0}}}function No(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function To(e){for(var t,n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Mo=function(e){var t=e.isCollapsed;return t&&mo.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function Do(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function Po(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function _o(e,t){return"number"==typeof e?e:e[t]}function jo(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function Ro(e,t,n){for(var r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,i=e.dom.ownerDocument,a=n||e.dom;a;a=Co(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,l=s?Po(i):jo(a),c=0,u=0;if(t.top<l.top+_o(r,"top")?u=-(l.top-t.top+_o(o,"top")):t.bottom>l.bottom-_o(r,"bottom")&&(u=t.bottom-l.bottom+_o(o,"bottom")),t.left<l.left+_o(r,"left")?c=-(l.left-t.left+_o(o,"left")):t.right>l.right-_o(r,"right")&&(c=t.right-l.right+_o(o,"right")),c||u)if(s)i.defaultView.scrollBy(c,u);else{var d=a.scrollLeft,p=a.scrollTop;u&&(a.scrollTop+=u),c&&(a.scrollLeft+=c);var f=a.scrollLeft-d,h=a.scrollTop-p;t={left:t.left-f,top:t.top-h,right:t.right-f,bottom:t.bottom-h}}if(s)break}}function Ao(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=Co(e));return t}function Fo(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=r.dom,i=r.top,a=r.left;o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=a&&(o.scrollLeft=a)}}var zo=null;function Lo(e,t){for(var n,r,o=2e8,i=0,a=t.top,s=t.top,l=e.firstChild,c=0;l;l=l.nextSibling,c++){var u=void 0;if(1==l.nodeType)u=l.getClientRects();else{if(3!=l.nodeType)continue;u=xo(l).getClientRects()}for(var d=0;d<u.length;d++){var p=u[d];if(p.top<=a&&p.bottom>=s){a=Math.max(p.bottom,a),s=Math.min(p.top,s);var f=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(f<o){n=l,o=f,r=f&&3==n.nodeType?{left:p.right<t.left?p.right:p.left,top:t.top}:t,1==l.nodeType&&f&&(i=c+(t.left>=(p.left+p.right)/2?1:0));continue}}!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);var i=Ho(r,1);if(i.top!=i.bottom&&Bo(t,i))return{node:e,offset:o+(t.left>=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:Lo(n,r)}function Bo(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Vo(e,t){var n,r,o,i,a=e.dom.ownerDocument;if(a.caretPositionFromPoint)try{var s=a.caretPositionFromPoint(t.left,t.top);s&&(o=(n=s).offsetNode,i=n.offset)}catch(e){}if(!o&&a.caretRangeFromPoint){var l=a.caretRangeFromPoint(t.left,t.top);l&&(o=(r=l).startContainer,i=r.startOffset)}var c,u=(e.root.elementFromPoint?e.root:a).elementFromPoint(t.left,t.top+1);if(!u||!e.dom.contains(1!=u.nodeType?u.parentNode:u)){var d=e.dom.getBoundingClientRect();if(!Bo(t,d))return null;if(!(u=function e(t,n,r){var o=t.childNodes.length;if(o&&r.top<r.bottom)for(var i=Math.max(0,Math.min(o-1,Math.floor(o*(n.top-r.top)/(r.bottom-r.top))-2)),a=i;;){var s=t.childNodes[a];if(1==s.nodeType)for(var l=s.getClientRects(),c=0;c<l.length;c++){var u=l[c];if(Bo(n,u))return e(s,n,u)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,d)))return null}if(mo.safari)for(var p=u;o&&p;p=Co(p))p.draggable&&(o=i=null);if(u=function(e,t){var n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(u,t),o){if(mo.gecko&&1==o.nodeType&&(i=Math.min(i,o.childNodes.length))<o.childNodes.length){var f,h=o.childNodes[i];"IMG"==h.nodeName&&(f=h.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?c=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(c=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right<r.left||s.bottom<r.top))break;o=a.posAfter}}i=a.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==c&&(c=function(e,t,n){var r=Lo(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,u,t));var m=e.docView.nearestDesc(u,!0);return{pos:c,inside:m?m.posAtStart-m.border:-1}}function Ho(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var Ko=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Wo(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=mo.webkit||mo.gecko;if(3==o.nodeType){if(!a||!Ko.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){var s=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==o.nodeValue.length?(s--,c=1):n<0?s--:l++,$o(Ho(xo(o,s,l),c),c<0)}var u=Ho(xo(o,i,i),n);if(mo.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var d=Ho(xo(o,i-1,i-1),-1);if(d.top==u.top){var p=Ho(xo(o,i,i+1),-1);if(p.top!=u.top)return $o(p,p.left<d.left)}}return u}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==No(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return qo(f.getBoundingClientRect(),!1)}if(i<No(o)){var h=o.childNodes[i];if(1==h.nodeType)return qo(h.getBoundingClientRect(),!0)}return qo(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==No(o))){var m=o.childNodes[i-1],v=3==m.nodeType?xo(m,No(m)-(a?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return $o(Ho(v,1),!1)}if(i<No(o)){for(var g=o.childNodes[i];g.pmViewDesc&&g.pmViewDesc.ignoreForCoords;)g=g.nextSibling;var y=g?3==g.nodeType?xo(g,0,a?0:1):1==g.nodeType?g:null:null;if(y)return $o(Ho(y,-1),!0)}return $o(Ho(3==o.nodeType?xo(o):o,-n),n>=0)}function $o(e,t){if(0==e.width)return e;var n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function qo(e,t){if(0==e.height)return e;var n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Uo(e,t,n){var r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}var Go=/[\u0590-\u08ac]/;var Xo=null,Jo=null,Yo=!1;function Zo(e,t,n){return Xo==t&&Jo==n?Yo:(Xo=t,Jo=n,Yo="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Uo(e,t,(function(){for(var t=e.docView.domFromPos(o.pos,"up"==n?-1:1).node;;){var r=e.docView.nearestDesc(t,!0);if(!r)break;if(r.node.isBlock){t=r.dom;break}t=r.dom.parentNode}for(var i=Wo(e,o.pos,1),a=t.firstChild;a;a=a.nextSibling){var s=void 0;if(1==a.nodeType)s=a.getClientRects();else{if(3!=a.nodeType)continue;s=xo(a,0,a.nodeValue.length).getClientRects()}for(var l=0;l<s.length;l++){var c=s[l];if(c.bottom>c.top+1&&("up"==n?i.top-c.top>2*(c.bottom-i.top):c.bottom-i.bottom>2*(i.bottom-c.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=e.root.getSelection();return Go.test(r.parent.textContent)&&s.modify?Uo(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var l=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),l})):"left"==n||"backward"==n?i:a}(e,t,n))}var Qo=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},ei={size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0},domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};Qo.prototype.matchesWidget=function(){return!1},Qo.prototype.matchesMark=function(){return!1},Qo.prototype.matchesNode=function(){return!1},Qo.prototype.matchesHack=function(e){return!1},Qo.prototype.parseRule=function(){return null},Qo.prototype.stopEvent=function(){return!1},ei.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},ei.border.get=function(){return 0},Qo.prototype.destroy=function(){this.parent=null,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=null);for(var e=0;e<this.children.length;e++)this.children[e].destroy()},Qo.prototype.posBeforeChild=function(e){for(var t=0,n=this.posAtStart;t<this.children.length;t++){var r=this.children[t];if(r==e)return n;n+=r.size}},ei.posBefore.get=function(){return this.parent.posBeforeChild(this)},ei.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},ei.posAfter.get=function(){return this.posBefore+this.size},ei.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},Qo.prototype.localPosFromDOM=function(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){var r,o;if(e==this.contentDOM)r=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;r=e.previousSibling}for(;r&&(!(o=r.pmViewDesc)||o.parent!=this);)r=r.previousSibling;return r?this.posBeforeChild(o)+o.size:this.posAtStart}var i,a;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&(!(a=i.pmViewDesc)||a.parent!=this);)i=i.nextSibling;return i?this.posBeforeChild(a):this.posAtEnd}var s;if(e==this.dom&&this.contentDOM)s=t>wo(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(var l=e;;l=l.parentNode){if(l==this.dom){s=!1;break}if(l.parentNode.firstChild!=l)break}if(null==s&&t==e.childNodes.length)for(var c=e;;c=c.parentNode){if(c==this.dom){s=!0;break}if(c.parentNode.lastChild!=c)break}}return(null==s?n>0:s)?this.posAtEnd:this.posAtStart},Qo.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},Qo.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},Qo.prototype.posFromDOM=function(e,t,n){for(var r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1},Qo.prototype.descAt=function(e){for(var t=0,n=0;t<this.children.length;t++){var r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}},Qo.prototype.domFromPos=function(e,t){if(!this.contentDOM)return{node:this.dom,offset:0};for(var n=0,r=0,o=0;n<this.children.length;n++){var i=this.children[n],a=o+i.size;if(a>e||i instanceof li){r=e-o;break}o=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(var s=void 0;n&&!(s=this.children[n-1]).size&&s instanceof ni&&s.widget.type.side>=0;n--);if(t<=0){for(var l,c=!0;(l=n?this.children[n-1]:null)&&l.dom.parentNode!=this.contentDOM;n--,c=!1);return l&&t&&c&&!l.border&&!l.domAtom?l.domFromPos(l.size,t):{node:this.contentDOM,offset:l?wo(l.dom)+1:0}}for(var u,d=!0;(u=n<this.children.length?this.children[n]:null)&&u.dom.parentNode!=this.contentDOM;n++,d=!1);return u&&d&&!u.border&&!u.domAtom?u.domFromPos(0,t):{node:this.contentDOM,offset:u?wo(u.dom):this.contentDOM.childNodes.length}},Qo.prototype.parseRange=function(e,t,n){if(void 0===n&&(n=0),0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var r=-1,o=-1,i=n,a=0;;a++){var s=this.children[a],l=i+s.size;if(-1==r&&e<=l){var c=i+s.border;if(e>=c&&t<=l-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,c);e=i;for(var u=a;u>0;u--){var d=this.children[u-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=wo(d.dom)+1;break}e-=d.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var p=a+1;p<this.children.length;p++){var f=this.children[p];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=wo(f.dom);break}t+=f.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}},Qo.prototype.emptyChildAt=function(e){if(this.border||!this.contentDOM||!this.children.length)return!1;var t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)},Qo.prototype.domAfterPos=function(e){var t=this.domFromPos(e,0),n=t.node,r=t.offset;if(1!=n.nodeType||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]},Qo.prototype.setSelection=function(e,t,n,r){for(var o=Math.min(e,t),i=Math.max(e,t),a=0,s=0;a<this.children.length;a++){var l=this.children[a],c=s+l.size;if(o>s&&i<c)return l.setSelection(e-s-l.border,t-s-l.border,n,r);s=c}var u=this.domFromPos(e,e?-1:1),d=t==e?u:this.domFromPos(t,t?-1:1),p=n.getSelection(),f=!1;if((mo.gecko||mo.safari)&&e==t){var h=u.node,m=u.offset;if(3==h.nodeType){if((f=m&&"\n"==h.nodeValue[m-1])&&m==h.nodeValue.length)for(var v=h,g=void 0;v;v=v.parentNode){if(g=v.nextSibling){"BR"==g.nodeName&&(u=d={node:g.parentNode,offset:wo(g)+1});break}var y=v.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{var b=h.childNodes[m-1];f=b&&("BR"==b.nodeName||"false"==b.contentEditable)}}if(mo.gecko&&p.focusNode&&p.focusNode!=d.node&&1==p.focusNode.nodeType){var k=p.focusNode.childNodes[p.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||f&&mo.safari||!So(u.node,u.offset,p.anchorNode,p.anchorOffset)||!So(d.node,d.offset,p.focusNode,p.focusOffset)){var w=!1;if((p.extend||e==t)&&!f){p.collapse(u.node,u.offset);try{e!=t&&p.extend(d.node,d.offset),w=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!w){if(e>t){var C=u;u=d,d=C}var O=document.createRange();O.setEnd(d.node,d.offset),O.setStart(u.node,u.offset),p.removeAllRanges(),p.addRange(O)}}},Qo.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},ei.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Qo.prototype.markDirty=function(e,t){for(var n=0,r=0;r<this.children.length;r++){var o=this.children[r],i=n+o.size;if(n==i?e<=i&&t>=n:e<i&&t>n){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2},Qo.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty<n&&(t.dirty=n)}},ei.domAtom.get=function(){return!1},ei.ignoreForCoords.get=function(){return!1},Object.defineProperties(Qo.prototype,ei);var ti=[],ni=function(e){function t(t,n,r,o){var i,a=n.type.toDOM;if("function"==typeof a&&(a=a(r,(function(){return i?i.parent?i.parent.posBeforeChild(i):void 0:o}))),!n.type.spec.raw){if(1!=a.nodeType){var s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable=!1,a.classList.add("ProseMirror-widget")}e.call(this,t,ti,a,null),this.widget=n,i=this}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.matchesWidget=function(e){return 0==this.dirty&&e.type.eq(this.widget.type)},t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.stopEvent=function(e){var t=this.widget.spec.stopEvent;return!!t&&t(e)},t.prototype.ignoreMutation=function(e){return"selection"!=e.type||this.widget.spec.ignoreSelection},t.prototype.destroy=function(){this.widget.type.destroy(this.dom),e.prototype.destroy.call(this)},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(Qo),ri=function(e){function t(t,n,r,o){e.call(this,t,ti,n,null),this.textDOM=r,this.text=o}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0}};return n.size.get=function(){return this.text.length},t.prototype.localPosFromDOM=function(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t},t.prototype.domFromPos=function(e){return{node:this.textDOM,offset:e}},t.prototype.ignoreMutation=function(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue},Object.defineProperties(t.prototype,n),t}(Qo),oi=function(e){function t(t,n,r,o){e.call(this,t,[],r,o),this.mark=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.create=function(e,n,r,o){var i=o.nodeViews[n.type.name],a=i&&i(n,o,r);return a&&a.dom||(a=de.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,a.dom,a.contentDOM||a.dom)},t.prototype.parseRule=function(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}},t.prototype.matchesMark=function(e){return 3!=this.dirty&&this.mark.eq(e)},t.prototype.markDirty=function(t,n){if(e.prototype.markDirty.call(this,t,n),0!=this.dirty){for(var r=this.parent;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}},t.prototype.slice=function(e,n,r){var o=t.create(this.parent,this.mark,!0,r),i=this.children,a=this.size;n<a&&(i=ki(i,n,a,r)),e>0&&(i=ki(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},t}(Qo),ii=function(e){function t(t,n,r,o,i,a,s,l,c){e.call(this,t,n.isLeaf?ti:[],i,a),this.nodeDOM=s,this.node=n,this.outerDeco=r,this.innerDeco=o,a&&this.updateChildren(l,c)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={size:{configurable:!0},border:{configurable:!0},domAtom:{configurable:!0}};return t.create=function(e,n,r,o,i,a){var s,l,c=i.nodeViews[n.type.name],u=c&&c(n,i,(function(){return l?l.parent?l.parent.posBeforeChild(l):void 0:a}),r,o),d=u&&u.dom,p=u&&u.contentDOM;if(n.isText)if(d){if(3!=d.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(n.text);else d||(d=(s=de.renderSpec(document,n.type.spec.toDOM(n))).dom,p=s.contentDOM);p||n.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable=!1),n.type.spec.draggable&&(d.draggable=!0));var f=d;return d=mi(d,r,n),u?l=new ci(e,n,r,o,d,p,f,u,i,a+1):n.isText?new si(e,n,r,o,d,f,i):new t(e,n,r,o,d,p,f,i,a+1)},t.prototype.parseRule=function(){var e=this;if(this.node.type.spec.reparseInView)return null;var t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(var n=this.children.length-1;n>=0;n--){var r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=function(){return i.empty})}else t.contentElement=this.contentDOM;else t.getContent=function(){return e.node.content};return t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&vi(t,this.outerDeco)&&n.eq(this.innerDeco)},n.size.get=function(){return this.node.nodeSize},n.border.get=function(){return this.node.isLeaf?0:1},t.prototype.updateChildren=function(e,t){var n=this,r=this.node.inlineContent,o=t,i=e.composing&&this.localCompositionInfo(e,t),a=i&&i.pos>-1?i:null,s=i&&i.pos<0,l=new yi(this,a&&a.node);!function(e,t,n,r){var o=t.locals(e),i=0;if(0==o.length){for(var a=0;a<e.childCount;a++){var s=e.child(a);r(s,o,t.forChild(i,s),a),i+=s.nodeSize}return}for(var l=0,c=[],u=null,d=0;;){if(l<o.length&&o[l].to==i){for(var p=o[l++],f=void 0;l<o.length&&o[l].to==i;)(f||(f=[p])).push(o[l++]);if(f){f.sort(bi);for(var h=0;h<f.length;h++)n(f[h],d,!!u)}else n(p,d,!!u)}var m=void 0,v=void 0;if(u)v=-1,m=u,u=null;else{if(!(d<e.childCount))break;v=d,m=e.child(d++)}for(var g=0;g<c.length;g++)c[g].to<=i&&c.splice(g--,1);for(;l<o.length&&o[l].from<=i&&o[l].to>i;)c.push(o[l++]);var y=i+m.nodeSize;if(m.isText){var b=y;l<o.length&&o[l].from<b&&(b=o[l].from);for(var k=0;k<c.length;k++)c[k].to<b&&(b=c[k].to);b<y&&(u=m.cut(b-i),m=m.cut(0,b-i),y=b,v=-1)}var w=c.length?m.isInline&&!m.isLeaf?c.filter((function(e){return!e.inline})):c.slice():ti;r(m,w,t.forChild(i,m),v),i=y}}(this.node,this.innerDeco,(function(t,i,a){t.spec.marks?l.syncToMarks(t.spec.marks,r,e):t.type.side>=0&&!a&&l.syncToMarks(i==n.node.childCount?u.none:n.node.child(i).marks,r,e),l.placeWidget(t,e,o)}),(function(t,n,a,c){var u;l.syncToMarks(t.marks,r,e),l.findNodeMatch(t,n,a,c)||s&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(u=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,n,a,u,e)||l.updateNextNode(t,n,a,e,c)||l.addNode(t,n,a,e,o),o+=t.nodeSize})),l.syncToMarks(ti,r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),function e(t,n,r){for(var o=t.firstChild,i=!1,a=0;a<n.length;a++){var s=n[a],l=s.dom;if(l.parentNode==t){for(;l!=o;)o=gi(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(s instanceof oi){var c=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=c?c.nextSibling:t.firstChild}}for(;o;)o=gi(o),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),mo.ios&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){var t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))},t.prototype.localCompositionInfo=function(e,t){var n=e.state.selection,r=n.from,o=n.to;if(!(!(e.state.selection instanceof ot)||r<t||o>t+this.node.content.size)){var i=e.root.getSelection(),a=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=No(e)}else{if(!(1==e.nodeType&&t<e.childNodes.length))return null;e=e.childNodes[t],t=0}}}(i.focusNode,i.focusOffset);if(a&&this.dom.contains(a.parentNode)){if(this.node.inlineContent){var s=a.nodeValue,l=function(e,t,n,r){for(var o=0,i=0;o<e.childCount&&i<=r;){var a=e.child(o++),s=i;if(i+=a.nodeSize,a.isText){for(var l=a.text;o<e.childCount;){var c=e.child(o++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){var u=s<r?l.lastIndexOf(t,r-s-1):-1;if(u>=0&&u+t.length+s>=n)return s+u;if(n==r&&l.length>=r+t.length-s&&l.slice(r-s,r-s+t.length)==t)return r}}}return-1}(this.node.content,s,r-t,o-t);return l<0?null:{node:a,pos:l,text:s}}return{node:a,pos:-1}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new ri(this,i,n,o);e.compositionNodes.push(a),this.children=ki(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!vi(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=fi(this.dom,this.nodeDOM,pi(this.outerDeco,this.node,t),pi(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},n.domAtom.get=function(){return this.node.isAtom},Object.defineProperties(t.prototype,n),t}(Qo);function ai(e,t,n,r,o){return mi(r,t,e),new ii(null,e,t,n,r,r,r,o,0)}var si=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0}};return t.prototype.parseRule=function(){for(var e=this.nodeDOM.parentNode;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t.prototype.markDirty=function(t,n){e.prototype.markDirty.call(this,t,n),this.dom==this.nodeDOM||0!=t&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)},n.domAtom.get=function(){return!1},Object.defineProperties(t.prototype,n),t}(ii),li=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={domAtom:{configurable:!0},ignoreForCoords:{configurable:!0}};return t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(e){return 0==this.dirty&&this.dom.nodeName==e},n.domAtom.get=function(){return!0},n.ignoreForCoords.get=function(){return"IMG"==this.dom.nodeName},Object.defineProperties(t.prototype,n),t}(Qo),ci=function(e){function t(t,n,r,o,i,a,s,l,c,u){e.call(this,t,n,r,o,i,a,s,c,u),this.spec=l}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n,r);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(ii);function ui(e){e&&(this.nodeName=e)}ui.prototype=Object.create(null);var di=[new ui];function pi(e,t,n){if(0==e.length)return di;for(var r=n?di[0]:new ui,o=[r],i=0;i<e.length;i++){var a=e[i].type.attrs;if(a)for(var s in a.nodeName&&o.push(r=new ui(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new ui(t.isInline?"span":"div")),"class"==s?r.class=(r.class?r.class+" ":"")+l:"style"==s?r.style=(r.style?r.style+";":"")+l:"nodeName"!=s&&(r[s]=l))}}return o}function fi(e,t,n,r){if(n==di&&r==di)return t;for(var o=t,i=0;i<r.length;i++){var a=r[i],s=n[i];if(i){var l=void 0;s&&s.nodeName==a.nodeName&&o!=e&&(l=o.parentNode)&&l.tagName.toLowerCase()==a.nodeName||((l=document.createElement(a.nodeName)).pmIsDeco=!0,l.appendChild(o),s=di[0]),o=l}hi(o,s||di[0],a)}return o}function hi(e,t,n){for(var r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(var o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){for(var i=t.class?t.class.split(" ").filter(Boolean):ti,a=n.class?n.class.split(" ").filter(Boolean):ti,s=0;s<i.length;s++)-1==a.indexOf(i[s])&&e.classList.remove(i[s]);for(var l=0;l<a.length;l++)-1==i.indexOf(a[l])&&e.classList.add(a[l]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style)for(var c,u=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;c=u.exec(t.style);)e.style.removeProperty(c[1]);n.style&&(e.style.cssText+=n.style)}}function mi(e,t,n){return fi(e,e,di,pi(t,n,1!=e.nodeType))}function vi(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function gi(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var yi=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(e,t){var n=t,r=n.children.length,o=e.childCount,i=new Map,a=[];e:for(;o>0;){for(var s=void 0;;)if(r){var l=n.children[r-1];if(!(l instanceof oi)){s=l,r--;break}n=l,r=l.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}var c=s.node;if(c){if(c!=e.child(o-1))break;--o,i.set(s,o),a.push(s)}}return{index:o,matched:i,matches:a.reverse()}}(e.node.content,e)};function bi(e,t){return e.type.side-t.type.side}function ki(e,t,n,r,o){for(var i=[],a=0,s=0;a<e.length;a++){var l=e[a],c=s,u=s+=l.size;c>=n||u<=t?i.push(l):(c<t&&i.push(l.slice(0,t-c,r)),o&&(i.push(o),o=null),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function wi(e,t){var n=e.root.getSelection(),r=e.state.doc;if(!n.focusNode)return null;var o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,a=e.docView.posFromDOM(n.focusNode,n.focusOffset);if(a<0)return null;var s,l,c=r.resolve(a);if(Mo(n)){for(s=c;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&at.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(e,t,n){for(var r=0==t,o=t==No(e);r||o;){if(e==n)return!0;var i=wo(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==No(e)}}(n.focusNode,n.focusOffset,o.dom))){var u=o.posBefore;l=new at(a==u?c:r.resolve(u))}}else{var d=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(d<0)return null;s=r.resolve(d)}l||(l=Mi(e,s,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1));return l}function Ci(e){return e.editable?e.hasFocus():Di(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Oi(e,t){var n=e.state.selection;if(Ni(e,n),Ci(e)){if(!t&&e.mouseDown&&e.mouseDown.allowDefault&&mo.chrome){var r=e.root.getSelection(),o=e.domObserver.currentSelection;if(r.anchorNode&&So(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset))return e.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){var t=e.root.getSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,wo(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&mo.ie&&mo.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var i,a,s=n.anchor,l=n.head;!xi||n instanceof ot||(n.$from.parent.inlineContent||(i=Si(e,n.from)),n.empty||n.$from.parent.inlineContent||(a=Si(e,n.to))),e.docView.setSelection(s,l,e.root,t),xi&&(i&&Ii(i),a&&Ii(a)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){var t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.hideSelectionGuard);var n=e.root.getSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.hideSelectionGuard=function(){n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.hideSelectionGuard),setTimeout((function(){Ci(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}yi.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}},yi.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},yi.prototype.syncToMarks=function(e,t,n){for(var r=0,o=this.stack.length>>1,i=Math.min(o,e.length);r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);for(var a=-1,s=this.index;s<Math.min(this.index+3,this.top.children.length);s++)if(this.top.children[s].matchesMark(e[o])){a=s;break}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var l=oi.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}},yi.prototype.findNodeMatch=function(e,t,n,r){var o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))i=this.top.children.indexOf(o,this.index);else for(var a=this.index,s=Math.min(this.top.children.length,a+5);a<s;a++){var l=this.top.children[a];if(l.matchesNode(e,t,n)&&!this.preMatch.matched.has(l)){i=a;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},yi.prototype.updateNodeAt=function(e,t,n,r,o){return!!this.top.children[r].update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)},yi.prototype.findIndexWithChild=function(e){for(;;){var t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){var n=e.pmViewDesc;if(n)for(var r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r;return-1}e=t}},yi.prototype.updateNextNode=function(e,t,n,r,o){for(var i=this.index;i<this.top.children.length;i++){var a=this.top.children[i];if(a instanceof ii){var s=this.preMatch.matched.get(a);if(null!=s&&s!=o)return!1;var l=a.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&vi(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1},yi.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,ii.create(this.top,e,t,n,r,o)),this.changed=!0},yi.prototype.placeWidget=function(e,t,n){var r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){var o=new ni(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},yi.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof oi;)e=e.children[e.children.length-1];e&&e instanceof si&&!/\n$/.test(e.node.text)||((mo.safari||mo.chrome)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},yi.prototype.addHackNode=function(e){if(this.index<this.top.children.length&&this.top.children[this.index].matchesHack(e))this.index++;else{var t=document.createElement(e);"IMG"==e&&(t.className="ProseMirror-separator",t.alt=""),"BR"==e&&(t.className="ProseMirror-trailingBreak"),this.top.children.splice(this.index++,0,new li(this.top,ti,t,null)),this.changed=!0}};var xi=mo.safari||mo.chrome&&mo.chrome_version<63;function Si(e,t){var n=e.docView.domFromPos(t,0),r=n.node,o=n.offset,i=o<r.childNodes.length?r.childNodes[o]:null,a=o?r.childNodes[o-1]:null;if(mo.safari&&i&&"false"==i.contentEditable)return Ei(i);if(!(i&&"false"!=i.contentEditable||a&&"false"!=a.contentEditable)){if(i)return Ei(i);if(a)return Ei(a)}}function Ei(e){return e.contentEditable="true",mo.safari&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ii(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Ni(e,t){if(t instanceof at){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ti(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ti(e)}function Ti(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function Mi(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||ot.between(t,n,r)}function Di(e){var t=e.root.getSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Pi(e,t){var n=e.selection,r=n.$anchor,o=n.$head,i=t>0?r.max(o):r.min(o),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&tt.findFrom(a,t)}function _i(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function ji(e,t,n){var r=e.state.selection;if(!(r instanceof ot)){if(r instanceof at&&r.node.isInline)return _i(e,new ot(t>0?r.$to:r.$from));var o=Pi(e.state,t);return!!o&&_i(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=Pi(e.state,t);return!!(i&&i instanceof at)&&_i(e,i)}if(!(mo.mac&&n.indexOf("m")>-1)){var a,s=r.$head,l=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!l||l.isText)return!1;var c=t<0?s.pos-l.nodeSize:s.pos;return!!(l.isAtom||(a=e.docView.descAt(c))&&!a.contentDOM)&&(at.isSelectable(l)?_i(e,new at(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!mo.webkit&&_i(e,new ot(e.state.doc.resolve(t<0?c:c+l.nodeSize))))}}function Ri(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ai(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Fi(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(mo.gecko&&1==n.nodeType&&r<Ri(n)&&Ai(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Ai(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Li(n))break;for(var l=n.previousSibling;l&&Ai(l);)o=n.parentNode,i=wo(l),l=l.previousSibling;if(l)r=Ri(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Bi(e,t,n,r):o&&Bi(e,t,o,i)}}function zi(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=Ri(n);;)if(r<a){if(1!=n.nodeType)break;if(!Ai(n.childNodes[r]))break;o=n,i=++r}else{if(Li(n))break;for(var s=n.nextSibling;s&&Ai(s);)o=s.parentNode,i=wo(s)+1,s=s.nextSibling;if(s)r=0,a=Ri(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Bi(e,t,o,i)}}function Li(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Bi(e,t,n,r){if(Mo(t)){var o=document.createRange();o.setEnd(n,r),o.setStart(n,r),t.removeAllRanges(),t.addRange(o)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();var i=e.state;setTimeout((function(){e.state==i&&Oi(e)}),50)}function Vi(e,t,n){var r=e.state.selection;if(r instanceof ot&&!r.empty||n.indexOf("s")>-1)return!1;if(mo.mac&&n.indexOf("m")>-1)return!1;var o=r.$from,i=r.$to;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var a=Pi(e.state,t);if(a&&a instanceof at)return _i(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof lt?tt.near(s,t):tt.findFrom(s,t);return!!l&&_i(e,l)}return!1}function Hi(e,t){if(!(e.state.selection instanceof ot))return!0;var n=e.state.selection,r=n.$head,o=n.$anchor,i=n.empty;if(!r.sameParent(o))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var a=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(a&&!a.isText){var s=e.state.tr;return t<0?s.delete(r.pos-a.nodeSize,r.pos):s.delete(r.pos,r.pos+a.nodeSize),e.dispatch(s),!0}return!1}function Ki(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Wi(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||mo.mac&&72==n&&"c"==r?Hi(e,-1)||Fi(e):46==n||mo.mac&&68==n&&"c"==r?Hi(e,1)||zi(e):13==n||27==n||(37==n?ji(e,-1,r)||Fi(e):39==n?ji(e,1,r)||zi(e):38==n?Vi(e,-1,r)||Fi(e):40==n?function(e){if(mo.safari&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;Ki(e,o,!0),setTimeout((function(){return Ki(e,o,!1)}),20)}}}(e)||Vi(e,1,r)||zi(e):r==(mo.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function $i(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(mo.safari&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){var n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||mo.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function qi(e,t,n,r,o){if(t<0){var a=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,s=wi(e,a);if(s&&!e.state.selection.eq(s)){var l=e.state.tr.setSelection(s);"pointer"==a?l.setMeta("pointer",!0):"key"==a&&l.scrollIntoView(),e.dispatch(l)}}else{var c=e.state.doc.resolve(t),u=c.sharedDepth(n);t=c.before(u+1),n=e.state.doc.resolve(n).after(u+1);var d=e.state.selection,p=function(e,t,n){var r=e.docView.parseRange(t,n),o=r.node,i=r.fromOffset,a=r.toOffset,s=r.from,l=r.to,c=e.root.getSelection(),u=null,d=c.anchorNode;if(d&&e.dom.contains(1==d.nodeType?d:d.parentNode)&&(u=[{node:d,offset:c.anchorOffset}],Mo(c)||u.push({node:c.focusNode,offset:c.focusOffset})),mo.chrome&&8===e.lastKeyCode)for(var p=a;p>i;p--){var f=o.childNodes[p-1],h=f.pmViewDesc;if("BR"==f.nodeName&&!h){a=p;break}if(!h||h.size)break}var m=e.state.doc,v=e.someProp("domParser")||ee.fromSchema(e.state.schema),g=m.resolve(s),y=null,b=v.parse(o,{topNode:g.parent,topMatch:g.parent.contentMatchAt(g.index()),topOpen:!0,from:i,to:a,preserveWhitespace:"pre"!=g.parent.type.whitespace||"full",editableContent:!0,findPositions:u,ruleFromNode:$i,context:g});if(u&&null!=u[0].pos){var k=u[0].pos,w=u[1]&&u[1].pos;null==w&&(w=k),y={anchor:k+s,head:w+s}}return{doc:b,sel:y,from:s,to:l}}(e,t,n);if(mo.chrome&&e.cursorWrapper&&p.sel&&p.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;p.sel={anchor:p.sel.anchor+h,head:p.sel.anchor+h}}var m,v,g=e.state.doc,y=g.slice(p.from,p.to);8===e.lastKeyCode&&Date.now()-100<e.lastKeyCodeTime?(m=e.state.selection.to,v="end"):(m=e.state.selection.from,v="start"),e.lastKeyCode=null;var b=function(e,t,n,r,o){var i=e.findDiffStart(t,n);if(null==i)return null;var a=e.findDiffEnd(t,n+e.size,n+t.size),s=a.a,l=a.b;if("end"==o){var c=Math.max(0,i-Math.min(s,l));r-=s+c-i}if(s<i&&e.size<t.size){l=(i-=r<=i&&r>=s?i-r:0)+(l-s),s=i}else if(l<i){s=(i-=r<=i&&r>=l?i-r:0)+(s-l),l=i}return{start:i,endA:s,endB:l}}(y.content,p.doc.content,p.from,m,v);if((mo.ios&&e.lastIOSEnter>Date.now()-225||mo.android)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&(!b||b.endA>=b.endB)&&e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))})))e.lastIOSEnter=0;else{if(!b){if(!(r&&d instanceof ot&&!d.empty&&d.$head.sameParent(d.$anchor))||e.composing||p.sel&&p.sel.anchor!=p.sel.head){if(p.sel){var k=Ui(e,e.state.doc,p.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}b={start:d.from,endA:d.to,endB:d.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&b.start==b.endB&&e.state.selection instanceof ot&&(b.start>e.state.selection.from&&b.start<=e.state.selection.from+2&&e.state.selection.from>=p.from?b.start=e.state.selection.from:b.endA<e.state.selection.to&&b.endA>=e.state.selection.to-2&&e.state.selection.to<=p.to&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),mo.ie&&mo.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>p.from&&"  "==p.doc.textBetween(b.start-p.from-1,b.start-p.from+1)&&(b.start--,b.endA--,b.endB--);var w,C=p.doc.resolveNoCache(b.start-p.from),O=p.doc.resolveNoCache(b.endB-p.from),x=C.sameParent(O)&&C.parent.inlineContent;if((mo.ios&&e.lastIOSEnter>Date.now()-225&&(!x||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!x&&C.pos<p.doc.content.size&&(w=tt.findFrom(p.doc.resolve(C.pos+1),1,!0))&&w.head==O.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))})))e.lastIOSEnter=0;else if(e.state.selection.anchor>b.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||Gi(r,!0,!1)<o.pos)return!1;var i=e.resolve(t);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;var a=e.resolve(Gi(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Gi(a,!0,!1)<n)return!1;return r.parent.content.cut(r.parentOffset).eq(a.parent.content)}(g,b.start,b.endA,C,O)&&e.someProp("handleKeyDown",(function(t){return t(e,Do(8,"Backspace"))})))mo.android&&mo.chrome&&e.domObserver.suppressSelectionUpdates();else{mo.chrome&&mo.android&&b.toB==b.from&&(e.lastAndroidDelete=Date.now()),mo.android&&!x&&C.start()!=O.start()&&0==O.parentOffset&&C.depth==O.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==b.endA&&(b.endB-=2,O=p.doc.resolveNoCache(b.endB-p.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))}))}),20));var S,E,I,N,T=b.start,M=b.endA;if(x)if(C.pos==O.pos)mo.ie&&mo.ie_version<=11&&0==C.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return Oi(e)}),20)),S=e.state.tr.delete(T,M),E=g.resolve(b.start).marksAcross(g.resolve(b.endA));else if(b.endA==b.endB&&(N=g.resolve(b.start))&&(I=function(e,t){for(var n,r,o,a=e.firstChild.marks,s=t.firstChild.marks,l=a,c=s,u=0;u<s.length;u++)l=s[u].removeFromSet(l);for(var d=0;d<a.length;d++)c=a[d].removeFromSet(c);if(1==l.length&&0==c.length)r=l[0],n="add",o=function(e){return e.mark(r.addToSet(e.marks))};else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",o=function(e){return e.mark(r.removeFromSet(e.marks))}}for(var p=[],f=0;f<t.childCount;f++)p.push(o(t.child(f)));if(i.from(p).eq(e))return{mark:r,type:n}}(C.parent.content.cut(C.parentOffset,O.parentOffset),N.parent.content.cut(N.parentOffset,b.endA-N.start()))))S=e.state.tr,"add"==I.type?S.addMark(T,M,I.mark):S.removeMark(T,M,I.mark);else if(C.parent.child(C.index()).isText&&C.index()==O.index()-(O.textOffset?0:1)){var D=C.parent.textBetween(C.parentOffset,O.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,T,M,D)})))return;S=e.state.tr.insertText(D,T,M)}if(S||(S=e.state.tr.replace(T,M,p.doc.slice(b.start-p.from,b.endB-p.from))),p.sel){var P=Ui(e,S.doc,p.sel);P&&!(mo.chrome&&mo.android&&e.composing&&P.empty&&(b.start!=b.endB||e.lastAndroidDelete<Date.now()-100)&&(P.head==T||P.head==S.mapping.map(M)-1)||mo.ie&&P.empty&&P.head==T)&&S.setSelection(P)}E&&S.ensureMarks(E),e.dispatch(S.scrollIntoView())}}}}function Ui(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Mi(e,t.resolve(n.anchor),t.resolve(n.head))}function Gi(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Xi(e,t){for(var n=[],r=t.content,o=t.openStart,i=t.openEnd;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;var a=r.firstChild;n.push(a.type.name,a.attrs!=a.type.defaultAttrs?a.attrs:null),r=a.content}var s=e.someProp("clipboardSerializer")||de.fromSchema(e.state.schema),l=ra(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));for(var u,d=c.firstChild;d&&1==d.nodeType&&(u=ta[d.nodeName.toLowerCase()]);){for(var p=u.length-1;p>=0;p--){for(var f=l.createElement(u[p]);c.firstChild;)f.appendChild(c.firstChild);c.appendChild(f),"tbody"!=u[p]&&(o++,i++)}d=c.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",o+" "+i+" "+JSON.stringify(n)),{dom:c,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Ji(e,t,n,r,o){var a,s,l=o.parent.type.spec.code;if(!n&&!t)return null;var c=t&&(r||l||!n);if(c){if(e.someProp("transformPastedText",(function(e){t=e(t,l||r)})),l)return t?new p(i.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):p.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)s=u;else{var d=o.marks(),f=e.state.schema,h=de.fromSchema(f);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((function(e){var t=a.appendChild(document.createElement("p"));e&&t.appendChild(h.serializeNode(f.text(e,d)))}))}}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=ra().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&ta[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return"</"+e+">"})).reverse().join(""));if(r.innerHTML=e,n)for(var i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),mo.webkit&&function(e){for(var t=e.querySelectorAll(mo.chrome?"span:not([class]):not([style])":"span.Apple-converted-space"),n=0;n<t.length;n++){var r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);var m=a&&a.querySelector("[data-pm-slice]"),v=m&&/^(\d+) (\d+) (.*)/.exec(m.getAttribute("data-pm-slice"));if(!s){var g=e.someProp("clipboardParser")||e.someProp("domParser")||ee.fromSchema(e.state.schema);s=g.parseSlice(a,{preserveWhitespace:!(!c&&!v),context:o,ruleFromNode:function(e){if("BR"==e.nodeName&&!e.nextSibling&&e.parentNode&&!Yi.test(e.parentNode.nodeName))return{ignore:!0}}})}if(v)s=function(e,t){if(!e.size)return e;var n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}for(var o=e.content,a=e.openStart,s=e.openEnd,l=n.length-2;l>=0;l-=2){var c=r.nodes[n[l]];if(!c||c.hasRequiredAttrs())break;o=i.from(c.create(n[l+1],o)),a++,s++}return new p(o,a,s)}(ea(s,+v[1],+v[2]),v[3]);else if((s=p.maxOpen(function(e,t){if(e.childCount<2)return e;for(var n=function(n){var r=t.node(n).contentMatchAt(t.index(n)),o=void 0,a=[];if(e.forEach((function(e){if(a){var t,n=r.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&o.length&&function e(t,n,r,o,a){if(a<t.length&&a<n.length&&t[a]==n[a]){var s=e(t,n,r,o.lastChild,a+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(a==t.length-1?r.type:t[a+1]))return o.copy(o.content.append(i.from(Zi(r,t,a+1))))}}(n,o,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=function e(t,n){if(0==n)return t;var r=t.content.replaceChild(t.childCount-1,e(t.lastChild,n-1)),o=t.contentMatchAt(t.childCount).fillBefore(i.empty,!0);return t.copy(r.append(o))}(a[a.length-1],o.length));var s=Zi(e,n);a.push(s),r=r.matchType(s.type,s.attrs),o=n}}})),a)return{v:i.from(a)}},r=t.depth;r>=0;r--){var o=n(r);if(o)return o.v}return e}(s.content,o),!0)).openStart||s.openEnd){for(var y=0,b=0,k=s.content.firstChild;y<s.openStart&&!k.type.spec.isolating;y++,k=k.firstChild);for(var w=s.content.lastChild;b<s.openEnd&&!w.type.spec.isolating;b++,w=w.lastChild);s=ea(s,y,b)}return e.someProp("transformPasted",(function(e){s=e(s)})),s}var Yi=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Zi(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,i.from(e));return e}function Qi(e,t,n,r,o,a){var s=t<0?e.firstChild:e.lastChild,l=s.content;return o<r-1&&(l=Qi(l,t,n,r,o+1,a)),o>=n&&(l=t<0?s.contentMatchAt(0).fillBefore(l,e.childCount>1||a<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(i.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(l))}function ea(e,t,n){return t<e.openStart&&(e=new p(Qi(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new p(Qi(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var ta={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},na=null;function ra(){return na||(na=document.implementation.createHTMLDocument("title"))}var oa={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ia=mo.ie&&mo.ie_version<=11,aa=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};aa.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},aa.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var sa=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;t<e.length;t++)n.queue.push(e[t]);mo.ie&&mo.ie_version<=11&&e.some((function(e){return"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new aa,ia&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};sa.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},sa.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},sa.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,oa),ia&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},sa.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout((function(){return e.flush()}),20)}this.observer.disconnect()}ia&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},sa.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},sa.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},sa.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},sa.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&Di(e)){var e;if(this.suppressingSelectionUpdates)return Oi(this.view);if(mo.ie&&mo.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&So(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},sa.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},sa.prototype.ignoreSelectionChange=function(e){if(0==e.rangeCount)return!0;var t=e.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(t);return n&&n.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0},sa.prototype.flush=function(){if(this.view.docView&&!(this.flushingSoon>-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Di(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,a=[];if(this.view.editable)for(var s=0;s<e.length;s++){var l=this.registerMutation(e[s],a);l&&(r=r<0?l.from:Math.min(l.from,r),o=o<0?l.to:Math.max(l.to,o),l.typeOver&&(i=!0))}if(mo.gecko&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var u=c[0],d=c[1];u.parentNode&&u.parentNode.parentNode==d.parentNode?d.remove():u.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(la)return;la=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,a),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||Oi(this.view),this.currentSelection.set(t))}},sa.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(var r=0;r<e.addedNodes.length;r++)t.push(e.addedNodes[r]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};var o=e.previousSibling,i=e.nextSibling;if(mo.ie&&mo.ie_version<=11&&e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){var s=e.addedNodes[a],l=s.previousSibling,c=s.nextSibling;(!l||Array.prototype.indexOf.call(e.addedNodes,l)<0)&&(o=l),(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c)}var u=o&&o.parentNode==e.target?wo(o)+1:0,d=n.localPosFromDOM(e.target,u,-1),p=i&&i.parentNode==e.target?wo(i):e.target.childNodes.length;return{from:d,to:n.localPosFromDOM(e.target,p,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}};var la=!1;var ca={},ua={};function da(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function pa(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return fa(e,t)})}))}function fa(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function ha(e){return{left:e.clientX,top:e.clientY}}function ma(e,t,n,r,o){if(-1==r)return!1;for(var i=e.state.doc.resolve(r),a=function(r){if(e.someProp(t,(function(t){return r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var l=a(s);if(l)return l.v}return!1}function va(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ga(e,t,n,r,o){return ma(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(function(n){return n(e,t,r)}))||(o?function(e,t){if(-1==t)return!1;var n,r,o=e.state.selection;o instanceof at&&(n=o.node);for(var i=e.state.doc.resolve(t),a=i.depth+1;a>0;a--){var s=a>i.depth?i.nodeAfter:i.node(a);if(at.isSelectable(s)){r=n&&o.$from.depth>0&&a>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(a);break}}return null!=r&&(va(e,at.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&at.isSelectable(r))&&(va(e,new at(n),"pointer"),!0)}(e,n))}function ya(e,t,n,r){return ma(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ba(e,t,n,r){return ma(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(function(n){return n(e,t,r)}))||function(e,t,n){if(0!=n.button)return!1;var r=e.state.doc;if(-1==t)return!!r.inlineContent&&(va(e,ot.create(r,0,r.content.size),"pointer"),!0);for(var o=r.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)va(e,ot.create(r,s+1,s+1+a.content.size),"pointer");else{if(!at.isSelectable(a))continue;va(e,at.create(r,s),"pointer")}return!0}}(e,n,r)}function ka(e){return Ia(e)}ua.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!Oa(e,t)&&(e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!mo.android||!mo.chrome||13!=t.keyCode))if(229!=t.keyCode&&e.domObserver.forceFlush(),!mo.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||Wi(e,t)?t.preventDefault():da(e,"key");else{var n=Date.now();e.lastIOSEnter=n,e.lastIOSEnterFallbackTimeout=setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,Do(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},ua.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},ua.keypress=function(e,t){if(!(Oa(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||mo.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof ot&&n.$from.sameParent(n.$to))){var r=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,r)}))||e.dispatch(e.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}}};var wa=mo.mac?"metaKey":"ctrlKey";ca.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=ka(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[wa]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(ha(t));i&&("singleClick"==o?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new Ca(e,i,t,n)):("doubleClick"==o?ya:ba)(e,i.pos,i.inside,t)?t.preventDefault():da(e,"pointer"))};var Ca=function(e,t,n,r){var o,i,a=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=r,this.selectNode=n[wa],this.allowDefault=n.shiftKey,this.delayedSelectionSync=!1,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{var s=e.state.doc.resolve(t.pos);o=s.parent,i=s.depth?s.before():0}this.mightDrag=null;var l=r?null:n.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c?c.dom:null;var u=e.state.selection;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||u instanceof at&&u.from<=i&&u.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&mo.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){a.view.mouseDown==a&&a.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),da(e,"pointer")};function Oa(e,t){return!!e.composing||!!(mo.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}Ca.prototype.done=function(){var e=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((function(){return Oi(e.view)})),this.view.mouseDown=null},Ca.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(ha(e))),this.allowDefault||!t?da(this.view,"pointer"):ga(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||mo.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||mo.chrome&&!(this.view.state.selection instanceof ot)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(va(this.view,tt.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):da(this.view,"pointer")}},Ca.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),da(this.view,"pointer"),0==e.buttons&&this.done()},ca.touchdown=function(e){ka(e),da(e,"pointer")},ca.contextmenu=function(e){return ka(e)};var xa=mo.android?5e3:-1;function Sa(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return Ia(e)}),t))}function Ea(e){var t;for(e.composing&&(e.composing=!1,e.compositionEndedAt=((t=document.createEvent("Event")).initEvent("event",!0,!0),t.timeStamp));e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty()}function Ia(e,t){if(!(mo.android&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ea(e),t||e.docView&&e.docView.dirty){var n=wi(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}}ua.compositionstart=ua.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),Ia(e,!0),e.markCursor=null;else if(Ia(e),mo.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var a=i<0?o.lastChild:o.childNodes[i-1];if(!a)break;if(3==a.nodeType){r.collapse(a,a.nodeValue.length);break}o=a,i=-1}e.composing=!0}Sa(e,xa)},ua.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,Sa(e,20))};var Na=mo.ie&&mo.ie_version<15||mo.ios&&mo.webkit_version<604;function Ta(e,t,n,r){var o=Ji(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||p.empty)})))return!0;if(!o)return!1;var i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),a=i?e.state.tr.replaceSelectionWith(i,e.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}ca.copy=ua.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=Na?null:t.clipboardData,i=Xi(e,n.content()),a=i.dom,s=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},ua.paste=function(e,t){if(!e.composing||mo.android){var n=Na?null:t.clipboardData;n&&Ta(e,n.getData("text/plain"),n.getData("text/html"),t)?t.preventDefault():function(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Ta(e,r.value,null,t):Ta(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)}};var Ma=function(e,t){this.slice=e,this.move=t},Da=mo.mac?"altKey":"ctrlKey";for(var Pa in ca.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var r=e.state.selection,o=r.empty?null:e.posAtCoords(ha(t));if(o&&o.pos>=r.from&&o.pos<=(r instanceof at?r.to-1:r.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(at.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var i=e.docView.nearestDesc(t.target,!0);i&&i.node.type.spec.draggable&&i!=e.docView&&e.dispatch(e.state.tr.setSelection(at.create(e.state.doc,i.posBefore)))}var a=e.state.selection.content(),s=Xi(e,a),l=s.dom,c=s.text;t.dataTransfer.clearData(),t.dataTransfer.setData(Na?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Na||t.dataTransfer.setData("text/plain",c),e.dragging=new Ma(a,!t[Da])}},ca.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},ua.dragover=ua.dragenter=function(e,t){return t.preventDefault()},ua.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var r=e.posAtCoords(ha(t));if(r){var o=e.state.doc.resolve(r.pos);if(o){var i=n&&n.slice;i?e.someProp("transformPasted",(function(e){i=e(i)})):i=Ji(e,t.dataTransfer.getData(Na?"Text":"text/plain"),Na?null:t.dataTransfer.getData("text/html"),!1,o);var a=n&&!t[Da];if(e.someProp("handleDrop",(function(n){return n(e,t,i||p.empty,a)})))t.preventDefault();else if(i){t.preventDefault();var s=i?ze(e.state.doc,o.pos,i):o.pos;null==s&&(s=o.pos);var l=e.state.tr;a&&l.deleteSelection();var c=l.mapping.map(s),u=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,d=l.doc;if(u?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),!l.doc.eq(d)){var f=l.doc.resolve(c);if(u&&at.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new at(f));else{var h=l.mapping.map(s);l.mapping.maps[l.mapping.maps.length-1].forEach((function(e,t,n,r){return h=r})),l.setSelection(Mi(e,f,l.doc.resolve(h)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}}}}}},ca.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&Oi(e)}),20))},ca.blur=function(e,t){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),t.relatedTarget&&e.dom.contains(t.relatedTarget)&&e.domObserver.currentSelection.set({}),e.focused=!1)},ca.beforeinput=function(e,t){if(mo.chrome&&mo.android&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,Do(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},ua)ca[Pa]=ua[Pa];function _a(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var ja=function(e,t){this.spec=t||Ba,this.side=this.spec.side||0,this.toDOM=e};ja.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new Fa(i-n,i-n,this)},ja.prototype.valid=function(){return!0},ja.prototype.eq=function(e){return this==e||e instanceof ja&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&_a(this.spec,e.spec))},ja.prototype.destroy=function(e){this.spec.destroy&&this.spec.destroy(e)};var Ra=function(e,t){this.spec=t||Ba,this.attrs=e};Ra.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Fa(o,i,this)},Ra.prototype.valid=function(e,t){return t.from<t.to},Ra.prototype.eq=function(e){return this==e||e instanceof Ra&&_a(this.attrs,e.attrs)&&_a(this.spec,e.spec)},Ra.is=function(e){return e.type instanceof Ra};var Aa=function(e,t){this.spec=t||Ba,this.attrs=e};Aa.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,1);if(o.deleted)return null;var i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Fa(o.pos-n,i.pos-n,this)},Aa.prototype.valid=function(e,t){var n,r=e.content.findIndex(t.from),o=r.index,i=r.offset;return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to},Aa.prototype.eq=function(e){return this==e||e instanceof Aa&&_a(this.attrs,e.attrs)&&_a(this.spec,e.spec)};var Fa=function(e,t,n){this.from=e,this.to=t,this.type=n},za={spec:{configurable:!0},inline:{configurable:!0}};Fa.prototype.copy=function(e,t){return new Fa(e,t,this.type)},Fa.prototype.eq=function(e,t){return void 0===t&&(t=0),this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to},Fa.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},Fa.widget=function(e,t,n){return new Fa(e,e,new ja(t,n))},Fa.inline=function(e,t,n,r){return new Fa(e,t,new Ra(n,r))},Fa.node=function(e,t,n,r){return new Fa(e,t,new Aa(n,r))},za.spec.get=function(){return this.type.spec},za.inline.get=function(){return this.type instanceof Ra},Object.defineProperties(Fa.prototype,za);var La=[],Ba={},Va=function(e,t){this.local=e&&e.length?e:La,this.children=t&&t.length?t:La};Va.create=function(e,t){return t.length?Ua(t,e,0,Ba):Ha},Va.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},Va.prototype.findInner=function(e,t,n,r,o){for(var i=0;i<this.local.length;i++){var a=this.local[i];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){var l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,n,r+l,o)}},Va.prototype.map=function(e,t,n){return this==Ha||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Ba)},Va.prototype.mapInner=function(e,t,n,r,o){for(var i,a=0;a<this.local.length;a++){var s=this.local[a].map(e,n,r);s&&s.type.valid(t,s)?(i||(i=[])).push(s):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(e,t,n,r,o,i,a){for(var s=e.slice(),l=function(e,t,n,r){for(var a=0;a<s.length;a+=3){var l=s[a+1],c=void 0;if(!(l<0||e>l+i)){var u=s[a]+i;t>=u?s[a+1]=e<=u?-2:-1:n>=o&&(c=r-n-(t-e))&&(s[a]+=c,s[a+1]+=c)}}},c=0;c<n.maps.length;c++)n.maps[c].forEach(l);for(var u=!1,d=0;d<s.length;d+=3)if(s[d+1]<0){if(-2==s[d+1]){u=!0,s[d+1]=-1;continue}var p=n.map(e[d]+i),f=p-o;if(f<0||f>=r.content.size){u=!0;continue}var h=n.map(e[d+1]+i,-1)-o,m=r.content.findIndex(f),v=m.index,g=m.offset,y=r.maybeChild(v);if(y&&g==f&&g+y.nodeSize==h){var b=s[d+2].mapInner(n,y,p+1,e[d]+i+1,a);b!=Ha?(s[d]=f,s[d+1]=h,s[d+2]=b):(s[d+1]=-2,u=!0)}else u=!0}if(u){var k=Ua(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;i<e.local.length;i++){var l=e.local[i].map(r,o,t);l?n.push(l):a.onRemove&&a.onRemove(e.local[i].spec)}for(var c=0;c<e.children.length;c+=3)s(e.children[c+2],e.children[c]+t+1)}for(var l=0;l<e.length;l+=3)-1==e[l+1]&&s(e[l+2],t[l]+i+1);return n}(s,e,t||[],n,o,i,a),r,0,a);t=k.local;for(var w=0;w<s.length;w+=3)s[w+1]<0&&(s.splice(w,3),w-=3);for(var C=0,O=0;C<k.children.length;C+=3){for(var x=k.children[C];O<s.length&&s[O]<x;)O+=3;s.splice(O,0,k.children[C],k.children[C+1],k.children[C+2])}}return new Va(t&&t.sort(Ga),s)}(this.children,i,e,t,n,r,o):i?new Va(i.sort(Ga)):Ha},Va.prototype.add=function(e,t){return t.length?this==Ha?Va.create(e,t):this.addInner(e,t,0):this},Va.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach((function(e,a){var s,l=a+n;if(s=$a(t,e,l)){for(r||(r=o.children.slice());i<r.length&&r[i]<a;)i+=3;r[i]==a?r[i+2]=r[i+2].addInner(e,s,l+1):r.splice(i,0,a,a+e.nodeSize,Ua(s,e,l+1,Ba)),i+=3}}));for(var a=Wa(i?qa(t):t,-n),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Va(a.length?this.local.concat(a).sort(Ga):this.local,r||this.children)},Va.prototype.remove=function(e){return 0==e.length||this==Ha?this:this.removeInner(e,0)},Va.prototype.removeInner=function(e,t){for(var n=this.children,r=this.local,o=0;o<n.length;o+=3){for(var i=void 0,a=n[o]+t,s=n[o+1]+t,l=0,c=void 0;l<e.length;l++)(c=e[l])&&c.from>a&&c.to<s&&(e[l]=null,(i||(i=[])).push(c));if(i){n==this.children&&(n=this.children.slice());var u=n[o+2].removeInner(i,a+1);u!=Ha?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var d=0,p=void 0;d<e.length;d++)if(p=e[d])for(var f=0;f<r.length;f++)r[f].eq(p,t)&&(r==this.local&&(r=this.local.slice()),r.splice(f--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Va(r,n):Ha},Va.prototype.forChild=function(e,t){if(this==Ha)return this;if(t.isLeaf)return Va.empty;for(var n,r,o=0;o<this.children.length;o+=3)if(this.children[o]>=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,a=i+t.content.size,s=0;s<this.local.length;s++){var l=this.local[s];if(l.from<a&&l.to>i&&l.type instanceof Ra){var c=Math.max(i,l.from)-i,u=Math.min(a,l.to)-i;c<u&&(r||(r=[])).push(l.copy(c,u))}}if(r){var d=new Va(r.sort(Ga));return n?new Ka([d,n]):d}return n||Ha},Va.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof Va)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(var t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(var n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0},Va.prototype.locals=function(e){return Xa(this.localsInner(e))},Va.prototype.localsInner=function(e){if(this==Ha)return La;if(e.inlineContent||!this.local.some(Ra.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Ra||t.push(this.local[n]);return t};var Ha=new Va;Va.empty=Ha,Va.removeOverlap=Xa;var Ka=function(e){this.members=e};function Wa(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new Fa(o.from+t,o.to+t,o.type))}return n}function $a(e,t,n){if(t.isLeaf)return null;for(var r=n+t.nodeSize,o=null,i=0,a=void 0;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function qa(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ua(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=$a(e,t,a+n);if(s){i=!0;var l=Ua(s,t,n+a+1,r);l!=Ha&&o.push(a,a+t.nodeSize,l)}}));for(var a=Wa(i?qa(e):e,-n).sort(Ga),s=0;s<a.length;s++)a[s].type.valid(t,a[s])||(r.onRemove&&r.onRemove(a[s].spec),a.splice(s--,1));return a.length||o.length?new Va(a,o):Ha}function Ga(e,t){return e.from-t.from||e.to-t.to}function Xa(e){for(var t=e,n=0;n<t.length-1;n++){var r=t[n];if(r.from!=r.to)for(var o=n+1;o<t.length;o++){var i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Ja(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Ja(t,o+1,i.copy(r.to,i.to)))}}return t}function Ja(e,t,n){for(;t<e.length&&Ga(n,e[t])>0;)t++;e.splice(t,0,n)}function Ya(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=Ha&&t.push(r)})),e.cursorWrapper&&t.push(Va.create(e.state.doc,[e.cursorWrapper.deco])),Ka.from(t)}Ka.prototype.map=function(e,t){var n=this.members.map((function(n){return n.map(e,t,Ba)}));return Ka.from(n)},Ka.prototype.forChild=function(e,t){if(t.isLeaf)return Va.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=Ha&&(o instanceof Ka?n=n.concat(o.members):n.push(o))}return Ka.from(n)},Ka.prototype.eq=function(e){if(!(e instanceof Ka)||e.members.length!=this.members.length)return!1;for(var t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0},Ka.prototype.locals=function(e){for(var t,n=!0,r=0;r<this.members.length;r++){var o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(var i=0;i<o.length;i++)t.push(o[i])}else t=o}return t?Xa(n?t:t.sort(Ga)):La},Ka.from=function(e){switch(e.length){case 0:return Ha;case 1:return e[0];default:return new Ka(e)}};var Za,Qa,es=function(e,t){this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ss),this.dispatch=this.dispatch.bind(this),this._root=null,this.focused=!1,this.trackWrites=null,this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):e.apply?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=is(this),this.markCursor=null,this.cursorWrapper=null,rs(this),this.nodeViews=as(this),this.docView=ai(this.state.doc,ns(this),Ya(this),this.dom,this),this.lastSelectedViewDesc=null,this.dragging=null,function(e){e.shiftKey=!1,e.mouseDown=null,e.lastKeyCode=null,e.lastKeyCodeTime=0,e.lastClick={time:0,x:0,y:0,type:""},e.lastSelectionOrigin=null,e.lastSelectionTime=0,e.lastIOSEnter=0,e.lastIOSEnterFallbackTimeout=null,e.lastAndroidDelete=0,e.composing=!1,e.composingTimeout=null,e.compositionNodes=[],e.compositionEndedAt=-2e8,e.domObserver=new sa(e,(function(t,n,r,o){return qi(e,t,n,r,o)})),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=ca[t];e.dom.addEventListener(t,e.eventHandlers[t]=function(t){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(var n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}(e,t)||fa(e,t)||!e.editable&&t.type in ua||n(e,t)})};for(var n in ca)t(n);mo.safari&&e.dom.addEventListener("input",(function(){return null})),pa(e)}(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()},ts={props:{configurable:!0},root:{configurable:!0},isDestroyed:{configurable:!0}};function ns(e){var t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),t.translate="no",e.someProp("attributes",(function(n){if("function"==typeof n&&(n=n(e.state)),n)for(var r in n)"class"==r&&(t.class+=" "+n[r]),"style"==r?t.style=(t.style?t.style+";":"")+n[r]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[Fa.node(0,e.state.doc.content.size,t)]}function rs(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Fa.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function is(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function as(e){var t={};return e.someProp("nodeViews",(function(e){for(var n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])})),t}function ss(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}if(ts.props.get=function(){if(this._props.state!=this.state){var e=this._props;for(var t in this._props={},e)this._props[t]=e[t];this._props.state=this.state}return this._props},es.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&pa(this),this._props=e,e.plugins&&(e.plugins.forEach(ss),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)},es.prototype.setProps=function(e){var t={};for(var n in this._props)t[n]=this._props[n];for(var r in t.state=this.state,e)t[r]=e[r];this.update(t)},es.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},es.prototype.updateStateInner=function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(Ea(this),i=!0),this.state=e,t){var a=as(this);(function(e,t){var n=0,r=0;for(var o in e){if(e[o]!=t[o])return!0;n++}for(var i in t)r++;return n!=r})(a,this.nodeViews)&&(this.nodeViews=a,o=!0),pa(this)}this.editable=is(this),rs(this);var s=Ya(this),l=ns(this),c=t?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",u=o||!this.docView.matchesNode(e.doc,l,s);!u&&e.selection.eq(r.selection)||(i=!0);var d,p,f,h,m,v,g,y,b,k,w,C="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a<Math.min(innerHeight,r.bottom);a+=5){var s=e.root.elementFromPoint(i,a);if(s!=e.dom&&e.dom.contains(s)){var l=s.getBoundingClientRect();if(l.top>=o-20){t=s,n=l.top;break}}}return{refDOM:t,refTop:n,stack:Ao(e.dom)}}(this);if(i){this.domObserver.stop();var O=u&&(mo.ie||mo.chrome)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&(h=r.selection,m=e.selection,v=Math.min(h.$anchor.sharedDepth(h.head),m.$anchor.sharedDepth(m.head)),h.$anchor.start(v)!=m.$anchor.start(v));if(u){var x=mo.chrome?this.trackWrites=this.root.getSelection().focusNode:null;!o&&this.docView.update(e.doc,l,s,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ai(e.doc,l,s,this.dom,this)),x&&!this.trackWrites&&(O=!0)}O||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(d=this,p=d.docView.domFromPos(d.state.selection.anchor,0),f=d.root.getSelection(),So(p.node,p.offset,f.anchorNode,f.anchorOffset)))?Oi(this,O):(Ni(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(r),"reset"==c)this.dom.scrollTop=0;else if("to selection"==c){var S=this.root.getSelection().focusNode;this.someProp("handleScrollToSelection",(function(e){return e(n)}))||(e.selection instanceof at?Ro(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),S):Ro(this,this.coordsAtPos(e.selection.head,1),S))}else C&&(y=(g=C).refDOM,b=g.refTop,k=g.stack,w=y?y.getBoundingClientRect().top:0,Fo(k,0==w?0:w-b))},es.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},es.prototype.updatePluginViews=function(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(var t=0;t<this.pluginViews.length;t++){var n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var r=0;r<this.directPlugins.length;r++){var o=this.directPlugins[r];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(var i=0;i<this.state.plugins.length;i++){var a=this.state.plugins[i];a.spec.view&&this.pluginViews.push(a.spec.view(this))}}},es.prototype.someProp=function(e,t){var n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(var o=0;o<this.directPlugins.length;o++){var i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}var a=this.state.plugins;if(a)for(var s=0;s<a.length;s++){var l=a[s].props[e];if(null!=l&&(n=t?t(l):l))return n}},es.prototype.hasFocus=function(){return this.root.activeElement==this.dom},es.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(zo)return e.focus(zo);var t=Ao(e);e.focus(null==zo?{get preventScroll(){return zo={preventScroll:!0},!0}}:void 0),zo||(zo=!1,Fo(t,0))}(this.dom),Oi(this),this.domObserver.start()},ts.root.get=function(){var e=this._root;if(null==e)for(var t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=function(){return document.getSelection()}),this._root=t;return e||document},es.prototype.posAtCoords=function(e){return Vo(this,e)},es.prototype.coordsAtPos=function(e,t){return void 0===t&&(t=1),Wo(this,e,t)},es.prototype.domAtPos=function(e,t){return void 0===t&&(t=0),this.docView.domFromPos(e,t)},es.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},es.prototype.posAtDOM=function(e,t,n){void 0===n&&(n=-1);var r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r},es.prototype.endOfTextblock=function(e,t){return Zo(this,t||this.state,e)},es.prototype.destroy=function(){this.docView&&(!function(e){for(var t in e.domObserver.stop(),e.eventHandlers)e.dom.removeEventListener(t,e.eventHandlers[t]);clearTimeout(e.composingTimeout),clearTimeout(e.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ya(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},ts.isDestroyed.get=function(){return null==this.docView},es.prototype.dispatchEvent=function(e){return function(e,t){fa(e,t)||!ca[t.type]||!e.editable&&t.type in ua||ca[t.type](e,t)}(this,e)},es.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(es.prototype,ts),"undefined"!=typeof WeakMap){var ls=new WeakMap;Za=function(e){return ls.get(e)},Qa=function(e,t){return ls.set(e,t),t}}else{var cs=[],us=0;Za=function(e){for(var t=0;t<cs.length;t+=2)if(cs[t]==e)return cs[t+1]},Qa=function(e,t){return 10==us&&(us=0),cs[us++]=e,cs[us++]=t}}var ds=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},ps=function(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r};function fs(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}function hs(e,t){var n=e.getAttribute("data-colwidth"),r=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map((function(e){return Number(e)})):null,o=Number(e.getAttribute("colspan")||1),i={colspan:o,rowspan:Number(e.getAttribute("rowspan")||1),colwidth:r&&r.length==o?r:null};for(var a in t){var s=t[a].getFromDOM,l=s&&s(e);null!=l&&(i[a]=l)}return i}function ms(e,t){var n={};for(var r in 1!=e.attrs.colspan&&(n.colspan=e.attrs.colspan),1!=e.attrs.rowspan&&(n.rowspan=e.attrs.rowspan),e.attrs.colwidth&&(n["data-colwidth"]=e.attrs.colwidth.join(",")),t){var o=t[r].setDOMAttr;o&&o(e.attrs[r],n)}return n}function vs(e){var t=e.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(var r in t)n[r]={default:t[r].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:e.tableGroup,parseDOM:[{tag:"table"}],toDOM:function(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM:function(){return["tr",0]}},table_cell:{content:e.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:function(e){return hs(e,t)}}],toDOM:function(e){return["td",ms(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return hs(e,t)}}],toDOM:function(e){return["th",ms(e,t),0]}}}}function gs(e){var t=e.cached.tableNodeTypes;if(!t)for(var n in t=e.cached.tableNodeTypes={},e.nodes){var r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}return t}ps.prototype.findCell=function(e){for(var t=0;t<this.map.length;t++){var n=this.map[t];if(n==e){for(var r=t%this.width,o=t/this.width|0,i=r+1,a=o+1,s=1;i<this.width&&this.map[t+s]==n;s++)i++;for(var l=1;a<this.height&&this.map[t+this.width*l]==n;l++)a++;return new ds(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")},ps.prototype.colCount=function(e){for(var t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError("No cell with offset "+e+" found")},ps.prototype.nextCell=function(e,t,n){var r=this.findCell(e),o=r.left,i=r.right,a=r.top,s=r.bottom;return"horiz"==t?(n<0?0==o:i==this.width)?null:this.map[a*this.width+(n<0?o-1:i)]:(n<0?0==a:s==this.height)?null:this.map[o+this.width*(n<0?a-1:s)]},ps.prototype.rectBetween=function(e,t){var n=this.findCell(e),r=n.left,o=n.right,i=n.top,a=n.bottom,s=this.findCell(t),l=s.left,c=s.right,u=s.top,d=s.bottom;return new ds(Math.min(r,l),Math.min(i,u),Math.max(o,c),Math.max(a,d))},ps.prototype.cellsInRect=function(e){for(var t=[],n={},r=e.top;r<e.bottom;r++)for(var o=e.left;o<e.right;o++){var i=r*this.width+o,a=this.map[i];n[a]||(n[a]=!0,o==e.left&&o&&this.map[i-1]==a||r==e.top&&r&&this.map[i-this.width]==a||t.push(a))}return t},ps.prototype.positionAt=function(e,t,n){for(var r=0,o=0;;r++){var i=o+n.child(r).nodeSize;if(r==e){for(var a=t+e*this.width,s=(e+1)*this.width;a<s&&this.map[a]<o;)a++;return a==s?i-1:this.map[a]}o=i}},ps.get=function(e){return Za(e)||Qa(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);for(var t=function(e){for(var t=-1,n=!1,r=0;r<e.childCount;r++){var o=e.child(r),i=0;if(n)for(var a=0;a<r;a++)for(var s=e.child(a),l=0;l<s.childCount;l++){var c=s.child(l);a+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}for(var u=0;u<o.childCount;u++){var d=o.child(u);i+=d.attrs.colspan,d.attrs.rowspan>1&&(n=!0)}-1==t?t=i:t!=i&&(t=Math.max(t,i))}return t}(e),n=e.childCount,r=[],o=0,i=null,a=[],s=0,l=t*n;s<l;s++)r[s]=0;for(var c=0,u=0;c<n;c++){var d=e.child(c);u++;for(var p=0;;p++){for(;o<r.length&&0!=r[o];)o++;if(p==d.childCount)break;for(var f=d.child(p),h=f.attrs,m=h.colspan,v=h.rowspan,g=h.colwidth,y=0;y<v;y++){if(y+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:v-y});break}for(var b=o+y*t,k=0;k<m;k++){0==r[b+k]?r[b+k]=u:(i||(i=[])).push({type:"collision",row:c,pos:u,n:m-k});var w=g&&g[k];if(w){var C=(b+k)%t*2,O=a[C];null==O||O!=w&&1==a[C+1]?(a[C]=w,a[C+1]=1):O==w&&a[C+1]++}}}o+=m,u+=f.nodeSize}for(var x=(c+1)*t,S=0;o<x;)0==r[o++]&&S++;S&&(i||(i=[])).push({type:"missing",row:c,n:S}),u++}for(var E=new ps(t,n,r,i),I=!1,N=0;!I&&N<a.length;N+=2)null!=a[N]&&a[N+1]<n&&(I=!0);I&&function(e,t,n){e.problems||(e.problems=[]);for(var r=0,o={};r<e.map.length;r++){var i=e.map[r];if(!o[i]){o[i]=!0;for(var a=n.nodeAt(i),s=null,l=0;l<a.attrs.colspan;l++){var c=(r+l)%e.width,u=t[2*c];null==u||a.attrs.colwidth&&a.attrs.colwidth[l]==u||((s||(s=fs(a.attrs)))[l]=u)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(E,a,e);return E}(e))};var ys=new Ot("selectingCells");function bs(e){for(var t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function ks(e){for(var t=e.selection.$head,n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function ws(e){var t=e.selection;return t.$anchorCell?t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell:t.node&&"cell"==t.node.type.spec.tableRole?t.$anchor:bs(t.$head)||function(e){for(var t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){var r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(var o=e.nodeBefore,i=e.pos;o;o=o.lastChild,i--){var a=o.type.spec.tableRole;if("cell"==a||"header_cell"==a)return e.doc.resolve(i-o.nodeSize)}}(t.$head)}function Cs(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function Os(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function xs(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Ss(e){return ps.get(e.node(-1)).findCell(e.pos-e.start(-1))}function Es(e){return ps.get(e.node(-1)).colCount(e.pos-e.start(-1))}function Is(e,t,n){var r=e.start(-1),o=ps.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function Ns(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function Ts(e,t,n){void 0===n&&(n=1);var r=Ns(e,"colspan",e.colspan-n);return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((function(e){return e>0}))||(r.colwidth=null)),r}function Ms(e,t,n){void 0===n&&(n=1);var r=Ns(e,"colspan",e.colspan+n);if(r.colwidth){r.colwidth=r.colwidth.slice();for(var o=0;o<n;o++)r.colwidth.splice(t,0,0)}return r}function Ds(e,t,n){for(var r=gs(t.type.schema).header_cell,o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0}var Ps=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=ps.get(r),i=t.start(-1),a=o.rectBetween(t.pos-i,n.pos-i),s=t.node(0),l=o.cellsInRect(a).filter((function(e){return e!=n.pos-i}));l.unshift(n.pos-i);var c=l.map((function(e){var t=r.nodeAt(e),n=e+i+1;return new rt(s.resolve(n),s.resolve(n+t.content.size))}));e.call(this,c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(e,n){var r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(Cs(r)&&Cs(o)&&xs(r,o)){var i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?t.rowSelection(r,o):i&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return ot.between(r,o)},t.prototype.content=function(){for(var e=this.$anchorCell.node(-1),t=ps.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},a=[],s=r.top;s<r.bottom;s++){for(var l=[],c=s*t.width+r.left,u=r.left;u<r.right;u++,c++){var d=t.map[c];if(!o[d]){o[d]=!0;var f=t.findCell(d),h=e.nodeAt(d),m=r.left-f.left,v=f.right-r.right;if(m>0||v>0){var g=h.attrs;m>0&&(g=Ts(g,0,m)),v>0&&(g=Ts(g,g.colspan-v,v)),h=f.left<r.left?h.type.createAndFill(g):h.type.create(g,h.content)}if(f.top<r.top||f.bottom>r.bottom){var y=Ns(h.attrs,"rowspan",Math.min(f.bottom,r.bottom)-Math.max(f.top,r.top));h=f.top<r.top?h.type.createAndFill(y):h.type.create(y,h.content)}l.push(h)}}a.push(e.child(s).copy(i.from(l)))}var b=this.isColSelection()&&this.isRowSelection()?e:a;return new p(i.from(b),1,1)},t.prototype.replace=function(t,n){void 0===n&&(n=p.empty);for(var r=t.steps.length,o=this.ranges,i=0;i<o.length;i++){var a=o[i],s=a.$from,l=a.$to,c=t.mapping.slice(r);t.replace(c.map(s.pos),c.map(l.pos),i?p.empty:n)}var u=e.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);u&&t.setSelection(u)},t.prototype.replaceWith=function(e,t){this.replace(e,new p(i.from(t),0,0))},t.prototype.forEachCell=function(e){for(var t=this.$anchorCell.node(-1),n=ps.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r)),i=0;i<o.length;i++)e(t.nodeAt(o[i]),r+o[i])},t.prototype.isColSelection=function(){var e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;var n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount},t.colSelection=function(e,n){void 0===n&&(n=e);var r=ps.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.top<=a.top?(i.top>0&&(e=s.resolve(o+r.map[i.left])),a.bottom<r.height&&(n=s.resolve(o+r.map[r.width*(r.height-1)+a.right-1]))):(a.top>0&&(n=s.resolve(o+r.map[a.left])),i.bottom<r.height&&(e=s.resolve(o+r.map[r.width*(r.height-1)+i.right-1]))),new t(e,n)},t.prototype.isRowSelection=function(){var e=ps.get(this.$anchorCell.node(-1)),t=this.$anchorCell.start(-1),n=e.colCount(this.$anchorCell.pos-t),r=e.colCount(this.$headCell.pos-t);if(Math.min(n,r)>0)return!1;var o=n+this.$anchorCell.nodeAfter.attrs.colspan,i=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,i)==e.width},t.prototype.eq=function(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos},t.rowSelection=function(e,n){void 0===n&&(n=e);var r=ps.get(e.node(-1)),o=e.start(-1),i=r.findCell(e.pos-o),a=r.findCell(n.pos-o),s=e.node(0);return i.left<=a.left?(i.left>0&&(e=s.resolve(o+r.map[i.top*r.width])),a.right<r.width&&(n=s.resolve(o+r.map[r.width*(a.top+1)-1]))):(a.left>0&&(n=s.resolve(o+r.map[a.top*r.width])),i.right<r.width&&(e=s.resolve(o+r.map[r.width*(i.top+1)-1]))),new t(e,n)},t.prototype.toJSON=function(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}},t.fromJSON=function(e,n){return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,n,r){return void 0===r&&(r=n),new t(e.resolve(n),e.resolve(r))},t.prototype.getBookmark=function(){return new _s(this.$anchorCell.pos,this.$headCell.pos)},t}(tt);Ps.prototype.visible=!1,tt.jsonID("cell",Ps);var _s=function(e,t){this.anchor=e,this.head=t};function js(e){if(!(e.selection instanceof Ps))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(Fa.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Va.create(e.doc,t)}function Rs(e){if(!e.size)return null;for(var t=e.content,n=e.openStart,r=e.openEnd;1==t.childCount&&(n>0&&r>0||"table"==t.firstChild.type.spec.tableRole);)n--,r--,t=t.firstChild.content;var o=t.firstChild,a=o.type.spec.tableRole,s=o.type.schema,l=[];if("row"==a)for(var c=0;c<t.childCount;c++){var u=t.child(c).content,d=c?0:Math.max(0,n-1),f=c<t.childCount-1?0:Math.max(0,r-1);(d||f)&&(u=As(gs(s).row,new p(u,d,f)).content),l.push(u)}else{if("cell"!=a&&"header_cell"!=a)return null;l.push(n||r?As(gs(s).row,new p(t,n,r)).content:t)}return function(e,t){for(var n=[],r=0;r<t.length;r++)for(var o=t[r],a=o.childCount-1;a>=0;a--)for(var s=o.child(a).attrs,l=s.rowspan,c=s.colspan,u=r;u<r+l;u++)n[u]=(n[u]||0)+c;for(var d=0,p=0;p<n.length;p++)d=Math.max(d,n[p]);for(var f=0;f<n.length;f++)if(f>=t.length&&t.push(i.empty),n[f]<d){for(var h=gs(e).cell.createAndFill(),m=[],v=n[f];v<d;v++)m.push(h);t[f]=t[f].append(i.from(m))}return{height:t.length,width:d,rows:t}}(s,l)}function As(e,t){var n=e.createAndFill();return new ke(n).replace(0,n.content.size,t).doc}function Fs(e,t,n,r,o,i,a,s){if(0==a||a==t.height)return!1;for(var l=!1,c=o;c<i;c++){var u=a*t.width+c,d=t.map[u];if(t.map[u-t.width]==d){l=!0;var p=n.nodeAt(d),f=t.findCell(d),h=f.top,m=f.left;e.setNodeMarkup(e.mapping.slice(s).map(d+r),null,Ns(p.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),p.type.createAndFill(Ns(p.attrs,"rowspan",h+p.attrs.rowspan-a))),c+=p.attrs.colspan-1}}return l}function zs(e,t,n,r,o,i,a,s){if(0==a||a==t.width)return!1;for(var l=!1,c=o;c<i;c++){var u=c*t.width+a,d=t.map[u];if(t.map[u-1]==d){l=!0;var p=n.nodeAt(d),f=t.colCount(d),h=e.mapping.slice(s).map(d+r);e.setNodeMarkup(h,null,Ts(p.attrs,a-f,p.attrs.colspan-(a-f))),e.insert(h+p.nodeSize,p.type.createAndFill(Ts(p.attrs,0,a-f))),c+=p.attrs.rowspan-1}}return l}function Ls(e,t,n,r,o){var a=n?e.doc.nodeAt(n-1):e.doc,s=ps.get(a),l=r.top,c=r.left,u=c+o.width,d=l+o.height,f=e.tr,h=0;function m(){a=n?f.doc.nodeAt(n-1):f.doc,s=ps.get(a),h=f.mapping.maps.length}(function(e,t,n,r,o,a,s){var l,c,u=gs(e.doc.type.schema);if(o>t.width)for(var d=0,p=0;d<t.height;d++){var f=n.child(d);p+=f.nodeSize;var h=[],m=void 0;m=null==f.lastChild||f.lastChild.type==u.cell?l||(l=u.cell.createAndFill()):c||(c=u.header_cell.createAndFill());for(var v=t.width;v<o;v++)h.push(m);e.insert(e.mapping.slice(s).map(p-1+r),h)}if(a>t.height){for(var g=[],y=0,b=(t.height-1)*t.width;y<Math.max(t.width,o);y++){var k=!(y>=t.width)&&n.nodeAt(t.map[b+y]).type==u.header_cell;g.push(k?c||(c=u.header_cell.createAndFill()):l||(l=u.cell.createAndFill()))}for(var w=u.row.create(null,i.from(g)),C=[],O=t.height;O<a;O++)C.push(w);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),C)}return!(!l&&!c)})(f,s,a,n,u,d,h)&&m(),Fs(f,s,a,n,c,u,l,h)&&m(),Fs(f,s,a,n,c,u,d,h)&&m(),zs(f,s,a,n,l,d,c,h)&&m(),zs(f,s,a,n,l,d,u,h)&&m();for(var v=l;v<d;v++){var g=s.positionAt(v,c,a),y=s.positionAt(v,u,a);f.replace(f.mapping.slice(h).map(g+n),f.mapping.slice(h).map(y+n),new p(o.rows[v-l],0,0))}m(),f.setSelection(new Ps(f.doc.resolve(n+s.positionAt(l,c,a)),f.doc.resolve(n+s.positionAt(d-1,u-1,a)))),t(f)}_s.prototype.map=function(e){return new _s(e.map(this.anchor),e.map(this.head))},_s.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&xs(t,n)?new Ps(t,n):tt.near(n,1)};var Bs=ho({ArrowLeft:Hs("horiz",-1),ArrowRight:Hs("horiz",1),ArrowUp:Hs("vert",-1),ArrowDown:Hs("vert",1),"Shift-ArrowLeft":Ks("horiz",-1),"Shift-ArrowRight":Ks("horiz",1),"Shift-ArrowUp":Ks("vert",-1),"Shift-ArrowDown":Ks("vert",1),Backspace:Ws,"Mod-Backspace":Ws,Delete:Ws,"Mod-Delete":Ws});function Vs(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Hs(e,t){return function(n,r,o){var i=n.selection;if(i instanceof Ps)return Vs(n,r,tt.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;var a=Gs(o,e,t);if(null==a)return!1;if("horiz"==e)return Vs(n,r,tt.near(n.doc.resolve(i.head+t),t));var s,l=n.doc.resolve(a),c=Is(l,e,t);return s=c?tt.near(c,1):t<0?tt.near(n.doc.resolve(l.before(-1)),-1):tt.near(n.doc.resolve(l.after(-1)),1),Vs(n,r,s)}}function Ks(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof Ps)){var a=Gs(o,e,t);if(null==a)return!1;i=new Ps(n.doc.resolve(a))}var s=Is(i.$headCell,e,t);return!!s&&Vs(n,r,new Ps(i.$anchorCell,s))}}function Ws(e,t){var n=e.selection;if(!(n instanceof Ps))return!1;if(t){var r=e.tr,o=gs(e.schema).cell.createAndFill().content;n.forEachCell((function(e,t){e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new p(o,0,0))})),r.docChanged&&t(r)}return!0}function $s(e,t){var n=bs(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new Ps(n))),!0)}function qs(e,t,n){if(!ks(e.state))return!1;var r=Rs(n),o=e.state.selection;if(o instanceof Ps){r||(r={width:1,height:1,rows:[i.from(As(gs(e.state.schema).cell,n))]});var a=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=ps.get(a).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=function(e,t,n){var r=e.width,o=e.height,a=e.rows;if(r!=t){for(var s=[],l=[],c=0;c<a.length;c++){for(var u=a[c],d=[],p=s[c]||0,f=0;p<t;f++){var h=u.child(f%u.childCount);p+h.attrs.colspan>t&&(h=h.type.create(Ts(h.attrs,h.attrs.colspan,p+h.attrs.colspan-t),h.content)),d.push(h),p+=h.attrs.colspan;for(var m=1;m<h.attrs.rowspan;m++)s[c+m]=(s[c+m]||0)+h.attrs.colspan}l.push(i.from(d))}a=l,r=t}if(o!=n){for(var v=[],g=0,y=0;g<n;g++,y++){for(var b=[],k=a[y%o],w=0;w<k.childCount;w++){var C=k.child(w);g+C.attrs.rowspan>n&&(C=C.type.create(Ns(C.attrs,"rowspan",Math.max(1,n-C.attrs.rowspan)),C.content)),b.push(C)}v.push(i.from(b))}a=v,o=n}return{width:r,height:o,rows:a}}(r,l.right-l.left,l.bottom-l.top),Ls(e.state,e.dispatch,s,l,r),!0}if(r){var c=ws(e.state),u=c.start(-1);return Ls(e.state,e.dispatch,u,ps.get(c.node(-1)).findCell(c.pos-u),r),!0}return!1}function Us(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=Xs(e,t.target);if(t.shiftKey&&e.state.selection instanceof Ps)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=bs(e.state.selection.$anchor))&&Js(e,t).pos!=n.pos)o(n,t),t.preventDefault();else if(!r)return;e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",a)}function o(t,n){var r=Js(e,n),o=null==ys.getState(e.state);if(!r||!xs(t,r)){if(!o)return;r=t}var i=new Ps(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(ys,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=ys.getState(e.state)&&e.dispatch(e.state.tr.setMeta(ys,-1))}function a(n){var a,s=ys.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(Xs(e,n.target)!=r&&!(a=Js(e,t)))return i();a&&o(a,n)}}function Gs(e,t,n){if(!(e.state.selection instanceof ot))return null;for(var r=e.state.selection.$head,o=r.depth-1;o>=0;o--){var i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){var a=r.before(o),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?a:null}}return null}function Xs(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Js(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?bs(e.state.doc.resolve(n.pos)):null}var Ys=new Ot("fix-tables");function Zs(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=ps.get(t);if(!o.problems)return r;r||(r=e.tr);for(var i,a,s=[],l=0;l<o.height;l++)s.push(0);for(var c=0;c<o.problems.length;c++){var u=o.problems[c];if("collision"==u.type){for(var d=t.nodeAt(u.pos),p=0;p<d.attrs.rowspan;p++)s[u.row+p]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Ts(d.attrs,d.attrs.colspan-u.n,u.n))}else if("missing"==u.type)s[u.row]+=u.n;else if("overlong_rowspan"==u.type){var f=t.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Ns(f.attrs,"rowspan",f.attrs.rowspan-u.n))}else if("colwidth mismatch"==u.type){var h=t.nodeAt(u.pos);r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,Ns(h.attrs,"colwidth",u.colwidth))}}for(var m=0;m<s.length;m++)s[m]&&(null==i&&(i=m),a=m);for(var v=0,g=n+1;v<o.height;v++){var y=t.child(v),b=g+y.nodeSize,k=s[v];if(k>0){var w="cell";y.firstChild&&(w=y.firstChild.type.spec.tableRole);for(var C=[],O=0;O<k;O++)C.push(gs(e.schema)[w].createAndFill());var x=0!=v&&i!=v-1||a!=v?b-1:g+1;r.insert(r.mapping.map(x),C)}g=b}return r.setMeta(Ys,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,o){var i=t.childCount,a=n.childCount;e:for(var s=0,l=0;s<a;s++){for(var c=n.child(s),u=l,d=Math.min(i,s+3);u<d;u++)if(t.child(u)==c){l=u+1,r+=c.nodeSize;continue e}o(c,r),l<i&&t.child(l).sameMarkup(c)?e(t.child(l),c,r+1,o):c.nodesBetween(0,c.content.size,o,r+1),r+=c.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}function Qs(e){var t,n=e.selection,r=ws(e),o=r.node(-1),i=r.start(-1),a=ps.get(o);return(t=n instanceof Ps?a.rectBetween(n.$anchorCell.pos-i,n.$headCell.pos-i):a.findCell(r.pos-i)).tableStart=i,t.map=a,t.table=o,t}function el(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;Ds(r,i,n+a)&&(a=0==n||n==r.width?null:0);for(var s=0;s<r.height;s++){var l=s*r.width+n;if(n>0&&n<r.width&&r.map[l-1]==r.map[l]){var c=r.map[l],u=i.nodeAt(c);e.setNodeMarkup(e.mapping.map(o+c),null,Ms(u.attrs,n-r.colCount(c))),s+=u.attrs.rowspan-1}else{var d=null==a?gs(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,p=r.positionAt(s,n,i);e.insert(e.mapping.map(o+p),d.createAndFill())}}return e}function tl(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(el(e.tr,n,n.left))}return!0}function nl(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(el(e.tr,n,n.right))}return!0}function rl(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=e.mapping.maps.length,s=0;s<r.height;){var l=s*r.width+n,c=r.map[l],u=o.nodeAt(c);if(n>0&&r.map[l-1]==c||n<r.width-1&&r.map[l+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(i+c),null,Ts(u.attrs,n-r.colCount(c)));else{var d=e.mapping.slice(a).map(i+c);e.delete(d,d+u.nodeSize)}s+=u.attrs.rowspan}}function ol(e,t){if(!ks(e))return!1;if(t){var n=Qs(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;rl(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ps.get(n.table);t(r)}return!0}function il(e,t,n){for(var r=gs(t.type.schema).header_cell,o=0;o<e.width;o++)if(t.nodeAt(e.map[o+n*e.width]).type!=r)return!1;return!0}function al(e,t,n){for(var r=t.map,o=t.tableStart,i=t.table,a=o,s=0;s<n;s++)a+=i.child(s).nodeSize;var l=[],c=n>0?-1:0;il(r,i,n+c)&&(c=0==n||n==r.height?null:0);for(var u=0,d=r.width*n;u<r.width;u++,d++)if(n>0&&n<r.height&&r.map[d]==r.map[d-r.width]){var p=r.map[d],f=i.nodeAt(p).attrs;e.setNodeMarkup(o+p,null,Ns(f,"rowspan",f.rowspan+1)),u+=f.colspan-1}else{var h=null==c?gs(i.type.schema).cell:i.nodeAt(r.map[d+c*r.width]).type;l.push(h.createAndFill())}return e.insert(a,gs(i.type.schema).row.create(null,l)),e}function sl(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(al(e.tr,n,n.top))}return!0}function ll(e,t){if(!ks(e))return!1;if(t){var n=Qs(e);t(al(e.tr,n,n.bottom))}return!0}function cl(e,t,n){for(var r=t.map,o=t.table,i=t.tableStart,a=0,s=0;s<n;s++)a+=o.child(s).nodeSize;var l=a+o.child(n).nodeSize,c=e.mapping.maps.length;e.delete(a+i,l+i);for(var u=0,d=n*r.width;u<r.width;u++,d++){var p=r.map[d];if(n>0&&p==r.map[d-r.width]){var f=o.nodeAt(p).attrs;e.setNodeMarkup(e.mapping.slice(c).map(p+i),null,Ns(f,"rowspan",f.rowspan-1)),u+=f.colspan-1}else if(n<r.width&&p==r.map[d+r.width]){var h=o.nodeAt(p),m=h.type.create(Ns(h.attrs,"rowspan",h.attrs.rowspan-1),h.content),v=r.positionAt(n+1,u,o);e.insert(e.mapping.slice(c).map(i+v),m),u+=h.attrs.colspan-1}}}function ul(e,t){if(!ks(e))return!1;if(t){var n=Qs(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;cl(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=ps.get(n.table);t(r)}return!0}function dl(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function pl(e,t){var n=e.selection;if(!(n instanceof Ps)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=Qs(e),o=r.map;if(function(e,t){for(var n=e.width,r=e.height,o=e.map,i=t.top*n+t.left,a=i,s=(t.bottom-1)*n+t.left,l=i+(t.right-t.left-1),c=t.top;c<t.bottom;c++){if(t.left>0&&o[a]==o[a-1]||t.right<n&&o[l]==o[l+1])return!0;a+=n,l+=n}for(var u=t.left;u<t.right;u++){if(t.top>0&&o[i]==o[i-n]||t.bottom<r&&o[s]==o[s+n])return!0;i++,s++}return!1}(o,r))return!1;if(t){for(var a,s,l=e.tr,c={},u=i.empty,d=r.top;d<r.bottom;d++)for(var p=r.left;p<r.right;p++){var f=o.map[d*o.width+p],h=r.table.nodeAt(f);if(!c[f])if(c[f]=!0,null==a)a=f,s=h;else{dl(h)||(u=u.append(h.content));var m=l.mapping.map(f+r.tableStart);l.delete(m,m+h.nodeSize)}}if(l.setNodeMarkup(a+r.tableStart,null,Ns(Ms(s.attrs,s.attrs.colspan,r.right-r.left-s.attrs.colspan),"rowspan",r.bottom-r.top)),u.size){var v=a+1+s.content.size,g=dl(s)?a+1:v;l.replaceWith(g+r.tableStart,v+r.tableStart,u)}l.setSelection(new Ps(l.doc.resolve(a+r.tableStart))),t(l)}return!0}function fl(e,t){var n=gs(e.schema);return hl((function(e){var t=e.node;return n[t.type.spec.tableRole]}))(e,t)}function hl(e){return function(t,n){var r,o,i=t.selection;if(i instanceof Ps){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;r=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(!(r=function(e){for(var t=e.depth;t>0;t--){var n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(i.$from)))return!1;o=bs(i.$from).pos}if(1==r.attrs.colspan&&1==r.attrs.rowspan)return!1;if(n){var a=r.attrs,s=[],l=a.colwidth;a.rowspan>1&&(a=Ns(a,"rowspan",1)),a.colspan>1&&(a=Ns(a,"colspan",1));for(var c,u=Qs(t),d=t.tr,p=0;p<u.right-u.left;p++)s.push(l?Ns(a,"colwidth",l&&l[p]?[l[p]]:null):a);for(var f=u.top;f<u.bottom;f++){var h=u.map.positionAt(f,u.left,u.table);f==u.top&&(h+=r.nodeSize);for(var m=u.left,v=0;m<u.right;m++,v++)m==u.left&&f==u.top||d.insert(c=d.mapping.map(h+u.tableStart,1),e({node:r,row:f,col:m}).createAndFill(s[v]))}d.setNodeMarkup(o,e({node:r,row:u.top,col:u.left}),s[0]),i instanceof Ps&&d.setSelection(new Ps(d.doc.resolve(i.$anchorCell.pos),c&&d.doc.resolve(c))),n(d)}return!0}}function ml(e,t){return function(n,r){if(!ks(n))return!1;var o=ws(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof Ps?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,Ns(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,Ns(o.nodeAfter.attrs,e,t)),r(i)}return!0}}function vl(e,t,n){for(var r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1}),o=0;o<r.length;o++){var i=t.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function gl(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!ks(t))return!1;if(n){for(var r=gs(t.schema),o=Qs(t),i=t.tr,a=o.map.cellsInRect("column"==e?new ds(o.left,0,o.right,o.map.height):"row"==e?new ds(0,o.top,o.map.width,o.bottom):o),s=a.map((function(e){return o.table.nodeAt(e)})),l=0;l<a.length;l++)s[l].type==r.header_cell&&i.setNodeMarkup(o.tableStart+a[l],r.cell,s[l].attrs);if(0==i.steps.length)for(var c=0;c<a.length;c++)i.setNodeMarkup(o.tableStart+a[c],r.header_cell,s[c].attrs);n(i)}return!0}}(e):function(t,n){if(!ks(t))return!1;if(n){var r=gs(t.schema),o=Qs(t),i=t.tr,a=vl("row",o,r),s=vl("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new ds(0,l,1,o.map.height):"row"==e?new ds(l,0,o.map.width,1):o,u="column"==e?s?r.cell:r.header_cell:"row"==e?a?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((function(e){var t=e+o.tableStart,n=i.doc.nodeAt(t);n&&i.setNodeMarkup(t,u,n.attrs)})),n(i)}return!0}}var yl=gl("row",{useDeprecatedLogic:!0}),bl=gl("column",{useDeprecatedLogic:!0}),kl=gl("cell",{useDeprecatedLogic:!0});function wl(e){return function(t,n){if(!ks(t))return!1;var r=function(e,t){if(t<0){var n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(var r=e.index(-1)-1,o=e.before();r>=0;r--){var i=e.node(-1).child(r);if(i.childCount)return o-1-i.lastChild.nodeSize;o-=i.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;for(var a=e.node(-1),s=e.indexAfter(-1),l=e.after();s<a.childCount;s++){var c=a.child(s);if(c.childCount)return l+1;l+=c.nodeSize}}}(ws(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(ot.between(o,Os(o))).scrollIntoView())}return!0}}}function Cl(e,t){for(var n=e.selection.$anchor,r=n.depth;r>0;r--){if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0}return!1}var Ol=function(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xl(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function xl(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,c=e.firstChild,u=0,d=0;u<c.childCount;u++)for(var p=c.child(u).attrs,f=p.colspan,h=p.colwidth,m=0;m<f;m++,d++){var v=o==d?i:h&&h[m],g=v?v+"px":"";a+=v||r,v||(s=!1),l?(l.style.width!=g&&(l.style.width=g),l=l.nextSibling):t.appendChild(document.createElement("col")).style.width=g}for(;l;){var y=l.nextSibling;l.parentNode.removeChild(l),l=y}s?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}Ol.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,xl(e,this.colgroup,this.table,this.cellMinWidth),!0)},Ol.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var Sl=new Ot("tableColumnResizing");function El(e){void 0===e&&(e={});var t=e.handleWidth;void 0===t&&(t=5);var n=e.cellMinWidth;void 0===n&&(n=25);var r=e.View;void 0===r&&(r=Ol);var o=e.lastColumnResizable;return void 0===o&&(o=!0),new kt({key:Sl,state:{init:function(e,t){return this.spec.props.nodeViews[gs(t.schema).table.name]=function(e,t){return new r(e,n,t)},new Il(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Sl.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=Sl.getState(e.state);if(!i.dragging){var a=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(a){var l=a.getBoundingClientRect(),c=l.left,u=l.right;t.clientX-c<=n?s=Nl(e,t,"left"):u-t.clientX<=n&&(s=Nl(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var d=e.state.doc.resolve(s),p=d.node(-1),f=ps.get(p),h=d.start(-1);if(f.colCount(d.pos-h)+d.nodeAfter.attrs.colspan-1==f.width-1)return}Ml(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=Sl.getState(e.state);t.activeHandle>-1&&!t.dragging&&Ml(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=Sl.getState(e.state);if(-1==r.activeHandle||r.dragging)return!1;var o=e.state.doc.nodeAt(r.activeHandle),i=function(e,t,n){var r=n.colspan,o=n.colwidth,i=o&&o[o.length-1];if(i)return i;var a=e.domAtPos(t),s=a.node.childNodes[a.offset].offsetWidth,l=r;if(o)for(var c=0;c<r;c++)o[c]&&(s-=o[c],l--);return s/l}(e,r.activeHandle,o.attrs);function a(t){window.removeEventListener("mouseup",a),window.removeEventListener("mousemove",s);var r=Sl.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=ps.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,l=e.state.tr,c=0;c<i.height;c++){var u=c*i.width+s;if(!c||i.map[u]!=i.map[u-i.width]){var d=i.map[u],p=o.nodeAt(d).attrs,f=1==p.colspan?0:s-i.colCount(d);if(!p.colwidth||p.colwidth[f]!=n){var h=p.colwidth?p.colwidth.slice():Dl(p.colspan);h[f]=n,l.setNodeMarkup(a+d,null,Ns(p,"colwidth",h))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,Tl(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Sl,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=Sl.getState(e.state),o=Tl(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ps.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;for(;"TABLE"!=l.nodeName;)l=l.parentNode;xl(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(Sl,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=Sl.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=ps.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var c=s+l*i.width-1;if(!(s!=i.width&&i.map[c]==i.map[c+1]||0!=l&&i.map[c-1]==i.map[c-1-i.width])){var u=i.map[c],d=a+u+o.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(Fa.widget(d,p))}}return Va.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})}var Il=function(e,t){this.activeHandle=e,this.dragging=t};function Nl(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=bs(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=ps.get(i.node(-1)),s=i.start(-1),l=a.map.indexOf(i.pos-s);return l%a.width==0?-1:s+a.map[l-1]}function Tl(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Ml(e,t){e.dispatch(e.state.tr.setMeta(Sl,{setHandle:t}))}function Dl(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function Pl(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;return void 0===t&&(t=!1),new kt({key:ys,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(ys);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;var r=e.mapping.mapResult(t),o=r.deleted,i=r.pos;return o?null:i}},props:{decorations:js,handleDOMEvents:{mousedown:Us},createSelectionBetween:function(e){if(null!=ys.getState(e.state))return e.state.selection},handleTripleClick:$s,handleKeyDown:Bs,handlePaste:qs},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof at&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=Ps.create(a,i.from);else if("row"==o){var s=a.resolve(i.from+1);r=Ps.rowSelection(s,s)}else if(!n){var l=ps.get(i.node),c=i.from+1,u=c+l.map[l.width*l.height-1];r=Ps.create(a,c+1,u)}}else i instanceof ot&&function(e){var t=e.$from,n=e.$to;if(t.pos==n.pos||t.pos<t.pos-6)return!1;for(var r=t.pos,o=n.pos,i=t.depth;i>=0&&!(t.after(i+1)<t.end(i));i--,r++);for(var a=n.depth;a>=0&&!(n.before(a+1)>n.start(a));a--,o--);return r==o&&/row|table/.test(t.node(i).type.spec.tableRole)}(i)?r=ot.create(a,i.from):i instanceof ot&&function(e){for(var t,n,r=e.$from,o=e.$to,i=r.depth;i>0;i--){var a=r.node(i);if("cell"===a.type.spec.tableRole||"header_cell"===a.type.spec.tableRole){t=a;break}}for(var s=o.depth;s>0;s--){var l=o.node(s);if("cell"===l.type.spec.tableRole||"header_cell"===l.type.spec.tableRole){n=l;break}}return t!==n&&0===o.parentOffset}(i)&&(r=ot.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,Zs(r,n),t)}})}Il.prototype.apply=function(e){var t=this,n=e.getMeta(Sl);if(n&&null!=n.setHandle)return new Il(n.setHandle,null);if(n&&void 0!==n.setDragging)return new Il(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);Cs(e.doc.resolve(r))||(r=null),t=new Il(r,t.dragging)}return t};var _l=["blockquote",0],jl=["hr"],Rl=["pre",["code",0]],Al=["ol",0],Fl=["ul",0],zl=["li",0],Ll=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},Bl=function(e){var t={};return e.forEach((function(e){t[e]={default:null}})),t},Vl=function(){return Bl(["style","class","id"])},Hl=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},Kl=function(e,t){void 0===t&&(t=[]);var n={},r=function(r){r&&null!==e[r]&&!t.find((function(e){return e===r}))&&(n[r]=e[r])};for(var o in e)r(o);return n},Wl=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},$l=Ft({link:{attrs:Ft({},Vl(),{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:Ll}],toDOM:function(e){return["a",Kl(e.attrs),0]}}},Wl("strong"),Wl("b"),Wl("em"),Wl("i"),Wl("u"),Wl("del"),Wl("sub"),Wl("sup"),Wl("code"),{style:{attrs:Ft({},Vl()),parseDOM:[{tag:"span",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["span",Kl(e.attrs),0]:["span",0]}}}),ql=function(e){var t;return(t={})[e]={default:null,getFromDOM:function(t){return t.getAttribute(e)},setDOMAttr:function(t,n){n[e]=t}},t},Ul=Ft({},ql("style"),ql("class"),ql("id"),ql("headers")),Gl={doc:{content:"colgroup*"},col:{attrs:Bl(["id","class","style","span"]),parseDOM:[{getAttrs:Ll,tag:"col"}],toDOM:function(e){return["col",e.attrs]}},colgroup:{attrs:Bl(["id","class","style","span"]),content:"col*",parseDOM:[{getAttrs:Ll,tag:"colgroup"}],toDOM:function(e){return["colgroup",e.attrs,0]}},text:{inline:!0,group:"inline"}},Xl=new Z({nodes:Gl,marks:{}}),Jl=function(e){var t=_t(Dt(e),Xl,{preserveWhitespace:!1});return Pt(t).firstChild},Yl=vs({tableGroup:"block",cellContent:"block+",cellAttributes:Ul});Yl.table_row.attrs=Ft({},Yl.table_row.attrs,Bl([xt,"style","class","id"])),Yl.table_row.toDOM=function(e){return["tr",Kl(e.attrs),0]},Yl.table_row.parseDOM=[{tag:"tr",getAttrs:Ll}],Yl.table.attrs=Ft({},Yl.table.attrs,Bl(["style","class","id",St,Et])),Yl.table.toDOM=function(e){var t=Hl(e.attrs)?Kl(e.attrs,[St,Et]):{},n=null;if(e.attrs[St]&&!function(e){for(var t=!1,n=e.child(0),r=0;r<n.childCount;r++){if(n.child(r).attrs.colwidth){t=!0;break}}return t}(e)){var r=Jl(e.attrs[St]);if(r){var o=Array.from(r.children).map((function(e){return["col",Ll(e)]}));n=["colgroup",Ll(r)].concat(o)}}return n?["table",t,n,["tbody",0]]:["table",t,["tbody",0]]},Yl.table.parseDOM=[{tag:"table",getAttrs:function(e){var t=Ll(e),n=Array.from(e.childNodes).find((function(e){return"COLGROUP"===e.nodeName}));return n&&(t[St]=n.outerHTML),t}}];var Zl=Ft({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:Ft({},Vl()),parseDOM:[{tag:"p",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["p",Kl(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:Ft({},Vl()),parseDOM:[{tag:"div",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["div",Kl(e.attrs),0]:["div",0]}},blockquote:{attrs:Ft({},Vl()),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["blockquote",Kl(e.attrs),0]:_l}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return jl}},heading:{attrs:Ft({},Vl(),{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return Ft({},Ll(e),{level:1})}},{tag:"h2",getAttrs:function(e){return Ft({},Ll(e),{level:2})}},{tag:"h3",getAttrs:function(e){return Ft({},Ll(e),{level:3})}},{tag:"h4",getAttrs:function(e){return Ft({},Ll(e),{level:4})}},{tag:"h5",getAttrs:function(e){return Ft({},Ll(e),{level:5})}},{tag:"h6",getAttrs:function(e){return Ft({},Ll(e),{level:6})}}],toDOM:function(e){return Hl(e.attrs,"level")?["h"+e.attrs.level,Kl(e.attrs,["level"]),0]:["h"+e.attrs.level,0]}},code_block:{content:"text*",marks:"",group:"block",code:!0,defining:!0,parseDOM:[{tag:"pre",preserveWhitespace:"full"}],toDOM:function(){return Rl}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:Ft({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},Vl()),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["img",Kl(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:Ft({},Vl()),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["br",Kl(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:Ft({},Vl(),{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return Ft({},Ll(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?Hl(e.attrs,"order")?["ol",Kl(e.attrs,["order"]),0]:Al:["ol",Ft({},Kl(e.attrs,["order"]),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:Ft({},Vl()),parseDOM:[{tag:"ul",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["ul",Kl(e.attrs),0]:Fl}},list_item:{content:"(paragraph | heading) block*",attrs:Ft({},Vl()),parseDOM:[{tag:"li",getAttrs:Ll}],toDOM:function(e){return Hl(e.attrs)?["li",Kl(e.attrs),0]:zl},defining:!0}},Yl),Ql=function(){};Ql.prototype.append=function(e){return e.length?(e=Ql.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Ql.prototype.prepend=function(e){return e.length?Ql.from(e).append(this):this},Ql.prototype.appendInner=function(e){return new tc(this,e)},Ql.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Ql.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Ql.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Ql.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Ql.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},Ql.from=function(e){return e instanceof Ql?e:e&&e.length?new ec(e):Ql.empty};var ec=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Ql);Ql.empty=new ec([]);var tc=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(Ql),nc=Ql,rc=function(e,t){this.items=e,this.eventCount=t};rc.prototype.popEvent=function(e,t){var n=this;if(0==this.eventCount)return null;for(var r,o,i=this.items.length;;i--){if(this.items.get(i-1).selection){--i;break}}t&&(r=this.remapping(i,this.items.length),o=r.maps.length);var a,s,l=e.tr,c=[],u=[];return this.items.forEach((function(e,t){if(!e.step)return r||(r=n.remapping(i,t+1),o=r.maps.length),o--,void u.push(e);if(r){u.push(new oc(e.map));var d,p=e.step.map(r.slice(o));p&&l.maybeStep(p).doc&&(d=l.mapping.maps[l.mapping.maps.length-1],c.push(new oc(d,null,null,c.length+u.length))),o--,d&&r.appendMap(d,o)}else l.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,s=new rc(n.items.slice(0,i).append(u.reverse().concat(c)),n.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:l,selection:a}},rc.prototype.addTransform=function(e,t,n,r){for(var o=[],i=this.eventCount,a=this.items,s=!r&&a.length?a.get(a.length-1):null,l=0;l<e.steps.length;l++){var c,u=e.steps[l].invert(e.docs[l]),d=new oc(e.mapping.maps[l],u,t);(c=s&&s.merge(d))&&(d=c,l?o.pop():a=a.slice(0,a.length-1)),o.push(d),t&&(i++,t=null),r||(s=d)}var p,f,h,m=i-n.depth;return m>ac&&(f=m,(p=a).forEach((function(e,t){if(e.selection&&0==f--)return h=t,!1})),a=p.slice(h),i-=m),new rc(a.append(o),i)},rc.prototype.remapping=function(e,t){var n=new ye;return this.items.forEach((function(t,r){var o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:null;n.appendMap(t.map,o)}),e,t),n},rc.prototype.addMaps=function(e){return 0==this.eventCount?this:new rc(this.items.append(e.map((function(e){return new oc(e)}))),this.eventCount)},rc.prototype.rebased=function(e,t){if(!this.eventCount)return this;var n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,a=this.eventCount;this.items.forEach((function(e){e.selection&&a--}),r);var s=t;this.items.forEach((function(t){var r=o.getMirror(--s);if(null!=r){i=Math.min(i,r);var l=o.maps[r];if(t.step){var c=e.steps[r].invert(e.docs[r]),u=t.selection&&t.selection.map(o.slice(s+1,r));u&&a++,n.push(new oc(l,c,u))}else n.push(new oc(l))}}),r);for(var l=[],c=t;c<i;c++)l.push(new oc(o.maps[c]));var u=this.items.slice(0,r).append(l).append(n),d=new rc(u,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d},rc.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},rc.prototype.compress=function(e){void 0===e&&(e=this.items.length);var t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach((function(i,a){if(a>=e)r.push(i),i.selection&&o++;else if(i.step){var s=i.step.map(t.slice(n)),l=s&&s.getMap();if(n--,l&&t.appendMap(l,n),s){var c=i.selection&&i.selection.map(t.slice(n));c&&o++;var u,d=new oc(l.invert(),s,c),p=r.length-1;(u=r.length&&r[p].merge(d))?r[p]=u:r.push(d)}}else i.map&&n--}),this.items.length,0),new rc(nc.from(r.reverse()),o)},rc.empty=new rc(nc.empty,0);var oc=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};oc.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new oc(t.getMap().invert(),t,this.selection)}};var ic=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r},ac=20;function sc(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function lc(e,t){if(!e)return null;for(var n=[],r=0;r<e.length;r+=2){var o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function cc(e,t,n,r){var o=pc(t),i=hc.get(t).spec.config,a=(r?e.undone:e.done).popEvent(t,o);if(a){var s=a.selection.resolve(a.transform.doc),l=(r?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,o),c=new ic(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(hc,{redo:r,historyState:c}).scrollIntoView())}}var uc=!1,dc=null;function pc(e){var t=e.plugins;if(dc!=t){uc=!1,dc=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){uc=!0;break}}return uc}function fc(e){return e.setMeta(mc,!0)}var hc=new Ot("history"),mc=new Ot("closeHistory");function vc(e){return e={depth:e&&e.depth||100,newGroupDelay:e&&e.newGroupDelay||500},new kt({key:hc,state:{init:function(){return new ic(rc.empty,rc.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(hc);if(i)return i.historyState;n.getMeta(mc)&&(e=new ic(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(hc))return a.getMeta(hc).redo?new ic(e.done.addTransform(n,null,r,pc(t)),e.undone,sc(n.mapping.maps[n.steps.length-1]),e.prevTime):new ic(e.done,e.undone.addTransform(n,null,r,pc(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new ic(e.done.rebased(n,o),e.undone.rebased(n,o),lc(e.prevRanges,n.mapping),e.prevTime):new ic(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),lc(e.prevRanges,n.mapping),e.prevTime);var s=0==e.prevTime||!a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;var n=!1;return e.mapping.maps[0].forEach((function(e,r){for(var o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=a?lc(e.prevRanges,n.mapping):sc(n.mapping.maps[n.steps.length-1]);return new ic(e.done.addTransform(n,s?t.selection.getBookmark():null,r,pc(t)),rc.empty,l,n.time)}(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput:function(e,t){var n="historyUndo"==t.inputType?gc(e.state,e.dispatch):"historyRedo"==t.inputType&&yc(e.state,e.dispatch);return n&&t.preventDefault(),n}}}})}function gc(e,t){var n=hc.getState(e);return!(!n||0==n.done.eventCount)&&(t&&cc(n,e,t,!1),!0)}function yc(e,t){var n=hc.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&cc(n,e,t,!0),!0)}function bc(e){var t=hc.getState(e);return t?t.done.eventCount:0}function kc(e){var t=hc.getState(e);return t?t.undone.eventCount:0}var wc=function(e,t){var n;this.match=e,this.handler="string"==typeof t?(n=t,function(e,t,r,o){var i=n;if(t[1]){var a=t[0].lastIndexOf(t[1]);i+=t[0].slice(a+t[1].length);var s=(r+=a)-o;s>0&&(i=t[0].slice(a-s,a)+i,r=o)}return e.tr.insertText(i,r,o)}):t};function Cc(e){var t=e.rules,n=new kt({state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(this);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:function(e,r,o,i){return Oc(e,r,o,i,t,n)},handleDOMEvents:{compositionend:function(e){setTimeout((function(){var r=e.state.selection.$cursor;r&&Oc(e,r.pos,r.pos,"",t,n)}))}}},isInputRules:!0});return n}function Oc(e,t,n,r,o,i){if(e.composing)return!1;var a=e.state,s=a.doc.resolve(t);if(s.parent.type.spec.code)return!1;for(var l=s.parent.textBetween(Math.max(0,s.parentOffset-500),s.parentOffset,null,"")+r,c=0;c<o.length;c++){var u=o[c].match.exec(l),d=u&&o[c].handler(a,u,t-(u[0].length-r.length),n);if(d)return e.dispatch(d.setMeta(i,{transform:d,from:t,to:n,text:r})),!0}return!1}function xc(e,t){for(var n=e.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){for(var a=e.tr,s=i.transform,l=s.steps.length-1;l>=0;l--)a.step(s.steps[l].invert(s.docs[l]));if(i.text){var c=a.doc.resolve(i.from).marks();a.replaceWith(i.from,i.to,e.schema.text(i.text,c))}else a.delete(i.from,i.to);t(a)}return!0}}return!1}var Sc=new wc(/--$/,"—"),Ec=new wc(/\.\.\.$/,"…"),Ic=new wc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),Nc=new wc(/"$/,"”"),Tc=new wc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),Mc=new wc(/'$/,"’"),Dc=[Ic,Nc,Tc,Mc];function Pc(e,t,n,r){return new wc(e,(function(e,o,i,a){var s=n instanceof Function?n(o):n,l=e.tr.delete(i,a),c=l.doc.resolve(i).blockRange(),u=c&&De(c,t,s);if(!u)return null;l.wrap(c,u);var d=l.doc.resolve(i-1).nodeBefore;return d&&d.type==t&&je(l.doc,i-1)&&(!r||r(o,d))&&l.join(i-1),l}))}function _c(e,t,n){return new wc(e,(function(e,r,o,i){var a=e.doc.resolve(o),s=n instanceof Function?n(r):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),t)?e.tr.delete(o,i).setBlockType(o,o,t,s):null}))}var jc={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},Rc={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},Ac={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},Fc={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},zc={mark:"sub"},Lc={mark:"sup"},Bc={mark:"link"},Vc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Hc=function(e,t){var n={},r=t&&t.applyToWord||!1;if(n["Mod-z"]=gc,n["Shift-Mod-z"]=yc,n.Backspace=Cr(xc,Gn,Xn,Yn),n.Enter=Cr(ir,lr,cr,dr),Vc||(n["Mod-y"]=yc),e.marks.strong&&(n["Mod-b"]=Yt(fn,Ft({},jc,{applyToWord:r}))),e.marks.em&&(n["Mod-i"]=Yt(fn,Ft({},Rc,{applyToWord:r}))),e.marks.u&&(n["Mod-u"]=Yt(fn,Ft({},Ac,{applyToWord:r}))),e.nodes.hard_break){var o=e.nodes.hard_break,i=Cr(sr,(function(e,t){return t(e.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}));n["Shift-Enter"]=i}return n},Kc=function(e){var t,n={};return e.nodes.list_item&&(n.Enter=(t=e.nodes.list_item,function(e,n){return Bn(t)(e,(function(t){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&t.ensureMarks(r),n(t)}))})),n},Wc=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,$c=function(e){return/^MsoListParagraph/.test(e.className)},qc=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},Uc=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},Gc=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},Xc=function(e,t){var n=[];Array.from(e).forEach((function(e){if(e.nodeType===Node.ELEMENT_NODE){var r=e;r.getAttribute("datalist")?(n.push(e),t.add(n)):$c(r)&&n.length?n.push(e):(n=[],"DIV"===r.nodeName?Xc(r.children,t):"TABLE"===r.nodeName&&Array.from(r.querySelectorAll("td,th")).forEach((function(e){Xc(e.children,t)})))}}))},Jc=function(e){var t,n=e.innerHTML,r=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(n)?{tag:"ul",style:(t=r(qc(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:Gc(r(qc(e)))}:void 0},Yc=function(e){var t,n=e.nodeName.toLowerCase();e.firstChild&&e.firstChild.nodeType===Node.COMMENT_NODE&&e.removeChild(e.firstChild),1===e.childNodes.length?t=e.firstChild.nodeType===Node.TEXT_NODE?qc(e):e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&e.removeChild(e.firstChild),t="p"!==n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),e.parentNode.removeChild(e);var r=document.createElement("li");return r.innerHTML=t,r},Zc=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(Wc,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return Xc(t.children,n),n.forEach((function(e){return function(e){var t,n,r,o,i,a,s,l,c,u,d,p,f,h=-1,m={};for(l=0;l<e.length;l++){var v=(f={datalist:(c=e[l]).getAttribute("datalist"),datalevel:c.getAttribute("datalevel")}).datalist,g=Jc(c);if(u=g&&g.tag){if(d=f.datalevel||parseFloat(c.style.marginLeft||0),f.datalevel||c.style.marginLeft){var y=u+v;m[d]||(m[d]={}),(!n||n<0)&&(n=d,r=v,o=(s=e.filter((function(e){return e.getAttribute("datalist")===String(r)})))[s.length-1],a=Uc(u,g&&g.style),c.parentNode.insertBefore(a,c),h=d,m[d][y]=a),i=o===c,p=m[d][y],(d>h||!p)&&(p=Uc(u,g&&g.style),m[d][y]=p,t.appendChild(p)),t=Yc(c),p.appendChild(t),i?n=h=-1:h=d}}else!t||i&&!$c(c)||(c.style.marginLeft&&(c.style.marginLeft=""),c.style.marginLeft&&(c.style.margin=""),t.appendChild(c))}}(e)})),t.innerHTML},Qc=function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/^[\s\S]+?<!--StartFragment-->\s*([\s\S]*?)\s*<!--EndFragment-->[\s\S]+$/,"$1")).replace(/<\/?[ovw]:[^>]*?>/gi,"")).replace(/<\\?\??xml[^>]*>/gi,"")).replace(/<(?:link|meta) [^>]+?>/gi,"")).replace(/<style[^>]*?>\s*<\/style>/gi,"")).replace(/<\/?st1:.*?>/gi,"")).replace(/<a name="[a-zA-Z0-9_]+">/gim,"")).replace(/v:shapes?="[^"]+"/gi,"")).replace(/<!\[if !supportLists\]>/gi,"")).replace(/<!\[endif\]>/gi,"")},eu=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},tu=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},nu=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},ru=function(e){/^Mso/.test(e.value)&&nu(e)},ou=/\s*;\s*/,iu=/\s*:\s*/,au=function(e){var t,n,r=e.value.split(ou).filter((function(e){return Boolean(e)})),o=e.ownerElement.style,i="";r.forEach((function(e){var r;r=e.split(iu),t=r[0],n=r[1],void 0!==o[t]&&(i+=t+": "+n+"; ")})),(i=i.trim())?e.value=i:nu(e)},su=function(e,t){var n=e;if(t.convertMsLists&&(n=Zc(n)),t.stripTags&&(n=tu(n,t.stripTags)),t.attributes){var r=document.createElement("div");r.innerHTML=n,Array.from(r.querySelectorAll("*")).forEach((function(e){return function(e,t){if(e.nodeType===Node.ELEMENT_NODE){for(var n=e.attributes.length-1;n>=0;n--){var r=e.attributes[n];t[r.name]?t[r.name](r):t["*"]&&t["*"](r)}"SPAN"===e.nodeName&&0===e.attributes.length&&function(e){var t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}(e)}}(e,t.attributes)})),n=r.innerHTML}return n};function lu(e){for(var t=e.length,n=new Array(t/2),r=0;r<t;r+=2)n[r]=String.fromCharCode(parseInt(e.substring(r,r+2),16));return btoa(n.join(""))}var cu=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,uu=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,du=new RegExp("(?:("+uu.source+"))([\\da-fA-F\\s]+)\\}","g"),pu=/[^\da-fA-F]/g,fu=/file:\/[^'"]+\.(jpg|png|gif)/i,hu=/\\(png|jpeg)blip\\/,mu=function(e,t){var n=e.match(cu);if(!n||-1===t.types.indexOf("text/rtf"))return e;var r=t.getData("text/rtf"),o=[],i=r.match(du);if(!r||!i)return e;for(var a=0,s=i;a<s.length;a++){var l=s[a],c=hu.exec(l);if(c){var u=l.replace(uu,"").replace(pu,"");o.push("data:image/"+c[1]+";base64,"+lu(u))}}return n.length!==o.length?e:e.replace(cu,(function(e){var t=o.shift()||"";return e.replace(fu,t)}))},vu=function(e,t,n,r,o){var i,a,s,l,c,u,d=[],p=[],f=t.matchCase,h=t.matchWord,m=t.useRegExp,v=t.text;if(m&&(/^\\$/.test(v)||/[^\\]\\$/.test(v))&&(v=v.substring(0,v.length-1)),!v)return d;var g=f?"g":"gi",y=m?new RegExp(v,g):Ou(v,g);return e.nodesBetween(n,r,(function(t,f,m){if(o(d))return!1;t.inlineContent&&f+t.content.size>=n&&(p.length=0,t.nodesBetween(0,t.content.size,(function(t,m,v,g){if(o(d))return!1;var b=1+f+m;if(t.isText&&b+t.nodeSize>=n){if(c=t.text||"",u=v.childCount-1>=g+1&&v.child(g+1),p.push(n<=b?{text:c,start:b}:{text:c.slice(n-b),start:n}),u&&u.isText)return;for(a=p.map((function(e){return e.text})).join(""),i=y.exec(a);null!==i&&(s=p[0].start+i.index,l=s+i[0].length,n<=s&&r>=l&&Cu(i,h)&&d.push(ot.create(e,s,l)),!o(d));)i=y.exec(a)}else p.length=0})))})),d},gu=function(e,t){var n=t.backward,r=t.matchCyclic,o=zt(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return e.length>0},a=e.doc,s=e.selection,l=[];return n?!(l=vu(a,o,0,s.from,i)).length&&r&&(l=vu(a,o,s.from,a.content.size,i)):!(l=vu(a,o,s.to,a.content.size,i)).length&&r&&(l=vu(a,o,0,s.to,i)),l.length?l[l.length-1]:null},yu=function(e,t){return vu(e,t,0,e.content.size,(function(){return!1}))},bu=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(ot.create(n.doc,r,r+t.length)),n},ku=function(e,t,n){var r=yu(e.doc,n);if(0===r.length)return null;for(var o=e.tr,i=r.length-1;i>=0;i--)o.insertText(t,r[i].from,r[i].to);return o},wu=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,Cu=function(e,t){if(t){if(!0===t){var n=e.input,r=n.charAt(e.index-1),o=n.charAt(e.index+e[0].length);return wu.test(r)&&wu.test(o)}return t(e)}return!0},Ou=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)};function xu(e){var t={class:"k-placeholder","data-placeholder":e};return new kt({key:new Ot("placeholder"),props:{decorations:function(e){var n=e.doc,r=n.content.firstChild;if(!(0===n.childCount||1===n.childCount&&r.inlineContent&&0===r.childCount))return Va.empty;var o=[];return n.descendants((function(e,n){o.push(Fa.node(n,n+e.nodeSize,t))})),Va.create(n,o)}}})}var Su=/\s+/g,Eu=/text-align/,Iu=function(){return new kt({key:new Ot("spaces-fix"),props:{decorations:function(e){var t,n,r,o,i=[],a=e.doc;return a.nodesBetween(0,a.content.size,(function(e,a,s){if(e.type.isText&&function(e){return Eu.test(e&&e.attrs&&e.attrs.style||"")}(s))for(n=Su.exec(e.text||"");null!==n;){if(t=a+n.index,r=n[0].length,n.index+r<n.input.length)for(o=0;o<=r-1;o+=2)i.push(Fa.inline(t+o,t+o+1,{style:"white-space: normal"}));n=Su.exec(e.text||"")}})),Va.create(a,i)}}})},Nu=new Ot("highlight");function Tu(e){return void 0===e&&(e=Nu),new kt({key:e,state:{init:function(){return null},apply:function(e){return e.getMeta(this.spec.key)}},props:{decorations:function(e){var t=(this.spec.key.getState(e)||[]).map((function(e){return Fa.inline(e.from,e.to,e.attrs)}));return Va.create(e.doc,t)}}})}var Mu={southeast:{x:1,y:1},east:{x:1,y:0},south:{x:0,y:1},north:{x:0,y:-1},west:{x:-1,y:0},southwest:{x:-1,y:1},northwest:{x:-1,y:-1},northeast:{x:1,y:-1}},Du=Object.keys(Mu),Pu=new Ot("image-resize"),_u=function(e,t,n){e.style[t]=n+"px"},ju=/[^\-]width:|[^\-]height:/,Ru=/^.+$/,Au=function(){function e(e,t,n,r){this.activeHandle=e,this.dragging=t,this.rect=n,this.nodePosition=r}return e.prototype.apply=function(t){var n=t.getMeta(Pu);return n?new e(n.activeHandle,n.setDragging,n.rect,n.nodePosition):this},e}(),Fu=function(e,t,n){var r=t.target.getAttribute("data-dir-image-resize");if(!r)return!1;var o=Pu.getState(e.state);t.preventDefault();var i=e.state.tr;function a(t){!function(e,t,n){var r=Pu.getState(e.state),o=r.rect,i=r.dragging,a=r.nodePosition,s=r.activeHandle;if(i&&o){var l=e.nodeDOM(a),c=Mu[s],u=(t.clientX-i.startX)*c.x,d=(t.clientY-i.startY)*c.y,p=c.x?u+l.width:o.width,f=c.y?d+l.height:o.height;if(n.lockRatio&&c.x&&c.y){var h=Math.min(p/l.width,f/l.height),m=l.width*h,v=l.height*h;i.startX=t.clientX-(p-m)*c.x,i.startY=t.clientY-(f-v)*c.y,p=m,f=v}else i.startX=c.x?t.clientX:i.startX,i.startY=c.y?t.clientY:i.startY;_u(l,"width",p),_u(l,"height",f),o.top=l.offsetTop,o.left=l.offsetLeft,o.width=l.offsetWidth,o.height=l.offsetHeight;var g=l.nextElementSibling;g.style.width=o.width+"px",g.style.height=o.height+"px",g.style.top=o.top+"px",g.style.left=o.left+"px"}}(e,t,n)}return i.setMeta(Pu,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:r,rect:o.rect,nodePosition:o.nodePosition}),i.setMeta("addToHistory",!1),e.dispatch(i),t.view.addEventListener("mouseup",(function t(n){n.view.removeEventListener("mouseup",t),n.view.removeEventListener("mousemove",a),function(e){var t=Pu.getState(e.state),n=t.rect,r=t.dragging,o=t.nodePosition;if(r&&n){var i=e.state.selection;if(i instanceof at){var a=i.node.attrs,s=n.width,l=n.height,c=void 0;if(ju.test(a.style||"")){var u=Lt(a.style,{style:"width",value:Ru,newValue:s+"px"}),d=Lt(u.style||"",{style:"height",value:Ru,newValue:l+"px"}).style;c=Ft({},a,{style:d})}else c=Ft({},a,{width:s,height:l});var p=i.node.type.createAndFill(c);if(p){var f=e.state.tr;f.replaceWith(o,o+1,p),f.setSelection(at.create(f.doc,o)),f.setMeta("commandName","image-resize"),f.setMeta("args",c),f.setMeta(Pu,{setDragging:null,activeHandle:null,rect:n,nodePosition:o}),e.dispatch(f)}}}}(e)})),t.view.addEventListener("mousemove",a),!0},zu=function(e){return void 0===e&&(e={node:"image",lockRatio:!0}),new kt({key:Pu,view:function(t){return{resize:function(){Pu.getState(t.state).rect&&t.dispatch(t.state.tr.setMeta("resize",!0))},get window(){return t.dom.ownerDocument&&t.dom.ownerDocument.defaultView},attachResize:function(){var e=this.window;e&&(e.removeEventListener("resize",this.resize),e.addEventListener("resize",this.resize))},removeResize:function(){var e=this.window;e&&e.removeEventListener("resize",this.resize)},update:function(t,n){var r=t.state,o=r.selection,i=r.schema.nodes[e.node],a=Pu.getState(r),s=a.rect;if(o instanceof at&&i===o.node.type){var l=t.nodeDOM(o.from),c={top:l.offsetTop,left:l.offsetLeft,width:l.offsetWidth,height:l.offsetHeight};if(!n.selection.eq(o)||s&&(s.width!==c.width||s.height!==c.height||s.top!==c.top||s.left!==c.left)){var u=r.tr;u.setMeta(Pu,{rect:c,nodePosition:o.from}),t.dispatch(u),this.attachResize()}}else s&&(a.rect=null,a.nodePosition=-1)},destroy:function(){this.removeResize()}}},state:{init:function(){return new Au("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(t,n){return Fu(t,n,e)}},decorations:function(t){var n=t.selection,r=t.schema.nodes[e.node],o=Pu.getState(t).rect;if(o&&n instanceof at&&r===n.node.type){var i=document.createElement("div");i.className="k-editor-resize-handles-wrapper",i.style.width=o.width+"px",i.style.height=o.height+"px",i.style.top=o.top+"px",i.style.left=o.left+"px";for(var a=0;a<Du.length;a++){var s=document.createElement("div");s.className="k-editor-resize-handle "+Du[a],s.setAttribute("data-dir-image-resize",Du[a]),i.appendChild(s)}return Va.create(t.doc,[Fa.widget(t.selection.from+1,i)])}return Va.empty}}})},Lu=new Ot("caret-color");function Bu(){return new kt({key:Lu,props:{decorations:function(e){var t=e.doc,n=e.selection,r=e.storedMarks;if(!n.empty||!r)return Va.empty;var o=on((r||[]).find((function(e){return"style"===e.type.name})),{name:"color",value:/^.+$/});if(!o)return Va.empty;var i=n.$anchor.parent,a=[];return t.descendants((function(e,t){e.eq(i)&&a.push(Fa.node(t,t+e.nodeSize,{style:"caret-color: "+o}))})),Va.create(t,a)}}})}var Vu=function(){function e(e,t){this.node=e,this.view=t,this.dom=document.createElement("div"),this.dom.className="k-editor-resize-wrap-element",this.table=this.dom.appendChild(document.createElement("table")),e.attrs[St]&&this.renderColgroup(e.attrs[St]);var n=this.table.appendChild(document.createElement("tbody"));this.setAttributes(this.table,e.attrs),this.resizeHandles=Du.map((function(e){var t=document.createElement("span");return t.className="k-editor-resize-handle "+e,t.setAttribute("data-dir-table-resize",e),t})),this.contentDOM=n}return e.prototype.update=function(e){var t=this;if(e.type!==this.node.type)return!1;var n=this.node;return this.node=e,e.attrs[Et]?this.resizeHandles.forEach((function(e){t.dom.appendChild(e)})):Array.from(this.dom.children).filter((function(e){return e.classList.contains("k-editor-resize-handle")})).forEach((function(e){return e.remove()})),this.setAttributes(this.table,e.attrs),n.attrs[St]!==e.attrs[St]&&this.renderColgroup(e.attrs[St]),!0},e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&(e.target===this.table||e.target.firstChild===this.table||this.colgroup&&this.colgroup.contains(e.target))},e.prototype.destroy=function(){this.node=void 0,this.view=void 0,this.table=void 0,this.colgroup=void 0,this.resizeHandles=void 0},e.prototype.renderColgroup=function(e){this.table&&this.table.firstChild&&"COLGROUP"===this.table.firstChild.nodeName&&this.table.removeChild(this.table.firstChild),e&&(this.colgroup=Jl(e),this.table.insertBefore(this.colgroup,this.table.firstChild))},e.prototype.setAttributes=function(e,t){var n=[St,Et];for(var r in t)if(r&&-1===n.indexOf(r)){var o=e.getAttribute(r),i=t[r];i&&i!==o?e.setAttribute(r,i):i||e.removeAttribute(r)}},e}(),Hu=/^.+$/,Ku=function(e){return(e||"").split(/\s*;\s*/).filter(Boolean).map((function(e){var t,n=e.split(/\s*:\s*/);return(t={})[n[0]]=n[1],t})).reduce((function(e,t){return Ft({},e,t)}),{})};function Wu(e,t,n){var r;if(new RegExp("[^-]?"+t+":").test(e.style||"")){var o=Lt(e.style||"",{style:t,value:Hu,newValue:n}).style;r=Ft({},e,{style:o})}else r=e.style?Ft({},e,{style:e.style.replace(/;$/,"")+"; "+t+": "+n+";"}):Ft({},e,{style:t+": "+n+";"});return r}var $u=new Ot("table-resize"),qu=new Ot("table-column-resizing"),Uu=new Ot("table-row-resizing");function Gu(e,t){var n=!1;return n=(n=(n=n||e!==$u&&Boolean($u.get(t))&&$u.getState(t).dragging)||e!==qu&&Boolean(qu.get(t))&&qu.getState(t).dragging)||e!==Uu&&Boolean(Uu.get(t))&&Uu.getState(t).dragging}function Xu(e,t){var n=!1;return n=(n=n||e!==qu&&Boolean(qu.get(t))&&qu.getState(t).activeHandle>-1)||e!==Uu&&Boolean(Uu.get(t))&&Uu.getState(t).activeHandle>-1}function Ju(e){return e&&e.firstChild&&"TABLE"===e.firstChild.nodeName?e.firstChild:e}function Yu(e){for(;e&&"TD"!==e.nodeName&&"TH"!==e.nodeName;)e=e.classList.contains("ProseMirror")?null:e.parentNode;return e}function Zu(e,t){for(var n=e.depth;n>0;n--){var r=e.node(n);if(t(r))return{node:r,depth:n}}return null}function Qu(){var e=Vu;return new kt({key:qu,state:{init:function(t,n){return this.spec.props.nodeViews[gs(n.schema).table.name]=function(t,n){return new e(t,n)},new ed(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Xu(qu,e)?null:qu.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,t){return Gu(qu,e.state)||function(e,t,n){var r=qu.getState(e.state);if(!r.dragging){var o=Yu(t.target),i=-1;if(o){var a=function(e){var t=e.parentNode;return{cellIndex:e.cellIndex,rowIndex:t.rowIndex}}(o),s=o.getBoundingClientRect(),l=s.left,c=s.right;Math.abs(t.clientX-l)<=n&&a.cellIndex>0?(a.cellIndex--,i=td(e,t,a)):c-t.clientX>0&&c-t.clientX<=n&&(i=td(e,t,a))}i!==r.activeHandle&&rd(e,i)}}(e,t,5),!1},mouseleave:function(e){return function(e){var t=qu.getState(e.state);t.activeHandle>-1&&!t.dragging&&rd(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t,n){var r,o=qu.getState(e.state);if(-1===o.activeHandle||o.dragging)return!1;for(var i=e.state.doc.resolve(o.activeHandle),a=i.parent,s=i.index(),l=0,c=0;c<=s;c++)l+=a.child(c).attrs.colspan;var u,d,p=i.node(i.depth-1),f=e.domAtPos(o.activeHandle),h=f.node.childNodes[f.offset].closest("table");if(p.attrs[St]){var m=h.firstChild;(u=m.children[l-1]).style.width||(u.style.width=u.offsetWidth+"px")}else{var v=0;for(c=0;c<a.childCount;c++)v+=a.child(c).attrs.colspan;m=document.createElement("colgroup");var g=new Array(v);for(c=0;c<v;c++)g[c]=document.createElement("col"),m.appendChild(g[c]);h.insertBefore(m,h.firstChild),(u=g[s]).style.width=u.offsetWidth+"px",d=Ft({},p.attrs,((r={})[St]="<colgroup>"+g.reduce((function(e,t){return e+t.outerHTML}),"")+"</colgroup>",r))}var y=parseFloat(u.style.width),b=e.state.tr.setMeta(qu,{setDragging:{startX:t.clientX,startWidth:y}});if(!h.style.width){var k=Array.from(u.parentNode.children).map((function(e){return e.style.width}));if(k.every(Boolean)){var w=k.reduce((function(e,t){return e+parseFloat(t)}),0);d=Wu(d||p.attrs,"width",w+"px")}}if(d){var C=i.posAtIndex(0,i.depth-1)-1;b.setNodeMarkup(C,null,d)}function O(t){t.view.removeEventListener("mouseup",O),t.view.removeEventListener("mousemove",x);var r=qu.getState(e.state);if(r.dragging){var o=e.state.tr;!function(e,t,n,r){var o,i=e.state.doc.resolve(n),a=i.node(-1),s=i.start(-1),l=i.posAtIndex(0,i.depth-1)-1,c=e.nodeDOM(s).closest("table"),u=a.attrs;if(a&&u[St]){var d=c.firstChild;u=Ft({},u,((o={})[St]=d.outerHTML,o))}var p=c.style.width;c&&p&&Ku(u.style).width!==p&&(u=Wu(u,"width",p),t.setNodeMarkup(l,null,u))}(e,o,r.activeHandle,nd(r.dragging,t,n)),e.dispatch(o.setMeta(qu,{setDragging:null}))}}function x(t){if(!t.which)return O(t);var r=qu.getState(e.state),o=nd(r.dragging,t,n);!function(e,t,n,r){var o=e.state.doc.resolve(t),i=o.node(-1),a=o.start(-1),s=ps.get(i).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1,l=e.domAtPos(o.start(-1)).node;"TABLE"!==l.nodeName&&(l=l.closest("table"));var c=l,u=c.firstChild,d=Array.from(u.children);if(d[s].style.width=n+"px",c.style.width){var p=d.map((function(e){return e.style.width}));if(p.every(Boolean)){var f=p.reduce((function(e,t){return e+parseFloat(t)}),0);c.style.width=f+"px"}}}(e,r.activeHandle,o)}return e.dispatch(b),t.view.addEventListener("mouseup",O),t.view.addEventListener("mousemove",x),t.preventDefault(),!0}(e,t,25)}},decorations:function(e){if(!Gu(qu,e)){var t=qu.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=ps.get(o),a=r.start(-1),s=i.colCount(r.pos-a)+r.nodeAfter.attrs.colspan,l=0;l<i.height;l++){var c=s+l*i.width-1;if(!(s!==i.width&&i.map[c]===i.map[c+1]||0!==l&&i.map[c-1]===i.map[c-1-i.width])){var u=i.map[c],d=a+u+o.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",n.push(Fa.widget(d,p))}}return Va.create(e.doc,n)}(e,t.activeHandle)}return Va.empty},nodeViews:{}}})}var ed=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(qu);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1&&t.docChanged){var i=t.mapping.map(r.activeHandle,-1);n=t.doc.resolve(i),Boolean("row"===n.parent.type.spec.tableRole&&n.nodeAfter)||(i=-1),r=new e(i,r.dragging)}return r},e}();function td(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=Zu(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ps.get(s);return a+l.map[l.width*n.rowIndex+n.cellIndex]}function nd(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function rd(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(qu,{setHandle:t}),e.dispatch(n)}var od={southeast:!0,southwest:!0,northwest:!0,northeast:!0},id=Ft({east:!0,west:!0},od),ad=Ft({south:!0,north:!0},od),sd=function(){function e(e,t,n){this.activeHandle=e,this.dragging=t,this.nodePosition=n}return e.prototype.apply=function(t){var n=t.getMeta($u);return n?new e(n.activeHandle,n.setDragging,n.nodePosition):this},e}(),ld=function(e){var t=Array.from(e.firstChild.children).map((function(e){return e.offsetWidth})),n=Array.from(e.rows).map((function(e){return e.offsetHeight})),r=t.reduce((function(e,t){return e+t}),0),o=n.reduce((function(e,t){return e+t}),0),i=e.offsetHeight;return{width:r,height:o,colsWidth:t,rowsHeight:n,offsetWidth:e.offsetWidth,offsetHeight:i}},cd=function(e){var t=$u.getState(e.state),n=t.dragging,r=t.nodePosition,o=t.activeHandle;if(n){var i=e.state.doc.nodeAt(r),a=Ju(e.nodeDOM(r)),s=ld(a);if(i){var l=s.offsetWidth+"px",c=s.offsetHeight+"px",u=e.state.tr,d=i.attrs,p=Ku(d.style);id[o]&&a.style.width&&p.width!==l&&(d=Wu(d,"width",l)),ad[o]&&a.style.height&&p.height!==c&&(d=Wu(d,"height",c)),d=function(e,t,n,r){var o=e.state.doc.nodeAt(n),i=Ju(e.nodeDOM(n)),a=(i.ownerDocument&&i.ownerDocument.defaultView||window).getComputedStyle,s=Array.from(i.rows);o.forEach((function(e,r,o){var i=Ku(e.attrs.style).height;i&&!/px$/.test(i)&&t.setNodeMarkup(n+r+1,null,Wu(e.attrs,"height",a(s[o]).height))}));var l=i.firstChild,c=Array.from(l&&l.children||[]),u=!1;c.forEach((function(e,t){e.style.width&&!/px$/.test(e.style.width)&&(e.style.width=a(c[t]).width,u=!0)}));var d=Ft({},r);return u&&(d[St]=l.outerHTML),d}(e,u,r,d),u.setNodeMarkup(r,null,d),u.setMeta("commandName","node-resize"),u.setMeta("args",d),u.setMeta($u,{setDragging:null,activeHandle:null,nodePosition:r}),e.dispatch(u)}}},ud=function(e,t){var n=t.target.getAttribute("data-dir-table-resize");if(!n)return!1;var r=$u.getState(e.state);t.preventDefault();var o=e.state.tr;o.setMeta($u,{setDragging:{startX:t.clientX,startY:t.clientY},activeHandle:n,nodePosition:r.nodePosition}),o.setMeta("addToHistory",!1),function(e,t,n){var r=e.state.doc.nodeAt(n),o=Ju(e.nodeDOM(n)),i=ld(o),a=i.width,s=i.height,l=i.colsWidth,c=i.rowsHeight,u=i.offsetWidth,d=i.offsetHeight,p=o.firstChild,f=Array.from(p&&p.children||[]),h=!1;f.forEach((function(e,t){e.style.width&&!/%$/.test(e.style.width)&&(e.style.width=100*l[t]/a+"%",h=!0)}));var m=!1;r.forEach((function(e,r,o){var i=Ku(e.attrs.style).height;i&&!/%$/.test(i)&&(t.setNodeMarkup(n+r+1,null,Wu(e.attrs,"height",100*c[o]/s+"%")),m=!0)}));var v=r.attrs;Ku(v.style).width!==u+"px"&&(v=Wu(v,"width",u+"px")),h&&(v[St]=p.outerHTML),m&&(v=Wu(v,"height",d+"px")),(h||m)&&t.setNodeMarkup(n,null,v)}(e,o,r.nodePosition),e.dispatch(o);var i=t.view||window;function a(t){!function(e,t){var n=$u.getState(e.state),r=n.dragging,o=n.nodePosition,i=n.activeHandle;if(!(o<0)&&r){var a=Ju(e.nodeDOM(o)),s=a.getBoundingClientRect(),l=Mu[i],c=(t.clientX-r.startX)*l.x,u=(t.clientY-r.startY)*l.y,d=(a.ownerDocument&&a.ownerDocument.defaultView||window).getComputedStyle(a),p=/px/.test(d.width)?parseFloat(d.width):a.offsetWidth,f=/px/.test(d.height)?parseFloat(d.height):a.offsetHeight,h=l.x?c+p:s.width,m=l.y?u+f:s.height;r.startX=l.x?t.clientX:r.startX,r.startY=l.y?t.clientY:r.startY,id[i]&&(a.style.width=h+"px"),ad[i]&&(a.style.height=m+"px")}}(e,t)}return i.addEventListener("mouseup",(function t(n){i.removeEventListener("mouseup",t),i.removeEventListener("mousemove",a),cd(e)})),i.addEventListener("mousemove",a),!0},dd=function(){function e(){}return e.prototype.ignoreMutation=function(e){return"attributes"===e.type&&"style"===e.attributeName&&"TR"===e.target.nodeName},e}();function pd(){return new kt({key:Uu,state:{init:function(e,t){return this.spec.props.nodeViews[gs(t.schema).row.name]=function(e,t){return new dd},new fd(-1,null)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return Xu(Uu,e)?null:Uu.getState(e).activeHandle>-1?{class:"resize-cursor-vertical"}:null},handleDOMEvents:{mousemove:function(e,t){return Gu(Uu,e.state)||function(e,t,n){var r=Uu.getState(e.state);if(!r.dragging){var o=Yu(t.target),i=-1;if(o){var a=o.parentNode,s=a.getBoundingClientRect();Math.abs(t.clientY-s.top)<=n&&a.rowIndex>0?i=hd(e,t,a.rowIndex-1):s.bottom-t.clientY>0&&s.bottom-t.clientY<=n&&(i=hd(e,t,a.rowIndex))}i!==r.activeHandle&&md(e,i)}}(e,t,5),!1},mouseleave:function(e){return function(e){var t=Uu.getState(e.state);t.activeHandle>-1&&!t.dragging&&md(e,-1)}(e),!1},mousedown:function(e,t){return function(e,t){var n=Uu.getState(e.state);if(-1===n.activeHandle||n.dragging)return!1;var r=e.state.doc,o=r.resolve(n.activeHandle),i=r.nodeAt(n.activeHandle),a=o.parent,s=Ku(i.attrs.style).height,l=Ku(a.attrs.style).height,c=s?parseFloat(s):0;if(!s){var u=e.nodeDOM(n.activeHandle);c=u.offsetHeight}function d(t){t.view.removeEventListener("mouseup",d),t.view.removeEventListener("mousemove",p);var n=Uu.getState(e.state);if(n.dragging){var r=e.state.tr.setMeta(Uu,{setDragging:null});!function(e,t,n){var r=e.state.doc,o=r.nodeAt(n),i=e.nodeDOM(n),a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height,t.setNodeMarkup(n,null,Wu(o.attrs,"height",i.style.height));var s=i&&i.closest("table"),l=s&&s.style.height;if(l){var c=r.resolve(n),u=c.start(c.depth)-1;t.setNodeMarkup(u,null,Wu(c.parent.attrs,"height",l))}}(e,r,n.activeHandle),e.dispatch(r)}}function p(t){if(!t.which)return d(t);var n=Uu.getState(e.state),r=function(e,t){var n=t.clientY-e.startY;return e.startHeight.rowHeight+n}(n.dragging,t),o=t.clientY-n.dragging.startY;!function(e,t,n,r,o){var i=e.nodeDOM(t);if(i){i.style.height=n+"px";var a=i.ownerDocument&&i.ownerDocument.defaultView||window;i.style.height=a.getComputedStyle(i).height;var s=i.closest("table"),l=parseFloat(o)+r+"px",c=s&&s.style.height;c&&c!==l&&(s.style.height=parseFloat(o)+r+"px",s.style.height=a.getComputedStyle(s).height)}}(e,n.activeHandle,r,o,l)}return e.dispatch(e.state.tr.setMeta(Uu,{setDragging:{startY:t.clientY,startHeight:{rowHeight:c,tableHeight:l}}})),t.view.addEventListener("mouseup",d),t.view.addEventListener("mousemove",p),t.preventDefault(),!0}(e,t)}},decorations:function(e){if(Gu(Uu,e))return Va.empty;var t=Uu.getState(e);return t.activeHandle>-1?function(e,t){var n=[];if("number"!=typeof t)return Va.empty;for(var r=e.doc.resolve(t),o=r.parent,i=ps.get(o),a=r.index(r.depth),s=r.start(r.depth),l=0;l<i.width;l++){var c=l+a*i.width,u=i.map[c],d=o.nodeAt(u),p=s+u+(d?d.nodeSize:0)-1,f=document.createElement("div");f.className="row-resize-handle",n.push(Fa.widget(p,f))}return Va.create(e.doc,n)}(e,t.activeHandle):void 0},nodeViews:{}}})}var fd=function(){function e(e,t){this.activeHandle=e,this.dragging=t}return e.prototype.apply=function(t){var n,r=this,o=t.getMeta(Uu);if(o&&null!=o.setHandle)return new e(o.setHandle,null);if(o&&void 0!==o.setDragging)return new e(r.activeHandle,o.setDragging);if(r.activeHandle>-1){var i=t.mapping.map(r.activeHandle,-1);"row"===(n=t.doc.resolve(i)).parent.type.spec.tableRole&&n.nodeAfter||(i=null),r=new e(i,r.dragging)}return r},e}();function hd(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=e.state.doc.resolve(r.pos),i=Zu(o,(function(e){return"table"===e.type.spec.tableRole}));if(null===i)return-1;var a=o.start(i.depth),s=i.node,l=ps.get(s);return a+l.map[l.width*n]-1}function md(e,t){var n=e.state.tr;n.setMeta("addToHistory",!1),n.setMeta(Uu,{setHandle:t}),e.dispatch(n)}var vd=function(){return[(void 0===e&&(e={node:"table"}),new kt({key:$u,view:function(t){return{selectedNode:function(e,t){var n=e.selection;if(n instanceof at&&t===n.node.type&&n instanceof at)return{node:n.node,pos:n.from};var r=Zu(n.$from,(function(e){return e.type===t})),o=r&&r.node;if(o){var i=new Array(n.$from.depth+1).fill(0).findIndex((function(e,t){return"table"===n.$from.node(t).type.spec.tableRole}));return{node:o,pos:n.$from.start(i)-1}}return null},update:function(t,n){var r,o,i,a,s,l=t.state,c=l.schema.nodes[e.node],u=this.selectedNode(l,c),d=this.selectedNode(n,c);if((u||!d||n.doc.eq(t.state.doc))&&(u||d)){var p=l.tr;p.setMeta("addToHistory",!1),u&&d&&u.pos!==d.pos?(p.setMeta($u,{nodePosition:u.pos}),p.setNodeMarkup(d.pos,c,Ft({},d.node.attrs,((r={})[Et]=!1,r))),p.setNodeMarkup(u.pos,c,Ft({},u.node.attrs,((o={})[Et]=!0,o))),t.dispatch(p)):u&&d&&u.pos===d.pos&&!u.node.attrs[Et]&&!l.selection.eq(n.selection)?(p.setMeta($u,{nodePosition:u.pos}),t.dispatch(p.setNodeMarkup(u.pos,c,Ft({},u.node.attrs,((i={})[Et]=!0,i))))):u&&!d?(p.setMeta($u,{nodePosition:u.pos}),t.dispatch(p.setNodeMarkup(u.pos,c,Ft({},u.node.attrs,((a={})[Et]=!0,a))))):!u&&d&&(p.setMeta($u,{nodePosition:-1}),t.dispatch(p.setNodeMarkup(d.pos,c,Ft({},d.node.attrs,((s={})[Et]=!1,s)))))}}}},state:{init:function(){return new sd("",null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(e,t){return ud(e,t)}}}})),Qu(),pd()];var e};function gd(e){return void 0===e&&(e={}),new kt({view:function(t){return new yd(t,e)}})}var yd=function(e,t){var n=this;this.editorView=e,this.width=t.width||1,this.color=t.color||"black",this.class=t.class,this.cursorPos=null,this.element=null,this.timeout=null,this.handlers=["dragover","dragend","drop","dragleave"].map((function(t){var r=function(e){return n[t](e)};return e.dom.addEventListener(t,r),{name:t,handler:r}}))};yd.prototype.destroy=function(){var e=this;this.handlers.forEach((function(t){var n=t.name,r=t.handler;return e.editorView.dom.removeEventListener(n,r)}))},yd.prototype.update=function(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())},yd.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},yd.prototype.updateOverlay=function(){var e,t=this.editorView.state.doc.resolve(this.cursorPos);if(!t.parent.inlineContent){var n=t.nodeBefore,r=t.nodeAfter;if(n||r){var o=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0)).getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}if(!e){var a=this.editorView.coordsAtPos(this.cursorPos);e={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}var s,l,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none; background-color: "+this.color),!c||c==document.body&&"static"==getComputedStyle(c).position)s=-pageXOffset,l=-pageYOffset;else{var u=c.getBoundingClientRect();s=u.left-c.scrollLeft,l=u.top-c.scrollTop}this.element.style.left=e.left-s+"px",this.element.style.top=e.top-l+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"},yd.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)},yd.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t):r;if(t&&!o){var i=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(i=ze(this.editorView.state.doc,i,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(i),this.scheduleRemoval(5e3)}}},yd.prototype.dragend=function(){this.scheduleRemoval(20)},yd.prototype.drop=function(){this.scheduleRemoval(20)},yd.prototype.dragleave=function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)};var bd=function(e){function t(t){e.call(this,t,t)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));return t.valid(o)?new t(o):e.near(o)},t.prototype.content=function(){return p.empty},t.prototype.eq=function(e){return e instanceof t&&e.head==this.head},t.prototype.toJSON=function(){return{type:"gapcursor",pos:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new t(e.resolve(n.pos))},t.prototype.getBookmark=function(){return new kd(this.anchor)},t.valid=function(e){var t=e.parent;if(t.isTextblock||!function(e){for(var t=e.depth;t>=0;t--){var n=e.index(t),r=e.node(t);if(0!=n)for(var o=r.child(n-1);;o=o.lastChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(var t=e.depth;t>=0;t--){var n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(var o=r.child(n);;o=o.firstChild){if(0==o.childCount&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;var n=t.type.spec.allowGapCursor;if(null!=n)return n;var r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock},t.findFrom=function(e,n,r){e:for(;;){if(!r&&t.valid(e))return e;for(var o=e.pos,i=null,a=e.depth;;a--){var s=e.node(a);if(n>0?e.indexAfter(a)<s.childCount:e.index(a)>0){i=s.child(n>0?e.indexAfter(a):e.index(a)-1);break}if(0==a)return null;o+=n;var l=e.doc.resolve(o);if(t.valid(l))return l}for(;;){var c=n>0?i.firstChild:i.lastChild;if(!c){if(i.isAtom&&!i.isText&&!at.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=c,o+=n;var u=e.doc.resolve(o);if(t.valid(u))return u}return null}},t}(tt);bd.prototype.visible=!1,tt.jsonID("gapcursor",bd);var kd=function(e){this.pos=e};kd.prototype.map=function(e){return new kd(e.map(this.pos))},kd.prototype.resolve=function(e){var t=e.resolve(this.pos);return bd.valid(t)?new bd(t):tt.near(t)};var wd=function(){return new kt({props:{decorations:Ed,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&bd.valid(n))return new bd(n)},handleClick:xd,handleKeyDown:Cd,handleDOMEvents:{beforeinput:Sd}}})},Cd=ho({ArrowLeft:Od("horiz",-1),ArrowRight:Od("horiz",1),ArrowUp:Od("vert",-1),ArrowDown:Od("vert",1)});function Od(e,t){var n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){var i=e.selection,a=t>0?i.$to:i.$from,s=i.empty;if(i instanceof ot){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}var l=bd.findFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new bd(l))),!0)}}function xd(e,t,n){if(!e.editable)return!1;var r=e.state.doc.resolve(t);if(!bd.valid(r))return!1;var o=e.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(o>-1&&at.isSelectable(e.state.doc.nodeAt(o)))&&(e.dispatch(e.state.tr.setSelection(new bd(r))),!0)}function Sd(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof bd))return!1;var n=e.state.selection.$from,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;for(var o=i.empty,a=r.length-1;a>=0;a--)o=i.from(r[a].createAndFill(null,o));var s=e.state.tr.replace(n.pos,n.pos,new p(o,0,0));return s.setSelection(ot.near(s.doc.resolve(n.pos+1))),e.dispatch(s),!1}function Ed(e){if(!(e.selection instanceof bd))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",Va.create(e.doc,[Fa.widget(e.selection.head,t,{key:"gapcursor"})])}var Id=function(e,t,n){for(var r,o=e.table,i=e.table_row,a=e.table_cell,s=[],l=0;l<t+1;l++){r=[];for(var c=0;c<n+1;c++)r.push(a.createAndFill());s.push(i.createAndFill(void 0,r))}return o.createAndFill(void 0,s)},Nd=function(e,t){for(var n=e.$head,r=n.depth;r>0;r--){var o=n.node(r);if(o.type.name===t)return{pos:n.before(r),node:o}}return null},Td=function(e,t){return sl(e,t&&function(e){var n,r=Nd(e.selection,"table_row"),o=Nd(e.selection,"table");if(r&&o&&r.node.attrs[xt]){for(var i=0,a=0;a<o.node.nodeSize;a++)if(o.node.child(a).eq(r.node)){i=a;break}var s=o.node.child(i-1),l=r.pos-s.nodeSize;e.setNodeMarkup(l,void 0,((n={})[xt]=r.node.attrs[xt],n))}return t(e)})},Md=function(e,t){return ll(e,t&&function(e){var n,r=Nd(e.selection,"table_row");if(r&&r.node.attrs[xt]){var o=r.pos+r.node.nodeSize;e.setNodeMarkup(o,void 0,((n={})[xt]=r.node.attrs[xt],n))}return t(e)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){}},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0});var o="editor.pdf";t.messages=((r={})["editor.bold"]="Bold",r["editor.italic"]="Italic",r["editor.underline"]="Underline",r["editor.strikethrough"]="Strikethrough",r["editor.subscript"]="Subscript",r["editor.superscript"]="Superscript",r["editor.unlink"]="Remove hyperlink",r["editor.undo"]="Undo",r["editor.redo"]="Redo",r["editor.fontSize"]="Font Size",r["editor.fontName"]="Font Name",r["editor.format"]="Format",r["editor.alignLeft"]="Align text left",r["editor.alignRight"]="Align text right",r["editor.alignCenter"]="Center text",r["editor.alignJustify"]="Justify",r["editor.indent"]="Indent",r["editor.outdent"]="Outdent",r["editor.orderedList"]="Insert ordered list",r["editor.bulletList"]="Insert unordered list",r["editor.print"]="Print",r["editor.selectAll"]="Select All",r["editor.cleanFormatting"]="Clean formatting",r[o]="Export as PDF",r["editor.foregroundColor"]="Color",r["editor.backgroundColor"]="Background color",r["editor.createTable"]="Create a table",r["editor.insertTableHint"]="Create a {0} x {1} table",r["editor.addRowBefore"]="Add row above",r["editor.addRowAfter"]="Add row below",r["editor.addColumnBefore"]="Add column on the left",r["editor.addColumnAfter"]="Add column on the right",r["editor.deleteRow"]="Delete row",r["editor.deleteColumn"]="Delete column",r["editor.deleteTable"]="Delete table",r["editor.mergeCells"]="Merge cells",r["editor.splitCell"]="Split cell",r["editor.hyperlink"]="Insert hyperlink",r["editor.hyperlink-dialog-title"]="Insert hyperlink",r["editor.hyperlink-dialog-content-address"]="Web address",r["editor.hyperlink-dialog-content-title"]="Title",r["editor.hyperlink-dialog-content-newwindow"]="Open link in new window",r["editor.hyperlink-dialog-cancel"]="Cancel",r["editor.hyperlink-dialog-insert"]="Insert",r["editor.insertFile"]="Insert file",r["editor.insertfile-dialog-title"]="Insert file",r["editor.insertfile-dialog-content-address"]="Web address",r["editor.insertfile-dialog-content-title"]="Title",r["editor.insertfile-dialog-cancel"]="Cancel",r["editor.insertfile-dialog-insert"]="Insert",r["editor.image"]="Insert image",r["editor.image-dialog-title"]="Insert image",r["editor.image-address"]="Web address",r["editor.image-title"]="Title",r["editor.image-altText"]="Alternate text",r["editor.image-width"]="Width (px)",r["editor.image-height"]="Height (px)",r["editor.image-cancel"]="Cancel",r["editor.image-insert"]="Insert",r["editor.viewHtml"]="View HTML",r["editor.viewHtml-dialog-title"]="View HTML",r["editor.viewHtml-cancel"]="Cancel",r["editor.viewHtml-update"]="Update",r["editor.findReplace-tool-title"]="Find and Replace",r["editor.findReplace-dialog-title"]="Find and Replace",r["editor.findReplace-tab-find"]="Find",r["editor.findReplace-tab-replace"]="Replace",r["editor.findReplace-findWhat"]="Find What:",r["editor.findReplace-replaceWith"]="Replace With",r["editor.findReplace-replace"]="Replace",r["editor.findReplace-replaceAll"]="Replace All",r["editor.findReplace-matchCase"]="Match Case",r["editor.findReplace-matchWord"]="Match whole word only",r["editor.findReplace-matchCyclic"]="Match cyclic (Wrap around)",r["editor.findReplace-useRegExp"]="Regular Expression",r["editor.findReplace-prevMatch"]="Prev",r["editor.findReplace-nextMatch"]="Next",r["editor.findReplace-matches"]="{0} of {1} matches",r),t.keys={bold:"editor.bold",italic:"editor.italic",underline:"editor.underline",strikethrough:"editor.strikethrough",subscript:"editor.subscript",superscript:"editor.superscript",unlink:"editor.unlink",undo:"editor.undo",redo:"editor.redo",fontSize:"editor.fontSize",fontName:"editor.fontName",format:"editor.format",alignLeft:"editor.alignLeft",alignRight:"editor.alignRight",alignCenter:"editor.alignCenter",alignJustify:"editor.alignJustify",indent:"editor.indent",outdent:"editor.outdent",orderedList:"editor.orderedList",bulletList:"editor.bulletList",print:"editor.print",selectAll:"editor.selectAll",cleanFormatting:"editor.cleanFormatting",pdf:o,foregroundColor:"editor.foregroundColor",backgroundColor:"editor.backgroundColor",createTable:"editor.createTable",createTableHint:"editor.insertTableHint",addRowBefore:"editor.addRowBefore",addRowAfter:"editor.addRowAfter",addColumnBefore:"editor.addColumnBefore",addColumnAfter:"editor.addColumnAfter",deleteRow:"editor.deleteRow",deleteColumn:"editor.deleteColumn",deleteTable:"editor.deleteTable",mergeCells:"editor.mergeCells",splitCell:"editor.splitCell",insertHyperlink:"editor.hyperlink",insertHyperlinkDialogTitle:"editor.hyperlink-dialog-title",insertHyperlinkAddress:"editor.hyperlink-dialog-content-address",insertHyperlinkTitle:"editor.hyperlink-dialog-content-title",insertHyperlinkNewWindow:"editor.hyperlink-dialog-content-newwindow",insertHyperlinkCancel:"editor.hyperlink-dialog-cancel",insertHyperlinkInsert:"editor.hyperlink-dialog-insert",insertFile:"editor.insertFile",insertFileDialogTitle:"editor.insertfile-dialog-title",insertFileAddress:"editor.insertfile-dialog-content-address",insertFileTitle:"editor.insertfile-dialog-content-title",insertFileCancel:"editor.insertfile-dialog-cancel",insertFileInsert:"editor.insertfile-dialog-insert",insertImage:"editor.image",insertImageDialogTitle:"editor.image-dialog-title",insertImageAddress:"editor.image-address",insertImageTitle:"editor.image-title",insertImageAltText:"editor.image-altText",insertImageWidth:"editor.image-width",insertImageHeight:"editor.image-height",insertImageCancel:"editor.image-cancel",insertImageInsert:"editor.image-insert",viewHtml:"editor.viewHtml",viewHtmlDialogTitle:"editor.viewHtml-dialog-title",viewHtmlCancel:"editor.viewHtml-cancel",viewHtmlUpdate:"editor.viewHtml-update",findReplaceToolTitle:"editor.findReplace-tool-title",findReplaceDialogTitle:"editor.findReplace-dialog-title",findReplaceTabFind:"editor.findReplace-tab-find",findReplaceTabReplace:"editor.findReplace-tab-replace",findReplaceFindWhat:"editor.findReplace-findWhat",findReplaceReplaceWith:"editor.findReplace-replaceWith",findReplaceReplace:"editor.findReplace-replace",findReplaceReplaceAll:"editor.findReplace-replaceAll",findReplaceMatchCase:"editor.findReplace-matchCase",findReplaceMatchWord:"editor.findReplace-matchWord",findReplaceMatchCyclic:"editor.findReplace-matchCyclic",findReplaceUseRegExp:"editor.findReplace-useRegExp",findReplacePrevMatch:"editor.findReplace-prevMatch",findReplaceNextMatch:"editor.findReplace-nextMatch",findReplaceMatches:"editor.findReplace-matches"}},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.onDownPreventDefault={onMouseDown:function(e){return e.preventDefault()},onPointerDown:function(e){return e.preventDefault()}};t.userSelectNone={userSelect:"none"};t.formatString=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(t,n){e=e.replace("{"+n+"}",String(t))})),e};t.itemRender=function(e,t){return t.dataItem.style?r.cloneElement(e,e.props,r.createElement("span",{style:t.dataItem.style},e.props.children)):e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={},r=function(e){return"object"==typeof e?Object.keys(e).forEach((function(t){n[t]=e[t]})):n[e]=!0},o=function(e){return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?o(e):r(e)}))};return o(e),Object.keys(n).map((function(e){return n[e]&&e||null})).filter((function(e){return null!==e})).join(" ")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426407,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t){e.exports=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(0),o=n(6),i=r.createContext([void 0,o.a]),a=r.createContext([void 0,o.a]),s=r.createContext([[],o.a,o.a]),l=r.createContext([[],o.a,o.a])},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),i=n(5);t.listsTypes=r({},i.indentRules.listsTypes),function(e){var n={type:"button"};e.bold=r({},i.bold,{props:r({icon:"bold"},n),messages:{title:o.keys.bold},commandName:"Bold"}),e.italic=r({},i.italic,{props:r({icon:"italic"},n),messages:{title:o.keys.italic},commandName:"Italic"}),e.underline=r({},i.underline,{props:r({icon:"underline"},n),messages:{title:o.keys.underline},commandName:"Underline"}),e.strikethrough=r({},i.strikethrough,{props:r({icon:"strikethrough"},n),messages:{title:o.keys.strikethrough},commandName:"Strikethrough"}),e.subscript=r({},i.subscript,{props:r({icon:"subscript"},n),messages:{title:o.keys.subscript},commandName:"Subscript"}),e.superscript=r({},i.superscript,{props:r({icon:"superscript"},n),messages:{title:o.keys.superscript},commandName:"Superscript"}),e.link=r({},i.link,{props:r({icon:"link-horizontal"},n),messages:{insertHyperlink:o.keys.insertHyperlink,insertHyperlinkDialogTitle:o.keys.insertHyperlinkDialogTitle,insertHyperlinkAddress:o.keys.insertHyperlinkAddress,insertHyperlinkTitle:o.keys.insertHyperlinkTitle,insertHyperlinkNewWindow:o.keys.insertHyperlinkNewWindow,insertHyperlinkCancel:o.keys.insertHyperlinkCancel,insertHyperlinkInsert:o.keys.insertHyperlinkInsert},commandName:"Link"}),e.insertFile=r({},i.link,{props:r({icon:"file-add"},n),messages:{insertHyperlink:o.keys.insertFile,insertHyperlinkDialogTitle:o.keys.insertFileDialogTitle,insertHyperlinkAddress:o.keys.insertFileAddress,insertHyperlinkTitle:o.keys.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:o.keys.insertFileCancel,insertHyperlinkInsert:o.keys.insertFileInsert},commandName:"InsertFile",linkTarget:!1}),e.insertTable={props:r({icon:"table-insert"},n),messages:{createTable:o.keys.createTable,createTableHint:o.keys.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:r({icon:"table-row-insert-above"},n),messages:{title:o.keys.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:r({icon:"table-row-insert-below"},n),messages:{title:o.keys.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:r({icon:"table-column-insert-left"},n),messages:{title:o.keys.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:r({icon:"table-column-insert-right"},n),messages:{title:o.keys.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:r({icon:"table-row-delete"},n),messages:{title:o.keys.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:r({icon:"table-column-delete"},n),messages:{title:o.keys.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:r({icon:"table-delete"},n),messages:{title:o.keys.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:r({icon:"cells-merge"},n),messages:{title:o.keys.mergeCells},commandName:"MergeCells"},e.splitCell={props:r({icon:"cell-split-horizontally"},n),messages:{title:o.keys.splitCell},commandName:"SplitCell"},e.print={props:r({icon:"print"},n),messages:{title:o.keys.print}},e.selectAll={props:r({icon:"select-all"},n),messages:{title:o.keys.selectAll}},e.pdf={props:r({icon:"pdf"},n),messages:{title:o.keys.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:r({icon:"clear-css"},n),messages:{title:o.keys.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:r({icon:"image"},n),messages:{insertImage:o.keys.insertImage,insertImageDialogTitle:o.keys.insertImageDialogTitle,insertImageAddress:o.keys.insertImageAddress,insertImageTitle:o.keys.insertImageTitle,insertImageAltText:o.keys.insertImageAltText,insertImageWidth:o.keys.insertImageWidth,insertImageHeight:o.keys.insertImageHeight,insertImageCancel:o.keys.insertImageCancel,insertImageInsert:o.keys.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:r({icon:"html"},n),messages:{viewHtml:o.keys.viewHtml,viewHtmlDialogTitle:o.keys.viewHtmlDialogTitle,viewHtmlCancel:o.keys.viewHtmlCancel,viewHtmlUpdate:o.keys.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:r({icon:"find"},n),messages:{findReplaceToolTitle:o.keys.findReplaceToolTitle,findReplaceDialogTitle:o.keys.findReplaceDialogTitle,findReplaceTabFind:o.keys.findReplaceTabFind,findReplaceTabReplace:o.keys.findReplaceTabReplace,findReplaceFindWhat:o.keys.findReplaceFindWhat,findReplaceReplaceWith:o.keys.findReplaceReplaceWith,findReplaceReplace:o.keys.findReplaceReplace,findReplaceReplaceAll:o.keys.findReplaceReplaceAll,findReplaceMatchCase:o.keys.findReplaceMatchCase,findReplaceMatchWord:o.keys.findReplaceMatchWord,findReplaceMatchCyclic:o.keys.findReplaceMatchCyclic,findReplaceUseRegExp:o.keys.findReplaceUseRegExp,findReplacePrevMatch:o.keys.findReplacePrevMatch,findReplaceNextMatch:o.keys.findReplaceNextMatch,findReplaceMatches:o.keys.findReplaceMatches}},e.unlink=r({},i.link,{props:r({icon:"unlink-horizontal"},n),messages:{title:o.keys.unlink},commandName:"Unlink"}),e.undo={props:r({icon:"undo"},n),messages:{title:o.keys.undo},commandName:"Undo"},e.redo={props:r({icon:"redo"},n),messages:{title:o.keys.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:o.messages[o.keys.fontSize],value:"",localizationKey:o.keys.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"},e.fontName={style:"font-family",defaultItem:{text:o.messages[o.keys.fontName],value:"",localizationKey:o.keys.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"},e.formatBlock={defaultItem:{text:o.messages[o.keys.format],value:"",localizationKey:o.keys.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"},e.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",view:"palette",title:o.keys.foregroundColor},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"background",view:"palette",title:o.keys.backgroundColor},commandName:"BackColor"},e.alignLeft={actions:i.alignLeftRules.slice(),props:r({icon:"align-left"},n),messages:{title:o.keys.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:i.alignRightRules.slice(),props:r({icon:"align-right"},n),messages:{title:o.keys.alignRight},commandName:"AlignRight"},e.alignCenter={actions:i.alignCenterRules.slice(),props:r({icon:"align-center"},n),messages:{title:o.keys.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:i.alignJustifyRules.slice(),props:r({icon:"align-justify"},n),messages:{title:o.keys.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:i.alignRemoveRules.slice(),props:r({icon:"align-remove"},n),messages:{},commandName:"AlignRemove"},e.indent={actions:i.indentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-increase"},n),messages:{title:o.keys.indent},commandName:"Indent"},e.outdent={actions:i.outdentRules.nodes,listsTypes:t.listsTypes,props:r({icon:"indent-decrease"},n),messages:{title:o.keys.outdent},commandName:"Outdent"},e.orderedList={listType:t.listsTypes.orderedList,props:r({icon:"list-ordered"},n),messages:{title:o.keys.orderedList},commandName:"OrderedList",types:r({},t.listsTypes)},e.bulletList={listType:t.listsTypes.bulletList,props:r({icon:"list-unordered"},n),messages:{title:o.keys.bulletList},commandName:"UnorderedList",types:r({},t.listsTypes)}}(t.EditorToolsSettings||(t.EditorToolsSettings={}))},function(e,t){e.exports=i},,function(e,t,n){"use strict";n.r(t);var r=n(47);n.d(t,"Popup",(function(){return r.a})),n.d(t,"PopupPropsContext",(function(){return r.b}))},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var o="labels.optional",i=((r={})[o]="(Optional)",r)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},function(e,t,n){"use strict";t.a={outerHeight:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop),r=parseFloat(t.marginBottom);return e.offsetHeight+n+r},outerWidth:function(e){if(!e)return 0;var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginLeft),r=parseFloat(t.marginRight);return e.offsetWidth+n+r},styles:{"animation-container":"k-animation-container","animation-container-relative":"k-animation-container-relative","animation-container-fixed":"k-animation-container-fixed","push-right-enter":"k-push-right-enter","push-right-appear":"k-push-right-appear","push-right-enter-active":"k-push-right-enter-active","push-right-appear-active":"k-push-right-appear-active","push-right-exit":"k-push-right-exit","push-right-exit-active":"k-push-right-exit-active","push-left-enter":"k-push-left-enter","push-left-appear":"k-push-left-appear","push-left-enter-active":"k-push-left-enter-active","push-left-appear-active":"k-push-left-appear-active","push-left-exit":"k-push-left-exit","push-left-exit-active":"k-push-left-exit-active","push-down-enter":"k-push-down-enter","push-down-appear":"k-push-down-appear","push-down-enter-active":"k-push-down-enter-active","push-down-appear-active":"k-push-down-appear-active","push-down-exit":"k-push-down-exit","push-down-exit-active":"k-push-down-exit-active","push-up-enter":"k-push-up-enter","push-up-appear":"k-push-up-appear","push-up-enter-active":"k-push-up-enter-active","push-up-appear-active":"k-push-up-appear-active","push-up-exit":"k-push-up-exit","push-up-exit-active":"k-push-up-exit-active",expand:"k-expand","expand-vertical-enter":"k-expand-vertical-enter","expand-vertical-appear":"k-expand-vertical-appear","expand-vertical-enter-active":"k-expand-vertical-enter-active","expand-vertical-appear-active":"k-expand-vertical-appear-active","expand-vertical-exit":"k-expand-vertical-exit","expand-vertical-exit-active":"k-expand-vertical-exit-active","expand-horizontal-enter":"k-expand-horizontal-enter","expand-horizontal-appear":"k-expand-horizontal-appear","expand-horizontal-enter-active":"k-expand-horizontal-enter-active","expand-horizontal-appear-active":"k-expand-horizontal-appear-active","expand-horizontal-exit":"k-expand-horizontal-exit","expand-horizontal-exit-active":"k-expand-horizontal-exit-active","child-animation-container":"k-child-animation-container","fade-enter":"k-fade-enter","fade-appear":"k-fade-appear","fade-enter-active":"k-fade-enter-active","fade-appear-active":"k-fade-appear-active","fade-exit":"k-fade-exit","fade-exit-active":"k-fade-exit-active","zoom-in-enter":"k-zoom-in-enter","zoom-in-appear":"k-zoom-in-appear","zoom-in-enter-active":"k-zoom-in-enter-active","zoom-in-appear-active":"k-zoom-in-appear-active","zoom-in-exit":"k-zoom-in-exit","zoom-in-exit-active":"k-zoom-in-exit-active","zoom-out-enter":"k-zoom-out-enter","zoom-out-appear":"k-zoom-out-appear","zoom-out-enter-active":"k-zoom-out-enter-active","zoom-out-appear-active":"k-zoom-out-appear-active","zoom-out-exit":"k-zoom-out-exit","zoom-out-exit-active":"k-zoom-out-exit-active","slide-in-appear":"k-slide-in-appear",centered:"k-centered","slide-in-appear-active":"k-slide-in-appear-active","slide-down-enter":"k-slide-down-enter","slide-down-appear":"k-slide-down-appear","slide-down-enter-active":"k-slide-down-enter-active","slide-down-appear-active":"k-slide-down-appear-active","slide-down-exit":"k-slide-down-exit","slide-down-exit-active":"k-slide-down-exit-active","slide-up-enter":"k-slide-up-enter","slide-up-appear":"k-slide-up-appear","slide-up-enter-active":"k-slide-up-enter-active","slide-up-appear-active":"k-slide-up-appear-active","slide-up-exit":"k-slide-up-exit","slide-up-exit-active":"k-slide-up-exit-active","slide-right-enter":"k-slide-right-enter","slide-right-appear":"k-slide-right-appear","slide-right-enter-active":"k-slide-right-enter-active","slide-right-appear-active":"k-slide-right-appear-active","slide-right-exit":"k-slide-right-exit","slide-right-exit-active":"k-slide-right-exit-active","slide-left-enter":"k-slide-left-enter","slide-left-appear":"k-slide-left-appear","slide-left-enter-active":"k-slide-left-enter-active","slide-left-appear-active":"k-slide-left-appear-active","slide-left-exit":"k-slide-left-exit","slide-left-exit-active":"k-slide-left-exit-active","reveal-vertical-enter":"k-reveal-vertical-enter","reveal-vertical-appear":"k-reveal-vertical-appear","reveal-vertical-enter-active":"k-reveal-vertical-enter-active","reveal-vertical-appear-active":"k-reveal-vertical-appear-active","reveal-vertical-exit":"k-reveal-vertical-exit","reveal-vertical-exit-active":"k-reveal-vertical-exit-active","reveal-horizontal-enter":"k-reveal-horizontal-enter","reveal-horizontal-appear":"k-reveal-horizontal-appear","reveal-horizontal-enter-active":"k-reveal-horizontal-enter-active","reveal-horizontal-appear-active":"k-reveal-horizontal-appear-active","reveal-horizontal-exit":"k-reveal-horizontal-exit","reveal-horizontal-exit-active":"k-reveal-horizontal-exit-active"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8);function o(e){if(void 0!==r)r.validatePackage(e);else{var t="License activation failed for "+e.name+"\n";t+="The @progress/kendo-licensing script is not loaded.\n",t+="See "+e.licensingDocsUrl+" for more information.\n",console.warn(t)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg"}}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),function(e){e.next="next",e.prev="prev",e.current="current",e.reset="reset"}(r||(r={}));var o=function(e,t){var n=t.items.findIndex((function(t){return t===e}));switch(t.type){case r.next:return n===t.items.length-1?e:t.items[n+1];case r.prev:return 0===n?e:t.items[n-1];case r.current:return t.payload;case r.reset:return null;default:return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(0),o=n(1),i=n(25),a=n(35),s=n(26),l=n(39),c=n(10),u=n(22),d=n(23),p=n(36),f=n(27),h=n(21),m=n(11),v=n(38),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},y=r.forwardRef((function(e,t){var n;Object(h.a)(m.a);var o=r.useRef(null),y=r.useRef(null),b=Object(a.a)(y,e.dir);r.useImperativeHandle(o,(function(){return{element:y.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var k=r.useContext(i.d),w=k[0],C=k[1],O=r.useContext(i.c),x=O[0],S=O[1],E=r.useContext(i.b)[1],I=r.useMemo((function(){return e.selected||(Array.isArray(w)?w.some((function(t){return t===e.value})):w===e.value)}),[e.selected,e.value,w]),N=r.useMemo((function(){return x===e.value}),[e.value,x]);r.useEffect((function(){N&&y.current&&y.current.focus()}),[N]);var T=r.useCallback((function(t){C({type:f.a.toggle,payload:e.value,event:t})}),[C,e.value]),M=r.useCallback((function(t){e.removable&&(E({type:p.a.remove,payload:e.value,event:t}),S({type:d.a.reset,payload:e.value,event:t}),C({type:f.a.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:o.current,syntheticEvent:t}))}),[e.onRemove,e.value,e.removable,E,S,C]),D=r.useCallback((function(t){switch(t.keyCode){case s.a.left:S({type:d.a.prev,payload:e.value,event:t});break;case s.a.right:S({type:d.a.next,payload:e.value,event:t});break;case s.a.enter:C({type:f.a.toggle,payload:e.value,event:t});break;case s.a.delete:M(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onKeyDown,e.value,S,C,M]),P=r.useCallback((function(t){S({payload:e.value,type:d.a.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onFocus,e.value,S]),_=r.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:o.current,syntheticEvent:t})}),[e.onBlur]),j=Object(v.a)(e,o,{onClick:T});return r.createElement("div",g({},j,{role:e.role,id:e.value,style:e.style,ref:y,dir:b,tabIndex:Object(l.a)(e.tabIndex,e.disabled,void 0),className:Object(c.a)("k-chip",(n={"k-rtl":"rtl"===b,"k-disabled":e.disabled,"k-selected":I,"k-focus":N},n["k-chip-"+(u.a.sizeMap[e.size]||e.size)]=e.size,n["k-rounded-"+(u.a.roundedMap[e.rounded]||e.rounded)]=e.rounded,n["k-chip-"+e.fillMode]=e.fillMode,n["k-chip-"+e.fillMode+"-"+e.themeColor]=Boolean(e.fillMode&&e.themeColor),n),e.className),"aria-checked":I,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,onFocus:P,onBlur:_,onKeyDown:D}),I&&e.selectedIcon&&r.createElement("span",{className:Object(c.a)("k-chip-icon","k-icon",e.selectedIcon)}),e.icon&&r.createElement("span",{className:Object(c.a)("k-chip-icon","k-icon",e.icon)}),r.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&r.createElement("span",{"aria-label":e.text,className:"k-chip-label"},e.text)),e.removable&&r.createElement("span",{className:"k-chip-actions"},r.createElement("span",{className:"k-chip-action"},r.createElement("span",{className:Object(c.a)("k-chip-remove-action","k-icon",e.removeIcon),onClick:M}))))})),b={id:o.string,text:o.string,value:o.any,dir:o.oneOf(["ltr","rtl"]),removable:o.bool,removeIcon:o.string,disabled:o.bool,icon:o.string,selectedIcon:o.string,onRemove:o.func,dataItem:o.any,selected:o.bool,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"]),rounded:o.oneOf([null,"small","medium","large","full"]),fillMode:o.oneOf([null,"outline","solid"]),themeColor:o.oneOf([null,"base","info","success","warning","error"])};y.displayName="KendoReactChip",y.propTypes=b,y.defaultProps={disabled:!1,removable:!1,removeIcon:"k-i-x-circle",dir:"ltr",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base"}},function(e,t,n){"use strict";n.d(t,"d",(function(){return y})),n.d(t,"c",(function(){return b})),n.d(t,"b",(function(){return k})),n.d(t,"a",(function(){return w}));var r=n(0),o=n(1),i=n(35),a=n(37),s=n(38),l=n(39),c=n(10),u=n(22),d=n(27),p=n(23),f=n(36),h=n(24),m=n(21),v=n(11),g=function(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},y=r.createContext([null,function(e){}]),b=r.createContext([null,function(e){}]),k=r.createContext([null,function(e){}]),w=r.forwardRef((function(e,t){var n;Object(m.a)(v.a);var o=r.useRef(null),w=r.useRef(null),C=Object(i.a)(w,e.dir),x=e.chip,S=e.id,E=e.style,I=e.tabIndex,N=e.disabled,T=e.size,M=e.className,D=e.ariaDescribedBy,P=e.ariaLabelledBy,_=e.selection,j=void 0===_?O.selection:_,R=e.value,A=void 0===R?O.defaultValue:R,F=e.defaultData,z=void 0===F?O.defaultData:F,L=e.valueField,B=void 0===L?O.valueField:L,V=e.textField,H=void 0===V?O.textField:V,K=e.onChange,W=e.onDataChange,$=r.useMemo((function(){return x||h.a}),[x,h.a]);r.useImperativeHandle(o,(function(){return{element:w.current,props:e}})),r.useImperativeHandle(t,(function(){return o.current}));var q=r.useCallback((function(e,t){K&&o.current&&K.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[K]),U=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=Object(d.b)(t.state||i,g({},e,t));n&&n(r,e.event),a(r)}]}(A,{selection:j,state:A},q),G=U[0],X=U[1],J=r.useCallback((function(e,t){W&&o.current&&W.call(void 0,{value:e,target:o.current,syntheticEvent:t})}),[W]),Y=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=Object(f.b)(t.state||i,g({},e,t));n&&n(r,e.event),a(r)}]}(e.data||z,{state:e.data,valueField:B},J),Z=Y[0],Q=Y[1],ee=r.useCallback((function(e,t){return e.push(t[B]),e}),[B]),te=r.useMemo((function(){return e.data||Z}),[e.data,Z]),ne=r.useMemo((function(){return A||G}),[A,G]),re=r.useMemo((function(){return te.reduce(ee,[])}),[te,ee]),oe=r.useCallback((function(e){return Object(a.a)(B)(e)}),[B]),ie=r.useCallback((function(e){return Object(a.a)(H)(e)}),[H]),ae=function(e){var t=r.useState(null),n=t[0],o=t[1];return[n,function(t){var n=Object(p.b)(t.payload,g({},t,e));o(n)}]}({items:re}),se=ae[0],le=ae[1],ce=Object(s.a)(e,o);return r.createElement(y.Provider,{value:[ne,X]},r.createElement(b.Provider,{value:[se,le]},r.createElement(k.Provider,{value:[te,Q]},r.createElement("div",g({ref:w},ce,{role:"listbox",id:S,dir:C,style:E,tabIndex:Object(l.a)(I,N,void 0),className:Object(c.a)("k-chip-list",(n={"k-rtl":"rtl"===C,"k-disabled":N},n["k-chip-list-"+(u.a.sizeMap[T]||T)]=T,n),M),"aria-labelledby":P,"aria-describedby":D}),te.map((function(e,t){return r.createElement($,{role:"option",dataItem:e,size:T,key:[oe(e),t].join("-"),text:ie(e),value:oe(e)})}))))))})),C={id:o.string,className:o.string,tabIndex:o.number,data:o.any,defaultData:o.arrayOf(o.any),onDataChange:o.func,value:o.oneOfType([o.any,o.arrayOf(o.any)]),defaultValue:o.oneOfType([o.any,o.arrayOf(o.any)]),onChange:o.func,selection:o.oneOf(["single","none","multiple"]),textField:o.string,valueField:o.string,disabled:o.bool,dir:o.oneOf(["ltr","rtl"]),ariaLabelledBy:o.string,ariaDescribedBy:o.string,size:o.oneOf([null,"small","medium","large"])},O={chip:h.a,size:"medium",disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};w.displayName="KendoReactChipList",w.propTypes=C,w.defaultProps=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={backspace:8,tab:9,enter:13,shift:16,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,delete:46}},function(e,t,n){"use strict";var r,o;n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),function(e){e.single="single",e.multiple="multiple",e.none="none"}(r||(r={})),function(e){e.toggle="toggle",e.remove="remove"}(o||(o={}));var i=function(e,t){switch(t.selection){case r.single:switch(t.type){case o.toggle:if(!Array.isArray(e)||null===e)return t.payload===e?null:t.payload;throw new Error("State cannot be an array in single selection");case o.remove:return t.payload===e?null:e;default:return e}case r.multiple:switch(t.type){case o.toggle:if(Array.isArray(e))return e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):e.concat([t.payload]);if(null===e)return[t.payload];throw new Error("State cannot be non-array in multiple selection");case o.remove:return Array.isArray(e)?e.some((function(e){return e===t.payload}))?e.filter((function(e){return e!==t.payload})):e.concat([t.payload]):e;default:return e}case r.none:return null;default:return e}}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(71),a=n(72),s=n(73),l=n(62);!function(e){var t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(i.InsertLinkDialog);e.InsertLinkDialog=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(a.InsertImageDialog);e.InsertImageDialog=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s.ViewHtmlDialog);e.ViewHtmlDialog=r;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.FindAndReplaceDialog);e.FindAndReplaceDialog=c}(t.EditorDialogs||(t.EditorDialogs={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=function(){return"undefined"!=typeof document?document:{}},o=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=r();if(!this.scrollbar&&e&&e.createElement){var t=e.createElement("div");t.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",t.innerHTML="&nbsp;",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=function(e,t){var n=r.useContext(e),o=n[0],i=n[1],a=r.useState(t),s=a[0],l=a[1];return[void 0!==o?o:s,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];void 0!==o?i.apply(void 0,e):l(e[0])}]}},function(e,t,n){"use strict";n.r(t),n.d(t,"Dialog",(function(){return E})),n.d(t,"DialogActionsBar",(function(){return c})),n.d(t,"DialogPropsContext",(function(){return S})),n.d(t,"Window",(function(){return H})),n.d(t,"WindowActionsBar",(function(){return A})),n.d(t,"WindowPropsContext",(function(){return V}));var r=n(0),o=n(15),i=n(1),a=n(50),s=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.id,i=e.closeIcon;return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar k-header",id:o},r.createElement("div",{className:"k-window-title k-dialog-title"},t),r.createElement("div",{className:"k-window-actions k-dialog-actions"},i&&r.createElement(a.a,{role:"button","aria-label":"Close",onClick:n,icon:"x",fillMode:"flat",className:"k-window-action k-dialog-action k-dialog-close"})))},l=n(10),c=function(e){var t=e.layout,n=void 0===t?p.layout:t,o=e.children,i=Object(l.a)("k-dialog-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};c.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var u,d,p={layout:"stretched"},f=n(52),h=n(53),m=n(26),v=n(54),g=n(19),y=n(58),b=n(21),k={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426758,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},w=function(e,t,n){var r=e;if(t&&t.defaultView){var o=t.querySelectorAll(".k-window:not(.k-dialog), .k-dialog-wrapper"),i=!1;return o.forEach((function(e){var o=t.defaultView.getComputedStyle(e,null);if(e.getAttribute("data-windowid")!==n&&null!==o.zIndex){var a=parseInt(o.zIndex,10);a>=r&&(r=a,i=!0)}})),i?r+2:r}return r},C=(u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),O=function(){return(O=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},x=function(e){function t(t){var n=e.call(this,t)||this;return n._id=Object(f.a)(),n.titleId=n.generateTitleId(),n.onCloseDialog=function(e){e.preventDefault(),Object(h.a)(n.props.onClose,e,n,void 0)},n.onKeyDown=function(e){e.keyCode===m.a.esc&&n.props.onClose&&(e.preventDefault(),n.onCloseDialog(e));var t=n.element;if(t&&e.keyCode===m.a.tab){var r=t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),o=r[0],i=r[r.length-1],a=n.getDocument();e.shiftKey?(a&&a.activeElement===o||a&&a.activeElement===n.element)&&(i.focus(),e.preventDefault()):a&&a.activeElement===i&&(o.focus(),e.preventDefault())}},n.getCurrentZIndex=function(){return n.state?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},Object(b.a)(k),n.state={zIndex:w(n.getCurrentZIndex(),n.getDocument(),n._id)},n}return C(t,e),t.prototype.componentDidMount=function(){this.element&&this.props.autoFocus&&this.element.focus()},t.prototype.render=function(){var e,t=this,n=void 0!==this.props.id?this.props.id:this.titleId,i=this.props,a=i.title,l=i.width,c=i.height,u=i.children,d=i.minWidth,p=i.dir,f=i.style,h=i.contentStyle,m=r.Children.toArray(u),y=this.getContent(m),b=this.getActionBar(m),k=a?{"aria-labelledby":n}:null,w=void 0===this.props.closeIcon||this.props.closeIcon,C=this.getCurrentZIndex(),x=r.createElement(v.a.Provider,{value:C},r.createElement("div",O({},((e={})["data-windowid"]=this._id,e),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:p,style:O({zIndex:C},f),ref:function(e){return t.element=e}}),r.createElement("div",{className:"k-overlay"}),r.createElement("div",O({},k,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:l,height:c,minWidth:d}}),this.props.title&&r.createElement(s,{closeIcon:w,onCloseButtonClick:this.onCloseDialog,id:n},a),r.createElement("div",{className:"k-window-content k-dialog-content",style:h},y),b)));return g.a?null!==this.props.appendTo?o.createPortal(x,this.props.appendTo||document.body):x:null},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===c}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==c}))},t.prototype.generateTitleId=function(){return"dialog-title"+this._id},t.displayName="Dialog",t.propTypes={title:i.any,id:i.string,dir:i.string,style:i.object,closeIcon:i.bool,width:i.oneOfType([i.number,i.string]),height:i.oneOfType([i.number,i.string]),minWidth:i.oneOfType([i.number,i.string]),autoFocus:i.bool},t.defaultProps={autoFocus:!1},t.contextType=v.a,t}(r.Component),S=Object(y.a)(),E=Object(y.b)(S,x);E.displayName="KendoReactDialog",function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(d||(d={}));var I=function(){return(I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},N=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,s=e.onRestoreButtonClick,l=e.onDoubleClick,c=e.stage,u=e.forwardedRef,p=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"window-minimize",onClick:o}),f=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:i,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"window-maximize",onClick:i}),h=e.restoreButton?r.createElement(e.restoreButton,{onClick:s,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"window-restore",onClick:s}),m=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:c}):r.createElement(a.a,{fillMode:"flat",icon:"close",onClick:n});return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:u,onDoubleClick:l},r.createElement("div",{className:"k-window-title"},t||""),r.createElement("div",{className:"k-window-actions"},c===d.DEFAULT&&p,c===d.DEFAULT&&f,c!==d.DEFAULT&&h,m))},T=r.forwardRef((function(e,t){return r.createElement(N,I({},e,{forwardedRef:t}))})),M=n(60),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=["n","e","s","w","se","sw","ne","nw"],_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",null," ",P.map((function(t,n){return r.createElement(M.a,{key:n,onDrag:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!1,direction:t})},onRelease:function(n){var r=n.event;r.originalEvent.preventDefault(),e.props.onResize(r,{end:!0,direction:t})}},r.createElement("div",{className:"k-resize-handle k-resize-"+t,style:{display:"block",touchAction:"none"}}))})))},t}(r.Component),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return j(t,e),t.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(r.Component),A=function(e){var t=e.layout,n=void 0===t?F.layout:t,o=e.children,i=Object(l.a)("k-window-buttongroup","k-actions","k-hstack",{"k-justify-content-start":"start"===n,"k-justify-content-center":"center"===n,"k-justify-content-end":"end"===n,"k-justify-content-stretch":"stretched"===n});return r.createElement("div",{className:i},o)};A.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var F={layout:"end"},z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(){return(L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},B=function(e){function t(t){var n=e.call(this,t)||this;return n.offSetCoordinates={x:0,y:0},n._id=Object(f.a)(),n.onKeyDown=function(e){if(e.target===e.currentTarget){var t=n.props.minWidth||120,r=n.props.minHeight||100;if(e.ctrlKey&&n.props.resizable){switch(e.keyCode){case m.a.up:e.preventDefault(),r<=n.height-5&&n.setState({height:n.height-5});break;case m.a.down:e.preventDefault(),n.setState({height:n.height+5});break;case m.a.left:t<=n.width-5&&n.setState({width:n.width-5});break;case m.a.right:n.setState({width:n.width+5});break;default:return}n.dispatchMoveEvent(n.props.onResize,e,!1,void 0)}else if(e.altKey)switch(e.keyCode){case m.a.up:n.windowStage===d.MINIMIZED?(n.handleRestore(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleFullscreen(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.FULLSCREEN}));break;case m.a.down:n.windowStage===d.FULLSCREEN?(n.handleRestore(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.DEFAULT})):n.windowStage===d.DEFAULT&&(n.handleMinimize(e),Object(h.a)(n.props.onStageChange,e,n,{state:d.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case m.a.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case m.a.up:n.setState({top:n.state.top-5});break;case m.a.down:n.setState({top:n.state.top+5});break;case m.a.left:n.setState({left:n.state.left-5});break;case m.a.right:n.setState({left:n.state.left+5});break;default:return}n.dispatchMoveEvent(n.props.onMove,e,!1,void 0)}}},n.onPress=function(e){var t=e.event;n.windowCoordinatesState.differenceLeft=t.pageX-n.left,n.windowCoordinatesState.differenceTop=t.pageY-n.top},n.onDrag=function(e){var t=e.event;t.originalEvent.preventDefault(),n.windowStage!==d.FULLSCREEN&&n.props.draggable&&(n.setState({top:Math.max(t.pageY-n.windowCoordinatesState.differenceTop,0),left:t.pageX-n.windowCoordinatesState.differenceLeft,isDragging:!0}),n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!1))},n.onRelease=function(e){var t=e.event;n.windowStage!==d.FULLSCREEN&&n.props.draggable&&n.props.onMove&&n.dispatchMoveEvent(n.props.onMove,t,!0,!0),n.setState({isDragging:!1})},n.onFocus=function(){n._blurTimeout?(clearTimeout(n._blurTimeout),n._blurTimeout=void 0):n.setState({focused:!0,zIndex:w(n.getCurrentZIndex(),n.getDocument(),n._id)})},n.onBlur=function(){clearTimeout(n._blurTimeout);var e=n.getWindow();e&&(n._blurTimeout=e.setTimeout((function(){n.setState({focused:!1}),n._blurTimeout=void 0})))},n.getInitialTop=function(){if(void 0!==n.props.top)return n.props.top;if(void 0!==n.props.initialTop)return n.props.initialTop;var e=300;if(void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),n.props.appendTo)return n.props.appendTo.offsetHeight/2-e/2;var t=n.getWindow();return t?t.innerHeight/2-e/2:0},n.getInitialLeft=function(){if(void 0!==n.props.left)return n.props.left;if(void 0!==n.props.initialLeft)return n.props.initialLeft;var e=300;if(void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),n.props.appendTo)return n.props.appendTo.offsetWidth/2-e/2;var t=n.getWindow();return t?t.innerWidth/2-e/2:0},n.getInitialWidth=function(){var e=300;return void 0!==n.props.width?e=n.props.width:void 0!==n.props.initialWidth&&(e=n.props.initialWidth),e},n.getInitialHeight=function(){var e=300;return void 0!==n.props.height?e=n.props.height:void 0!==n.props.initialHeight&&(e=n.props.initialHeight),e},n.handleMinimize=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height,n.setState({stage:d.MINIMIZED,height:0}),Object(h.a)(n.props.onStageChange,e,n,{state:d.MINIMIZED})},n.handleFullscreen=function(e){e.preventDefault(),n.windowCoordinatesState.leftBeforeAction=n.left,n.windowCoordinatesState.topBeforeAction=n.top,n.windowCoordinatesState.widthBeforeAction=n.width,n.windowCoordinatesState.heightBeforeAction=n.height;var t=n.getWindow(),r=t?t.innerWidth:0,o=t?t.innerHeight:0;n.setState({left:0,top:0,width:n.props.appendTo?n.props.appendTo.offsetWidth:r,height:n.props.appendTo?n.props.appendTo.offsetHeight:o,stage:d.FULLSCREEN}),Object(h.a)(n.props.onStageChange,e,n,{state:d.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===d.FULLSCREEN?n.setState({stage:d.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===d.MINIMIZED&&n.setState({stage:d.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),Object(h.a)(n.props.onStageChange,e,n,{state:d.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),Object(h.a)(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===d.FULLSCREEN||n.windowStage===d.MINIMIZED?n.handleRestore(e):n.handleFullscreen(e)},n.handleResize=function(e,t){var r=n.props.appendTo?e.pageX-n.offSetCoordinates.x:e.pageX,o=n.props.appendTo?e.pageY-n.offSetCoordinates.y:e.pageY,i=n.width,a=n.height,s=n.props.minWidth||120,l=n.props.minHeight||100,c=n.top-o,u=n.left-r,d=r-n.left,p=o-n.top,f=Object.assign({},n.state,{isDragging:!t.end});t.direction.indexOf("n")>=0&&l-(a+c)<0&&(n.top>0&&(f.height=a+c),f.top=o),t.direction.indexOf("s")>=0&&l-p<0&&(f.height=p),t.direction.indexOf("w")>=0&&s-(i+u)<0&&(n.left>0&&(f.width=i+u),f.left=r),t.direction.indexOf("e")>=0&&s-d<0&&(f.width=d),n.setState(f),n.dispatchMoveEvent(n.props.onResize,e,!0,t.end)},n.dispatchMoveEvent=function(e,t,r,o){e&&e.call(void 0,{nativeEvent:t.nativeEvent?t.nativeEvent:t.originalEvent,drag:r,end:o,target:n,left:n.state.left,top:n.state.top,width:n.state.width,hight:n.state.height,height:n.state.height})},n.handleBrowserWindowResize=function(){if(n.windowStage===d.FULLSCREEN){var e=n.getWindow(),t=e?e.innerWidth:0,r=e?e.innerHeight:0;n.setState({width:n.props.appendTo?n.props.appendTo.offsetWidth:t,height:n.props.appendTo?n.props.appendTo.offsetHeight:r})}},n.getCurrentZIndex=function(){return n.state?n.state.zIndex>(n.context?n.context+2:0)?n.state.zIndex:n.context+2:n.context?n.context:10002},n.getDocument=function(){return n.props.appendTo?n.props.appendTo.ownerDocument:document},n.getWindow=function(){var e=n.getDocument();return e&&e.defaultView},Object(b.a)(k),n.state={stage:n.props.stage||d.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0,zIndex:w(n.getCurrentZIndex(),n.getDocument(),n._id)},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return z(t,e),t.prototype.componentDidMount=function(){var e=this.getWindow();e&&e.addEventListener("resize",this.handleBrowserWindowResize);var t=this.getDocument();if(this.props.appendTo&&t){var n=this.props.appendTo.getBoundingClientRect(),r=t.body.getBoundingClientRect();this.offSetCoordinates.x=n.left-r.left,this.offSetCoordinates.y=n.top-r.top}},t.prototype.componentWillUnmount=function(){var e=this.getWindow();e&&e.removeEventListener("resize",this.handleBrowserWindowResize)},t.prototype.componentDidUpdate=function(){var e=this.getDocument();if(this.props.appendTo&&e){var t=this.props.appendTo.getBoundingClientRect(),n=e.body.getBoundingClientRect();this.offSetCoordinates.x=t.left-n.left,this.offSetCoordinates.y=t.top-n.top}},t.prototype.render=function(){var e,t=this,n=r.Children.toArray(this.props.children),i=this.getContent(n),a=this.getActionBar(n),s=this.getCurrentZIndex(),c=Object(l.a)("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),u=r.createElement(v.a.Provider,{value:s},r.createElement(r.Fragment,null,this.props.modal&&r.createElement("div",{className:"k-overlay",style:L({zIndex:s},this.props.overlayStyle)}),r.createElement("div",L({},((e={})["data-windowid"]=this._id,e),{tabIndex:0,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,ref:function(e){t.windowElement=e,t.element=e},className:c,style:L({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:s},this.props.style)}),r.createElement(R,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},r.createElement(M.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},r.createElement(T,{stage:this.windowStage,onDoubleClick:this.props.doubleClickStageChange?this.handleDoubleClick:void 0,onMinimizeButtonClick:this.handleMinimize,onFullScreenButtonClick:this.handleFullscreen,onRestoreButtonClick:this.handleRestore,onCloseButtonClick:this.handleCloseWindow,closeButton:this.props.closeButton,minimizeButton:this.props.minimizeButton,maximizeButton:this.props.maximizeButton,restoreButton:this.props.restoreButton},this.props.title)),this.windowStage!==d.MINIMIZED?r.createElement(r.Fragment,null,r.createElement("div",{className:"k-window-content"},i),a):null,this.windowStage===d.DEFAULT&&this.props.resizable?r.createElement(_,{onResize:this.handleResize}):null))));return g.a?null!==this.props.appendTo?o.createPortal(u,this.props.appendTo||document.body):u:null},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.top||this.state.top,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.windowStage!==d.FULLSCREEN?Math.max(this.props.left||this.state.left,0):0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){var e=this.props.width||this.state.width;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetWidth;var t=this.getWindow();e=t?t.innerWidth:0}return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){var e=this.props.height||this.state.height;if(this.windowStage===d.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetHeight;var t=this.getWindow();e=t?t.innerHeight:0}else this.windowStage===d.MINIMIZED&&(e=0);return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"windowStage",{get:function(){return this.props.stage||this.state.stage},enumerable:!0,configurable:!0}),t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===A}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==A}))},t.displayName="Window",t.propTypes={width:i.number,height:i.number,left:i.number,top:i.number,initialWidth:i.number,initialHeight:i.number,initialLeft:i.number,initialTop:i.number,minWidth:i.number,minHeight:i.number,resizable:i.bool,draggable:i.bool,title:i.any,shouldUpdateOnDrag:i.bool,stage:i.oneOf(["DEFAULT","MINIMIZED","FULLSCREEN"]),className:i.string,style:i.object,overlayStyle:i.object},t.defaultProps={minWidth:120,minHeight:100,resizable:!0,draggable:!0,modal:!1,doubleClickStageChange:!0},t.contextType=v.a,t}(r.Component),V=Object(y.a)(),H=Object(y.b)(V,B);H.displayName="KendoReactWindow"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e){var t=e.onFocus,n=e.onBlur,o=e.onSyncFocus,i=e.onSyncBlur,a=r.useRef(!1),s=r.useRef(0),l=r.useCallback((function(e){clearTimeout(s.current),s.current=window.setTimeout((function(){return e()}))}),[s]),c=r.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(s.current),o&&o.call.apply(o,[void 0].concat(e)),a.current||(a.current=!0,t&&t.call.apply(t,[void 0].concat(e)))}),[a,t,o]),u=r.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i&&i.call.apply(i,[void 0].concat(e)),l((function(){a.current&&n&&(a.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[a,l,n,i]);return r.useEffect((function(){return function(){clearTimeout(s.current)}}),[]),{onFocus:c,onBlur:u}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=function(e,t){return r.useContext(e)(t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=':not(.k-disabled):not([disabled]):not([disabled="true"])',o=["button"+r,".k-button-group > button"+r,".k-dropdown > .k-dropdown-wrap"+r,".k-colorpicker > .k-picker-wrap"+r];t.a={styles:{button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-disabled","group-start":"k-group-start","group-end":"k-group-end","button-group":"k-button-group","button-group-stretched":"k-button-group-stretched",ltr:"k-ltr",rtl:"k-rtl"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),function(e){e.remove="remove",e.add="add",e.reorder="reorder"}(r||(r={}));var o=function(e,t){switch(t.type){case r.add:break;case r.remove:return e.filter((function(e){return e[t.valueField]!==t.payload}));case r.reorder:break;default:return e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(43),o={};function i(e){if(o[e])return o[e];var t=Object(r.a)(e);return o[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},o[e]}o.undefined=function(){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),o=function(e,t,n){void 0===n&&(n={});var o=r.useCallback((function(r){n.onMouseDown&&n.onMouseDown.call(void 0,r),e.onMouseDown&&e.onMouseDown.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseDown,e.onMouseDown,t]),i=r.useCallback((function(r){n.onMouseUp&&n.onMouseUp.call(void 0,r),e.onMouseUp&&e.onMouseUp.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseUp,e.onMouseUp,t]);return{onClick:r.useCallback((function(r){n.onClick&&n.onClick.call(void 0,r),e.onClick&&e.onClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onClick,e.onClick,t]),onMouseUp:i,onMouseDown:o,onDoubleClick:r.useCallback((function(r){n.onDoubleClick&&n.onDoubleClick.call(void 0,r),e.onDoubleClick&&e.onDoubleClick.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onDoubleClick,e.onDoubleClick,t]),onMouseEnter:r.useCallback((function(r){n.onMouseEnter&&n.onMouseEnter.call(void 0,r),e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseEnter,e.onMouseEnter,t]),onMouseLeave:r.useCallback((function(r){n.onMouseLeave&&n.onMouseLeave.call(void 0,r),e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseLeave,e.onMouseLeave,t]),onMouseMove:r.useCallback((function(r){n.onMouseMove&&n.onMouseMove.call(void 0,r),e.onMouseMove&&e.onMouseMove.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseMove,e.onMouseMove,t]),onMouseOut:r.useCallback((function(r){n.onMouseOut&&n.onMouseOut.call(void 0,r),e.onMouseOut&&e.onMouseOut.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOut,e.onMouseOut,t]),onMouseOver:r.useCallback((function(r){n.onMouseOver&&n.onMouseOver.call(void 0,r),e.onMouseOver&&e.onMouseOver.call(void 0,{target:t.current,syntheticEvent:r})}),[n.onMouseOver,e.onMouseOver,t])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t,n){var r="string"==typeof e?parseInt(e,void 0):e;if(NaN!==r)return void 0!==r?r:t?n?void 0:-1:0}},function(e,t){e.exports=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426537,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r,o=n(0),i=n(1),a=n(10),s=n(6),l=n(40),c=n(20),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},f=c.a.styles,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=o.createRef(),t}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this.elementRef.current},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.children,r=t.style,i=t.appear,s=t.enter,c=t.exit,u=t.transitionName,h=t.transitionEnterDuration,m=t.transitionExitDuration,v=t.className,g=t.onEnter,y=t.onEntering,b=t.onEntered,k=t.onExit,w=t.onExiting,C=t.onExited,O=t.onAfterExited,x=t.mountOnEnter,S=t.unmountOnExit,E=t.animationEnteringStyle,I=t.animationEnteredStyle,N=t.animationExitingStyle,T=t.animationExitedStyle,M=p(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onAfterExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),D=Object(a.a)(v,f["child-animation-container"]),P=d({transitionDelay:"0ms"},r),_={entering:d({transitionDuration:h+"ms"},E),entered:d({},I),exiting:d({transitionDuration:m+"ms"},N),exited:d({},T)},j={in:this.props.in,appear:i,enter:s,exit:c,mountOnEnter:x,unmountOnExit:S,timeout:{enter:h,exit:m},onEnter:function(){g&&g.call(void 0,{animatedElement:e.element,target:e})},onEntering:function(){y&&y.call(void 0,{animatedElement:e.element,target:e})},onEntered:function(){b&&b.call(void 0,{animatedElement:e.element,target:e})},onExit:function(){k&&k.call(void 0,{animatedElement:e.element,target:e})},onExiting:function(){w&&w.call(void 0,{animatedElement:e.element,target:e})},onExited:function(){O&&O.call(void 0,{animatedElement:e.element,target:e}),C&&C.call(void 0,{animatedElement:e.element,target:e})},classNames:{appear:f[u+"-appear"]||u+"-appear",appearActive:f[u+"-appear-active"]||u+"-appear-active",enter:f[u+"-enter"]||u+"-enter",enterActive:f[u+"-enter-active"]||u+"-enter-active",exit:f[u+"-exit"]||u+"-exit",exitActive:f[u+"-exit-active"]||u+"-exit-active"}};return o.createElement(l.CSSTransition,d({},j,M,{nodeRef:this.elementRef}),(function(t){return o.createElement("div",{style:d({},P,_[t]),className:D,ref:e.elementRef},n)}))},t.propTypes={in:i.bool,children:i.oneOfType([i.arrayOf(i.node),i.node]),transitionName:i.string.isRequired,className:i.string,appear:i.bool,enter:i.bool,exit:i.bool,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired,mountOnEnter:i.bool,unmountOnExit:i.bool,animationEnteringStyle:i.object,animationEnteredStyle:i.object,animationExitingStyle:i.object,animationExitedStyle:i.object},t.defaultProps={mountOnEnter:!0,unmountOnExit:!1,onEnter:s.a,onEntering:s.a,onEntered:s.a,onExit:s.a,onExiting:s.a,onExited:s.a,onAfterExited:s.a,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}},t}(o.Component),m=n(21),v={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426356,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(){return(y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},k=c.a.styles,w=function(e){function t(t){var n=e.call(this,t)||this;return Object(m.a)(v),n}return g(t,e),t.prototype.render=function(){var e=this.props,t=e.id,n=e.style,r=e.children,i=e.component,s=e.className,c=e.childFactory,u=(e.stackChildren,e.componentChildStyle),d=e.componentChildClassName,p=b(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),f={id:t,style:n,component:i,childFactory:c,className:Object(a.a)(k["animation-container"],k["animation-container-relative"],s)},m=o.Children.map(r||null,(function(e){return o.createElement(h,y({},p,{style:u,className:d}),e)}));return o.createElement(l.TransitionGroup,y({},f),m)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any,transitionName:i.string.isRequired,appear:i.bool.isRequired,enter:i.bool.isRequired,exit:i.bool.isRequired,transitionEnterDuration:i.number.isRequired,transitionExitDuration:i.number.isRequired},t.defaultProps={component:"div"},t}(o.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function o(e){var t=[];return e.replace(r,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);t.editorPropsKey=new r.PluginKey("editor-props")},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(74),i=n(61),a=n(5),s=n(45);!function(e){e.alignBlocks=function(e,t,n){return Boolean(a.alignBlocks(t,n)(e.state,e.dispatch))},e.applyInlineStyle=function(e,t,n){return a.applyInlineStyle(t,n)(e.state,e.dispatch)},e.applyLink=function(e,t,n){return a.applyLink(t,n)(e.state,e.dispatch)},e.canIndentList=function(e,t){return a.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return a.canInsert(e,t)},e.canOutdentList=function(e,t){return a.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return a.convertMsLists(e)},e.createDocument=function(e,t,n){return a.parseContent(a.trimWhitespace(t),e,void 0!==n?n:{preserveWhitespace:"full"})},e.createTable=function(e,t,n){return a.createTable(e,t,n)},e.formatBlockElements=function(e,t,n){return a.formatBlockElements(t,n)(e.state,e.dispatch)},e.getBlockFormats=function(e){return a.getBlockFormats(e)},e.getHtml=function(e){return a.getHtml(e)},e.getInlineStyles=function(e,t){return a.getInlineStyles(e,t)},e.getMark=function(e,t){return a.getMark(e,t)},e.hasMark=function(e,t){return a.hasMark(e,t)},e.hasNode=function(e,t){return a.hasNode(e,t)},e.indentBlocks=function(e,t,n,r){return Boolean(a.indentBlocks(t,n,r)(e.state,e.dispatch))},e.indentHtml=function(e){return a.indentHtml(e)},e.insertNode=function(e,t,n){a.insertNode(t,n)(e.state,e.dispatch)},e.isAligned=function(e,t){return a.isAligned(e,t)},e.isIndented=function(e,t,n){return a.isIndented(e,t,n)},e.removeComments=function(e){return a.removeComments(e)},e.removeTag=function(e,t){return a.removeTag(e,t)},e.pasteCleanup=function(e,t){return a.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){a.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){a.sanitizeStyleAttr(e)},e.removeAttribute=function(e){a.removeAttribute(e)},e.sanitize=function(e){return a.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return a.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return a.textHighlight(e)},e.imageResizing=function(e){return a.imageResizing(e)},e.tableResizing=function(){return a.tableResizing()},e.setHtml=function(e,t,n,r){var o=a.trimWhitespace(t);a.setHtml(o,n,r)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,n,r){return a.toggleInlineFormat(t,n,r)(e.state,e.dispatch)},e.toggleList=function(e,t,n){return a.toggleList(e.state,e.dispatch,e,t,n)},e.getShortcuts=function(e){return o.getShortcuts(e)},e.propsKey=s.editorPropsKey,e.imageResizeKey=a.imageResizeKey,e.marks=r({},i.marks),e.nodes=r({},i.nodes)}(t.EditorUtils||(t.EditorUtils={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return ce})),n.d(t,"a",(function(){return ue}));var r=n(0),o=n(15),i=n(1),a=function(e){e.style.transitionDuration="",Array.from(e.classList).forEach((function(t){t.startsWith("k-slide-")&&e.classList.remove(t)}))},s="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),l=n(21),c=n(19),u=n(54),d=n(10),p="bottom",f="center",h="middle",m="left",v="right",g="top";function y(e){return e.ownerDocument||e.document||e}var b=function(e){return y(e).defaultView},k=function(e){return y(e).documentElement},w=0;function C(){if(!w&&"undefined"!=typeof document){var e=document.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML="&nbsp;",document.body.appendChild(e),w=e.offsetWidth-e.scrollWidth,document.body.removeChild(e)}return w}function O(e){var t=b(e),n=k(e),r={height:t.innerHeight,width:t.innerWidth};return n.scrollHeight-n.clientHeight>0&&(r.width-=C()),r}var x=function(e){for(var t=e.offsetParent;t&&"static"===t.style.position;)t=t.offsetParent;return t||k(e)},S=function(e){var t=e.getBoundingClientRect(),n=t.left,r=t.top;return t.height||t.width||(t=function(e){var t=e.style,n=t.display,r=t.left,o=t.position;e.style.display="",e.style.left="-10000px",e.style.position="absolute";var i=e.getBoundingClientRect();return e.style.display=n,e.style.left=r,e.style.position=o,i}(e)),{top:r,left:n,height:t.height,width:t.width}},E=function(e,t){for(var n=[],r=e.parentNode;r&&(n.push(r),r!==t);)r=r.parentNode;return n};function I(e){var t=k(e),n=b(e);return{x:n.pageXOffset||t.scrollLeft||0,y:n.pageYOffset||t.scrollTop||0}}var N=function(e){return e===(e.ownerDocument||{}).body?I(e):{x:e.scrollLeft,y:e.scrollTop}};var T=function(e,t){var n=b(e),r=n.getComputedStyle(e),o=S(e),i=t||x(e),a=e.ownerDocument,s=i!==a.body&&i!==a.documentElement,l={top:0,left:0};if("fixed"!==r.position&&s){var c=n.getComputedStyle(i);(l=S(i)).top+=parseInt(c.borderTopWidth,10),l.left+=parseInt(c.borderLeftWidth,10)}return{top:o.top-l.top,left:o.left-l.left,height:o.height,width:o.width}},M=function(e,t){return e?N(e):function(e){var t=x(e);return t?N(t):{x:0,y:0}}(t)};var D="fit",P="flip",_="none",j=function(e,t,n){var r=0;return e+t>n&&(r=n-(e+t)),e<0&&(r=-e),r},R=function(e){var t=e.offset,n=e.size,r=e.anchorSize,o=e.viewPortSize,i=e.anchorAlignPoint,a=e.elementAlignPoint,s=0,l=2*e.margin;if(a!==i&&!(a===f||a===h)&&!(i===f||i===h)){var c=i===g||i===m;t<0&&c?t+(s=n+r+l)+n>o&&(s=0):t>=0&&!c&&(t+n>o&&(s+=-(r+n+l)),t+s<0&&(s=0))}return s},A=function(e){for(var t=[],n=e.parentNode.firstElementChild;n;)n!==e&&t.push(n),n=n.nextElementSibling;return t},F=function(e,t){for(var n,r,o=E(e),i=t;i&&(n=A(i),!(r=o.reduce((function(e,t){return e.concat(n.filter((function(e){return e===t})))}),[])[0]));)i=i.parentElement;return r};var z,L,B,V,H=(z=function(e){if(!K())return!1;var t=e?e.ownerDocument:document;if(!t||!t.body)return!1;var n=t.createElement("div");n.style.transform="matrix(10, 0, 0, 10, 0, 0)",n.innerHTML='<div style="position: fixed; top: 10px;">child</div>',t.body.appendChild(n);var r=10!==n.children[0].getBoundingClientRect().top;return t.body.removeChild(n),r},B=!1,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return B||(L=z.apply(void 0,e),B=!0),L}),K=function(){return Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},W={eitherRect:function(e,t){return e||{height:0,left:t.left,top:t.top,width:0}},scaleRect:function(e,t){return e&&1!==t?{height:e.height/t,left:e.left/t,top:e.top/t,width:e.width/t}:e},removeStackingOffset:function(e,t){return t?{height:e.height,left:e.left-t.left,top:e.top-t.top,width:e.width}:e},hasRelativeStackingContext:H,canUseDOM:K},$=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],q=function(){return W.canUseDOM()?window:null},U=/auto|scroll/,G=function(e){return function(e){return""+e.style.overflow+e.style.overflowX+e.style.overflowY}(e)||function(e){var t=window.getComputedStyle(e);return""+t.overflow+t.overflowX+t.overflowY}(e)},X=function(e){if(!e||!W.hasRelativeStackingContext())return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},J=function(){return W.canUseDOM()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},Y={addOffset:function(e,t){return{left:e.left+t.left,top:e.top+t.top}},addScroll:function(e,t){return{top:e.top+t.y,left:e.left+t.x,height:e.height,width:e.width}},align:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.margin;void 0===i&&(i={});var a=n.horizontal,s=n.vertical,l=o.horizontal,c=o.vertical,u=i.horizontal||0,d=i.vertical||0,m=t.top,g=t.left;return s===p&&(m+=t.height),s!==f&&s!==h||(m+=Math.round(t.height/2)),c===p&&(m-=r.height,d*=-1),c!==f&&c!==h||(m-=Math.round(r.height/2),d*=-1),a===v&&(g+=t.width),a!==f&&a!==h||(g+=Math.round(t.width/2)),l===v&&(g-=r.width,u*=-1),l!==f&&l!==h||(g-=Math.round(r.width/2),u*=-1),{top:m+d,left:g+u}},boundingOffset:function(e){if(!e.getBoundingClientRect){var t=O(e);return{bottom:t.height,left:0,right:t.width,top:0}}var n=e.getBoundingClientRect();return{bottom:n.bottom,left:n.left,right:n.right,top:n.top}},getFontStyles:function(e){var t=q();if(!t||!e)return[];var n=t.getComputedStyle(e);return $.map((function(e){return{key:e,value:n[e]}}))},getWindow:q,hasOffsetParent:function(e){return!!e&&Boolean(e.offsetParent)},offset:function(e){return e?S(e):null},offsetAtPoint:function(e,t){if(!e)return null;var n=e.style,r=n.left,o=n.top,i=n.transition;e.style.transition="none",e.style.left=t.left+"px",e.style.top=t.top+"px";var a=S(e);return e.style.left=r,e.style.top=o,e.offsetHeight,e.style.transition=i,a},position:function(e,t,n){return e&&t?function(e,t,n){void 0===n&&(n=1);var r=t?x(t):null,o=T(e,r),i=o.top,a=o.left,s=o.height,l=o.width,c=M(r,e),u=c.x,d=c.y,p=e.ownerDocument,f=r===p.body||r===p.documentElement?1:n;return{top:i+d*f,left:a+u*f,height:s,width:l}}(e,t,n||1):null},removeScroll:function(e,t){return{top:e.top-t.y,left:e.left-t.x,height:e.height,width:e.width}},restrictToView:function(e){var t=e.anchorRect,n=e.anchorAlign,r=e.elementRect,o=e.elementAlign,i=e.collisions,a=e.viewPort,s=e.margin;void 0===s&&(s={});var l=r.top,c=r.left,u=r.height,d=r.width,p=a.height,f=a.width,h=s.horizontal||0,m=s.vertical||0,v=0,g=0,y=i.vertical===D,b=i.horizontal===D,k=i.vertical===P,w=i.horizontal===P;y&&(g+=j(l,u,p)),b&&(v+=j(c,d,f)),k&&(g+=R({margin:m,offset:l,size:u,anchorSize:t.height,viewPortSize:p,anchorAlignPoint:n.vertical,elementAlignPoint:o.vertical})),w&&(v+=R({margin:h,offset:c,size:d,anchorSize:t.width,viewPortSize:f,anchorAlignPoint:n.horizontal,elementAlignPoint:o.horizontal}));var C=k&&0!==g,O=w&&0!==v,x=y&&0!==g,S=b&&0!==v;return{flipped:O||C,fitted:x||S,flip:{horizontal:O,vertical:C},fit:{horizontal:S,vertical:x},offset:{left:v,top:g}}},scrollPosition:I,scrollableParents:function(e){var t=[];if(!W.canUseDOM())return t;for(var n=e.parentElement;n;)(U.test(G(n))||n.hasAttribute("data-scrollable"))&&t.push(n),n=n.parentElement;return t.push(window),t},getRelativeContextElement:X,stackingElementOffset:function(e){var t=X(e);return t?S(t):null},stackingElementScroll:function(e){var t=X(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},stackingElementViewPort:function(e){var t=X(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},useRelativePosition:function(e){return Boolean(X(e))},windowViewPort:O,zoomLevel:J,isZoomed:function(){return J()>1},zIndex:function(e,t){if(!e||!W.canUseDOM())return null;var n=F(e,t);if(!n)return null;var r=[e].concat(E(e,n)).reduce((function(e,t){var n=t.style.zIndex||window.getComputedStyle(t).zIndex,r=parseInt(n,10);return r>e?r:e}),0);return r?r+1:null}},Z=function(e,t){return e?{x:0,y:0}:Y.scrollPosition(t)},Q=function(e){var t=e.anchor,n=e.element,r=e.anchorAlign,o=e.elementAlign,i=e.margin,a=e.offset,s=e.positionMode,l=e.scale||1,c="fixed"===s||!Y.hasOffsetParent(n)?function(e,t,n,r){var o=Z(e,t),i=W.eitherRect(Y.offset(e),n),a=2*r,s=Y.stackingElementScroll(t);1!==r&&s&&(s.x/=a,s.y/=a);var l=Y.stackingElementOffset(t);return 1!==r&&l&&(l.left/=a,l.top/=a),Y.removeScroll(Y.addScroll(W.removeStackingOffset(W.scaleRect(i,r),l),s),o)}(t,n,a,l):function(e,t,n,r){var o=W.eitherRect(Y.position(e,t,r),n);return W.scaleRect(o,r)}(t,n,a,l),u=W.scaleRect(Y.offset(n),l);return Y.align({anchorAlign:r,anchorRect:c,elementAlign:o,elementRect:u,margin:i})},ee=function(e){var t=e.anchor,n=e.currentLocation,r=e.element,o=e.anchorAlign,i=e.elementAlign,a=e.collisions,s=e.margin,l=e.scale||1,c=Y.offsetAtPoint(r,n),u=W.scaleRect(c,l),d=W.scaleRect(Y.offset(t),l),p=W.eitherRect(d,n),f=e.viewPort||Y.windowViewPort(r);f.width=f.width/l,f.height=f.height/l;var h=Y.restrictToView({anchorAlign:o,anchorRect:p,collisions:a,elementAlign:i,elementRect:u,margin:s,viewPort:f}),m=Y.addOffset(n,h.offset);return{flip:h.flip,flipped:h.flipped,offset:m}},te={name:"@progress/kendo-react-popup",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426383,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},ne=(V=function(e,t){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),re=function(){return(re=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function oe(e,t){if(e===t)return!0;if(!!e!=!!t)return!1;var n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(e[i]!==t[i])return!1}return!0}var ie,ae={left:-1e3,top:0};!function(e){e.hiding="hiding",e.hidden="hidden",e.showing="showing",e.shown="shown",e.reposition="reposition"}(ie||(ie={}));var se=function(e){function t(t){var n=e.call(this,t)||this;return n.state={current:ie.hidden,previous:ie.hidden,props:{}},n._popup=null,n.show=function(e){n.setPosition(e),n.animate(e.firstChild,"enter",n.onOpened),n.setState({current:ie.shown,previous:n.state.current})},n.setPosition=function(e){var t=n.props,r=t.anchorAlign,o=t.popupAlign,i=t.collision,a=t.offset,s=t.anchor,l=t.margin,c=t.scale,u=t.positionMode,d=Q({anchor:s,anchorAlign:r,element:e,elementAlign:o,offset:a,margin:l,positionMode:u,scale:c}),p=ee({anchor:s,anchorAlign:r,element:e,elementAlign:o,collisions:i,currentLocation:d,margin:n.props.margin});if(e.style.top=p.offset.top+"px",e.style.left=p.offset.left+"px",n._collisions={fit:p.fit,fitted:p.fitted,flip:p.flip,flipped:p.flipped},n.props.onPosition){var f={target:n,flipped:p.flipped,fitted:p.fitted};n.props.onPosition.call(void 0,f)}},n.onOpened=function(){var e=n._popup;e&&(n.props.show&&e.classList.add("k-animation-container-shown"),n.attachRepositionHandlers(e),n.props.onOpen&&n.props.onOpen.call(void 0,{target:n}))},n.animate=function(e,t,r){if(n.props.popupAlign){var o,i=n.props.popupAlign,l=i.horizontal,c=i.vertical;o="left"===l&&"center"===c?"right":"right"===l&&"center"===c?"left":"top"===c?"down":"up";n._collisions&&n._collisions.flipped&&(o={down:"up",up:"down",left:"right",right:"left"}[o]),function(e,t,n,r,o){if(0===n)return o();var i="k-slide-"+t+"-"+r,l=i+"-active",c=function(t){t.target===e&&(e.removeEventListener("transitionend",c),a(e),o())};e.addEventListener("transitionend",c);var u=e.ownerDocument;if(u){var d=u.defaultView;if(d){var p=function(){a(e),e.classList.add(i),d.requestAnimationFrame((function(){e.style.transitionDuration=n+"ms",e.classList.add(l)}))};s?d.requestAnimationFrame(p):p()}}}(e,o,n.animationDuration[t],t,r)}},n.onClosing=function(e){n.props.show||e.classList.remove("k-animation-container-shown"),n.detachRepositionHandlers()},n.onClosed=function(){n.state.current===ie.hiding&&n.state.previous===ie.shown&&n.setState({current:ie.hidden,previous:n.state.current}),n.props.onClose&&n.props.onClose.call(void 0,{target:n})},n.getCurrentZIndex=function(){return n.context?n.context+1:100},Object(l.a)(te),n.reposition=function(e,t,n){var r,o,i,a;void 0===n&&(n={});var s=0;n=n||{};var l=function(){s=!1===n.leading?0:(new Date).getTime(),r=null,a=e.apply(o,i),r||(o=i=null)};return function(){var c=(new Date).getTime();s||!1!==n.leading||(s=c);var u=t-(c-s);return o=this,i=arguments,u<=0||u>t?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=window.setTimeout(l,u)),a}}(n.reposition.bind(n),1e3/60),n}return ne(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._popup},enumerable:!0,configurable:!0}),t.getDerivedStateFromProps=function(e,t){var n=e.show,r=e.anchor,o=e.anchorAlign,i=e.appendTo,a=e.collision,s=e.popupAlign,l=e.className,c=e.popupClass,u=e.style,d=e.offset,p=e.contentKey,f=re({},t,{props:{show:n,anchor:r,anchorAlign:o,appendTo:i,collision:a,popupAlign:s,className:l,popupClass:c,style:u,offset:d,contentKey:p}});return e.show?t.current===ie.hidden||t.current===ie.hiding?re({},f,{current:ie.showing,previous:t.current}):t.current===ie.showing?re({},f,{current:ie.shown,previous:t.current}):t.current!==ie.shown||oe(d,t.props.offset)&&oe(o,t.props.anchorAlign)&&oe(i,t.props.appendTo)&&oe(a,t.props.collision)&&oe(s,t.props.popupAlign)&&oe(u,t.props.style)&&r===t.props.anchor&&c===t.props.popupClass&&l===t.props.className?f:re({},f,{current:ie.reposition,previous:t.current}):t.current===ie.hiding||t.current===ie.hidden?re({},f,{current:ie.hidden,previous:t.current}):re({},f,{current:ie.hiding,previous:t.current})},t.prototype.componentDidUpdate=function(e){this.state.current===ie.showing&&this._popup?this.show(this._popup):this.state.current===ie.hiding&&this._popup?(this.onClosing(this._popup),this.animate(this._popup.firstChild,"exit",this.onClosed)):this.state.current===ie.reposition&&this.state.previous===ie.shown?this.setState({current:ie.shown,previous:this.state.current}):this.state.current===ie.shown&&e.contentKey!==this.props.contentKey&&this._popup&&this.setPosition(this._popup)},t.prototype.componentDidMount=function(){this.state.current===ie.showing&&this._popup&&this.show(this._popup)},t.prototype.componentWillUnmount=function(){this.detachRepositionHandlers()},t.prototype.render=function(){var e=this,t=this.props,n=t.children,i=t.className,a=t.popupClass,s=t.show,l=t.id,p=t.positionMode,f=this.props.appendTo?this.props.appendTo:c.a?this.props.anchor&&this.props.anchor.ownerDocument?this.props.anchor.ownerDocument.body:document.body:void 0;this.state.current===ie.reposition&&this.state.previous===ie.shown&&this._popup&&this.setPosition(this._popup);var h=Object.assign({},{position:p,top:0,left:-1e4},this.props.style||{}),m=this.state.current===ie.hiding;if((s||m)&&f){var v=this.getCurrentZIndex(),g=r.createElement(u.a.Provider,{value:v},r.createElement("div",{className:Object(d.a)("k-animation-container","k-animation-container-relative",i),id:l,ref:function(t){return e._popup=t},style:re({zIndex:v},h)},r.createElement("div",{className:Object(d.a)("k-popup",a,"k-child-animation-container"),style:{transitionDelay:"0ms"}},n)));return null!==this.props.appendTo?o.createPortal(g,f):g}return null},Object.defineProperty(t.prototype,"animationDuration",{get:function(){var e=this.props.animate,t=0,n=0;return e&&(!0===e?t=n=300:(t=e.openDuration||0,n=e.closeDuration||0)),{enter:t,exit:n}},enumerable:!0,configurable:!0}),t.prototype.attachRepositionHandlers=function(e){var t=this;this.detachRepositionHandlers(),this._scrollableParents=Y.scrollableParents(this.props.anchor||e),this._scrollableParents.map((function(e){return e.addEventListener("scroll",t.reposition)})),window.addEventListener("resize",this.reposition)},t.prototype.detachRepositionHandlers=function(){var e=this;this._scrollableParents&&(this._scrollableParents.map((function(t){return t.removeEventListener("scroll",e.reposition)})),this._scrollableParents=void 0),window.removeEventListener("resize",this.reposition)},t.prototype.reposition=function(){this.setState({current:ie.reposition,previous:this.state.current})},t.propTypes={anchor:function(e){var t=e.anchor;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed."):null},appendTo:function(e){var t=e.appendTo;return t&&"number"!=typeof t.nodeType?new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed."):null},className:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),id:i.string,popupClass:i.oneOfType([i.string,i.arrayOf(i.string),i.object]),collision:i.shape({horizontal:i.oneOf([D,P,_]),vertical:i.oneOf([D,P,_])}),anchorAlign:i.shape({horizontal:i.oneOf([m,f,v]),vertical:i.oneOf([g,f,p])}),popupAlign:i.shape({horizontal:i.oneOf([m,f,v]),vertical:i.oneOf([g,f,p])}),offset:i.shape({left:i.number,top:i.number}),children:i.oneOfType([i.element,i.node]),show:i.bool,animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),margin:i.shape({horizontal:i.number,vertical:i.number}),positionMode:i.oneOf(["fixed","absolute"]),scale:i.number,style:i.object,onClose:i.func,onPosition:i.func,onOpen:i.func},t.defaultProps={collision:{horizontal:D,vertical:P},anchorAlign:{horizontal:m,vertical:p},popupAlign:{horizontal:m,vertical:g},offset:ae,animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},t.contextType=u.a,t.displayName="PopupComponent",t}(r.Component),le=function(){return(le=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ce=r.createContext((function(e){return e})),ue=r.forwardRef((function(e,t){var n=r.useContext(ce).call(void 0,e);return r.createElement(se,le({ref:t},n))}));ue.displayName="Popup"},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r,o=n(0),i=function(e,t){var n=0,r=null;return t.forEach((function(t){if(t&&e){var o=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=Math.max(r.top,n.top),i=Math.max(r.left,n.left),a=Math.min(r.left+r.width,n.left+n.width),s=Math.min(r.top+r.height,n.top+n.height),l=a-i,c=s-o;if(i<a&&o<s){var u=r.width*r.height,d=n.width*n.height,p=l*c;return Number((p/(u+d-p)).toFixed(4))}return 0}(e,t);o>n&&(n=o,r=t)}})),r},a=function(){var e=window&&window.navigator.userAgent;if(!e)return!1;var t=!1,n=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var o in r)if(r.hasOwnProperty(o)&&(n=e.match(r[o]))){(t={})[o]=!0,t[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.DOCUMENT_NODE||n[2],10);break}return t},s=function(e){return e&&e.ownerDocument||window.document},l=function(e){var t=a(),n=s(e);return t.edge||t.safari?n.body:n.documentElement},c=function(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=window.getComputedStyle(e,"overflow").overflow;return t.indexOf("auto")>-1||t.indexOf("scroll")>-1},u=function(e){var t=l(e);if(!e||e===document.body||e===document.documentElement)return t;for(var n=e;n&&n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&n.nodeType!==Node.DOCUMENT_NODE&&!c(n);)n=n.parentNode;return!n||n!==document.body&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?n:t};!function(e){e.POINTER_DOWN="pointerdown",e.POINTER_MOVE="pointermove",e.POINTER_UP="pointerup",e.POINTER_CANCEL="pointercancel",e.MOUSE_DOWN="mousedown",e.MOUSE_MOVE="mousemove",e.MOUSE_UP="mouseup",e.CONTEXT_MENU="contextmenu",e.TOUCH_START="touchstart",e.TOUCH_MOVE="touchmove",e.TOUCH_END="touchend",e.TOUCH_CANCEL="touchcancel",e.SCROLL="scroll",e.START="KENDO_DRAG_AND_DROP_START",e.MOVE="KENDO_DRAG_AND_DROP_MOVE",e.END="KENDO_DRAG_AND_DROP_END",e.CANCEL="KENDO_DRAG_AND_DROP_CANCEL"}(r||(r={}));var d=function(){},p=function(e,t,n){void 0===n&&(n={});var o,a,c,p,f=n.onIsPressedChange,h=void 0===f?d:f,m=n.onIsScrollingChange,v=void 0===m?d:m,g=n.onVelocityChange,y=void 0===g?d:g,b=n.onOffsetChange,k=void 0===b?d:b,w=n.onPageOffsetChange,C=void 0===w?d:w,O=n.onClientOffsetChange,x=void 0===O?d:O,S=n.onScrollOffsetChange,E=void 0===S?d:S,I=n.onInitialScrollOffsetChange,N=void 0===I?d:I,T=t.payload,M=T.element,D=T.hint,P=e.autoScrollDirection,_=e.scrollableParent,j=function(e,t){return function(e){return/^touch/.test(e.type)}(e)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,isTouch:!0,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:function(e){return/^(scroll)/.test(e.type)}(e)?{pageX:t.pageOffset.x,pageY:t.pageOffset.y,clientX:t.clientOffset.x,clientY:t.clientOffset.y,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,offsetX:t.offset.x,offsetY:t.offset.y,type:e.type,originalEvent:e,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,scrollX:t.scrollOffset.x,scrollY:t.scrollOffset.y,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,originalEvent:e}}(t.event,e);switch(j.type){case r.POINTER_DOWN:if(j.type===r.POINTER_DOWN&&(!j.originalEvent.isPrimary||0!==j.originalEvent.button))break;case r.MOUSE_DOWN:if(j.type===r.MOUSE_DOWN&&j.originalEvent.which&&j.originalEvent.which>1||e.ignoreMouse)break;case r.TOUCH_START:if(j.type===r.TOUCH_START&&1!==j.originalEvent.touches.length)break;case r.START:var R=_||u(t.payload.element);N(R instanceof Window?{x:R.scrollX,y:R.scrollY}:{x:R.scrollLeft,y:R.scrollTop}),x({x:j.clientX,y:j.clientY}),C({x:j.pageX,y:j.pageY}),k({x:j.offsetX,y:j.offsetY}),h(!0),T.onPress&&T.onPress(j);break;case r.SCROLL:if(j.type===r.SCROLL&&!e.pressed)break;var A=_||u(M),F=A instanceof Window?{x:A.scrollX,y:A.scrollY}:{x:A.scrollLeft,y:A.scrollTop};j.scrollX=F.x-e.initialScrollOffset.x,j.scrollY=F.y-e.initialScrollOffset.y,E({x:j.scrollX,y:j.scrollY});case r.POINTER_MOVE:if(j.type===r.POINTER_MOVE&&!j.originalEvent.isPrimary)break;case r.MOUSE_MOVE:case r.TOUCH_MOVE:if(j.type===r.TOUCH_MOVE&&1!==j.originalEvent.touches.length)break;case r.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==j.originalEvent.type&&M){var z=s(M),L=_||u(z.elementFromPoint(j.clientX,j.clientY)),B=function(e,t,n){var r={x:0,y:0};return e-n.left<50?r.x=-(50-(e-n.left)):n.right-e<50&&(r.x=50-(n.right-e)),t-n.top<50?r.y=-(50-(t-n.top)):n.bottom-t<50&&(r.y=50-(n.bottom-t)),r}(j.pageX,j.pageY,function(e,t){var n=l(e);if(e===n)return{top:n.scrollTop,left:n.scrollLeft,bottom:n.scrollTop+t.innerHeight,right:n.scrollLeft+t.innerWidth};var r=e.getBoundingClientRect();return{bottom:r.top+r.height,right:r.left+r.width,left:r.left,top:r.top}}(L,function(e){var t=s(e);return t&&t.defaultView||window}(M)));y({x:P&&!1===P.horizontal?0:B.x,y:P&&!1===P.vertical?0:B.y}),v(0!==B.y||0!==B.x)}!e.drag&&T.onDragStart&&T.onDragStart(j),T.onDrag&&T.onDrag(j);var V=i(D||M,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(D||M)}))),H=e.drops.find((function(e){return e.element===V}));H&&V&&(o=j.clientX,a=j.clientY,c=_||u(V),(p=c.getBoundingClientRect()).top<=a&&p.left<=o&&a<=p.bottom&&o<=p.right)&&V!==M?(e.drop&&e.drop.element)!==V?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(j),H.onDragEnter&&H.onDragEnter(j)):H.onDragOver&&H.onDragOver(j):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(j)}x({x:j.clientX,y:j.clientY}),C({x:j.pageX,y:j.pageY});break;case r.POINTER_UP:if(j.type===r.POINTER_UP&&!j.originalEvent.isPrimary)break;case r.MOUSE_UP:case r.TOUCH_END:if(j.type===r.TOUCH_END&&1!==j.originalEvent.touches.length)break;case r.END:h(!1),v(!1),T.onRelease&&T.onRelease(j),e.drop&&e.drop.onDrop&&e.drop.onDrop(j),T.onDragEnd&&T.onDragEnd(j);break;case r.POINTER_CANCEL:case r.CONTEXT_MENU:case r.TOUCH_CANCEL:case r.CANCEL:h(!1),v(!1),T.onDragEnd&&T.onDragEnd(j),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(j)}},f=function(e,t){if(e){var n,r;e===l(e)?(n=document.body.scrollHeight>window.innerHeight,r=document.body.scrollWidth>window.innerWidth):(n=e.offsetHeight<=e.scrollHeight,r=e.offsetWidth<=e.scrollWidth);var o=e.scrollTop+t.y,i=n&&o>0&&o<e.scrollHeight,a=e.scrollLeft+t.x,s=r&&a>0&&a<e.scrollWidth;i?e.scrollTop+=t.y:n&&o<0&&(e.scrollTop=0),s?e.scrollLeft+=t.x:r&&a<0&&(e.scrollLeft=0)}},h=n(6),m=n(30),v=n(13);function g(e,t,n){void 0===n&&(n={});var r=t.onPress,i=void 0===r?h.a:r,a=t.onRelease,s=void 0===a?h.a:a,l=t.onDragStart,c=void 0===l?h.a:l,d=t.onDrag,g=void 0===d?h.a:d,y=t.onDragEnd,b=void 0===y?h.a:y,k=n.hint,w=void 0===k?null:k,C=n.mouseOnly,O=void 0!==C&&C,x=n.autoScroll,S=void 0===x||x,E=n.scrollContainer,I=void 0===E?null:E,N=o.useState(!1),T=N[0],M=N[1],D=o.useState(!1),P=D[0],_=D[1],j=Object(m.a)(v.c)[0],R=Object(m.a)(v.a),A=R[0],F=R[1],z=o.useContext(v.d)[0],L=o.useContext(v.b),B=L[0],V=L[1],H=L[2],K=o.useRef({x:0,y:0}),W=o.useRef(),$=o.useRef(!1),q=o.useRef(),U=o.useRef(null),G=o.useRef(!1),X=o.useRef({x:0,y:0}),J=o.useRef({x:0,y:0}),Y=o.useRef({x:0,y:0}),Z=o.useRef({x:0,y:0}),Q=o.useRef({x:0,y:0}),ee=o.useRef({x:0,y:0}),te=Boolean("undefined"!=typeof window&&window.PointerEvent),ne=!O&&te,re=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),oe=o.useCallback((function(){return w&&w.current&&w.current.element?w.current.element:w?w.current:null}),[w]),ie=o.useCallback((function(){return I&&I.current&&I.current.element?I.current.element:I?I.current:null}),[I]),ae=o.useCallback((function(){return"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current&&S.boundaryElementRef.current.element?S.boundaryElementRef.current.element:"object"==typeof S&&S.boundaryElementRef&&S.boundaryElementRef.current?S.boundaryElementRef.current:null}),[S]),se=o.useRef(null);o.useImperativeHandle(se,(function(){return{element:re(),hint:oe(),onPress:ke,onDragStart:Ce,onDrag:Oe,onDragEnd:xe,onRelease:we,data:e.current}}));var le=o.useCallback((function(){var e=re();return e&&e.ownerDocument||document}),[re]),ce=o.useCallback((function(){var e=le();return e&&e.defaultView||window}),[le]),ue=o.useCallback((function(){return{drag:A?A.current:null,drop:j?j.current:null,drags:B.map((function(e){return e.current})),drops:z.map((function(e){return e.current})),pressed:T,ignoreMouse:$.current,scrollOffset:Q.current,offset:X.current,pageOffset:J.current,initialScrollOffset:ee.current,clientOffset:Y.current,initialClientOffset:Z.current,velocity:K.current,autoScroll:Boolean("object"==typeof S?!1!==S.enabled:S),scrollableParent:ae(),autoScrollDirection:"object"==typeof S?S.direction:{horizontal:!0,vertical:!0},isScrolling:P}}),[A,j,B,z,T,S,ae,P]),de=o.useCallback((function(e){M(e)}),[]),pe=o.useCallback((function(e){_(e)}),[]),fe=o.useCallback((function(e){K.current=e}),[]),he=o.useCallback((function(e){X.current=e}),[]),me=o.useCallback((function(e){Y.current=e}),[]),ve=o.useCallback((function(e){J.current=e}),[]),ge=o.useCallback((function(e){Z.current=e}),[]),ye=o.useCallback((function(e){Q.current=e}),[]),be=o.useCallback((function(e){ee.current=e}),[]),ke=o.useCallback((function(e){i(e)}),[i]),we=o.useCallback((function(e){s(e)}),[s]),Ce=o.useCallback((function(t){F(se,{target:e.current,event:t}),c(t)}),[F,e,c]),Oe=o.useCallback((function(e){g(e)}),[g]),xe=o.useCallback((function(t){G.current||(F(null,{target:e.current,event:t}),b(t))}),[b,F,e]),Se=o.useCallback((function(e){p(ue(),{event:e,payload:se.current},{onVelocityChange:fe,onOffsetChange:he,onClientOffsetChange:me,onPageOffsetChange:ve,onInitialClientOffsetChange:ge,onScrollOffsetChange:ye,onInitialScrollOffsetChange:be,onIsPressedChange:de,onIsScrollingChange:pe})}),[ue,fe,he,ve,me,ge,be,de,ye,pe]),Ee=o.useCallback((function(e){Se(e)}),[Se]),Ie=o.useCallback((function(e){Se(e)}),[Se]),Ne=o.useCallback((function(e){Se(e)}),[Se]),Te=o.useCallback((function(e){Se(e)}),[Se]),Me=o.useCallback((function(e){Se(e)}),[Se]),De=o.useCallback((function(e){Se(e)}),[Se]),Pe=o.useCallback((function(e){Se(e)}),[Se]),_e=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),je=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),Re=o.useCallback((function(e){e.preventDefault(),Se(e)}),[Se]),Ae=o.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=ce();$.current=!0,q.current=t.setTimeout((function(){$.current=!1}),2e3)}Se(e)}),[Se,ce]),Fe=o.useCallback((function(e){Se(e)}),[Se]),ze=o.useCallback((function(){var e=re();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[re]),Le=o.useCallback((function(){return V(se),function(){H(se)}}),[H,V]);o.useEffect((function(){var e=ce();if(P){var t=ie()||u(document.elementFromPoint(Y.current.x,Y.current.y));e.clearInterval(W.current),W.current=e.setInterval((function(){f(t,{x:K.current.x,y:K.current.y})}),50)}return function(){e.clearInterval(W.current)}}),[re,ie,ce,P]),o.useEffect(ze,[ze]),o.useEffect((function(){var e=ce(),t=re(),n=le();return ne?(t&&(U.current=u(t),U.current&&U.current.addEventListener("scroll",Fe,{passive:!0}),t.addEventListener("pointerdown",Ee,{passive:!0})),T&&(n.addEventListener("pointermove",Ie),n.addEventListener("pointerup",Te,!0),n.addEventListener("contextmenu",_e),n.addEventListener("pointercancel",Ne,{passive:!0}))):(e.addEventListener("touchmove",h.a,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",Me,{passive:!0}),O||(t.addEventListener("touchstart",je,{passive:!0}),T&&(t.addEventListener("touchmove",Re,{passive:!0}),t.addEventListener("touchend",Ae,{passive:!0})))),T&&(n.addEventListener("mousemove",De,{passive:!0}),n.addEventListener("mouseup",Pe,{passive:!0}))),function(){U.current&&U.current.removeEventListener("scroll",Fe),t&&(t.removeEventListener("pointerdown",Ee),t.removeEventListener("mousedown",Me),t.removeEventListener("touchstart",je),t.removeEventListener("touchmove",Re),t.removeEventListener("touchend",Ae)),n.removeEventListener("pointermove",Ie),n.removeEventListener("pointerup",Te,!0),n.removeEventListener("contextmenu",_e),n.removeEventListener("pointercancel",Ne),n.removeEventListener("mousemove",De),n.removeEventListener("mouseup",Pe),e.removeEventListener("touchmove",h.a),e.clearTimeout(q.current)}}),[T,ce,re,le,O,ne,_e,Me,De,Pe,Ne,Ee,Ie,Te,Ae,Re,je,Fe]),o.useEffect((function(){return function(){G.current=!0}}),[]),o.useLayoutEffect(Le,[Le])}},,function(e,t,n){"use strict";var r,o=n(0),i=n(1),a=n(10),s=n(22),l=n(21),c=n(11),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};var f=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,n.handleClick=function(e){n.toggleIfApplicable(),n.props.onClick&&n.props.onClick.call(void 0,e)},Object(l.a)(c.a),n.state={selected:!0===n.props.togglable&&!0===n.props.selected},n}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selected",{get:function(){return void 0!==this._selectedTemp?this._selectedTemp:this.state.selected},enumerable:!0,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.togglable&&void 0!==e.selected&&e.selected!==t.selected?{selected:e.selected}:null},t.prototype.render=function(){var e,n=this,r=this.props,i=r.children,l=r.togglable,c=r.icon,u=r.iconClass,f=r.imageUrl,h=r.imageAlt,m=(r.className,r.onClick,r.size),v=void 0===m?t.defaultProps.size:m,g=r.shape,y=void 0===g?t.defaultProps.shape:g,b=r.rounded,k=void 0===b?t.defaultProps.rounded:b,w=r.fillMode,C=void 0===w?t.defaultProps.fillMode:w,O=r.themeColor,x=void 0===O?t.defaultProps.themeColor:O,S=p(r,["children","togglable","icon","iconClass","imageUrl","imageAlt","className","onClick","size","shape","rounded","fillMode","themeColor"]),E=void 0!==c||void 0!==u||void 0!==f,I=void 0!==i,N=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass,i=e.imageAlt;if(t)return o.createElement("img",{role:"presentation",className:"k-button-icon",alt:i,src:t});if(n){var s=Object(a.a)("k-button-icon k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:s})}return r?o.createElement("span",{role:"presentation",className:Object(a.a)("k-button-icon",r)}):null}({icon:c,iconClass:u,imageUrl:f,imageAlt:h});return o.createElement("button",d({ref:function(e){return n._element=e},role:l?"checkbox":void 0,"aria-disabled":this.props.disabled||void 0,"aria-checked":l?this.state.selected:void 0},S,{onClick:this.handleClick,className:Object(a.a)("k-button",(e={},e["k-button-"+(s.a.sizeMap[v]||v)]=v,e["k-button-"+y]=y,e["k-button-"+C]=C,e["k-button-"+C+"-"+x]=Boolean(C&&x),e["k-rounded-"+(s.a.roundedMap[k]||k)]=k,e["k-icon-button"]=!I&&E,e["k-disabled"]=this.props.disabled,e["k-selected"]=this.state.selected,e["k-rtl"]="rtl"===this.props.dir,e),this.props.className)}),N,i&&o.createElement("span",{className:"k-button-text"},i))},t.prototype.toggleIfApplicable=function(){var e=this;if(this.props.togglable&&void 0===this.props.selected){var t=!this.state.selected;this._selectedTemp=t,this.setState({selected:t},(function(){return e._selectedTemp=void 0}))}},t.propTypes={children:i.node,selected:i.bool,togglable:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,imageAlt:i.string,size:i.oneOf([null,"small","medium","large"]),shape:i.oneOf([null,"rectangle","square"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"flat","link","outline","solid"]),themeColor:i.oneOf([null,"base","primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])},t.defaultProps={togglable:!1,size:"medium",shape:"rectangle",rounded:"medium",fillMode:"solid",themeColor:"base"},t}(o.Component);t.a=f},function(e,t,n){"use strict";var r,o=n(0),i=n(1),a=n(10),s=n(21),l=n(11),c=n(34),u=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=c.a.styles,f=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,Object(s.a)(l.a),n}return u(t,e),t.prototype.render=function(){var e,t=this,n=this.mapButtons(this.props.children),r=Object(a.a)([p["button-group"]],((e={})["k-disabled"]=this.props.disabled,e[p["button-group-stretched"]]=!!this.props.width,e),this.props.className),i={className:r,style:{width:""+this.props.width},dir:this.props.dir,role:"group","aria-disabled":this.props.disabled};return o.createElement("div",d({ref:function(e){t._element=e}},i,{className:r}),n)},t.prototype.mapButtons=function(e){var t=this,n=o.Children.count(e),r=void 0!==this.props.dir?"rtl"===this.props.dir:this._element&&"rtl"===getComputedStyle(this._element).direction||!1;return o.Children.map(e,(function(e,i){return o.isValidElement(e)?t.renderButton(e,i,i===n-1,r):e}))},t.prototype.renderButton=function(e,t,n,r){var i,s=Object(a.a)(e.props.className,((i={})[p["group-start"]]=r?n:0===t,i[p["group-end"]]=r?0===t:n,i)),l=d({},this.props.width?{width:this.props.width}:{},e.props.style||{}),c=this.props.disabled||e.props.disabled,u=d({},e.props,s?{className:s}:{},Object.keys(l).length?{style:l}:{},void 0!==c?{disabled:c}:{});return o.Children.count(e.props.children)>0?o.cloneElement(e,u,e.props.children):o.cloneElement(e,u)},t.propTypes={children:i.oneOfType([i.arrayOf(i.element),i.element]),className:i.string,disabled:i.bool,width:i.string,dir:i.string},t}(o.Component);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){var e,t,n="";for(e=0;e<32;e++)t=16*Math.random()|0,8!==e&&12!==e&&16!==e&&20!==e||(n+="-"),n+=(12===e?4:16===e?3&t|8:t).toString(16);return n}},function(e,t,n){"use strict";function r(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(0),o=r.createContext(0),i=function(){return r.useContext(o)};o.displayName="KendoReactZIndexContext"},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){if(e){if((e instanceof HTMLInputElement||-1!==e.tabIndex)&&e.focus)return void e.focus();var t=e.querySelector('input, [tabindex]:not([tabindex="-1"])');t&&t.focus&&t.focus()}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(29),o=n(19),i=function(){return!(!o.a||!document.body)&&(new r.a).scrollbarWidth},a=function(){if(!o.a||!document.body)return!1;var e=(new r.a).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")}},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return l}));var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t,n){var o;return n?r({},e,((o={})[t]=n.length?n.slice():void 0,o)):e&&e[t]?e[t].slice():[]}var i=function(e,t,n){return e.map((function(e){return function e(t,n,r){if(t[n]){var i=o(t,n).map((function(t){return e(t,n,r)}));return r(o(t,n,i))}return r(t)}(e,t,n)})).slice()},a=function(e,t,n,r){for(var o=e,i=[],a=0;a<t.length;a++)o=o[t[a]],o=Array.isArray(o)?o:o[n],i.push(o);var s=i.length>1?i[i.length-2]:e,l=t[t.length-1],c=r(s[l]);s.splice(l,1,c)},s=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},l=function(e,t,n){var r=[],o=t.slice();if(o.length){var i=e[o.shift()||0];for(r.push(i);o.length&&n;)i=i[n][o.shift()||0],r.push(i)}return r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),o=n(33),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=function(){return r.createContext((function(e){return e}))},s=function(e,t){return r.forwardRef((function(n,a){var s=Object(o.a)(e,n);return r.createElement(t,i({},s,{ref:a}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);function o(e,t,n){var o=r.useState(t),i=o[0],a=o[1];return r.useEffect((function(){if(!i&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&a(t)}}),n),i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(48),i=r.forwardRef((function(e,t){var n=r.useRef(null),i=r.useRef(null),a=r.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);r.useImperativeHandle(i,(function(){return{element:a()||null}})),r.useImperativeHandle(t,(function(){return i.current})),r.useImperativeHandle(e.childRef,(function(){return n.current}));var s=r.useCallback((function(t){e.onPress&&e.onPress({element:a(),target:i.current,event:t})}),[a,e.onPress]),l=r.useCallback((function(t){e.onRelease&&e.onRelease({element:a(),target:i.current,event:t})}),[a,e.onRelease]),c=r.useCallback((function(t){e.onDragStart&&e.onDragStart({element:a(),target:i.current,event:t})}),[e,a]),u=r.useCallback((function(t){e.onDrag&&e.onDrag({element:a(),target:i.current,event:t})}),[a,e.onDrag]),d=r.useCallback((function(t){e.onDragEnd&&e.onDragEnd({element:a(),target:i.current,event:t})}),[a,e.onDragEnd]);return Object(o.a)(n,{onPress:s,onRelease:l,onDragStart:c,onDrag:u,onDragEnd:d},{mouseOnly:e.mouseOnly,autoScroll:e.autoScroll,hint:e.hint,scrollContainer:e.scrollContainer}),e.children?r.cloneElement(r.Children.only(e.children),{ref:n}):null}));i.displayName="KendoReactDraggable"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);t.marks=r.marks,t.nodes=r.nodes},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(4),l=n(31),c=n(102),u=n(3),d=n(7),p=n(14),f=n(9),h=n(5),m={className:"k-checkbox k-checkbox-md k-rounded-md",type:"checkbox"},v=p.EditorToolsSettings.findAndReplace,g=function(e){function t(t){var n=e.call(this,t)||this;return n.onTabSelect=function(e){n.setState({selectedTab:e.selected})},n.onClose=function(){var e=n.props.view,t=e.state,r=t.tr.setSelection(h.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(r)),e.focus(),n.props.onClose.call(void 0)},n.matchesMessage=function(e){var t=n.state.matches,r=n.state.nextMatch,o=0,i=0;if(t&&r){var a=t.findIndex((function(e){return e.eq(r)}));o=-1===a?t.length:a+1,i=t.length}return f.formatString(e,o,i)},n.onFindNext=function(){n.onFind()},n.onFindPrev=function(){n.onFind(!0)},n.onFind=function(e){void 0===e&&(e=!1);var t=n.props.view,r=n.state,o=r.searchText,i=r.matchCase,a=r.matchCyclic,s={text:o,matchWord:r.matchWord,matchCase:i,useRegExp:r.useRegExp,backward:e,matchCyclic:a},l=h.find(t.state,s);if(l){var c=t.state.tr.setSelection(l);c.scrollIntoView(),t.updateState(t.state.apply(c)),n.setState({nextMatch:l})}},n.onReplace=function(){var e=n.props.view,t=e.state.selection,r=n.state.replaceText;if(!t.empty){var o=t.from,i=o+r.length,a=h.replace(t,r,e.state.tr);a.setSelection(h.TextSelection.create(a.doc,o,i)),a.scrollIntoView(),e.dispatch(a),n.setNextState({})}},n.onReplaceAll=function(){var e=n.props.view,t=n.state,r=t.searchText,o=t.replaceText,i=t.matchCase,a={text:r,matchWord:t.matchWord,matchCase:i,useRegExp:t.useRegExp};e.dispatch(h.replaceAll(e.state,o,a)),n.setNextState({})},n.onKeyDown=function(e){13===e.keyCode?n.onFindNext():27===e.keyCode&&n.onClose()},n.onMatchCaseChecked=function(e){return n.setNextState({matchCase:e.target.checked})},n.onMatchWordChecked=function(e){return n.setNextState({matchWord:e.target.checked})},n.onMatchCyclicChecked=function(e){return n.setNextState({matchCyclic:e.target.checked})},n.onUseRegExpChecked=function(e){return n.setNextState({useRegExp:e.target.checked})},n.onSearchChange=function(e){return n.setNextState({searchText:e.target.value})},n.onReplaceChange=function(e){return n.setNextState({replaceText:e.target.value})},n.setNextState=function(e){var t=i({},n.state,e,{matches:void 0,nextMatch:void 0}),r=n.props.view;if(t.searchText){var o=t.searchText,a=t.matchWord,s=t.matchCase,l=t.useRegExp,c=t.matchCyclic,u={text:o,matchWord:a,matchCase:s,useRegExp:l},d=r.state.selection,p=h.findAll(r.state.doc,u),f=!n.state.searchText&&p[0]||p.find((function(e){return e.from>=d.from}))||c&&p[0]||void 0;n.setState(i({},t,{matches:p,nextMatch:f}))}else n.setState(t)},n.state={selectedTab:0,searchText:h.selectedLineTextOnly(t.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1},n}return o(t,e),Object.defineProperty(t.prototype,"settings",{get:function(){return this.props.settings||v},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.view,r=this.state,o=r.matches,i=void 0===o?[]:o,a=r.nextMatch;if(t.nextMatch!==a){var s=n.state,l=s.tr,c=[];i.forEach((function(e){c.push({from:e.from,to:e.to,attrs:{class:a&&e.eq(a)?"k-text-selected":"k-text-highlighted"}})})),l.setMeta(h.textHighlightKey,c),l.setSelection(a||h.TextSelection.create(s.doc,s.selection.from)),n.dispatch(l)}},t.prototype.render=function(){var e=u.provideLocalizationService(this),t=this.settings.messages,n=t.findReplaceDialogTitle,r=t.findReplaceTabFind,o=t.findReplaceTabReplace,p=t.findReplaceFindWhat,f=t.findReplaceReplaceWith,h=t.findReplaceReplace,v=t.findReplaceReplaceAll,g=t.findReplaceMatchCase,y=t.findReplaceMatchWord,b=t.findReplaceMatchCyclic,k=t.findReplaceUseRegExp,w=t.findReplacePrevMatch,C=t.findReplaceNextMatch,O=t.findReplaceMatches,x=this.state,S=x.matchCase,E=x.matchWord,I=x.matchCyclic,N=x.useRegExp,T=x.searchText,M=x.replaceText,D=x.nextMatch,P=a.createElement("div",{className:"k-search-options"},a.createElement("span",null,a.createElement("input",i({},m,{id:"match-case",checked:S,onChange:this.onMatchCaseChecked})),a.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(g,d.messages[g]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-whole",checked:E,onChange:this.onMatchWordChecked})),a.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(y,d.messages[y]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"match-cyclic",checked:I,onChange:this.onMatchCyclicChecked})),a.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(b,d.messages[b]))),a.createElement("span",null,a.createElement("input",i({},m,{id:"regular-expression",checked:N,onChange:this.onUseRegExpChecked})),a.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(k,d.messages[k])))),_=a.createElement("div",{className:"k-matches-container"},a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},a.createElement("span",{className:"k-icon k-i-arrow-chevron-left"}),e.toLanguageString(w,d.messages[w])),a.createElement("span",null,this.matchesMessage(e.toLanguageString(O,d.messages[O]))),a.createElement(s.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(C,d.messages[C]),a.createElement("span",{className:"k-icon k-i-arrow-chevron-right"}))),j=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"findWhat"},e.toLanguageString(p,d.messages[p]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"findWhat",type:"text",className:"k-input",value:T,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))),R=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"replaceWith"},e.toLanguageString(f,d.messages[f]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"replaceWith",className:"k-input",type:"text",value:M,onChange:this.onReplaceChange})));return a.createElement(l.Window,{title:e.toLanguageString(n,d.messages[n]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:function(){return null},maximizeButton:function(){return null},appendTo:document.body},a.createElement(c.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},a.createElement(c.TabStripTab,{title:e.toLanguageString(r,d.messages[r])},a.createElement("div",{className:"k-edit-form-container"},j),P,_),a.createElement(c.TabStripTab,{title:e.toLanguageString(o,d.messages[o])},a.createElement("div",{className:"k-edit-form-container"},j,R),a.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplace},e.toLanguageString(h,d.messages[h])),a.createElement(s.Button,{disabled:!Boolean(D),onClick:this.onReplaceAll},e.toLanguageString(v,d.messages[v]))),P,_)))},t}(a.Component);t.FindAndReplaceDialog=g,u.registerForLocalization(g)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),s=n(17),l=n(81);!function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.pointerdown=!1,t.onWindowDown=function(e){var n=t.props.anchor;(!n||n!==e.target&&n.firstElementChild!==e.target)&&(t.props.show&&!t.pointerdown&&t.props.onClose(),t.pointerdown=!1)},t.onPointerDown=function(){return t.pointerdown=!0},t}return o(t,e),t.prototype.componentDidUpdate=function(e){e.show&&this.props.show&&this.props.onClose()},t.prototype.componentDidMount=function(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)},t.prototype.componentWillUnmount=function(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)},t.prototype.render=function(){var e=this.props,n=e.show,r=e.anchor,o=e.dir,a=e.rows,c=void 0===a?t.defaultProps.rows:a,u=e.columns,d=void 0===u?t.defaultProps.columns:u,p="rtl"===o?"right":"left";return i.createElement(s.Popup,{anchor:r,anchorAlign:{horizontal:p,vertical:"bottom"},popupAlign:{horizontal:p,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:n,style:"rtl"===o?{direction:"rtl"}:void 0},i.createElement(l.default,{rows:c,columns:d,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))},t.propTypes={show:a.bool.isRequired,createTableMessage:a.string.isRequired,createTableHintMessage:a.string.isRequired,onClose:a.func.isRequired,onTableInsert:a.func.isRequired,anchor:a.any,rows:a.number,columns:a.number,dir:a.string},t.defaultProps={rows:6,columns:8},t}(i.Component);e.InsertTablePopup=t}(t.InsertTablePopupNS||(t.InsertTablePopupNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(9),u=n(3),d=n(7);t.createProseMirrorTool=function(e,t){var n=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return o(r,n),r.prototype.render=function(){var n=this.props,r=n.view,o=n.render,p=a(n,["view","render"]),f=u.provideLocalizationService(this),h=e.messages.title,m=r&&r.state,v=!!m&&!t(m),g=s.createElement(l.Button,i({onClick:function(){return r&&t(r.state,(function(t){return r.dispatch(t.setMeta("commandName",e.commandName))}))},disabled:v},c.onDownPreventDefault,{title:f.toLanguageString(h,d.messages[h])},e.props,p));return o?o.call(void 0,g,{view:r}):g},r}(s.Component);return u.registerForLocalization(n),n}},function(e,t,n){"use strict";n.r(t),n.d(t,"getValueMap",(function(){return Ut})),n.d(t,"getMultiSelectTreeValue",(function(){return Gt})),n.d(t,"AutoComplete",(function(){return we})),n.d(t,"AutoCompletePropsContext",(function(){return ke})),n.d(t,"DropDownList",(function(){return ne})),n.d(t,"DropDownListPropsContext",(function(){return te})),n.d(t,"ComboBox",(function(){return he})),n.d(t,"ComboBoxPropsContext",(function(){return fe})),n.d(t,"MultiSelect",(function(){return Fe})),n.d(t,"MultiSelectPropsContext",(function(){return Ae})),n.d(t,"MultiColumnComboBox",(function(){return qe})),n.d(t,"MultiColumnComboBoxPropsContext",(function(){return $e})),n.d(t,"DropDownTree",(function(){return zt})),n.d(t,"DropDownTreePropsContext",(function(){return Ft})),n.d(t,"MultiSelectTree",(function(){return $t})),n.d(t,"MultiSelectTreePropsContext",(function(){return Wt}));var r,o,i=n(0),a=n(1),s=n(22),l=n(10),c=n(26),u=n(39),d=n(58),p=n(107),f=n(47),h=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.width,r=e.dir,o=e.itemsCount,a=e.popupSettings;return i.createElement(f.a,m({style:{width:n,direction:r},contentKey:o&&o.join()},a),t)},t}(i.Component),g=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=s.a.sizeMap,b=s.a.roundedMap,k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return g(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.size,o=n.rounded,a=n.fillMode,s=n.inputRef;return i.createElement("div",{className:"k-list-filter"},i.createElement("span",{className:Object(l.a)("k-searchbox k-input",(e={},e["k-input-"+(y[r]||r)]=r,e["k-rounded-"+(b[o]||o)]=o,e["k-input-"+a]=a,e))},i.createElement("span",{className:"k-input-icon k-icon k-i-search"}),i.createElement("input",{ref:s||function(e){return t.input=e},value:this.props.value||"",className:"k-input-inner",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown,tabIndex:this.props.tabIndex,onClick:function(e){return e.stopPropagation()}})))},t}(i.Component),w=function(e){return null!=e},C=function(e,t,n){if(!w(e))return!1;var r=String(e);return n&&(r=r.toLowerCase()),0===r.indexOf(t)},O=function(e,t,n){var r=-1;if(t){t=t.toLowerCase();for(var o=0;o<e.length;o++){var i=(S(e[o],n)||"")+"";if(i&&i.toLowerCase().startsWith(t)){r=o;break}}}return r},x=function(e,t,n,r){void 0===r&&(r=!1);var o=function(e){return r?e:e.toLowerCase()};return e.findIndex((function(e){return n?o(S(e,n))===o(t):o(t)===o(e.toString())}))},S=function(e,t){if(t&&w(e)){var n=t.split("."),r=e;return n.forEach((function(e){r=r?r[e]:void 0})),r}return e},E=function(e,t,n){t.forEach((function(t){var r=e.findIndex((function(e){return I(e,t,n)}));-1!==r&&e.splice(r,1)}))},I=function(e,t,n){return e===t||w(e)===w(t)&&S(e,n)===S(t,n)},N=function(e,t,n){if(t){var r=x(e,t,n,!0);return-1!==r?e[r]:e[O(e,t,n)]}return e[0]},T=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},M=function(e,t,n){return!!e==!!t&&e.text===t.text&&(e===t||function(e,t,n){if(void 0===e&&(e=[]),void 0===t&&(t=[]),e===t)return!0;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!I(e[r],t[r],n))return!1;return!0}(e.data,t.data,n))},D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(e){return e.preventDefault()},_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return D(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.defaultItem,r=e.textField;return i.createElement("div",{onClick:this.props.onClick,onMouseDown:P,style:{position:"unset"},className:Object(l.a)("k-list-optionlabel",{"k-selected":t})},S(n,r)||"")},t}(i.Component),j=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.index,e)},t}return j(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.group,r=e.dataItem,o=e.virtual,a=e.render,s=i.createElement("li",{id:this.props.id,role:"option","aria-selected":t,className:Object(l.a)("k-list-item",{"k-selected":t,"k-focus":this.props.focused,"k-first":Boolean(n)}),onClick:this.handleClick,style:{position:o?"relative":"unset"}},i.createElement("span",{className:"k-list-item-text"},S(r,this.props.textField).toString()),void 0!==n?i.createElement("div",{className:"k-list-item-group-label"},n):null);return void 0!==a?a.call(void 0,s,this.props):s},t}(i.Component),A=n(3),F="dropdowns.nodata",z="dropdowns.clear",L=((o={})[z]="clear",o[F]="NO DATA FOUND.",o),B=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return B(t,e),t.prototype.renderItems=function(){var e=this,t=this.props,n=t.textField,r=t.valueField,o=t.groupField,a=t.optionsGuid,s=t.skip,l=void 0===s?0:s,c=t.virtual,u=t.focusedIndex,d=t.highlightSelected,p=void 0===d||d,f=t.value,h=t.data,m=t.itemRender,v=Array.isArray(f);return h.map((function(t,s){var d,g,y=l+s,b=p&&(!v&&I(t,f,r)||v&&-1!==f.findIndex((function(e){return I(e,t,r)}))),k=void 0;return s>0&&void 0!==o&&(d=S(t,o),g=S(h[s-1],o),d&&g&&d!==g&&(k=d)),i.createElement(R,{id:"option-"+a+"-"+y,virtual:c,dataItem:t,selected:b,focused:u===s,index:y,key:y,onClick:e.props.onClick,textField:n,group:k,render:m})}))},t.prototype.renderNoValueElement=function(e){var t=this.props.noDataRender,n=i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.toLanguageString(F,L[F])));return t?t.call(void 0,n):n},t.prototype.render=function(){var e=Object(A.provideLocalizationService)(this),t=this.props,n=t.id,r=t.show,o=t.wrapperCssClass,a=t.wrapperStyle,s=t.listStyle,l=t.listRef,c=t.wrapperRef,u=t.listClassName,d=void 0===u?"k-list-ul":u,p=this.renderItems();return p.length?i.createElement("div",{className:o,style:a,ref:c,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onScroll:this.props.onScroll,unselectable:"on"},i.createElement("ul",{id:n,role:"listbox","aria-hidden":!r||void 0,className:d,ref:l,style:s},p),this.props.scroller&&i.createElement("div",{className:"k-height-container"},this.props.scroller)):this.renderNoValueElement(e)},t}(i.Component),H=V;Object(A.registerForLocalization)(V);var K=function(){function e(){var e=this;this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.scrollerRef=function(t){var n=e;n.container=t,t&&(t.setAttribute("unselectable","on"),window.setTimeout(n.calcScrollElementHeight.bind(n),0))},this.calcScrollElementHeight=function(){e.scrollSyncing=!0;var t=!1;e.itemHeight=e.list?e.list.children[0].offsetHeight:e.itemHeight,e.containerHeight=Math.min(1533915,e.itemHeight*e.total);var n=e.containerHeight;return e.scrollElement&&(t=e.scrollElement.style.height!==n+"px")&&(e.scrollElement.style.height=n+"px"),e.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}return Object.defineProperty(e.prototype,"translate",{get:function(){return this.listTranslate},enumerable:!0,configurable:!0}),e.prototype.changePage=function(e,t){var n=Math.min(Math.max(0,e),this.total-this.pageSize);n!==this.skip&&this.PageChange({skip:n,take:this.pageSize},t)},e.prototype.translateTo=function(e){this.listTranslate=e,this.list&&(this.list.style.transform="translateY("+e+"px)")},e.prototype.reset=function(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0))},e.prototype.scrollToEnd=function(){this.container&&this.list&&(this.calcScrollElementHeight(),this.container.scrollTop=this.container.scrollHeight-this.container.offsetHeight,this.translateTo(this.container.scrollHeight))},e.prototype.localScrollUp=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=r-o;if(!(i>n)){for(t=0;t<this.skip&&!(o+n+i<=r);t++)o-=n;if(o=this.validateTranslate(o),this.skip-t<=0&&o>=r)return this.translateTo(0),this.changePage(0,e),void(this.container.scrollTop=0);o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip-t,e))}},e.prototype.localScrollDown=function(e){var t,n=this.itemHeight,r=this.container.scrollTop,o=this.listTranslate,i=this.list.children.length;for(t=0;t<i&&!(o+n>=r);t++)o+=n;o=this.validateTranslate(o),t>=i&&this.skip+t>=this.total?(this.translateTo(o),this.changePage(this.total-1,e)):o!==this.listTranslate&&(this.translateTo(o),this.changePage(this.skip+t,e))},e.prototype.scrollNonStrict=function(e){var t=this.total*this.prevScrollPos/this.containerHeight,n=Math.min(Math.floor(t),this.total-1),r=this.containerHeight*t/this.total;r=this.validateTranslate(r),this.translateTo(r),this.changePage(n,e)},e.prototype.scrollHandler=function(e){var t=this.container?this.container.scrollTop:0,n=this.prevScrollPos;this.prevScrollPos=t,this.enabled&&this.list&&this.container&&!this.scrollSyncing&&(t-n<=0&&t>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(e):t-n>0&&t<this.listTranslate+2*this.list.scrollHeight/3?this.localScrollDown(e):this.scrollNonStrict(e))},e.prototype.validateTranslate=function(e){return e=Math.max(0,e),e=Math.min(this.containerHeight,e)},e}(),W=function(){function e(){}return e.prototype.navigate=function(e){var t=e.keyCode;return t===c.a.up||t===c.a.left?this.next({current:e.current,min:e.min,max:e.max,step:-1}):t===c.a.down||t===c.a.right?this.next({current:e.current,min:e.min,max:e.max,step:1}):t===c.a.home?0:t===c.a.end?e.max:void 0},e.prototype.next=function(e){return w(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}(),$=n(52),q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},U=function(){function e(e){var t=this;this.vs=new K,this.navigation=new W,this.handleItemClick=function(e,n){var r=t.initState();r.syntheticEvent=n,n.stopPropagation(),t.component.handleItemSelect(e,r),t.togglePopup(r),t.applyState(r)},this.handleFocus=function(e){if(!t.component.state.focused){var n=t.initState();n.data.focused=!0,n.events.push({type:"onFocus"}),n.syntheticEvent=e,t.applyState(n)}},this.filterChanged=function(e,n){var r=t.component.props,o=r.textField;r.filterable&&n.events.push({type:"onFilterChange",filter:{field:o,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=function(e){var n=t.component.props,r=void 0!==n.opened?n.opened:t.component.state.opened;void 0===n.opened&&(e.data.opened=!r),r?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),t.calculatePopupWidth())},this.pageChange=function(e,n){var r=t.initState();r.syntheticEvent=n,t.triggerOnPageChange(r,e.skip,e.take),t.applyState(r)},this.scrollToVirtualItem=function(e,n){var r=t.vs;if(r.enabled=!1,0===e.skip)r.reset();else if(e.skip+e.pageSize===e.total)r.scrollToEnd();else{var o=r.translate;0===o&&(r.calcScrollElementHeight(),o=r.itemHeight*e.skip,r.translateTo(o-r.itemHeight)),r.container&&(r.container.scrollTop=o),t.scrollToItem(n,!0)}window.setTimeout((function(){return r.enabled=!0}),10)},this.renderScrollElement=function(){var e=t.vs;return e.enabled&&i.createElement("div",{ref:function(t){return e.scrollElement=t},key:"scrollElementKey"})},this.listBoxId=Object($.a)(),this.guid=Object($.a)(),this.component=e,this.vs.PageChange=this.pageChange}return e.prototype.didMount=function(){var e=this.component.props,t=e.popupSettings||{},n=e.style||{},r=t.width,o=!0===e.opened;void 0===r&&this.calculatePopupWidth(),void 0===e.dir&&void 0===n.direction&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()},e.prototype.calculateDir=function(){var e=this.component.element;e&&e.ownerDocument&&e.ownerDocument.defaultView&&(this.dirCalculated=e.ownerDocument.defaultView.getComputedStyle(e).direction||void 0)},e.prototype.calculatePopupWidth=function(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")},e.prototype.scrollToItem=function(e,t){var n=this.list||this.vs.list;if(n&&e>=0){var r=this.vs,o=r.container||n.parentNode,i=void 0!==t?t:r.enabled;!function(e,t,n,r,o){var i=e.offsetHeight,a=t.children.item(n),s=a.offsetTop+(o?r-e.scrollTop:0),l=a.offsetHeight;if(o){var c=0;s+l>i?c=s+l-i:s<0&&(c=s),0!==c?e.scrollTop+=c:0===e.scrollTop&&0!==r&&(e.scrollTop=r)}else s+l>i+e.scrollTop?e.scrollTop=s+l-i:s<e.scrollTop&&(e.scrollTop-=e.scrollTop-s)}(o,n,e,r.translate,i)}},e.prototype.initState=function(){return{data:{},events:[],syntheticEvent:void 0}},e.prototype.applyState=function(e){var t=this;Object.keys(e.data).length>0&&this.component.setState(e.data);var n={syntheticEvent:e.syntheticEvent,nativeEvent:e.syntheticEvent?e.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};e.events.forEach((function(e){var r=e.type;delete e.type;var o=r&&t.component.props[r];o&&o.call(void 0,q({},n,e))}))},e.prototype.triggerOnPageChange=function(e,t,n){var r=this.component.props.virtual;if(r){var o=Math.min(Math.max(0,t),Math.max(0,r.total-n));o!==r.skip&&e.events.push({type:"onPageChange",page:{skip:o,take:n}})}},e.prototype.triggerPageChangeCornerItems=function(e,t){var n=this.component.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=void 0!==n.opened?n.opened:this.component.state.opened;e&&a&&this.vs.enabled&&(a.skip>0&&I(e,o[0],i)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!s&&a.skip+a.pageSize<a.total&&I(e,o[o.length-1],i)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))},e.prototype.getPopupSettings=function(){return Object.assign({},e.defaultProps.popupSettings,this.component.props.popupSettings)},e.basicPropTypes={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,textField:a.string,className:a.string,label:a.string,loading:a.bool,popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.element,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,itemRender:a.func,listNoDataRender:a.func,focusedItemIndex:a.func,header:a.node,footer:a.node},e.propTypes=q({},e.basicPropTypes,{value:a.any,defaultValue:a.any,filterable:a.bool,filter:a.string,virtual:a.shape({pageSize:a.number.isRequired,skip:a.number.isRequired,total:a.number.isRequired}),onFilterChange:a.func,onPageChange:a.func}),e.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0},e}(),G=n(21),X={name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426630,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},J=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Z=s.a.sizeMap,Q=s.a.roundedMap,ee=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new U(n),n.searchState={word:"",last:""},n._skipFocusEvent=!1,n._filterInput=null,n._navigated=!1,n.focus=function(){n.base.wrapper&&n.base.wrapper.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=r.defaultItem,c=a?a.skip:0,u=-1===e&&void 0!==l?l:i[e-c],d=!I(u,n.value,s);n.triggerOnChange(u,t),d&&n.base.triggerPageChangeCornerItems(u,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.dummySelect=function(e){return i.createElement("select",{name:n.props.name,ref:function(e){n._select=e},tabIndex:-1,"aria-hidden":!0,title:n.props.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:n.props.valueMap?n.props.valueMap.call(void 0,e):e}))},n.renderListContainer=function(){var e,t=n.props,r=t.header,o=t.footer,a=t.dir,s=t.data,c=void 0===s?[]:s,u=t.size,d=n.base,p=d.getPopupSettings(),f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=void 0!==p.width?p.width:d.popupWidth,m={dir:void 0!==a?a:d.dirCalculated,width:h,popupSettings:{popupClass:Object(l.a)(p.popupClass,"k-list",(e={},e["k-list-"+(Z[u]||u)]=u,e["k-virtual-list"]=n.base.vs.enabled,e)),className:p.className,animate:p.animate,anchor:n.element,show:f,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:p.appendTo},itemsCount:[c.length]};return i.createElement(v,Y({},m),n.renderListFilter(),n.renderDefaultItem(),r&&i.createElement("div",{className:"k-list-header"},r),n.renderList(),o&&i.createElement("div",{className:"k-list-footer"},o))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,o=e.textField,a=e.dataItemKey,s=e.virtual,l=void 0===s?{skip:0}:s,c=e.listNoDataRender,u=e.itemRender,d=n.base.vs,p=l.skip,f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=n.base.getPopupSettings(),m="translateY("+d.translate+"px)";return i.createElement(H,{id:n.base.listBoxId,show:f,data:r.slice(),focusedIndex:n.focusedIndex(),value:n.value,textField:o,valueField:a,optionsGuid:n.base.guid,listRef:function(e){return d.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:d.enabled?{transform:m}:void 0,key:"listkey",skip:p,onClick:n.handleItemClick,itemRender:u,noDataRender:c,onScroll:function(e){d.scrollHandler(e)},wrapperRef:d.scrollerRef,scroller:n.base.renderScrollElement()})},n.renderListFilter=function(){var e=void 0!==n.props.filter?n.props.filter:n.state.text;return n.props.filterable&&i.createElement(k,{value:e,ref:function(e){return n._filterInput=e&&e.input},onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown,size:n.props.size,rounded:n.props.rounded,fillMode:n.props.fillMode})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,r=e.defaultItem,o=e.dataItemKey;return void 0!==r&&i.createElement(_,{defaultItem:r,textField:t,selected:I(n.value,r,o),key:"defaultitemkey",onClick:n.handleDefaultItemClick})},n.search=function(e){clearTimeout(n._typingTimeout),n.props.filterable||(n._typingTimeout=window.setTimeout((function(){return n.searchState.word=""}),n.props.delay),n.selectNext(e))},n.selectNext=function(e){var t,r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=i.map((function(e,t){return{item:e,itemIndex:t}})),l=n.searchState.word,c=n.searchState.last,u=function(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}(l,c),d=s.length,p=Math.max(0,i.findIndex((function(e){return I(e,n.value,a)})));n.props.defaultItem&&(t={item:n.props.defaultItem,itemIndex:-1},d+=1,p+=1),s=function(e,t,n){var r=e;return n&&(r=[n].concat(r)),r.slice(t).concat(r.slice(0,t))}(s,p+=u?1:0,t);for(var f,h,m,v=0,g=n.props,y=g.textField,b=g.ignoreCase;v<d;v++)if(f=S(s[v].item,y),h=u&&C(f,c,b),m=C(f,l,b),h||m){v=s[v].itemIndex;break}if(v!==d){var k=n.base.initState();k.syntheticEvent=e,n.handleItemSelect(v,k),n.applyState(k),n._valueDuringOnChange=void 0}},n.handleKeyDown=function(e){var t=n.props,r=t.data,o=void 0===r?[]:r,i=t.filterable,a=t.disabled,s=t.leftRightKeysNavigation,l=void 0===s||s,u=t.virtual,d=void 0===u?{skip:0,total:0,pageSize:0}:u,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=e.keyCode,h=f===c.a.home||f===c.a.end,m=f===c.a.up||f===c.a.down,v=!p&&(e.altKey&&f===c.a.down||f===c.a.enter||f===c.a.space),g=p&&(e.altKey&&f===c.a.up||f===c.a.esc),y=l&&(f===c.a.left||f===c.a.right),b=m||!i&&(y||h),k=n.base.initState();if(k.syntheticEvent=e,!a){if(h&&n.base.vs.enabled)f===c.a.home?0!==d.skip?(n.base.triggerOnPageChange(k,0,d.pageSize),n._navigated=!0):n.triggerOnChange(o[0],k):d.skip<d.total-d.pageSize?(n.base.triggerOnPageChange(k,d.total-d.pageSize,d.pageSize),n._navigated=!0):n.triggerOnChange(o[o.length-1],k);else if(p&&f===c.a.enter){var w=n.focusedIndex();void 0!==w&&n.handleItemSelect(w,k),n.base.togglePopup(k),e.preventDefault()}else v||g?(n.base.togglePopup(k),e.preventDefault()):b&&(n.onNavigate(k,f),e.preventDefault());n.applyState(k)}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.handleBlur=function(e){if(!n._skipFocusEvent&&n.state.focused){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&n.base.togglePopup(r),n.applyState(r)}},n.handleDefaultItemClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.triggerOnChange(n.props.defaultItem,t),n.applyState(t)},n.handleWrapperClick=function(e){if(!e.isPropagationStopped()){var t=n.base.initState();t.syntheticEvent=e,n.state.focused||(t.data.focused=!0),n.base.togglePopup(t),n.applyState(t)}},n.handleKeyPress=function(e){if(!n.props.filterable&&0!==e.which&&e.keyCode!==c.a.enter){var t=String.fromCharCode(e.charCode||e.keyCode);n.props.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n.searchState={word:n.searchState.word+t,last:n.searchState.last+t},n.search(e)}},n.handleListFilterChange=function(e){var t=n.base.initState();t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=e.target.value),n.base.filterChanged(e.target.value,t),n.applyState(t)},n.onPopupOpened=function(){n._filterInput&&n.focusElement(n._filterInput)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.base.wrapper&&n.focusElement(n.base.wrapper)}))},n.setValidity=function(){n._select&&n._select.setCustomValidity&&n._select.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please select a value from the list!")},Object(G.a)(X),n}return J(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e;return void 0!==this._valueDuringOnChange?e=this._valueDuringOnChange:void 0!==this.props.value?e=this.props.value:void 0!==this.state.value?e=this.state.value:void 0!==this.props.defaultValue&&(e=this.props.defaultValue),w(e)||void 0===this.props.defaultItem||(e=this.props.defaultItem),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return I(e,o,r)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l;if(this.base.getPopupSettings().animate||u&&this.onPopupOpened(),a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var d=this.value,p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return I(e,d,i)})),h=!I(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):u&&!a||l&&c&&d&&h&&!this._navigated?this.base.scrollToItem(f):l&&c&&this._navigated&&(this._navigated&&a&&0===a.skip?this.base.vs.reset():this._navigated&&a&&a.skip===a.total-a.pageSize&&this.base.vs.scrollToEnd())}this._navigated=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t,n=this.props,r=n.style,o=n.className,a=n.label,s=n.dir,c=n.virtual,d=n.size,f=n.rounded,h=n.fillMode,m=void 0!==this.props.opened?this.props.opened:this.state.opened,v=this.value,g=S(v,this.props.textField),y=!this.validityStyles||this.validity.valid,b=this.base;b.vs.enabled=void 0!==c,void 0!==c&&(b.vs.skip=c.skip,b.vs.total=c.total,b.vs.pageSize=c.pageSize);var k=this.props,w=k.dataItemKey,C=k.data,O=void 0===C?[]:C,x=k.disabled,E=k.tabIndex,N=k.loading,M=k.iconClassName,D=k.valueRender,P=this.state.focused,_=O.findIndex((function(e){return I(e,v,w)})),j=i.createElement("span",{className:"k-input-inner"},i.createElement("span",{className:"k-input-value-text"},g)),R=void 0!==D?D.call(void 0,j,v):j,A=i.createElement("span",{ref:this.componentRef,className:Object(l.a)("k-dropdownlist k-picker",o,(e={},e["k-picker-"+(Z[d]||d)]=d,e["k-rounded-"+(Q[f]||f)]=f,e["k-picker-"+h]=h,e["k-focus"]=P,e["k-disabled"]=x,e["k-invalid"]=!y,e["k-loading"]=N,e["k-required"]=this.required,e)),style:a?Y({},r,{width:void 0}):r,dir:s,onMouseDown:m?T:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,tabIndex:Object(u.a)(E,x),accessKey:this.props.accessKey,onKeyDown:this.handleKeyDown,onKeyPress:this.handleKeyPress,onClick:x?void 0:this.handleWrapperClick,role:"listbox","aria-disabled":x||void 0,"aria-haspopup":!0,"aria-expanded":m||!1,"aria-owns":this.base.listBoxId,"aria-activedescendant":m?"option-"+this.base.guid+"-"+(_+(c?c.skip:0)):void 0,"aria-label":this.props.ariaLabel||this.props.label,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,id:this.props.id,title:this.props.title},R,N&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),i.createElement("button",{tabIndex:-1,type:"button","aria-hidden":!0,className:Object(l.a)("k-input-button k-button k-icon-button",(t={},t["k-button-"+(Z[d]||d)]=d,t["k-button-"+h]=h,t["k-button-"+h+"-base"]=h,t)),onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:Object(l.a)("k-button-icon k-icon k-i-arrow-s",M)})),this.dummySelect(v),this.renderListContainer());return a?i.createElement(p.a,{label:a,editorValue:g,editorValid:y,editorDisabled:this.props.disabled,style:{width:r?r.width:void 0},children:A}):A},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.defaultItem,a=n.dataItemKey,s=n.virtual,l=void 0===s?{skip:0,total:0,pageSize:0}:s,c=this.base.vs,u=this.value,d=o.findIndex((function(e){return I(e,u,a)})),p=this.base.navigation.navigate({current:l.skip+d,max:(c.enabled?l.total:o.length)-1,min:void 0!==i?-1:0,keyCode:t});void 0!==p&&this.handleItemSelect(p,e),this.applyState(e)},t.prototype.focusedIndex=function(){var e=w(this.props.filter)?this.props.filter:this.state.text,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=void 0===o?{skip:0}:o,a=t.dataItemKey,s=t.textField,l=t.focusedItemIndex,c=this.value,u=!(r.findIndex((function(e){return I(e,c,a)}))<0&&!this.props.defaultItem);return!u&&e&&0===i.skip?l?l(r,e,s):r.indexOf(N(r,e,s)):u||0!==i.skip?void 0:0},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),30)},t.prototype.triggerOnChange=function(e,t){I(this.value,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="DropDownList",t.propTypes=Y({delay:a.number,ignoreCase:a.bool,iconClassName:a.string,defaultItem:a.any,valueRender:a.func,valueMap:a.func,validationMessage:a.string,required:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string,leftRightKeysNavigation:a.bool,title:a.string},U.propTypes),t.defaultProps=Y({delay:500,tabIndex:0,ignoreCase:!0},U.defaultProps,{required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(i.Component),te=Object(d.a)(),ne=Object(d.b)(te,ee);ne.displayName="KendoReactDropDownList";var re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return re(t,e),Object.defineProperty(t.prototype,"input",{get:function(){return this._input},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t=e.value,n=e.suggestedText,r=this.props,o=r.value,i=r.suggestedText,a=r.focused,s=this.input,l=t!==o||i!==n,c=l&&t.startsWith(o)&&!(n&&i&&n.endsWith(i));a&&s&&document.activeElement!==s&&s.focus(),i&&l&&!c&&s&&s.setSelectionRange(o.length-i.length,o.length)},t.prototype.render=function(){var e=this,t=this.props,n=t.expanded,r=void 0!==n&&n,o=t.disabled,a=t.role,s=void 0===a?"listbox":a,l=t.render,c=i.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:function(t){return e._input=t},onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,"aria-disabled":o||void 0,disabled:o||void 0,readOnly:this.props.readOnly||void 0,"aria-haspopup":"listbox","aria-expanded":r,"aria-owns":this.props.owns,"aria-activedescendant":r?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy});return l?l.call(void 0,c):c},t}(i.Component),ie=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ae=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){return e.preventDefault()},t}return ie(t,e),t.prototype.render=function(){var e=Object(A.provideLocalizationService)(this).toLanguageString(z,L[z]);return i.createElement("span",{className:"k-clear-value",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"},i.createElement("span",{className:"k-icon k-i-x"}))},t}(i.Component),se=ae;Object(A.registerForLocalization)(ae);var le=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ce=function(){return(ce=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ue=s.a.sizeMap,de=s.a.roundedMap,pe=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new U(n),n._inputId=Object($.a)(),n._suggested="",n.itemHeight=0,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.virtual,s=r.dataItemKey,l=i[e-(a?a.skip:0)],c=!I(l,n.value,s);n.triggerOnChange(l,t),void 0!==n.state.text&&(t.data.text=void 0),c&&n.base.triggerPageChangeCornerItems(l,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.toggleBtnClick=function(e){var t=n.base.initState();t.syntheticEvent=e,n.base.togglePopup(t),n.applyState(t)},n.onScroll=function(e){var t=n.base,r=t.vs,o=t.list;r.scrollHandler(e);var i=n.props,a=i.data,s=void 0===a?[]:a,l=i.groupField;if(l&&s.length){for(var c=n.itemHeight=n.itemHeight||(r.enabled?r.itemHeight:o?o.children[0].offsetHeight:0),u=e.target.scrollTop-r.skip*c,d=s[0][l],p=1;p<s.length&&!(c*p>u);p++)s[p]&&s[p][l]&&(d=s[p][l]);d!==n.state.group&&(n.setState({group:d}),n.props.onGroupScroll&&n.props.onGroupScroll.call(void 0,{group:d}))}},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyValueOnRejectSuggestions(e.currentTarget.value,t)}},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();if(o.syntheticEvent=e,!e.altKey&&(t===c.a.up||t===c.a.down))return e.preventDefault(),n.onNavigate(o,t),void n.applyState(o);var i=function(){e.preventDefault(),n.base.togglePopup(o),n.applyState(o)};r?e.altKey&&t===c.a.up?i():t===c.a.enter?(e.preventDefault(),n.applyValueOnEnter(e.currentTarget.value,o)):t===c.a.esc&&n.applyValueOnRejectSuggestions(e.currentTarget.value,o):e.altKey&&t===c.a.down&&i()},n.inputOnChange=function(e){var t=n.base.initState();t.syntheticEvent=e;var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=e.currentTarget,i=o.value;if(n.props.suggest){var a=o.selectionEnd===i.length,s=void 0!==n.props.filter?n.props.filter:n.state.text;w(s)||(s=S(n.value,n.props.textField)||"");var l=s&&s===i,c=s&&s.length>i.length;l||c||!a?n._suggested="":n.suggestValue(i)}void 0===n.props.filter&&(t.data.text=i),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r||n.base.togglePopup(t),n.base.filterChanged(i,t),n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState();t.syntheticEvent=e,e.stopPropagation(),n._suggested="",n.base.filterChanged("",t),void 0===n.props.filter&&void 0!==n.state.text&&(t.data.text=void 0),n.triggerOnChange(null,t),(void 0!==n.props.opened?n.props.opened:n.state.opened)&&n.base.togglePopup(t),n.applyState(t)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},Object(G.a)(X),n}return le(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){var e=this.props,t=e.data,n=void 0===t?[]:t,r=e.dataItemKey,o=this.value;return n.findIndex((function(e){return I(e,o,r)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&""!==this.value&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.dataItemKey,a=n.virtual,s=e.virtual?e.virtual.total:0,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=void 0!==e.opened?e.opened:t.opened,u=!c&&l,d=this.value;if(this._valueOnDidUpdate=d,a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var p=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return I(e,d,i)})),h=!I(p,d,i);u&&a?this.base.scrollToVirtualItem(a,f):(u&&!a||l&&c&&d&&h)&&this.base.scrollToItem(f)}u&&this._input&&this._input.focus(),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,n,r=this.props,o=r.dir,a=r.disabled,s=r.clearButton,c=void 0===s?t.defaultProps.clearButton:s,u=r.label,d=r.textField,f=r.className,h=r.style,m=r.loading,v=r.iconClassName,g=r.virtual,y=r.size,b=r.rounded,k=r.fillMode,C=!this.validityStyles||this.validity.valid,O=void 0!==this.props.filter?this.props.filter:this.state.text,x=S(this.value,d),E=w(O)?O:x,I=c&&(!!E||w(this.value)),N=this.base.vs,T=this.props.id||this._inputId;N.enabled=void 0!==g,void 0!==g&&(N.skip=g.skip,N.total=g.total,N.pageSize=g.pageSize);var M=i.createElement("span",{className:Object(l.a)("k-combobox k-input",(e={},e["k-input-"+(ue[y]||y)]=y,e["k-rounded-"+(de[b]||b)]=b,e["k-input-"+k]=k,e["k-invalid"]=!C,e["k-loading"]=m,e["k-required"]=this.required,e["k-disabled"]=a,e),f),ref:this.componentRef,style:u?ce({},h,{width:void 0}):h,dir:o},this.renderSearchBar(E||"",T),I&&!m&&i.createElement(se,{onClick:this.clearButtonClick,key:"clearbutton"}),m&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon",key:"loading"}),i.createElement("button",{tabIndex:-1,type:"button",className:Object(l.a)("k-input-button k-button k-icon-button",(n={},n["k-button-"+(ue[y]||y)]=y,n["k-button-"+k]=k,n["k-button-"+k+"-base"]=k,n)),onClick:this.toggleBtnClick,onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:Object(l.a)("k-button-icon k-icon k-i-arrow-s",v)})),this.renderListContainer());return u?i.createElement(p.a,{label:u,editorId:T,editorValue:E,editorValid:C,editorDisabled:a,style:{width:h?h.width:void 0},children:M}):M},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.data,o=void 0===r?[]:r,i=n.virtual,a=void 0===i?{skip:0}:i,s=this.props.filter?this.props.filter:this.state.text,l=this.getFocusedIndex(),c=this.base.vs,u=this.value;if(this._suggested="",-1===l||w(u))if(""===s)this.handleItemSelect(0,e);else{var d=a.skip+l,p=this.base.navigation.navigate({keyCode:t,current:d,max:(c.enabled?c.total:o.length)-1,min:0});void 0!==p&&this.handleItemSelect(p,e)}else this.handleItemSelect(l,e)},t.prototype.applyValueOnEnter=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=S(this.value,a)===e?this.index:x(i,e,a),u=-1!==c,d=void 0;if(this._suggested="",u)d=i[c];else{if(!s)return this.selectFocusedItem(e,t);d=void 0!==a?((n={})[a]=e,n):e}this.triggerOnChange(d,t),l&&this.base.togglePopup(t),void 0===this.props.filter&&void 0!==this.state.text&&(t.data.text=void 0),this.applyState(t)},t.prototype.applyValueOnRejectSuggestions=function(e,t){var n,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.allowCustom,l=void 0!==this.props.opened?this.props.opened:this.state.opened,c=S(this.value,a);if(this._suggested="",e===c||""===e&&!w(c))return l&&this.base.togglePopup(t),this.applyState(t);var u=x(i,e,a,!0),d=null;-1!==u?d=i[u]:s&&(d=e?a?((n={})[a]=e,n):e:null),this.triggerOnChange(d,t),void 0!==this.state.text&&(t.data.text=void 0,this.base.filterChanged("",t)),l&&this.base.togglePopup(t),this.applyState(t)},t.prototype.selectFocusedItem=function(e,t){var n=void 0!==this.props.opened?this.props.opened:this.state.opened,r=this.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=r.virtual,l=void 0===s?{skip:0}:s,c=r.focusedItemIndex,u=void 0===c?O:c,d=l.skip,p=""===e&&0===d?0:u(i,e,a);return-1!==p?this.handleItemSelect(p+d,t):(this.triggerOnChange(null,t),void 0!==this.state.text&&(t.data.text=void 0)),n&&this.base.togglePopup(t),this.applyState(t)},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,o=n.header,a=n.footer,s=n.data,c=void 0===s?[]:s,u=n.groupField,d=n.size,p=n.list,f=n.virtual,h=void 0!==this.props.opened?this.props.opened:this.state.opened,m=t.getPopupSettings(),g=void 0!==m.width?m.width:t.popupWidth,y=this.state.group;return void 0===y&&void 0!==u&&(y=S(c[0],u)),i.createElement(v,{width:g,popupSettings:{animate:m.animate,anchor:this.element,show:h,popupClass:Object(l.a)(m.popupClass,"k-reset"),className:m.className,appendTo:m.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},i.createElement("div",{className:Object(l.a)((e={},e["k-list"]=!p,e["k-list-"+(ue[d]||d)]=!p&&d,e["k-virtual-list"]=f,e["k-data-table"]=p,e["k-table-"+(ue[d]||d)]=p&&d,e))},o&&i.createElement("div",{className:"k-table-header"},o),!p&&y&&i.createElement("div",{className:"k-list-group-sticky-header"},y),this.renderList(),a&&i.createElement("div",{className:"k-list-footer"},a)))},t.prototype.renderList=function(){var e,t=this,n=this.base,r=this.props,o=r.textField,a=r.dataItemKey,s=r.listNoDataRender,c=r.itemRender,u=r.data,d=void 0===u?[]:u,p=r.virtual,f=void 0===p?{skip:0}:p,h=n.getPopupSettings(),m=n.vs,v=f.skip,g=void 0!==this.props.opened?this.props.opened:this.state.opened,y="translateY("+m.translate+"px)",b=g?this.getFocusedIndex():void 0,k=void 0!==this.props.filter?this.props.filter:this.state.text,C=S(this.value,o),O=w(k)&&k!==C?null:this.value,x=this.props.list||H;return i.createElement(x,{id:n.listBoxId,virtual:Boolean(f),show:g,data:d,focusedIndex:b,value:O,textField:o,valueField:a,groupField:this.props.groupField,optionsGuid:n.guid,listRef:function(e){m.list=t.base.list=e,t.itemHeight=0},wrapperStyle:{maxHeight:h.height},wrapperCssClass:Object(l.a)("k-list-content",(e={},e["k-list-scroller"]=!f,e["k-virtual-content"]=f,e)),listStyle:m.enabled?{transform:y}:void 0,key:"listkey",skip:v,onClick:this.handleItemClick,itemRender:c,noDataRender:s,onMouseDown:function(e){return e.preventDefault()},onScroll:this.onScroll,wrapperRef:m.scrollerRef,scroller:this.base.renderScrollElement()})},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.props,o=r.placeholder,a=r.tabIndex,s=r.disabled,l=r.data,c=void 0===l?[]:l,u=r.dataItemKey,d=r.virtual,p=void 0===d?{skip:0}:d,f=void 0!==this.props.opened?this.props.opened:this.state.opened,h=this.value,m=Math.max(0,c.findIndex((function(e){return I(e,h,u)})));return this._suggested&&!I(this._valueOnDidUpdate,h,u)&&(this._suggested=""),i.createElement(oe,{id:t,placeholder:o,tabIndex:a||void 0,accessKey:this.props.accessKey,value:e+this._suggested,suggestedText:this._suggested,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:s,expanded:f,owns:this.base.listBoxId,activedescendant:this.base.guid+"-"+(m+p.skip),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.triggerOnChange=function(e,t){var n=this.value;!w(n)&&!w(e)||I(n,e,this.props.dataItemKey)||(void 0===this.props.value&&(t.data.value=e),this._valueDuringOnChange=e,t.events.push({type:"onChange"}))},t.prototype.getFocusedIndex=function(){var e=this.value,t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=t.dataItemKey,a=t.virtual,s=void 0===a?{skip:0}:a,l=t.focusedItemIndex,c=void 0===l?O:l,u=this.props.filter?this.props.filter:this.state.text;return w(e)&&void 0===u?r.findIndex((function(t){return I(t,e,i)})):u?c(r,u,o):0===s.skip?0:-1},t.prototype.suggestValue=function(e){var t=this.props,n=t.data,r=t.textField;this._suggested=function(e,t,n){void 0===t&&(t=[]);var r="";if(e){var o=t[O(t,e,n)];if(o){var i=S(o,n);e.toLowerCase()!==i.toLowerCase()&&(r=i.substring(e.length))}}return r}(e,n,r)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.displayName="ComboBox",t.propTypes=ce({},U.propTypes,{size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"]),dataItemKey:a.string,groupField:a.string,suggest:a.bool,placeholder:a.string,allowCustom:a.bool,clearButton:a.bool,iconClassName:a.string,validationMessage:a.string,required:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,list:a.any,valueRender:a.func}),t.defaultProps=ce({},U.defaultProps,{size:"medium",rounded:"medium",fillMode:"solid",allowCustom:!1,clearButton:!0,required:!1}),t}(i.Component),fe=Object(d.a)(),he=Object(d.b)(fe,pe);he.displayName="KendoReactComboBox";var me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=s.a.sizeMap,ye=s.a.roundedMap,be=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new U(n),n._inputId=Object($.a)(),n._suggested="",n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props.data,o=S((void 0===r?[]:r)[e],n.props.textField);n.triggerOnChange(o,t)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.textField,s=i[e];I(n.state.focusedItem,s,a)||(t.data.focusedItem=s)},n.togglePopup=function(e){n.base.togglePopup(e)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},n.handleItemClick=function(e,t){n.base.handleItemClick(e,t),n._valueDuringOnChange=void 0},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget,o=r.value,i=r.selectionEnd===o.length;t.syntheticEvent=e;var a=n._suggested,s=n.value,l=s&&s.substring(0,s.length-a.length),c=l&&l===o,u=l&&l.length>o.length,d=n.props.suggest,p=void 0!==n.props.opened?n.props.opened:n.state.opened;if(void 0!==d&&!1!==d){c||u||!i?n._suggested="":n.suggestValue(o);var f=o+n._suggested,h={userInput:o,value:n._suggested};n.triggerOnChange(f,t,{suggestion:h})}else n._suggested="",n.triggerOnChange(o,t);(!p&&o||p&&!o)&&n.togglePopup(t),t.data.focusedItem=void 0,n.applyState(t)},n.clearButtonClick=function(e){var t=n.base.initState(),r=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e;n._suggested="",n.triggerOnChange("",t),void 0!==n.state.focusedItem&&(t.data.focusedItem=void 0),r&&n.togglePopup(t),n.applyState(t)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=e;var i=function(){r&&e.preventDefault()};t===c.a.enter||t===c.a.esc?(i(),n.applyInputValue(e.currentTarget.value,o,e.keyCode)):t!==c.a.up&&t!==c.a.down||(i(),n.onNavigate(o,t))},n.handleBlur=function(e){if(n.state.focused){var t=n.base.initState();t.data.focused=!1,t.events.push({type:"onBlur"}),t.syntheticEvent=e,n.applyInputValue(e.currentTarget.value,t)}},Object(G.a)(X),n}return me(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||""!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.data,r=void 0===n?[]:n,o=e.data,i=void 0===o?[]:o,a=this.focusedIndex(),s=r[a],l=i!==r,c=void 0!==s&&t.focusedItem!==s,u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=void 0!==e.opened?e.opened:t.opened;(u&&(c||l)||!d&&u)&&this.base.scrollToItem(a),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e,t=this,n=this.props,r=n.dir,o=n.disabled,a=n.label,s=n.className,c=n.style,u=n.loading,d=n.suggest,f=n.size,h=n.rounded,m=n.fillMode,v=!this.validityStyles||this.validity.valid,g=this.base,y=this.value,b=!1!==this.props.clearButton&&!u&&!!y,k=this.props.id||this._inputId;"string"==typeof d&&(this._suggested=d);var w=i.createElement("span",{className:Object(l.a)("k-autocomplete k-input",s,(e={},e["k-input-"+(ge[f]||f)]=f,e["k-rounded-"+(ye[h]||h)]=h,e["k-input-"+m]=m,e["k-invalid"]=!v,e["k-loading"]=u,e["k-required"]=this.required,e["k-disabled"]=o,e)),ref:function(e){t._element=e,g.wrapper=e},style:a?ve({},c,{width:void 0}):c,dir:r},this.renderSearchBar(y||"",k),u&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),b&&!u&&i.createElement(se,{onClick:this.clearButtonClick,key:"clearbutton"}),this.renderListContainer());return a?i.createElement(p.a,{label:a,editorId:k,editorValue:y,editorValid:v,editorDisabled:o,style:{width:c?c.width:void 0},children:w}):w},t.prototype.onNavigate=function(e,t){var n=this,r=this.value,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField,l=o.focusedItemIndex,c=void 0!==this.state.focusedItem?a.findIndex((function(e){return I(e,n.state.focusedItem,s)})):l?l(a,r,s):a.indexOf(N(a,r,s)),u=this.base.navigation.navigate({keyCode:t,current:c,max:a.length-1,min:0});void 0!==u&&this.itemFocus(u,e),this.applyState(e)},t.prototype.applyInputValue=function(e,t,n){var r=void 0!==this.props.opened?this.props.opened:this.state.opened,o=this.props,i=o.data,a=void 0===i?[]:i,s=o.textField;if(this._suggested="",r&&n===c.a.enter){var l=S(a[this.focusedIndex(e)],s);this.triggerOnChange(l,t)}r&&this.togglePopup(t),this.applyState(t)},t.prototype.renderSearchBar=function(e,t){var n=this,r=this.base,o=this.props,a=o.placeholder,s=o.tabIndex,l=o.disabled,c=o.readonly,u=this.state.focused,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return i.createElement(oe,{id:t,placeholder:a,tabIndex:s||void 0,accessKey:this.props.accessKey,value:e,suggestedText:this._suggested,focused:u,name:this.props.name,ref:function(e){return n._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:r.handleFocus,onBlur:this.handleBlur,disabled:l,readOnly:c,expanded:d,owns:r.listBoxId,activedescendant:"option-"+r.guid+"-"+this.focusedIndex(),role:"combobox",ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.renderListContainer=function(){var e,t=this.base,n=this.props,r=n.dir,o=n.header,a=n.footer,s=n.data,c=void 0===s?[]:s,u=n.size,d=t.getPopupSettings(),p=void 0!==this.props.opened?this.props.opened:this.state.opened,f=void 0!==d.width?d.width:t.popupWidth;return i.createElement(v,{width:f,popupSettings:{animate:d.animate,anchor:this.element,show:p,popupClass:Object(l.a)(d.popupClass,"k-list",(e={},e["k-list-"+(ge[u]||u)]=u,e)),className:d.className,appendTo:d.appendTo},dir:void 0!==r?r:this.base.dirCalculated,itemsCount:[c.length]},o&&i.createElement("div",{className:"k-list-header"},o),this.renderList(),a&&i.createElement("div",{className:"k-list-footer"},a))},t.prototype.renderList=function(){var e=this.base,t=e.getPopupSettings(),n=this.props,r=n.textField,o=n.data,a=void 0===o?[]:o,s=n.listNoDataRender,l=n.itemRender,c=this.value,u=void 0!==this.props.opened?this.props.opened:this.state.opened;return i.createElement(H,{id:e.listBoxId,show:u,data:a.slice(),focusedIndex:this.focusedIndex(),value:c,textField:r,valueField:r,highlightSelected:!1,optionsGuid:e.guid,listRef:function(t){return e.list=t},wrapperStyle:{maxHeight:t.height},wrapperCssClass:"k-list-content",onClick:this.handleItemClick,itemRender:l,noDataRender:s,onMouseDown:function(e){return e.preventDefault()}})},t.prototype.triggerOnChange=function(e,t,n){(this.value!==e||n)&&(t.data.value=e,this._valueDuringOnChange=e,t.events.push(ve({type:"onChange"},n||{})))},t.prototype.applyState=function(e){this.base.applyState(e),this._valueDuringOnChange=void 0},t.prototype.suggestValue=function(e){if(this._suggested="",e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.textField,i=r[O(r,e,o)];if(i){var a=S(i,o);e.toLowerCase()!==a.toLowerCase()&&(this._suggested=a.substring(e.length))}}},t.prototype.focusedIndex=function(e){var t=this,n=this.props,r=n.data,o=void 0===r?[]:r,i=n.textField,a=n.focusedItemIndex,s=void 0!==e?e:this.value;return void 0!==this.state.focusedItem?o.findIndex((function(e){return I(e,t.state.focusedItem,i)})):a?a(o,s,i):Math.max(0,o.indexOf(N(o,s,i)))},t.displayName="AutoComplete",t.propTypes=ve({},U.basicPropTypes,{size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"]),suggest:a.oneOfType([a.bool,a.string]),placeholder:a.string,value:a.string,defaultValue:a.string,validationMessage:a.string,required:a.bool,readonly:a.bool,clearButton:a.bool,valueRender:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string}),t.defaultProps=ve({},U.defaultProps,{size:"medium",rounded:"medium",fillMode:"solid"}),t}(i.Component),ke=Object(d.a)(),we=Object(d.b)(ke,be);we.displayName="KendoReactAutoComplete";var Ce,Oe=n(24),xe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Se=function(e){return e.syntheticEvent.preventDefault()},Ee=function(e){return e.syntheticEvent.stopPropagation()},Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.render=function(){var e=this.props,t=e.data,n=e.guid,r=e.focused,o=e.tagRender,a=e.tag,s=e.onTagDelete,l=e.size;return i.createElement(i.Fragment,null,t.map((function(e,c){var u=a?i.createElement(a,{key:e.text+c,tagData:e,guid:n,focusedTag:r,onTagDelete:s}):i.createElement(Oe.a,{id:"tag-"+n+"-"+e.text.replace(/\s+/g,"-"),"aria-selected":!0,role:"option","aria-setsize":t.length,key:e.text+c,text:e.text,removable:!0,removeIcon:"k-i-close",onRemove:function(t){return s.call(void 0,e.data,t.syntheticEvent)},onMouseDown:Se,onClick:Ee,className:e===r?"k-focus":void 0,size:l});return o?o(e,u):u})),this.props.children)},t}(i.Component);!function(e){e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList"}(Ce||(Ce={}));var Ne,Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(){return(Me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},De=s.a.sizeMap,Pe=s.a.roundedMap,_e=function(e){return e.preventDefault()},je=function(e){return e===Ne.CustomItem};!function(e){e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem"}(Ne||(Ne={}));var Re=function(e){function t(t){var n=e.call(this,t)||this;return n.state={activedescendant:Ce.PopupList},n._valueItemsDuringOnChange=null,n._inputId=Object($.a)(),n.base=new U(n),n._tags=[],n._skipFocusEvent=!1,n.scrollToFocused=!1,n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.dataItemKey,s=r.virtual,l=i[e-(s?s.skip:0)],c=n.value.findIndex((function(e){return I(e,l,a)})),u=[];-1!==c?(u=n.value).splice(c,1):u=n.value.concat([l]),(void 0!==n.props.filter?n.props.filter:n.state.text)&&(n.state.text&&(t.data.text=""),n.base.filterChanged("",t)),void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.triggerOnChange(u,t),n.base.triggerPageChangeCornerItems(l,t)},n.onTagDelete=function(e,t){var r=void 0!==n.props.opened?n.props.opened:n.state.opened,o=n.base.initState();o.syntheticEvent=t,r&&n.base.togglePopup(o),n.state.focused||(o.data.focused=!0,n.focus());var i=n.value;E(i,e,n.props.dataItemKey),n.triggerOnChange(i,o),n.applyState(o)},n.itemFocus=function(e,t){var r=n.props,o=r.data,i=void 0===o?[]:o,a=r.allowCustom,s=r.virtual,l=s?s.skip:0,c=void 0!==n.props.filter?n.props.filter:n.state.text,u=n.getFocusedState().focusedIndex,d=a&&c,p=i[e-l];p&&u!==e?n.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=Ce.PopupList):d&&-1===e&&void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.base.triggerPageChangeCornerItems(p,t)},n.componentRef=function(e){n._element=e,n.base.wrapper=e},n.searchbarRef=function(e){var t=n._input=e&&e.input;t&&n.state.focused&&window.setTimeout((function(){return t.focus()}),0)},n.onChangeHandler=function(e){var t=n.base.initState(),r=e.currentTarget.value,o=void 0!==n.props.opened?n.props.opened:n.state.opened;t.syntheticEvent=e,void 0===n.props.filter&&(t.data.text=r),t.data.focusedIndex=void 0,o||n.base.togglePopup(t),n.base.filterChanged(r,t),n.applyState(t)},n.clearButtonClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState();r.syntheticEvent=e,e.stopPropagation(),n.value.length>0&&n.triggerOnChange([],r),void 0!==n.state.focusedIndex&&(r.data.focusedIndex=void 0),t&&n.base.togglePopup(r);var o=void 0!==n.props.filter?n.props.filter:n.state.text;w(o)&&""!==o&&n.base.filterChanged("",r),n.state.text&&(r.data.text=""),n.applyState(r)},n.onInputKeyDown=function(e){var t=e.keyCode,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=void 0!==n.props.opened?n.props.opened:n.state.opened,i=n.getFocusedState().focusedItem,a=n.base.initState();if(a.syntheticEvent=e,!r&&n.value.length>0&&(t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end||t===c.a.delete||t===c.a.backspace))return n.onTagsNavigate(e,a);var s=function(){e.preventDefault(),n.base.togglePopup(a),n.applyState(a)};o?e.altKey&&t===c.a.up?s():t===c.a.up||t===c.a.down?(e.preventDefault(),n.onNavigate(a,t)):t===c.a.enter?(e.preventDefault(),n.props.allowCustom&&r&&null===i?n.customItemSelect(e):n.selectFocusedItem(e)):t===c.a.esc&&s():e.altKey&&t===c.a.down&&s()},n.renderListContainer=function(){var e,t,r=n.base,o=n.props,a=o.header,s=o.footer,c=o.allowCustom,u=o.dir,d=o.data,p=void 0===d?[]:d,f=o.size,h=n.base.getPopupSettings(),m=void 0!==n.props.opened?n.props.opened:n.state.opened,g=void 0!==n.props.filter?n.props.filter:n.state.text,y=void 0!==h.width?h.width:r.popupWidth,b={dir:void 0!==u?u:r.dirCalculated,width:y,popupSettings:{popupClass:Object(l.a)(h.popupClass,"k-list",(e={},e["k-list-"+(De[f]||f)]=f,e["k-virtual-list"]=n.base.vs.enabled,e)),className:h.className,animate:h.animate,anchor:n.element,show:m,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:h.appendTo},itemsCount:[p.length,n.value.length]},k=n.getFocusedState().focusedType,w=c&&g&&i.createElement("div",{className:Object(l.a)("k-list",(t={},t["k-list-"+(De[f]||f)]=f,t)),key:"customitem",onClick:n.customItemSelect,onMouseDown:_e},i.createElement("div",{className:Object(l.a)("k-list-item k-custom-item",{"k-focus":je(k)}),style:{fontStyle:"italic"}},g,i.createElement("span",{className:"k-icon k-i-plus",style:{position:"absolute",right:"0.5em"}})));return i.createElement(v,Me({},b),a&&i.createElement("div",{className:"k-list-header"},a),w,n.renderList(),s&&i.createElement("div",{className:"k-list-footer"},s))},n.renderList=function(){var e=n.props,t=e.data,r=void 0===t?[]:t,o=e.textField,a=e.listNoDataRender,s=e.itemRender,l=e.dataItemKey,c=e.virtual,u=n.base.vs,d=c?c.skip:0,p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=n.getFocusedState().focusedIndex,h=n.base.getPopupSettings(),m="translateY("+u.translate+"px)";return i.createElement(H,{id:n.base.listBoxId,show:p,data:r.slice(),focusedIndex:f-d,value:n.value,textField:o,valueField:l,optionsGuid:n.base.guid,listRef:function(e){u.list=n.base.list=e},wrapperStyle:{maxHeight:h.height},wrapperCssClass:"k-list-content",listStyle:u.enabled?{transform:m}:void 0,key:"listKey",skip:d,onClick:n.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:_e,onBlur:n.handleBlur,onScroll:function(e){u.scrollHandler(e)},wrapperRef:u.scrollerRef,scroller:n.base.renderScrollElement()})},n.customItemSelect=function(e){var t,r=void 0!==n.props.filter?n.props.filter:n.state.text,o=n.props.textField;if(r){var i=n.base.initState();i.syntheticEvent=e;var a=o?((t={})[o]=r,t):r;void 0!==n.state.text&&(i.data.text=""),i.data.focusedIndex=void 0,n.base.filterChanged("",i);var s=n.value.concat([a]);n.triggerOnChange(s,i),n.base.togglePopup(i),n.applyState(i)}},n.handleWrapperClick=function(e){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n._input;!t&&r&&n.focusElement(r);var o=n.base.initState();o.syntheticEvent=e,n.state.focused||(o.events.push({type:"onFocus"}),o.data.focused=!0),n.base.togglePopup(o),n.applyState(o)},n.handleItemClick=function(e,t){var r=n.base.initState();r.syntheticEvent=t,n.handleItemSelect(e,r),n.props.autoClose&&n.base.togglePopup(r),t.stopPropagation(),n.applyState(r)},n.handleBlur=function(e){if(n.state.focused&&!n._skipFocusEvent){var t=void 0!==n.props.opened?n.props.opened:n.state.opened,r=n.base.initState(),o=n.props,i=o.allowCustom,a=o.filterable;r.syntheticEvent=e,r.data.focused=!1,r.events.push({type:"onBlur"}),t&&(n.state.opened&&(r.data.opened=!1),r.events.push({type:"onClose"})),i||a||!n.state.text||(r.data.text=""),n.applyState(r)}},n.handleFocus=function(e){n._skipFocusEvent||n.base.handleFocus(e)},n.onPopupOpened=function(){n._input&&n.state.focused&&n.focusElement(n._input)},n.onPopupClosed=function(){n.state.focused&&window.setTimeout((function(){n.state.focused&&n.focusElement(n._input)}),0)},n.setValidity=function(){n._input&&n._input.setCustomValidity&&n._input.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"Please enter a valid value!")},Object(G.a)(X),n}return Te(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var e=[];return this._valueItemsDuringOnChange?e.push.apply(e,this._valueItemsDuringOnChange):this.props.value?e.push.apply(e,this.props.value):this.state.value?e.push.apply(e,this.state.value):this.props.defaultValue&&e.push.apply(e,this.props.defaultValue),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=!this.required||null!==this.value&&this.value.length>0&&void 0!==this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){var n=this.props.virtual,r=n?n.skip:0,o=e.virtual?e.virtual.total:0,i=void 0!==this.props.opened?this.props.opened:this.state.opened,a=void 0!==e.opened?e.opened:t.opened,s=!a&&i,l=a&&!i;if(!this.base.getPopupSettings().animate&&l&&this.onPopupClosed(),n&&n.total!==o)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var c=this.getFocusedState(),u=c.focusedItem,d=c.focusedIndex;s&&n?this.base.scrollToVirtualItem(n,d-r):s&&!n?this.base.scrollToItem(d):i&&a&&u&&this.scrollToFocused&&this.base.scrollToItem(d-r)}this.scrollToFocused=!1,this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.onNavigate=function(e,t){var n=this.props,r=n.allowCustom,o=n.data,i=void 0===o?[]:o,a=void 0!==this.props.opened?this.props.opened:this.state.opened,s=void 0!==this.props.filter?this.props.filter:this.state.text,l=this.getFocusedState(),u=l.focusedType,d=l.focusedIndex,p=r&&s,f=je(u),h=this.base,m=h.vs;if(a&&t===c.a.up&&f)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{var v=h.navigation.navigate({keyCode:t,current:d,max:(m.enabled?m.total:i.length)-1,min:p?-1:0});void 0!==v&&(this.itemFocus(v,e),this.scrollToFocused=!0)}this.applyState(e)},t.prototype.render=function(){var e,t,n=this.props,r=n.style,o=n.className,a=n.label,s=n.dir,c=n.disabled,u=n.tags,d=n.textField,f=n.dataItemKey,h=n.virtual,m=n.size,v=n.rounded,g=n.fillMode,y=n.loading,b=n.filter,k=this.state,w=k.text,C=k.focused,O=k.focusedTag,x=this.base.vs,E=this.props.id||this._inputId;x.enabled=void 0!==h,void 0!==h&&(x.skip=h.skip,x.total=h.total,x.pageSize=h.pageSize);var I=[];void 0===u?this.value.forEach((function(e){I.push({text:S(e,d),data:[e]})})):I.push.apply(I,u),this.setItems(I,this._tags);var N=!this.validityStyles||this.validity.valid,D=Boolean(void 0!==b?b:w)||this.value.length>0,P=i.createElement("div",{ref:this.componentRef,className:Object(l.a)("k-multiselect k-input",o,(e={},e["k-input-"+(De[m]||m)]=m,e["k-rounded-"+(Pe[v]||v)]=v,e["k-input-"+g]=g,e["k-focus"]=C&&!c,e["k-invalid"]=!N,e["k-disabled"]=c,e["k-loading"]=y,e["k-required"]=this.required,e)),style:a?Me({},r,{width:void 0}):r,dir:s,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleWrapperClick,onMouseDown:T},i.createElement("div",{className:Object(l.a)("k-input-values k-chip-list k-selection-multiple",(t={},t["k-chip-list-"+(De[m]||m)]=m,t)),role:"listbox",id:"tagslist-"+this.base.guid},I.length>0&&i.createElement(Ie,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:I,guid:this.base.guid,focused:O?I.find((function(e){return M(e,O,f)})):void 0,size:m}),this.renderSearchbar(E)),y&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),D&&i.createElement(se,{onClick:this.clearButtonClick}),this.renderListContainer());return a?i.createElement(p.a,{label:a,editorId:E,editorValue:w||S(this.value[0],d),editorValid:N,editorDisabled:c,style:{width:r?r.width:void 0},children:P}):P},t.prototype.renderSearchbar=function(e){var t=this.state,n=t.activedescendant,r=t.focusedTag,o=this.props,a=o.disabled,s=o.placeholder,l=o.ariaDescribedBy,c=(void 0!==this.props.filter?this.props.filter:this.state.text)||"",u=void 0!==this.props.opened?this.props.opened:this.state.opened,d=this.getFocusedState().focusedIndex,p=0!==this.value.length||c?void 0:s,f=n===Ce.TagsList&&void 0!==r?"tag-"+this.base.guid+"-"+r.text.replace(/\s+/g,"-"):"option-"+this.base.guid+"-"+d;return i.createElement(oe,{id:e,size:Math.max((p||"").length,c.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:p,value:c,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:a,expanded:u,owns:this.base.listBoxId,activedescendant:f,ariaDescribedBy:"tagslist-"+this.base.guid+(l?" "+l:""),ariaLabelledBy:this.props.ariaLabelledBy})},t.prototype.onTagsNavigate=function(e,t){var n=e.keyCode,r=this.state.focusedTag,o=this._tags,i=this.props.dataItemKey,a=r?o.findIndex((function(e){return M(e,r,i)})):-1,s=void 0,l=-1!==a;if(n===c.a.left)s=o[a=l?Math.max(0,a-1):o.length-1];else if(n===c.a.right)a===o.length-1?s=void 0:l&&(s=o[a=Math.min(o.length-1,a+1)]);else if(n===c.a.home)s=o[0];else if(n===c.a.end)s=o[o.length-1];else if(n===c.a.delete){if(l){var u=this.value;E(u,o[a].data,i),this.triggerOnChange(u,t)}}else if(n===c.a.backspace){u=this.value;if(l)E(u,o[a].data,i),this.triggerOnChange(u,t);else if(!l&&o.length){var d=o.pop();E(u,d.data,i),this.triggerOnChange(u,t)}}s!==r&&(t.data.focusedTag=s,t.data.activedescendant=Ce.TagsList),this.applyState(t)},t.prototype.triggerOnChange=function(e,t){void 0===this.props.value&&(t.data.value=e.slice()),this._valueItemsDuringOnChange=[],this.setItems(e,this._valueItemsDuringOnChange),t.events.push({type:"onChange"})},t.prototype.selectFocusedItem=function(e){var t=this.props,n=t.data,r=void 0===n?[]:n,o=t.virtual,i=this.getFocusedState().focusedIndex;void 0!==r[i-(o?o.skip:0)]&&this.handleItemClick(i,e)},t.prototype.setItems=function(e,t){t.length=0,t.push.apply(t,e)},t.prototype.getFocusedState=function(){var e,t=this.state.focusedIndex,n=void 0!==this.props.filter?this.props.filter:this.state.text,r=this.props,o=r.allowCustom,i=r.data,a=void 0===i?[]:i,s=r.dataItemKey,l=r.virtual,c=r.textField,u=r.focusedItemIndex,d=void 0===u?O:u,p=l&&l.skip||0;if(void 0!==t)return{focusedIndex:t,focusedItem:a[t-p],focusedType:Ne.ListItem};var f=this.value;if(o&&n)return{focusedItem:null,focusedIndex:-1,focusedType:Ne.CustomItem};if(n)return{focusedItem:a[e=d(a,n,c)],focusedIndex:e+p,focusedType:Ne.ListItem};if(f.length){var h=f[f.length-1];return e=a.findIndex((function(e){return I(e,h,s)})),void 0!==a[e]?{focusedIndex:e+p,focusedItem:a[e],focusedType:Ne.ListItem}:{focusedType:Ne.None,focusedIndex:-1}}return 0===p?{focusedItem:a[0],focusedIndex:0,focusedType:Ne.ListItem}:{focusedType:Ne.None,focusedIndex:-1}},t.prototype.focusElement=function(e){var t=this;this._skipFocusEvent=!0,e.focus(),window.setTimeout((function(){return t._skipFocusEvent=!1}),0)},t.prototype.applyState=function(e){this.base.applyState(e),this._valueItemsDuringOnChange=null},t.displayName="MultiSelect",t.propTypes=Me({},U.propTypes,{autoClose:a.bool,value:a.arrayOf(a.any),defaultValue:a.arrayOf(a.any),dataItemKey:a.string,placeholder:a.string,tags:a.arrayOf(a.shape({text:a.string,data:a.arrayOf(a.any)})),tagRender:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string}),t.defaultProps=Me({},U.defaultProps,{autoClose:!0,required:!1,size:"medium",rounded:"medium",fillMode:"solid"}),t}(i.Component),Ae=Object(d.a)(),Fe=Object(d.b)(Ae,Re);Fe.displayName="KendoReactMultiSelect";var ze=function(){return(ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Le=function(e){return i.createElement(H,ze({},e,{wrapperCssClass:"k-table-body k-table-scroller",listClassName:"k-table k-table-list",listStyle:ze({},e.listStyle)}))},Be=n(33),Ve=n(56),He=n(37),Ke=function(){return(Ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},We=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},$e=Object(d.a)(),qe=i.forwardRef((function(e,t){var n=Object(Be.a)($e,e),r=i.useRef(null),o=i.useRef(null),a=Object(Ve.a)(),s=n.columns,c=void 0===s?Ge.columns:s,u=n.popupSettings,d=void 0===u?Ge.popupSettings:u,p=(n.size,n.onOpen),f=n.onClose,h=n.onFocus,m=n.onBlur,v=n.onChange,g=n.onFilterChange,y=n.onPageChange,b=We(n,["columns","popupSettings","size","onOpen","onClose","onFocus","onBlur","onChange","onFilterChange","onPageChange"]);i.useImperativeHandle(r,(function(){return{element:o.current&&o.current.element,focus:function(){o.current&&o.current.focus()},get value(){return o.current&&o.current.value},get name(){return o.current&&o.current.name},props:n}})),i.useImperativeHandle(t,(function(){return r.current}));var k=i.useMemo((function(){if(void 0===k&&void 0!==n.groupField&&n.data)return S(n.data[0],n.groupField)}),[n.data,n.groupField]),w=i.useState(k),C=w[0],O=w[1],x=i.useMemo((function(){return i.createElement(i.Fragment,null,n.header,i.createElement("div",{className:"k-table-header-wrap"},i.createElement("table",{className:"k-table",role:"presentation"},i.createElement("colgroup",null,c.map((function(e,t){return i.createElement("col",{key:e.uniqueKey?e.uniqueKey:t,style:{width:e.width?e.width:Ge.width}})}))),i.createElement("thead",{className:"k-table-thead"},i.createElement("tr",{className:"k-table-row"},c.map((function(e,t){return i.createElement("th",{className:"k-table-th",key:e.uniqueKey?e.uniqueKey:t},e.header||" ")}))),C&&i.createElement("tr",{className:"k-table-group-row"},i.createElement("th",{className:"k-table-th",colSpan:c.length},C))))))}),[n.header,c,C]),E=i.useMemo((function(){return"calc("+c.map((function(e){return t=e.width,n=Ge.width,t?"number"==typeof t?t+"px":t:n;var t,n})).filter(Boolean).join(" + ")+" + "+a+"px + 4px)"}),[c,a]),I=n.virtual?n.virtual.skip:0,N=i.useCallback((function(e,t){var r,o,a,s=c.map((function(e,n){return i.createElement("span",{className:"k-table-td",style:{width:e.width?e.width:Ge.width},key:e.uniqueKey?e.uniqueKey:n},e.field?Object(He.a)(e.field)(t.dataItem):"")})),u=void 0,d=n.data||[],p=t.index-I;void 0!==n.groupField&&(r=(a=Object(He.a)(n.groupField))(d[p]),o=a(d[p-1]),r&&o&&r!==o&&(u=r)),u&&s.push(i.createElement("div",{key:"group",className:"k-table-td k-table-group-td"},i.createElement("span",null,u)));var f=i.cloneElement(e,Ke({},e.props,{className:Object(l.a)("k-table-row",{"k-table-alt-row":t.index%2!=0,"k-focus":t.focused,"k-selected":t.selected,"k-first":Boolean(u)})}),s);return n.itemRender?n.itemRender.call(void 0,f,t):f}),[c,n.groupField,n.itemRender,n.data,I]),T=i.useCallback((function(e,t){e&&e.call(void 0,Ke({},t,{target:r.current}))}),[]),M=i.useCallback((function(e){return T(p,e)}),[p]),D=i.useCallback((function(e){return T(f,e)}),[f]),P=i.useCallback((function(e){return T(h,e)}),[h]),_=i.useCallback((function(e){return T(m,e)}),[m]),j=i.useCallback((function(e){return T(v,e)}),[v]),R=i.useCallback((function(e){return T(g,e)}),[g]),A=i.useCallback((function(e){return T(y,e)}),[y]),F=i.useCallback((function(e){O(e.group)}),[]);i.useEffect((function(){Object(Ve.b)()}));var z=i.useCallback((function(e){return i.createElement(Le,Ke({},e))}),[]);return i.createElement(he,Ke({},b,{list:z,popupSettings:Ke({width:E},d,{popupClass:"k-dropdowngrid-popup k-reset",className:d.className}),ref:o,header:x,itemRender:N,size:n.size,rounded:n.rounded,fillMode:n.fillMode,onOpen:M,onClose:D,onFocus:P,onBlur:_,onChange:j,onFilterChange:R,onPageChange:A,onGroupScroll:F,className:"k-dropdowngrid"}))})),Ue=Ke({},pe.propTypes,{columns:a.any.isRequired}),Ge={columns:[],popupSettings:{},width:"200px",size:"medium",rounded:"medium",fillMode:"solid"};qe.displayName="KendoMultiColumnComboBox",qe.propTypes=Ue,qe.defaultProps=Ge;var Xe=n(6),Je=n(59),Ye=n(57),Ze=n(53);function Qe(e,t,n){if(at(e))return t[Number(e)];var r=t[Number(et(e))],o=r&&r[n]||[];return o.length?Qe(tt(e),o,n):void 0}function et(e){return it(e)?e:e.split("_")[0]}function tt(e){if(it(e))return e;var t=e.indexOf("_");return e.substring(t+1)}function nt(e){return rt("0",e)}function rt(e,t){return e=e.toString(),t?t+"_"+e:e}function ot(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function it(e){return""===e||e.indexOf("_")<0}function at(e){return""!==e&&e.indexOf("_")<0}function st(e){return e.split("_")}function lt(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}var ct=function(){function e(){this.objects=[]}return e.prototype.init=function(e){for(var t,n=0;n<e.length;n++)n%5e4==0&&(t={},this.objects.push(t)),t[e[n]]=!0},e.prototype.hasId=function(e){return this.objects.some((function(t){return t[e]}))},e}();function ut(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}function dt(e,t){var n=ut(t,e);return Boolean(n&&n.length)}function pt(e,t){return t.expanded(e)&&dt(e,t.getChildrenField())}function ft(e,t,n,r){var o=function(e,t,n,r){var o=[],i=new ct;return i.init(e),function e(t,n,r,o,i,a){for(var s=0;s<r.length;s++){var l=r[s],c=rt(s,o);t.hasId(ut(n,l))&&i.push(c),dt(l,a)&&e(t,n,ut(a,l),c,i,a)}}(i,t,n,"",o,r),o}([e],t,n,r);return o.length?o[0]:void 0}function ht(e,t,n){for(var r=st(e),o=t,i=0;i<r.length;i++){var a=o[Number(r[i])];if(n.disabled(a))return!1;o=a[n.getChildrenField()]}return!0}function mt(e,t,n,r,o){switch(r){case c.a.left:return at(t)||o.expanded(e)&&ht(t,n,o)?t:ot(t);case c.a.right:return pt(e,o)?nt(t):t;case c.a.up:return i=Number(lt(t)),a=ot(t),i?function e(t,n,r){var o=Qe(t,n,r.getChildrenField());return pt(o,r)?e(rt(o[r.getChildrenField()].length-1,t),n,r):t}(rt(i-1,a),n,o):at(t)?t:a;case c.a.down:return pt(e,o)?nt(t):function e(t,n,r){var o=ot(t),i=o?Qe(o,n,r.getChildrenField()):void 0,a=i?i[r.getChildrenField()]:n,s=Number(lt(t));return s<a.length-1?rt(s+1,o):i?e(o,n,r):void 0}(t,n,o)||t;case c.a.home:return"0";case c.a.end:return function(){var e,t=(n.length-1).toString(),r=n[n.length-1];for(;pt(r,o);)e=r[o.getChildrenField()],t=rt(e.length-1,t),r=e[e.length-1];return t}();default:return t}var i,a}var vt=n(60),gt=n(106),yt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),bt=function(){return(bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},kt=s.a.sizeMap,wt=i.createContext((function(e){return e})),Ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=Object($.a)(),t.onCheckChange=function(e){t.props.onCheckChange(e,t.item,t.itemId)},t.onExpandChange=function(e){t.props.onExpandChange(e,t.item,t.itemId)},t.onItemClick=function(e){t.props.onItemClick(e,t.item,t.itemId)},t.onPress=function(e){t.props.onPress(e.event,t.item,t.itemId)},t.onDrag=function(e){t.props.onDrag(e.event,t.item,t.itemId)},t.onRelease=function(e){t.props.onRelease(e.event,t.item,t.itemId)},t.assignDraggableMeta=function(e){e&&(e._kendoItemId=t.props.itemId,e._kendoTreeViewGuid=t.props.treeGuid)},t}return yt(t,e),t.prototype.render=function(){var e=this,t=this.renderSubitemsIfApplicable(),n=this.renderItemInPart();return i.createElement("li",{className:this.getRootClassName(),tabIndex:this.tabIndex,role:"treeitem","aria-expanded":this.ariaExpanded,"aria-selected":this.ariaSelected,"aria-checked":this.ariaChecked,"aria-disabled":!!this.fieldsSvc.disabled(this.item)||void 0,ref:function(t){return e.itemElement=t}},i.createElement("div",{className:"k-treeview-"+this.props.position,ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?i.createElement(vt.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},n):n),this.props.animate?i.createElement(gt.a,{transitionEnterDuration:200,transitionExitDuration:200,style:{display:"block"},children:t}):t)},t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.itemId;e&&e===t&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement&&(this.checkboxElement.indeterminate=this.fieldsSvc.checkIndeterminate(this.item))},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId;if(t&&t!==e.focusedItemId&&t===this.itemId&&this.props.onFocusDomElNeeded(this.itemElement),this.checkboxElement){var n=this.fieldsSvc.checkIndeterminate(this.item);n!==e.fieldsService.checkIndeterminate(e.item)&&(this.checkboxElement.indeterminate=n)}},t.prototype.renderCheckbox=function(){var e,t=this;if(this.props.checkboxes){var n=this.props.size;return i.createElement("div",{className:"k-checkbox-wrap"},i.createElement("input",{type:"checkbox",className:Object(l.a)("k-checkbox k-rounded-md",(e={},e["k-checkbox-"+(kt[n]||n)]=n,e)),checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(e){return t.checkboxElement=e}}),i.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid}))}},t.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||dt(this.item,this.fieldsSvc.getChildrenField()))&&i.createElement("span",{className:"k-treeview-toggle"},i.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}))},t.prototype.renderSubitemsIfApplicable=function(){var e=this,t=this.fieldsSvc.children(this.item);return pt(this.item,this.fieldsSvc)?i.createElement("ul",{className:"k-treeview-group",role:"group"},t.map((function(n,r){return i.createElement(Ot,{item:n,position:0===r?"top":r===t.length-1?"bot":"mid",itemId:rt(r,e.itemId),treeGuid:e.props.treeGuid,animate:e.props.animate,focusedItemId:e.props.focusedItemId,tabbableItemId:e.props.tabbableItemId,fieldsService:e.props.fieldsService,itemUI:e.props.itemUI,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.props.ariaMultiSelectable,onItemClick:e.props.onItemClick,onFocusDomElNeeded:e.props.onFocusDomElNeeded,draggable:e.props.draggable,onPress:e.props.onPress,onDrag:e.props.onDrag,onRelease:e.props.onRelease,expandIcons:e.props.expandIcons,onExpandChange:e.props.onExpandChange,onCheckChange:e.props.onCheckChange,key:r,size:e.props.size})}))):void 0},t.prototype.renderItemInPart=function(){return i.createElement("span",{className:this.getContentClassName(),style:{touchAction:"none"},onClick:this.onItemClick},i.createElement("span",{className:"k-treeview-leaf-text"},this.props.itemUI?i.createElement(this.props.itemUI,{item:this.item,itemHierarchicalIndex:this.itemId}):this.fieldsSvc.text(this.item)))},Object.defineProperty(t.prototype,"fieldsSvc",{get:function(){return this.props.fieldsService},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"itemId",{get:function(){return this.props.itemId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"item",{get:function(){return this.props.item},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tabIndex",{get:function(){return(this.props.focusedItemId||this.props.tabbableItemId)===this.itemId?0:-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaExpanded",{get:function(){return this.fieldsSvc.hasChildren(this.item)||dt(this.item,this.fieldsSvc.getChildrenField())?Boolean(this.fieldsSvc.expanded(this.item)):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaChecked",{get:function(){return this.props.checkboxes?this.fieldsSvc.checked(this.item)?"true":this.fieldsSvc.checkIndeterminate(this.item)?"mixed":"false":void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ariaSelected",{get:function(){return!!this.fieldsSvc.selected(this.item)||(this.props.ariaMultiSelectable?!!this.fieldsSvc.disabled(this.item)&&void 0:void 0)},enumerable:!0,configurable:!0}),t.prototype.getIconClassName=function(){var e=this.fieldsSvc.expanded(this.item);return Object(l.a)("k-icon",{"k-i-expand":!e,"k-i-collapse":e,"k-i-loading":e&&!dt(this.item,this.fieldsSvc.getChildrenField())})},t.prototype.getRootClassName=function(){return Object(l.a)("k-treeview-item",{"k-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return Object(l.a)("k-treeview-leaf",{"k-focus":this.props.focusedItemId===this.itemId,"k-selected":this.fieldsSvc.selected(this.item)})},t.defaultProps={position:"top"},t}(i.Component),Ot=i.forwardRef((function(e,t){var n=i.useContext(wt).call(void 0,e);return i.createElement(Ct,bt({ref:t},n))}));Ot.displayName="TreeViewItem";var xt=function(){function e(e){this.expandField=e.expandField,this.selectField=e.selectField,this.hasChildrenField=e.hasChildrenField,this.childrenField=e.childrenField,this.textField=e.textField,this.disableField=e.disableField,this.checkField=e.checkField,this.checkIndeterminateField=e.checkIndeterminateField,this.focusIdField=e.focusIdField}return e.prototype.expanded=function(e){return ut(this.expandField,e)},e.prototype.selected=function(e){return ut(this.selectField,e)},e.prototype.text=function(e){return ut(this.textField,e)},e.prototype.disabled=function(e){return ut(this.disableField,e)},e.prototype.hasChildren=function(e){return ut(this.hasChildrenField,e)},e.prototype.children=function(e){var t=ut(this.childrenField,e);return t||[]},e.prototype.checked=function(e){return ut(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return ut(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&ut(this.focusIdField,e)},e.prototype.getChildrenField=function(){return this.childrenField},e}(),St={name:"@progress/kendo-react-treeview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426602,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},Et=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),It=s.a.sizeMap,Nt=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:"0"},n.allowExplicitFocus=!1,n.treeGuid=Object($.a)(),n._element=null,n.onFocusDomElNeeded=function(e){n.allowExplicitFocus&&n.focusDomItem(e)},n.onCheckChange=function(e,t,r){n.setFocus(r),n.dispatchCheckChange(e,t,r)},n.onExpandChange=function(e,t,r){n.setFocus(r),n.dispatchExpandChange(e,t,r)},n.onPress=function(e,t,r){n.props.onItemDragStart&&n.props.onItemDragStart.call(void 0,{target:n,item:t,itemHierarchicalIndex:r})},n.onDrag=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragOver&&n.props.onItemDragOver.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onRelease=function(e,t,r){var o=e.pageX,i=e.pageY,a=e.clientX,s=e.clientY;n.props.onItemDragEnd&&n.props.onItemDragEnd.call(void 0,{target:n,item:t,itemHierarchicalIndex:r,pageX:o,pageY:i,clientX:a,clientY:s})},n.onItemClick=function(e,t,r){n.setFocus(r),n.dispatchItemClick(e,t,r)},n.onFocus=function(){clearTimeout(n.blurRequest),void 0===n.state.focusedItemId&&n.data.length&&n.setFocus(n.state.tabbableItemId)},n.onBlur=function(){clearTimeout(n.blurRequest),n.blurRequest=window.setTimeout((function(){return n.setFocus(void 0)}),0)},n.onKeyDown=function(e){var t=n.getFocusedItem();if(t){var r=mt(t,n.state.focusedItemId,n.data,e.keyCode,n.fieldsSvc);r!==n.state.focusedItemId&&(e.preventDefault(),n.allowExplicitFocus=!0,n.setFocus(r)),n.dispatchEventsOnKeyDown(e,t)}},Object(G.a)(St),n}return Et(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e,t=this;this.fieldsSvc=new xt(this.props);var n=this.props,r=n.size,o=n.className;return i.createElement("div",{className:Object(l.a)("k-treeview",(e={},e["k-treeview-"+(It[r]||r)]=r,e),o),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,role:"tree","aria-multiselectable":!!this.ariaMultiSelectable||void 0,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],ref:function(e){return t._element=e},tabIndex:this.props.tabIndex},i.createElement("ul",{className:"k-treeview-lines k-treeview-group",role:"group"},this.data.map((function(e,n){return i.createElement(Ot,{item:e,position:0===n?"top":n===t.data.length-1?"bot":"mid",itemId:n.toString(),treeGuid:t.treeGuid,animate:t.props.animate,focusedItemId:t.state.focusedItemId,tabbableItemId:t.state.tabbableItemId,fieldsService:t.fieldsSvc,itemUI:t.props.item,checkboxes:t.props.checkboxes,ariaMultiSelectable:t.ariaMultiSelectable,onItemClick:t.onItemClick,onFocusDomElNeeded:t.onFocusDomElNeeded,draggable:t.props.draggable,onPress:t.onPress,onDrag:t.onDrag,onRelease:t.onRelease,expandIcons:t.props.expandIcons,onExpandChange:t.onExpandChange,onCheckChange:t.onCheckChange,key:n,size:r})}))))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,r=function(){return ht(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===c.a.left&&this.fieldsSvc.expanded(t)&&r()||e.keyCode===c.a.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||dt(t,this.props.childrenField))&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===c.a.enter&&r()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===c.a.space&&r()&&(e.preventDefault(),this.dispatchCheckChange(e,t,this.state.focusedItemId))},t.prototype.setFocus=function(e){if(e)if(this.fieldsSvc.focusIdField){var t=this.getItemById(e);this.setState({focusedItemId:e,focusedItemPublicId:this.fieldsSvc.focusId(t)})}else this.setState({focusedItemId:e});else this.setState((function(e){return{focusedItemId:void 0,focusedItemPublicId:void 0,tabbableItemId:e.focusedItemId}}))},t.prototype.getFocusedItem=function(){return this.state.focusedItemId?this.getItemById(this.state.focusedItemId):void 0},t.prototype.getItemById=function(e){return Qe(e,this.data,this.props.childrenField||"items")},t.prototype.dispatchCheckChange=function(e,t,n){Object(Ze.a)(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){Object(Ze.a)(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){Object(Ze.a)(this.props.onItemClick,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.refocusDueToFocusIdField=function(){if(this.fieldsSvc.focusIdField){var e=this.state.focusedItemPublicId;if(e){var t=this.props.getFocusHierarchicalIndex?this.props.getFocusHierarchicalIndex(e):ft(e,this.fieldsSvc.focusIdField,this.data,this.props.childrenField);t!==this.state.focusedItemId&&(this.allowExplicitFocus=!0,this.setState({focusedItemId:t}))}}},Object.defineProperty(t.prototype,"ariaMultiSelectable",{get:function(){return!0===this.props["aria-multiselectable"]||"true"===this.props["aria-multiselectable"]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.props.data||[]},enumerable:!0,configurable:!0}),t.prototype.focusDomItem=function(e){e.focus()},Object.defineProperty(t.prototype,"guid",{get:function(){return this.treeGuid},enumerable:!0,configurable:!0}),t.propTypes={data:a.arrayOf(a.any),animate:a.bool,tabIndex:a.number,focusIdField:a.string,getHierarchicalIndexById:a.func,onExpandChange:a.func,onItemClick:a.func,expandField:a.string,selectField:a.string,childrenField:a.string,hasChildrenField:a.string,textField:a.string,disableField:a.string,item:a.any,"aria-multiselectable":function(e,t,n){return void 0!==e[t]&&!0!==e[t]&&!1!==e[t]&&"true"!==e[t]&&"false"!==e[t]?new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed."):null},"aria-label":a.string,"aria-labelledby":a.string,size:a.oneOf([null,"small","medium","large"])},t.defaultProps={animate:!0,expandField:"expanded",selectField:"selected",hasChildrenField:"hasChildren",childrenField:"items",textField:"text",disableField:"disabled",checkField:"checked",checkIndeterminateField:"checkIndeterminate",size:"medium"},t}(i.Component);function Tt(e,t,n){var r=i.useState(t),o=r[0],a=r[1];return i.useEffect((function(){void 0!==o&&e.current&&a(e.current.offsetWidth)}),n),o}var Mt=function(e){return i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.children))},Dt=function(){return(Dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pt=s.a.sizeMap,_t=s.a.roundedMap,jt=function(e){return i.createElement("span",{className:"k-input-value-text"},e.children)},Rt=function(e){return e.split("_").map((function(e){return parseInt(e,10)}))},At={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},Ft=Object(d.a)(),zt=i.forwardRef((function(e,t){var n,r;Object(G.a)(X);var o=Object(Be.a)(Ft,e),a=i.useMemo((function(){return Object($.a)()}),[]),s=o.id||a,d=o.data,h=void 0===d?[]:d,m=o.dataItemKey,v=o.popupSettings,g=void 0===v?{}:v,y=o.style,b=void 0===y?{}:y,C=o.opened,O=o.disabled,x=o.onOpen,E=void 0===x?Xe.a:x,N=o.onClose,T=void 0===N?Xe.a:N,M=o.placeholder,D=o.label,P=o.name,_=o.selectField,j=void 0===_?At.selectField:_,R=o.subItemsField,B=void 0===R?At.subItemsField:R,V=o.validationMessage,H=o.valid,K=o.required,W=o.validityStyles,q=Object(u.a)(o.tabIndex,O),U=i.useRef(null),J=i.useRef(null),Y=i.useRef(null),Z=i.useRef(null),Q=i.useRef(null),ee=i.useRef(!1),te=i.useState(void 0),ne=te[0],re=te[1],oe=void 0!==o.value,ie=oe?o.value:void 0!==ne?ne:o.defaultValue,ae=w(ie),se=ae?S(ie,o.textField):"",le=function(e,t){var n=e.validationMessage,r=e.valid,o=e.required;return{customError:void 0!==n,valid:Boolean(void 0!==r?r:!o||t),valueMissing:!t}}({validationMessage:V,valid:H,required:K},ae),ce=i.useCallback((function(){return J.current&&J.current.focus()}),[]);i.useImperativeHandle(U,(function(){return{props:o,element:J.current,focus:ce}})),i.useImperativeHandle(t,(function(){return U.current}));var ue=Object(Je.a)(J,o.dir),de=void 0!==g.width?g.width:void 0!==b.width?b.width:At.popupSettings.width,pe=Tt(J,de),fe=Dt({width:pe},void 0!==ue?{direction:ue}:{}),he=i.useState(!1),me=he[0],ve=he[1],ge=void 0!==C?C:me,ye=i.useState(!1),be=ye[0],ke=ye[1],we=i.useState(""),Ce=we[0],Oe=we[1],xe=i.useCallback((function(){Z.current&&Z.current.setCustomValidity&&Z.current.setCustomValidity(le.valid?"":void 0===V?"Please select a value from the list!":V)}),[V,le]);i.useEffect(xe);var Se=i.useCallback((function(e){if(!ge){if(E){var t=Dt({},e);E.call(void 0,t)}void 0===C&&ve(!0)}}),[ge,C,E]),Ee=i.useCallback((function(e){if(ge){if(T){var t=Dt({},e);T.call(void 0,t)}void 0===C&&ve(!1)}}),[ge,C,T]),Ie=i.useCallback((function(e){if(!e.isDefaultPrevented()&&U.current){ke(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};(ge?Ee:Se)(t)}}),[ge,C,E,T]),Ne=i.useCallback((function(e){ee.current=!0,e(),window.setTimeout((function(){return ee.current=!1}),0)}),[]),Te=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=Q.current&&Q.current.element;if(U.current&&(!e.isDefaultPrevented()||Y.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};if(ge)if(t===c.a.esc||n&&t===c.a.up)e.preventDefault(),Ee(o);else if(r&&r.querySelector(".k-focus")&&(t===c.a.up||t===c.a.down||t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end)){if(t===c.a.up&&Y.current){var i=Array.from(r.querySelectorAll(".k-treeview-item")),a=i.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(a&&0===i.indexOf(a))return Ne((function(){De(Y.current)}))}Ne(Xe.a)}else t===c.a.down&&Ne((function(){De(Y.current||r)}));else n&&t===c.a.down&&(e.preventDefault(),Se(o))}}),[ge,C,E,T]),Me=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==c.a.up&&t!==c.a.down||(e.preventDefault(),Ne(t===c.a.up?function(){De(J.current)}:function(){De(Q.current&&Q.current.element)}))}),[]),De=i.useCallback((function(e){e&&Ne((function(){return e.focus()}))}),[]),Pe=i.useCallback((function(){!be&&ge?Ee({target:U.current}):o.filterable?De(Y.current):De(Q.current&&Q.current.element)}),[T,o.filterable,be,C,ge]),_e=i.useCallback((function(){be&&De(J.current)}),[be]),je=i.useCallback((function(e){if(!be&&!ee.current&&(ke(!0),o.onFocus&&U.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};o.onFocus.call(void 0,t)}}),[be,o.onFocus]),Re=i.useCallback((function(e){if(be&&!ee.current&&U.current){ke(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};if(o.onBlur){var n=Dt({},t);o.onBlur.call(void 0,n)}Ee(t)}}),[be,o.onBlur,ge,C,T]),Ae=i.useCallback((function(){be&&Ne(Xe.a)}),[be]),Fe=i.useCallback((function(e,t,n){if(o.onChange){var r=Dt({value:t,level:n?Rt(n):[]},e);o.onChange.call(void 0,r)}oe||re(t)}),[o.onChange,oe]),ze=i.useCallback((function(e){if(!I(e.item,ie,m)&&U.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o={syntheticEvent:e.syntheticEvent,nativeEvent:r,target:U.current};Fe(o,t,n),Ee(o)}}),[oe,ie,o.onChange,m,ge,C,T]),Le=i.useCallback((function(e){if(U.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};Fe(t,null),Ee(t),e.preventDefault()}}),[oe,o.onChange,ge,C,T]),Ve=i.useCallback((function(e){if(e.syntheticEvent.stopPropagation(),o.onExpandChange&&U.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,i=e.syntheticEvent,a={level:Rt(n),item:t,nativeEvent:r,syntheticEvent:i,target:U.current};o.onExpandChange.call(void 0,a)}}),[o.onExpandChange]),He=i.useCallback((function(e){if(o.onFilterChange&&U.current){var t={filter:{field:o.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:U.current};o.onFilterChange.call(void 0,t),void 0===o.filter&&Oe(e.target.value)}}),[o.onFilterChange,o.filter,o.textField]),Ke=i.useMemo((function(){return oe||!ae?h:Object(Ye.c)(h,B,(function(e){var t;return Object(Ye.a)(e,B,((t={})[j]=I(e,ie,m),t))}))}),[h,ie,oe,ae,j,B]),We=o.listNoData||Mt,$e=o.valueHolder||jt,qe=Object(A.useLocalization)(),Ue=!W||le.valid,Ge=o.size,Ze=o.rounded,Qe=o.fillMode,et=i.createElement("span",{className:Object(l.a)("k-dropdowntree k-picker",o.className,(n={},n["k-picker-"+(Pt[Ge]||Ge)]=Ge,n["k-rounded-"+(_t[Ze]||Ze)]=Ze,n["k-picker-"+Qe]=Qe,n["k-focus"]=be,n["k-invalid"]=!Ue,n["k-loading"]=o.loading,n["k-required"]=K,n["k-disabled"]=o.disabled,n)),tabIndex:q,accessKey:o.accessKey,id:s,style:D?Dt({},b,{width:void 0}):b,dir:ue,ref:J,onKeyDown:O?void 0:Te,onMouseDown:Ae,onClick:O?void 0:Ie,onFocus:je,onBlur:Re,role:"listbox","aria-haspopup":"true","aria-expanded":ge,"aria-disabled":O,"aria-label":D,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy},i.createElement("span",{className:"k-input-inner"},i.createElement($e,{item:ie},se||M)),o.loading&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),ae&&!O&&i.createElement("span",{onClick:Le,className:"k-clear-value",title:qe.toLanguageString(z,L[z]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:"k-icon k-i-x"})),i.createElement("button",{tabIndex:-1,type:"button","aria-label":"select",className:Object(l.a)("k-input-button k-button k-icon-button",(r={},r["k-button-"+(Pt[Ge]||Ge)]=Ge,r["k-button-"+Qe]=Qe,r["k-button-"+Qe+"-base"]=Qe,r))},i.createElement("span",{className:"k-button-icon k-icon k-i-arrow-s"})),i.createElement("select",{name:P,ref:Z,tabIndex:-1,"aria-hidden":!0,title:D,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:o.valueMap?o.valueMap.call(void 0,ie):ie})),i.createElement(f.a,{className:Object(l.a)(g.className,{"k-rtl":"rtl"===ue}),popupClass:g.popupClass,style:fe,animate:g.animate,anchor:J.current,show:ge,onOpen:Pe,onClose:_e,appendTo:g.appendTo},o.filterable&&i.createElement(k,{value:void 0===o.filter?Ce:o.filter,inputRef:Y,onChange:He,onKeyDown:Me,size:Ge,rounded:Ze,fillMode:Qe}),h.length>0?i.createElement(Nt,{ref:Q,tabIndex:q,data:Ke,focusIdField:m,textField:o.textField,selectField:j,expandField:o.expandField,childrenField:B,expandIcons:!0,onItemClick:ze,onExpandChange:Ve,size:Ge,item:o.item}):i.createElement(We,null,qe.toLanguageString(F,L[F]))));return D?i.createElement(p.a,{label:D,editorValue:se,editorPlaceholder:M,editorValid:Ue,editorDisabled:O,editorId:s,style:{width:b?b.width:void 0},children:et,dir:ue}):et})),Lt={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,value:a.any,valueMap:a.func,placeholder:a.string,dataItemKey:a.string.isRequired,textField:a.string.isRequired,selectField:a.string,expandField:a.string,subItemsField:a.string,className:a.string,style:a.object,label:a.string,validationMessage:a.string,validityStyles:a.bool,valid:a.bool,required:a.bool,name:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,filterable:a.bool,filter:a.string,loading:a.bool,popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.any,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,onFilterChange:a.func,onExpandChange:a.func,item:a.func,valueHolder:a.func,listNoData:a.func};zt.displayName="KendoReactDropDownTree",zt.defaultProps=At,zt.propTypes=Lt;var Bt=function(){return(Bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vt=s.a.sizeMap,Ht=s.a.roundedMap,Kt={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},Wt=Object(d.a)(),$t=i.forwardRef((function(e,t){var n,r,o=Object(Be.a)(Wt,e);Object(G.a)(X);var a=i.useMemo((function(){return Object($.a)()}),[]),s=o.id||a,d=o.data,h=void 0===d?[]:d,m=o.dataItemKey,v=o.popupSettings,g=void 0===v?{}:v,y=o.style,b=void 0===y?{}:y,w=o.opened,C=o.disabled,O=o.onOpen,x=void 0===O?Xe.a:O,E=o.onClose,N=void 0===E?Xe.a:E,T=o.placeholder,D=o.label,P=o.name,_=o.checkField,j=void 0===_?Kt.checkField:_,R=o.checkIndeterminateField,z=void 0===R?Kt.checkIndeterminateField:R,B=o.subItemsField,V=void 0===B?Kt.subItemsField:B,H=o.validationMessage,K=o.valid,W=o.tags,q=o.value,U=o.required,J=void 0===U?Kt.required:U,Y=o.validityStyles,Z=void 0===Y?Kt.validityStyles:Y,Q=Object(u.a)(o.tabIndex,C),ee=i.useRef(null),te=i.useRef(null),ne=i.useRef(null),re=i.useRef(null),oe=i.useRef(null),ie=i.useRef(!1),ae=i.useRef([]),le=i.useRef(null),ce=i.useState(),ue=ce[0],de=ce[1],pe=i.useState(!1),fe=pe[0],he=pe[1],me=i.useState(!1),ve=me[0],ge=me[1],ye=i.useState(""),be=ye[0],ke=ye[1],we=void 0!==w?w:fe,Ce=Boolean(Array.isArray(q)&&q.length),Oe=function(e,t){var n=e.validationMessage,r=e.valid,o=e.required;return{customError:void 0!==n,valid:Boolean(void 0!==r?r:!o||t),valueMissing:!t}}({validationMessage:H,valid:K,required:J},Ce),xe=Object(Je.a)(te,o.dir),Se=void 0!==g.width?g.width:void 0!==b.width?b.width:Kt.popupSettings.width,Ee=Tt(te,Se),Ne=Bt({width:Ee},void 0!==xe?{direction:xe}:{}),Te=i.useCallback((function(){return te.current&&te.current.focus()}),[]);ae.current=void 0===W?(q||[]).map((function(e){return{text:S(e,o.textField),data:[e]}})):W.slice(),i.useImperativeHandle(ee,(function(){return{props:o,element:te.current,focus:Te}})),i.useImperativeHandle(t,(function(){return ee.current}));var Me=i.useCallback((function(){re.current&&re.current.setCustomValidity&&re.current.setCustomValidity(Oe.valid?"":void 0===H?"Please select a value from the list!":H)}),[H,Oe]);i.useEffect(Me),i.useEffect((function(){le.current&&we&&le.current.setPosition(le.current._popup)}),[q,we]);var De=i.useCallback((function(e,t,n){if(o.onChange){var r=Bt({items:t,operation:n},e);o.onChange.call(void 0,r)}}),[o.onChange]),Pe=i.useCallback((function(e){if(!I(e.item,q,m)&&ee.current){var t=e.item,n=e.nativeEvent,r={syntheticEvent:e.syntheticEvent,nativeEvent:n,target:ee.current};De(r,[t],"toggle")}}),[q,m,De]),_e=i.useCallback((function(e){if(!we){if(x){var t=Bt({},e);x.call(void 0,t)}void 0===w&&he(!0)}}),[we,w,x]),je=i.useCallback((function(e){if(we){if(N){var t=Bt({},e);N.call(void 0,t)}void 0===w&&he(!1)}}),[we,w,N]),Re=i.useCallback((function(e){ie.current=!0,e(),window.setTimeout((function(){return ie.current=!1}),0)}),[]),Ae=i.useCallback((function(e){e&&Re((function(){return e.focus()}))}),[Re]),Fe=i.useCallback((function(){!ve&&we?je({target:ee.current}):o.filterable?Ae(ne.current):Ae(oe.current&&oe.current.element)}),[ve,we,Ae,je,o.filterable]),ze=i.useCallback((function(){ve&&Ae(te.current)}),[ve,Ae]),Le=i.useCallback((function(e){if(!ve&&!ie.current&&(ge(!0),o.onFocus&&ee.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};o.onFocus.call(void 0,t)}}),[ve,o.onFocus]),Ve=i.useCallback((function(e){if(ve&&!ie.current&&ee.current){ge(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};if(o.onBlur){var n=Bt({},t);o.onBlur.call(void 0,n)}je(t)}}),[ve,o.onBlur,we,w,N]),He=i.useCallback((function(){ve&&Re(Xe.a)}),[ve,Re]),Ke=i.useCallback((function(e){if(!e.isDefaultPrevented()&&ee.current){ge(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};we||_e(t)}}),[we,_e]),We=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=oe.current&&oe.current.element;if(ee.current&&(!e.isDefaultPrevented()||ne.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};if(q&&q.length>0&&(t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end||t===c.a.delete)){var i=ae.current,a=ue?i.findIndex((function(e){return M(e,ue,m)})):-1,s=void 0,l=-1!==a;t===c.a.left?s=i[a=l?Math.max(0,a-1):i.length-1]:t===c.a.right?a===i.length-1?s=void 0:l&&(s=i[a=Math.min(i.length-1,a+1)]):t===c.a.home?s=i[0]:t===c.a.end?s=i[i.length-1]:t===c.a.delete&&l&&De(o,i[a].data,"delete"),s!==ue&&de(s)}if(we)if(t===c.a.esc||n&&t===c.a.up)e.preventDefault(),je(o);else if(r&&r.querySelector(".k-focus")&&(t===c.a.up||t===c.a.down||t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end)){if(t===c.a.up&&ne.current){var u=Array.from(r.querySelectorAll(".k-treeview-item")),d=u.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-focus"))}));if(d&&0===u.indexOf(d))return Re((function(){Ae(ne.current)}))}Re(Xe.a)}else t===c.a.down&&Re((function(){Ae(ne.current||r)}));else n&&t===c.a.down&&(e.preventDefault(),_e(o))}}),[we,je,Ae,Re,_e,ue,m,q,De]),$e=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==c.a.up&&t!==c.a.down||(e.preventDefault(),Re(t===c.a.up?function(){Ae(te.current)}:function(){Ae(oe.current&&oe.current.element)}))}),[Ae,Re]),qe=i.useCallback((function(e){if(ee.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};De(t,[],"clear"),je(t),e.preventDefault()}}),[De,je]),Ue=i.useCallback((function(e,t){je({target:ee.current}),ve||Ae(ne.current),De({syntheticEvent:t,nativeEvent:t.nativeEvent,target:ee.current},e,"delete")}),[De,je,Ae,ve]),Ge=i.useCallback((function(e){if(o.onExpandChange&&ee.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,i=e.syntheticEvent,a={level:(s=n,s.split("_").map((function(e){return parseInt(e,10)}))),item:t,nativeEvent:r,syntheticEvent:i,target:ee.current};o.onExpandChange.call(void 0,a)}var s}),[o.onExpandChange]),Ye=i.useCallback((function(e){if(o.onFilterChange&&ee.current){var t={filter:{field:o.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:ee.current};o.onFilterChange.call(void 0,t),void 0===o.filter&&ke(e.target.value)}}),[o.onFilterChange,o.filter,o.textField]),Ze=o.listNoData||Mt,Qe=Object(A.useLocalization)(),et=!Z||Oe.valid,tt=o.size,nt=o.rounded,rt=o.fillMode,ot=i.createElement("span",{className:Object(l.a)("k-multiselect k-input",o.className,(n={},n["k-input-"+(Vt[tt]||tt)]=tt,n["k-rounded-"+(Ht[nt]||nt)]=nt,n["k-input-"+rt]=rt,n["k-focus"]=ve&&!C,n["k-invalid"]=!et,n["k-disabled"]=C,n["k-loading"]=o.loading,n["k-required"]=J,n)),tabIndex:Q,accessKey:o.accessKey,id:s,style:D?Bt({},b,{width:void 0}):b,dir:xe,ref:te,onKeyDown:C?void 0:We,onMouseDown:He,onFocus:Le,onBlur:Ve,role:"listbox","aria-haspopup":"true","aria-expanded":we,"aria-disabled":C,"aria-label":D,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,onClick:C?void 0:Ke},ae.current.length>0&&i.createElement("div",{className:Object(l.a)("k-input-values k-chip-list k-selection-multiple",(r={},r["k-chip-list-"+(Vt[tt]||tt)]=tt,r)),role:"listbox",id:"tagslist-"+s},i.createElement(Ie,{tag:o.tag,onTagDelete:Ue,data:ae.current,guid:s,focused:ue?ae.current.find((function(e){return M(e,ue,m)})):void 0,size:tt})),!Ce&&i.createElement("span",{className:"k-input-inner"},i.createElement("span",{className:"k-input-value-text"}," ")),o.loading&&i.createElement("span",{className:"k-icon k-i-loading k-input-loading-icon"}),Ce&&!C&&i.createElement(se,{onClick:qe}),i.createElement("select",{name:P,ref:re,tabIndex:-1,"aria-hidden":!0,title:D,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:o.valueMap?o.valueMap.call(void 0,q):q})),i.createElement(f.a,{popupClass:g.popupClass,className:Object(l.a)(g.className,{"k-rtl":"rtl"===xe}),style:Ne,animate:g.animate,anchor:te.current,show:we,onOpen:Fe,onClose:ze,appendTo:g.appendTo,ref:le},o.filterable&&i.createElement(k,{value:void 0===o.filter?be:o.filter,inputRef:ne,onChange:Ye,onKeyDown:$e,tabIndex:Q,size:tt,rounded:nt,fillMode:rt}),h.length>0?i.createElement(Nt,{ref:oe,tabIndex:Q,data:h,focusIdField:m,textField:o.textField,checkField:j,checkIndeterminateField:z,expandField:o.expandField,childrenField:V,expandIcons:!0,onItemClick:Pe,onCheckChange:Pe,onExpandChange:Ge,checkboxes:!0,size:tt,item:o.item}):i.createElement(Ze,null,Qe.toLanguageString(F,L[F]))));return D?i.createElement(p.a,{label:D,editorValue:Ce,editorPlaceholder:T,editorValid:et,editorDisabled:C,editorId:s,style:{width:b?b.width:void 0},children:ot,dir:xe}):ot})),qt={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,value:a.any,valueMap:a.func,placeholder:a.string,dataItemKey:a.string.isRequired,textField:a.string.isRequired,checkField:a.string,checkIndeterminateField:a.string,expandField:a.string,subItemsField:a.string,className:a.string,style:a.object,label:a.string,validationMessage:a.string,validityStyles:a.bool,valid:a.bool,required:a.bool,name:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,filterable:a.bool,filter:a.string,loading:a.bool,tags:a.arrayOf(a.shape({text:a.string,data:a.arrayOf(a.any)})),popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.any,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,onFilterChange:a.func,onExpandChange:a.func,item:a.func,listNoData:a.func};$t.displayName="KendoReactMultiSelectTree",$t.defaultProps=Kt,$t.propTypes=qt;var Ut=function(e,t){var n={};return e&&e.length&&e.forEach((function(e){n[t(e)]=!0})),n},Gt=function(e,t){var n=t.items,r=t.dataItemKey,o=t.value,i=t.subItemsField,a=void 0===i?"items":i,s=t.operation,l=Object(He.a)(r),c=Ut(o,l);if("clear"===s)return[];if("delete"===s){var u=Ut(n,l);return o.filter((function(e){return!u[l(e)]}))}for(var d,p,f=n[0],h=l(f),m=Object(He.a)(a),v=e.slice(),g=[];v.length;){var y=v.pop();if(h===l(y)){d=g.map((function(e){return e.item})),p=y;break}g&&g.length&&g[g.length-1].parentPosition===v.length&&g.pop(),(S=m(y))&&S.length&&(g.push({item:y,parentPosition:v.length}),v.push.apply(v,S))}for(var b=(m(p)||[]).slice(),k=[];b.length;){y=b.pop();k.push(y),(S=m(y))&&S.length&&b.push.apply(b,S)}var w=[];if(!c[h]){w.push.apply(w,o),w.push(p),w.push.apply(w,k.filter((function(e){return!c[l(e)]})));for(var C=d.filter((function(e){return!c[l(e)]})),O=Ut(w,l),x=C.length-1;x>-1;x--){var S,E=C[x];if((S=m(E)).filter((function(e){return O[l(e)]})).length<S.length)break;w.push(E),O[l(E)]=!0}}else{var I=l(p),N=Ut(k,l),T=Ut(d,l);w.push.apply(w,o.filter((function(e){var t=l(e);return!N[t]&&I!==t&&!T[t]})))}return w}},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(69);t.Editor=r.default;var o=n(78);t.EditorTools=o.EditorTools;var i=n(14);t.EditorToolsSettings=i.EditorToolsSettings;var a=n(46);t.EditorUtils=a.EditorUtils;var s=n(28);t.EditorDialogs=s.EditorDialogs;var l=n(5);t.ProseMirror={Selection:l.Selection,SelectionRange:l.SelectionRange,TextSelection:l.TextSelection,NodeSelection:l.NodeSelection,AllSelection:l.AllSelection,EditorState:l.EditorState,Plugin:l.Plugin,PluginKey:l.PluginKey,Transaction:l.Transaction,Decoration:l.Decoration,DecorationSet:l.DecorationSet,EditorView:l.EditorView,Node:l.Node,ResolvedPos:l.ResolvedPos,NodeRange:l.NodeRange,Fragment:l.Fragment,Slice:l.Slice,ReplaceError:l.ReplaceError,Mark:l.Mark,Schema:l.Schema,NodeType:l.NodeType,MarkType:l.MarkType,ContentMatch:l.ContentMatch,DOMParser:l.DOMParser,DOMSerializer:l.DOMSerializer,Transform:l.Transform,Step:l.Step,StepResult:l.StepResult,joinPoint:l.joinPoint,canJoin:l.canJoin,canSplit:l.canSplit,insertPoint:l.insertPoint,dropPoint:l.dropPoint,liftTarget:l.liftTarget,findWrapping:l.findWrapping,StepMap:l.StepMap,MapResult:l.MapResult,Mapping:l.Mapping,AddMarkStep:l.AddMarkStep,RemoveMarkStep:l.RemoveMarkStep,ReplaceStep:l.ReplaceStep,ReplaceAroundStep:l.ReplaceAroundStep,replaceStep:l.replaceStep,deleteSelection:l.deleteSelection,joinBackward:l.joinBackward,selectNodeBackward:l.selectNodeBackward,joinForward:l.joinForward,selectNodeForward:l.selectNodeForward,joinUp:l.joinUp,joinDown:l.joinDown,lift:l.lift,newlineInCode:l.newlineInCode,exitCode:l.exitCode,createParagraphNear:l.createParagraphNear,liftEmptyBlock:l.liftEmptyBlock,splitBlock:l.splitBlock,splitBlockKeepMarks:l.splitBlockKeepMarks,selectParentNode:l.selectParentNode,selectAll:l.selectAll,wrapIn:l.wrapIn,setBlockType:l.setBlockType,toggleMark:l.toggleMark,autoJoin:l.autoJoin,chainCommands:l.chainCommands,pcBaseKeymap:l.pcBaseKeymap,macBaseKeymap:l.macBaseKeymap,baseKeymap:l.baseKeymap,history:l.history,undo:l.undo,redo:l.redo,undoDepth:l.undoDepth,redoDepth:l.redoDepth,InputRule:l.InputRule,inputRules:l.inputRules,undoInputRule:l.undoInputRule,emDash:l.emDash,ellipsis:l.ellipsis,openDoubleQuote:l.openDoubleQuote,closeDoubleQuote:l.closeDoubleQuote,openSingleQuote:l.openSingleQuote,closeSingleQuote:l.closeSingleQuote,smartQuotes:l.smartQuotes,wrappingInputRule:l.wrappingInputRule,textblockTypeInputRule:l.textblockTypeInputRule,keymap:l.keymap,keydownHandler:l.keydownHandler,orderedList:l.orderedList,bulletList:l.bulletList,listItem:l.listItem,addListNodes:l.addListNodes,wrapInList:l.wrapInList,splitListItem:l.splitListItem,liftListItem:l.liftListItem,sinkListItem:l.sinkListItem,dropCursor:l.dropCursor,gapCursor:l.gapCursor,tableEditing:l.tableEditing,fixTables:l.fixTables,fixTablesKey:l.fixTablesKey,cellAround:l.cellAround,isInTable:l.isInTable,selectionCell:l.selectionCell,moveCellForward:l.moveCellForward,inSameTable:l.inSameTable,findCell:l.findCell,colCount:l.colCount,nextCell:l.nextCell,removeColSpan:l.removeColSpan,addColSpan:l.addColSpan,columnIsHeader:l.columnIsHeader,tableNodes:l.tableNodes,tableNodeTypes:l.tableNodeTypes,CellSelection:l.CellSelection,TableMap:l.TableMap,tableEditingKey:l.tableEditingKey,columnResizing:l.columnResizing,columnResizingPluginKey:l.columnResizingPluginKey,updateColumnsOnResize:l.updateColumnsOnResize,selectedRect:l.selectedRect,addColumn:l.addColumn,addColumnBefore:l.addColumnBefore,addColumnAfter:l.addColumnAfter,deleteColumn:l.deleteColumn,rowIsHeader:l.rowIsHeader,addRow:l.addRow,addRowBefore:l.addRowBefore,addRowAfter:l.addRowAfter,deleteRow:l.deleteRow,mergeCells:l.mergeCells,splitCell:l.splitCell,splitCellWithType:l.splitCellWithType,setCellAttr:l.setCellAttr,toggleHeader:l.toggleHeader,toggleHeaderRow:l.toggleHeaderRow,toggleHeaderColumn:l.toggleHeaderColumn,toggleHeaderCell:l.toggleHeaderCell,goToNextCell:l.goToNextCell,deleteTable:l.deleteTable}},,function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(1),l=n(4),c=n(2),u=n(5),d=n(61),p=n(70),f=n(14),h=n(28),m=n(46),v=n(45),g=n(75),y=f.EditorToolsSettings.link,b=f.EditorToolsSettings.bold,k=f.EditorToolsSettings.italic,w=f.EditorToolsSettings.underline,C=n(76),O=n(8),x=n(77),S=function(e){function t(t){var n=e.call(this,t)||this;if(n.state={view:void 0,linkDialog:!1},n.trOnChange=null,n.htmlOnChange=null,n.focus=function(){n.view&&n.view.focus()},n.renderDialog=function(e,t,r){return n.state[r]&&a.createElement(e,{view:n.view,settings:t,dir:n.props.dir,onClose:function(){var e;return n.setState(((e={})[r]=!1,e))}})},n.renderTool=function(e,t){var r=a.createElement(e,{view:n.view,dir:n.props.dir,key:t});return r.type===l.ToolbarSeparator?a.createElement(e,{key:t}):r},n.updateTools=function(e,t){n.setState({view:e})},n.filterTransaction=function(e,t){var r={target:n,transaction:e,state:t};return!1!==(n.props.onExecute&&n.props.onExecute.call(void 0,r))},n.onPasteHtml=function(e){if(n.props.onPasteHtml&&n.pasteEvent){var t={target:n,pastedHtml:e,nativeEvent:n.pasteEvent},r=n.props.onPasteHtml.call(void 0,t);if(n.pasteEvent=void 0,"string"==typeof r)return r}return e},n.dispatchTransaction=function(e){var t=e.docChanged;if(n.props.onChange&&t){n.trOnChange=e;var r=e.doc,o=e.doc.type.schema,i=n,a={target:i,value:r,get html(){return i.htmlOnChange=m.EditorUtils.getHtml({doc:r,schema:o}),i.htmlOnChange},transaction:e,schema:o};n.props.onChange.call(void 0,a)}!n.view||void 0!==n.props.value&&t||n.view.updateState(n.view.state.apply(e))},n.onFocus=function(e,t){if(n.props.onFocus){var r={target:n,nativeEvent:t};n.props.onFocus.call(void 0,r)}return!1},n.onBlur=function(e,t){if(n.props.onBlur){var r={target:n,nativeEvent:t};n.props.onBlur.call(void 0,r)}return!1},n.onPaste=function(e,t){return n.props.onPasteHtml&&(n.pasteEvent=t),!1},void 0!==O)O.validatePackage(x.packageMetadata);else{var r="License activation failed for "+x.packageMetadata.name+"\n";r+="The @progress/kendo-licensing script is not loaded.\n",r+="See "+x.packageMetadata.licensingDocsUrl+" for more information.\n",console.warn(r)}return n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentElement",{get:function(){return this._contentElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.iframe&&C.firefox||this.initialize()},t.prototype.componentDidUpdate=function(e){var t=this.props.value,n=this.view;void 0!==t&&n&&(g.updateEditorValue(n,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)},t.prototype.componentWillUnmount=function(){this.view&&this.view.destroy(),this._view=void 0},t.prototype.render=function(){var e=this,t=this.props,n=t.tools,r=void 0===n?[]:n,o=t.defaultEditMode,i=void 0===o?"iframe":o,s=t.preserveWhitespace,u=void 0===s?"full":s,d=t.style,p=t.className;this.view&&(v.editorPropsKey.getState(this.view.state).preserveWhitespace=u);var f=this.props.contentStyle;void 0===f&&void 0===(d||{}).height&&(f={height:"300px"});var m=r.map((function(t,n){return Array.isArray(t)?a.createElement(l.ButtonGroup,{key:n},t.map(e.renderTool,n)):e.renderTool(t,n)}));return a.createElement("div",{ref:function(t){return e._element=t},className:c.classNames("k-widget k-editor",p,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:d},m.length>0&&a.createElement(l.Toolbar,{keyboardNavigation:this.props.keyboardNavigation},m),"iframe"===i?a.createElement("div",{className:"k-editor-content"},a.createElement("iframe",{onLoad:C.firefox?function(){e.initialize()}:void 0,ref:function(t){return e.iframe=t},frameBorder:"0",style:f,className:"k-iframe"})):a.createElement("div",{style:f,className:"k-editor-content"},a.createElement("div",{ref:function(t){return e._contentElement=t},suppressContentEditableWarning:!0})),this.renderDialog(h.EditorDialogs.InsertLinkDialog,y,"linkDialog"))},t.prototype.initialize=function(){var e=this,t=this.iframe&&this.iframe.contentWindow;if(t){var n=t.document;[p.defaultStyle,p.tablesStyles,"rtl"===this.props.dir?p.rtlStyles:void 0].forEach((function(e){if(e){var t=n.createElement("style");t.appendChild(n.createTextNode(e)),n.head.appendChild(t)}}));var r=n.createElement("meta");r.setAttribute("charset","utf-8"),n.head.appendChild(r),this._contentElement=n.createElement("div"),n.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content")}var o=this._contentElement;if(o){var a=this.props.preserveWhitespace,s=void 0===a?"full":a,l=[new u.Plugin({view:function(){return{update:e.updateTools}},key:new u.PluginKey("toolbar-tools-update-plugin")}),new u.Plugin({filterTransaction:this.filterTransaction,key:new u.PluginKey("onExecute-event-plugin")}),new u.Plugin({key:v.editorPropsKey,state:{init:function(){return{preserveWhitespace:s}},apply:function(e,t){return t}}}),u.spacesFix(),u.caretColor(),u.history(),u.dropCursor(),u.gapCursor(),u.tableEditing()],c=i({},m.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:b,italic:k,underline:w}}),{"Mod-k":function(){var t=e.state.linkDialog,n=e.view;if(n){var r=n.state,o=r.selection.empty,i=u.getMark(r,r.schema.marks[y.mark]);t||o&&!i||e.setState({linkDialog:!0})}return!t}}),f=this.props,h=f.defaultContent,g=void 0===h?"":h,C=f.value,O=f.onMount,x=C&&"string"!=typeof C?C:m.EditorUtils.createDocument(new u.Schema({nodes:d.nodes,marks:d.marks}),C||g,{preserveWhitespace:s}),S={state:u.EditorState.create({plugins:l.concat([u.keymap(c),u.keymap(u.baseKeymap)]),doc:x}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste}},E={plugins:l,shortcuts:c,target:this,viewProps:S,dom:o},I=this._view=O&&O.call(void 0,E)||new u.EditorView({mount:o},S);this.setState({view:I})}},t.propTypes={defaultContent:s.string,value:s.oneOfType([s.object,s.string]),defaultEditMode:s.oneOf(["iframe","div"]),contentStyle:s.object,dir:s.string,className:s.string,style:s.object,tools:s.arrayOf(s.any),keyboardNavigation:s.bool,resizable:s.bool,preserveWhitespace:s.oneOf([!0,!1,"full"]),onMount:s.func,onFocus:s.func,onBlur:s.func,onChange:s.func,onPasteHtml:s.func,onExecute:s.func},t}(a.Component);t.default=S},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStyle='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\n\nhtml {\n min-height: 100%;\n}\n\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\n\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n\n.k-content > p {\n margin: 0 0 1em;\n}\n\n.k-content table {\n white-space: pre-wrap;\n}\n\n.k-content .k-text-selected, .k-content::selection {\n color: HighlightText;\n background-color: Highlight;\n}\n\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\n\n.ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n\n.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\n\n.k-editor-resize-wrap-element table td p,\n.k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n}\n',t.tablesStyles='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n',t.rtlStyles="body { direction: rtl }"},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(31),s=n(4),l=n(5),c=n(3),u=n(7),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.href=null,t.title=null,t.target=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props.view,n=t.props.settings.mark,r={href:t.href?t.href.value:void 0,title:t.title?t.title.value:void 0,target:t.target&&t.target.checked?"_blank":void 0};l.applyLink({mark:n,attrs:r},t.props.settings.commandName)(e.state,e.dispatch),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,d=t.render,p=c.provideLocalizationService(this),f=r.messages,h=f.insertHyperlinkDialogTitle,m=f.insertHyperlinkAddress,v=f.insertHyperlinkTitle,g=f.insertHyperlinkNewWindow,y=f.insertHyperlinkCancel,b=f.insertHyperlinkInsert,k=!!n&&l.getMark(n.state,n.state.schema.marks[r.mark]),w=i.createElement("div",{className:"k-edit-form-container"},i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-link-url"},p.toLanguageString(m,u.messages[m]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-url",ref:function(t){return e.href=t},defaultValue:k&&k.attrs.href||void 0,autoFocus:!0})),i.createElement("div",{className:"k-edit-label k-editor-link-text-row"},i.createElement("label",{htmlFor:"k-editor-link-text"},p.toLanguageString(v,u.messages[v]))),i.createElement("div",{className:"k-edit-field k-editor-link-text-row"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-link-text",ref:function(t){return e.title=t},defaultValue:k&&k.attrs.title||void 0})),!1!==r.linkTarget&&i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",id:"k-editor-link-target",ref:function(t){return e.target=t},defaultChecked:k&&!!k.attrs.target||void 0}),i.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},p.toLanguageString(g,u.messages[g])))),C=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},p.toLanguageString(y,u.messages[y])),i.createElement(s.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},p.toLanguageString(b,u.messages[b]))],O=i.createElement(a.Dialog,{title:p.toLanguageString(h,u.messages[h]),onClose:this.onClose,closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},w,i.createElement(a.DialogActionsBar,null,C));return d?d(O,{content:w,actionButtons:C}):O},t}(i.Component);t.InsertLinkDialog=d,c.registerForLocalization(d)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(31),s=n(4),l=n(5),c=n(3),u=n(7),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.src=null,t.altText=null,t.title=null,t.width=null,t.height=null,t.onClose=function(){t.props.view.focus(),t.props.onClose()},t.onInsert=function(){var e=t.props,n=e.view,r=e.settings,o=n.state.schema.nodes[r.node],i={src:t.src?t.src.value:null,title:t.title?t.title.value:null,alt:t.altText?t.altText.value:null,width:t.width?t.width.value:null,height:t.height?t.height.value:null},a=Object.keys(i).filter((function(e){return null!==i[e]&&""!==i[e]})).reduce((function(e,t){var n;return Object.assign(e,((n={})[t]=i[t],n))}),{}),s=o.createAndFill(a);l.insertNode(s,!0)(n.state,(function(e){return n.dispatch(e.setMeta("commandName",r.commandName).setMeta("args",a))})),t.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,d=t.render,p=r.messages,f=p.insertImageDialogTitle,h=p.insertImageAddress,m=p.insertImageTitle,v=p.insertImageAltText,g=p.insertImageWidth,y=p.insertImageHeight,b=p.insertImageCancel,k=p.insertImageInsert,w=c.provideLocalizationService(this),C=n&&n.state,O={};C&&C.selection instanceof l.NodeSelection&&C.selection.node.type===C.schema.nodes[r.node]&&(O=C.selection.node.attrs);var x=i.createElement("div",{className:"k-edit-form-container"},i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-url"},w.toLanguageString(h,u.messages[h]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-url",defaultValue:O.src,ref:function(t){return e.src=t},autoFocus:!0})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-alt"},w.toLanguageString(v,u.messages[v]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-alt",defaultValue:O.alt,ref:function(t){return e.altText=t}})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-title"},w.toLanguageString(m,u.messages[m]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-title",defaultValue:O.title,ref:function(t){return e.title=t}})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-width"},w.toLanguageString(g,u.messages[g]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-width",defaultValue:O.width,ref:function(t){return e.width=t}})),i.createElement("div",{className:"k-edit-label"},i.createElement("label",{htmlFor:"k-editor-image-height"},w.toLanguageString(y,u.messages[y]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-input",id:"k-editor-image-height",defaultValue:O.height,ref:function(t){return e.height=t}}))),S=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},w.toLanguageString(b,u.messages[b])),i.createElement(s.Button,{onClick:this.onInsert,themeColor:"primary",dir:o,key:"insert"},w.toLanguageString(k,u.messages[k]))],E=i.createElement(a.Dialog,{title:w.toLanguageString(f,u.messages[f]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},x,i.createElement(a.DialogActionsBar,null,S));return d?d(E,{content:x,actionButtons:S}):E},t}(i.Component);t.InsertImageDialog=d,c.registerForLocalization(d)},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(31),s=n(4),l=n(5),c=n(3),u=n(7),d=n(45),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.htmlArea=null,t.onUpdate=function(){var e=t.props,n=e.view,r=e.settings,o=l.trimWhitespace(t.htmlArea?t.htmlArea.value:""),i=d.editorPropsKey.getState(n.state).preserveWhitespace;l.setHtml(o,r.commandName,{preserveWhitespace:i})(n.state,n.dispatch),t.onClose()},t.onClose=function(){t.props.view.focus(),t.props.onClose()},t}return o(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.view,r=t.settings,o=t.dir,d=t.render,p=c.provideLocalizationService(this),f=r.messages,h=f.viewHtmlDialogTitle,m=f.viewHtmlCancel,v=f.viewHtmlUpdate,g=i.createElement("textarea",{className:"k-textarea k-editor-textarea",style:{height:"280px",width:"490px"},ref:function(t){return e.htmlArea=t},defaultValue:l.indentHtml(l.getHtml(n.state)),autoFocus:!0}),y=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},p.toLanguageString(m,u.messages[m])),i.createElement(s.Button,{onClick:this.onUpdate,themeColor:"primary",dir:o,key:"update"},p.toLanguageString(v,u.messages[v]))],b=i.createElement(a.Dialog,{title:p.toLanguageString(h,u.messages[h]),onClose:this.onClose,key:"dialog",closeIcon:!0,dir:o,style:"rtl"===o?{textAlign:"right"}:void 0,appendTo:document.body},g,i.createElement(a.DialogActionsBar,null,y));return d?d(b,{content:g,actionButtons:y}):b},t}(i.Component);t.ViewHtmlDialog=p,c.registerForLocalization(p)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=n(14),a=i.EditorToolsSettings.bold,s=i.EditorToolsSettings.underline,l=i.EditorToolsSettings.italic,c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);t.getShortcuts=function(e){var t=o.chainCommands(o.exitCode,(function(t,n){var r=e&&e.types&&e.types.hardBreak||"hard_break",o=t.schema.nodes[r];return n&&n(t.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0})),n=e&&e.types&&e.types.listItem||"list_item",i=e&&e.toolsSettings||{};return r({"Mod-b":function(e,t){return o.toggleInlineFormat(i.bold||a)(e,t)},"Mod-i":function(e,t){return o.toggleInlineFormat(i.italic||l)(e,t)},"Mod-u":function(e,t){return o.toggleInlineFormat(i.underline||s)(e,t)},"Mod-z":o.undo,"Shift-Mod-z":o.redo},r({},c?{}:{"Mod-y":o.redo}),{Backspace:o.undoInputRule,"Mod-Enter":t,"Shift-Enter":t},r({},c?{"Ctrl-Enter":t}:{}),{Enter:function(e,t){return o.splitListItem(e.schema.nodes[n])(e,t)},Tab:o.goToNextCell(1),"Shift-Tab":o.goToNextCell(-1)})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(46),i=function(e,t){var n=t.tr||e.state.tr.setSelection(new r.AllSelection(e.state.doc)).replaceSelectionWith(t.doc||o.EditorUtils.createDocument(e.state.schema,t.html||"")).setMeta("commandName","setHTML");e.updateState(e.state.apply(n))};t.updateEditorValue=function(e,t,n,r,o){"string"==typeof t?r&&t===o?i(e,{tr:r}):t!==n&&i(e,{html:t}):r&&t.eq(r.doc)?i(e,{tr:r}):e.state.doc.eq(t)||i(e,{doc:t})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firefox="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-react-editor",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426866,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=n(14),l=n(79),c=n(82),u=n(83),d=n(84),p=n(85),f=n(86),h=n(87),m=n(88),v=n(89),g=n(90),y=n(91),b=n(92),k=n(93),w=n(94),C=n(95),O=n(96),x=n(97),S=n(98),E=n(99),I=n(100),N=n(101);!function(e){function t(e){return c.createAlignTool(e)}e.createAlignTool=t;var n=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignLeft));e.AlignLeft=n;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignRight));e.AlignRight=r;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignCenter));e.AlignCenter=T;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignJustify));function D(e){return l.InsertTableToolNS.createInsertTableTool(e)}e.AlignJustify=M,e.createInsertTableTool=D;var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(D(s.EditorToolsSettings.insertTable));e.InsertTable=P;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.InsertTablePopupNS.InsertTablePopup);function j(e){return u.FontStyleToolNS.createStyleDropDownList(e)}e.InsertTablePopup=_,e.createStyleDropDownList=j;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(j(s.EditorToolsSettings.fontSize));e.FontSize=R;var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(j(s.EditorToolsSettings.fontName));function F(e){return p.FormatBlockToolNS.createFormatBlockDropDownList(e)}e.FontName=A,e.ForeColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.foreColor,e))},e.BackColor=function(e){return a.createElement(d.ApplyColorTool,i({},s.EditorToolsSettings.backColor,e))},e.createFormatBlockDropDownList=F;var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(F(s.EditorToolsSettings.formatBlock));function L(e){return f.HistoryToolNS.createUndoTool(e)}function B(e){return f.HistoryToolNS.createRedoTool(e)}e.FormatBlock=z,e.createUndoTool=L,e.createRedoTool=B;var V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(L(s.EditorToolsSettings.undo));e.Undo=V;var H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(B(s.EditorToolsSettings.redo));function K(e){return h.IndentToolNS.createIndentTool(e)}e.Redo=H,e.createIndentTool=K;var W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(K(s.EditorToolsSettings.indent));function $(e){return m.InlineFormatToolNS.createInlineFormatTool(e)}e.Indent=W,e.createInlineFormatTool=$;var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.bold));e.Bold=q;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.italic));e.Italic=U;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.underline));e.Underline=G;var X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.strikethrough));e.Strikethrough=X;var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.subscript));e.Subscript=J;var Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}($(s.EditorToolsSettings.superscript));function Z(e){return v.createInsertImageTool(e)}e.Superscript=Y,e.createInsertImageTool=Z;var Q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Z(s.EditorToolsSettings.image));function ee(e){return g.LinkToolNS.createLinkTool(e)}e.InsertImage=Q,e.createLinkTool=ee;var te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.link));e.Link=te;var ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ee(s.EditorToolsSettings.insertFile));function re(e){return y.ListToolNS.createListTool(e)}e.InsertFile=ne,e.createListTool=re;var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.orderedList));e.OrderedList=oe;var ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(re(s.EditorToolsSettings.bulletList));function ae(e){return b.OutdentToolNS.createOutdentTool(e)}e.UnorderedList=ie,e.BulletedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.bulletList.listType,items:[{icon:"list-unordered",text:"Disc",style:"disc"},{icon:"list-unordered-outline",text:"Circle",style:"circle"},{icon:"list-unordered-square",text:"Square",style:"square"}],icon:"list-unordered"},e))},e.NumberedList=function(e){return a.createElement(N.ListTool,i({listType:s.EditorToolsSettings.orderedList.listType,items:[{icon:"list-ordered",text:"Decimal"},{icon:"list-roman-upper",text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",text:"Lower latin",style:"lower-latin"}],icon:"list-ordered"},e))},e.createOutdentTool=ae;var se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ae(s.EditorToolsSettings.outdent));function le(e){return k.TableEditNS.createAddRowBeforeTool(e)}function ce(e){return k.TableEditNS.createAddRowAfterTool(e)}function ue(e){return k.TableEditNS.createAddColumnBeforeTool(e)}function de(e){return k.TableEditNS.createAddColumnAfterTool(e)}function pe(e){return k.TableEditNS.createDeleteRowTool(e)}function fe(e){return k.TableEditNS.createDeleteColumnTool(e)}function he(e){return k.TableEditNS.createDeleteTableTool(e)}function me(e){return k.TableEditNS.createMergeCellsTool(e)}function ve(e){return k.TableEditNS.createSplitCellTool(e)}e.Outdent=se,e.Print=function(e){return a.createElement(O.Print,i({},e))},e.Pdf=function(e){return a.createElement(x.Pdf,i({},e))},e.SelectAll=function(e){return a.createElement(S.SelectAll,i({},e))},e.CleanFormatting=function(e){return a.createElement(E.CleanFormatting,i({},e))},e.createAddRowBeforeTool=le,e.createAddRowAfterTool=ce,e.createAddColumnBeforeTool=ue,e.createAddColumnAfterTool=de,e.createDeleteRowTool=pe,e.createDeleteColumnTool=fe,e.createDeleteTableTool=he,e.createMergeCellsTool=me,e.createSplitCellTool=ve;var ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(le(s.EditorToolsSettings.addRowBefore));e.AddRowBefore=ge;var ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ce(s.EditorToolsSettings.addRowAfter));e.AddRowAfter=ye;var be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ue(s.EditorToolsSettings.addColumnBefore));e.AddColumnBefore=be;var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(de(s.EditorToolsSettings.addColumnAfter));e.AddColumnAfter=ke;var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(pe(s.EditorToolsSettings.deleteRow));e.DeleteRow=we;var Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(fe(s.EditorToolsSettings.deleteColumn));e.DeleteColumn=Ce;var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(he(s.EditorToolsSettings.deleteTable));e.DeleteTable=Oe;var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(me(s.EditorToolsSettings.mergeCells));e.MergeCells=xe;var Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ve(s.EditorToolsSettings.splitCell));function Ee(e){return w.UnlinkToolNS.createUnlinkTool(e)}e.SplitCell=Se,e.createUnlinkTool=Ee;var Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ee(s.EditorToolsSettings.unlink));function Ne(e){return C.ViewHtmlToolNS.createViewHtmlTool(e)}e.Unlink=Ie,e.createViewHtmlTool=Ne;var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ne(s.EditorToolsSettings.viewHtml));e.ViewHtml=Te;var Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(I.FindAndReplace);e.FindAndReplace=Me}(t.EditorTools||(t.EditorTools={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(80);t.InsertTableToolNS=r.InsertTableToolNS;var o=n(63);t.InsertTablePopupNS=o.InsertTablePopupNS},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(9),u=n(3),d=n(7),p=n(63),f=n(5);!function(e){e.createInsertTableTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedPopup:!1},e.button=null,e.togglePopup=function(){e.setState({openedPopup:!e.state.openedPopup})},e.closePopup=function(){e.state.openedPopup&&e.togglePopup()},e.onTableInsert=function(t,n){var r=e.props.view;if(r){var o=f.createTable(r.state.schema.nodes,t,n);o&&f.insertNode(o,!0)(r.state,r.dispatch),r.focus(),e.closePopup()}},e}return o(n,t),n.prototype.render=function(){var t=this,n=this.props,r=n.view,o=n.render,h=a(n,["view","render"]),m=r&&r.state,v=u.provideLocalizationService(this),g=e.messages,y=g.createTable,b=g.createTableHint,k=v.toLanguageString(y,d.messages[y]),w=v.toLanguageString(b,d.messages[b]),C=[s.createElement(l.Button,i({onClick:this.togglePopup,ref:function(e){return t.button=e&&e.element},key:"InsertTable",disabled:!m||!f.canInsert(m,m.schema.nodes.table)},c.onDownPreventDefault,{title:k},e.props,h)),r&&s.createElement(p.InsertTablePopupNS.InsertTablePopup,{key:"insertTablePopup",createTableMessage:k,createTableHintMessage:w,dir:h.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return o?o.call(void 0,C,{view:r}):C},n}(s.Component);return u.registerForLocalization(t),t}}(t.InsertTableToolNS||(t.InsertTableToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(9),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={row:-1,col:-1},t}return o(t,e),t.prototype.renderCell=function(e,t,n){var r=this,o=Math.floor(e/this.props.columns),a=e%this.props.columns,s=a<=n&&o<=t;return i.createElement("span",{className:"k-ct-cell k-disabled"+(s?" k-selected":""),onMouseEnter:function(){return r.setState({row:o,col:a})},onClick:function(){return r.props.onCellClick.call(void 0,o,a)},key:e})},t.prototype.render=function(){var e=this,t=[],n=this.props.columns*this.props.rows,r=this.state,o=r.row,s=r.col,l=this.props.onDown,c=this.props.createTableMessage;s>-1&&(c=a.formatString(this.props.createTableHintMessage,o+1,s+1));for(var u=0;u<n;u++)t.push(this.renderCell(u,o,s));return[i.createElement("div",{onMouseLeave:function(){return e.setState({row:-1,col:-1})},key:"cells",style:{borderColor:"inherit"},onPointerDown:l,onMouseDown:l},t),i.createElement("div",{className:"k-status",key:"status",onPointerDown:l,onMouseDown:l},c)]},t}(i.Component);t.default=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(14),u=n(5),d=n(9),p=n(3),f=n(7),h=c.EditorToolsSettings.alignRemove;t.createAlignTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),c=n&&n.state,m=!!c&&u.isAligned(c,e.actions),v=m?h.actions:e.actions,g=m?h.commandName:e.commandName,y=p.provideLocalizationService(this),b=e.messages.title,k=s.createElement(l.Button,i({onClick:function(){return n&&u.alignBlocks(v,g)(n.state,n.dispatch)},selected:m,togglable:!0},d.onDownPreventDefault,{title:y.toLanguageString(b,f.messages[b])},e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return p.registerForLocalization(t),t}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(65),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createStyleDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view,i=e.style;if(o){c.applyInlineStyle({style:i,value:r.value},e.commandName)(o.state,o.dispatch);var a=t.syntheticEvent;a&&"click"===a.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=e.style,n=this.props,r=n.view,o=n.render,f=n.data,h=n.defaultItem,m=a(n,["view","render","data","defaultItem"]),v=f||e.items,g=h||e.defaultItem,y=r?c.getInlineStyles(r.state,{name:t,value:/^.+$/}):[],b=d.provideLocalizationService(this);g&&g.localizationKey&&((g=i({},g)).text=g.localizationKey?b.toLanguageString(g.localizationKey,p.messages[g.localizationKey]):g.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?v.find((function(e){return e.value===k})):k,data:v,defaultItem:g,itemRender:u.itemRender,textField:"text",dataItemKey:"value",onChange:this.onChange,style:u.userSelectNone,leftRightKeysNavigation:!1},m));return o?o.call(void 0,w,{view:r}):w},n}(s.Component);return d.registerForLocalization(t),t}}(t.FontStyleToolNS||(t.FontStyleToolNS={}))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(103),a=n(5),s=n(3),l=n(7);t.ApplyColorTool=function(e){var t=e.view,n=e.style,c=e.colorPickerProps,u=e.commandName,d=c.title,p=c.view,f=void 0===p?"palette":p,h=o.useCallback((function(e){t&&(a.applyInlineStyle({style:n,value:e.value},u)(t.state,t.dispatch),"palette"===f&&t.focus())}),[t,n,f,u]);return o.createElement(i.ColorPicker,r({onChange:h,onActiveColorClick:h},c,{title:d?s.useLocalization().toLanguageString(d,l.messages[d]):d}))}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(65),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createFormatBlockDropDownList=function(e){var t=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.onChange=function(t){var r=t.target.value,o=n.props.view;if(o&&c.formatBlockElements(r.value,e.commandName)(o.state,o.dispatch)){var i=t.syntheticEvent;i&&"click"===i.type&&o.focus()}},n}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=t.data,f=t.defaultItem,h=a(t,["view","render","data","defaultItem"]),m=o||e.items,v=f||e.defaultItem,g=n&&n.state,y=g?c.getBlockFormats(g):[],b=d.provideLocalizationService(this);v&&v.localizationKey&&((v=i({},v)).text=v.localizationKey?b.toLanguageString(v.localizationKey,p.messages[v.localizationKey]):v.text);var k=1===new Set(y).size?y[0]:null,w=s.createElement(l.DropDownList,i({value:k?m.find((function(e){return e.value===k})):k,onChange:this.onChange,itemRender:u.itemRender,data:m,defaultItem:v,textField:"text",dataItemKey:"value",style:u.userSelectNone,leftRightKeysNavigation:!1},h));return r?r.call(void 0,w,{view:n}):w},n}(s.Component);return d.registerForLocalization(t),t}}(t.FormatBlockToolNS||(t.FormatBlockToolNS={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(64);!function(e){e.createUndoTool=function(e){return o.createProseMirrorTool(e,r.undo)},e.createRedoTool=function(e){return o.createProseMirrorTool(e,r.redo)}}(t.HistoryToolNS||(t.HistoryToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createIndentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h=f&&f.schema.nodes,m=h&&h[e.listsTypes.listItem],v=e.actions,g=!!f&&(c.isIndented(f,v,o.dir)||v.some((function(e){return h[e.node]&&c.hasNode(f,h[e.node])})))&&!c.hasNode(f,m),y=!!f&&c.canIndentAsListItem(f,m),b=g||y,k=d.provideLocalizationService(this),w=e.messages.title,C=s.createElement(l.Button,i({onClick:function(){n&&y?c.sinkListItem(m)(n.state,n.dispatch):n&&g&&c.indentBlocks(v,e.commandName,o.dir)(n.state,n.dispatch)},title:k.toLanguageString(w,p.messages[w]),disabled:!b},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return d.registerForLocalization(t),t}}(t.IndentToolNS||(t.IndentToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createInlineFormatTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h={mark:e.mark,altMarks:e.altMarks,altStyle:e.altStyle},m=d.provideLocalizationService(this),v=e.messages.title,g=s.createElement(l.Button,i({onClick:function(){return n&&c.toggleInlineFormat(h,f&&f.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},selected:!!f&&c.hasMark(f,h),togglable:!0},u.onDownPreventDefault,{title:m.toLanguageString(v,p.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return d.registerForLocalization(t),t}}(t.InlineFormatToolNS||(t.InlineFormatToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(5),c=n(4),u=n(9),d=n(28),p=n(3),f=n(7);t.createInsertImageTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=h?h.schema.nodes[e.node]:void 0,v=p.provideLocalizationService(this),g=e.messages.insertImage,y=[s.createElement(c.Button,i({onClick:this.toggleDialog,key:"insertImage",disabled:!m||!h||!l.canInsert(h,m)},u.onDownPreventDefault,{title:v.toLanguageString(g,f.messages[g])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,y,{view:n}):y},n}(s.Component);return p.registerForLocalization(t),t}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(28),p=n(3),f=n(7);!function(e){e.createLinkTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),h=n&&n.state,m=!h||h.selection.empty,v=h&&c.getMark(h,h.schema.marks[e.mark]),g=p.provideLocalizationService(this),y=e.messages.insertHyperlink,b=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"link",disabled:m&&!v},u.onDownPreventDefault,{title:g.toLanguageString(y,f.messages[y])},e.props,o)),this.state.openedDialog&&n&&s.createElement(d.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:e,dir:o.dir,view:n,onClose:this.toggleDialog})||null];return r?r.call(void 0,b,{view:n}):b},n}(s.Component);return p.registerForLocalization(t),t}}(t.LinkToolNS||(t.LinkToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createListTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=!1,h=d.provideLocalizationService(this),m=e.messages.title,v=e.types,g=e.listType;if(n){var y=n.state,b=y.schema.nodes,k=c.hasNode(y,b[v.orderedList]),w=c.hasNode(y,b[v.bulletList]);f=g===v.orderedList?k&&!w:!k&&w}var C=s.createElement(l.Button,i({onClick:function(){return n&&c.toggleList(n.state,n.dispatch,n,i({listType:g},v),e.commandName)},togglable:!0,selected:f,title:h.toLanguageString(m,p.messages[m])},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return d.registerForLocalization(t),t}}(t.ListToolNS||(t.ListToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createOutdentTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=n&&n.state,h=!!f&&c.isIndented(f,e.actions,o.dir),m=f&&f.schema.nodes[e.listsTypes.listItem],v=!!f&&c.canOutdentAsListItem(f,{nodes:e.actions,listsTypes:e.listsTypes}),g=h||v,y=d.provideLocalizationService(this),b=e.messages.title,k=s.createElement(l.Button,i({onClick:function(){n&&v?c.liftListItem(m)(n.state,n.dispatch):n&&h&&c.indentBlocks(e.actions,e.commandName,o.dir)(n.state,n.dispatch)},title:y.toLanguageString(b,p.messages[b]),disabled:!g},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return d.registerForLocalization(t),t}}(t.OutdentToolNS||(t.OutdentToolNS={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5),o=n(64),i=function(e,t){var n=r.deleteColumn(e,t);if(n&&!t){var o=r.selectionCell(e),i=o&&o.node(o.depth);if(i&&1===i.content.childCount)return!1}return n},a=function(e,t){var n=r.deleteRow(e,t);if(n&&!t){var o=r.selectionCell(e),i=o&&o.node(o.depth-1);if(i&&1===i.content.childCount)return!1}return n};!function(e){e.createAddRowBeforeTool=function(e){return o.createProseMirrorTool(e,r.addRowBefore)},e.createAddRowAfterTool=function(e){return o.createProseMirrorTool(e,r.addRowAfter)},e.createAddColumnBeforeTool=function(e){return o.createProseMirrorTool(e,r.addColumnBefore)},e.createAddColumnAfterTool=function(e){return o.createProseMirrorTool(e,r.addColumnAfter)},e.createDeleteRowTool=function(e){return o.createProseMirrorTool(e,a)},e.createDeleteColumnTool=function(e){return o.createProseMirrorTool(e,i)},e.createDeleteTableTool=function(e){return o.createProseMirrorTool(e,r.deleteTable)},e.createMergeCellsTool=function(e){return o.createProseMirrorTool(e,r.mergeCells)},e.createSplitCellTool=function(e){return o.createProseMirrorTool(e,r.splitCell)}}(t.TableEditNS||(t.TableEditNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(5),u=n(9),d=n(3),p=n(7);!function(e){e.createUnlinkTool=function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f={mark:e.mark},h=!!n&&c.hasMark(n.state,f),m=d.provideLocalizationService(this),v=e.messages.title,g=s.createElement(l.Button,i({onClick:function(){return n&&c.removeLink(f,n.state.tr.setMeta("commandName",e.commandName))(n.state,n.dispatch)},disabled:!h},u.onDownPreventDefault,{title:m.toLanguageString(v,p.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return d.registerForLocalization(t),t}}(t.UnlinkToolNS||(t.UnlinkToolNS={}))},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(9),u=n(28),d=n(3),p=n(7);!function(e){e.createViewHtmlTool=function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={openedDialog:!1},e.toggleDialog=function(){e.setState({openedDialog:!e.state.openedDialog})},e}return o(n,t),n.prototype.render=function(){var t=this.props,n=t.view,r=t.render,o=a(t,["view","render"]),f=d.provideLocalizationService(this),h=e.messages.viewHtml,m=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"viewHtml"},c.onDownPreventDefault,{title:f.toLanguageString(h,p.messages[h])},e.props,o)),this.state.openedDialog&&n&&s.createElement(u.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:n,settings:e,dir:o.dir,onClose:this.toggleDialog})||null];return r?r.call(void 0,m,{view:n}):m},n}(s.Component);return d.registerForLocalization(t),t}}(t.ViewHtmlToolNS||(t.ViewHtmlToolNS={}))},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(9),c=n(7),u=n(14).EditorToolsSettings.print;t.Print=function(e){var t=e.view,n=e.render,d=e.settings,p=void 0===d?u:d,f=o(e,["view","render","settings"]),h=t&&t.dom,m=h&&h.ownerDocument,v=m&&m.defaultView,g=p.messages.title,y=i.useCallback((function(){v&&v.print()}),[v]),b=i.createElement(a.Button,r({onClick:y,disabled:!v||v===window,title:s.useLocalization().toLanguageString(g,c.messages[g])},l.onDownPreventDefault,p.props,f));return n?n.call(void 0,b,{view:t}):b}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(104),c=n(9),u=n(7),d=n(14),p=d.EditorToolsSettings.pdf,f=d.EditorToolsSettings.savePdfOptions;t.Pdf=function(e){var t=e.view,n=e.render,d=e.settings,h=void 0===d?p:d,m=e.savePdfOptions,v=e.savePdfCallback,g=o(e,["view","render","settings","savePdfOptions","savePdfCallback"]),y=h.messages.title,b=i.useCallback((function(){t&&l.savePDF(t.dom,r({},f,m||{}),v)}),[t,m,v]),k=i.createElement(a.Button,r({onClick:b,title:s.useLocalization().toLanguageString(y,u.messages[y])},c.onDownPreventDefault,h.props,g));return n?n.call(void 0,k,{view:t}):k}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(9),c=n(7),u=n(5),d=n(14).EditorToolsSettings.selectAll;t.SelectAll=function(e){var t=e.view,n=e.render,p=e.settings,f=void 0===p?d:p,h=o(e,["view","render","settings"]),m=f.messages.title,v=i.useCallback((function(){t&&(u.selectAll(t.state,t.dispatch),t.focus())}),[t]),g=i.createElement(a.Button,r({onClick:v,title:s.useLocalization().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,g,{view:t}):g}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(4),s=n(3),l=n(9),c=n(7),u=n(5),d=n(14).EditorToolsSettings.cleanFormatting,p=u.cleanFormatting();t.CleanFormatting=function(e){var t=e.view,n=e.render,u=e.settings,f=void 0===u?d:u,h=o(e,["view","render","settings"]),m=f.messages.title,v=i.useCallback((function(){t&&p(t.state,(function(e){e.setMeta("commandName",f.commandName),t.dispatch(e)}))}),[t]),g=i.createElement(a.Button,r({onClick:v,disabled:!t||!p(t.state),title:s.useLocalization().toLanguageString(m,c.messages[m])},l.onDownPreventDefault,f.props,h));return n?n.call(void 0,g,{view:t}):g}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),l=n(4),c=n(62),u=n(9),d=n(7),p=n(14),f=n(3),h=p.EditorToolsSettings.findAndReplace,m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showDialog:!1},t.onClose=function(){return t.setState({showDialog:!1})},t.onOpen=function(){return t.setState({showDialog:!0})},t}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.view,n=a(e,["view"]),r=h.props,o=f.provideLocalizationService(this),p=h.messages.findReplaceToolTitle;return[s.createElement(l.Button,i({onClick:this.onOpen},u.onDownPreventDefault,{disabled:!t,title:o.toLanguageString(p,d.messages[p]),key:"tool"},r,n)),this.state.showDialog&&t&&s.createElement(c.FindAndReplaceDialog,{view:t,onClose:this.onClose,dir:n.dir,key:"dialog"})]},t}(s.Component);t.FindAndReplace=m,f.registerForLocalization(m)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=n(0),i=n(5),a=n(4),s=n(14),l=function(e,t){var n=e.selection,r=n.from,o=n.to,i=null;return e.doc.nodesBetween(r,o,(function(e){return!(i=i||(e.type===t?e:null))})),i};t.ListTool=function(e){var t,n,c=!1,u=e.view,d=s.listsTypes,p=e.listType,f=(e.items||[]).slice();if(u){var h=u.state,m=h&&h.schema.nodes;t=m&&l(h,m[d.orderedList]),n=m&&l(h,m[d.bulletList]),c=Boolean(p===d.orderedList?t&&!n:!t&&n)}if(c&&(t||n)){var v=i.listStyle((t||n).attrs);f=f.map((function(e,t){return r({},e,{selected:v?e.style===v:0===t})}))}return o.createElement("span",{onMouseDown:function(e){e.preventDefault()}},o.createElement(a.SplitButton,{textField:"text",items:f,icon:e.icon,onButtonClick:function(e){u&&(i.toggleList(u.state,u.dispatch,u,r({listType:p},d,{listAttrs:{}}),"InsertList"),u.focus())},onItemClick:function(e){if(u){var o=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},a=t||n;if(a&&i.listStyle(a.attrs)!==e.item.style){var s=u.state.selection.$head.posAtIndex(0,-2)-1;u.dispatch(u.state.tr.setNodeMarkup(s,u.state.schema.nodes[p],o))}else i.toggleList(u.state,u.dispatch,u,r({listType:p},d,{listAttrs:o}),"InsertList");u.focus()}},buttonClass:c?"k-selected":void 0}))}},function(e,t,n){"use strict";n.r(t),n.d(t,"TabStrip",(function(){return I})),n.d(t,"TabStripContent",(function(){return w})),n.d(t,"TabStripNavigation",(function(){return p})),n.d(t,"TabStripNavigationItem",(function(){return c})),n.d(t,"TabStripTab",(function(){return T})),n.d(t,"PanelBar",(function(){return G})),n.d(t,"PanelBarItem",(function(){return _})),n.d(t,"renderChildren",(function(){return R})),n.d(t,"getFirstId",(function(){return A})),n.d(t,"getInitialState",(function(){return F})),n.d(t,"flatVisibleItems",(function(){return L})),n.d(t,"flatChildren",(function(){return B})),n.d(t,"flatVisibleChildren",(function(){return V})),n.d(t,"isPresent",(function(){return K})),n.d(t,"PanelBarUtils",(function(){return H})),n.d(t,"isArrayEqual",(function(){return $})),n.d(t,"Menu",(function(){return We})),n.d(t,"MenuItemLink",(function(){return Me})),n.d(t,"MenuItem",(function(){return se})),n.d(t,"downArrowClass",(function(){return Pe})),n.d(t,"rightArrowClass",(function(){return _e})),n.d(t,"leftArrowClass",(function(){return je})),n.d(t,"MenuItemArrow",(function(){return Re})),n.d(t,"Splitter",(function(){return et})),n.d(t,"SplitterPane",(function(){return qe})),n.d(t,"Card",(function(){return rt})),n.d(t,"CardHeader",(function(){return ot})),n.d(t,"CardTitle",(function(){return it})),n.d(t,"CardBody",(function(){return at})),n.d(t,"CardActions",(function(){return st})),n.d(t,"CardImage",(function(){return lt})),n.d(t,"CardSubtitle",(function(){return ct})),n.d(t,"CardFooter",(function(){return ut})),n.d(t,"Avatar",(function(){return pt})),n.d(t,"Drawer",(function(){return Ot})),n.d(t,"DrawerNavigation",(function(){return wt})),n.d(t,"DrawerContent",(function(){return xt})),n.d(t,"DrawerItem",(function(){return gt})),n.d(t,"Stepper",(function(){return Ht})),n.d(t,"Step",(function(){return _t})),n.d(t,"AppBar",(function(){return Wt})),n.d(t,"AppBarSection",(function(){return qt})),n.d(t,"AppBarSpacer",(function(){return Ut})),n.d(t,"TileLayout",(function(){return an})),n.d(t,"BottomNavigation",(function(){return fn})),n.d(t,"BottomNavigationItem",(function(){return dn})),n.d(t,"StackLayout",(function(){return gn})),n.d(t,"GridLayout",(function(){return kn})),n.d(t,"GridLayoutItem",(function(){return On})),n.d(t,"Breadcrumb",(function(){return _n})),n.d(t,"BreadcrumbOrderedList",(function(){return Mn})),n.d(t,"BreadcrumbListItem",(function(){return xn})),n.d(t,"BreadcrumbDelimiter",(function(){return En})),n.d(t,"BreadcrumbLink",(function(){return Nn})),n.d(t,"ExpansionPanel",(function(){return Fn})),n.d(t,"ExpansionPanelContent",(function(){return Ln}));var r,o=n(0),i=n(1),a=n(10),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(){t.props.onSelect&&t.props.onSelect(t.props.index)},t}return s(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.active,i=t.disabled,s=t.title,c=void 0===s?"Untitled":s,u=t.first,d=t.last,p={id:n,"aria-selected":r,"aria-controls":n,"aria-disabled":i,"aria-hidden":i,role:"tab",onClick:i?void 0:this.onClick},f=Object(a.a)("k-item",((e={})["k-first"]=u,e["k-last"]=d,e["k-disabled"]=i,e["k-active"]=r,e));return o.createElement("li",l({},p,{className:f}),o.createElement("span",{className:"k-link"},c))},t.propTypes={active:i.bool,disabled:i.bool,index:i.number,onSelect:i.func,title:i.oneOfType([i.string,i.element]),first:i.bool,last:i.bool},t}(o.Component),u=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.selected,i=n.tabPosition,s=n.children,l=n.onSelect,u=n.onKeyDown,p=o.Children.count(s),f=o.Children.toArray(s);s&&(e=(t=p,Array.apply(null,Array(t))).map((function(e,t,n){var i={active:r===t,disabled:f[t].props.disabled,index:t,title:f[t].props.title,first:0===t,last:t===n.length-1,onSelect:l};return o.createElement(c,d({key:t},i))})));var h=Object(a.a)("k-tabstrip-items-wrapper",{"k-hstack":"top"===i||"bottom"===i,"k-vstack":"left"===i||"right"===i}),m=Object(a.a)("k-tabstrip-items","k-reset");return o.createElement("div",{className:h},o.createElement("ul",{className:m,role:"tablist",tabIndex:this.props.tabIndex,onKeyDown:u},e))},t.propTypes={children:i.oneOfType([i.element,i.arrayOf(i.element)]),onSelect:i.func,onKeyDown:i.func,selected:i.number,tabIndex:i.number},t}(o.Component),f=n(42),h=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=v(e,["children"]);return o.createElement(f.a,m({},{transitionName:"fade"},n),t)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!1,transitionEnterDuration:500,transitionExitDuration:500},t}(o.Component),y=n(52),b=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contentId=Object(y.a)(),t.childFactory=function(e){return o.cloneElement(e,k({},e.props,{in:e.props.children.props.id===String(t.contentId+t.props.selected)}))},t}return b(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.selected,r=t&&"number"==typeof n&&o.Children.toArray(t)[n],i=Object(a.a)("k-content","k-active",r&&r.props.contentClassName);return o.createElement("div",{className:i,style:this.props.style},this.renderContent(t))},t.prototype.renderContent=function(e){var t=this;return this.props.keepTabsMounted?o.Children.map(this.props.children,(function(e,n){return t.renderChild(e,n)})):this.renderChild(o.Children.toArray(e)[this.props.selected],this.props.selected)},t.prototype.renderChild=function(e,t){var n=t===this.props.selected,r={role:"tabpanel","aria-expanded":!0,"aria-labelledby":t.toString(),style:{display:n?void 0:"none"}},i={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?o.createElement(g,{appear:!0,exit:this.props.keepTabsMounted,style:i,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},o.createElement("div",k({},r,{id:String(this.contentId+t),key:t}),e.props.children)):o.createElement("div",k({},r,{key:t}),e.props.children)},t.propTypes={animation:i.bool,children:i.oneOfType([i.element,i.arrayOf(i.element)]),selected:i.number,style:i.object},t}(o.Component),C=n(26),O=n(21),x={name:"@progress/kendo-react-layout",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426807,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},I=function(e){function t(t){var n,r=e.call(this,t)||this;return r._element=null,r.keyBinding=((n={})[C.a.left]=function(){return r.prevNavigatableTab()},n[C.a.right]=function(){return r.nextNavigatableTab()},n[C.a.down]=function(){return r.nextNavigatableTab()},n[C.a.up]=function(){return r.prevNavigatableTab()},n[C.a.home]=function(){return 0},n[C.a.end]=function(){return o.Children.count(r.props.children)-1},n),r.onSelect=function(e){r.props.selected!==e&&r.props.onSelect&&r.props.onSelect({selected:e})},r.onKeyDown=function(e){var t;switch(e.keyCode){case C.a.left:t=r.keyBinding[r.invertKeys(C.a.left,C.a.right)];break;case C.a.right:t=r.keyBinding[r.invertKeys(C.a.right,C.a.left)];break;case C.a.up:t=r.keyBinding[C.a.up];break;case C.a.down:t=r.keyBinding[C.a.down];break;case C.a.home:t=r.keyBinding[C.a.home];break;case C.a.end:t=r.keyBinding[C.a.end]}t&&(e.preventDefault(),r.onSelect(t()))},r.renderContent=function(e){var t=e.selected,n=e.children,r=e.tabContentStyle;return t<o.Children.count(n)&&t>-1?o.createElement(w,E({index:t},e,{style:r})):null},r.firstNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=0;n<t;n++)if(!e[n].props.disabled)return n},r.lastNavigatableTab=function(){var e=r.children(),t=o.Children.count(e);if(e)for(var n=t-1;n>0;n--)if(!e[n].props.disabled)return n},r.prevNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t-1:-1;if(n<0)return r.lastNavigatableTab();if(e)for(var o=n;o>-1;o--){if(!e[o].props.disabled)return o;if(0===o)return r.lastNavigatableTab()}},r.nextNavigatableTab=function(){var e=r.children(),t=r.props.selected,n=t?t+1:1,i=o.Children.count(e);if(n>=i)return r.firstNavigatableTab();if(e)for(var a=n;a<i;a++){if(!e[a].props.disabled)return a;if(a+1===i)return r.firstNavigatableTab()}},Object(O.a)(x),r}return S(t,e),t.prototype.render=function(){var e=this,t=E({},this.props,{children:this.children(),onKeyDown:this.onKeyDown,onSelect:this.onSelect}),n=t.tabPosition,r=t.tabIndex,i=void 0===r?0:r,s="bottom"===n,l=Object(a.a)("k-tabstrip","k-floatwrap",{"k-tabstrip-left":"left"===n,"k-tabstrip-right":"right"===n,"k-tabstrip-bottom":"bottom"===n,"k-tabstrip-top":"top"===n},this.props.className);return o.createElement("div",{id:this.props.id,ref:function(t){return e._element=t},dir:this.props.dir,className:l,style:this.props.style},!s&&o.createElement(p,E({},t,{tabIndex:i})),this.renderContent(t),s&&o.createElement(p,E({},t,{tabIndex:i})))},t.prototype.invertKeys=function(e,t){return this._element&&"rtl"===getComputedStyle(this._element).direction||!1?t:e},t.prototype.children=function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},t.propTypes={animation:i.bool,children:i.node,onSelect:i.func,selected:i.number,style:i.object,tabContentStyle:i.object,tabPosition:i.string,tabIndex:i.number,className:i.string,dir:i.string},t.defaultProps={animation:!0,tabPosition:"top",keepTabsMounted:!1},t}(o.Component),N=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(t,e),t.propTypes={disabled:i.bool,contentClassName:i.string,children:i.oneOfType([i.element,i.node]),title:i.oneOfType([i.string,i.element,i.node])},t}(o.Component),M=n(106),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};var _=function(e){function t(t){var n=e.call(this,t)||this;return n.handleItemClick=function(){var e=n.props,t=e.onSelect,r=e.disabled,o=e.id;t&&!r&&t.call(void 0,{uniquePrivateKey:n.props.uniquePrivateKey,id:o,target:n})},n.childFactory=function(e){return n.props.keepItemsMounted?o.cloneElement(e,P({},e.props,{in:n.props.expanded})):e},n.state={show:t.expanded},n}return D(t,e),t.prototype.render=function(){var e,t=this,n=this.props,r=n.id,i=n.children,s=n.title,l=n.uniquePrivateKey,c=n.disabled,u=n.selected,d=n.focused,p=n.expanded,f=n.className,h=n.level,m=n.headerClassName,v=n.animation,g=n.keepItemsMounted,y={role:"treeitem","aria-disabled":c,"aria-hidden":!c&&!p,"aria-selected":!c&&u,"aria-expanded":!c&&p&&!!i},b=Object(a.a)("k-item",{"k-panelbar-header":0===h,"k-panelbar-item":0!==h,"k-state-expanded":p&&!!i},"k-level-"+h,f),k=Object(a.a)("k-link",{"k-selected":!c&&u,"k-focus":!c&&d,"k-disabled":c},m),w=Object(a.a)("k-panelbar-toggle","k-icon",((e={})["k-i-arrow-chevron-up"]=p&&!!i,e["k-panelbar-collapse"]=p&&!!i,e["k-i-arrow-chevron-down"]=!p&&!!i,e["k-panelbar-expand"]=!p&&!!i,e)),C=function(e){var t=e.imageUrl,n=e.icon,r=e.iconClass;if(t)return o.createElement("img",{role:"presentation",className:"k-panelbar-item-icon k-image",src:t});if(n){var i=Object(a.a)("k-panelbar-item-icon","k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:i})}return r?o.createElement("span",{role:"presentation",className:"k-panelbar-item-icon "+r}):null}(this.props),O=!c&&i?o.createElement("span",{className:w}):null,x=!c&&p||g?o.createElement("ul",{role:"group",className:"k-panelbar-group k-panel k-group",style:{display:g?this.state.show?"block":"none":"block"}},i):null,S=void 0!==v&&!v||c||!i?x:o.createElement(M.a,{transitionEnterDuration:200,transitionExitDuration:200,key:l+"_animation",style:{display:"block"},children:x,childFactory:g&&this.childFactory,unmountOnExit:!g,onBeforeEnter:function(){return g&&t.setState({show:!0})},onAfterExited:function(){return g&&t.setState({show:!1})}});return o.createElement("li",P({id:r,className:b},y),o.createElement("span",{className:k,onClick:this.handleItemClick},C,o.createElement("span",{className:"k-panelbar-item-text"},s),O),S)},t.propTypes={animation:i.bool,children:i.any,className:i.string,expanded:i.bool,disabled:i.bool,onSelect:i.func,selected:i.bool,level:i.number,title:i.oneOfType([i.string,i.element]),id:i.oneOfType([i.string,i.number]),focused:i.bool,keepItemsMounted:i.bool},t.defaultProps={title:"Untitled"},t}(o.PureComponent),j=function(){return(j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},R=function(e){var t=e.animation,n=void 0===t||t,r=e.keepItemsMounted,i=void 0!==r&&r,a=e.state,s=e.expanded,l=e.handleSelect,c=e.children,u=e.parentExpanded,d=void 0===u||u,p=e.level,f=void 0===p?0:p,h=e.parentPrivateKey,m=void 0===h?[]:h;return o.Children.map(c,(function(e,t){if(e&&e.type===_){var r=void 0,c=z(e,m,t);if(e.props.children){var u={animation:n,keepItemsMounted:i,state:a,expanded:s,handleSelect:l,children:e.props.children,parentExpanded:(s||[]).indexOf(c)>-1,level:f+1,parentPrivateKey:m.concat([c])};r=R(u)}return o.cloneElement(e,j({},e.props,{animation:void 0!==e.props.animation?e.props.animation:n,keepItemsMounted:i,id:e.props.id||"k-panelbar-item-default-"+c,uniquePrivateKey:c,parentUniquePrivateKey:m,parentExpanded:d,level:f,expanded:(s||[]).indexOf(c)>-1,focused:a.focused===c&&a.wrapperFocused,selected:a.selected===c,children:r,onSelect:l}))}return o.createElement("div",{className:"k-panelbar-content k-content"},e)}))},A=function(e){var t=o.Children.toArray(e.children)[0];return t?z(t,[],0):""},F=function(e,t,n,r,i){return void 0===n&&(n={expanded:e.expanded||[],selected:e.selected||"",focused:e.focused||"",wrapperFocused:!1}),void 0===r&&(r=!0),void 0===i&&(i=[]),o.Children.map(e.children,(function(e,o){if(e&&e.type===_){var a=z(e,i,o);!e.props.disabled&&r&&(e.props.selected&&(n.selected=a),e.props.focused&&(n.focused=a),e.props.expanded&&("multiple"===t?n.expanded.push(a):"single"===t&&(n.expanded=[a])),e.props.children&&(n=F(e.props,t,n,!!e.props.expanded,i.concat([a]))))}})),n},z=function(e,t,n){return e&&e.props&&e.props.id?e.props.id:t.length?t[t.length-1]+"."+n:"."+n};function L(e,t){return void 0===t&&(t=[]),(e||[]).forEach((function(e){e.disabled||(t.push(e),e.expanded&&e.children&&L(e.children,t))})),t}function B(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(t.push(e),e.props.children&&B(e.props.children,t))})),t}function V(e,t){return void 0===t&&(t=[]),o.Children.forEach(e,(function(e){e&&e.props&&!e.props.disabled&&(e.props.expanded||e.props.parentExpanded)&&(t.push(e),e.props.children&&V(e.props.children,t))})),t}var H,K=function(e){return null!=e};(H||(H={})).mapItemsToComponents=function e(t){return t.map((function(t,n){var r;return t.content&&(r=t.content),t.children&&(r=e(t.children)),o.createElement(_,j({},t,{children:r,key:t.id||n}))}))};var W,$=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))};!function(e){e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous"}(W||(W={}));var q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(){return(U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},G=function(e){function t(t){var n=e.call(this,t)||this;n._element=null,n.handleSelect=function(e){n.onSelect(e),n.onFocus(e)},n.onSelect=function(e){var t,r;switch(B(o.Children.toArray(n.children)).forEach((function(r){r.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)&&(t=r)})),n.expandMode){case"single":r=t.props.parentUniquePrivateKey.concat([t.props.uniquePrivateKey]),$(n.expandedItems,r)&&(r=t.props.parentUniquePrivateKey?t.props.parentUniquePrivateKey.slice():[]);break;case"multiple":var i=(r=n.expandedItems.slice()).indexOf(t.props.uniquePrivateKey);-1===i?r.push(t.props.uniquePrivateKey):r.splice(i,1);break;default:r=n.expandedItems.slice()}n.setState({selected:t.props.uniquePrivateKey,expanded:r}),n.props.onSelect&&n.props.onSelect.call(void 0,{target:t,expandedItems:r})},n.onFocus=function(e,t){void 0===t&&(t=0);var r,i=V(o.Children.toArray(n.children));i.forEach((function(o,a){if(o.props.uniquePrivateKey===(e.uniquePrivateKey||n.state.focused)){var s=a+t<0?0:a+t>i.length?i.length-1:a+t;r=i[s]}})),r&&(n.activeDescendant=r.props.id,n.setState({focused:r.props.uniquePrivateKey}))},n.onNavigate=function(e,t){var r;switch(t){case W.Previous:r=-1,n.onFocus(e,r);break;case W.Next:r=1,n.onFocus(e,r);break;case W.Toggle:n.onSelect(e)}},n.handleWrapperFocus=function(){clearTimeout(n.nextTickId),n.state.wrapperFocused||n.setState({wrapperFocused:!0})},n.handleWrapperBlur=function(){n.nextTick((function(){n.setState({wrapperFocused:!1})}))},n.handleKeyDown=function(e){var t=n._element&&"rtl"===getComputedStyle(n._element).direction||!1;if(e.target===e.currentTarget){var r=void 0;switch(e.keyCode){case C.a.left:r=t?W.Next:W.Previous;break;case C.a.up:r=W.Previous;break;case C.a.right:r=t?W.Previous:W.Next;break;case C.a.down:r=W.Next;break;case C.a.space:case C.a.enter:r=W.Toggle;break;default:r=null}null!==r&&(e.preventDefault(),n.onNavigate(e,r))}},Object(O.a)(x);var r=F(t,n.expandMode);return r.focused||(r.focused=A(t)),n.state=r,n}return q(t,e),Object.defineProperty(t.prototype,"expandMode",{get:function(){return this.props.expandMode||"multiple"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectedItem",{get:function(){var e=this.props.selected;return void 0===e?this.state.selected:e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expandedItems",{get:function(){return this.props.isControlled?this.props.expanded||[]:this.state.expanded},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){var e=U({},this.state,{selected:this.selectedItem}),t={animation:this.props.animation,keepItemsMounted:this.props.keepItemsMounted,state:e,expanded:this.expandedItems,handleSelect:this.handleSelect,children:this.props.children};return R(t)},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t={"aria-activedescendant":this.activeDescendant},n=Object(a.a)("k-panelbar",this.props.className);return o.createElement("ul",U({ref:function(t){e._element=t},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:n,style:this.props.style},t),this.children)},t.prototype.nextTick=function(e){this.nextTickId=window.setTimeout((function(){return e()}))},t.propTypes={animation:i.bool,children:function(e,t){var n=e[t];if(n){if(Array.isArray(n))for(var r=0,o=n;r<o.length;r++){var i=o[r];if(!i.type||i.type!==_)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(n.type!==_)return new Error("PanelBar child should be either PanelBarItem or Array of PanelBarItem.");return null}},dir:i.string,selected:i.string,expanded:i.arrayOf(i.string),focused:i.string,expandMode:i.oneOf(["single","multiple"]),className:i.string,keepItemsMounted:i.bool,onSelect:i.func,style:i.object},t.defaultProps={expandMode:"multiple",animation:!0,keepItemsMounted:!1},t}(o.Component),X=n(53);function J(e,t){if(ne(e))return t[Number(e)];var n=t[Number(Y(e))];return n.items?J(function(e){if(te(e))return e;var t=e.indexOf("_");return e.substring(t+1)}(e),n.items):void 0}function Y(e){return te(e)?e:e.split("_")[0]}function Z(e){return Q("0",e)}function Q(e,t){return t?t+"_"+e:e}function ee(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function te(e){return""===e||e.indexOf("_")<0}function ne(e){return""!==e&&e.indexOf("_")<0}function re(e){return 1===function(e){return e.split("_").length-1}(e)}function oe(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}function ie(e,t,n){return ne(t)?e?Number(t)<n-1?(Number(t)+1).toString():"0":Number(t)>0?(Number(t)-1).toString():(n-1).toString():t}var ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ae(t,e),t.prototype.render=function(){return null},t.propTypes={text:i.string,url:i.string,icon:i.string,disabled:i.bool,cssClass:i.string,cssStyle:i.object,render:i.any,linkRender:i.any,contentRender:i.any,data:i.any},t}(o.Component);function le(e,t){if(e&&e.length>0)return{items:de(e),inputItems:e};if(ue(t).length>0){var n=function e(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=ce(void 0,o),a=e(ue(o.props.children));a.length>0&&(i.items=a),n.push(i)}return n}(ue(t));return{items:de(n),inputItems:n}}return{items:[],inputItems:[]}}function ce(e,t){var n={},r=e||t.props,o=r.text,i=r.url,a=r.icon,s=r.disabled,l=r.cssClass,c=r.cssStyle,u=r.render,d=r.linkRender,p=r.contentRender,f=r.data;return void 0!==o&&(n.text=o),void 0!==i&&(n.url=i),void 0!==a&&(n.icon=a),void 0!==s&&(n.disabled=s),void 0!==l&&(n.cssClass=l),void 0!==c&&(n.cssStyle=c),void 0!==u&&(n.render=u),void 0!==d&&(n.linkRender=d),void 0!==p&&(n.contentRender=p),void 0!==f&&(n.data=f),n}function ue(e){return o.Children.toArray(e).filter((function(e){return e&&e.type===se}))}function de(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=ce(o);i.id=Q(r.toString(),t),i.isLastFromSiblings=r===e.length-1,i.items=pe(o,i),n.push(i)}return n}function pe(e,t){return e.contentRender?[{contentParentItemId:t.id,id:Q("0",t.id),isLastFromSiblings:!0,contentRender:e.contentRender,items:[]}]:e.items?de(e.items,t.id):[]}var fe=/\S/;function he(e,t,n,r,o,i){var a,s=h();switch(n){case C.a.left:return o?i?d():c():i?u():l();case C.a.right:return o?i?c():d():i?l():u();case C.a.up:return o?v():ne(t)?f():v();case C.a.down:return o?g():ne(t)?p():g();case C.a.enter:case C.a.space:return s.disabled?t:m()?Z(t):Y(t);case C.a.home:return y()[0].id;case C.a.end:return(a=y())[a.length-1].id;case C.a.esc:return ne(t)?t:ee(t);default:return 1===r.length&&fe.test(r)?function(){var e=r.toLowerCase(),n=y(),o=Number(oe(t)),i=n.slice(o+1).concat(n.slice(0,o+1)).find((function(t){return(t.text||"").toLowerCase().startsWith(e)}));return i?i.id:t}():t}function l(){return ne(t)?v():re(t)?p(v(Y(t))):ee(t)}function c(){return ne(t)?f():ee(t)}function u(){return ne(t)?g():p(m()?t:g(Y(t)))}function d(){return p(ne(t)||m()?t:g(Y(t)))}function p(e){return b(!0,e)}function f(e){return b(!1,e)}function h(n,r){return void 0===n&&(n=t),void 0===r&&(r=e),J(n,r)}function m(e){return h(e).items.length>0}function v(e){return k(!1,e)}function g(e){return k(!0,e)}function y(){return ne(t)?e:h(ee(t),e).items}function b(e,n){void 0===n&&(n=t);var r=h(n);return m(n)&&!r.disabled?e?Z(n):function(e){var t=h(e).items;return t[t.length-1].id}(n):n}function k(n,r){if(void 0===r&&(r=t),ne(r))return ie(n,r,e.length);var o=ee(r);return Q(ie(n,oe(r),h(o).items.length),o)}}var me=n(47),ve={vertical:"top",horizontal:"left"},ge={vertical:"top",horizontal:"right"},ye={vertical:"flip",horizontal:"fit"},be={vertical:"fit",horizontal:"flip"},ke={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:ge,collision:ye},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:ge,collision:be}},we={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:ve,collision:ye},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:ve,collision:be}};function Ce(e,t,n){return ne(e)?t?n?"leftward":"rightward":"downward":n?"leftward":"rightward"}function Oe(e){return e?"rtl":"ltr"}function xe(e,t){return e+"_"+t}var Se,Ee,Ie,Ne,Te=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Te(t,e),t.prototype.render=function(){return this.props.url?o.createElement("a",{className:this.getMenuItemClassName(),role:"presentation",href:this.props.url,tabIndex:-1},this.props.children):o.createElement("span",{className:this.getMenuItemClassName(),role:"presentation"},this.props.children)},t.prototype.getMenuItemClassName=function(){return Object(a.a)("k-link","k-menu-link",{"k-active":this.props.opened})},t.propTypes={opened:i.bool,url:i.string},t}(o.Component),De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pe="k-i-arrow-60-down",_e="k-i-arrow-60-right",je="k-i-arrow-60-left",Re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.render=function(){return o.createElement("span",{className:"k-menu-expand-arrow",role:"presentation"},o.createElement("span",{className:this.getArrowClassName()}))},t.prototype.getArrowClassName=function(){var e,t=Ce(this.props.itemId,!0===this.props.verticalMenu,"rtl"===this.props.dir);return Object(a.a)("k-icon",((e={})[Pe]="downward"===t,e[_e]="rightward"===t,e[je]="leftward"===t,e))},t.propTypes={itemId:i.string,dir:i.string,verticalMenu:i.bool},t}(o.Component),Ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(e){function t(t){var n=e.call(this,t)||this;return n.isFirstRender=!0,n.onMouseOver=function(e){n.props.onMouseOver(n.props.item.id),e.stopPropagation()},n.onMouseLeave=function(e){n.props.onMouseLeave(n.props.item.id),e.stopPropagation()},n.state={opened:!1},n}return Ae(t,e),t.prototype.componentDidMount=function(){var e=this.props.focusedItemId,t=this.props.item.id;e&&e===t&&this.itemElement.focus(),this.isFirstRender=!1},t.prototype.componentDidUpdate=function(e){var t=this.props.focusedItemId,n=this.props.item.id;t?e.focusedItemId===t||t!==n||this.itemElement.contains(document.activeElement)||this.itemElement.focus():document.activeElement===this.itemElement&&this.itemElement.blur()},t.prototype.render=function(){var e=this,t=this.props.item,n=t.id;return o.createElement(o.Fragment,null,o.createElement("li",{className:this.getMenuItemClassName(t),style:t.cssStyle,tabIndex:n===this.props.tabbableItemId?0:-1,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:function(t){return e.props.onMouseDown(t)},onBlur:function(){return e.props.onBlur(n)},onFocus:function(){return e.props.onFocus(n)},onClick:function(t){return e.props.onClick(t,n)},role:"menuitem","aria-disabled":!!t.disabled||void 0,"aria-haspopup":t.items.length>0||void 0,"aria-expanded":t.items.length>0?this.Opened:void 0,"aria-label":t.text,"aria-owns":this.Opened?xe(this.props.menuGuid,n):void 0,ref:function(t){return e.itemElement=t},key:"0"},this.contentRender?this.renderContent():this.renderMenuItemLink()),this.renderPopupIfOpened())},t.prototype.renderContent=function(){var e=this.props.item.contentParentItemId;return o.createElement("div",{className:"k-content",role:"presentation"},o.createElement(this.contentRender,{item:this.props.onOriginalItemNeeded(e),itemId:e}))},t.prototype.renderMenuItemLink=function(){var e=this.props.item;if(this.linkRender)return o.createElement(this.linkRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,opened:this.Opened,dir:Oe(this.props.isDirectionRightToLeft)});var t=this.itemRender?o.createElement(this.itemRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,key:"1"}):o.createElement("span",{className:"k-menu-link-text"},e.text);return o.createElement(Me,{url:e.url,opened:this.Opened},this.renderMenuIconIfApplicable(),t,this.renderArrowIfApplicable())},t.prototype.renderPopupIfOpened=function(){if(this.Opened){var e=this.props.item.id,t=function(e,t,n){var r=Ce(e,t,n);return n?"downward"===r?ke.downward:ke.leftward:"downward"===r?we.downward:we.rightward}(e,this.props.isMenuVertical,this.props.isDirectionRightToLeft),n=t.anchorAlign,r=t.popupAlign,i=t.collision;return o.createElement(me.a,{anchor:this.itemElement,show:!0,popupClass:this.getPopupClassName(),anchorAlign:n,popupAlign:r,collision:i,animate:!1,key:"1"},o.createElement(Le,{parentItemId:e,items:this.props.item.items,menuGuid:this.props.menuGuid,focusedItemId:this.props.focusedItemId,lastItemIdToBeOpened:this.props.lastItemIdToBeOpened,tabbableItemId:this.props.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,isMenuVertical:this.props.isMenuVertical,isDirectionRightToLeft:this.props.isDirectionRightToLeft,className:"k-group k-menu-group k-reset",onMouseOver:this.props.onMouseOver,onMouseLeave:this.props.onMouseLeave,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:this.props.onClick,onOriginalItemNeeded:this.props.onOriginalItemNeeded}))}return null},t.prototype.renderMenuIconIfApplicable=function(){return this.props.item.icon?o.createElement("span",{className:"k-icon k-i-"+this.props.item.icon,role:"presentation",key:"0"}):null},t.prototype.renderArrowIfApplicable=function(){return this.props.item.items.length>0?o.createElement(Re,{itemId:this.props.item.id,verticalMenu:this.props.isMenuVertical,dir:Oe(this.props.isDirectionRightToLeft),key:"2"}):null},Object.defineProperty(t.prototype,"itemRender",{get:function(){return this.props.item.render||this.props.itemRender},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkRender",{get:function(){return this.props.item.linkRender||this.props.linkRender},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentRender",{get:function(){return this.props.item.contentParentItemId?this.props.item.contentRender:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Opened",{get:function(){var e,t,n=this.props;return n.item.items.length>0&&(e=n.item.id,0===(t=n.lastItemIdToBeOpened).indexOf(e)&&(t.length===e.length||"_"===t.charAt(e.length)))&&!this.isFirstRender},enumerable:!0,configurable:!0}),t.prototype.getPopupClassName=function(){return Object(a.a)("k-menu-popup",{"k-rtl":this.props.isDirectionRightToLeft})},t.prototype.getMenuItemClassName=function(e){return Object(a.a)("k-item","k-menu-item",{"k-first":(t=e.id,"0"===oe(t)),"k-last":e.isLastFromSiblings,"k-disabled":e.disabled},e.cssClass);var t},t}(o.Component),ze=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Le=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseOver=function(e){t.props.onMouseOver(t.props.parentItemId),e.stopPropagation()},t.onMouseLeave=function(e){t.props.onMouseLeave(t.props.parentItemId),e.stopPropagation()},t}return ze(t,e),t.prototype.render=function(){var e=this.props.parentItemId;return o.createElement("ul",{className:this.props.className,role:void 0!==e?"menu":"menubar",id:void 0!==e?xe(this.props.menuGuid,e):void 0,onMouseOver:void 0!==e?this.onMouseOver:void 0,onMouseLeave:void 0!==e?this.onMouseLeave:void 0,"aria-orientation":this.props["aria-orientation"]},this.renderChildItems())},t.prototype.renderChildItems=function(){var e=this;return this.props.items.length>0?this.props.items.map((function(t,n){return o.createElement(Fe,{item:t,isMenuVertical:e.props.isMenuVertical,isDirectionRightToLeft:e.props.isDirectionRightToLeft,focusedItemId:e.props.focusedItemId,lastItemIdToBeOpened:e.props.lastItemIdToBeOpened,tabbableItemId:e.props.tabbableItemId,itemRender:e.props.itemRender,linkRender:e.props.linkRender,menuGuid:e.props.menuGuid,onMouseOver:e.props.onMouseOver,onMouseLeave:e.props.onMouseLeave,onMouseDown:e.props.onMouseDown,onBlur:e.props.onBlur,onFocus:e.props.onFocus,onClick:e.props.onClick,onOriginalItemNeeded:e.props.onOriginalItemNeeded,key:n})})):null},t}(o.Component),Be=function(){function e(){this.phase="Initialized"}return e.prototype.getIsDirectionRightToLeft=function(){return this.isDirectionRightToLeft},e.prototype.setIsDirectionRightToLeft=function(e){this.phase="NotInitialized"===this.phase?"Initialized":"NewValueReceived",this.previousIsDirectionRightToLeft=this.isDirectionRightToLeft,this.isDirectionRightToLeft=e},e.prototype.hasDirectionChanged=function(){return"NewValueReceived"===this.phase&&this.previousIsDirectionRightToLeft!==this.isDirectionRightToLeft},e}(),Ve=function(){function e(e,t,n){this.openOnClick=e,this.resetMenu=t,this.openItem=n,this.openOnClick=e,this.isMouseOverEnabled=!e}return Object.defineProperty(e.prototype,"OpenOnClick",{set:function(e){Boolean(e)!==Boolean(this.openOnClick)&&(this.mouseDown=!1,this.isMouseOverEnabled=!e),this.openOnClick=e},enumerable:!0,configurable:!0}),e.prototype.handleItemSelectedViaKeyboard=function(){this.openOnClick&&(this.isMouseOverEnabled=!1,this.resetMenu())},Object.defineProperty(e.prototype,"IsMouseOverEnabled",{get:function(){return this.isMouseOverEnabled},enumerable:!0,configurable:!0}),e.prototype.handleItemMouseDown=function(){this.mouseDown=!0},e.prototype.handleItemFocus=function(){this.openOnClick&&!this.mouseDown&&(this.isMouseOverEnabled=!0),this.mouseDown=!1},e.prototype.handleItemClick=function(e,t){this.openOnClick&&(this.isMouseOverEnabled?t&&(this.isMouseOverEnabled=!1,this.resetMenu()):(this.isMouseOverEnabled=!0,this.openItem(e)))},e}(),He=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke={focusedItemId:"",hoveredItemId:"",tabbableItemId:"0"},We=function(e){function t(t){var n=e.call(this,t)||this;return n.guid=Object(y.a)(),n.directionHolder=new Be,n.reset=function(){n.clearItemHoverAndLeaveRequestsIfApplicable(),n.setState(Ke)},n.onKeyDown=function(e){if(""!==n.state.focusedItemId){var t=J(n.state.focusedItemId,n.items),r=he(n.items,t.id,e.keyCode,e.key,n.props.vertical,n.directionHolder.getIsDirectionRightToLeft());t.id!==r&&(e.preventDefault(),n.setFocusedItemId(r)),e.keyCode!==C.a.enter&&e.keyCode!==C.a.space||t.disabled||(n.mouseOverHandler.handleItemSelectedViaKeyboard(),n.dispatchSelectEventIfWired(e,t.id),!e.isDefaultPrevented()&&0===t.items.length&&t.url&&window.location.assign(t.url))}},n.onItemMouseOver=function(e){n.mouseOverHandler.IsMouseOverEnabled&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemHoverRequest=window.setTimeout((function(){n.setHoveredItemId(e),n.itemHoverRequest=null}),function(e){return void 0!==e.hoverOpenDelay?e.hoverOpenDelay:e.openOnClick?0:100}(n.props)))},n.onItemMouseLeave=function(e){n.mouseOverHandler.IsMouseOverEnabled&&n.isItemWithDefaultClose(e)&&(n.clearItemHoverAndLeaveRequestsIfApplicable(),n.itemLeaveRequest=window.setTimeout((function(){n.setHoveredItemId(""),n.itemLeaveRequest=null}),function(e){return void 0!==e.hoverCloseDelay?e.hoverCloseDelay:100}(n.props)))},n.onItemMouseDown=function(){n.mouseOverHandler.handleItemMouseDown()},n.onItemFocus=function(e){n.setFocusedItemId(e),n.mouseOverHandler.handleItemFocus()},n.onItemClick=function(e,t){var r=J(t,n.items);r.disabled||(n.setFocusedItemId(t),n.mouseOverHandler.handleItemClick(t,n.isItemWithDefaultClose(t)),n.dispatchSelectEventIfWired(e,t),!e.isDefaultPrevented()&&r.url&&window.location.assign(r.url))},n.onItemBlur=function(e){n.isItemWithDefaultClose(e)&&n.setFocusedItemId("")},n.getInputItem=function(e){return J(e,n.inputItems)},Object(O.a)(x),n.mouseOverHandler=new Ve(n.props.openOnClick,n.reset,n.onItemMouseOver),n.state=Object.assign({},Ke,{isFirstRender:!0}),n}return He(t,e),t.prototype.render=function(){var e=this;this.prepareItems(),this.state.isFirstRender||this.directionHolder.setIsDirectionRightToLeft(this.checkIsDirectionRightToLeft());var t=this.state.hoveredItemId?this.state.hoveredItemId:this.state.focusedItemId?ee(this.state.focusedItemId):"";return o.createElement("div",{onKeyDown:this.onKeyDown,style:this.props.style,className:this.getMenuWrapperClassName(),ref:function(t){return e.menuWrapperEl=t}},o.createElement(Le,{className:this.getMenuClassName(),"aria-orientation":this.props.vertical?"vertical":void 0,items:this.items,isMenuVertical:this.props.vertical,isDirectionRightToLeft:this.directionHolder.getIsDirectionRightToLeft(),focusedItemId:this.state.focusedItemId,lastItemIdToBeOpened:t,tabbableItemId:this.state.tabbableItemId,itemRender:this.props.itemRender,linkRender:this.props.linkRender,menuGuid:this.guid,onMouseLeave:this.onItemMouseLeave,onMouseOver:this.onItemMouseOver,onMouseDown:this.onItemMouseDown,onFocus:this.onItemFocus,onClick:this.onItemClick,onBlur:this.onItemBlur,onOriginalItemNeeded:this.getInputItem}))},t.prototype.componentDidMount=function(){this.setState({isFirstRender:!1})},t.prototype.componentDidUpdate=function(e){(Boolean(e.vertical)!==Boolean(this.props.vertical)||this.directionHolder.hasDirectionChanged())&&this.reset(),this.mouseOverHandler.OpenOnClick=this.props.openOnClick},t.prototype.componentWillUnmount=function(){this.clearItemHoverAndLeaveRequestsIfApplicable()},t.prototype.setFocusedItemId=function(e){this.setState((function(t){var n=""===e?t.tabbableItemId:Y(e);return{hoveredItemId:""===e||te(t.hoveredItemId)&&te(e)?t.hoveredItemId:"",focusedItemId:e,tabbableItemId:n}}))},t.prototype.setHoveredItemId=function(e){this.setState((function(t){return te(e)&&te(t.focusedItemId)?{hoveredItemId:e,focusedItemId:t.focusedItemId,tabbableItemId:t.tabbableItemId}:{hoveredItemId:e,focusedItemId:"",tabbableItemId:"0"}}))},t.prototype.getMenuWrapperClassName=function(){return Object(a.a)({"k-rtl":this.directionHolder.getIsDirectionRightToLeft()},this.props.className)},t.prototype.getMenuClassName=function(){return Object(a.a)("k-widget","k-reset","k-header","k-menu",{"k-menu-horizontal":!this.props.vertical},{"k-menu-vertical":this.props.vertical})},t.prototype.clearItemHoverAndLeaveRequestsIfApplicable=function(){this.itemHoverRequest&&(clearTimeout(this.itemHoverRequest),this.itemHoverRequest=null),this.itemLeaveRequest&&(clearTimeout(this.itemLeaveRequest),this.itemLeaveRequest=null)},t.prototype.isItemWithDefaultClose=function(e){return!this.props.customCloseItemIds||-1===this.props.customCloseItemIds.indexOf(e)},t.prototype.checkIsDirectionRightToLeft=function(){return void 0!==this.props.dir?"rtl"===this.props.dir:this.menuWrapperEl&&"rtl"===getComputedStyle(this.menuWrapperEl).direction},t.prototype.prepareItems=function(){var e=le(this.props.items,this.props.children),t=e.items,n=e.inputItems;this.items=t,this.inputItems=n},t.prototype.dispatchSelectEventIfWired=function(e,t){Object(X.a)(this.props.onSelect,e,this,{item:this.getInputItem(t),itemId:t})},t.propTypes={vertical:i.bool,items:i.arrayOf(i.object),style:i.object,dir:i.string,hoverOpenDelay:i.number,hoverCloseDelay:i.number,openOnClick:i.bool,itemRender:i.any,linkRender:i.any,customCloseItemIds:i.arrayOf(i.string),onSelect:i.func},t.defaultProps={vertical:!1},t}(o.Component),$e=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $e(t,e),t.prototype.render=function(){var e,t=this.props,n=t.id,r=t.size,i=t.collapsed,s=t.overlay,l=t.containsSplitter,c=t.collapsible,u=t.resizable,d=t.scrollable,p=t.keepMounted,f=r&&r.length>0,h={flexBasis:r},m=Object(a.a)("k-pane",((e={})["k-state-hidden"]=i,e.hidden=i,e["k-pane-flex"]=l,e["k-pane-static"]=!u&&!c||f,e["k-scrollable"]=d,e));return o.createElement("div",{id:n,style:h,className:m},!i||p?this.props.children:void 0,s?o.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)},t}(o.Component),Ue=n(60),Ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xe=function(e){function t(t){var n=e.call(this,t)||this;return n.onDrag=function(e,t,r){var o=e.event,i=n.props,a=i.onDrag,s=i.index,l=n.draggable&&n.draggable.element;!r&&o&&o.originalEvent.preventDefault(),l&&!n.isStatic&&n.isDraggable&&a(o,l,s,t,r)},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onToggle=function(e){var t=n.props,r=t.onToggle,o=t.index,i=t.prev,a=t.next;(i.collapsible||a.collapsible)&&r(i.collapsible?o:o+1,e)},n.onPrevToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.prev.collapsible&&r(o,e)},n.onNextToggle=function(e){var t=n.props,r=t.onToggle,o=t.index;t.next.collapsible&&r(o+1,e)},n.onKeyDown=function(e){var t=e&&e.keyCode,r=n.isHorizontal,o=n.props.index,i=n.draggable&&n.draggable.element,a=function(t,r,o){e.preventDefault(),n.props.onKeyboardResize(t,r,o,e)};i&&(t===C.a.enter?(e.preventDefault(),n.onToggle(e)):n.isDraggable&&(r&&t===C.a.left?a(i,o,-10):r&&t===C.a.right?a(i,o,10):r||t!==C.a.up?r||t!==C.a.down||a(i,o,10):a(i,o,-10)))},n.previousArrowClass=function(e){var t,r=n.props.prev,o=r.collapsible,i=r.collapsed;return Object(a.a)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-prev"]=o,t["k-i-arrow-60-left"]=o&&e&&!i,t["k-i-arrow-60-right"]=o&&e&&i,t["k-i-arrow-60-up"]=o&&!e&&!i,t["k-i-arrow-60-down"]=o&&!e&&i,t))},n.nextArrowClass=function(e){var t,r=n.props.next,o=r.collapsible,i=r.collapsed;return Object(a.a)("k-icon",((t={})["k-hidden"]=!o,t["k-collapse-next"]=o,t["k-i-arrow-60-right"]=o&&e&&!i,t["k-i-arrow-60-left"]=o&&e&&i,t["k-i-arrow-60-down"]=o&&!e&&!i,t["k-i-arrow-60-up"]=o&&!e&&i,t))},n.state={focused:!1},n}return Ge(t,e),Object.defineProperty(t.prototype,"isStatic",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsible||n.collapsible;return!r&&!o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDraggable",{get:function(){var e=this.props,t=e.prev,n=e.next,r=t.resizable&&n.resizable,o=t.collapsed||n.collapsed;return!!r&&!o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHorizontal",{get:function(){return"horizontal"===this.props.orientation},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e,t=this,n=this.isDraggable,r=this.isStatic,i=this.isHorizontal,s=Object(a.a)("k-splitbar",((e={})["k-focus"]=this.state.focused,e["k-splitbar-horizontal"]=i,e["k-splitbar-vertical"]=!i,e["k-splitbar-draggable-horizontal"]=i&&n,e["k-splitbar-draggable-vertical"]=!i&&n,e["k-splitbar-static-horizontal"]=i&&r,e["k-splitbar-static-vertical"]=!i&&r,e)),l=this.previousArrowClass(i),c=this.nextArrowClass(i);return o.createElement(Ue.a,{onPress:function(e){return t.onDrag(e,!0,!1)},onDrag:function(e){return t.onDrag(e,!1,!1)},onRelease:function(e){return t.onDrag(e,!1,!0)},ref:function(e){t.draggable=e}},o.createElement("div",{tabIndex:r?-1:0,role:"separator",className:s,style:{touchAction:"none"},onFocus:this.onFocus,onBlur:this.onBlur,onDoubleClick:this.onToggle,onKeyDown:this.onKeyDown},o.createElement("div",{className:l,onClick:this.onPrevToggle}),o.createElement("div",{className:"k-resize-handle"}),o.createElement("div",{className:c,onClick:this.onNextToggle})))},t}(o.Component),Je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(){return(Ye=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ze=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},Qe={collapsible:!1,collapsed:!1,resizable:!0,scrollable:!0},et=function(e){function t(t){var n=e.call(this,t)||this;return n.validatePanes=function(e){if(!e.filter((function(e){return void 0===e.size})).length)throw new Error("The Splitter should have at least one pane without a set size.")},n.mapPaneOptions=function(e,t){for(var r=n.orientation,i=n.state,a=i.dragIndex,s=i.isDragging,l=[],c=0;c<t.length;c++){var u=!1,d=t[c];o.isValidElement(d)&&(u="Splitter"===d.type.displayName);var p=!1;s&&void 0!==a&&(p=a===c||a+1===c),l.push(Ye({},Qe,{orientation:r,containsSplitter:u,overlay:p},(e||[])[c]))}return l},n.mapSplitterPanes=function(e,t){return e.map((function(r,i){var a,s=2*i,l=s+1;if(i+1<e.length){var c=e[i+1];a=o.createElement(Xe,{key:l,index:i,orientation:r.orientation,prev:r,next:c,onDrag:n.onBarDragResize,onToggle:n.onBarToggle,onKeyboardResize:n.onBarKeyboardResize})}return[o.createElement(qe,Ye({key:s},r),t[i]),a]}))},n.onBarToggle=function(e,t){var r=n.panesOptions(n.panesContent).map((function(t,r){var o=n.getPaneProps(t);return r===e?Ye({},o,{collapsed:!t.collapsed}):Ye({},o)}));n.props.onChange&&n.props.onChange({newState:r,isLast:!0,nativeEvent:t})},n.onBarDragResize=function(e,t,r,o,i){var a=(new Date).getTime(),s=e.pageX,l=e.pageY,c=n.surroudingPanes(t),u=c.prevElement,d=c.nextElement;if(u&&d)if(o)n.setState({isDragging:!0,dragIndex:r,startTime:a,originalX:s,originalY:l,originalPrevSize:n.elementSize(u),originalNextSize:n.elementSize(d)});else{var p,f=n.state,h=f.originalPrevSize,m=f.originalNextSize,v=f.startTime,g=f.originalX,y=f.originalY;if(!o&&a-v<150)i&&n.resetDragState();else p="vertical"===n.orientation?l-y:n.isRtl?g-s:s-g,n.resize(r,r+1,h,m,p,i,e),i&&n.resetDragState()}},n.onBarKeyboardResize=function(e,t,r,o){var i=n.surroudingPanes(e),a=i.prevElement,s=i.nextElement,l=n.elementSize(a),c=n.elementSize(s);n.resize(t,t+1,l,c,r,!0,o)},n.containerSize=function(){return n._container?n.elementSize(n._container,!0):0},n.panesOptions=function(e){return n.mapPaneOptions(n.panes,e)},n.elementSize=function(e,t){var r=t?"client":"offset";return"vertical"===n.orientation?e[r+"Height"]:e[r+"Width"]},n.clamp=function(e,t,n){return Math.min(t,Math.max(e,n))},n.fixedSize=function(e){return e&&e.length>0},Object(O.a)(x),n.state={isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0,panes:t.defaultPanes||[]},n}return Je(t,e),Object.defineProperty(t.prototype,"isControlledState",{get:function(){return void 0!==this.props.panes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panes",{get:function(){return void 0!==this.panesDuringOnChange?this.panesDuringOnChange:this.isControlledState?this.props.panes:this.state.panes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this.props.orientation||"horizontal"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRtl",{get:function(){return this._container&&"rtl"===getComputedStyle(this._container).direction||!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panesContent",{get:function(){return o.Children.toArray(this.props.children).filter((function(e){return e}))},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.panesContent,n=this.panesOptions(t),r=Object(a.a)("k-widget","k-splitter","k-splitter-flex","k-splitter-"+this.orientation,this.props.className);return this.validatePanes(n),o.createElement("div",{style:this.props.style,ref:function(t){return e._container=t},className:r},this.mapSplitterPanes(n,t))},t.prototype.surroudingPanes=function(e){return{prevElement:e.previousElementSibling,nextElement:e.nextElementSibling}},t.prototype.isPercent=function(e){return/%$/.test(e)},t.prototype.toPixels=function(e,t){var n=parseInt(e,10);return this.isPercent(e)&&(n=t*n/100),n},t.prototype.resetDragState=function(){this.setState({isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0})},t.prototype.resize=function(e,t,n,r,o,i,a){var s,l,c=this,u=this.panesOptions(this.panesContent),d=u[e],p=u[t],f=n+r,h=this.containerSize(),m=function(e){return c.toPixels(e,h)},v={index:e,initialSize:n,min:m(d.min)||f-m(p.max)||0,max:m(d.max)||f-m(p.min)||f},g={index:t,initialSize:r,min:m(p.min)||f-m(d.max)||0,max:m(p.max)||f-m(d.min)||f},y=function(e,t){var n=u[e.index],r=c.clamp(e.min,e.max,e.initialSize+t);return c.isPercent(n.size||"")?100*r/h+"%":r+"px"};this.fixedSize(d.size)&&this.fixedSize(p.size)?(s=y(v,o),l=y(g,-o)):p.collapsible||this.fixedSize(p.size)?l=y(g,-o):s=y(v,o);var b=u.map((function(n,r){var o=c.getPaneProps(n);return r===e?Ye({},o,{size:s}):r===t?Ye({},o,{size:l}):Ye({},o)}));this.panesDuringOnChange=b,this.isControlledState||this.setState({panes:b}),this.props.onChange&&this.props.onChange({newState:b,isLast:i,nativeEvent:a}),this.panesDuringOnChange=void 0},t.prototype.getPaneProps=function(e){e.orientation,e.overlay,e.containsSplitter;return Ze(e,["orientation","overlay","containsSplitter"])},t.displayName="Splitter",t}(o.Component);!function(e){e.TEXT="text",e.IMAGE="image",e.ICON="icon"}(Se||(Se={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(Ee||(Ee={})),function(e){e.DEFAULT="default",e.primary="primary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(Ie||(Ie={})),function(e){e.START="start",e.CENTER="center",e.END="end",e.STRETCHED="stretched"}(Ne||(Ne={}));var tt=function(){return(tt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},nt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},rt=o.forwardRef((function(e,t){var n;Object(O.a)(x);var r=e.children,i=e.dir,s=e.style,l=e.className,c=e.type,u=e.orientation,d=nt(e,["children","dir","style","className","type","orientation"]),p=o.useRef(null),f=o.useRef(null);return o.useImperativeHandle(p,(function(){return{element:f.current,props:e}})),o.useImperativeHandle(t,(function(){return p.current})),o.createElement("div",tt({dir:i,style:s,ref:f,className:Object(a.a)("k-card",l,(n={},n["k-card-"+c]=c!==Ie.DEFAULT,n),u!==Ee.HORIZONTAL?"k-card-vertical":"k-card-horizontal")},d),r)}));rt.displayName="KendoReactCard",rt.propTypes={children:i.node,className:i.string,dir:i.string,orientation:i.oneOf(["horizontal","vertical"]),style:i.object,type:i.oneOf(["default","primary","info","success","warning","error"])},rt.defaultProps={type:Ie.DEFAULT,orientation:Ee.VERTICAL,dir:"ltr"};var ot=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-header",e.className)},e.children)};ot.propTypes={className:i.string};var it=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-title",e.className)},e.children)};it.propTypes={className:i.string};var at=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-body",e.className)},e.children)};at.propTypes={className:i.string};var st=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-actions",e.className,"k-card-actions-"+e.layout,e.orientation!==Ee.VERTICAL?"k-card-actions-horizontal":"k-card-actions-vertical")},e.children)};st.propTypes={layout:i.oneOf(["stretched","start","center","end"]),orientation:i.oneOf(["horizontal","vertical"])},st.defaultProps={layout:Ne.START,orientation:Ee.HORIZONTAL};var lt=function(e){return o.createElement("img",{style:e.style,className:Object(a.a)("k-card-image",e.className),src:e.src})};lt.propTypes={className:i.string,src:i.string},lt.defaultProps={src:""};var ct=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-subtitle",e.className)},e.children)};ct.propTypes={className:i.string};var ut=function(e){return o.createElement("div",{style:e.style,className:Object(a.a)("k-card-footer",e.className)},e.children)};ut.propTypes={className:i.string};var dt=n(22),pt=function(e){var t;return Object(O.a)(x),o.createElement("div",{style:e.style,className:Object(a.a)("k-avatar",(t={},t["k-avatar-bordered"]=e.border,t["k-rounded-"+(dt.a.roundedMap[e.rounded]||e.rounded)]=e.rounded,t["k-avatar-"+(dt.a.sizeMap[e.size]||e.size)]=e.size,t["k-avatar-"+e.fillMode]=e.fillMode,t["k-avatar-"+e.fillMode+"-"+e.themeColor]=Boolean(e.fillMode&&e.themeColor),t),e.className)},o.createElement("span",{className:"k-avatar-"+e.type},e.children))};pt.propTypes={className:i.string,type:i.oneOf(["text","image","icon"]),size:i.oneOf([null,"small","medium","large"]),rounded:i.oneOf([null,"small","medium","large","full"]),fillMode:i.oneOf([null,"solid","outline"]),themeColor:i.oneOf([null,"base","dark","error","info","inverse","inverse","light","primary","secondary","success","tertiary","warning"])},pt.defaultProps={type:Se.TEXT,size:"medium",rounded:"full",fillMode:"solid",themeColor:"primary"};var ft=o.createContext({animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50}),ht=n(39),mt=function(){return(mt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},vt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},gt=o.forwardRef((function(e,t){var n=e.className,r=e.style,i=e.text,s=e.icon,l=e.separator,c=e.disabled,u=e.selected,d=e.onSelect,p=e.index,f=e.tabIndex,h=e.children,m=vt(e,["className","style","text","icon","separator","disabled","selected","onSelect","index","tabIndex","children"]),v=o.useContext(ft),g=v.expanded,y=v.mini,b=v.item,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:k.current,focus:w,props:e}}));var C=Object(a.a)("k-drawer-item",{"k-selected":u,"k-disabled":c},n),O=o.useCallback((function(){if(d&&!c){var t={element:k.current,focus:w,props:e};d(t,p)}}),[d,p,c]),x=o.createElement(o.Fragment,null,s&&o.createElement("span",{className:"k-icon "+s}),!g&&y?null:o.createElement("span",{className:"k-item-text"},i));return l?o.createElement("li",{className:"k-drawer-item k-drawer-separator",role:"presentation"}):o.createElement("li",mt({ref:k,className:C,style:r,role:"option","aria-selected":u,"aria-disabled":c,onClick:O,tabIndex:Object(ht.a)(f,c)},m),b?h:x)}));gt.propTypes={className:i.string,style:i.object,text:i.string,icon:i.string,separator:i.bool,selected:i.bool,disabled:i.bool,targetItem:i.any},gt.displayName="KendoDrawerItem";var yt=function(){return(yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},bt={type:"slide",duration:200},kt={type:"slide",duration:0},wt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useContext(ft),l=s.animation,c=s.expanded,u=s.mode,d=s.position,p=s.onOverlayClick,f=s.mini,h=s.dir,m=s.width,v=s.miniWidth,g=s.items,y=s.item,b=s.onSelect,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]),C="boolean"!=typeof l?l:!1===l?kt:bt,O=m||240,x=v||50;o.useImperativeHandle(t,(function(){return{element:k.current,focus:w}}));var S=o.useMemo((function(){return"k-widget k-drawer "+Object(a.a)({"k-drawer-start":"start"===d,"k-drawer-end":"end"===d},r)}),[d]),E={opacity:1,flexBasis:O,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},I={opacity:1,transform:"translateX(0px)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},N={opacity:f?1:0,flexBasis:f?x:0,WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},T={opacity:0,transform:"translateX(-100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},M={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},D={transform:"translateX(0%)",WebkitTransitionDuration:(C&&C.duration)+"ms",transitionDuration:(C&&C.duration)+"ms"},P=c?"push"===u?E:I:"push"===u?N:"ltr"===h&&"start"===d||"rtl"===h&&"end"===d?f?D:T:f?D:M,_=g&&o.createElement("ul",{className:"k-drawer-items",role:"listbox","aria-label":"drawer-list","aria-expanded":c},g.map((function(e,t){var n=yt({index:t},e,{onSelect:b}),r=y||gt;return o.createElement(r,yt({key:t},n))}))),j=o.createElement("div",{style:C?yt({},P,i):i,className:S,ref:k},o.createElement("div",{className:"k-drawer-wrapper",style:!c&&f&&"overlay"===u?{width:x}:{width:O}},_||n));return"overlay"===u?o.createElement(o.Fragment,null,c&&o.createElement("div",{className:"k-overlay",onClick:p}),j):j}));wt.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number},wt.displayName="KendoDrawerNavigation";var Ct=n(35),Ot=o.forwardRef((function(e,t){Object(O.a)(x);var n=e.expanded,r=e.mode,i=e.position,s=e.className,l=e.children,c=e.style,u=e.animation,d=e.mini,p=e.width,f=e.miniWidth,h=e.items,m=e.item,v=e.tabIndex,g=e.onOverlayClick,y=e.onSelect,b=o.useRef(null),k=o.useCallback((function(){b.current&&b.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:b.current,focus:k}}));var w=o.useCallback((function(e,t){h&&y&&y.call(void 0,{itemTarget:e,itemIndex:t})}),[h,y]),C=Object(Ct.a)(b,e.dir),S=Object(a.a)({"k-drawer-container":!0,"k-drawer-expanded":n,"k-drawer-overlay":"overlay"===r,"k-drawer-push":"push"===r,"k-drawer-mini":d},s);return o.createElement(ft.Provider,{value:{animation:u,expanded:n,mode:r,position:i,mini:d,dir:C,items:h,item:m,width:p,miniWidth:f,onOverlayClick:g,onSelect:w}},o.createElement("div",{className:S,ref:b,dir:C,style:c,tabIndex:v},h&&o.createElement(wt,null),l))}));Ot.propTypes={animation:i.any,expanded:i.bool,children:i.any,className:i.string,dir:i.string,mode:i.string,position:i.string,mini:i.bool,style:i.object,tabIndex:i.number,width:i.number,miniWidth:i.number,selected:i.number,onSelect:i.func,onOverlayClick:i.func};Ot.defaultProps={animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50},Ot.displayName="KendoDrawer";var xt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:s.current}}));var l=Object(a.a)({"k-drawer-content":!0},r);return o.createElement("div",{className:l,style:i,ref:s},n)}));xt.propTypes={children:i.any,className:i.string,style:i.object},xt.displayName="KendoDrawerContent";var St,Et=o.createContext({linear:!1,mode:"steps",value:0}),It=n(55),Nt=n(59),Tt=n(3),Mt=((St={})["stepper.optionalText"]="(Optional)",St),Dt=function(){return(Dt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},_t=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.current,s=e.disabled,l=e.focused,c=e.icon,u=e.index,d=e.isValid,p=e.label,f=e.optional,h=e.style,m=e.tabIndex,v=e.text,g=Pt(e,["children","className","current","disabled","focused","icon","index","isValid","label","optional","style","tabIndex","text"]),y=o.useContext(Et),b=y.animationDuration,k=y.isVertical,w=y.item,C=y.linear,O=y.mode,x=y.numOfSteps,S=y.value,E=y.successIcon,I=y.errorIcon,N=y.onChange,T=y.onFocus,M=o.useRef(null),D=o.useCallback((function(){M.current&&Object(It.a)(M.current)}),[]),P=o.useCallback((function(){return{element:M.current,focus:D}}),[D]);o.useImperativeHandle(t,P);var _,j=!C||u===S-1||u===S||u===S+1,R="labels"===O||Boolean(c)&&Boolean(p),A=Object(Tt.useLocalization)(),F=(_="stepper.optionalText",A.toLanguageString(_,Mt[_])),z="number"==typeof b?b:!1!==b?400:0,L=o.useCallback((function(e){N&&!s&&Object(X.a)(N,e,P(),{value:u})}),[N,S,s]),B=o.useCallback((function(e){T&&!s&&Object(X.a)(T,e,P(),void 0)}),[T,s]),V=o.useMemo((function(){return Object(a.a)("k-step",{"k-step-first":0===u,"k-step-last":x&&u===x-1,"k-step-done":u<S,"k-step-current":i,"k-step-optional":f,"k-step-disabled":s,"k-step-focus":l,"k-step-error":void 0!==d&&!d,"k-step-success":d},r)}),[u,x,S,i,f,s,l,d,r]),H=o.useMemo((function(){return Dt({maxWidth:k?void 0:"calc(100% / "+x+")",maxHeight:k?"calc(100% / "+x+")":void 0,pointerEvents:j?void 0:"none"},h)}),[k,x,h,j]),K=d?E?""+E:"k-icon k-i-check":I?""+I:"k-icon k-i-warning",W=o.createElement("span",{className:"k-step-indicator-icon "+K,"aria-hidden":"true"}),$=o.createElement(o.Fragment,null,"labels"!==O?o.createElement("span",{className:"k-step-indicator","aria-hidden":!0,style:{transitionDuration:z+"ms"}},c?R||void 0===d?o.createElement("span",{className:"k-step-indicator-icon k-icon "+c}):W:void 0!==d?W:o.createElement("span",{className:"k-step-indicator-text"},v||u+1)):null),q=o.createElement("span",{className:"k-step-label"},p&&o.createElement("span",{className:"k-step-text"},p),R&&void 0!==d&&W,f&&o.createElement("span",{className:"k-step-label-optional"},F)),U=o.createElement(o.Fragment,null,$,q);return o.createElement("li",Dt({ref:M,className:V,style:H},g),o.createElement("a",{className:"k-step-link",title:p||void 0,onClick:L,onFocus:B,tabIndex:m||(l?0:-1),"aria-current":i?"step":void 0,"aria-disabled":s||!j||void 0,"aria-invalid":void 0!==d&&!d||void 0},w?n:U))}));_t.propTypes={children:i.any,className:i.string,current:i.bool,disabled:i.bool,icon:i.string,index:i.number,isValid:i.bool,label:i.string,optional:i.bool,style:i.object,tabIndex:i.number,text:i.string};_t.defaultProps={tabIndex:0},_t.displayName="KendoStep";var jt=function(e,t){var n=o.useRef(0),r=o.useRef(!1),i=o.useRef();o.useEffect((function(){return function(e){var t,r=e.duration,o=n.current&&1-n.current;e.onStart&&e.onStart();var a=function(s){t||(t=s);var l=(s-t+1)/r+o;l<=1?(e.onUpdate&&e.onUpdate(l),i.current=window.requestAnimationFrame(a),n.current=l):(e.onEnd&&e.onEnd(1),n.current=0)};i.current=window.requestAnimationFrame(a)}(e),function(){i.current&&window.cancelAnimationFrame(i.current)}}),t),o.useEffect((function(){r.current=!0}),[])},Rt=function(e,t,n){var r=Math.abs((t-e)/100);return Math.abs((n-e)/r)},At=function(e,t,n,r){var o=Math.max(n,.01),i=100/o*100;e.current&&t.current&&(e.current.style.width=r?"100%":o+"%",t.current.style.width=r?"100%":i+"%",e.current.style.height=r?o+"%":"100%",t.current.style.height=r?i+"%":"100%")},Ft={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426785,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},zt=function(){return(zt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Lt=o.forwardRef((function(e,t){Object(O.a)(Ft);var n=e.animation,r=e.disabled,i=e.reverse,s=void 0===i?Bt.reverse:i,l=e.orientation,c=e.labelVisible,u=e.labelPlacement,d=e.max,p=void 0===d?Bt.max:d,f=e.min,h=void 0===f?Bt.min:f,m=e.tabIndex,v=e.className,g=e.style,y=e.emptyStyle,b=e.emptyClassName,k=e.progressStyle,w=e.progressClassName,C=o.useRef(null),x=o.useRef(null),S=o.useRef(null),E=o.useCallback((function(){C.current&&C.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:C.current,progressStatusElement:x.current,progressStatusWrapElement:S.current,focus:E}}));var I=e.value||Bt.value,N=function(e){var t=o.useRef();return o.useEffect((function(){t.current=e})),t.current}(I),T=null===e.value,M=Object(Nt.a)(C,e.dir),D="vertical"===l,P=function(e){var t=e.toString().split(".");return 1===t.length?""+t[0]:t[0]+"."+t[1].substr(0,3)}(I),_={value:I},j=c?e.label?o.createElement("span",{className:"k-progress-status"},o.createElement(e.label,zt({},_))):o.createElement("span",{className:"k-progress-status"},P):void 0,R={className:Object(a.a)("k-widget k-progressbar",{"k-progressbar-horizontal":!D,"k-progressbar-vertical":D,"k-progressbar-reverse":s,"k-progressbar-indeterminate":T,"k-disabled":r},v),ref:C,dir:M,tabIndex:Object(ht.a)(m,r),role:"progressbar","aria-valuemin":h,"aria-valuemax":p,"aria-valuenow":T?void 0:I,"aria-disabled":r,style:g},A=Object(a.a)("k-progress-status-wrap",{"k-progress-start":"start"===u,"k-progress-center":"center"===u,"k-progress-end":"end"===u||void 0===u}),F="boolean"!=typeof n&&void 0!==n?n.duration:n?400:0,z=o.useCallback((function(){var e=Rt(h,p,N);At(x,S,e,D)}),[D,p,h,N]),L=o.useCallback((function(e){var t=Rt(h,p,N+(I-N)*e);At(x,S,t,D)}),[h,p,N,I,D]),B=o.useCallback((function(){var e=Rt(h,p,I);At(x,S,e,D)}),[D,p,h,I]);return jt({duration:F,onStart:z,onUpdate:L,onEnd:B},[I,F]),o.createElement("div",zt({},R),o.createElement("span",{className:A+(b?" "+b:""),style:y},j),o.createElement("div",{className:"k-selected",style:k,ref:x},o.createElement("span",{className:A+(w?" "+w:""),ref:S},j)))}));Lt.propTypes={animation:i.any,disabled:i.bool,reverse:i.bool,label:i.any,labelVisible:i.bool,labelPlacement:i.oneOf(["start","center","end"]),max:i.number,min:i.number,value:i.number,tabIndex:i.number,emptyStyle:i.object,emptyClassName:i.string,progressStyle:i.object,progressClassName:i.string};var Bt={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};Lt.defaultProps=Bt,Lt.displayName="KendoProgressBar";var Vt=function(){return(Vt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ht=o.forwardRef((function(e,t){Object(O.a)(x);var n=e.animationDuration,r=e.children,i=e.className,s=e.disabled,l=e.errorIcon,c=e.item,u=e.items,d=e.linear,p=e.mode,f=e.orientation,h=e.style,m=e.successIcon,v=e.onChange,g=e.onFocus,y=o.useRef(null),b=o.useCallback((function(){y.current&&Object(It.a)(y.current)}),[]),k=o.useCallback((function(){return{element:y.current,focus:b}}),[b]);o.useImperativeHandle(t,k);var w=e.value||Kt.value,S=o.useState(w),E=S[0],I=S[1],N=u?u.length:0,T="vertical"===f,M=Object(Nt.a)(y,e.dir),D="number"==typeof n?n:!1!==n?400:0,P=o.useCallback((function(e,t){w!==t&&v&&!s&&(!d||t===w-1||t===w||t===w+1)&&(Object(X.a)(v,e,k(),{value:t}),I(t))}),[w,d,v,s,I]),_=o.useCallback((function(e){var t=e.value,n=e.syntheticEvent;P(n,t)}),[P]),j=o.useCallback((function(e){g&&!s&&Object(X.a)(g,e.syntheticEvent,k(),void 0)}),[g,s]),R=o.useCallback((function(e){P(e,E)}),[P,E]),A=o.useCallback((function(e){var t="rtl"===M,n=E,r=u.length-1;switch(e.keyCode){case C.a.left:e.preventDefault(),!t&&n>0&&I(n-1),t&&n<r&&I(n+1);break;case C.a.right:e.preventDefault(),!t&&n<r&&I(n+1),t&&n>0&&I(n-1);break;case C.a.up:e.preventDefault(),!t&&n>0&&I(n-1),t&&n>0&&I(n-1);break;case C.a.down:e.preventDefault(),!t&&n<r&&I(n+1),t&&n<r&&I(n+1);break;case C.a.home:e.preventDefault(),I(0);break;case C.a.end:e.preventDefault(),I(r);break;case C.a.space:case C.a.enter:e.preventDefault(),u[n].disabled||R(e)}}),[u,I,E,M,R]),F=o.useMemo((function(){return Object(a.a)("k-stepper",{"k-stepper-linear":d},i)}),[d,i]),z=o.useMemo((function(){return Vt({display:"grid",gridTemplateColumns:T?void 0:"repeat("+2*N+", 1fr)",gridTemplateRows:T?"repeat("+N+", 1fr)":void 0},h)}),[T,N,h]),L=o.useMemo((function(){return Object(a.a)("k-step-list",{"k-step-list-horizontal":!T,"k-step-list-vertical":T})}),[T]),B=o.useMemo((function(){return{gridColumnStart:T?void 0:1,gridColumnEnd:T?void 0:-1,gridRowStart:T?1:void 0,gridRowEnd:T?-1:void 0}}),[T]),V=o.useMemo((function(){return{gridColumnStart:T?void 0:2,gridColumnEnd:T?void 0:2*N,gridRowStart:T?1:void 0,gridRowEnd:T?N:void 0,top:T?17:void 0}}),[T,N]),H=u&&u.map((function(e,t){var n=Vt({index:t,disabled:s||e.disabled,focused:t===E,current:t===w},e),r=c||_t;return o.createElement(r,Vt({key:t},n))}));return o.createElement(Et.Provider,{value:{animationDuration:n,isVertical:T,item:c,linear:d,mode:p,numOfSteps:N,value:w,successIcon:m,errorIcon:l,onChange:_,onFocus:j}},o.createElement("nav",{className:F,style:z,dir:M,onKeyDown:A},o.createElement("ol",{className:L,style:B},H||r),o.createElement(Lt,{style:V,animation:{duration:D},"aria-hidden":!0,max:N-1,labelVisible:!1,orientation:f,reverse:"vertical"===f,value:w,disabled:s,tabIndex:-1})))}));Ht.propTypes={animationDuration:i.oneOfType([i.bool,i.number]),className:i.string,dir:i.string,disabled:i.bool,item:i.any,items:i.arrayOf(i.any),linear:i.bool,mode:i.oneOf(["steps","labels"]),orientation:i.oneOf(["horizontal","vertical"]),style:i.object,value:i.number.isRequired,onChange:i.func,onFocus:i.func};var Kt={value:0};Ht.defaultProps=Kt,Ht.displayName="KendoStepper";var Wt=o.forwardRef((function(e,t){Object(O.a)(x);var n=e.children,r=e.className,i=e.style,s=e.id,l=o.useRef(null),c=o.useCallback((function(){l.current&&Object(It.a)(l.current)}),[]),u=o.useCallback((function(){return{element:l.current,focus:c}}),[c]);o.useImperativeHandle(t,u);var d=o.useMemo((function(){return Object(y.a)()}),[]),p=o.useMemo((function(){return e.themeColor||$t.themeColor}),[e.themeColor]),f=o.useMemo((function(){return e.position||$t.position}),[e.position]),h=o.useMemo((function(){return e.positionMode||$t.positionMode}),[e.positionMode]),m=o.useMemo((function(){return Object(a.a)("k-appbar",{"k-appbar-top":"top"===f,"k-appbar-bottom":"bottom"===f,"k-appbar-static":"static"===h,"k-appbar-sticky":"sticky"===h,"k-appbar-fixed":"fixed"===h,"k-appbar-light":"light"===p,"k-appbar-dark":"dark"===p,"k-appbar-inherit":"inherit"===p},r)}),[f,h,p,r]);return o.createElement("div",{className:m,style:i,id:s||d},n)}));Wt.propTypes={children:i.any,className:i.string,style:i.object,id:i.string,themeColor:i.string,position:i.oneOf(["top","bottom"]),positionMode:i.oneOf(["static","sticky","fixed"])};var $t={themeColor:"light",position:"top",positionMode:"static"};Wt.displayName="KendoAppBar";var qt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&Object(It.a)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return Object(a.a)("k-appbar-section",r)}),[r]);return o.createElement("div",{className:u,style:i},n)}));qt.propTypes={children:i.any,className:i.string,style:i.object},qt.displayName="KendoAppBarSection";var Ut=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useRef(null),l=o.useCallback((function(){s.current&&Object(It.a)(s.current)}),[]),c=o.useCallback((function(){return{element:s.current,focus:l}}),[l]);o.useImperativeHandle(t,c);var u=o.useMemo((function(){return Object(a.a)("k-appbar-spacer",{"k-appbar-spacer-sized":i&&i.width&&null!==i.width},r)}),[r,i]),d=o.useMemo((function(){return{flexBasis:i&&i.width?i.width:void 0}}),[i]);return o.createElement("span",{className:u,style:d},n)}));Ut.propTypes={children:i.any,className:i.string,style:i.object},Ut.displayName="KendoAppBarSpacer";var Gt=n(37),Xt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jt=function(){return(Jt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Yt=function(e){return o.createElement(Ue.a,{onPress:e.onPress,onDrag:function(t){e.onResize(t.event,!1,e.d)},onRelease:function(t){e.onResize(t.event,!0,e.d)}},o.createElement("div",{className:"k-resize-handle k-cursor-"+e.d+"-resize",style:Jt({bottom:0,right:0},e.style)}))},Zt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleResize=function(e,n,r){e.originalEvent.preventDefault(),t.props.onResize(e,{end:n,direction:r})},t}return Xt(t,e),t.prototype.render=function(){var e=this.props,t=e.resizable,n=e.onPress,r=e.rtl;return t?o.createElement(o.Fragment,null,"vertical"!==t&&o.createElement(Yt,{onPress:n,onResize:this.handleResize,d:"ew",style:r?{top:0,width:9,left:0,right:""}:{top:0,width:9,right:0,left:""}}),"horizontal"!==t&&o.createElement(Yt,{onPress:n,onResize:this.handleResize,d:"ns",style:{left:0,height:9}}),!0===t&&o.createElement(Yt,{onPress:n,onResize:this.handleResize,d:r?"nesw":"nwse",style:r?{width:9,height:9,right:"",left:0}:{width:9,height:9,right:0,left:""}})):null},t}(o.Component),Qt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),en=function(){return(en=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={rtl:!1},t.oldSize={},t.draggable=null,t.dragging=!1,t.resizing=!1,t.element=null,t.ignoreDrag=!1,t.pressOffset={x:0,y:0},t.pressXY={x:0,y:0},t.currentTranslate={x:0,y:0},t.preventDataOps=void 0,t.handleResize=function(e,n){if(n.end)t.handleRelease();else if(t.element){var r=e.clientX,o=e.clientY;t.resizing=!0;var i=("ns"!==n.direction?r-t.pressXY.x:0)*(t.state.rtl?-1:1),a="ew"!==n.direction?o-t.pressXY.y:0;if(t.dragElement&&(t.state.rtl?t.dragElement.style.marginLeft=-i+"px":t.dragElement.style.marginRight=-i+"px",t.dragElement.style.height="calc(100% + "+a+"px)"),t.element.classList.add("k-layout-item-hint","k-layout-item-hint-resize"),!t.preventDataOps){var s=0,l=0,c=t.element.getBoundingClientRect();i>c.width/t.props.defaultPosition.colSpan/3&&(s=1),i<-c.width/t.props.defaultPosition.colSpan/1.25&&(s=-1),a>c.height/t.props.defaultPosition.rowSpan/3&&(l=1),a<-c.height/t.props.defaultPosition.rowSpan/1.25&&(l=-1),0===s&&0===l||t.props.update(t.props.index,0,0,l,s)}}},t.handlePress=function(e){if(t.reorderable&&t.dragElement)if(t.ignoreDrag=!1,t.props.ignoreDrag&&t.props.ignoreDrag(e.event.originalEvent))t.ignoreDrag=!0;else{t.element&&(t.element.style.zIndex="10",t.element.classList.add("k-layout-item-hint")),t.dragElement.classList.remove("k-cursor-grab"),t.dragElement.classList.add("k-cursor-grabbing");var n=t.dragElement.getBoundingClientRect();t.pressXY={x:e.event.clientX,y:e.event.clientY},t.pressOffset={x:e.event.clientX-n.x,y:e.event.clientY-n.y}}},t.handleDrag=function(e){if(t.reorderable&&!t.ignoreDrag){var n=t.dragElement;if(!e.event.originalEvent.defaultPrevented&&n){t.dragging=!0,e.event.originalEvent.preventDefault();var r=n.getBoundingClientRect();if(t.currentTranslate={x:e.event.clientX-r.x-t.pressOffset.x+t.currentTranslate.x,y:e.event.clientY-r.y-t.pressOffset.y+t.currentTranslate.y},n.style.transform="translate("+t.currentTranslate.x+"px, "+t.currentTranslate.y+"px)",n.style.transition="transform 0s",!t.preventDataOps){var o=0,i=0;t.currentTranslate.y>.7*r.height/t.props.defaultPosition.rowSpan&&(i=1),t.currentTranslate.y<.7*-r.height/t.props.defaultPosition.rowSpan&&(i=-1),t.currentTranslate.x>.7*r.width/t.props.defaultPosition.colSpan&&(o=1),t.currentTranslate.x<.7*-r.width/t.props.defaultPosition.colSpan&&(o=-1),t.props.update(t.props.index,i,t.state.rtl?-o:o,0,0)}}}},t.handleRelease=function(){if(t.reorderable){t.dragging=t.resizing=!1,t.currentTranslate={x:0,y:0},t.element&&(t.element.style.zIndex="1",t.element.classList.remove("k-layout-item-hint","k-layout-item-hint-resize"));var e=t.dragElement;e&&(e.style.transform="translate(0px, 0px)",e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",e.style.marginRight="0px",e.style.marginLeft="0px",e.style.height="100%",e.classList.remove("k-cursor-grabbing"),e.classList.add("k-cursor-grab"))}},t}return Qt(t,e),Object.defineProperty(t.prototype,"reorderable",{get:function(){return void 0!==this.props.reorderable?this.props.reorderable:t.defaultProps.reorderable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dragElement",{get:function(){return this.draggable?this.draggable.element:void 0},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.element&&"rtl"===getComputedStyle(this.element).direction&&this.setState({rtl:!0})},t.prototype.render=function(){var e=this;clearTimeout&&"function"==typeof clearTimeout&&(clearTimeout(this.preventDataOps),this.preventDataOps=window.setTimeout((function(){e.preventDataOps=void 0}),200));var n=this.props.defaultPosition,r=void 0!==this.props.resizable?this.props.resizable:t.defaultProps.resizable,i=en({gridColumnStart:n.col,gridColumnEnd:"span "+n.colSpan,gridRowStart:n.row,gridRowEnd:"span "+n.rowSpan,outline:"none",order:n.order},this.props.hintStyle),s=o.createElement("div",{ref:function(t){e.draggable=t?{element:t}:null},className:Object(a.a)("k-tilelayout-item k-card",{"k-cursor-grab":this.reorderable},this.props.className),style:en({height:"100%"},this.props.style)},this.props.children,o.createElement(Zt,{onPress:this.handlePress,onResize:this.handleResize,resizable:r,rtl:this.state.rtl}));return o.createElement("div",{ref:function(t){e.element=t},style:i,className:this.props.hintClassName},o.createElement(Ue.a,{ref:function(t){e.draggable=t},onDrag:this.handleDrag,onRelease:this.handleRelease,onPress:this.handlePress},s))},t.prototype.getSnapshotBeforeUpdate=function(e){return this.oldSize={},this.dragElement&&(this.oldSize=this.dragElement.getBoundingClientRect()),null},t.prototype.componentDidUpdate=function(e){var t=this,n=this.dragElement;if(n){var r=n.getBoundingClientRect(),o=this.oldSize;if(this.resizing){var i=r.width-o.width;if(this.state.rtl){var a=parseFloat(n.style.marginLeft||"0");n.style.marginLeft=a-i+"px"}else{a=parseFloat(n.style.marginRight||"0");n.style.marginRight=a+i+"px"}this.pressXY.x+=this.state.rtl?-i:i;var s=r.height-o.height,l=parseFloat(n.style.height.substring(12));n.style.height="calc(100% + "+(l+s)+"px)",this.pressXY.y+=s}var c=o.left-r.left,u=o.top-r.top;0===c&&0===u||(this.dragging?e.defaultPosition.order===this.props.defaultPosition.order&&e.defaultPosition.col===this.props.defaultPosition.col||(this.currentTranslate.x=0,this.currentTranslate.y=0,n.style.transform=""):Math.abs(u)<15&&Math.abs(c)<15||requestAnimationFrame((function(){var e=t.element;e&&(e.style.transform="translate("+c+"px, "+u+"px)",e.style.transition="transform 0s",requestAnimationFrame((function(){e.style.transform="",e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s"})))})))}},t.propTypes={defaultPosition:i.object.isRequired,style:i.object,className:i.string,hintStyle:i.object,hintClassName:i.string,header:i.any,body:i.any,item:i.any,resizable:i.oneOf(["horizontal","vertical",!0,!1]),reorderable:i.bool},t.displayName="KendoTileLayoutItem",t.defaultProps={resizable:!0,reorderable:!0},t}(o.Component),nn=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),rn=function(){return(rn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},on={column:"k-grid-flow-col",row:"k-grid-flow-row","column dense":"k-grid-flow-col-dense","row dense":"k-grid-flow-row-dense",unset:"k-grid-flow-unset"},an=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t.state={positions:(t.props.items||[]).map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))},t.focus=function(){t._element&&t._element.focus()},t.update=function(e,n,r,o,i){if(void 0===o&&(o=0),void 0===i&&(i=0),0!==n||0!==r||i||o){var a=!1,s=t.state.positions.map((function(e){return Object.assign({},e)})),l=s[e],c=s.find((function(e){return e.order===l.order+n}));c&&c!==l&&(l.order+=n,c.order+=-n,a=!0);var u=l.col+r;0!==r&&u>=1&&u+l.colSpan<=(t.props.columns||3)+1&&(l.col=u,a=!0);var d=l.colSpan+i;i&&d>=1&&d+l.col<=(t.props.columns||3)+1&&(l.colSpan=d,a=!0);var p=l.rowSpan+o;o&&p>=1&&(l.rowSpan=p,a=!0),a&&(t.setState({positions:s}),Object(X.a)(t.props.onReposition,{},t,{value:s}))}},t}return nn(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.getDerivedStateFromProps=function(e,t){return e.positions?{positions:e.positions.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e)}))}:!e.items||t.positions&&e.items.length===t.positions.length?null:{positions:e.items.map((function(e,t){return Object.assign({order:t,rowSpan:1,colSpan:1},e.defaultPosition)}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.columns,i=void 0===r?3:r,s=t.columnWidth,l=void 0===s?"1fr":s,c=t.gap,u=t.rowHeight,d=void 0===u?"1fr":u,p=t.style,f=t.autoFlow,h=void 0===f?"column":f,m=t.items,v=void 0===m?[]:m,g=c?("number"==typeof c.rows?c.rows+"px":c.rows)+" "+("number"==typeof c.columns?c.columns+"px":c.columns):16,y=rn({gridTemplateColumns:"repeat("+i+", minmax(0px, "+("number"==typeof l?l+"px":l)+"))",gridAutoRows:"minmax(0px, "+("number"==typeof d?d+"px":d)+")",gap:g,padding:g},p);return o.createElement("div",{ref:function(t){e._element=t},dir:this.props.dir,className:Object(a.a)("k-tilelayout",on[h],n),style:y,id:this.props.id,children:v.map((function(t,n){return o.createElement(tn,{key:e.props.dataItemKey?Object(Gt.a)(e.props.dataItemKey)(t):n,update:e.update,defaultPosition:e.state.positions[n],index:n,resizable:t.resizable,reorderable:t.reorderable,style:t.style,className:t.className,hintClassName:t.hintClassName,hintStyle:t.hintStyle,ignoreDrag:e.props.ignoreDrag},t.item?t.item:o.createElement(o.Fragment,null,o.createElement("div",{className:"k-tilelayout-item-header k-card-header"},o.isValidElement(t.header)?t.header:o.createElement("h5",{className:"k-card-title"},t.header)),o.createElement("div",{className:"k-tilelayout-item-body k-card-body"},t.body)))}))})},t.propTypes={id:i.string,style:i.object,className:i.string,dir:i.string,gap:i.object,columns:i.number,columnWidth:i.oneOfType([i.number,i.string]),rowHeight:i.oneOfType([i.number,i.string]),dataItemKey:i.string,items:i.array,positions:i.array,autoFlow:i.oneOf(["column","row","column dense","row dense","unset"]),onReposition:i.func,ignoreDrag:i.func},t.displayName="KendoTileLayout",t}(o.Component),sn={primary:"k-bottom-nav-primary",secondary:"k-bottom-nav-secondary",tertiary:"k-bottom-nav-tertiary",info:"k-bottom-nav-info",success:"k-bottom-nav-success",warning:"k-bottom-nav-warning",error:"k-bottom-nav-error",dark:"k-bottom-nav-dark",light:"k-bottom-nav-light",inverse:"k-bottom-nav-inverse"},ln={flat:"k-bottom-nav-flat",solid:"k-bottom-nav-solid"},cn={vertical:"k-bottom-nav-item-flow-vertical",horizontal:"k-bottom-nav-item-flow-horizontal"},un={fixed:"k-pos-fixed",sticky:"k-pos-sticky"},dn=o.forwardRef((function(e,t){Object(O.a)(x);var n=o.useRef(null);o.useImperativeHandle(t,(function(){return{element:n.current}}));var r=e.className,i=e.style,s=e.selected,l=e.disabled,c=e.item,u=e.render,d=e.dataItem,p=e.icon,f=e.text,h=e.id,m=e.onSelect,v=e.onKeyDown,g=e.index,y=e.tabIndex,b=o.useMemo((function(){return Object(a.a)("k-bottom-nav-item",{"k-selected":s,"k-disabled":l},r)}),[s,l,r]),k=o.useCallback((function(e){m&&void 0!==g&&!l&&m(e,g)}),[m,g,l]),w=o.useCallback((function(e){v&&void 0!==g&&!l&&v(e,g)}),[v,g,l]),C=u,S=c,E=o.createElement("span",{ref:n,className:b,style:i,role:"link",id:h,tabIndex:y,onClick:k,onKeyDown:w,"aria-selected":s,"aria-disabled":l},S?o.createElement(S,{itemIndex:g,item:d}):o.createElement(o.Fragment,null,p&&o.createElement("span",{className:"k-bottom-nav-item-icon k-icon k-i-"+p}),f&&o.createElement("span",{className:"k-bottom-nav-item-text",style:{userSelect:"none"}},f)));return void 0!==C?C.call(void 0,E,e):E}));dn.propTypes={className:i.string,style:i.object,id:i.string,disabled:i.bool,selected:i.bool,icon:i.string,text:i.string,tabIndex:i.number},dn.defaultProps={tabIndex:0},dn.displayName="KendoReactBottomNavigationItem";var pn=function(){return(pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fn=o.forwardRef((function(e,t){Object(O.a)(x);var n=o.useRef(null),r=o.useCallback((function(){n.current&&Object(It.a)(n.current)}),[]),i=o.useCallback((function(){return{element:n.current,focus:r}}),[r]);o.useImperativeHandle(t,i);var s=e.themeColor,l=void 0===s?hn.themeColor:s,c=e.fill,u=void 0===c?hn.fill:c,d=e.positionMode,p=void 0===d?hn.positionMode:d,f=e.itemFlow,h=void 0===f?hn.itemFlow:f,m=e.border,v=void 0===m?hn.border:m,g=e.className,b=e.items,k=e.item,w=e.itemRender,S=e.disabled,E=e.style,I=e.id,N=e.onSelect,T=e.onKeyDown,M=o.useMemo((function(){return Object(y.a)()}),[]),D=Object(Ct.a)(n,e.dir),P=o.useMemo((function(){return Object(a.a)("k-bottom-nav",un[p],sn[l],ln[u],cn[h],{"k-bottom-nav-border":v,"k-disabled":S},g)}),[p,l,u,h,v,S,g]),_=o.useCallback((function(e,t){b&&!b[t].disabled&&N&&Object(X.a)(N,e,i(),{itemTarget:b[t],itemIndex:t})}),[b,N]),j=o.useCallback((function(e,t){_(e,t)}),[_]),R=o.useCallback((function(e,t){switch(e.keyCode){case C.a.enter:case C.a.space:_(e,t),e.preventDefault()}Object(X.a)(T,e,i(),void 0)}),[_,T]);return o.createElement("nav",{ref:n,className:P,style:E,id:I||M,dir:D},b&&b.map((function(e,t){return o.createElement(dn,pn({},e,{key:t,index:t,id:(I||M)+"-"+t,disabled:S||e.disabled,selected:e.selected,dataItem:e,item:k,render:w,onSelect:j,onKeyDown:R}))})))})),hn={themeColor:"primary",fill:"flat",itemFlow:"vertical",positionMode:"fixed",border:!0};fn.propTypes={className:i.string,style:i.object,id:i.string,dir:i.string,themeColor:i.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"]),fill:i.oneOf(["solid","flat"]),itemFlow:i.oneOf(["vertical","horizontal"]),border:i.bool,disabled:i.bool,selected:i.number,onSelect:i.func},fn.defaultProps=hn,fn.displayName="KendoReactBottomNavigation";var mn=n(8),vn=function(){return(vn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},gn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=o.useMemo((function(){return Object(y.a)()}),[]),d=o.useMemo((function(){return e.orientation||yn.orientation}),[e.orientation]),p="horizontal"===d,f=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:yn.hAlign}),[e.align]),h=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:yn.vAlign}),[e.align]),m=o.useMemo((function(){return Object(a.a)("k-stack-layout",{"k-hstack":"horizontal"===d,"k-vstack":"vertical"===d,"k-justify-content-start":p&&"start"===f||!p&&"top"===h,"k-justify-content-center":p&&"center"===f||!p&&"middle"===h,"k-justify-content-end":p&&"end"===f||!p&&"bottom"===h,"k-justify-content-stretch":p&&"stretch"===f||!p&&"stretch"===h,"k-align-items-start":!p&&"start"===f||p&&"top"===h,"k-align-items-center":!p&&"center"===f||p&&"middle"===h,"k-align-items-end":!p&&"end"===f||p&&"bottom"===h,"k-align-items-stretch":!p&&"stretch"===f||p&&"stretch"===h},i)}),[d,p,f,h,i]),v=vn({gap:""+("number"==typeof e.gap?e.gap+"px":e.gap)},s);return o.createElement("div",{ref:n,className:m,style:v,id:l||u},c)})),yn={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};gn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,orientation:i.oneOf(["horizontal","vertical"]),gap:i.oneOfType([i.string,i.number]),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},gn.defaultProps=yn,gn.displayName="KendoReactStackLayout";var bn=function(){return(bn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},kn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,s=e.style,l=e.id,c=e.children,u=e.gap,d=o.useMemo((function(){return Object(y.a)()}),[]),p=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:wn.hAlign}),[e.align]),f=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:wn.vAlign}),[e.align]),h=o.useMemo((function(){return Object(a.a)("k-grid-layout",{"k-justify-items-start":"start"===p,"k-justify-items-center":"center"===p,"k-justify-items-end":"end"===p,"k-justify-items-stretch":"stretch"===p,"k-align-items-start":"top"===f,"k-align-items-center":"middle"===f,"k-align-items-end":"bottom"===f,"k-align-items-stretch":"stretch"===f},i)}),[p,f,i]),m=u?("number"==typeof u.rows?u.rows+"px":u.rows)+" "+("number"==typeof u.cols?u.cols+"px":u.cols):void 0,v=e.rows&&e.rows.map((function(e){return""+("number"==typeof e.height?e.height+"px":e.height)})).join(" "),g=e.cols&&e.cols.map((function(e){return""+("number"==typeof e.width?e.width+"px":e.width)})).join(" "),b=bn({gap:m,gridTemplateColumns:g,gridTemplateRows:v},s);return o.createElement("div",{ref:n,className:h,style:b,id:l||d},c)})),wn={hAlign:"stretch",vAlign:"stretch",gap:void 0};kn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string,gap:i.shape({rows:i.oneOfType([i.string,i.number]),columns:i.oneOfType([i.string,i.number])}),align:i.shape({vertical:i.oneOf(["top","middle","bottom","stretch"]),horizontal:i.oneOf(["start","center","end","stretch"])})},kn.defaultProps=wn,kn.displayName="KendoReactGridLayout";var Cn=function(){return(Cn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},On=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useCallback((function(){return{element:n.current}}),[]);o.useImperativeHandle(t,r);var i=e.className,a=e.style,s=e.id,l=e.children,c=e.row,u=e.col,d=e.rowSpan,p=e.colSpan,f=o.useMemo((function(){return Object(y.a)()}),[]),h=Cn({gridArea:(c||"auto")+" / "+(u||"auto")+" / "+(d?"span "+d:"auto")+" / "+(p?"span "+p:"auto")},a);return o.createElement("div",{ref:n,className:i,style:h,id:s||f},l)}));On.propTypes={className:i.string,style:i.object,children:i.any,id:i.string},On.displayName="KendoReactGridLayoutItem";var xn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);return o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("li",{ref:r,id:e.id,style:e.style,className:Object(a.a)("k-flex-none k-breadcrumb-item",e.className)},e.children)})),Sn={id:i.string,className:i.string,children:i.any,style:i.object};xn.displayName="KendoReactBreadcrumbListItem",xn.propTypes=Sn;var En=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("span",{ref:r,id:e.id,tabIndex:e.tabIndex,style:e.style,className:Object(a.a)("k-icon k-i-arrow-chevron-right k-breadcrumb-delimiter-icon",e.className)})})),In={id:i.string,className:i.string,style:i.object,tabIndex:i.number};En.displayName="KendoReactBreadcrumbDelimiter",En.propTypes=In;var Nn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useCallback((function(){r.current&&r.current.focus()}),[r]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:i,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var s=o.useCallback((function(t){e.id&&Object(X.a)(e.onItemSelect,t,t.target,{id:e.id})}),[e.onItemSelect]),l=o.useCallback((function(t){e.id&&Object(X.a)(e.onKeyDown,t,t.target,{id:e.id})}),[e.onKeyDown]);return o.createElement("span",{"aria-current":e.ariaCurrent?e.ariaCurrent:e.isLast,id:e.id,ref:r,style:e.style,dir:Object(Ct.a)(r,e.dir),tabIndex:Object(ht.a)(e.tabIndex,e.disabled),className:Object(a.a)("k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link",{"k-disabled":e.disabled}),onClick:s,onKeyDown:l},e.iconClass?o.createElement("span",{className:Object(a.a)("k-icon",e.iconClass)}):e.icon?e.icon:"",e.text)})),Tn={id:i.string,className:i.string,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool,text:i.string,icon:i.node,iconClass:i.string,onClick:i.func,ariaCurrent:i.bool};Nn.displayName="KendoReactBreadcrumbLink",Nn.propTypes=Tn;var Mn=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null);return o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current})),o.createElement("ol",{id:e.id,ref:r,style:e.style,dir:Object(Ct.a)(r,e.dir),tabIndex:Object(ht.a)(e.tabIndex,e.disabled),className:Object(a.a)("k-breadcrumb-container k-flex-wrap",{"k-disabled":e.disabled},e.className)},e.children)})),Dn={id:i.string,className:i.string,children:i.element,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool};Mn.displayName="KendoReactBreadcrumbOrderedList",Mn.propTypes=Dn;var Pn=function(){return(Pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_n=o.forwardRef((function(e,t){Object(mn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useMemo((function(){return e.breadcrumbOrderedList||Mn}),[e.breadcrumbOrderedList]),s=o.useMemo((function(){return e.breadcrumbListItem||xn}),[e.breadcrumbListItem]),l=o.useMemo((function(){return e.breadcrumbDelimiter||En}),[e.breadcrumbDelimiter]),c=o.useMemo((function(){return e.breadcrumbLink||Nn}),[e.breadcrumbLink]),u=o.useCallback((function(){r.current&&r.current.focus()}),[r]),d=o.useMemo((function(){return e.disabled||!1}),[e.disabled]);o.useImperativeHandle(n,(function(){return{element:r.current,focus:u,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var p=Object(Ct.a)(r,e.dir),f=function(t){n.current&&Object(X.a)(e.onItemSelect,t,t.target,{id:t.target.id})},h=function(t){n.current&&Object(X.a)(e.onKeyDown,t,t.target,{id:t.target.id})};return o.createElement("nav",{"aria-label":e.ariaLabel,id:e.id,style:e.style,ref:r,dir:p,className:Object(a.a)("k-breadcrumb",{"k-rtl":"rtl"===p,"k-disabled":d},e.className)},o.createElement(i,null,o.createElement(o.Fragment,null,Object.keys(e.data).map((function(t){return o.createElement(s,{key:e.data[t][e.valueField||Rn.valueField]},"0"!==t&&o.createElement(l,null),o.createElement(c,Pn({isLast:e.data.length-1===Number(t),id:e.data[t][e.valueField||Rn.valueField],icon:e.data[t][e.iconField||Rn.iconField],iconClass:e.data[t][e.iconClassField||Rn.iconClassField],text:e.data[t][e.textField||Rn.textField],disabled:e.data[t].disabled||!1,onItemSelect:f,onKeyDown:h},e)))})))))})),jn={id:i.string,style:i.object,className:i.string,breadcrumbOrderedList:i.elementType,breadcrumbListItem:i.elementType,breadcrumbDelimiter:i.elementType,breadcrumbLink:i.elementType,data:i.arrayOf(i.shape({id:i.string,text:i.string,icon:i.any,iconClass:i.string})),dir:i.oneOf(["ltr","rtl"]),disabled:i.bool,valueField:i.string,textField:i.string,iconField:i.string,iconClassField:i.string,onItemSelect:i.func,ariaLabel:i.string},Rn={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass"};_n.displayName="KendoReactBreadcrumb",_n.propTypes=jn,_n.defaultProps=Rn;var An=n(32),Fn=o.forwardRef((function(e,t){var n;Object(O.a)(x);var r=o.useRef(null),i=o.useState(!1),s=i[0],l=i[1],c=o.useCallback((function(){return{element:r.current}}),[]);o.useImperativeHandle(t,c);var u=e.expanded,d=void 0!==u&&u,p=e.disabled,f=e.title,h=e.subtitle,m=e.onAction,v=e.expandIcon,g=e.collapseIcon,y=o.useCallback((function(e){Object(X.a)(m,e,c(),{expanded:d})}),[m,d]),b=o.useCallback((function(e){e.keyCode!==C.a.enter&&e.keyCode!==C.a.space||Object(X.a)(m,e,c(),{expanded:d})}),[m,d]),k=o.useCallback((function(){e.disabled||l(!0)}),[e.disabled]),w=o.useCallback((function(){e.disabled||l(!1)}),[e.disabled]),S=Object(An.a)({onFocus:k,onBlur:w}),E=S.onFocus,I=S.onBlur;return o.createElement("div",{ref:r,className:Object(a.a)("k-expander",e.className,{"k-expanded":d,"k-focus":s&&!p,"k-disabled":p}),onFocus:E,onBlur:I,style:e.style,id:e.id,"aria-expanded":d,"aria-disabled":p,dir:Object(Nt.a)(r,e.dir),tabIndex:Object(ht.a)(e.tabIndex,p),onKeyDown:p?void 0:b},o.createElement("div",{className:"k-expander-header",onClick:p?void 0:y},void 0!==f?o.createElement("div",{className:"k-expander-title"},f):void 0,o.createElement("span",{className:"k-spacer"}),void 0!==h?o.createElement("div",{className:"k-expander-sub-title"},h):void 0,o.createElement("span",{className:"k-expander-indicator"},o.createElement("span",{className:Object(a.a)((n={},n[String(v)]=Boolean(!d&&v),n["k-icon k-i-arrow-chevron-down"]=!d&&!v,n[String(g)]=Boolean(d&&g),n["k-icon k-i-arrow-chevron-up"]=d&&!g,n))}))),e.children)}));Fn.propTypes={children:i.node,className:i.string,style:i.object,dir:i.string,id:i.string,tabIndex:i.number,title:i.node,subtitle:i.node,expandIcon:i.string,collapseIcon:i.string,expanded:i.bool,disabled:i.bool,onAction:i.func},Fn.displayName="KendoReactExpansionPanel";var zn=function(){return(zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ln=o.forwardRef((function(e,t){return o.createElement("div",zn({ref:t},e,{className:Object(a.a)("k-expander-content-wrapper",e.className)}),o.createElement("div",{className:"k-expander-content"},e.children))}));Ln.displayName="KendoReactExpansionPanelContent"},function(e,t,n){"use strict";n.r(t),n.d(t,"ColorGradient",(function(){return Be})),n.d(t,"ColorGradientPropsContext",(function(){return Le})),n.d(t,"ColorPalette",(function(){return qe})),n.d(t,"ColorPalettePropsContext",(function(){return $e})),n.d(t,"ColorPickerPropsContext",(function(){return Qe})),n.d(t,"ColorPicker",(function(){return et})),n.d(t,"FlatColorPicker",(function(){return ot})),n.d(t,"Input",(function(){return ke})),n.d(t,"InputPropsContext",(function(){return be})),n.d(t,"MaskedTextBox",(function(){return xt})),n.d(t,"MaskedTextBoxPropsContext",(function(){return Ot})),n.d(t,"NumericTextBoxPropsContext",(function(){return fe})),n.d(t,"NumericTextBox",(function(){return he})),n.d(t,"Slider",(function(){return N})),n.d(t,"SliderPropsContext",(function(){return I})),n.d(t,"SLIDER_LABEL_ATTRIBUTE",(function(){return w})),n.d(t,"SliderLabel",(function(){return C})),n.d(t,"RangeSliderPropsContext",(function(){return Mt})),n.d(t,"RangeSlider",(function(){return Dt})),n.d(t,"Switch",(function(){return Lt})),n.d(t,"SwitchPropsContext",(function(){return zt})),n.d(t,"CheckboxPropsContext",(function(){return Ht})),n.d(t,"Checkbox",(function(){return Kt})),n.d(t,"RadioGroupPropsContext",(function(){return Jt})),n.d(t,"RadioGroup",(function(){return Yt})),n.d(t,"RadioButtonPropsContext",(function(){return qt})),n.d(t,"RadioButton",(function(){return Ut})),n.d(t,"TextAreaPropsContext",(function(){return tn})),n.d(t,"TextArea",(function(){return nn})),n.d(t,"RatingPropsContext",(function(){return hn})),n.d(t,"Rating",(function(){return mn})),n.d(t,"RatingItem",(function(){return rn}));var r,o,i=n(0),a=n(1),s=n(55),l=n(52),c=n(10),u=n(39),d=n(60),p=n(58),f=n(21),h={name:"@progress/kendo-react-inputs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426668,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},m=n(26),v=n(53),g=n(3),y=((r={})["numerictextbox.increment"]="Increase value",r["numerictextbox.decrement"]="Decrease value",r["slider.increment"]="Increase",r["slider.decrement"]="Decrease",r["slider.dragTitle"]="Drag",r["colorGradient.r"]="r",r["colorGradient.g"]="g",r["colorGradient.b"]="b",r["colorGradient.a"]="a",r["colorGradient.hex"]="hex",r["colorGradient.contrastRatio"]="Contrast ratio",r["colorGradient.colorGradientAALevel"]="AA",r["colorGradient.colorGradientAAALevel"]="AAA",r["colorGradient.colorGradientPass"]="Pass",r["colorGradient.colorGradientFail"]="Fail",r["flatColorPicker.cancelBtn"]="Cancel",r["flatColorPicker.applyBtn"]="Apply",r["checkbox.validation"]="Please check this box if you want to proceed!",r["checkbox.optionalText"]="(Optional)",r["radioButton.validation"]="Please select option if you want to proceed!",r["switch.validation"]="Please turn on if you want to proceed!",r["colorPicker.dropdownButtonAriaLabel"]="Select",r),b=n(35),k=function(){return(k=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},w="data-slider-label",C=function(e){var t,n,r=i.useRef(null),o=Object(b.a)(r),a=e.vertical?{bottom:e.position+"%",height:"1px",width:"100%"}:((t={})["rtl"===o?"right":"left"]=e.position+"%",t.width="1px",t.height="-webkit-fill-available",t);return i.createElement("li",{ref:r,role:"presentation",className:"k-tick k-tick-large",title:e.title,style:k({zIndex:1,position:"absolute"},a)},i.createElement("span",k({},((n={})[w]=!0,n),{className:"k-label",onClick:e.onClick}),e.children))},O=n(50),x=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},E=function(e){function t(t){var n=e.call(this,t)||this;return n.state={value:void 0===n.props.defaultValue?n.props.min:n.props.defaultValue,focused:!1,dir:n.props.dir},n.buttons=function(e){return e.enabled?i.createElement(i.Fragment,null,i.createElement(O.a,{className:"k-button-decrease k-rounded-full",icon:n.props.vertical?"arrow-s":"arrow-w",title:e.decrementTitle,onClick:e.decrement}),e.children,i.createElement(O.a,{className:"k-button-increase k-rounded-full",icon:n.props.vertical?"arrow-n":"arrow-e",title:e.incrementTitle,onClick:e.increment})):e.children},n.focus=function(){n._element&&n._element.focus()},n.isLabel=function(e){for(var t=e;t;){if(Boolean(t.getAttribute(w)))return!0;t=t.parentElement}return!1},n.onFocus=function(){n.setState({focused:!0})},n.onBlur=function(){n.setState({focused:!1})},n.onKeyDown=function(e){var t=void 0;e.keyCode===m.a.left||e.keyCode===m.a.down?t=n.state.value-(n.props.step||0):e.keyCode===m.a.right||e.keyCode===m.a.up?t=n.state.value+(n.props.step||0):e.keyCode===m.a.home?t=n.props.min:e.keyCode===m.a.end&&(t=n.props.max),void 0!==t&&(e.preventDefault(),n.change(e,t))},n.decrement=function(e){e.preventDefault(),n.change(e,n.state.value-(n.props.step||0))},n.increment=function(e){e.preventDefault(),n.change(e,n.state.value+(n.props.step||0))},n.dragStart=function(e){n.isLabel(e.event.originalEvent.target)||(e.event.isTouch&&e.event.originalEvent.preventDefault(),n.drag(e))},n.dragOver=function(e){e.event.originalEvent.preventDefault(),n.drag(e)},n.drag=function(e){var t=e.element.getBoundingClientRect(),r=(n.props.vertical?t.bottom-e.event.clientY:"rtl"===n.state.dir?t.right-e.event.clientX:e.event.clientX-t.left)/(n.props.vertical?t.height:t.width);n.change(e,n.props.min+r*(n.props.max-n.props.min))},Object(f.a)(h),n}return x(t,e),t.getDerivedStateFromProps=function(e,t){var n=void 0!==e.value?e.value:t.value,r=e.min,o=e.max;return void 0===n?null:{value:Math.min(Math.max(n,r),o)}},t.prototype.componentDidMount=function(){if(!this.state.dir&&window&&this._element){var e=window.getComputedStyle(this._element).direction;e&&this.setState({dir:e})}},t.prototype.render=function(){var e,t=this,n=Object(g.provideLocalizationService)(this),r=(this.state.value-this.props.min)/(this.props.max-this.props.min)*100,o=this.props.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},a=this.props.vertical?{paddingTop:0,height:"100%"}:{};return i.createElement("div",{ref:function(e){return t._element=e},"aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":this.state.value,"aria-disabled":this.props.disabled?"true":void 0,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,dir:this.state.dir,role:"slider",id:this.props.id,style:S({gap:0},this.props.style),tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled,void 0),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,className:Object(c.a)("k-slider k-widget",{"k-focus":this.state.focused,"k-disabled":this.props.disabled,"k-slider-horizontal":!this.props.vertical,"k-slider-vertical":this.props.vertical},this.props.className)},i.createElement(this.buttons,{enabled:this.props.buttons,decrement:this.decrement,increment:this.increment,incrementTitle:n.toLanguageString("slider.increment",y["slider.increment"]),decrementTitle:n.toLanguageString("slider.decrement",y["slider.decrement"])},i.createElement(d.a,{onDrag:this.dragOver,onPress:this.dragStart},i.createElement("div",{className:"k-slider-track-wrap",style:S({flexGrow:1,position:"relative",touchAction:"none"},o)},this.props.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:S({margin:0},a)},i.Children.map(this.props.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-t.props.min)/(t.props.max-t.props.min),vertical:t.props.vertical},e.props.children)}))),i.createElement("div",{className:"k-slider-track",style:this.props.vertical?{bottom:0,height:"100%"}:(e={},e["rtl"===this.state.dir?"right":"left"]=0,e.width="100%",e),ref:function(e){return t._sliderTrack=e}},i.createElement("div",{className:"k-slider-selection",style:this.props.vertical?{height:r+"%"}:{width:r+"%"}}),i.createElement("a",{className:"k-draghandle",title:n.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:this.props.vertical?{bottom:"calc("+r+"%)",zIndex:1}:"rtl"===this.state.dir?{right:"calc("+r+"% - 13px)",zIndex:1}:{left:"calc("+r+"%)",zIndex:1}}))))))},Object.defineProperty(t.prototype,"sliderTrack",{get:function(){return this._sliderTrack},enumerable:!0,configurable:!0}),t.prototype.change=function(e,t){t=Math.min(Math.max(t,this.props.min),this.props.max),this.setState({value:t}),Object(v.a)(this.props.onChange,e,this,{value:t})},t.displayName="Slider",t.propTypes={min:a.number.isRequired,max:a.number.isRequired,value:a.number,vertical:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t}(i.Component),I=Object(p.a)(),N=Object(p.b)(I,E);N.displayName="KendoReactSlider",Object(g.registerForLocalization)(E);var T=function(e){return null!=e},M=function(e,t,n){return!T(e)||isNaN(e)||e<=t?t:e>=n?n:e},D=n(12),P=function(e,t,n){void 0===n&&(n=!0);if(-1===["hex","rgba"].indexOf(t))throw new Error("Unsupported color output format '"+t+"'. The available options are 'hex' or 'rgba'.");if(T(e)){var r=Object(D.parseColor)(e.trim(),n);if(T(r))return"hex"===t?r.toCss():r.toCssRgba()}},_=function(e,t){void 0===t&&(t=!0);var n=Object(D.parseColor)(e,t);return T(n)?n.toHSV():{}},j=function(e,t){void 0===t&&(t=!0);var n=Object(D.parseColor)(e,t);return T(n)?n.toBytes():{}},R=function(e){var t=M(e.h,0,359.9),n=M(e.s,0,1),r=M(e.v,0,1),o=M(e.a,0,1);return D.Color.fromHSV(t,n,r,o).toCssRgba()},A=function(e){return R({h:e,s:1,v:1,a:1})},F=function(e,t){var n=M(e.r,0,255),r=M(e.g,0,255),o=M(e.b,0,255),i=M(e.a,0,1),a=M(t.r,0,255),s=M(t.g,0,255),l=M(t.b,0,255);return{r:Math.round((1-i)*a+i*n),g:Math.round((1-i)*s+i*r),b:Math.round((1-i)*l+i*o)}},z=function(e){var t=[e.r,e.g,e.b].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]},L=function(e,t){return n=z(F(e,t)),r=z(F(t,{r:0,g:0,b:0,a:1})),(Math.max(n,r)+.05)/(Math.min(n,r)+.05);var n,r},B={};var V=n(33),H=n(22),K=n(107),W=function(){return(W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$=/\d/,q=function(e,t){return void 0!==e?e:t},U=function(e,t,n){return null===e&&void 0===e?"":"string"==typeof e?e:n.formatNumber(e,t)},G=function(e){return(String(e).split(".")[1]||"").length},X=function(e,t){return Math.max(G(e),G(t))},J=function(e,t){var n=function(e){return Math.min(e,15)}(t);return parseFloat(e.toFixed(n))},Y=function(e,t,n,r,o,i,a){var s=X(e||0,n||0),l=Q(J((e||0)+(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=U(l,i,a),t.selectionStart=t.selectionEnd=ie(t.currentLooseValue,$)},Z=function(e,t,n,r,o,i,a){var s=X(e||0,n||0),l=Q(J((e||0)-(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=U(l,i,a),t.selectionStart=t.selectionEnd=ie(t.currentLooseValue,$)},Q=function(e,t,n){return null==e?e:e>1||e<1||1===e?void 0!==n&&void 0!==t&&n<t?null:(void 0!==n&&e>n&&(e=n),void 0!==t&&e<t&&(e=t),e):null},ee=function(e,t,n){var r=function(e,t){var n=t.findIndex((function(t){t[0];var n=t[1];return Boolean(n)&&e.indexOf(n)===e.length-n.length}));if(-1===n)return-1;var r=t[n][1];return e.length-r.length}(e,t);if(-1!==r&&n.selectionStart>r)n.selectionStart=n.selectionEnd=r;else{n.selectionStart>e.length&&(n.selectionStart=n.selectionEnd=e.length);var o=function(e,t){var n=t.findIndex((function(t){var n=t[0];t[1];return Boolean(n)&&0===e.indexOf(n)}));return-1===n?-1:t[n][0].length}(e,t);-1!==o&&n.selectionStart<o&&(n.selectionStart=n.selectionEnd=o),-1===n.selectionStart&&(n.selectionStart=n.selectionEnd=0)}},te=function(e,t,n,r){e.selectionStart=e.selectionEnd=t,ee(n,r,e)},ne=function(e,t,n,r){e.eventValue=r.parseNumber(e.prevLooseValue,t),e.currentLooseValue=e.prevLooseValue,e.valueIsCorrected=!0,te(e,e.selectionStart,e.currentLooseValue,n)},re=function(e,t){var n=e.indexOf(t.decimal);return n>-1?n:ie(e,$)},oe=function(e){return e.split("").reverse().join("")},ie=function(e,t){return e.length-oe(e).search(t)},ae=function(e){return e.split(e[e.search($)])[0]},se=function(e){var t=oe(e);return oe(t.split(t[t.search($)])[0])},le=function(e,t){return e.search(t)},ce=function(e,t){var n=e.indexOf(t);return n>-1?e.length-n-1:0},ue=function(e,t,n,r,o){var i="0"===e.replace(o,"")[0],a="0"===t.replace(o,"")[0];if(i&&!a)return n-1;if(a&&r)return n+1;for(var s=0,l=0;l<n;l++)$.test(e.charAt(l))&&s++;for(var c=0;s>0&&t.length>c;)$.test(t.charAt(c))&&s--,c++;return c},de=function(e,t,n){var r=W({},e),o=r.prevLooseValue,i=n.numberSymbols(),a=function(e,t){var n=t.formatNumber(1111111.1111111,e),r=t.formatNumber(-1111111.1111111,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=t.numberSymbols(),s=new RegExp("[\\d\\"+a.decimal+a.group+"]","g");return[n,r,o,i].map((function(e){return e.replace(s,"")})).join("").split("").filter((function(e,t,n){return n.indexOf(e)===t})).join("")}(t,n),s=String(r.currentLooseValue),l=String(o),c=new RegExp("[^\\d\\"+i.decimal+"]","g"),u=new RegExp("[^\\d\\"+i.decimal+"\\"+i.group+"]","g"),d=new RegExp("[\\d\\"+i.decimal+"\\"+i.group+"]"),p=s.replace(c,""),f=le(s,$),h=-1===f?-1:ie(s,$),m=s.indexOf(i.decimal),v=(s.substring(0,f)+s.substring(f,h).replace(u,"")+s.substring(h,s.length)).split("").filter((function(e){return-1!==a.indexOf(e)||-1!==e.search(d)})).join(""),g=n.formatNumber(.31111111111111117,t).replace(c,""),y=g.indexOf(i.decimal),b=y>-1?g.length-y-1:0,k=n.formatNumber(1,t).replace(c,""),w=k.indexOf(i.decimal),C=w>-1?k.length-w-1:0,O=function(e,t){var n=t.formatNumber(1111111.1111111,e),r=t.formatNumber(-1111111.1111111,e),o=t.formatNumber(0,e),i=t.formatNumber(1,e),a=ae(n),s=ae(r),l=ae(o),c=ae(i);return{positiveInfo:[a,se(n)],negativeInfo:[s,se(r)],zeroInfo:[l,se(o)],oneInfo:[c,se(i)]}}(t,n),x=[O.positiveInfo,O.negativeInfo,O.zeroInfo,O.oneInfo],S=1!==x.findIndex((function(e){return-1!==e.findIndex((function(e){return Boolean(e)}))})),E=s.length>0&&s.length<l.length,I=t&&"p"===t[0]&&s&&-1===s.indexOf(i.percentSign);if(!r.isPaste){if(""===s)return r.eventValue=null,r.currentLooseValue="",r;if(r.currentLooseValue===i.minusSign&&n.formatNumber(-0,t)!==l)return r.eventValue=-0,r.currentLooseValue=U(r.eventValue,t,n),te(r,re(r.currentLooseValue,i),r.currentLooseValue,x),r;if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return n.split(t.minusSign).length!==r.split(t.minusSign).length&&n.length===r.length+t.minusSign.length}(r,i)){var N=n.parseNumber(o,t);r.eventValue=-(null!==N?N:0),r.currentLooseValue=U(r.eventValue,t,n);var T=le(r.currentLooseValue,$),M=le(l,$);return te(r,r.selectionEnd-1+(T-M),r.currentLooseValue,x),r}if(function(e,t){var n=String(e.currentLooseValue),r=String(e.prevLooseValue);return-1===n.indexOf(t.minusSign)&&-1!==r.indexOf(t.minusSign)}(r,i))return r.eventValue=n.parseNumber(r.currentLooseValue,t),te(r,r.selectionStart,r.currentLooseValue,x),r;if(r.currentLooseValue===i.decimal){r.eventValue=0;var D=U(r.eventValue,t,n);if(0===C&&b>0){var P=ie(D,$);r.currentLooseValue=D.substring(0,P)+i.decimal+D.substring(P)}else r.currentLooseValue=D;return te(r,re(r.currentLooseValue,i)+1,r.currentLooseValue,x),r}if(function(e,t){return String(e.currentLooseValue).split(t.decimal).length>2}(r,i))return ne(r,t,x,n),r;if(I)return r.eventValue=n.parseNumber(s,t)/100,r.currentLooseValue=U(r.eventValue,t,n),r;if(String(r.currentLooseValue).replace(/[^\d]/g,"").length>15)return ne(r,t,x,n),r;if(p!==s&&s&&S)if(-1===x.findIndex((function(e){var t=e[0],n=e[1],r=s.indexOf(t),o=s.indexOf(n),a=0===r,l=o===s.length-n.length,c=r+t.length!==f&&-1!==f&&s[r+t.length]!==i.decimal,u=o!==h&&-1!==h&&s[o-1]!==i.decimal;return t&&n?!c&&!u&&(a&&l):t?!c&&a:!!n&&(!u&&l)})))return ne(r,t,x,n),r;if(p[p.length-1]===i.decimal&&b>0)return r.eventValue=n.parseNumber(s,t),r.currentLooseValue=v,r;if(r.currentLooseValue&&o)if((a+i.decimal+i.group).split("").findIndex((function(e){return s.split("").filter((function(t){return t===e})).length<l.split("").filter((function(t){return t===e})).length&&s.length+1===l.length&&(e!==i.decimal||0!==ce(l.replace(c,""),i.decimal))}))>-1)return r.eventValue=n.parseNumber(e.prevLooseValue,t),r.currentLooseValue=e.prevLooseValue,r;var _=ce(p,i.decimal),j="0"===p[p.length-1];if(E&&j&&_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=U(r.eventValue,t,n),r;if(_>0){var R=s.substring(0,m);if(j&&(!R||0!==l.indexOf(R))){r.eventValue=n.parseNumber(r.currentLooseValue,t);var A=U(r.eventValue,t,n);return te(r,ue(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A,r}if(_>b){var F=s.indexOf(i.decimal),z=s.substring(0,F)+s.substring(F,F+1+b)+s.substring(h,String(r.currentLooseValue).length);return r.eventValue=n.parseNumber(z,t),r.currentLooseValue=z,te(r,r.selectionStart,z,x),r}if(C!==b&&_<=b&&j)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=v,r;if(_<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=U(r.eventValue,t,n),r}}if(r.eventValue=n.parseNumber(r.currentLooseValue,t),I&&(r.eventValue=r.eventValue/100),"number"==typeof r.eventValue){A=U(r.eventValue,t,n);1===s.length?te(r,re(A,i),A,x):te(r,ue(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A}else r.currentLooseValue=U(n.parseNumber(p),t,n);return r},pe=function(){return(pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fe=Object(p.a)(),he=i.forwardRef((function(e,t){var n;Object(f.a)(h);var r=Object(V.a)(fe,e),o=i.useMemo((function(){return Object(l.a)()}),[]),a=r.id||o,s=Object(g.useInternationalization)(),d=Object(g.useLocalization)(),p=i.useRef(null),m=i.useRef(),b=i.useState(!1),k=b[0],w=b[1],C=i.useRef({eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1}),x=i.useRef(!1),S=i.useRef(),E=i.useRef(r.defaultValue),I=U(C.current.focused&&!r.disabled?C.current.currentLooseValue:q(r.value,E.current),r.format,s);S.current=I,i.useEffect((function(){p.current&&p.current.setCustomValidity&&p.current.setCustomValidity(P().valid?"":r.validationMessage||"Please enter a valid value!")}));var N=i.useCallback((function(){p.current&&p.current.focus()}),[]),T=i.useCallback((function(){return void 0!==m.current?m.current:q(r.value,E.current)}),[r.value]),M=i.useCallback((function(){return r.name}),[r.name]),D=i.useCallback((function(){return r.required}),[r.required]),P=i.useCallback((function(){var e=void 0!==r.validationMessage,t=T();return{customError:e,valid:void 0!==r.valid?r.valid:!(C.current.valueIsOutOfRange||D()&&null==t),valueMissing:null==t}}),[r.validationMessage,r.valid,T,D]),_=i.useCallback((function(){return r.validityStyles}),[r.validityStyles]),j=i.useCallback((function(){return r}),[r]),R=i.useCallback((function(){var e={element:p.current,focus:N};return Object.defineProperty(e,"name",{get:M}),Object.defineProperty(e,"value",{get:T}),Object.defineProperty(e,"validity",{get:P}),Object.defineProperty(e,"validityStyles",{get:_}),Object.defineProperty(e,"required",{get:D}),Object.defineProperty(e,"props",{get:j}),e}),[M,T,P,_,D,N,j]);i.useImperativeHandle(t,R);var A=i.useCallback((function(){return{eventValue:q(r.value,E.current),prevLooseValue:S.current,currentLooseValue:p.current.value,selectionStart:p.current.selectionStart,selectionEnd:p.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:x.current,focused:C.current.focused}}),[r.value]),F=i.useCallback((function(e,t){if(!r.disabled){m.current=t.eventValue,E.current=t.eventValue;var n=U(Q(t.eventValue,r.min,r.max),r.format,s),o=Q(s.parseNumber(n,r.format),r.min,r.max);o!==t.eventValue&&(t.valueIsOutOfRange=!0,t.eventValue=o,E.current=o),r.value!==t.eventValue&&Object(v.a)(r.onChange,e,R(),{value:t.eventValue}),m.current=void 0,C.current=t,w((function(e){return!e}))}}),[r.value,r.onChange,r.disabled,w,R]),z=i.useCallback((function(e){var t=A();x.current=!1,F(e,de(t,r.format,s))}),[r.format,r.onChange,s,F,A]),L=i.useCallback((function(e){var t=A(),n=s.parseNumber(String(t.currentLooseValue),r.format);if(t.selectionEnd>t.selectionStart&&t.selectionEnd-t.selectionStart===String(t.currentLooseValue).length)x.current=!0;else{switch(e.keyCode){case 38:Y(n,t,r.step,r.min,r.max,r.format,s);break;case 40:Z(n,t,r.step,r.min,r.max,r.format,s);break;case 13:if(!1===r.rangeOnEnter)return;var o=U(Q(n,r.min,r.max),r.format,s),i=Q(s.parseNumber(o,r.format),r.min,r.max);t.eventValue=i,t.currentLooseValue=U(i,r.format,s),t.selectionStart=t.selectionEnd=t.currentLooseValue.length;break;case 110:var a=p.current,l=s.numberSymbols();a&&(t.currentLooseValue=t.currentLooseValue.slice(0,t.selectionStart)+l.decimal+t.currentLooseValue.slice(t.selectionEnd),t.selectionStart=t.selectionEnd=t.selectionStart+1,t=de(t,r.format,s));break;default:return}e.preventDefault(),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.rangeOnEnter,F,A]),B=i.useCallback((function(){x.current=!0}),[]),W=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=A();Y(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,A]),$=i.useCallback((function(e){if(!r.readOnly&&!r.disabled){var t=A();Z(s.parseNumber(String(t.currentLooseValue),r.format),t,r.step,r.min,r.max,r.format,s),F(e,t)}}),[r.format,r.min,r.max,r.step,r.onChange,r.readOnly,r.disabled,F,A]),G=i.useCallback((function(e){document&&document.activeElement===p.current&&p.current&&!r.readOnly&&!r.disabled&&(e.nativeEvent.deltaY<0&&W(e),e.nativeEvent.deltaY>0&&$(e))}),[W,$,r.disabled,r.readOnly]),X=i.useCallback((function(e){C.current.currentLooseValue=S.current,C.current.focused=!0,Object(v.a)(r.onFocus,e,R(),{}),w((function(e){return!e}))}),[r.onFocus,w,R]),J=i.useCallback((function(e){C.current={eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1},Object(v.a)(r.onBlur,e,R(),{}),w((function(e){return!e}))}),[r.onBlur,w,R]),ee=i.useCallback((function(e){document&&p.current&&(e.preventDefault(),document.activeElement!==p.current&&p.current.focus())}),[]);i.useLayoutEffect((function(){p.current&&void 0!==C.current.selectionStart&&void 0!==C.current.selectionEnd&&(p.current.selectionStart=C.current.selectionStart,p.current.selectionEnd=C.current.selectionEnd,C.current.selectionStart=void 0,C.current.selectionEnd=void 0)}),[k]);var te=!_()||P().valid,ne=i.createElement("span",{dir:r.dir,style:r.label?r.style:pe({width:r.width},r.style),className:Object(c.a)("k-input","k-numerictextbox",(n={},n["k-input-"+(H.a.sizeMap[r.size]||r.size)]=r.size,n["k-input-"+r.fillMode]=r.fillMode,n["k-rounded-"+(H.a.roundedMap[r.rounded]||r.rounded)]=r.rounded,n["k-invalid"]=!te,n["k-required"]=r.required,n["k-disabled"]=r.disabled,n),r.className),"aria-disabled":r.disabled?"true":void 0},i.createElement("input",{value:null===I?"":I,tabIndex:Object(u.a)(r.tabIndex,r.disabled),accessKey:r.accessKey,disabled:r.disabled,title:r.title,"aria-valuemin":r.min,"aria-valuemax":r.max,"aria-label":r.ariaLabel,"aria-labelledby":r.ariaLabelledBy,"aria-describedby":r.ariaDescribedBy,placeholder:r.placeholder,spellCheck:!1,autoComplete:"off",autoCorrect:"off",type:r.inputType||"tel",className:"k-input-inner",id:a,name:r.name,readOnly:r.readOnly,style:r.inputStyle,onChange:z,onFocus:X,onBlur:J,onKeyDown:L,onPaste:B,onWheel:G,ref:p}),r.children,r.spinners&&i.createElement("span",{className:"k-input-spinner k-spin-button",onMouseDown:ee},i.createElement(O.a,{tabIndex:-1,type:"button",icon:"arrow-n",rounded:null,className:"k-spinner-increase","aria-label":d.toLanguageString("numerictextbox.increment",y["numerictextbox.increment"]),title:d.toLanguageString("numerictextbox.increment",y["numerictextbox.increment"]),onClick:W}),i.createElement(O.a,{tabIndex:-1,type:"button",icon:"arrow-s",rounded:null,className:"k-spinner-decrease","aria-label":d.toLanguageString("numerictextbox.decrement",y["numerictextbox.decrement"]),title:d.toLanguageString("numerictextbox.decrement",y["numerictextbox.decrement"]),onClick:$})));return r.label?i.createElement(K.a,{label:r.label,editorId:a,editorValue:null===I?"":I,editorValid:te,editorDisabled:r.disabled,editorPlaceholder:r.placeholder,children:ne,style:{width:r.width},dir:r.dir}):ne}));he.propTypes={value:a.number,defaultValue:a.number,step:a.number,format:a.oneOfType([a.string,a.shape({style:a.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:a.string,currencyDisplay:a.oneOf(["symbol","code","name"]),useGrouping:a.bool,minimumIntegerDigits:a.number,minimumFractionDigits:a.number,maximumFractionDigits:a.number})]),width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,title:a.string,placeholder:a.string,min:a.number,max:a.number,spinners:a.bool,disabled:a.bool,readOnly:a.bool,dir:a.string,name:a.string,label:a.string,validationMessage:a.string,required:a.bool,id:a.string,rangeOnEnter:a.bool,ariaLabelledBy:a.string,ariaDescribedBy:a.string,ariaLabel:a.string,onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},he.displayName="KendoNumericTextBox",he.defaultProps={step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,onChange:function(e){},onFocus:function(e){},onBlur:function(e){},size:"medium",rounded:"medium",fillMode:"solid"};var me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ve=function(){return(ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ge=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},ye=function(e){function t(n){var r=e.call(this,n)||this;return r._inputId=Object(l.a)(),r.focus=function(){r._input&&r._input.focus()},r.isInvalid=function(e){var t=!1;for(var n in e)e.hasOwnProperty(n)&&(t=t||e[n]);return t},r.setValidity=function(){r._input&&r._input.setCustomValidity&&(r.validity.valid||!r.validityStyles?r._input.classList.remove("k-invalid"):r._input.classList.add("k-invalid"),r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||""))},r.handleChange=function(e){r.setState({value:e.target.value}),r.valueDuringOnChange=e.target.value,r.props.onChange&&r.props.onChange.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:e.target.value,target:r}),r.valueDuringOnChange=void 0},r.handleAutoFill=function(e){if("autoFillStart"===e.animationName){var t=e.target.parentNode;t&&t.classList.contains("k-empty")&&t.classList.remove("k-empty")}},Object(f.a)(h),r.state={value:r.props.defaultValue||t.defaultProps.defaultValue},r}return me(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.value?this.props.value:this.state.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e={badInput:!!this._input&&this._input.validity.badInput,patternMismatch:!!this._input&&this._input.validity.patternMismatch,rangeOverflow:!!this._input&&this._input.validity.rangeOverflow,rangeUnderflow:!!this._input&&this._input.validity.rangeUnderflow,stepMismatch:!!this._input&&this._input.validity.stepMismatch,tooLong:!!this._input&&this._input.validity.tooLong,typeMismatch:!!this._input&&this._input.validity.typeMismatch,valueMissing:!!this._input&&this._input.validity.valueMissing};return ve({},e,{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!this._input||!this.isInvalid(e)})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.label,o=t.id,a=(t.validationMessage,t.defaultValue,t.valid,t.visited,t.touched,t.modified,t.ariaLabelledBy),s=t.ariaDescribedBy,l=(t.validityStyles,t.style),u=ge(t,["className","label","id","validationMessage","defaultValue","valid","visited","touched","modified","ariaLabelledBy","ariaDescribedBy","validityStyles","style"]),d=o||this._inputId,p=!this.validityStyles||this.validity.valid,f=Object(c.a)(n,"k-input k-input-md k-rounded-md k-input-solid"),h=i.createElement("input",ve({"aria-labelledby":a,"aria-describedby":s},u,{style:r?void 0:l,value:this.value,id:d,className:f,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:function(t){e._input=t}}));return r?i.createElement(K.a,{label:r,editorId:d,editorValue:String(this.value),editorValid:p,editorDisabled:u.disabled,editorPlaceholder:u.placeholder,children:h,style:l,dir:u.dir}):h},t.displayName="Input",t.propTypes={label:a.string,validationMessage:a.string,required:a.bool,validate:a.bool,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={defaultValue:"",required:!1,validityStyles:!0},t}(i.Component),be=Object(p.a)(),ke=Object(p.b)(be,ye);ke.displayName="KendoReactInput";var we=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ce=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=function(e){var t=e.target.value,r=P(t,"rgba");n.setState({hex:t}),T(r)&&n.props.onHexChange(t,r,e)},n.onBlur=function(){T(P(n.state.hex,"rgba"))||n.setState({hex:n.state.originalHex})},n.state={hex:n.props.hex,originalHex:n.props.hex},n}return we(t,e),t.prototype.render=function(){return i.createElement(ke,{value:this.state.hex,onChange:this.onChange,onBlur:this.onBlur,disabled:this.props.disabled})},t.getDerivedStateFromProps=function(e,t){return e.hex!==t.originalHex?{hex:e.hex,originalHex:e.hex}:null},t}(i.Component),Oe=n(18),xe=n(41),Se=function(e){Object(f.a)(xe.a);var t=e.id,n=e.editorId,r=e.editorRef,o=e.editorDisabled,a=e.children,s=e.editorValid,l=e.style,u=e.className,d=e.optional,p=Object(g.useLocalization)(),h=d?p.toLanguageString(Oe.a,Oe.b[Oe.a]):"",m=h&&i.createElement("span",{className:"k-label-optional"},h),v=i.useCallback((function(e){if(r&&r.current&&!o){r.current.focus&&(e.preventDefault(),r.current.focus());var t=r.current.actionElement;t&&(e.preventDefault(),t.click())}}),[r]),y=Object(c.a)({"k-label":!0,"k-label-empty":!a,"k-text-error":!1===s,"k-text-disabled":!0===o},u);return i.createElement("label",{id:t,htmlFor:n,onClick:v,style:l,className:y},a,m)};Se.propTypes={id:a.string,editorId:a.string,editorRef:a.oneOfType([a.func,a.shape({current:a.any})]),editorValid:a.bool,editorDisabled:a.bool,style:a.object,className:a.string,optional:a.bool},Se.displayName="KendoReactLabel";var Ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(){return(Ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ne=["rgba","rgb","hex"],Te=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={inputMode:Ne[1]},t.onRgbaRChange=function(e){t.dispatchRgbaChange({r:e.value},e)},t.onRgbaGChange=function(e){t.dispatchRgbaChange({g:e.value},e)},t.onRgbaBChange=function(e){t.dispatchRgbaChange({b:e.value},e)},t.onRgbaAChange=function(e){t.dispatchRgbaChange({a:e.value},e)},t}return Ee(t,e),t.prototype.render=function(){var e=Object(g.provideLocalizationService)(this),t=e.toLanguageString("colorGradient.r",y["colorGradient.hex"]),n=e.toLanguageString("colorGradient.r",y["colorGradient.r"]),r=e.toLanguageString("colorGradient.r",y["colorGradient.g"]),o=e.toLanguageString("colorGradient.r",y["colorGradient.b"]),a=e.toLanguageString("colorGradient.r",y["colorGradient.a"]);return i.createElement("div",{className:"k-colorgradient-inputs k-hstack"},i.createElement("div",{className:"k-vstack"},i.createElement(O.a,{fillMode:"flat",icon:"arrows-kpi",className:"k-colorgradient-toggle-mode k-icon-button",onClick:this.onToggleModeChange.bind(this)})),"hex"===this.state.inputMode&&i.createElement("div",{className:"k-vstack k-flex-1"},i.createElement("span",{className:"k-hex-value k-textbox k-input"},i.createElement(Ce,{hex:this.props.hex,onHexChange:this.props.onHexChange,disabled:this.props.disabled})),i.createElement(Se,{className:"k-colorgradient-input-label"},t)),("rgb"===this.state.inputMode||"rgba"===this.state.inputMode)&&i.createElement(i.Fragment,null,i.createElement("div",{className:"k-vstack"},i.createElement(he,{value:this.props.rgba.r,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaRChange,disabled:this.props.disabled}),i.createElement(Se,{className:"k-colorgradient-input-label"},n)),i.createElement("div",{className:"k-vstack"},i.createElement(he,{value:this.props.rgba.g,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaGChange,disabled:this.props.disabled}),i.createElement(Se,{className:"k-colorgradient-input-label"},r)),i.createElement("div",{className:"k-vstack"},i.createElement(he,{value:this.props.rgba.b,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaBChange,disabled:this.props.disabled}),i.createElement(Se,{className:"k-colorgradient-input-label"},o))),"rgba"===this.state.inputMode&&i.createElement("div",{className:"k-vstack"},this.props.opacity&&i.createElement(he,{value:this.props.rgba.a,min:0,max:1,step:.01,spinners:!1,format:"n2",onChange:this.onRgbaAChange,disabled:this.props.disabled}),this.props.opacity&&i.createElement(Se,{className:"k-colorgradient-input-label"},a)))},t.prototype.dispatchRgbaChange=function(e,t){var n=Ie({},this.props.rgba);void 0!==e.r&&(n.r=e.r),void 0!==e.g&&(n.g=e.g),void 0!==e.b&&(n.b=e.b),void 0!==e.a&&(n.a=e.a),this.props.onRgbaChange(n,t)},t.prototype.onToggleModeChange=function(){var e=Ne.length-1===Ne.indexOf(this.state.inputMode)?0:Ne.indexOf(this.state.inputMode)+1;if(this.props.opacity)this.setState({inputMode:Ne[e]});else{var t="rgba"===Ne[e]?e+1:e;this.setState({inputMode:Ne[t]})}},t}(i.Component),Me=Te;Object(g.registerForIntl)(Te),Object(g.registerForLocalization)(Te);var De=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return De(t,e),t.prototype.render=function(){var e=Object(g.provideLocalizationService)(this),t=e.toLanguageString("colorGradient.contrastRatio",y["colorGradient.contrastRatio"]),n=e.toLanguageString("colorGradient.colorGradientAALevel",y["colorGradient.colorGradientAALevel"]),r=e.toLanguageString("colorGradient.colorGradientAAALevel",y["colorGradient.colorGradientAAALevel"]),o=e.toLanguageString("colorGradient.colorGradientPass",y["colorGradient.colorGradientPass"]),a=e.toLanguageString("colorGradient.colorGradientFail",y["colorGradient.colorGradientFail"]),s=L(this.props.rgba,this.props.bgColor),l=4.5.toFixed(1),c=7..toFixed(1),u=t+": "+s.toFixed(2),d=n+": "+l,p=r+": "+c,f=i.createElement("span",{className:"k-contrast-validation k-text-success"},o," ",i.createElement("span",{className:"k-icon k-i-check"})),h=i.createElement("span",{className:"k-contrast-validation k-text-error"},a," ",i.createElement("span",{className:"k-icon k-i-close"}));return i.createElement("div",{className:"k-vbox k-colorgradient-color-contrast"},i.createElement("div",{className:"k-contrast-ratio"},i.createElement("span",{className:"k-contrast-ratio-text"},u),s>=4.5?i.createElement("span",{className:"k-contrast-validation k-text-success"},i.createElement("span",{className:"k-icon k-i-check"}),s>=7&&i.createElement("span",{className:"k-icon k-i-check"})):i.createElement("span",{className:"k-contrast-validation k-text-error"},i.createElement("span",{className:"k-icon k-i-close"}))),i.createElement("div",null,i.createElement("span",null,d),s>=4.5?f:h),i.createElement("div",null,i.createElement("span",null,p),s>=7?f:h))},t}(i.Component);Object(g.registerForLocalization)(Pe);var _e=function(e,t){return 0===e.length?"":'<path d="'+e.reduce((function(e,n,r,o){return 0===r?"M "+n[0]+","+n[1]:e+" "+t(n,r,o)}),"")+'" fill="none" stroke="white" stroke-width="1"/>'},je=function(e,t){var n=t[0]-e[0],r=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),angle:Math.atan2(r,n)}},Re=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Re(t,e),t.prototype.renderSvgCurveLine=function(){var e,t,n=this,r=this.props.metrics,o=function(e,t,i,a,s){var l=(i+a)/2,c=Object.assign({},n.props.hsva,{s:t/r.width,v:1-l/r.height}),u=L(j(R(c)),j(n.props.backgroundColor||""));return i+.5>a?u<e+1&&u>e-1?l:null:s(u,e)?o(e,t,i,a-(a-i)/2,s):o(e,t,i+(a-i)/2,a,s)},i=function(e,t,n){void 0===n&&(n=!1);for(var i=[],a=0;a<=r.width;a+=r.width/t){var s=o(e,a,0,r.height,n?function(e,t){return e<t}:function(e,t){return e>t});null!==s&&i.push([a,s])}return i},a=(t=je,e=function(e,n,r,o){var i=t(n||e,r||e),a=i.angle+(o?Math.PI:0),s=.1*i.length;return[e[0]+Math.cos(a)*s,e[1]+Math.sin(a)*s]},function(t,n,r){var o=e(r[n-1],r[n-2],t),i=o[0],a=o[1],s=e(t,r[n-1],r[n+1],!0);return"C "+i+","+a+" "+s[0]+","+s[1]+" "+t[0]+","+t[1]});return _e(i(4.5,16),a)+_e(i(4.5,16,!0),a)+_e(i(7,16),a)+_e(i(7,16,!0),a)},t.prototype.shouldComponentUpdate=function(e){return e.hsva.h!==this.props.hsva.h||e.hsva.a!==this.props.hsva.a||this.props.backgroundColor!==e.backgroundColor},t.prototype.render=function(){return i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"k-color-contrast-svg",dangerouslySetInnerHTML:{__html:this.renderSvgCurveLine()},style:{position:"absolute",overflow:"visible",pointerEvents:"none",left:0,top:0,zIndex:3}})},t}(i.Component),Fe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ze=function(e){function t(n){var r=e.call(this,n)||this;r.onHexChange=function(e,t,n){if(r.isUncontrolled){var o=_(t);r.setState({hsva:o,backgroundColor:A(o.h),rgba:j(t),hex:e})}else!function(e,t,n){B[e]={value:t,hex:n}}(r.state.guid,t,e);r.dispatchChangeEvent(t,n,n.nativeEvent)},r.onRgbaChange=function(e,t){var n=function(e){var t=M(e.r,0,255),n=M(e.g,0,255),r=M(e.b,0,255),o=M(e.a,0,1);return D.Color.fromBytes(t,n,r,o).toCssRgba()}(e);if(r.isUncontrolled){var o=_(n),i=P(n,"hex");r.setState({hsva:o,backgroundColor:A(o.h),rgba:e,hex:i})}else!function(e,t,n){B[e]={value:t,rgba:n}}(r.state.guid,n,e);r.dispatchChangeEvent(n,t.syntheticEvent,t.nativeEvent)},r.onAlphaSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{a:e.value/100}),e.syntheticEvent,e.nativeEvent)},r.onHueSliderChange=function(e){r.handleHsvaChange(Object.assign({},r.state.hsva,{h:e.value}),e.syntheticEvent,e.nativeEvent)},r.onDrag=function(e){r.gradientWrapper.classList.add("k-dragging"),r.changePosition(e.event)},r.onRelease=function(){r.gradientWrapper.classList.remove("k-dragging")},r.onGradientWrapperClick=function(e){r.changePosition(e)},r.changePosition=function(e){var t=r.getGradientRectMetrics(),n=e.clientX-t.left,o=e.clientY-t.top,i=M(n,0,t.width),a=M(o,0,t.height),s=Object.assign({},r.state.hsva,{s:i/t.width,v:1-a/t.height});r.handleHsvaChange(s,e,e.nativeEvent)},r.onFocus=function(e){r.props.onFocus&&r.props.onFocus.call(void 0,{nativeEvent:e,target:r})},r.focus=function(){Object(s.a)(r.wrapper)},Object(f.a)(h);var o=n.value||n.defaultValue||P("rgba(255, 255, 255, 1)","rgba");return r.state=Object.assign({},t.getStateFromValue(o),{isFirstRender:!0,guid:Object(l.a)()}),r}return Fe(t,e),t.getDerivedStateFromProps=function(e,n){return e.value&&!n.isFirstRender?t.getStateFromValue(e.value,n.guid):null},t.prototype.componentDidMount=function(){this.setAlphaSliderBackground(this.state.backgroundColor),this.state.isFirstRender&&this.setState({isFirstRender:!1})},t.prototype.componentWillUnmount=function(){var e;e=this.state.guid,delete B[e]},t.prototype.componentDidUpdate=function(e,t){t.backgroundColor!==this.state.backgroundColor&&this.setAlphaSliderBackground(this.state.backgroundColor)},t.prototype.renderRectangleDragHandle=function(){var e={};if(!this.state.isFirstRender){var t=this.getGradientRectMetrics(),n=(1-this.state.hsva.v)*t.height,r=this.state.hsva.s*t.width;e.top=n+"px",e.left=r+"px"}return i.createElement("div",{className:"k-hsv-draghandle k-draghandle",style:e})},t.prototype.handleHsvaChange=function(e,t,n){var r=R(e);if(this.isUncontrolled){var o=P(r,"hex");this.setState({hsva:e,backgroundColor:A(e.h),rgba:j(r),hex:o})}else!function(e,t,n){B[e]={value:t,hsva:n}}(this.state.guid,r,e);this.dispatchChangeEvent(r,t,n)},t.prototype.dispatchChangeEvent=function(e,t,n){this.props.onChange&&this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:n,target:this,value:e})},t.getStateFromValue=function(e,t){T(P(e,"hex"))||(e="rgba(255, 255, 255, 1)");var n=function(e,t){if(e){var n=B[e];return n&&n.value===t?n.hsva:void 0}}(t,e)||_(e),r=function(e,t){if(e){var n=B[e];return n&&n.value===t?n.rgba:void 0}}(t,e)||j(e),o=function(e,t){if(e){var n=B[e];return n&&n.value===t?n.hex:void 0}}(t,e)||P(e,"hex");return{hsva:n,backgroundColor:A(n.h),rgba:r,hex:o}},t.prototype.setAlphaSliderBackground=function(e){this.props.opacity&&this.alphaSlider&&this.alphaSlider.sliderTrack&&(this.alphaSlider.sliderTrack.style.background="linear-gradient(to top, transparent, "+e+")")},Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!0,configurable:!0}),t.prototype.getGradientRectMetrics=function(){return this.gradientWrapper.getBoundingClientRect()},t.prototype.render=function(){var e=this,t=Object(c.a)("k-colorgradient",{"k-disabled":this.props.disabled});return i.createElement("div",{id:this.props.id,className:t,"aria-disabled":this.props.disabled?"true":void 0,style:this.props.style,ref:function(t){return e.wrapper=t},tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,onFocus:this.onFocus},i.createElement("div",{className:"k-colorgradient-canvas k-hstack"},i.createElement("div",{className:"k-hsv-rectangle",style:{background:this.state.backgroundColor}},i.createElement(d.a,{onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.gradientWrapper=t?t.element:void 0}},i.createElement("div",{className:"k-hsv-gradient",style:{touchAction:"none"},onClick:this.onGradientWrapperClick},this.renderRectangleDragHandle())),this.props.backgroundColor&&!this.state.isFirstRender&&i.createElement(Ae,{metrics:this.gradientWrapper?this.getGradientRectMetrics():void 0,hsva:this.state.hsva,backgroundColor:this.props.backgroundColor})),i.createElement("div",{className:"k-hsv-controls k-hstack"},i.createElement(N,{value:this.state.hsva.h,buttons:!1,vertical:!0,min:0,max:360,step:5,onChange:this.onHueSliderChange,className:"k-hue-slider k-colorgradient-slider",disabled:this.props.disabled}),this.props.opacity&&i.createElement(N,{value:T(this.state.hsva.a)?100*this.state.hsva.a:100,buttons:!1,vertical:!0,min:0,max:100,step:1,onChange:this.onAlphaSliderChange,className:"k-alpha-slider k-colorgradient-slider",disabled:this.props.disabled,ref:function(t){return e.alphaSlider=t}}))),i.createElement(Me,{rgba:this.state.rgba,onRgbaChange:this.onRgbaChange,hex:this.state.hex,onHexChange:this.onHexChange,opacity:this.props.opacity,disabled:this.props.disabled}),this.props.backgroundColor&&i.createElement(Pe,{bgColor:j(this.props.backgroundColor),rgba:this.state.rgba}))},t.displayName="ColorGradient",t.propTypes={defaultValue:a.string,value:a.string,onChange:a.func,onFocus:a.func,opacity:a.bool,backgroundColor:a.string,disabled:a.bool,style:a.any,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={opacity:!0},t}(i.Component),Le=Object(p.a)(),Be=Object(p.b)(Le,ze);Be.displayName="KendoReactColorGradient";var Ve=function(){function e(){this.colorRows=[]}return e.prototype.setColorMatrix=function(e,t){if(this.colorRows=[],T(e)&&e.length){t=t||e.length;for(var n=0;n<e.length;n+=t){var r=e.slice(n,t+n);this.colorRows.push(r)}}},e.prototype.getCellCoordsFor=function(e){var t=this;if(T(e)){var n=e?Object(D.parseColor)(e,!0):e,r=[e];T(n)&&r.push(n.toCss(),n.toCssRgba());for(var o=function(e){for(var n=function(n){if(r.some((function(r){return r===t.colorRows[e][n]})))return{value:{row:e,col:n}}},o=0;o<i.colorRows[e].length;o++){var a=n(o);if("object"==typeof a)return a}},i=this,a=0;a<this.colorRows.length;a++){var s=o(a);if("object"==typeof s)return s.value}}},e.prototype.getColorAt=function(e){if(T(e)&&T(this.colorRows[e.row]))return this.colorRows[e.row][e.col]},e.prototype.getNextCell=function(e,t,n){if(!(T(e)&&T(e.row)&&T(e.col)))return{row:0,col:0};var r=this.clampIndex(e.row+n,this.colorRows.length-1);return{row:r,col:this.clampIndex(e.col+t,this.colorRows[r].length-1)}},e.prototype.clampIndex=function(e,t){return e<0?0:e>t?t:e},e}(),He={basic:{colors:["#000000","#7f7f7f","#880015","#ed1c24","#ff7f27","#fff200","#22b14c","#00a2e8","#3f48cc","#a349a4"," ffffff","#c3c3c3","#b97a57","#ffaec9","#ffc90e","#efe4b0","#b5e61d","#99d9ea","#7092be","#c8bfe7"],columns:10},office:{colors:["#ffffff","#000000","#e6e6e6","#435569","#4371c4","#ed7e32","#a5a4a5","#febf04","#5a9bd5","#71ae48","#f2f2f3","#7f7f7f","#d1cece","#d5dde3","#dae1f4","#fce5d4","#deeded","#fff2cc","#deeaf6","#e1efd9","#d7d8d8","#585959","#aeabab","#adbaca","#b4c5e7","#f6caac","#dbdbdb","#ffe498","#bcd6ee","#c5e0b2","#bfbfc0","#3f3f3f","#767070","#8595b1","#8fabdb","#f5b183","#c9c8c9","#fed965","#9bc4e5","#a8d08d","#a5a5a6","#262625","#393939","#334050","#2e5496","#c45a11","#7b7b7a","#bf9000","#2f75b5","#548235","#7f7f7f","#0b0c0c","#161616","#222a34","#203764","#843d0b","#525252","#7f6000","#1d4d79","#375623"],columns:10},apex:{colors:["#ffffff","#000000","#c9c2d1","#69676d","#ceb966","#9cb084","#6bb1c9","#6585cf","#7e6bc9","#a379bb","#f2f2f2","#7f7f7f","#f4f2f5","#e0e0e2","#f5f1e0","#ebefe6","#e1eff4","#e0e6f5","#e5e1f4","#ece4f1","#d8d8d8","#595959","#e9e6ec","#c2c1c5","#ebe3c1","#d7dfcd","#c3dfe9","#c1ceeb","#cbc3e9","#dac9e3","#bfbfbf","#3f3f3f","#dedae3","#a4a3a8","#e1d5a3","#c3cfb5","#a6d0de","#a2b5e2","#b1a6de","#c7aed6","#a5a5a5","#262626","#9688a5","#4e4d51","#ae9638","#758c5a","#3d8da9","#365bb0","#533da9","#7d4d99","#7f7f7f","#0c0c0c","#635672","#343336","#746425","#4e5d3c","#295e70","#243c75","#372970","#533366"],columns:10},austin:{colors:["#ffffff","#000000","#caf278","#3e3d2d","#94c600","#71685a","#ff6700","#909465","#956b43","#fea022","#f2f2f2","#7f7f7f","#f4fce4","#dddcd0","#efffc0","#e3e1dc","#ffe0cb","#e8e9df","#ece1d6","#feecd2","#d8d8d8","#595959","#e9f9c9","#bbb9a1","#dfff82","#c8c3ba","#ffc299","#d2d4c0","#dac3ad","#fed9a6","#bfbfbf","#3f3f3f","#dff7ae","#ada598","#cfff43","#ada598","#ffa365","#bcbfa1","#c8a585","#fec67a","#a5a5a5","#262626","#a9ea25","#2e2d21","#6f9400","#544e43","#bf4d00","#6c6f4b","#6f5032","#d77b00","#7f7f7f","#0c0c0c","#74a50f","#1f1e16","#4a6300","#38342d","#7f3300","#484a32","#4a3521","#8f5200"],columns:10},clarity:{colors:["#ffffff","#292934","#f3f2dc","#d2533c","#93a299","#ad8f67","#726056","#4c5a6a","#808da0","#79463d","#f2f2f2","#e7e7ec","#e7e5b9","#f6dcd8","#e9ecea","#eee8e0","#e4dedb","#d8dde3","#e5e8ec","#e9d6d3","#d8d8d8","#c4c4d1","#d5d185","#edbab1","#d3d9d6","#ded2c2","#c9beb8","#b2bcc8","#ccd1d9","#d3aea7","#bfbfbf","#8a8aa3","#aca73b","#e4978a","#bec7c1","#cdbba3","#af9e94","#8c9bac","#b2bac6","#bd857c","#a5a5a5","#56566e","#56531d","#a43925","#6b7c72","#866b48","#554840","#39434f","#5c697b","#5a342d","#7f7f7f","#3b3b4b","#22210b","#6d2619","#47534c","#594730","#39302b","#262d35","#3d4652","#3c231e"],columns:10},slipstream:{colors:["#ffffff","#000000","#b4dcfa","#212745","#4e67c8","#5eccf3","#a7ea52","#5dceaf","#ff8021","#f14124","#f2f2f2","#7f7f7f","#8bc9f7","#c7cce4","#dbe0f4","#def4fc","#edfadc","#def5ef","#ffe5d2","#fcd9d3","#d8d8d8","#595959","#4facf3","#909aca","#b8c2e9","#beeafa","#dbf6b9","#beebdf","#ffcca6","#f9b3a7","#bfbfbf","#3f3f3f","#0d78c9","#5967af","#94a3de","#9ee0f7","#caf297","#9de1cf","#ffb279","#f68d7b","#a5a5a5","#262626","#063c64","#181d33","#31479f","#11b2eb","#81d319","#34ac8b","#d85c00","#c3260c","#7f7f7f","#0c0c0c","#021828","#101322","#202f6a","#0b769c","#568c11","#22725c","#903d00","#821908"],columns:10},metro:{colors:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],columns:10},flow:{colors:["#ffffff","#000000","#dbf5f9","#04617b","#0f6fc6","#009dd9","#0bd0d9","#10cf9b","#7cca62","#a5c249","#f2f2f2","#7f7f7f","#b2e9f2","#b4ecfc","#c7e2fa","#c4eeff","#c9fafc","#c9faed","#e4f4df","#edf2da","#d8d8d8","#595959","#76d9e8","#6adafa","#90c6f6","#89deff","#93f5f9","#94f6db","#cae9c0","#dbe6b6","#bfbfbf","#3f3f3f","#21b2c8","#20c8f7","#59a9f2","#4fceff","#5df0f6","#5ff2ca","#b0dfa0","#c9da91","#a5a5a5","#262626","#105964","#02485c","#0b5394","#0075a2","#089ca2","#0b9b74","#54a838","#7e9532","#7f7f7f","#0c0c0c","#062328","#01303d","#073763","#004e6c","#05686c","#07674d","#387025","#546321"],columns:10},hardcover:{colors:["#ffffff","#000000","#ece9c6","#895d1d","#873624","#d6862d","#d0be40","#877f6c","#972109","#aeb795","#f2f2f2","#7f7f7f","#e1dca5","#f2e0c6","#f0d0c9","#f6e6d5","#f5f2d8","#e7e5e1","#fbc7bc","#eef0e9","#d8d8d8","#595959","#d0c974","#e6c28d","#e2a293","#eeceaa","#ece5b2","#cfccc3","#f78f7a","#dee2d4","#bfbfbf","#3f3f3f","#a29a36","#daa454","#d4735e","#e6b681","#e2d88c","#b7b2a5","#f35838","#ced3bf","#a5a5a5","#262626","#514d1b","#664515","#65281a","#a2641f","#a39428","#655f50","#711806","#879464","#7f7f7f","#0c0c0c","#201e0a","#442e0e","#431b11","#6c4315","#6d621a","#433f35","#4b1004","#5a6243"],columns:10},trek:{colors:["#ffffff","#000000","#fbeec9","#4e3b30","#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529","#f2f2f2","#7f7f7f","#f7e09e","#e1d6cf","#fcecd5","#eddfda","#f0e7e5","#f3eae1","#ece9e3","#f5e3d1","#d8d8d8","#595959","#f3cc5f","#c4ad9f","#f9d9ab","#dcc0b6","#e1d0cc","#e7d5c4","#d9d4c7","#ebc7a3","#bfbfbf","#3f3f3f","#d29f0f","#a78470","#f6c781","#cba092","#d2b9b2","#dbc1a7","#c6bfab","#e1ac76","#a5a5a5","#262626","#694f07","#3a2c24","#c87d0e","#7b4b3a","#926255","#a17242","#7b7153","#90571e","#7f7f7f","#0c0c0c","#2a1f03","#271d18","#855309","#523226","#614138","#6b4c2c","#524b37","#603a14"],columns:10},verve:{colors:["#ffffff","#000000","#d2d2d2","#666666","#ff388c","#e40059","#9c007f","#68007f","#005bd3","#00349e","#f2f2f2","#7f7f7f","#bdbdbd","#e0e0e0","#ffd7e8","#ffc6dc","#ffb8f1","#f1b2ff","#c3dcff","#b8cfff","#d8d8d8","#595959","#9d9d9d","#c1c1c1","#ffafd1","#ff8eba","#ff71e4","#e365ff","#87baff","#72a0ff","#bfbfbf","#3f3f3f","#696969","#a3a3a3","#ff87ba","#ff5597","#ff2ad7","#d519ff","#4b98ff","#2b71ff","#a5a5a5","#262626","#343434","#4c4c4c","#e90062","#ab0042","#75005f","#4e005f","#00449e","#002676","#7f7f7f","#0c0c0c","#151515","#333333","#9b0041","#72002c","#4e003f","#34003f","#002d69","#00194f"],columns:10},monochrome:{colors:["#000000","#1a1a1a","#333333","#4d4d4d","#666666","#808080","#999999","#b3b3b3","#cccccc","#e6e6e6","#f2f2f2","#ffffff"],columns:12}},Ke=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),We=function(e){function t(t){var n=e.call(this,t)||this;return n.wrapper=null,n.guid=Object(l.a)(),n.focus=function(){n.wrapper&&n.wrapper.focus()},n.onKeyDown=function(e){switch(e.keyCode){case m.a.down:n.handleCellNavigation(0,1);break;case m.a.up:n.handleCellNavigation(0,-1);break;case m.a.right:n.handleCellNavigation(1,0);break;case m.a.left:n.handleCellNavigation(-1,0);break;case m.a.enter:n.handleEnter(e);break;default:return}e.preventDefault()},n.onColorClick=function(e,t){n.isUncontrolled?n.setState({selectedColor:e,focusedColor:e}):n.setState({focusedColor:e}),n.dispatchChangeEvent(e,t)},n.onFocus=function(e){n.setState({focusedColor:n.state.selectedColor||n.paletteService.colorRows[0][0]}),n.props.onFocus&&n.props.onFocus.call(void 0,{nativeEvent:e,target:n})},n.onBlur=function(){n.setState({focusedColor:void 0})},Object(f.a)(h),n.state={selectedColor:void 0!==n.props.value?n.props.value:n.props.defaultValue,isFirstRender:!0},n}return Ke(t,e),t.prototype.render=function(){var e=this,t=this.getPaletteInfo(),n=this.paletteService=new Ve;n.setColorMatrix(t.colors,t.columns);var r=n.getCellCoordsFor(this.state.selectedColor),o=n.getCellCoordsFor(this.state.focusedColor),a=Object(c.a)("k-colorpalette",{"k-disabled":this.props.disabled});return t.colors.length?i.createElement("div",{id:this.props.id,className:a,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,"aria-disabled":this.props.disabled?"true":void 0,"aria-activedescendant":r&&this.createCellId(r),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled),ref:function(t){return e.wrapper=t}},i.createElement("div",{className:"k-colorpalette-table-wrap",role:"grid"},i.createElement("table",{className:"k-colorpalette-table k-palette",role:"presentation"},i.createElement("tbody",null,this.renderRows(n.colorRows,r,o))))):""},t.getDerivedStateFromProps=function(e,t){if(t.isFirstRender||void 0===e.value){if(t.isFirstRender)return{isFirstRender:!1}}else{if(""===e.value&&void 0!==t.selectedColor)return{selectedColor:void 0};if(""!==e.value&&e.value!==t.selectedColor)return{selectedColor:e.value}}return null},t.prototype.handleCellNavigation=function(e,t){if(this.focusedColorCooridanates){var n=this.paletteService.getNextCell(this.focusedColorCooridanates,e,t);this.setState({focusedColor:this.paletteService.getColorAt(n)})}else this.setState({focusedColor:this.paletteService.colorRows[0][0]})},t.prototype.handleEnter=function(e){this.isUncontrolled&&this.setState({selectedColor:this.state.focusedColor}),this.dispatchChangeEvent(this.state.focusedColor,e)},t.prototype.dispatchChangeEvent=function(e,t){Object(v.a)(this.props.onChange,t,this,{value:e,rgbaValue:P(e,"rgba")})},Object.defineProperty(t.prototype,"focusedColorCooridanates",{get:function(){return this.state.focusedColor?this.paletteService.getCellCoordsFor(this.state.focusedColor):void 0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUncontrolled",{get:function(){return void 0===this.props.value},enumerable:!0,configurable:!0}),t.prototype.getPaletteInfo=function(){if("string"==typeof this.props.palette){var e=He[this.props.palette];return T(e)?{colors:e.colors,columns:this.props.columns||e.columns||10}:{colors:[],columns:0}}return{colors:this.props.palette||[],columns:this.props.columns||10}},t.prototype.renderRows=function(e,t,n){var r=this;return e.map((function(e,o){return i.createElement("tr",{role:"row",key:o},r.renderColumns(e,o,t,n))}))},t.prototype.renderColumns=function(e,t,n,r){var o=this,a=void 0!==n&&n.row===t,s=n&&n.col,l=void 0!==r&&r.row===t,u=r&&r.col,d="number"!=typeof this.props.tileSize?this.props.tileSize:{width:this.props.tileSize,height:this.props.tileSize},p=d.width+"px",f=d.height+"px";return e.map((function(e,n){var r=a&&s===n,d=Object(c.a)("k-colorpalette-tile",{"k-selected":r,"k-focus":l&&u===n});return i.createElement("td",{className:d,"aria-label":e,"aria-selected":!!r||!!o.props.disabled&&void 0,style:{backgroundColor:e,width:p,height:f,minWidth:p},onClick:function(t){return o.onColorClick(e,t)},id:o.createCellId({row:t,col:n}),key:n})}))},t.prototype.createCellId=function(e){return this.guid+"_"+e.row+"_"+e.col},t.displayName="ColorPalette",t.propTypes={palette:a.oneOfType([a.arrayOf(a.string.isRequired),a.string]),columns:a.number,tileSize:a.any,defaultValue:a.string,value:a.string,disabled:a.bool,tabIndex:a.number,onChange:a.func,onFocus:a.func,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string},t.defaultProps={palette:"office",tileSize:24},t}(i.Component),$e=Object(p.a)(),qe=Object(p.b)($e,We);qe.displayName="KendoReactColorPalette";var Ue=n(47),Ge=function(){return(Ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Xe=function(e){var t=e.popupSettings||{},n="rtl"===e.dir?"right":"left",r=i.useMemo((function(){return{horizontal:n,vertical:"bottom"}}),[n]),o=i.useMemo((function(){return{horizontal:n,vertical:"top"}}),[n]);return i.createElement(i.Fragment,null,e.input,e.button,i.createElement(Ue.a,Ge({style:Ge({},(t||{}).style,{direction:e.dir})},t,{anchor:e.popupAnchor,anchorAlign:r,popupAlign:o,show:e.open,onOpen:e.onOpen,onClose:e.onClose,className:Object(c.a)("k-reset",t.className)}),e.content))};Xe.displayName="KendoPickerComponent";var Je=function(){return(Je=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ye={palette:"office",tileSize:24},Ze=function(e){return void 0!==e},Qe=Object(p.a)(),et=i.forwardRef((function(e,t){var n,r;Object(f.a)(h);var o=Object(V.a)(Qe,e),a=Object(g.useLocalization)(),s=o.size,l=void 0===s?tt.size:s,d=o.rounded,p=void 0===d?tt.rounded:d,v=o.fillMode,k=void 0===v?tt.fillMode:v,w=o.popupSettings,C=o.gradientSettings,x=o.paletteSettings,S=o.valid,E=o.disabled,I=o.tabIndex,N=o.view,T=o.icon,M=o.iconClassName,D=o.onChange,P=o.onFocus,_=o.onBlur,j=o.onActiveColorClick,R=i.useRef(null),A=i.useRef(null),F=i.useRef(null),z=i.useRef(),L=i.useRef(null),B=i.useCallback((function(){R.current&&R.current.focus()}),[]);i.useImperativeHandle(t,(function(){return{element:R.current,actionElement:L.current,focus:B}}));var K=i.useState(!1),W=K[0],$=K[1],q=i.useState(o.defaultValue),U=q[0],G=q[1],X=i.useState(!1),J=X[0],Y=X[1],Z=Ze(o.value),Q=Ze(o.open),ee=Z?o.value:U,te=Q?o.open:J,ne=i.useCallback((function(e,t){Q||(!e&&!t&&R&&R.current&&R.current.focus(),Y(e))}),[Q]),re=i.useCallback((function(e){var t=e.altKey,n=e.keyCode;if(n!==m.a.esc)return n!==m.a.enter||Q?void(!t||n!==m.a.up&&n!==m.a.down||(e.preventDefault(),e.stopPropagation(),n===m.a.up&&R&&R.current&&(R.current.focus(),ne(!1)),n===m.a.down&&ne(!0))):(e.preventDefault(),e.stopPropagation(),void ne(!te));ne(!1)}),[te,Q]),oe=i.useCallback((function(){Q||(A.current?A.current.focus():F.current&&F.current.focus())}),[Q]),ie=i.useCallback((function(){ne(!te,!0)}),[te]),ae=i.useCallback((function(e){j&&j.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:ee})}),[j,ee]),se=i.useCallback((function(e){z.current?(clearTimeout(z.current),z.current=void 0):$(!0),P&&P.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[P]),le=i.useCallback((function(){ne(!1,!0),$(!1),z.current=void 0}),[]),ce=i.useCallback((function(e){clearTimeout(z.current),z.current=window.setTimeout(le),_&&_.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[_]),ue=i.useCallback((function(e,t){var n=t?e.rgbaValue:e.value;Z||G(n),t&&ne(!1),D&&D.call(void 0,{value:n,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent})}),[Z,D]),de=i.useCallback((function(e){return ue(e,!0)}),[Ze,ue]),pe=Object(b.a)(R,o.dir),fe=!1!==S;return i.createElement("span",{id:o.id,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,className:Object(c.a)("k-colorpicker","k-picker","k-icon-picker",(n={},n["k-picker-"+(H.a.sizeMap[l]||l)]=l,n["k-picker-"+k]=k,n["k-rounded-"+(H.a.roundedMap[p]||p)]=p,n["k-invalid"]=!fe,n["k-disabled"]=E,n["k-focus"]=W,n)),ref:R,tabIndex:Object(u.a)(I,E),title:o.title,onKeyDown:re,onFocus:se,onBlur:ce,dir:pe},i.createElement(Xe,{dir:pe,open:te,onOpen:oe,popupAnchor:R.current||void 0,popupSettings:Je({},w),input:i.createElement("span",{onClick:ae,className:"k-input-inner"},i.createElement("span",{className:Object(c.a)("k-value-icon","k-color-preview",{"k-no-color":!ee,"k-icon-color-preview":T||M})},(M||T)&&i.createElement("span",{className:Object(c.a)("k-color-preview-icon",M,(r={},r["k-icon k-i-"+T]=T&&!M,r))}),i.createElement("span",{className:"k-color-preview-mask",style:{backgroundColor:ee}}))),button:i.createElement(O.a,{tabIndex:-1,type:"button",onClick:ie,className:"k-input-button",rounded:null,icon:"arrow-s","aria-label":a.toLanguageString("colorPicker.dropdownButtonAriaLabel",y["colorPicker.dropdownButtonAriaLabel"])}),content:i.createElement(i.Fragment,null,("combo"===N||"gradient"===N)&&i.createElement(Be,Je({},C,{tabIndex:0,ref:A,value:ee,onChange:ue})),("combo"===N||"palette"===N)&&i.createElement(qe,Je({},x,{ref:F,value:ee,onChange:de})))}))}));et.propTypes={value:a.string,defaultValue:a.string,disabled:a.bool,view:a.oneOf(["gradient","palette","combo"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])};var tt={size:"medium",rounded:"medium",fillMode:"solid",view:"palette",gradientSettings:{opacity:!0},paletteSettings:Ye};et.defaultProps=tt,et.displayName="KendoColorPicker";var nt,rt=n(51),ot=i.forwardRef((function(e,t){Object(f.a)(h);var n=i.useRef(null),r=i.useRef(null),o=i.useRef(null),a=i.useState("ColorGradient"===(e.view||"ColorGradient")),s=a[0],l=a[1],d=i.useState("rgba(255, 255, 255, 1)"),p=d[0],m=d[1],v=i.useState("rgba(255, 255, 255, 1)"),g=v[0],b=v[1],k=i.useCallback((function(){n.current&&n.current.focus()}),[n]);i.useImperativeHandle(n,(function(){return{element:r.current,focus:k,props:e}})),i.useImperativeHandle(t,(function(){return n.current}));var w=i.useCallback((function(e){("ColorGradient"===e&&!s||"ColorPalette"===e&&s)&&l(!s)}),[s]),C=i.useCallback((function(){m("rgba(255, 255, 255, 1)")}),[]),x=i.useCallback((function(e){m(e.value)}),[]),S=i.useCallback((function(){b(p)}),[p]),E=i.useCallback((function(){b("rgba(255, 255, 255, 1)")}),[]),I=i.useCallback((function(){m(g)}),[g]),N=i.useCallback((function(){r.current&&r.current.focus()}),[r]),T=i.useCallback((function(){b(p)}),[p]);return i.createElement("div",{id:e.id,style:e.style,ref:r,tabIndex:Object(u.a)(e.tabIndex,e.disabled),className:Object(c.a)("k-flatcolorpicker k-coloreditor",{"k-disabled":e.disabled},e.className),onBlur:T},e.header||i.createElement("div",{className:"k-coloreditor-header k-hstack"},i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},i.createElement(rt.a,null,i.createElement(O.a,{type:"button",togglable:!0,fillMode:"flat",selected:s,onClick:function(){return w("ColorGradient")}},i.createElement("span",{className:"k-icon k-i-color-canvas"})),i.createElement(O.a,{type:"button",togglable:!0,fillMode:"flat",selected:!s,onClick:function(){return w("ColorPalette")}},i.createElement("span",{className:"k-icon k-i-palette"})))),i.createElement("div",{className:"k-spacer"}),i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},e.showClearButton&&at.showClearButton&&i.createElement(O.a,{type:"button",fillMode:"flat",onClick:C},i.createElement("span",{className:"k-icon k-i-reset-color"})),e.showPreview&&at.showPreview&&i.createElement("div",{className:"k-coloreditor-preview k-vstack"},i.createElement("span",{className:"k-coloreditor-preview-color k-color-preview",style:{background:p}}),i.createElement("span",{className:"k-coloreditor-current-color k-color-preview",style:{background:g},onClick:I})))),i.createElement("div",{className:"k-coloreditor-views k-vstack"},s?i.createElement(Be,{ref:o,value:p,onChange:x,onFocus:N}):i.createElement(qe,{value:p,onChange:x,onFocus:N})),e.showButtons&&at.showButtons&&i.createElement("div",{className:"k-coloreditor-footer k-actions k-actions-end"},i.createElement(O.a,{type:"button",className:"k-coloreditor-cancel",onClick:E},y["flatColorPicker.cancelBtn"]),i.createElement(O.a,{type:"button",className:"k-coloreditor-apply k-primary",onClick:S},y["flatColorPicker.applyBtn"])))})),it={id:a.string,value:a.string,view:a.string,header:a.elementType,showClearButton:a.bool,showPreview:a.bool,showButtons:a.bool},at={showClearButton:!0,showPreview:!0,showButtons:!0};ot.displayName="KendoFlatColorPicker",ot.propTypes=it,ot.defaultProps=at,function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(nt||(nt={}));var st=function(){function e(e,t,n){void 0===n&&(n=nt.Undefined),this.value=e,this.rest=t,this.type=n}return e.prototype.map=function(t){return new e(t(this.value),this.rest)},e.prototype.chain=function(e){return e(this.value,this.rest)},e.prototype.fold=function(e,t){return e(this.value,this.rest)},e.prototype.concat=function(e){return this.map((function(t,n){return e.chain((function(e,n){return t.concat([e])}))}))},e.prototype.toString=function(){return"Result({ value: '"+this.value+"', rest: "+this.rest+" })"},e}(),lt=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.input=e,this.control=t,this.inputCursor=0,this.controlCursor=0}return e.prototype.eof=function(){return this.inputCursor>=this.input.length},e.prototype.next=function(){return{char:this.input[this.inputCursor++],control:this.control[this.controlCursor++]}},e.prototype.peek=function(){return{char:this.input[this.inputCursor],control:this.control[this.controlCursor]}},e.prototype.eat_input=function(){this.inputCursor++},e.prototype.eat_control=function(){this.controlCursor++},e.prototype.eat=function(){this.inputCursor++,this.controlCursor++},e}(),ct=function(e){return(e||"").split("")},ut=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof lt?this.parse(e):this.parse(new lt(ct(e),ct(t)))},e.prototype.map=function(t){var n=this;return new e((function(e){return n.parse(e).map(t)}))},e.prototype.chain=function(t){var n=this;return new e((function(e){return n.parse(e).chain((function(e,n){return t(e).run(n)}))}))},e.prototype.isLiteral=function(e){return this.run(e).type===nt.Literal},e}(),dt=function(e,t){return new ut((function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new st(t.literal(r),n)):new st(o?t.mask(o):t.literal(r),n)}))},pt=function(e){var t=e.prompt,n=e.promptPlaceholder;return new ut((function(e){var r=e.next().char;return new st(r===t?n:r,e)}))},ft=function(e){return new ut((function(t){var n=t.next().char;return new st(e?n:"",t)}))},ht=function(e){return e.reduce((function(e,t){return n=t,e.chain((function(e){return n.map((function(t){return e.concat([t])}))}));var n}),(t=[],new ut((function(e){return new st(t,e)}))));var t},mt=function(e){return new ut((function(t){for(var n=new st([],t);!t.eof();)n=n.concat(e.run(t));return n}))},vt=function(){function e(){this.rules={},this.prompt="_",this.mask="",this.promptPlaceholder=" ",this.includeLiterals=!1,this.maskTokens=[],this.unmaskTokens=[],this.rawTokens=[],this.validationTokens=[]}return e.prototype.update=function(e){var t=e.mask,n=void 0===t?"":t,r=e.prompt,o=void 0===r?"":r,i=e.promptPlaceholder,a=void 0===i?" ":i,s=e.rules,l=void 0===s?{}:s,c=e.includeLiterals,u=void 0!==c&&c;this.mask=n,this.prompt=o,this.promptPlaceholder=a,this.rules=l,this.includeLiterals=u,this.tokenize()},e.prototype.validationValue=function(e){void 0===e&&(e="");var t=e;return ht(this.validationTokens).run(e).fold((function(e){t=e.join("")})),t},e.prototype.rawValue=function(e){void 0===e&&(e="");var t=e;return this.rawTokens.length?(ht(this.rawTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskRaw=function(e){void 0===e&&(e="");var t=e;return this.maskTokens.length?(ht(this.maskTokens).run(e).fold((function(e){t=e.join("")})),t):t},e.prototype.maskInput=function(e,t,n){return e.length<t.length?this.maskRemoved(e,t,n):this.maskInserted(e,t,n)},e.prototype.maskInRange=function(e,t,n,r){var o="",i=r,a=t.split("").slice(0,n),s=t.split("").slice(r);return ht(this.maskTokens.slice(n,r)).run(e).fold((function(e){o=a.concat(e).concat(s).join("")})),{selection:i,value:o}},e.prototype.maskRemoved=function(e,t,n){var r=this,o="",i=n,a=e.split("").slice(n),s=e.split("").slice(0,n).join(""),l=this.maskTokens.length-(e.length-n);return ht(this.maskTokens.slice(0,l)).run(s,t).fold((function(e){i=r.adjustPosition(e,i),o=e.concat(a).join("")})),{selection:i,value:o}},e.prototype.adjustPosition=function(e,t){var n=e[t];return this.maskTokens[t].isLiteral(n)||n===this.prompt?t:t+1},e.prototype.maskInserted=function(e,t,n){var r=this,o="",i=n,a=e.slice(0,n);return ht(this.unmaskTokens).run(a,t).chain((function(e){i=e.join("").length;var n=t.slice(i);return ht(r.maskTokens).run(e.join("")+n,t)})).fold((function(e){o=e.join("")})),{selection:i,value:o}},Object.defineProperty(e.prototype,"maskTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder;return{literal:function(e){return t=e,new ut((function(e){return e.peek().char===t?(e.eat(),new st(t,e,nt.Literal)):new st(t,e,nt.Literal)}));var t},mask:function(n){return function(e){var t=e.prompt,n=e.promptPlaceholder;return function(e){return new ut((function(r){for(;!r.eof();){var o=r.peek(),i=o.char,a=o.control;if(i===a&&a===t)return r.eat(),new st(t,r,nt.Mask);if(e.test(i))return r.eat(),new st(i,r,nt.Mask);if(i===n)return r.eat(),new st(t,r,nt.Mask);r.eat_input()}return r.eat(),new st(t,r,nt.Mask)}))}}({prompt:e,promptPlaceholder:t})(n)}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unmaskTokenCreator",{get:function(){var e=this;return{literal:function(e){return t=e,new ut((function(e){return e.eof()?new st("",e):(e.peek().char===t&&e.eat(),new st(t,e))}));var t},mask:function(t){return(n=e.prompt,function(e){return new ut((function(t){for(;!t.eof();){var r=t.peek(),o=r.char,i=r.control;if(o===n&&i===n)return t.eat(),new st(o,t);if(e.test(o))return t.eat(),new st(o,t);t.eat_input()}return t.eat(),new st("",t)}))})(t);var n}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawTokenCreator",{get:function(){var e=this.prompt,t=this.promptPlaceholder,n=this.includeLiterals;return{literal:function(e){return ft(n)},mask:function(n){return pt({prompt:e,promptPlaceholder:t})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return ft(!1)},mask:function(t){return pt({prompt:e,promptPlaceholder:""})}}},enumerable:!0,configurable:!0}),e.prototype.tokenize=function(){var e=this;mt(dt(this.rules,this.maskTokenCreator)).run(this.mask).fold((function(t,n){e.maskTokens=t})),mt(dt(this.rules,this.unmaskTokenCreator)).run(this.mask).fold((function(t,n){e.unmaskTokens=t})),mt(dt(this.rules,this.rawTokenCreator)).run(this.mask).fold((function(t,n){e.rawTokens=t})),mt(dt(this.rules,this.validationTokenCreator)).run(this.mask).fold((function(t,n){e.validationTokens=t}))},e}(),gt={"#":/[\d\s\+\-]/,"&":/[\S]/,0:/[\d]/,9:/[\d\s]/,"?":/[a-zA-Z\s]/,A:/[a-zA-Z0-9]/,C:/./,L:/[a-zA-Z]/,a:/[a-zA-Z0-9\s]/},yt=function(){return!1},bt=function(e,t){if(!!e!=!!t)return!1;if(e===t||!e||!t)return!0;var n=!0;for(var r in e)if(e[r]!==t[r]){n=!1;break}if(n)for(var r in t)if(!e.hasOwnProperty(r)){n=!1;break}return n},kt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(){return(wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ct=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._inputId="k-"+Object(l.a)(),n._service=new vt,n._isPasted=!1,n._selection=[null,null],n._input=null,n.focus=function(){n._input&&n._input.focus()},n.pasteHandler=function(e){var t=e.target,r=t.selectionStart,o=t.selectionEnd;o!==r&&(n._isPasted=!0,n._selection=[r||0,o||0])},n.onChangeHandler=function(e){var t=e.currentTarget,r=t.value,o=n._selection[0]||0,i=n._selection[1]||0;if(!n.props.mask)return n._isPasted=!1,n._selection=[null,null],void n.triggerOnChange(r,e);var a,s=n.value;if(n._isPasted){n._isPasted=!1;var l=s.length-i,c=r.length-l;a=n._service.maskInRange(r.slice(o,c),s,o,i)}else a=n._service.maskInput(r,s,t.selectionStart||0);n._selection=[a.selection,a.selection],n.triggerOnChange(a.value,e)},n.focusHandler=function(e){n.state.focused||(n.setState({focused:!0}),n.props.onFocus&&n.props.onFocus.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.blurHandler=function(e){n.state.focused&&(n.setState({focused:!1}),n.props.onBlur&&n.props.onBlur.call(void 0,{target:n,syntheticEvent:e,nativeEvent:e.nativeEvent}))},n.setValidity=function(){n.element&&n.element.setCustomValidity(n.validity.valid?"":n.props.validationMessage||"")},Object(f.a)(h),n}return kt(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this._valueDuringOnChange?this._valueDuringOnChange:void 0!==this.props.value?this.props.value:void 0!==this.state.value?this.state.value:void 0!==this.props.defaultValue?this.props.defaultValue:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this._service.rawValue(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=this.value,t=this._service.validationValue(e);return{customError:void 0!==this.props.validationMessage,valid:void 0!==this.props.valid?this.props.valid:!(this.required&&!t||this.props.maskValidation&&this.props.prompt&&-1!==e.indexOf(this.props.prompt)),valueMissing:!t}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e,t){if(this.element&&this.state.focused&&t.focused){var n=this._selection,r=n[0],o=n[1],i=e.selection,a=this.props.selection;(!i&&a||i&&a&&(i.start!==a.start||i.end!==a.end))&&(r=a.start,o=a.end),null!==r&&null!==o&&this.element.setSelectionRange(r,o)}var s,l;s=e,l=this.props,s.includeLiterals===l.includeLiterals&&s.mask===l.mask&&s.prompt===l.prompt&&s.promptPlaceholder===l.promptPlaceholder&&bt(s.rules,l.rules)||this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e,n=this,r=this.props,o=r.size,a=void 0===o?t.defaultProps.size:o,s=r.fillMode,l=void 0===s?t.defaultProps.fillMode:s,d=r.rounded,p=void 0===d?t.defaultProps.rounded:d,f=this.props.id||this._inputId,h=!this.validityStyles||this.validity.valid,m=this.props.style||{},v=i.createElement("span",{dir:this.props.dir,className:Object(c.a)("k-maskedtextbox k-input",(e={},e["k-input-"+(H.a.sizeMap[a]||a)]=a,e["k-input-"+l]=l,e["k-rounded-"+(H.a.roundedMap[p]||p)]=p,e["k-invalid"]=!h,e["k-required"]=this.required,e["k-disabled"]=this.props.disabled,e),this.props.className),style:this.props.label?m:wt({width:this.props.width},m)},i.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-input-inner",value:this.value,id:f,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,name:this.props.name,tabIndex:Object(u.a)(this.props.tabIndex,this.props.disabled,!0),accessKey:this.props.accessKey,title:this.props.title,disabled:this.props.disabled||void 0,readOnly:this.props.readonly||void 0,placeholder:this.props.placeholder,ref:function(e){return n._input=e},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:yt,onDrop:yt}));return this.props.label?i.createElement(K.a,{label:this.props.label,editorId:f,editorValue:this.value,editorValid:h,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:v,style:{width:this.props.width},dir:this.props.dir}):v},t.prototype.triggerOnChange=function(e,t){this.setState({value:e}),this.props.onChange&&(this._valueDuringOnChange=e,this.props.onChange.call(void 0,{syntheticEvent:t,nativeEvent:t.nativeEvent,selectionStart:this._selection[0],selectionEnd:this._selection[1],target:this,value:this.value}),this._valueDuringOnChange=void 0)},t.prototype.updateService=function(e){var t=Object.assign({includeLiterals:this.props.includeLiterals,mask:this.props.mask,prompt:this.props.prompt,promptPlaceholder:this.props.promptPlaceholder,rules:this.rules},e);this._service.update(t)},Object.defineProperty(t.prototype,"rules",{get:function(){return Object.assign({},gt,this.props.rules)},enumerable:!0,configurable:!0}),t.displayName="MaskedTextBox",t.propTypes={value:a.string,defaultValue:a.string,placeholder:a.string,title:a.string,dir:a.string,id:a.string,style:a.object,className:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,width:a.oneOfType([a.string,a.number]),tabIndex:a.number,accessKey:a.string,disabled:a.bool,readonly:a.bool,prompt:a.string,promptPlaceholder:a.string,includeLiterals:a.bool,maskValidation:a.bool,mask:a.string,rules:function(e,t,n){var r=e.rules;if(void 0!==r&&!Object.entries(r).some((function(e){return"string"!=typeof e||!(r[e]instanceof RegExp)})))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Validation failed.");return null},selection:a.shape({start:a.number.isRequired,end:a.number.isRequired}),name:a.string,label:a.string,validationMessage:a.string,required:a.bool,valid:a.bool,validityStyles:a.bool,onChange:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:gt,required:!1,validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},t}(i.Component),Ot=Object(p.a)(),xt=Object(p.b)(Ot,Ct);xt.displayName="KendoReactMaskedTextBox";var St,Et=n(48),It=function(){return(It=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e.start="start",e.end="end",e.min="min",e.max="max",e.increase="increase",e.decrease="decrease"}(St||(St={}));var Nt=function(){return(Nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Tt=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1],s=i.useCallback((function(e){var r=function(e,t){var n,r;switch(t.type){case St.start:if(void 0===t.payload)return e;n={start:t.payload>e.end?e.end:Math.max(t.payload,t.min),end:e.end};break;case St.end:if(void 0===t.payload)return e;n={start:e.start,end:t.payload<e.start?e.start:Math.min(t.payload,t.max)};break;case St.min:n="start"===t.key?It({},e,{start:t.min}):It({},e,{end:Math.max(t.min,e.start)});break;case St.max:n="start"===t.key?It({},e,{start:Math.min(t.max,e.end)}):It({},e,{end:t.max});break;case St.increase:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]+t.step,n="start"===t.key?r<t.min?It({},e,{start:t.min}):It({},e,{start:Math.min(r,e.end)}):r>t.max?It({},e,{end:t.max}):It({},e,{end:Math.max(r,e.start)});break;case St.decrease:if(void 0===t.step||void 0===t.key)return e;r=e[t.key]-t.step,n="start"===t.key?r<t.min?It({},e,{start:t.min}):It({},e,{start:Math.min(r,e.end)}):r>t.max?It({},e,{end:t.max}):It({},e,{end:Math.max(r,e.start)});break;default:n=e}return n}(t.state||o,Nt({},e,t));n&&n(r,e.event),a(r)}),[t,n]);return[o,s]},Mt=Object(p.a)(),Dt=i.forwardRef((function(e,t){var n,r;Object(f.a)(h);var o=Object(V.a)(Mt,e),a=i.useRef(null),s=i.useRef(null),l=i.useRef(null),d=i.useRef(null),p=i.useRef(null),v=i.useCallback((function(){d.current&&d.current.focus()}),[d]);i.useImperativeHandle(a,(function(){return{element:s.current,focus:v,props:o}})),i.useImperativeHandle(t,(function(){return a.current}));var k=i.useMemo((function(){return o.min}),[o.min]),w=i.useMemo((function(){return o.max}),[o.max]),C=i.useMemo((function(){return void 0!==o.step?o.step:_t.step}),[o.step,_t.step]),O=Object(b.a)(s,o.dir),x=i.useState(""),S=x[0],E=x[1],I=Tt(o.defaultValue||_t.defaultValue,{min:k,max:w,step:C,state:o.value},(function(e,t){o.onChange&&a.current&&o.onChange.call(void 0,{value:e,target:a.current,syntheticEvent:t})})),N=I[0],T=I[1],M=i.useMemo((function(){return o.value||N}),[o.value,N]),D=i.useRef(null),P=i.useRef(null),_=i.useMemo((function(){return(M.start-k)/(w-k)*100}),[M.start,k,w]),j=i.useMemo((function(){return(M.end-k)/(w-k)*100}),[M.end,k,w]),R=i.useMemo((function(){return o.vertical?{paddingTop:0,height:"100%"}:{}}),[o.vertical]),A=i.useMemo((function(){return o.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"}}),[o.vertical]),F=Object(g.useLocalization)(),z=i.useCallback((function(e){if(P.current){var t=P.current.getBoundingClientRect(),n=o.vertical?t.bottom-e.clientY:"rtl"===O?t.right-e.clientX:e.clientX-t.left,r=o.vertical?t.height:t.width;return k+n/r*(w-k)}}),[P,o.vertical,O,k,w,N.start,N.end,o.value&&o.value.start,o.value&&o.value.end]),L=i.useCallback((function(e){return e<=M.start?"start":e>=M.end?"end":2*e<M.end+M.start?"start":"end"}),[N.start,N.end,o.value&&o.value.start,o.value&&o.value.end]),B=i.useCallback((function(e){switch(e.keyCode){case m.a.right:e.preventDefault(),T({type:"rtl"===O?St.decrease:St.increase,key:"start",event:e});break;case m.a.up:e.preventDefault(),T({type:St.increase,key:"start",event:e});break;case m.a.left:e.preventDefault(),T({type:"rtl"===O?St.increase:St.decrease,key:"start",event:e});break;case m.a.down:e.preventDefault(),T({type:St.decrease,key:"start",event:e});break;case m.a.home:e.preventDefault(),T({type:St.min,key:"start",event:e});break;case m.a.end:e.preventDefault(),T({type:St.max,key:"start",event:e})}}),[T]),H=i.useCallback((function(e){switch(e.keyCode){case m.a.right:e.preventDefault(),T({type:"rtl"===O?St.decrease:St.increase,key:"end",event:e});break;case m.a.up:e.preventDefault(),T({type:St.increase,key:"end",event:e});break;case m.a.left:e.preventDefault(),T({type:"rtl"===O?St.increase:St.decrease,key:"end",event:e});break;case m.a.down:e.preventDefault(),T({type:St.decrease,key:"end",event:e});break;case m.a.home:e.preventDefault(),T({type:St.min,key:"end",event:e});break;case m.a.end:e.preventDefault(),T({type:St.max,key:"end",event:e})}}),[T,O]),K=i.useCallback((function(e){var t=z(e),n=L(t);E(n),"end"===n?p.current.focus():d.current.focus();var r="end"===n?St.end:St.start;T({type:r,payload:t,event:e})}),[o.vertical,k,w,T]);return Object(Et.a)(P,{onPress:K,onDrag:function(e){var t=z(e),n="end"===S?St.end:St.start;T({type:n,payload:t,event:e})},onRelease:function(e){var t=z(e),n="end"===S?St.end:St.start;T({type:n,payload:t,event:e}),E("")}}),i.createElement("div",{role:"slider",id:o.id,style:o.style,ref:s,dir:O,className:Object(c.a)("k-widget k-slider",{"k-rtl":"rtl"===O,"k-disabled":o.disabled,"k-slider-vertical":o.vertical,"k-slider-horizontal":!o.vertical},o.className),"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy},i.createElement("div",{ref:P,className:"k-slider-track-wrap",style:Nt({flexGrow:1,position:"relative",touchAction:"none"},A)},o.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:Nt({},R)},i.Children.map(o.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-o.min)/(o.max-o.min),vertical:o.vertical},e.props.children)}))),i.createElement("div",{ref:D,className:"k-slider-track",style:o.vertical?{bottom:0,height:"100%"}:(n={},n["rtl"===O?"right":"left"]=0,n.width="100%",n)},null!==_&&null!==j&&i.createElement("div",{"data-selection":!0,ref:l,title:M.start+" - "+M.end,className:"k-slider-selection",style:o.vertical?{height:j-_+"%",bottom:_+"%"}:(r={},r["rtl"===O?"right":"left"]=_+"%",r.width=j-_+"%",r)}),i.createElement("a",{ref:d,role:"slider",tabIndex:Object(u.a)(o.startTabIndex,o.disabled,void 0),"aria-valuemin":k,"aria-valuemax":Math.max(w,M.end),"aria-valuenow":M.start,"aria-disabled":o.disabled?"true":void 0,className:"k-draghandle",title:F.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:o.vertical?{bottom:"calc("+_+"%)",zIndex:1}:"rtl"===O?{right:"calc("+_+"% - 13px)",zIndex:1}:{left:"calc("+_+"%)",zIndex:1},onKeyDown:B}),i.createElement("a",{ref:p,role:"slider",tabIndex:Object(u.a)(o.endTabIndex,o.disabled,void 0),"aria-valuemin":Math.min(k,M.start),"aria-valuemax":w,"aria-valuenow":M.end,"aria-disabled":o.disabled?"true":void 0,className:"k-draghandle",title:F.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:o.vertical?{bottom:"calc("+j+"%)",zIndex:1}:"rtl"===O?{right:"calc("+j+"% - 13px)",zIndex:1}:{left:"calc("+j+"%)",zIndex:1},onKeyDown:H}))))})),Pt={value:function(e,t,n){if(e.value){var r=e.value.start,o=e.value.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + "+t+" supplied to "+n+".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n ")}return null},defaultValue:function(e,t,n){if(e.defaultValue){var r=e.defaultValue.start,o=e.defaultValue.end,i=e.min,a=e.max;if(r>o||r>a||r<i||o>a||o<i||o<r)return new Error("Invalid prop + "+t+" supplied to "+n+".\n The { start, end } value must be between the min & max value and { start, end } must be start < end.\n ")}return null},onChange:a.func,step:a.number,min:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===o?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be undefined.\n "):r&&o>=i?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be equal to or bigger than the max value.\n "):null},max:function(e,t,n){var r=e[t],o=e.min,i=e.max;return void 0===i?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be undefined.\n "):r&&i<=o?new Error("Invalid prop + "+t+" supplied to "+n+".\n "+t+" value can not be equal to or smaller than the min value.\n "):null},vertical:a.bool,disabled:a.bool,dir:a.oneOf(["ltr","rtl"])},_t={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};Dt.displayName="KendoReactRangeSlider",Dt.propTypes=Pt,Dt.defaultProps=_t;var jt=n(6),Rt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),At=function(){return(At=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ft=function(e){function t(n){var r=e.call(this,n)||this;return r.setValidity=function(){r._input&&r._input.setCustomValidity&&r._input.setCustomValidity(r.validity.valid?"":r.props.validationMessage||r.defaultValidationMessage.toLanguageString("switch.validation",y["switch.validation"]))},r.limit=function(e,t,n){var r=n.offsetWidth,o=t.offsetWidth;return e<0?0:e>r-o?r-o:e},r.toggle=function(e,t){r.setState({checked:e}),r.valueDuringOnChange=e,Object(v.a)(r.props.onChange,t,r,{value:e}),r.valueDuringOnChange=void 0},r._id=Object(l.a)(),r.defaultValidationMessage=Object(g.provideLocalizationService)(r),r.focus=function(){r._element&&r._element.focus()},r.dummyInput=function(e){return i.createElement("input",{type:"checkbox",checked:r.props.checked,ref:function(e){r._input=e},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:jt.a})},r.handleClick=function(e){r.eventTimeStamp!==e.timeStamp&&(r.eventTimeStamp=e.timeStamp,r.toggle(!r.value,e))},r.handleKeyDown=function(e){if(!r.props.disabled){var t=e.keyCode;t!==m.a.space&&t!==m.a.enter||r.toggle(!r.value,e)}},r.handleWrapperFocus=function(e){if(!r.props.disabled){r.setState({focused:!0});var t=r.props.onFocus;t&&t.call(void 0,e)}},r.handleWrapperBlur=function(e){if(!r.props.disabled){r.setState({focused:!1});var t=r.props.onBlur;t&&t.call(void 0,e)}},Object(f.a)(h),r.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},r}return Rt(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.props.checked?this.props.checked:this.state.checked},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){return this._wrapper},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.props.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validity",{get:function(){var e=void 0!==this.props.validationMessage,t=void 0!==this.props.valid?this.props.valid:!this.props.required||!!this.value;return{customError:e,valid:void 0!==this.props.valid?this.props.valid:t,valueMissing:null===this.value}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validityStyles",{get:function(){return void 0!==this.props.validityStyles?this.props.validityStyles:t.defaultProps.validityStyles},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return void 0!==this.props.required?this.props.required:t.defaultProps.required},enumerable:!0,configurable:!0}),t.prototype.componentDidMount=function(){this.setValidity(),this.forceUpdate()},t.prototype.componentDidUpdate=function(){this.setValidity()},t.prototype.render=function(){var e,t,n,r=this,o=this.state.focused,a=this.props,s=a.dir,l=a.disabled,d=a.trackRounded,p=a.thumbRounded,f=a.size,h=a.id,m=a.offLabel,v=a.onLabel,g=a.tabIndex;this.dir=s||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var y=!this.validityStyles||this.validity.valid,b=Object(c.a)("k-switch",((e={})["k-switch-"+(H.a.sizeMap[f]||f)]=f,e["k-rounded-"+(H.a.roundedMap[d]||d)]=d,e["k-switch-on"]=this.value,e["k-switch-off"]=!this.value,e["k-focus"]=o,e["k-disabled"]=l,e["k-invalid"]=!y,e),this.props.className),k={"aria-checked":this.value,"aria-disabled":l||void 0};return i.createElement("span",{ref:function(e){r._wrapper=e},className:b,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},i.createElement("span",At({className:Object(c.a)("k-switch-track",(t={},t["k-rounded-"+(H.a.roundedMap[d]||d)]=d,t)),id:h||this._id,role:"switch"},k,{"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,ref:function(e){r._element=e},tabIndex:Object(u.a)(g,l,void 0),accessKey:this.props.accessKey}),this.dummyInput(this.value),i.createElement("span",{className:"k-switch-label-on"},v),i.createElement("span",{className:"k-switch-label-off"},m),i.createElement("span",{className:"k-switch-thumb-wrap"},i.createElement("span",{className:Object(c.a)("k-switch-thumb",(n={},n["k-rounded-"+p]=p,n))}))))},t.displayName="Switch",t.propTypes={accessKey:a.string,checked:a.bool,className:a.string,disabled:a.bool,defaultChecked:a.bool,size:a.oneOf([null,"small","medium","large"]),trackRounded:a.oneOf([null,"small","medium","large","full"]),thumbRounded:a.oneOf([null,"small","medium","large","full"]),dir:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,offLabel:a.string,required:a.bool,tabIndex:a.number,valid:a.bool,validate:a.bool,validationMessage:a.string,onBlur:a.any,onChange:a.any,onFocus:a.any,onLabel:a.string},t.defaultProps={disabled:!1,defaultChecked:!1,size:"medium",trackRounded:"full",thumbRounded:"full",offLabel:"OFF",onBlur:jt.a,onFocus:jt.a,onLabel:"ON",required:!1,validityStyles:!0},t}(i.Component),zt=Object(p.a)(),Lt=Object(p.b)(zt,Ft);Lt.displayName="KendoReactSwitch";var Bt=function(){return(Bt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Vt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},Ht=Object(p.a)(),Kt=i.forwardRef((function(e,t){var n;Object(f.a)(h);var r=Object(V.a)(Ht,e),o=r,a=o.ariaDescribedBy,s=o.ariaLabelledBy,d=o.checked,p=o.className,k=o.children,w=o.defaultChecked,C=o.disabled,O=o.defaultValue,x=o.id,S=o.size,E=o.rounded,I=o.label,N=o.labelPlacement,T=o.name,M=o.labelOptional,D=o.onChange,P=o.onFocus,_=o.onBlur,j=o.tabIndex,R=o.value,A=o.required,F=o.valid,z=o.validationMessage,L=o.validityStyles,B=(o.visited,o.touched,o.modified,Vt(o,["ariaDescribedBy","ariaLabelledBy","checked","className","children","defaultChecked","disabled","defaultValue","id","size","rounded","label","labelPlacement","name","labelOptional","onChange","onFocus","onBlur","tabIndex","value","required","valid","validationMessage","validityStyles","visited","touched","modified"])),K=i.useRef(null),W=i.useCallback((function(){K.current&&K.current.focus()}),[]),$=i.useCallback((function(){return{element:K.current,focus:W,get name(){return K.current&&K.current.name}}}),[W]);i.useImperativeHandle(t,$);var q=i.useState(w),U=q[0],G=q[1],X=i.useState(O),J=X[0],Y=X[1],Z="boolean"==typeof R||null===R,Q=void 0!==d,ee=Z,te=ee?R:J,ne=Q?d:ee?void 0:U,re=void 0===ne&&te,oe=re?te:ne,ie=re||ee?null===R?R:void 0:R||te,ae=null===oe||null===ie,se=i.useMemo((function(){return Object(l.a)()}),[]),le=Object(g.useLocalization)(),ce=function(e){return le.toLanguageString(e,y[e])},ue=ce("checkbox.validation"),de=ce("checkbox.optionalText"),pe=void 0!==F?F:!A||!!ne;i.useEffect((function(){K.current&&K.current.setCustomValidity&&K.current.setCustomValidity(pe?"":z||ue)}),[pe,z,ue]);var fe=i.useCallback((function(e,t){ee||C||(Y(t),Q||C||G(t)),D&&!C&&Object(v.a)(D,e,Bt({},$(),{value:t}),{value:t})}),[Q,C,D,ee,$]),he=i.useCallback((function(e){var t=e.target.checked;fe(e,t)}),[fe,R]),me=i.useCallback((function(e){if(!C){var t=e.keyCode,n=e.currentTarget.checked;t===m.a.space&&(e.preventDefault(),e.stopPropagation(),fe(e,!n))}}),[C,fe]),ve=i.useCallback((function(e){C||e.keyCode===m.a.space&&e.preventDefault()}),[C]),ge=i.useCallback((function(e){P&&!C&&Object(v.a)(P,e,$(),void 0)}),[P,C,$]),ye=i.useCallback((function(e){_&&!C&&Object(v.a)(_,e,$(),void 0)}),[_,C,$]),be=Object(b.a)(K,r.dir),ke=Object(c.a)({"k-disabled":C},p),we=Bt({type:"checkbox",className:Object(c.a)("k-checkbox",(n={},n["k-checkbox-"+(H.a.sizeMap[S]||S)]=S,n["k-rounded-"+(H.a.roundedMap[E]||E)]=E,n["k-indeterminate"]=ae,n["k-invalid k-invalid"]=!(pe||void 0!==L||!0===L),n)),ref:K,name:T,id:x||se,"aria-labelledby":s,"aria-describedby":a,checked:Boolean(oe),disabled:C,tabIndex:Object(u.a)(j,C),role:"checkbox",required:void 0!==A&&A,"aria-checked":!(!ne&&!oe)||!!ae&&"mixed","aria-disabled":C||void 0},B,{onChange:he,onKeyDown:me,onKeyUp:ve,onFocus:ge,onBlur:ye}),Ce=i.createElement(i.Fragment,null,void 0===ie?i.createElement("input",Bt({},we)):i.createElement("input",Bt({},we,{value:Z?void 0:null===ie?"":ie}))),Oe=i.createElement(i.Fragment,null,void 0!==I?i.createElement("label",{className:"k-checkbox-label",htmlFor:x||se,style:{userSelect:"none"}},I,M&&i.createElement("span",{className:"k-label-optional"},de)):null);return i.createElement(i.Fragment,null,"before"===N?i.createElement("span",{className:ke,dir:"rtl"},Ce,Oe,k):i.createElement("span",{className:ke,dir:be},Ce,Oe,k))}));Kt.propTypes={checked:a.bool,className:a.string,defaultChecked:a.bool,defaultValue:a.any,dir:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large"]),ariaLabelledBy:a.string,ariaDescribedBy:a.string,label:a.any,labelPlacement:a.string,labelOptional:a.bool,name:a.string,tabIndex:a.number,value:a.any,validationMessage:a.string,required:a.bool,validate:a.bool,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func};Kt.defaultProps={size:"medium",rounded:"medium"},Kt.displayName="KendoCheckbox";var Wt=function(){return(Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},$t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},qt=Object(p.a)(),Ut=i.forwardRef((function(e,t){var n;Object(f.a)(h);var r=Object(V.a)(qt,e),o=r.ariaDescribedBy,a=r.checked,s=r.children,d=r.className,p=r.disabled,m=r.id,g=r.size,y=r.label,b=r.labelPlacement,k=r.name,w=r.style,C=r.tabIndex,O=r.value,x=r.valid,S=r.onChange,E=r.onFocus,I=r.onBlur,N=$t(r,["ariaDescribedBy","checked","children","className","disabled","id","size","label","labelPlacement","name","style","tabIndex","value","valid","onChange","onFocus","onBlur"]),T=i.useRef(null),M=i.useCallback((function(){T.current&&T.current.focus()}),[]),D=i.useCallback((function(){return{element:T.current,focus:M}}),[M]);i.useImperativeHandle(t,D);var P=i.useMemo((function(){return Object(l.a)()}),[]),_=i.useCallback((function(e){Object(v.a)(S,e,D(),{value:O})}),[S,O,p]),j=i.useCallback((function(e){E&&!p&&Object(v.a)(E,e,D(),void 0)}),[E,p]),R=i.useCallback((function(e){I&&!p&&Object(v.a)(I,e,D(),void 0)}),[I,p]),A=Wt({type:"radio",id:m||P,name:k,className:Object(c.a)("k-radio",(n={},n["k-radio-"+(H.a.sizeMap[g]||g)]=g,n["k-invalid"]=!1===x,n),d),ref:T,disabled:p,tabIndex:Object(u.a)(C,p),checked:a,style:w,"aria-describedby":o,value:O,onChange:_,onFocus:j,onBlur:R},N),F=i.createElement(i.Fragment,null,void 0!==y?i.createElement("label",{className:"k-radio-label",htmlFor:m||P,style:{userSelect:"none"},"aria-label":y},y):null),z=i.createElement("input",Wt({},A));return"before"===b?i.createElement(i.Fragment,null,F,z,s):i.createElement(i.Fragment,null,z,F,s)}));Ut.propTypes={ariaDescribedBy:a.string,checked:a.bool,className:a.string,disabled:a.bool,id:a.string,size:a.oneOf([null,"small","medium","large"]),label:a.string,labelPlacement:a.string,name:a.string,style:a.object,tabIndex:a.number,value:a.any,valid:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func};Ut.displayName="KendoRadioButton",Ut.defaultProps={size:"medium"};var Gt=n(59),Xt=function(){return(Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Jt=Object(p.a)(),Yt=i.forwardRef((function(e,t){Object(f.a)(h);var n=Object(V.a)(Jt,e),r=n.ariaLabelledBy,o=n.ariaDescribedBy,a=n.className,u=n.data,d=n.defaultValue,p=n.disabled,m=n.name,g=n.labelPlacement,y=n.layout,b=n.style,k=n.value,w=n.valid,C=n.item,O=void 0===C?Zt.item:C,x=n.onChange,S=n.onFocus,E=i.useRef(null),I=i.useCallback((function(){E.current&&Object(s.a)(E.current)}),[]),N=i.useCallback((function(){return{element:E.current,focus:I}}),[I]);i.useImperativeHandle(t,N);var T=i.useState(d),M=T[0],D=T[1],P=void 0!==k,_=P?k:M,j=i.useCallback((function(e){var t=e.value;P||p||D(t),x&&!p&&Object(v.a)(x,e.syntheticEvent,N(),{value:t})}),[D,x,p]),R=i.useCallback((function(e){S&&!p&&Object(v.a)(S,e.syntheticEvent,N(),void 0)}),[S,p]),A=i.useMemo((function(){return Object(l.a)()}),[]),F=Object(c.a)("k-radio-list",{"k-list-horizontal":"horizontal"===y,"k-list-vertical":"vertical"===y||void 0===y},a),z=Object(Gt.a)(E,n.dir),L=u&&u.map((function(e,t){var n=_===e.value,r=null==_,o=Xt({},e,{valid:w,checked:n,disabled:!(!e.disabled&&!p),labelPlacement:e.labelPlacement?e.labelPlacement:g,tabIndex:e.tabIndex?e.tabIndex:r&&0===t||n?0:-1,index:t,name:m||A,onChange:j,onFocus:R});return i.createElement(O,{className:Object(c.a)("k-radio-item",{"k-disabled":o.disabled||p}),key:t,role:"radio"},i.createElement(Ut,Xt({},o)))}));return i.createElement("ul",{role:"radiogroup",className:F,ref:E,dir:z,style:b,"aria-labelledby":r,"aria-describedby":o},L)})),Zt={item:function(e){return i.createElement("li",Xt({},e))}};Yt.propTypes={ariaLabelledBy:a.string,ariaDescribedBy:a.string,className:a.string,data:a.arrayOf(a.object),defaultValue:a.any,dir:a.string,disabled:a.bool,labelPlacement:a.string,layout:a.string,name:a.string,style:a.object,value:a.any,onChange:a.func,onFocus:a.func},Yt.defaultProps=Zt,Yt.displayName="KendoRadioGroup";var Qt=function(){return(Qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},en=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},tn=Object(p.a)(),nn=i.forwardRef((function(e,t){var n,r=Object(V.a)(tn,e),o=r,a=o.size,s=o.rounded,d=o.fillMode,p=o.ariaDescribedBy,f=o.ariaLabelledBy,h=o.autoSize,m=o.className,g=o.defaultValue,y=o.disabled,k=o.readOnly,w=o.required,C=o.rows,O=o.id,x=o.name,S=o.placeholder,E=o.style,I=o.tabIndex,N=o.value,T=o.valid,M=o.validationMessage,D=o.validityStyles,P=o.onChange,_=o.onFocus,j=o.onBlur,R=(o.visited,o.touched,o.modified,en(o,["size","rounded","fillMode","ariaDescribedBy","ariaLabelledBy","autoSize","className","defaultValue","disabled","readOnly","required","rows","id","name","placeholder","style","tabIndex","value","valid","validationMessage","validityStyles","onChange","onFocus","onBlur","visited","touched","modified"])),A=i.useRef(null),F=i.useCallback((function(){A.current&&A.current.focus()}),[]),z=i.useCallback((function(){return{element:A,focus:F,get name(){return A.current&&A.current.name}}}),[F]);i.useImperativeHandle(t,z);var L=i.useState(g),B=L[0],K=L[1],W=i.useState("auto"),$=W[0],q=W[1],U=i.useMemo((function(){return Object(l.a)()}),[]),G=Object(b.a)(A,r.dir),X=void 0!==N,J=X?N:B,Y=void 0!==T?T:!w||!!J;i.useEffect((function(){A.current&&A.current.setCustomValidity&&A.current.setCustomValidity(Y?"":M||"")}),[Y,M]),i.useLayoutEffect((function(){A.current&&q(A.current.scrollHeight+"px")}),[J]);var Z=i.useCallback((function(e){var t=e.target.value;X||y||(q("auto"),K(t)),P&&!y&&Object(v.a)(P,e,z(),{value:t})}),[K,P,y,X]),Q=i.useCallback((function(e){_&&!y&&Object(v.a)(_,e,z(),void 0)}),[_,y]),ee=i.useCallback((function(e){j&&!y&&Object(v.a)(j,e,z(),void 0)}),[j,y]),te=Qt({id:O||U,name:x,className:"k-input-inner !k-overflow-auto",ref:A,disabled:y,rows:C,placeholder:S,readOnly:k,required:w,tabIndex:Object(u.a)(I,y),style:h?{resize:"none",overflow:"hidden",height:$}:{},"aria-labelledby":f,"aria-describedby":p,"aria-multiline":!0,"aria-disabled":y||void 0,value:X?N:B},R,{onChange:Z,onFocus:Q,onBlur:ee});return i.createElement("span",{className:Object(c.a)("k-input","k-textarea",(n={},n["k-input-"+(H.a.sizeMap[a]||a)]=a,n["k-input-"+d]=d,n["k-rounded-"+(H.a.roundedMap[s]||s)]=s,n["k-invalid"]=!(Y||void 0!==D||!0===D),n["k-required"]=w,n["k-disabled"]=y,n),m),style:E,dir:G},i.createElement("textarea",Qt({},te)))}));nn.propTypes={ariaDescribedBy:a.string,ariaLabelledBy:a.string,autoSize:a.bool,className:a.string,defaultValue:a.string,dir:a.string,disabled:a.bool,readOnly:a.bool,rows:a.number,id:a.string,name:a.string,placeholder:a.string,style:a.object,tabIndex:a.number,value:a.oneOfType([a.string,a.arrayOf(a.string),a.number]),onChange:a.func,onFocus:a.func,onBlur:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large","full"]),fillMode:a.oneOf([null,"solid","flat","outline"])};nn.displayName="KendoTextArea",nn.defaultProps={size:"medium",rounded:"medium",fillMode:"solid"};var rn=i.forwardRef((function(e,t){var n=i.useRef(null),r=i.useRef(null),o=Object(b.a)(r,e.dir);i.useImperativeHandle(n,(function(){return{element:r.current,props:e,value:e.value}})),i.useImperativeHandle(t,(function(){return n.current}));var a=i.useCallback((function(t){e.onClick&&e.onClick.call(void 0,{value:e.value,target:n.current,syntheticEvent:t})}),[e.onClick,e.value]),s=i.useCallback((function(t){e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onKeyDown]),l=i.useCallback((function(t){e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onFocus]),u=i.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onBlur]),d=i.useCallback((function(t){e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseMove]),p=i.useCallback((function(t){e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseEnter]),f=i.useCallback((function(t){e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseLeave]);return i.createElement("span",{id:e.id,ref:r,dir:o,"data-half":e.half,tabIndex:e.tabIndex,title:e.title,style:e.style,className:Object(c.a)("k-rating-item",{"k-rtl":"rtl"===o,"k-selected":e.selected,"k-hover":e.hovered},e.className),onClick:a,onKeyDown:s,onFocus:l,onBlur:u,onMouseEnter:p,onMouseLeave:f,onMouseMove:d},e.children)})),on={id:a.string,icon:a.any,dir:a.oneOf(["ltr","rtl"]),title:a.string,value:a.number,half:a.bool,selected:a.bool,hovered:a.bool};rn.displayName="KendoReactRatingItem",rn.propTypes=on,rn.defaultProps={dir:"ltr"};var an,sn=function(e,t){if(e%1){var n=Math.pow(10,(t.toString().split(".")[1]||t.toString().split(".")[0]).length);return Math.round(e*n)/n}return e},ln=function(e,t,n){return sn(e-n,n)<t&&t<e},cn=function(e,t,n,r){return null!==t&&("continues"===r?ln(e,t,n)?sn(e-n/2,n/2)<=t:e<=t:"single"===r&&(ln(e,t,n)?sn(e-n/2,n/2)===t:e===t))},un=function(e,t,n){return"ltr"===e?n<t.x+t.width/2:n>t.x+t.width/2},dn=function(e,t,n,r){for(var o=e;o<=t;o+=n)if(r===o)return!0;return!1};!function(e){e.select="select",e.deselect="deselect",e.increase="increase",e.decrease="decrease",e.min="min",e.max="max",e.reset="reset"}(an||(an={}));var pn=function(){return(pn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fn=function(e,t,n){var r=i.useState(e),o=r[0],a=r[1];return[o,function(e){var r=function(e,t){switch(t.type){case an.select:return void 0===t.payload||void 0===t.step?e:t.payload===e?null:t.payload>=t.min?t.payload<t.max?sn(t.payload,t.step):t.max:t.min;case an.deselect:return null;case an.increase:return void 0===t.step?e:e<t.min?t.min:e+t.step<t.max?sn(e+t.step,t.step):t.max;case an.decrease:return void 0===t.step?e:sn(e-t.step,t.step)>=t.min?sn(e-t.step,t.step):t.min;case an.min:return void 0===t.step?e:t.min;case an.max:return t.max;case an.reset:return null;default:return e}}(t.state||o,pn({},e,t));n&&n(r,e.event),a(r)}]},hn=Object(p.a)(),mn=i.forwardRef((function(e,t){var n,r,o,a,s=Object(V.a)(hn,e),l=i.useRef(null),d=i.useRef(null),p=Object(b.a)(d,s.dir);i.useImperativeHandle(l,(function(){return{element:d.current,props:s}})),i.useImperativeHandle(t,(function(){return l.current}));for(var f,h,v=i.useCallback((function(e,t){s.onChange&&l.current&&s.onChange.call(void 0,{value:e,target:l.current,syntheticEvent:t})}),[s.onChange]),g=i.useMemo((function(){return void 0!==s.min?s.min:gn.min}),[s.min]),y=i.useMemo((function(){return void 0!==s.max?s.max:gn.max}),[s.max]),k=i.useMemo((function(){return s.precision||gn.precision}),[s.precision]),w=i.useMemo((function(){return void 0!==s.step?s.step:gn.step}),[s.step]),C=i.useMemo((function(){return s.readonly||gn.readonly}),[s.readonly]),O=i.useMemo((function(){return s.disabled||gn.disabled}),[s.disabled]),x=i.useMemo((function(){return s.item||gn.item}),[s.item]),S=fn(s.defaultValue||gn.defaultValue,{state:s.value,min:g,max:y,step:"half"===k?w/2:w},v),E=S[0],I=S[1],N=fn(null,{state:s.value,min:g,max:y,step:"half"===k?w/2:w,precision:k}),T=N[0],M=N[1],D=i.useMemo((function(){return s.value||E}),[s.value,E]),P=i.useMemo((function(){return T}),[T]),_=i.useMemo((function(){return s.selection||gn.selection}),[s.selection]),j=i.useMemo((function(){return w/("half"===k?2:1)}),[w,k]),R=i.useCallback((function(e){if(e.target&&e.target.element&&!C&&!O){if("half"===k){var t=e.target.element.getBoundingClientRect(),n=un(p||"ltr",t,e.syntheticEvent.clientX)?sn(e.target.value-w/2,j):e.target.value;I({type:an.select,payload:n,event:e.syntheticEvent})}else I({type:an.select,payload:e.target.value,event:e.syntheticEvent});s.onClick&&s.onClick.call(void 0,{value:D,target:l.current,syntheticEvent:e.syntheticEvent})}}),[s.onClick,I,D]),A=i.useCallback((function(e){if(!C&&!O){switch(e.keyCode){case m.a.right:e.preventDefault(),I({type:"rtl"===p?an.decrease:an.increase,event:e});break;case m.a.left:e.preventDefault(),I({type:"rtl"===p?an.increase:an.decrease,event:e});break;case m.a.home:e.preventDefault(),I({type:"rtl"===p?an.min:an.max,event:e});break;case m.a.end:e.preventDefault(),I({type:"rtl"===p?an.max:an.min,event:e});break;case m.a.esc:e.preventDefault(),I({type:an.deselect,event:e})}s.onKeyDown&&s.onKeyDown.call(void 0,{value:D,target:l.current,syntheticEvent:e})}}),[s.onKeyDown,I,D]),F=i.useCallback((function(e){s.onFocus&&s.onFocus.call(void 0,{target:l.current,syntheticEvent:e})}),[s.onFocus]),z=i.useCallback((function(e){s.onBlur&&s.onBlur.call(void 0,{target:l.current,syntheticEvent:e})}),[s.onBlur]),L=i.useCallback((function(e){if(e.target&&e.target.element)if("half"===k){var t=e.target.element.getBoundingClientRect(),n=un(p||"ltr",t,e.syntheticEvent.clientX)?e.target.value-w/2:e.target.value;M({type:an.select,payload:n,event:e.syntheticEvent})}else M({type:an.select,payload:e.target.value,event:e.syntheticEvent})}),[k,w,p]),B=i.useCallback((function(e){M({type:an.reset,event:e.syntheticEvent})}),[]),H=[],K=(f=sn(y-g,j))-(h=w)*Math.floor(f/h),W=g;W<=y;W=sn(W+w,j)){var $=sn(W+K,j),q="half"===k&&ln($,null!==P?P:null!==D?D:0,w),U=cn($,D,w,_),G=cn($,null!==P?P:D,w,_),X=cn($,P,w,_);H.push(i.createElement(x,{key:$,value:$,dir:p,title:String(q?sn($-w/2,j):$),icon:s.icon,half:q,selected:U||G,hovered:X,onClick:R,onMouseMove:L,onMouseLeave:B},q&&i.createElement("span",{className:"k-rating-precision-complement",style:(n={width:"12px"},n["rtl"===p?"right":"left"]="50%",n)},i.createElement("span",{className:Object(c.a)("k-icon",(r={"k-i-star-outline":!s.icon},r[s.icon+"-outline"]=s.icon,r))})),q&&i.createElement("span",{className:"k-rating-precision-part",style:{width:"12px"}},i.createElement("span",{className:Object(c.a)("k-icon",(o={"k-i-star":!s.icon},o[""+s.icon]=s.icon,o))})),q&&i.createElement("span",{style:{width:"24px",height:"24px",display:"block"}}),!q&&i.createElement("span",{className:Object(c.a)("k-icon",(a={"k-i-star":!s.icon&&(X||G&&!X),"k-i-star-outline":!s.icon&&!X},a[""+s.icon]=s.icon&&(X||G&&!X),a[s.icon+"-outline"]=s.icon&&!X,a))})))}return i.createElement("span",{id:s.id,style:s.style,ref:d,role:"slider",dir:p,tabIndex:Object(u.a)(s.tabIndex,s.disabled,void 0),className:Object(c.a)("k-rating k-widget",{"k-rtl":"rtl"===p,"k-state-readonly":C,"k-disabled":O},s.className),onKeyDown:A,onFocus:F,onBlur:z,"aria-valuemin":g,"aria-valuemax":y,"aria-valuenow":null!==D?D:void 0,"aria-disabled":O?"true":void 0,"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy},i.createElement("input",{id:"rating",className:"k-hidden",readOnly:C,disabled:O}),i.createElement("span",{className:"k-rating-container"},H),s.label&&i.createElement("span",{className:"k-rating-label"},s.label))})),vn={id:a.string,dir:a.oneOf(["ltr","rtl"]),selection:a.oneOf(["continues","single"]),precision:a.oneOf(["item","half"]),value:function(e,t,n){if(e.value&&e.min&&e.max&&e.step&&(!("half"===e.precision?dn(e.min,e.max,e.step/2,e.value):dn(e.min,e.max,e.step,e.value))&&"half"===e.precision))return new Error("Invalid prop + "+t+" supplied to "+n+".\n The value of the { value } property is not correct, please check your values.\n ");return null},defaultValue:a.number,min:a.number,max:a.number,step:function(e,t,n){return void 0!==e.step&&e.step<=0?new Error("Invalid prop + "+t+" supplied to "+n+'.\n The value of the { step } property is cannot be equal or less than "0", please check your values.\n '):null},hovered:a.number,label:a.string,readonly:a.bool,disabled:a.bool,half:a.bool,icon:a.string,ariaDescribedBy:a.string},gn={dir:"ltr",min:1,max:5,step:1,item:rn,defaultValue:null,readonly:!1,disabled:!1,selection:"continues",precision:"item"};mn.displayName="KendoReactRating",mn.propTypes=vn,mn.defaultProps=gn},function(e,t,n){"use strict";n.r(t),n.d(t,"PDFExport",(function(){return C})),n.d(t,"PDFMargin",(function(){return h})),n.d(t,"savePDF",(function(){return O})),n.d(t,"getPageMargin",(function(){return v})),n.d(t,"GridPDFExport",(function(){return L})),n.d(t,"TreeListPDFExport",(function(){return W}));var r=n(0),o=n(1),i=n(12);function a(e,t,n){void 0===n&&(n={});var r=d;if(n.forceProxy&&!n.proxyURL)throw new Error("No proxyURL is set, but forceProxy is true");n.forceProxy||(l()&&(r=u),navigator.msSaveBlob&&(r=c)),r(e,t,n)}var s=function(){return document.createElement("a")},l=function(){return"download"in s()};function c(e,t){var n=e;if("string"==typeof e){for(var r=e.split(";base64,"),o=r[0],i=atob(r[1]),a=new Uint8Array(i.length),s=0;s<i.length;s++)a[s]=i.charCodeAt(s);n=new Blob([a.buffer],{type:o})}navigator.msSaveBlob(n,t)}function u(e,t){var n=e;window.Blob&&e instanceof Blob&&(n=URL.createObjectURL(e));var r=s();r.download=t,r.href=n;var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o),setTimeout((function(){return URL.revokeObjectURL(n)}))}function d(e,t,n){if(n.proxyURL){var r=document.createElement("form");r.setAttribute("action",n.proxyURL),r.setAttribute("method","POST"),r.setAttribute("target",n.proxyTarget||"_self");var o=n.proxyData||{};o.fileName=t;var i=e.split(";base64,");for(var a in o.contentType=i[0].replace("data:",""),o.base64=i[1],o)if(o.hasOwnProperty(a)){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",a),s.setAttribute("value",o[a]),r.appendChild(s)}document.body.appendChild(r),r.submit(),document.body.removeChild(r)}}String.fromCharCode;var p,f=(p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.render=function(){return null},t.propTypes={left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])},t}(r.Component),m=["bottom","left","right","top"];function v(e){var t=r.Children.toArray(e.children).find((function(e){return e&&e.type===h}));return t?function(e){for(var t={},n=0;n<m.length;n++){var r=m[n],o=e.props[r];void 0!==o&&(t[r]=o)}return t}(t):e.margin}var g=n(66),y=function(){function e(e,t,n,o,i){void 0===i&&(i={});var a=this;this.drawDOM=e,this.exportPDF=t,this.saveAs=n,this.domElement=o,this.options=i,this.convertPageTemplateToHtml=function(e){return"<span>"+g.renderToStaticMarkup(r.createElement(a.options.pageTemplate,{pageNum:e.pageNum,totalPages:e.totalPages}))+"</span>"}}return e.prototype.savePDF=function(e){var t=this,n=this.drawDOM(this.domElement,this.getDrawOptions()).then((function(e){return t.exportPDF(e,t.getPDFOptions())})).then((function(e){return t.saveAs(e,t.options.fileName||"export.pdf",t.getSaveOptions())}));e&&n.then(e,e)},e.prototype.getDrawOptions=function(){return{avoidLinks:this.options.avoidLinks,forcePageBreak:this.options.forcePageBreak,keepTogether:this.options.keepTogether,margin:this.options.margin,paperSize:this.options.paperSize,landscape:this.options.landscape,repeatHeaders:this.options.repeatHeaders,scale:this.options.scale,template:this.options.pageTemplate&&this.convertPageTemplateToHtml}},e.prototype.getPDFOptions=function(){return{author:this.options.author,creator:this.options.creator||"KendoReact PDF Generator",date:this.options.date,imgDPI:this.options.imageResolution,keywords:this.options.keywords,landscape:this.options.landscape,margin:this.options.margin,multiPage:!0,paperSize:this.options.paperSize,producer:this.options.producer,subject:this.options.subject,title:this.options.title}},e.prototype.getSaveOptions=function(){return{forceProxy:this.options.forceProxy,proxyData:this.options.proxyData,proxyTarget:this.options.proxyTarget,proxyURL:this.options.proxyURL}},e}(),b=n(8),k={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1652426844,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"},w=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C=function(e){function t(t){var n=e.call(this,t)||this;if(void 0!==b)b.validatePackage(k);else{var r="License activation failed for "+k.name+"\n";r+="The @progress/kendo-licensing script is not loaded.\n",r+="See "+k.licensingDocsUrl+" for more information.\n",console.warn(r)}return n}return w(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{ref:function(t){e.rootElForPDF=t}},this.props.children)},t.prototype.save=function(e){new y(i.drawDOM,i.exportPDF,a,this.rootElForPDF,this.getOptions()).savePDF(e)},t.prototype.getOptions=function(){return Object.assign({},this.props,{margin:v(this.props)})},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component);function O(e,t,n){void 0===t&&(t={}),new y(i.drawDOM,i.exportPDF,a,e,t).savePDF(n)}var x=n(15),S={},E=function(e){return String(e).trim().split(" ")},I=function(e){return function(t){return function(e,t){var n=E(t);return Boolean(E(e.className).find((function(e){return n.indexOf(e)>=0})))}(t,e)}},N=function(e){return S[e]||(S[e]=function(t){return String(t.nodeName).toLowerCase()===e.toLowerCase()}),S[e]},T=function(e,t,n){if(void 0===n&&(n=!0),e){if(n&&t(e))return e;for(e=e.firstChild;e;){if(1===e.nodeType){var r=T(e,t);if(r)return r}e=e.nextSibling}}},M=N("TABLE"),D=function(e){return e?"locked":"wrap"},P=function(){function e(e){this.element=e,this.list=T(e,I("k-grid-container"))}return e.prototype.content=function(e){return T(this.list,I("k-grid-content"+(e?"-locked":"")))},e.prototype.header=function(e){return this.headerWrap=this.headerWrap||T(this.element,I("k-grid-header")),T(this.headerWrap,I("k-grid-header-"+D(e)))},e.prototype.footer=function(e){return this.footerWrap=this.footerWrap||T(this.element,I("k-grid-footer")),T(this.footerWrap,I("k-grid-footer-"+D(e)))},e.prototype.table=function(){return T(this.element,M)},e}(),_=function(e,t){for(var n=t.length,r=0;r<n;r++)e.appendChild(t[r].cloneNode(!0))},j=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},R=function(e){var t=e.length,n=e[0].cloneNode(!0),r=n.rows.length;if(t>1)for(var o=0;o<r;o++)for(var i=1;i<t;i++)_(n.rows[o],e[i].rows[o].cells);return n},A=function(e,t,n,r){for(var o=document.createElement("table"),i=e[0].cloneNode(!0),a=1;a<e.length;a++)_(i,e[a].querySelectorAll("col"));var s=R(t),l=R(n);if(s.className="k-grid-header",function(e,t){if(t.length>1&&e.rows.length>1)for(var n=1;n<e.rows.length;n++){var r=t[0].rows[n].cells.length,o=e.rows[n].cells[r];-1===String(o.className).indexOf("k-first")&&(o.className+=" k-first")}}(s,t),o.appendChild(i),o.appendChild(s),o.appendChild(l),r.length){var c=R(r);c.className="k-grid-footer",o.appendChild(c)}return j(o)};function F(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){void 0===n&&(n={});var s,l,c;function u(){e(function(){(c=document.createElement("div")).className="k-grid-pdf-export-element";var e=function(e){var t,n=new P(e),r=n.content();if(r){var o=[r.querySelector("colgroup")],i=[n.header().querySelector("thead")],a=[r.querySelector("tbody")],s=n.footer(),l=s?[s.querySelector("tfoot")]:[];t=A(o,i,a,l)}else t=j(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),e}(),n,d)}function d(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),x.render(function(){var e=i&&{data:i,total:i.length,pageSize:i.length,skip:0},n={style:Object.assign({},t.props.style,{width:"1000px"})},o=Object.assign({},e,n);if(a&&a.length>0){var s=function(e){return r.Children.toArray(e.props.children).filter((function(e){return e&&"KendoReactGridColumn"!==e.type.displayName}))}(t);return r.cloneElement(t,o,a.concat(s))}return r.cloneElement(t,o)}(),l,u)}(e,t,n,o,i,a)}}var z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(e){function t(t){var n=e.call(this,t)||this;return n.saveGridPDF=F(n.getSavePDF()),n}return z(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t){this.saveGridPDF(this.getGrid(),Object.assign({},this.props,{margin:v(this.props)}),t,e,this.getCustomColumns())},t.prototype.getSavePDF=function(){return O},t.prototype.getGrid=function(){return r.Children.toArray(this.props.children).find((function(e){return e&&"KendoReactGrid"===e.type.displayName}))},t.prototype.getCustomColumns=function(){return r.Children.toArray(this.props.children).filter((function(e){return e&&"KendoReactGridColumn"===e.type.displayName}))},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string},t}(r.Component),B=N("TABLE"),V=function(){function e(e){this.element=e,this.list=T(e,I("k-grid"))}return e.prototype.content=function(){return T(this.list,I("k-grid"))},e.prototype.header=function(){return this.headerWrap=this.headerWrap||T(this.element,I("k-grid-header")),T(this.headerWrap,I("k-grid-header"))},e.prototype.footer=function(){return this.footerWrap=this.footerWrap||T(this.element,I("k-grid-footer")),T(this.footerWrap,I("k-grid-footer"))},e.prototype.table=function(){return T(this.element,B)},e}();function H(e){return function(t,n,o,i,a){return void 0===n&&(n={}),function(e,t,n,o,i,a){void 0===n&&(n={});var s,l,c;function u(){e(function(){(c=document.createElement("div")).className="k-treelist-pdf-export-element";var e=function(e){var t,n=new V(e),r=n.content(),o=n.header();if(o.childNodes.length>1&&o.removeChild(o.childNodes[1]),o.childNodes[0].childNodes.forEach((function(e){return e.style.top=0})),r){var i=[r.querySelector("colgroup")],a=[o],s=[r.querySelector("tbody")],l=n.footer(),c=l?[l.querySelector("tfoot")]:[];t=A(i,a,s,c)}else t=j(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),c}(),n,d)}function d(){document.body.removeChild(s),document.body.removeChild(c),s=c=void 0,o&&o()}(s=document.createElement("div")).setAttribute("style","position:absolute; left: -5000px; top: 0px;"),l=document.createElement("div"),s.appendChild(l),document.body.appendChild(s),x.render((p=n.allPages&&i?{data:i,take:Number.MAX_VALUE,skip:0}:{},f={style:Object.assign({},t.props.style,{width:"1000px"})},h=Object.assign({},p,f),a&&a.length>0?r.cloneElement(t,Object.assign({},h,{columns:a})):r.cloneElement(t,h)),l,u);var p,f,h}(e,t,n,o,i,a)}}var K=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=function(e){function t(t){var n=e.call(this,t)||this;return n.saveTreeListPDF=H(n.getSavePDF()),n}return K(t,e),t.prototype.render=function(){return null},t.prototype.save=function(e,t,n){this.saveTreeListPDF(this.getTreeList(),Object.assign({},this.props,{margin:v(this.props)}),n,e,t||[])},t.prototype.getSavePDF=function(){return O},t.prototype.getTreeList=function(){var e=this.props.children;if(e&&e.props.data&&e.props.columns)return this.props.children},t.propTypes={author:o.string,avoidLinks:o.oneOfType([o.bool,o.string]),forcePageBreak:o.string,keepTogether:o.string,creator:o.string,date:o.instanceOf(Date),imageResolution:o.number,fileName:o.string,forceProxy:o.bool,keywords:o.string,landscape:o.bool,margin:o.oneOfType([o.string,o.number,o.shape({left:o.oneOfType([o.number,o.string]),top:o.oneOfType([o.number,o.string]),right:o.oneOfType([o.number,o.string]),bottom:o.oneOfType([o.number,o.string])})]),pageTemplate:o.any,paperSize:o.any,repeatHeaders:o.bool,scale:o.number,proxyData:o.any,proxyURL:o.string,proxyTarget:o.string,producer:o.string,subject:o.string,title:o.string,allPages:o.bool},t}(r.Component)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(0),i=n(1),a=n(42),s=n(6),l=n(20),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n},p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={maxHeight:void 0,maxWidth:void 0},t.componentWillEnter=function(e){var n=t.props,r=n.onEnter,o=n.onBeforeEnter;o&&o.call(void 0,e),t.updateContainerDimensions(e.animatedElement,(function(){r&&r.call(void 0,e)}))},t.componentIsEntering=function(e){var n=t.props.onEntering;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.componentWillExit=function(e){var n=t.props.onExit;t.updateContainerDimensions(e.animatedElement,(function(){n&&n.call(void 0,e)}))},t.updateContainerDimensions=function(e,n){void 0===n&&(n=s.a);var r=e.firstChild;if(r){var o=l.a.outerHeight(r),i=l.a.outerWidth(r);t.setState({maxHeight:o,maxWidth:i},n)}},t}return c(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.children,i=t.childFactory,s=d(t,["direction","children","childFactory"]),l=this.state,c=l.maxHeight,p=l.maxWidth,f={maxHeight:(e="vertical"===n?{maxHeight:c?c+"px":null}:{maxWidth:p?p+"px":null}).maxHeight,maxWidth:e.maxWidth};return o.createElement(a.a,u({},s,{childFactory:function(t){var n=i?i(t):t;return n.props.in?n:o.cloneElement(n,u({},n.props,{style:u({},n.props.style,{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:f,transitionName:"reveal-"+n}),r)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"},t}(o.Component)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r,o=n(0),i=n(1),a=n(10),s=n(3),l=n(18),c=n(21),u=n(41),d=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e){function t(t){var n=e.call(this,t)||this;return n.state={focused:!1},n.handleFocus=function(e){n.setState({focused:!0})},n.handleBlur=function(e){n.setState({focused:!1})},Object(c.a)(u.a),n}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.label,n=e.editorId,r=e.className,i=e.editorValue,c=e.editorPlaceholder,u=e.editorValid,d=e.editorDisabled,p=e.style,f=e.id,h=e.optional,m=Object(s.provideLocalizationService)(this),v=h?m.toLanguageString(l.a,l.b[l.a]):"",g=v&&o.createElement("span",{className:"k-label-optional"},v),y=Object(a.a)({"k-floating-label-container":!0,"k-focus":this.state.focused,"k-empty":!c&&!i&&0!==i,"k-text-disabled":d,"k-rtl":"rtl"===this.props.dir},r),b=Object(a.a)({"k-label":!0,"k-text-error":!1===u,"k-text-disabled":d});return o.createElement("span",{id:this.props.id,className:y,onFocus:this.handleFocus,onBlur:this.handleBlur,style:p,dir:this.props.dir},this.props.children,t?n?o.createElement("label",{id:f,htmlFor:n,className:b},t,g):o.createElement("span",{id:f,className:b},t,g):null)},t.propTypes={label:i.string,editorId:i.string,editorValue:i.oneOfType([i.string,i.bool,i.number]),editorPlaceholder:i.string,editorValid:i.bool,editorDisabled:i.bool,id:i.string,style:i.object,className:i.string,optional:i.bool},t}(o.Component);Object(s.registerForLocalization)(p)}])}));