@progress/kendo-react-editor 4.14.0-dev.202112141518 → 4.14.0-dev.202112221027
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=26)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"i",(function(){return c})),n.d(t,"k",(function(){return u})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return m})),n.d(t,"b",(function(){return v})),n.d(t,"o",(function(){return g})),n.d(t,"j",(function(){return y})),n.d(t,"p",(function(){return b})),n.d(t,"n",(function(){return C})),n.d(t,"h",(function(){return O})),n.d(t,"v",(function(){return S})),n.d(t,"g",(function(){return E})),n.d(t,"f",(function(){return T})),n.d(t,"w",(function(){return D})),n.d(t,"q",(function(){return _})),n.d(t,"u",(function(){return M})),n.d(t,"s",(function(){return j})),n.d(t,"t",(function(){return I})),n.d(t,"a",(function(){return ye})),n.d(t,"r",(function(){return ge}));var r=n(0),o=r.createContext(0);o.displayName="KendoReactZIndexContext";var i=function(){return"undefined"!=typeof document?document:{}},a=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=i();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=" ",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}(),s=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?l.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")};var c=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()}},u=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},p=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function d(e){var t=[];return e.replace(p,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}var f={};function h(e){if(f[e])return f[e];var t=d(e);return f[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},f[e]}f.undefined=function(){};var m=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},v={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},g=function(){},y=function(){return!(!s||!document.body)&&(new a).scrollbarWidth},b=function(){if(!s||!document.body)return!1;var e=(new a).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")};var 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)};function w(e,t,n){var r;return n?k({},e,((r={})[t]=n.length?n.slice():void 0,r)):e&&e[t]?e[t].slice():[]}var C=function(e,t,n){return e.map((function(e){return function e(t,n,r){if(t[n]){var o=w(t,n).map((function(t){return e(t,n,r)}));return r(w(t,n,o))}return r(t)}(e,t,n)})).slice()},O=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},x=n(6);function S(e){if(void 0!==x)x.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(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}var I=function(e,t){return r.useContext(e)(t)},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(){return r.createContext((function(e){return e}))},D=function(e,t){return r.forwardRef((function(n,o){var i=I(e,n);return r.createElement(t,N({},i,{ref:o}))}))};function _(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 M(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}var P,j=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){e[e.add=0]="add",e[e.remove=1]="remove"}(P||(P={}));var R=n(1),A={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},F=function(){return(F=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)},L=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},B=r.forwardRef((function(e,t){var n=e.className,o=e.name,i=e.themeColor,a=e.size,s=e.flip,c=e.style,u=L(e,["className","name","themeColor","size","flip","style"]),p=r.useRef(null),d=r.useRef(null);r.useImperativeHandle(p,(function(){return{element:d.current}})),r.useImperativeHandle(t,(function(){return p.current}));var f=r.useMemo((function(){return i||z.themeColor}),[i]),h=r.useMemo((function(){return a||z.size}),[a]),m=r.useMemo((function(){return s||z.flip}),[s]),v=r.useMemo((function(){return l("k-icon","k-i-"+o,"k-color-"+f,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},A[h],n)}),[o,f,h,m,n]),g=j(e,p);return r.createElement("span",F({ref:d},u,g,{className:v,style:c,role:"presentation"}))}));B.propTypes={style:R.object,classNames:R.string,name:R.string,themeColor:R.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:R.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:R.oneOf(["default","horizontal","vertical","both"])};var z={size:"default",themeColor:"inherit",flip:"default"};B.displayName="KendoIcon";var V=function(){return(V=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)},H=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=r.forwardRef((function(e,t){var n=e.children,o=e.className,i=e.svgClassName,a=e.icon,s=e.flip,c=e.size,u=e.style,p=e.svgStyle,d=e.themeColor,f=e.viewBox,h=H(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=r.useRef(null);r.useImperativeHandle(t,(function(){return{element:m.current}}));var v=r.useMemo((function(){return a?a.name:W.icon}),[a]),g=r.useMemo((function(){return d||W.themeColor}),[d]),y=r.useMemo((function(){return c||W.size}),[c]),b=r.useMemo((function(){return s||W.flip}),[s]),k=r.useMemo((function(){return f||W.viewBox}),[f]),w=r.useMemo((function(){return l("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},A[y],o)}),[v,g,y,b,o]),C=r.useMemo((function(){return e.width&&e.height?V({width:e.width,height:e.height},u):e.width?V({width:e.width,height:e.width},u):e.height?V({width:e.height,height:e.height},u):V({},u)}),[e.width,e.height,u]);return r.createElement("span",{className:w,style:C,ref:m},r.createElement("svg",V({className:i,style:p,"aria-hidden":!0,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:a?a.viewBox:k,dangerouslySetInnerHTML:a?{__html:a.content}:void 0},h),a?void 0:n))}));K.propTypes={style:R.object,classNames:R.string,children:R.any,icon:R.object,themeColor:R.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:R.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:R.oneOf(["default","horizontal","vertical","both"])};var W={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};K.displayName="KendoSvgIcon";var $,U={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},q={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},G={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"},X={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},J={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},Y={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},Z={lowercase:"k-text-lowercase",uppercase:"k-text-uppercase",capitalize:"k-text-capitalize"},Q={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"},ee=function(){return(ee=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)},te=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},ne=function(e){var t=r.forwardRef((function(t,n){var o=t.className,i=t.fontSize,a=t.fontWeight,s=t.textAlign,l=t.textTransform,c=t.themeColor,u=t.margin,p=te(t,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),d=r.useRef(null),f=r.useRef(null);r.useImperativeHandle(d,(function(){return{element:f.current,props:t}})),r.useImperativeHandle(n,(function(){return d.current}));var h=e,m=function(){if(void 0!==u){if("string"==typeof u)return[G[u]];if("number"==typeof u&&u>=0&&u<=24)return["k-m-"+u];if("object"==typeof u){var e=[];return Object.keys(u).forEach((function(t){var n,r;null!==u[t]&&void 0!==u[t]&&e.push((n=t,r=u[t],""+J[n]+("string"==typeof r?X[r]:r)))})),e.join(" ")}}};return r.createElement(h,ee({ref:f,className:["k-"+("p"===e?"paragraph":e),U[i],q[a],Y[s],Z[l],Q[c],m(),o].filter((function(e){return void 0!==e})).join(" ")},p),t.children)}));return t.propTypes={style:R.object,className:R.string,fontSize:R.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:R.oneOf(["light","normal","bold"]),margin:R.oneOfType([R.number,R.object,R.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:R.oneOf(["left","right","center","justify"]),textTransform:R.oneOf(["lowercase","uppercase","capitalize"]),themeColor:R.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},re=(ne("h1"),ne("h2"),ne("h3"),ne("h4"),ne("h5"),ne("h6"),ne("p"),ne("code"),ne("pre"),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,p=n.width*n.height,d=l*c;return Number((d/(u+p-d)).toFixed(4))}return 0}(e,t);o>n&&(n=o,r=t)}})),r}),oe=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},ie=function(e){return e&&e.ownerDocument||window.document},ae=function(e){var t=oe(),n=ie(e);return t.edge||t.safari?n.body:n.documentElement},se=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},le=function(e){var t=ae(e);if(!e||e===document.body||e===document.documentElement)return t;for(var n=e;n&&!se(n)&&n!==document.body;)n=n.parentNode;return n===document.body?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"}($||($={}));var ce=function(){},ue=function(e,t,n){void 0===n&&(n={});var r,o,i,a,s=n.onIsPressedChange,l=void 0===s?ce:s,c=n.onIsScrollingChange,u=void 0===c?ce:c,p=n.onVelocityChange,d=void 0===p?ce:p,f=n.onOffsetChange,h=void 0===f?ce:f,m=n.onPageOffsetChange,v=void 0===m?ce:m,g=n.onClientOffsetChange,y=void 0===g?ce:g,b=n.onScrollOffsetChange,k=void 0===b?ce:b,w=n.onInitialScrollOffsetChange,C=void 0===w?ce:w,O=t.payload,x=O.element,S=O.hint,E=e.autoScrollDirection,I=e.scrollableParent,N=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(N.type){case $.POINTER_DOWN:if(N.type===$.POINTER_DOWN&&(!N.originalEvent.isPrimary||0!==N.originalEvent.button))break;case $.MOUSE_DOWN:if(N.type===$.MOUSE_DOWN&&N.originalEvent.which&&N.originalEvent.which>1||e.ignoreMouse)break;case $.TOUCH_START:if(N.type===$.TOUCH_START&&1!==N.originalEvent.touches.length)break;case $.START:var T=I||le(t.payload.element);C(T instanceof Window?{x:T.scrollX,y:T.scrollY}:{x:T.scrollLeft,y:T.scrollTop}),y({x:N.clientX,y:N.clientY}),v({x:N.pageX,y:N.pageY}),h({x:N.offsetX,y:N.offsetY}),l(!0),O.onPress&&O.onPress(N);break;case $.SCROLL:if(N.type===$.SCROLL&&!e.pressed)break;var D=I||le(x),_=D instanceof Window?{x:D.scrollX,y:D.scrollY}:{x:D.scrollLeft,y:D.scrollTop};N.scrollX=_.x-e.initialScrollOffset.x,N.scrollY=_.y-e.initialScrollOffset.y,k({x:N.scrollX,y:N.scrollY});case $.POINTER_MOVE:if(N.type===$.POINTER_MOVE&&!N.originalEvent.isPrimary)break;case $.MOUSE_MOVE:case $.TOUCH_MOVE:if(N.type===$.TOUCH_MOVE&&1!==N.originalEvent.touches.length)break;case $.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==N.originalEvent.type&&x){var M=ie(x),P=I||le(M.elementFromPoint(N.clientX,N.clientY)),j=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}(N.pageX,N.pageY,function(e,t){var n=ae(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}}(P,function(e){var t=ie(e);return t&&t.defaultView||window}(x)));d({x:E&&!1===E.horizontal?0:j.x,y:E&&!1===E.vertical?0:j.y}),u(0!==j.y||0!==j.x)}!e.drag&&O.onDragStart&&O.onDragStart(N),O.onDrag&&O.onDrag(N);var R=re(S||x,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(S||x)}))),A=e.drops.find((function(e){return e.element===R}));A&&R&&(r=N.clientX,o=N.clientY,i=I||le(R),(a=i.getBoundingClientRect()).top<=o&&a.left<=r&&o<=a.bottom&&r<=a.right)&&R!==x?(e.drop&&e.drop.element)!==R?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(N),A.onDragEnter&&A.onDragEnter(N)):A.onDragOver&&A.onDragOver(N):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(N)}y({x:N.clientX,y:N.clientY}),v({x:N.pageX,y:N.pageY});break;case $.POINTER_UP:if(N.type===$.POINTER_UP&&!N.originalEvent.isPrimary)break;case $.MOUSE_UP:case $.TOUCH_END:if(N.type===$.TOUCH_END&&1!==N.originalEvent.touches.length)break;case $.END:l(!1),u(!1),O.onRelease&&O.onRelease(N),e.drop&&e.drop.onDrop&&e.drop.onDrop(N),O.onDragEnd&&O.onDragEnd(N);break;case $.POINTER_CANCEL:case $.CONTEXT_MENU:case $.TOUCH_CANCEL:case $.CANCEL:l(!1),u(!1),O.onDragEnd&&O.onDragEnd(N),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(N)}},pe=function(e,t){if(e){var n,r;e===ae(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)}},de=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])}]},fe=r.createContext([void 0,g]),he=r.createContext([void 0,g]),me=r.createContext([[],g,g]),ve=r.createContext([[],g,g]);function ge(e,t,n){void 0===n&&(n={});var o=t.onPress,i=void 0===o?g:o,a=t.onRelease,s=void 0===a?g:a,l=t.onDragStart,c=void 0===l?g:l,u=t.onDrag,p=void 0===u?g:u,d=t.onDragEnd,f=void 0===d?g:d,h=n.hint,m=void 0===h?null:h,v=n.mouseOnly,y=void 0!==v&&v,b=n.autoScroll,k=void 0===b||b,w=n.scrollContainer,C=void 0===w?null:w,O=r.useState(!1),x=O[0],S=O[1],E=r.useState(!1),I=E[0],N=E[1],T=de(he)[0],D=de(fe),_=D[0],M=D[1],P=r.useContext(ve)[0],j=r.useContext(me),R=j[0],A=j[1],F=j[2],L=r.useRef({x:0,y:0}),B=r.useRef(),z=r.useRef(!1),V=r.useRef(),H=r.useRef(!1),K=r.useRef({x:0,y:0}),W=r.useRef({x:0,y:0}),$=r.useRef({x:0,y:0}),U=r.useRef({x:0,y:0}),q=r.useRef({x:0,y:0}),G=r.useRef({x:0,y:0}),X=Boolean(window&&"undefined"!=typeof window&&window.PointerEvent),J=!y&&X,Y=r.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),Z=r.useCallback((function(){return m&&m.current&&m.current.element?m.current.element:m?m.current:null}),[m]),Q=r.useCallback((function(){return C&&C.current&&C.current.element?C.current.element:C?C.current:null}),[C]),ee=r.useCallback((function(){return"object"==typeof k&&k.boundaryElementRef&&k.boundaryElementRef.current&&k.boundaryElementRef.current.element?k.boundaryElementRef.current.element:"object"==typeof k&&k.boundaryElementRef&&k.boundaryElementRef.current?k.boundaryElementRef.current:null}),[k]),te=r.useRef(null);r.useImperativeHandle(te,(function(){return{element:Y(),hint:Z(),onPress:Ce,onDragStart:xe,onDrag:Se,onDragEnd:Ee,onRelease:Oe,data:e.current}}));var ne=r.useCallback((function(){var e=Y();return e&&e.ownerDocument||document}),[Y]),re=r.useCallback((function(){var e=ne();return e&&e.defaultView||window}),[ne]),oe=r.useCallback((function(){return{drag:_?_.current:null,drop:T?T.current:null,drags:R.map((function(e){return e.current})),drops:P.map((function(e){return e.current})),pressed:x,ignoreMouse:z.current,scrollOffset:q.current,offset:K.current,pageOffset:W.current,initialScrollOffset:G.current,clientOffset:$.current,initialClientOffset:U.current,velocity:L.current,autoScroll:Boolean("object"==typeof k?!1!==k.enabled:k),scrollableParent:ee(),autoScrollDirection:"object"==typeof k?k.direction:{horizontal:!0,vertical:!0},isScrolling:I}}),[_,T,R,P,x,k,ee,I]),ie=r.useCallback((function(e){S(e)}),[]),ae=r.useCallback((function(e){N(e)}),[]),se=r.useCallback((function(e){L.current=e}),[]),ce=r.useCallback((function(e){K.current=e}),[]),ge=r.useCallback((function(e){$.current=e}),[]),ye=r.useCallback((function(e){W.current=e}),[]),be=r.useCallback((function(e){U.current=e}),[]),ke=r.useCallback((function(e){q.current=e}),[]),we=r.useCallback((function(e){G.current=e}),[]),Ce=r.useCallback((function(e){i(e)}),[i]),Oe=r.useCallback((function(e){s(e)}),[s]),xe=r.useCallback((function(t){M(te,{target:e.current,event:t}),c(t)}),[M,e,c]),Se=r.useCallback((function(e){p(e)}),[p]),Ee=r.useCallback((function(t){H.current||(M(null,{target:e.current,event:t}),f(t))}),[f,M,e]),Ie=r.useCallback((function(e){ue(oe(),{event:e,payload:te.current},{onVelocityChange:se,onOffsetChange:ce,onClientOffsetChange:ge,onPageOffsetChange:ye,onInitialClientOffsetChange:be,onScrollOffsetChange:ke,onInitialScrollOffsetChange:we,onIsPressedChange:ie,onIsScrollingChange:ae})}),[oe,se,ce,ye,ge,be,we,ie,ke,ae]),Ne=r.useCallback((function(e){Ie(e)}),[Ie]),Te=r.useCallback((function(e){Ie(e)}),[Ie]),De=r.useCallback((function(e){Ie(e)}),[Ie]),_e=r.useCallback((function(e){Ie(e)}),[Ie]),Me=r.useCallback((function(e){Ie(e)}),[Ie]),Pe=r.useCallback((function(e){Ie(e)}),[Ie]),je=r.useCallback((function(e){Ie(e)}),[Ie]),Re=r.useCallback((function(e){e.preventDefault(),Ie(e)}),[Ie]),Ae=r.useCallback((function(e){e.preventDefault(),Ie(e)}),[Ie]),Fe=r.useCallback((function(e){e.preventDefault(),Ie(e)}),[Ie]),Le=r.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=re();z.current=!0,V.current=t.setTimeout((function(){z.current=!1}),2e3)}Ie(e)}),[Ie,re]),Be=r.useCallback((function(e){Ie(e)}),[Ie]),ze=r.useCallback((function(){var e=Y();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[Y]),Ve=r.useCallback((function(){return A(te),function(){F(te)}}),[F,A]);r.useEffect((function(){var e=re();if(I){var t=Q()||le(document.elementFromPoint($.current.x,$.current.y));e.clearInterval(B.current),B.current=e.setInterval((function(){pe(t,{x:L.current.x,y:L.current.y})}),50)}return function(){e.clearInterval(B.current)}}),[Y,Q,re,I]),r.useEffect(ze,[ze]),r.useEffect((function(){var e=re(),t=Y(),n=ne();if(J){if(t)le(t).addEventListener("scroll",Be,{passive:!0}),t.addEventListener("pointerdown",Ne,{passive:!0});x&&(n.addEventListener("pointermove",Te),n.addEventListener("pointerup",_e,!0),n.addEventListener("contextmenu",Re),n.addEventListener("pointercancel",De,{passive:!0}))}else e.addEventListener("touchmove",g,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",Me,{passive:!0}),y||(t.addEventListener("touchstart",Ae,{passive:!0}),x&&(t.addEventListener("touchmove",Fe,{passive:!0}),t.addEventListener("touchend",Le,{passive:!0})))),x&&(n.addEventListener("mousemove",Pe,{passive:!0}),n.addEventListener("mouseup",je,{passive:!0}));return function(){if(t){var r=le(t);r&&r.removeEventListener("scroll",Be),t.removeEventListener("pointerdown",Ne),t.removeEventListener("mousedown",Me),t.removeEventListener("touchstart",Ae),t.removeEventListener("touchmove",Fe),t.removeEventListener("touchend",Le)}n.removeEventListener("pointermove",Te),n.removeEventListener("pointerup",_e,!0),n.removeEventListener("contextmenu",Re),n.removeEventListener("pointercancel",De),n.removeEventListener("mousemove",Pe),n.removeEventListener("mouseup",je),e.removeEventListener("touchmove",g),e.clearTimeout(V.current)}}),[x,re,Y,ne,y,J,Re,Me,Pe,je,De,Ne,Te,_e,Le,Fe,Ae,Be]),r.useEffect((function(){return function(){H.current=!0}}),[]),r.useLayoutEffect(Ve,[Ve])}var ye=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useRef(null),i=r.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);r.useImperativeHandle(o,(function(){return{element:i()||null}})),r.useImperativeHandle(t,(function(){return o.current})),r.useImperativeHandle(e.childRef,(function(){return n.current}));var a=r.useCallback((function(t){e.onPress&&e.onPress({element:i(),target:o.current,event:t})}),[i,e.onPress]),s=r.useCallback((function(t){e.onRelease&&e.onRelease({element:i(),target:o.current,event:t})}),[i,e.onRelease]),l=r.useCallback((function(t){e.onDragStart&&e.onDragStart({element:i(),target:o.current,event:t})}),[e,i]),c=r.useCallback((function(t){e.onDrag&&e.onDrag({element:i(),target:o.current,event:t})}),[i,e.onDrag]),u=r.useCallback((function(t){e.onDragEnd&&e.onDragEnd({element:i(),target:o.current,event:t})}),[i,e.onDragEnd]);return ge(n,{onPress:a,onRelease:s,onDragStart:l,onDrag:c,onDragEnd:u},{mouseOnly:e.mouseOnly,autoScroll:e.autoScroll,hint:e.hint,scrollContainer:e.scrollContainer}),e.children?r.cloneElement(r.Children.only(e.children),{ref:n}):null}));ye.displayName="KendoReactDraggable",r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useRef(null),i=r.useCallback((function(){return n.current&&n.current.element?n.current.element:n.current}),[n]);r.useImperativeHandle(o,(function(){return{element:i()||void 0}})),r.useImperativeHandle(t,(function(){return o.current})),r.useImperativeHandle(e.childRef,(function(){return n.current}));var a=r.useCallback((function(t){e.onDragEnter&&e.onDragEnter({element:i(),target:o.current,event:t})}),[e.onDragEnter,i]),s=r.useCallback((function(t){e.onDragOver&&e.onDragOver({element:i(),target:o.current,event:t})}),[i,e.onDragOver]),l=r.useCallback((function(t){e.onDragLeave&&e.onDragLeave({element:i(),target:o.current,event:t})}),[e.onDragLeave,i]),c=r.useCallback((function(t){e.onDrop&&e.onDrop({element:i(),target:o.current,event:t})}),[e.onDrop,i]);return function(e,t){void 0===t&&(t={onDragEnter:g,onDragOver:g,onDragLeave:g,onDrop:g});var n=t.onDragEnter,o=void 0===n?g:n,i=t.onDragOver,a=void 0===i?g:i,s=t.onDragLeave,l=void 0===s?g:s,c=t.onDrop,u=void 0===c?g:c,p=de(he)[1],d=r.useContext(ve),f=d[1],h=d[2],m=r.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),v=r.useRef(null);r.useImperativeHandle(v,(function(){return{element:m(),onDragEnter:y,onDragOver:b,onDragLeave:k,onDrop:w,data:e.current}}));var y=r.useCallback((function(t){p(v,{target:e.current,event:t}),o(t)}),[p,e,o]),b=r.useCallback((function(e){a(e)}),[a]),k=r.useCallback((function(t){p(null,{target:e.current,event:t}),l(t)}),[p,e,l]),w=r.useCallback((function(t){p(null,{target:e.current,event:t}),u(t)}),[p,e,u]),C=r.useCallback((function(){return f(v),function(){h(v)}}),[h,f]);r.useLayoutEffect(C,[C])}(n,{onDragEnter:a,onDragOver:s,onDragLeave:l,onDrop:c}),e.children?r.cloneElement(r.Children.only(e.children),{ref:n}):null})).displayName="KendoReactDroppable"},function(e,t){e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"Toolbar",(function(){return z})),n.d(t,"ToolbarItem",(function(){return H})),n.d(t,"ToolbarSeparator",(function(){return W})),n.d(t,"ToolbarSpacer",(function(){return $})),n.d(t,"Button",(function(){return m})),n.d(t,"ButtonGroup",(function(){return b})),n.d(t,"SplitButton",(function(){return M})),n.d(t,"SplitButtonItem",(function(){return O})),n.d(t,"DropDownButton",(function(){return F})),n.d(t,"DropDownButtonItem",(function(){return j})),n.d(t,"Chip",(function(){return ie})),n.d(t,"ChipList",(function(){return te})),n.d(t,"FloatingActionButton",(function(){return ye})),n.d(t,"FloatingActionButtonItem",(function(){return ue}));var r,o=n(0),i=n(1),a=n(2),s={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493378,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"},l=':not(.k-state-disabled):not([disabled]):not([disabled="true"])',c=["button"+l,".k-button-group > button"+l,".k-dropdown > .k-dropdown-wrap"+l,".k-colorpicker > .k-picker-wrap"+l],u={button:"k-button",flat:"k-flat",outline:"k-outline",clear:"k-button-clear",primary:"k-primary","state-selected":"k-state-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-state-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"},p=(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)},f=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},h=u;var m=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(a.v)(s),n.state={selected:!0===n.props.togglable&&!0===n.props.selected},n}return p(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,t=this,n=this.props,r=n.children,i=n.look,s=n.primary,l=n.togglable,c=n.icon,u=n.iconClass,p=n.imageUrl,m=n.imageAlt,v=n.className,g=(n.onClick,f(n,["children","look","primary","togglable","icon","iconClass","imageUrl","imageAlt","className","onClick"])),y=void 0!==c||void 0!==u||void 0!==p,b=void 0!==r,k={className:Object(a.e)([h.button],((e={})[h[""+i]]="default"!==i,e[h.primary]=s,e[h["state-disabled"]]=this.props.disabled,e[h["state-selected"]]=this.state.selected,e[h["button-icon"]]=!b&&y,e[h["button-icontext"]]=b&&y,e),[h[""+this.props.dir]],v),onClick:this.handleClick,role:l?"checkbox":void 0,"aria-disabled":this.props.disabled||void 0,"aria-checked":l?this.state.selected:void 0},w=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-image",alt:i,src:t});if(n){var s=Object(a.e)("k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:s})}return r?o.createElement("span",{role:"presentation",className:r}):null}({icon:c,iconClass:u,imageUrl:p,imageAlt:m});return o.createElement("button",d({},k,g,{ref:function(e){return t._element=e}}),w,r)},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,look:i.oneOf(["default","flat","outline","clear"]),primary:i.bool,selected:i.bool,togglable:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,imageAlt:i.string},t.defaultProps={look:"default",primary:!1,togglable:!1},t}(o.Component),v=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)}}(),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=u,b=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,Object(a.v)(s),n}return v(t,e),t.prototype.render=function(){var e,t=this,n=this.mapButtons(this.props.children),r=Object(a.e)([y["button-group"]],((e={})[y["state-disabled"]]=this.props.disabled,e[y["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",g({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.e)(e.props.className,((i={})[y["group-start"]]=r?n:0===t,i[y["group-end"]]=r?0===t:n,i)),l=g({},this.props.width?{width:this.props.width}:{},e.props.style||{}),c=this.props.disabled||e.props.disabled,u=g({},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),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(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){return t.props.onClick(e,t.props.index)},t}return k(t,e),t.prototype.render=function(){var e=this.props,t=e.dataItem,n=e.focused,r=e.id,i=e.onDown,s=e.render,l=o.createElement("li",{id:r,className:Object(a.e)("k-item",{"k-state-focused":n,"k-state-selected":t.selected,"k-state-disabled":t.disabled}),onClick:this.onClick,onMouseDown:i,onPointerDown:i,role:"menuItem","aria-disabled":t.disabled||void 0},this.renderContent());return void 0!==this.props.item&&void 0!==s?s.call(void 0,l,this.props):l},t.prototype.renderContent=function(){var e=this.props,t=e.dataItem,n=e.textField,r=e.index,i=this.props.dataItem.render||this.props.item||(void 0===this.props.item?this.props.render:null),a=void 0!==t.text?t.text:n?t[n]:t,s=t.icon?"k-icon k-i-"+t.icon:t.iconClass;return i&&o.createElement(i,{item:t,itemIndex:r})||[s&&o.createElement("span",{className:s,role:"presentation",key:"icon"}),t.imageUrl&&o.createElement("img",{className:"k-image",alt:"",src:t.imageUrl,role:"presentation",key:"image"}),a]},t}(o.Component),C=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)}}(),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.render=function(){return null},t.propTypes={text:i.string,icon:i.string,iconClass:i.string,imageUrl:i.string,disabled:i.bool,render:i.any},t}(o.Component),x=function(e,t,n,r){if(n)return e;switch(t){case a.b.enter:case a.b.space:case a.b.esc:return-1;case a.b.up:case a.b.left:return Math.max(0,e-1);case a.b.down:case a.b.right:return Math.min(r-1,e+1);default:return e}},S=n(10);function E(e){var t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function I(e){var t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}var N,T,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)}}(),_=u,M=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(a.m)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==a.b.down?n.opened&&e.keyCode===a.b.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===a.b.enter||e.keyCode===a.b.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===a.b.esc&&(r={focusedIndex:-1,opened:!1},n.dispatchPopupEvent(e,r.opened)),n.opened){var o=x(t,e.keyCode,e.altKey,n.buttonsData.length);o!==t&&((r=r||{}).focusedIndex=o);var i=e.keyCode===a.b.up||e.keyCode===a.b.down||e.keyCode===a.b.left||e.keyCode===a.b.right;!e.altKey&&i&&e.preventDefault()}r&&n.setState(r)}},n.onFocus=function(e){Object(a.g)(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(a.g)(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(a.g)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(a.v)(s),n}return D(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||o.Children.toArray(this.props.children).filter((function(e){return e&&e.type===O})).map((function(e){return e.props}));var t=this.isRtl(),n=t?"rtl":void 0,r=this.props,i=r.tabIndex,s=r.disabled,l=this.state.focusedIndex;return o.createElement("div",{className:Object(a.e)("k-widget","k-split-button","k-button-group",[_[""+this.props.look]],{"k-state-focused":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},o.createElement(m,{onClick:function(t){return e.onItemClick(t,-1)},disabled:s||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,look:this.props.look,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":s,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" splitbutton","aria-owns":this.guid,"aria-activedescendant":l>=0?this.guid+"-"+l:void 0},this.props.text),o.createElement(m,{icon:"arrow-s",disabled:s||void 0,tabIndex:-1,look:this.props.look,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(a.g)(this.props.onButtonClick,e,this,void 0):Object(a.g)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))},t.prototype.renderPopup=function(e){var t=this.props.popupSettings,n=void 0===t?{}:t;return o.createElement(S.Popup,{anchor:this.wrapper,show:this.opened,animate:n.animate,popupClass:Object(a.e)("k-list-container k-reset k-group",n.popupClass),anchorAlign:n.anchorAlign||E(e),popupAlign:n.popupAlign||I(e),style:e?{direction:"rtl"}:void 0},o.createElement("ul",{className:"k-list k-reset",role:"menu",id:this.guid},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,i=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return o.createElement(w,{dataItem:t,textField:i,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:i.string,onButtonClick:i.func,onFocus:i.func,onBlur:i.func,onItemClick:i.func,onOpen:i.func,onClose:i.func,text:i.string,items:i.arrayOf(i.any),textField:i.string,tabIndex:i.number,disabled:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,popupSettings:i.object,itemRender:i.any,item:i.func,look:i.string,className:i.string,buttonClass:i.string,dir:i.string},t}(o.Component),P=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)}}(),j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),t.prototype.render=function(){return null},t.propTypes={text:i.string,icon:i.string,iconClass:i.string,imageUrl:i.string,selected:i.bool,disabled:i.bool,render:i.any},t}(o.Component),R=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)}}(),A=function(){return(A=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)},F=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(a.m)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==a.b.down?n.opened&&e.keyCode===a.b.up&&(n.dispatchPopupEvent(e,!1),n.setState({focusedIndex:-1,opened:!1})):(n.dispatchPopupEvent(e,!0),n.setState({focusedIndex:0,opened:!0}));else{var r=A({},n.state);if(e.keyCode===a.b.enter||e.keyCode===a.b.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===a.b.esc&&(r.focusedIndex=-1,r.opened=!1,n.dispatchPopupEvent(e,r.opened)),n.opened){var o=x(t,e.keyCode,e.altKey,n.buttonsData.length);r.focusedIndex=o;var i=e.keyCode===a.b.up||e.keyCode===a.b.down||e.keyCode===a.b.left||e.keyCode===a.b.right;!e.altKey&&i&&e.preventDefault()}n.setState(r)}},n.onFocus=function(e){n.setState({focused:!0,focusedIndex:n.opened?0:-1}),Object(a.g)(n.props.onFocus,e,n,void 0)},n.onBlur=function(e){n.setState({focused:!1,opened:!1,focusedIndex:-1}),Object(a.g)(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(a.g)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(a.v)(s),n}return R(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,r=this.props,i=r.tabIndex,s=r.disabled,l=this.state.focusedIndex;return this.buttonsData=this.props.items||o.Children.toArray(this.props.children).filter((function(e){return e&&e.type===j})).map((function(e){return e.props})),o.createElement("div",{className:Object(a.e)("k-widget","k-dropdown-button",this.props.className,{"k-state-focused":this.state.focused}),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},o.createElement(m,{onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:s||void 0,tabIndex:i,accessKey:this.props.accessKey,icon:this.props.icon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,look:this.props.look,primary:this.props.primary,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":s,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" dropdownbutton","aria-owns":this.guid,"aria-activedescendant":l>=0?this.guid+"-"+l: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(a.g)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})},t.prototype.renderPopup=function(e){var t=this.props.popupSettings,n=void 0===t?{}:t;return o.createElement(S.Popup,{anchor:this.wrapper,show:this.opened,animate:n.animate,popupClass:Object(a.e)("k-list-container k-reset k-group",n.popupClass),anchorAlign:n.anchorAlign||E(e),popupAlign:n.popupAlign||I(e),style:e?{direction:"rtl"}:void 0},o.createElement("ul",{className:"k-list k-reset",role:"menu",id:this.guid},this.renderChildItems()))},t.prototype.renderChildItems=function(){var e=this,t=this.props,n=t.item,r=t.itemRender,i=t.textField;return this.buttonsData.length>0?this.buttonsData.map((function(t,a){return o.createElement(w,{dataItem:t,textField:i,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:i.string,primary:i.bool,onFocus:i.func,onBlur:i.func,onItemClick:i.func,onOpen:i.func,onClose:i.func,items:i.arrayOf(i.any),textField:i.string,tabIndex:i.number,disabled:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,popupSettings:i.object,itemRender:i.func,item:i.func,look:i.string,className:i.string,buttonClass:i.string,dir:i.string},t}(o.Component),L=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)}}(),B=function(){return(B=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=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===a.b.left||e.keyCode===a.b.right)&&!e.defaultPrevented&&-1!==r.buttons.findIndex((function(e){return e===t}))){var n=r.focusedIndex;e.keyCode===a.b.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,B({target:r},i,{nativeEvent:e}))}}},Object(a.v)(s),r}return L(t,e),Object.defineProperty(t.prototype,"selectors",{get:function(){return this.props.buttons||c},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 o.createElement("div",{className:Object(a.e)("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:i.number,dir:i.string,keyboardNavigation:i.bool,style:i.object,className:i.string,onResize:i.func,buttons:i.arrayOf(i.string)},t.defaultProps={tabIndex:0},t}(o.Component),V=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)}}(),H=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t}return V(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;return o.createElement("span",{className:this.props.className,style:this.props.style,ref:function(t){return e._element=t}},this.props.children)},t.propTypes={className:i.string},t}(o.PureComponent),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(){return null!==e&&e.apply(this,arguments)||this}return K(t,e),t.prototype.render=function(){return o.createElement(H,{className:"k-separator"})},t}(o.PureComponent),$=o.forwardRef((function(e,t){var n=o.useRef(null),r=o.useRef(null);o.useImperativeHandle(r,(function(){return{element:n.current}})),o.useImperativeHandle(t,(function(){return{element:n.current}}));var i=o.useMemo((function(){return Object(a.e)("k-spacer",e.className)}),[e.className]);return o.createElement("span",{ref:n,className:i})}));$.propTypes={className:i.string},function(e){e.single="single",e.multiple="multiple",e.none="none"}(N||(N={})),function(e){e.toggle="toggle",e.remove="remove"}(T||(T={}));var U;!function(e){e.next="next",e.prev="prev",e.current="current",e.reset="reset"}(U||(U={}));var q;!function(e){e.remove="remove",e.add="add",e.reorder="reorder"}(q||(q={}));var 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)},X=o.createContext([null,function(e){}]),J=o.createContext([null,function(e){}]),Y=o.createContext([null,function(e){}]),Z=function(e,t,n){var r=o.useState(e),i=r[0],a=r[1];return[i,function(e){var r=function(e,t){switch(t.selection){case N.single:switch(t.type){case T.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 T.remove:return t.payload===e?null:e;default:return e}case N.multiple:switch(t.type){case T.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 T.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 N.none:return null;default:return e}}(t.state||i,G({},e,t));n&&n(r,e.event),a(r)}]},Q=function(e){var t=o.useState(null),n=t[0],r=t[1];return[n,function(t){var n=function(e,t){var n=t.items.findIndex((function(t){return t===e}));switch(t.type){case U.next:return n===t.items.length-1?e:t.items[n+1];case U.prev:return 0===n?e:t.items[n-1];case U.current:return t.payload;case U.reset:return null;default:return e}}(t.payload,G({},t,e));r(n)}]},ee=function(e,t,n){var r=o.useState(e),i=r[0],a=r[1];return[i,function(e){var r=function(e,t){switch(t.type){case q.add:break;case q.remove:return e.filter((function(e){return e[t.valueField]!==t.payload}));case q.reorder:break;default:return e}}(t.state||i,G({},e,t));n&&n(r,e.event),a(r)}]},te=o.forwardRef((function(e,t){Object(a.v)(s);var n=o.useRef(null),r=o.useRef(null),i=Object(a.q)(r,e.dir),l=o.useMemo((function(){return e.chip||ie}),[e.chip,ie]),c=o.useMemo((function(){return e.selection||re.selection}),[e.selection,re.selection]);o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var u=o.useCallback((function(t,r){e.onChange&&n.current&&e.onChange.call(void 0,{value:t,target:n.current,syntheticEvent:r})}),[e.onChange]),p=Z(e.value||e.defaultValue,{selection:c,state:e.value},u),d=p[0],f=p[1],h=o.useCallback((function(t,r){e.onDataChange&&n.current&&e.onDataChange.call(void 0,{value:t,target:n.current,syntheticEvent:r})}),[e.onDataChange]),m=ee(e.data||e.defaultData||re.defaultData,{state:e.data,valueField:e.valueField||re.valueField},h),v=m[0],g=m[1],y=o.useCallback((function(t,n){return t.push(n[e.valueField||re.valueField]),t}),[e.valueField,re.valueField]),b=o.useMemo((function(){return e.data||v}),[e.data,v]),k=o.useMemo((function(){return e.value||d}),[e.value,d]),w=o.useMemo((function(){return b.reduce(y,[])}),[b,y]),C=Q({items:w}),O=C[0],x=C[1],S=Object(a.s)(e,n);return o.createElement(X.Provider,{value:[k,f]},o.createElement(J.Provider,{value:[O,x]},o.createElement(Y.Provider,{value:[b,g]},o.createElement("div",G({ref:r},S,{role:"listbox",id:e.id,dir:i,style:e.style,tabIndex:Object(a.k)(e.tabIndex,e.disabled,void 0),className:Object(a.e)("k-chip-list",{"k-rtl":"rtl"===i,"k-selection-single":"single"===c,"k-selection-multiple":"multiple"===c,"k-state-disabled":e.disabled},e.className),"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy}),b.map((function(t){return o.createElement(l,{role:"option",dataItem:t,key:Object(a.l)(e.valueField||re.valueField)(t),text:Object(a.l)(e.textField||re.textField)(t),value:Object(a.l)(e.valueField||re.valueField)(t)})}))))))})),ne={id:i.string,className:i.string,tabIndex:i.number,data:i.any,defaultData:i.arrayOf(i.any),onDataChange:i.func,value:i.oneOfType([i.any,i.arrayOf(i.any)]),defaultValue:i.oneOfType([i.any,i.arrayOf(i.any)]),onChange:i.func,selection:i.oneOf(["single","none","multiple"]),textField:i.string,valueField:i.string,disabled:i.bool,dir:i.oneOf(["ltr","rtl"]),ariaLabelledBy:i.string,ariaDescribedBy:i.string},re={chip:ie,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};te.displayName="KendoReactChipList",te.propTypes=ne,te.defaultProps=re;var oe=function(){return(oe=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)},ie=o.forwardRef((function(e,t){Object(a.v)(s);var n=o.useRef(null),r=o.useRef(null),i=Object(a.q)(r,e.dir);o.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),o.useImperativeHandle(t,(function(){return n.current}));var l=o.useContext(X),c=l[0],u=l[1],p=o.useContext(J),d=p[0],f=p[1],h=o.useContext(Y)[1],m=o.useMemo((function(){return e.selected||(Array.isArray(c)?c.some((function(t){return t===e.value})):c===e.value)}),[e.selected,e.value,c]),v=o.useMemo((function(){return d===e.value}),[e.value,d]),g=o.useMemo((function(){return e.look||se.look}),[e.look]);o.useEffect((function(){v&&r.current&&r.current.focus()}),[v]);var y=o.useCallback((function(t){u({type:T.toggle,payload:e.value,event:t})}),[e.onClick,u,e.value]),b=o.useCallback((function(t){e.removable&&(h({type:q.remove,payload:e.value,event:t}),f({type:U.reset,payload:e.value,event:t}),u({type:T.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:n.current,syntheticEvent:t}))}),[e.onRemove,e.removable,h,f,u]),k=o.useCallback((function(t){switch(t.keyCode){case a.b.left:f({type:U.prev,payload:e.value,event:t});break;case a.b.right:f({type:U.next,payload:e.value,event:t});break;case a.b.enter:u({type:T.toggle,payload:e.value,event:t});break;case a.b.delete:b(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onKeyDown,f,u,b]),w=o.useCallback((function(t){f({payload:e.value,type:U.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onFocus,f]),C=o.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onBlur]),O=Object(a.s)(e,n,{onClick:y});return o.createElement("div",oe({},O,{role:e.role,id:e.value,style:e.style,ref:r,dir:i,tabIndex:Object(a.k)(e.tabIndex,e.disabled,void 0),className:Object(a.e)("k-chip",{"k-rtl":"rtl"===i,"k-state-disabled":e.disabled,"k-state-selected":m,"k-state-focus":v,"k-chip-success":"success"===e.type,"k-chip-warning":"warning"===e.type,"k-chip-error":"error"===e.type,"k-chip-info":"info"===e.type,"k-chip-has-icon":e.icon,"k-chip-outline":"outline"===g||"outlined"===g,"k-chip-solid":"solid"===g||"filled"===g},e.className),"aria-checked":m,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,onFocus:w,onBlur:C,onKeyDown:k}),m&&o.createElement("span",{className:"k-selected-icon-wrapper"},o.createElement("span",{className:"k-selected-icon k-icon "+(e.selectedIcon||se.selectedIcon)})),e.icon&&o.createElement("span",{className:"k-icon k-chip-icon "+e.icon}),o.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&o.createElement("span",{"aria-label":e.text,className:"k-chip-label"},e.text)),e.removable&&o.createElement("span",{className:"k-remove-icon",onClick:b},o.createElement("span",{className:"k-icon "+e.removeIcon})))})),ae={id:i.string,text:i.string,value:i.any,type:i.oneOf(["none","success","warning","error","info"]),dir:i.oneOf(["ltr","rtl"]),removable:i.bool,removeIcon:i.string,disabled:i.bool,icon:i.string,selectedIcon:i.string,look:i.string,onRemove:i.func,dataItem:i.any,selected:i.bool,ariaDescribedBy:i.string},se={disabled:!1,removable:!1,selectedIcon:"k-i-check",look:"solid",removeIcon:"k-i-close-circle",dir:"ltr"};ie.displayName="KendoReactChip",ie.propTypes=ae,ie.defaultProps=se;var 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=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},ue=o.forwardRef((function(e,t){var n=e.className,r=e.disabled,i=e.text,s=e.icon,l=e.style,c=e.id,u=e.focused,p=e.tabIndex,d=e.index,f=e.dataItem,h=e.item,m=e.onDown,v=e.onClick,g=ce(e,["className","disabled","text","icon","style","id","focused","tabIndex","index","dataItem","item","onDown","onClick"]),y=o.useRef(null),b=o.useCallback((function(){y.current&&y.current.focus()}),[]),k=o.useCallback((function(){return{element:y.current,focus:b}}),[b]);o.useImperativeHandle(t,k);var w=o.useCallback((function(e){v&&void 0!==d&&!r&&v(e,d)}),[v,d]),C=o.useMemo((function(){return Object(a.e)("k-fab-item",{"k-state-focus":u,"k-state-disabled":r},n)}),[n,r,u]),O=h;return o.createElement("li",le({ref:y,id:c,className:C,style:l,role:"menuitem",tabIndex:Object(a.k)(p,r),"aria-disabled":r,"aria-label":(i||"")+" floatingactionbutton item",onClick:w,onMouseDown:m,onPointerDown:m},g),O?o.createElement(O,{itemIndex:d,item:f}):o.createElement(o.Fragment,null,i&&o.createElement("span",{className:"k-fab-item-text"},i),s&&o.createElement("span",{className:Object(a.e)("k-fab-item-icon k-icon k-i-"+s)})))}));ue.propTypes={className:i.string,style:i.object,children:i.any,disabled:i.bool,focused:i.bool,index:i.number,icon:i.string,text:i.string,tabIndex:i.number,customProp:i.any},ue.displayName="KendoFloatingActionButtonItem";var pe=function(e){return"number"==typeof e?e+"px":e},de=function(e,t){var n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},fe=function(e,t){var n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},he=function(e,t){return{end:t?"left":"right",center:"left",start:t?"right":"left"}[e.horizontal||"end"]},me=function(e){return{top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]},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=o.forwardRef((function(e,t){Object(a.v)(s);var n=e.align,r=void 0===n?be.align:n,i=e.alignOffset,l=e.className,c=e.disabled,u=e.icon,p=e.iconClass,d=e.id,f=e.items,h=e.item,m=e.text,v=e.positionMode,g=void 0===v?be.positionMode:v,y=e.shape,b=void 0===y?be.shape:y,k=e.size,w=void 0===k?be.size:k,C=e.style,O=e.themeColor,x=void 0===O?be.themeColor:O,E=e.tabIndex,I=e.accessKey,N=e.popupSettings,T=void 0===N?{}:N,D=e.onClick,_=e.onItemClick,M=e.onFocus,P=e.onBlur,j=e.onKeyDown,R=e.onOpen,A=e.onClose,F=ge(e,["align","alignOffset","className","disabled","icon","iconClass","id","items","item","text","positionMode","shape","size","style","themeColor","tabIndex","accessKey","popupSettings","onClick","onItemClick","onFocus","onBlur","onKeyDown","onOpen","onClose"]),L=o.useRef(null),B=o.useRef(null),z=o.useRef(null),V=o.useRef(null),H=o.useCallback((function(){B.current&&B.current.focus()}),[]),K=o.useCallback((function(){return{element:B.current,focus:H}}),[H]);o.useImperativeHandle(L,K),o.useImperativeHandle(t,(function(){return L.current}));var W=o.useState(!1),$=W[0],U=W[1],q=o.useState(!1),G=q[0],X=q[1],J=o.useState(-1),Y=J[0],Z=J[1],Q=o.useMemo((function(){return Object(a.m)()}),[]),ee=Object(a.q)(B,e.dir),te="rtl"===ee,ne=o.useMemo((function(){return Object(a.m)()}),[]);o.useEffect((function(){!function(e,t,n,r){var o=t.horizontal,i=t.vertical;if(e.current){var a=n&&void 0!==n.x?pe(n.x):"16px",s=n&&void 0!==n.x?"calc(50% + "+pe(n.x)+")":"50%",l=n&&void 0!==n.y?pe(n.y):"16px",c=n&&void 0!==n.y?"calc(50% + "+pe(n.y)+")":"50%";e.current.style.setProperty(he(t,r),"center"===o?s:a),e.current.style.setProperty(me(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"))}}(B,r,i,te)}),[B,r,i,te]),o.useEffect((function(){G&&B&&B.current&&B.current.focus()}),[G,B]);var re=o.useCallback((function(e,t){f&&Object(a.g)(t?R:A,e,K(),void 0)}),[R,A,f]),oe=o.useCallback((function(e){e.target&&!c&&(!f&&D?Object(a.g)(D,e,K(),void 0):(U(!$),X(!0),Z($?-1:0),re(e,!$)))}),[U,X,Z,D,re,$,f,c]),ie=o.useCallback((function(e){X(!0),Z($?0:-1),M&&Object(a.g)(M,e,K(),void 0)}),[M,X,Z]),ae=o.useCallback((function(e){X(!1),U(!1),Z(-1),Object(a.g)(P,e,K(),void 0),$&&re(e,!1)}),[P,X,U,Z,re]),se=o.useCallback((function(e){e.preventDefault()}),[]),le=o.useCallback((function(e,t){f&&(f[t].disabled||Object(a.g)(_,e,K(),{itemProps:f[t],itemIndex:t}))}),[_]),ce=o.useCallback((function(e,t){e.target&&f&&(Z(t),U(!1),le(e,t),re(e,!1))}),[Z,U,le,re]),ye=o.useCallback((function(e){document.activeElement===B.current&&e.preventDefault()}),[B,document.activeElement]),ke=o.useCallback((function(e){var t=Y,n=f?f.length-1:-1,o="bottom"===r.vertical;switch(e.keyCode){case a.b.enter:case a.b.space:t>=0&&le(e,t),e.preventDefault(),U(!$),Z($?-1:0);break;case a.b.esc:e.preventDefault(),U(!1),Z(-1);break;case a.b.home:e.preventDefault(),Z(0);break;case a.b.end:e.preventDefault(),Z(n);break;case a.b.down:case a.b.right:e.preventDefault(),t<n&&!o&&Z(t+1),t>0&&o&&Z(t-1);break;case a.b.up:case a.b.left:e.preventDefault(),t>0&&!o&&Z(t-1),t<n&&o&&Z(t+1)}Object(a.g)(j,e,K(),void 0)}),[j,Y,Z,te,U]),we=o.useMemo((function(){return Object(a.e)("k-fab","k-fab-"+x,"k-fab-"+b,{"k-fab-sm":"small"===w,"k-fab-md":"medium"===w,"k-fab-lg":"large"===w,"k-state-disabled":c,"k-pos-absolute":"absolute"===g,"k-pos-fixed":"fixed"===g,"k-state-focus":G},"k-"+r.vertical+"-"+r.horizontal,l)}),[x,w,b,c,g,r,G,l]),Ce=f&&f.map((function(e,t){return o.createElement(ue,ve({},e,{key:t,index:t,id:ne+"-"+t,disabled:c||e.disabled,focused:Y===t,dataItem:e,item:h,className:Object(a.e)(e.className,(n=ee||"ltr",i=r.horizontal,{rtl:{end:"k-text-left",start:"k-text-right"},ltr:{start:"k-text-left",end:"k-text-right"}}[n]["end"===i?"end":"start"])),onClick:ce,onDown:ye}));var n,i})),Oe=u&&!m,xe=(B.current?B.current.offsetWidth:0)/2-16;return o.createElement(o.Fragment,null,o.createElement("button",ve({ref:B,id:d||Q,role:f?"menubutton":"button",type:"button","aria-disabled":c,"aria-expanded":f?$:void 0,"aria-haspopup":!!f,"aria-label":(m||"")+" floatingactionbutton","aria-owns":f?ne:void 0,"aria-activedescendant":Y>=0&&f?ne+"-"+Y:void 0,tabIndex:Object(a.k)(E,c),accessKey:I,dir:ee,disabled:c,className:we,style:C,onClick:oe,onMouseDown:se,onFocus:ie,onBlur:ae,onKeyDown:ke},F),u?o.createElement("span",{role:"presentation",className:Object(a.e)("k-fab-icon k-icon k-i-"+u)}):p?o.createElement("span",{role:"presentation",className:p}):null,m&&o.createElement("span",{className:"k-fab-text"},m)),o.createElement(S.Popup,{ref:V,anchor:B.current,show:$,animate:T.animate,popupClass:Object(a.e)("k-popup-transparent k-fab-popup",T.popupClass),anchorAlign:T.anchorAlign||de(r,te),popupAlign:T.popupAlign||fe(r,te),style:{boxShadow:"none"}},o.createElement("ul",{ref:z,role:"menu","aria-labelledby":d,id:ne,className:Object(a.e)("k-fab-items",{"k-fab-items-bottom":"bottom"!==r.vertical,"k-fab-items-top":"bottom"===r.vertical}),style:{paddingLeft:Oe?xe:void 0,paddingRight:Oe?xe:void 0}},Ce)))}));ye.propTypes={className:i.string,style:i.object,id:i.string,dir:i.string,tabIndex:i.number,accessKey:i.string,disabled:i.bool,icon:i.string,iconClass:i.string,text:i.string,alignOffset:i.shape({x:i.oneOfType([i.number,i.string]),y:i.oneOfType([i.number,i.string])}),align:i.shape({vertical:i.oneOf(["top","middle","bottom"]),horizontal:i.oneOf(["start","center","end"])}),positionMode:i.oneOf(["absolute","fixed"]),shape:i.oneOf(["rectangle","rounded","pill"]),size:i.oneOf(["small","medium","large"]),themeColor:i.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};var be={align:{vertical:"bottom",horizontal:"end"},shape:"pill",size:"medium",themeColor:"primary",positionMode:"fixed"};ye.displayName="KendoFloatingActionButton"},function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"getHtml",(function(){return Tt})),n.d(t,"setHtml",(function(){return Dt})),n.d(t,"parseContent",(function(){return Nt})),n.d(t,"trimWhitespace",(function(){return xt})),n.d(t,"htmlToFragment",(function(){return St})),n.d(t,"domToPmDoc",(function(){return It})),n.d(t,"pmDocToFragment",(function(){return Et})),n.d(t,"applyInlineStyle",(function(){return ln})),n.d(t,"getInlineStyles",(function(){return on})),n.d(t,"toggleInlineFormat",(function(){return sn})),n.d(t,"applyLink",(function(){return un})),n.d(t,"removeLink",(function(){return cn})),n.d(t,"insertText",(function(){return pn})),n.d(t,"insertImage",(function(){return dn})),n.d(t,"alignBlocks",(function(){return Cn})),n.d(t,"isAligned",(function(){return On})),n.d(t,"cleanFormatting",(function(){return xn})),n.d(t,"hasNode",(function(){return bn})),n.d(t,"activeNode",(function(){return wn})),n.d(t,"formatBlockElements",(function(){return mn})),n.d(t,"getBlockFormats",(function(){return gn})),n.d(t,"parentBlockFormat",(function(){return kn})),n.d(t,"changeTextBlock",(function(){return fn})),n.d(t,"blockNodes",(function(){return hn})),n.d(t,"cleanTextBlockFormatting",(function(){return vn})),n.d(t,"hasMark",(function(){return Yt})),n.d(t,"getMark",(function(){return en})),n.d(t,"getActiveMarks",(function(){return tn})),n.d(t,"removeAllMarks",(function(){return Xt})),n.d(t,"cleanMarks",(function(){return Jt})),n.d(t,"selectionMarks",(function(){return Qt})),n.d(t,"indent",(function(){return Ir})),n.d(t,"canIndentAsListItem",(function(){return xr})),n.d(t,"outdent",(function(){return Nr})),n.d(t,"canOutdentAsListItem",(function(){return Sr})),n.d(t,"isIndented",(function(){return Or})),n.d(t,"canBeIndented",(function(){return Er})),n.d(t,"indentBlocks",(function(){return Cr})),n.d(t,"toggleOrderedList",(function(){return Rr})),n.d(t,"toggleUnorderedList",(function(){return jr})),n.d(t,"toggleList",(function(){return Pr})),n.d(t,"blockquote",(function(){return kr})),n.d(t,"liftBlockquote",(function(){return wr})),n.d(t,"hasSameMarkup",(function(){return Lt})),n.d(t,"getSelectionText",(function(){return Bt})),n.d(t,"getNodeFromSelection",(function(){return zt})),n.d(t,"selectedLineTextOnly",(function(){return Vt})),n.d(t,"expandSelection",(function(){return Wt})),n.d(t,"expandToWordWrap",(function(){return $t})),n.d(t,"canInsert",(function(){return jt})),n.d(t,"insertNode",(function(){return Ft})),n.d(t,"indentHtml",(function(){return Ht})),n.d(t,"alignLeftRules",(function(){return Fr})),n.d(t,"alignCenterRules",(function(){return Br})),n.d(t,"alignRightRules",(function(){return Lr})),n.d(t,"alignJustifyRules",(function(){return zr})),n.d(t,"alignRemoveRules",(function(){return Vr})),n.d(t,"indentRules",(function(){return zn})),n.d(t,"outdentRules",(function(){return Vn})),n.d(t,"nodes",(function(){return Pl})),n.d(t,"marks",(function(){return Ml})),n.d(t,"buildKeymap",(function(){return Oc})),n.d(t,"buildListKeymap",(function(){return xc})),n.d(t,"bold",(function(){return mc})),n.d(t,"italic",(function(){return vc})),n.d(t,"underline",(function(){return gc})),n.d(t,"strikethrough",(function(){return yc})),n.d(t,"subscript",(function(){return bc})),n.d(t,"superscript",(function(){return kc})),n.d(t,"link",(function(){return wc})),n.d(t,"sanitize",(function(){return jc})),n.d(t,"removeComments",(function(){return Rc})),n.d(t,"removeTag",(function(){return Ac})),n.d(t,"pasteCleanup",(function(){return Hc})),n.d(t,"sanitizeClassAttr",(function(){return Lc})),n.d(t,"sanitizeStyleAttr",(function(){return Vc})),n.d(t,"removeAttribute",(function(){return Fc})),n.d(t,"replaceImageSourcesFromRtf",(function(){return Jc})),n.d(t,"convertMsLists",(function(){return Pc})),n.d(t,"createTable",(function(){return Yc})),n.d(t,"find",(function(){return Qc})),n.d(t,"findAt",(function(){return Zc})),n.d(t,"findAll",(function(){return eu})),n.d(t,"replace",(function(){return tu})),n.d(t,"replaceAll",(function(){return nu})),n.d(t,"placeholder",(function(){return au})),n.d(t,"spacesFix",(function(){return cu})),n.d(t,"textHighlight",(function(){return pu})),n.d(t,"textHighlightKey",(function(){return uu})),n.d(t,"imageResizing",(function(){return ku})),n.d(t,"imageResizeKey",(function(){return du})),n.d(t,"autoJoin",(function(){return dr})),n.d(t,"baseKeymap",(function(){return br})),n.d(t,"chainCommands",(function(){return fr})),n.d(t,"createParagraphNear",(function(){return nr})),n.d(t,"deleteSelection",(function(){return Hn})),n.d(t,"exitCode",(function(){return tr})),n.d(t,"joinBackward",(function(){return Kn})),n.d(t,"joinDown",(function(){return Yn})),n.d(t,"joinForward",(function(){return qn})),n.d(t,"joinUp",(function(){return Jn})),n.d(t,"lift",(function(){return Zn})),n.d(t,"liftEmptyBlock",(function(){return rr})),n.d(t,"macBaseKeymap",(function(){return gr})),n.d(t,"newlineInCode",(function(){return Qn})),n.d(t,"pcBaseKeymap",(function(){return vr})),n.d(t,"selectAll",(function(){return sr})),n.d(t,"selectNodeBackward",(function(){return $n})),n.d(t,"selectNodeForward",(function(){return Gn})),n.d(t,"selectParentNode",(function(){return ar})),n.d(t,"setBlockType",(function(){return ur})),n.d(t,"splitBlock",(function(){return or})),n.d(t,"splitBlockKeepMarks",(function(){return ir})),n.d(t,"toggleMark",(function(){return pr})),n.d(t,"wrapIn",(function(){return cr})),n.d(t,"dropCursor",(function(){return wu})),n.d(t,"GapCursor",(function(){return Ou})),n.d(t,"gapCursor",(function(){return Su})),n.d(t,"HistoryState",(function(){return zl})),n.d(t,"closeHistory",(function(){return Gl})),n.d(t,"history",(function(){return Yl})),n.d(t,"redo",(function(){return Ql})),n.d(t,"redoDepth",(function(){return tc})),n.d(t,"undo",(function(){return Zl})),n.d(t,"undoDepth",(function(){return ec})),n.d(t,"InputRule",(function(){return nc})),n.d(t,"closeDoubleQuote",(function(){return cc})),n.d(t,"closeSingleQuote",(function(){return pc})),n.d(t,"ellipsis",(function(){return sc})),n.d(t,"emDash",(function(){return ac})),n.d(t,"inputRules",(function(){return rc})),n.d(t,"openDoubleQuote",(function(){return lc})),n.d(t,"openSingleQuote",(function(){return uc})),n.d(t,"smartQuotes",(function(){return dc})),n.d(t,"textblockTypeInputRule",(function(){return hc})),n.d(t,"undoInputRule",(function(){return ic})),n.d(t,"wrappingInputRule",(function(){return fc})),n.d(t,"keydownHandler",(function(){return no})),n.d(t,"keymap",(function(){return to})),n.d(t,"ContentMatch",(function(){return P})),n.d(t,"DOMParser",(function(){return ee})),n.d(t,"DOMSerializer",(function(){return pe})),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 q})),n.d(t,"ReplaceError",(function(){return p})),n.d(t,"ResolvedPos",(function(){return w})),n.d(t,"Schema",(function(){return Z})),n.d(t,"Slice",(function(){return d})),n.d(t,"addListNodes",(function(){return Mn})),n.d(t,"bulletList",(function(){return Tn})),n.d(t,"liftListItem",(function(){return Rn})),n.d(t,"listItem",(function(){return Dn})),n.d(t,"orderedList",(function(){return Nn})),n.d(t,"sinkListItem",(function(){return An})),n.d(t,"splitListItem",(function(){return jn})),n.d(t,"wrapInList",(function(){return Pn})),n.d(t,"AllSelection",(function(){return st})),n.d(t,"EditorState",(function(){return vt})),n.d(t,"NodeSelection",(function(){return it})),n.d(t,"Plugin",(function(){return bt})),n.d(t,"PluginKey",(function(){return Ct})),n.d(t,"Selection",(function(){return et})),n.d(t,"SelectionRange",(function(){return nt})),n.d(t,"TextSelection",(function(){return rt})),n.d(t,"Transaction",(function(){return pt})),n.d(t,"CellSelection",(function(){return ks})),n.d(t,"TableMap",(function(){return Qa})),n.d(t,"TableView",(function(){return dl})),n.d(t,"__clipCells",(function(){return Ss})),n.d(t,"__insertCells",(function(){return Ns})),n.d(t,"__pastedCells",(function(){return Os})),n.d(t,"addColSpan",(function(){return ys})),n.d(t,"addColumn",(function(){return Ks})),n.d(t,"addColumnAfter",(function(){return $s})),n.d(t,"addColumnBefore",(function(){return Ws})),n.d(t,"addRow",(function(){return Xs})),n.d(t,"addRowAfter",(function(){return Ys})),n.d(t,"addRowBefore",(function(){return Js})),n.d(t,"cellAround",(function(){return ss})),n.d(t,"colCount",(function(){return hs})),n.d(t,"columnIsHeader",(function(){return bs})),n.d(t,"columnResizing",(function(){return ml})),n.d(t,"columnResizingPluginKey",(function(){return hl})),n.d(t,"deleteColumn",(function(){return qs})),n.d(t,"deleteRow",(function(){return Qs})),n.d(t,"deleteTable",(function(){return pl})),n.d(t,"findCell",(function(){return fs})),n.d(t,"fixTables",(function(){return Vs})),n.d(t,"fixTablesKey",(function(){return zs})),n.d(t,"goToNextCell",(function(){return ul})),n.d(t,"handlePaste",(function(){return Rs})),n.d(t,"inSameTable",(function(){return ds})),n.d(t,"isInTable",(function(){return ls})),n.d(t,"mergeCells",(function(){return tl})),n.d(t,"moveCellForward",(function(){return ps})),n.d(t,"nextCell",(function(){return ms})),n.d(t,"pointsAtCell",(function(){return us})),n.d(t,"removeColSpan",(function(){return gs})),n.d(t,"removeColumn",(function(){return Us})),n.d(t,"removeRow",(function(){return Zs})),n.d(t,"rowIsHeader",(function(){return Gs})),n.d(t,"selectedRect",(function(){return Hs})),n.d(t,"selectionCell",(function(){return cs})),n.d(t,"setAttr",(function(){return vs})),n.d(t,"setCellAttr",(function(){return ol})),n.d(t,"splitCell",(function(){return nl})),n.d(t,"splitCellWithType",(function(){return rl})),n.d(t,"tableEditing",(function(){return wl})),n.d(t,"tableEditingKey",(function(){return as})),n.d(t,"tableNodeTypes",(function(){return is})),n.d(t,"tableNodes",(function(){return rs})),n.d(t,"toggleHeader",(function(){return al})),n.d(t,"toggleHeaderCell",(function(){return cl})),n.d(t,"toggleHeaderColumn",(function(){return ll})),n.d(t,"toggleHeaderRow",(function(){return sl})),n.d(t,"updateColumnsOnResize",(function(){return fl})),n.d(t,"AddMarkStep",(function(){return ze})),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 Pe})),n.d(t,"dropPoint",(function(){return Le})),n.d(t,"findWrapping",(function(){return _e})),n.d(t,"insertPoint",(function(){return Fe})),n.d(t,"joinPoint",(function(){return Ae})),n.d(t,"liftTarget",(function(){return De})),n.d(t,"replaceStep",(function(){return He})),n.d(t,"Decoration",(function(){return Sa})),n.d(t,"DecorationSet",(function(){return Ta})),n.d(t,"EditorView",(function(){return Ha})),n.d(t,"__endComposition",(function(){return ma})),n.d(t,"__parseFromClipboard",(function(){return Bi})),n.d(t,"__serializeForClipboard",(function(){return Li})),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,p=Math.min(s.text.length,l.text.length);u<p&&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 d=e(s.content,l.content,r-1,o-1);if(d)return d}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 p(e){var t=Error.call(this,e);return t.__proto__=p.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=[],p.prototype=Object.create(Error.prototype),p.prototype.constructor=p,p.prototype.name="ReplaceError";var d=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 p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("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,p=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,p,n,o))}var d=t.parent,f=d.content;return b(d,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 p("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 p("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},d.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 d(n,this.openStart,this.openEnd)},d.prototype.removeBetween=function(e,t){return new d(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)},d.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},d.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},d.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},d.fromJSON=function(e,t){if(!t)return d.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 d(i.fromJSON(e,t.content),n,r)},d.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 d(e,n,r)},Object.defineProperties(d.prototype,f),d.empty=new d(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},D={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}};D.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},D.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)},D.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)},D.firstChild.get=function(){return this.content.firstChild},D.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 d.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 d(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},D.isBlock.get=function(){return this.type.isBlock},D.isTextblock.get=function(){return this.type.isTextblock},D.inlineContent.get=function(){return this.type.inlineContent},D.isInline.get=function(){return this.type.isInline},D.isText.get=function(){return this.type.isText},D.isLeaf.get=function(){return this.type.isLeaf},D.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()+")"),M(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,D);var _=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):M(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 M(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var P=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},j={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};P.parse=function(e,t){var n=new R(e,t);if(null==n.next)return P.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 P(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,p=0;p<t.min;p++){var d=n();o(e(t.expr,u),d),u=d}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},P.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},P.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}},P.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},P.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],p=a.next[c+1];if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(p)){r.push(p);var d=o(p,s.concat(u));if(d)return d}}}(this,[])},P.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},P.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},P.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]}},P.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(P.prototype,j),P.empty=new P(!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(L(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function L(e){var t=[];do{t.push(B(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function B(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 z(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=z(e),r=n;return e.eat(",")&&(r="}"!=e.next?z(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 U(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 q=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=U(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}};G.isInline.get=function(){return!this.isBlock},G.isTextblock.get=function(){return this.isBlock&&this.inlineContent},G.isLeaf.get=function(){return this.contentMatch==P.empty},G.isAtom.get=function(){return this.isLeaf||this.spec.atom},q.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},q.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},q.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:$(this.attrs,e)},q.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))},q.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))},q.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},q.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},q.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},q.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},q.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},q.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new q(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(q.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=U(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=q.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]=P.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 q))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 _(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),d.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){return(e?1:0)|("full"===e?2:0)}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(t.preserveWhitespace)|(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=null==r?-5&o.options:oe(r);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 pe=function(e,t){this.nodes=e||{},this.marks=t||{}};function de(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}pe.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},pe.prototype.serializeNodeInner=function(e,t){void 0===t&&(t={});var n=pe.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},pe.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},pe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&pe.renderSpec(fe(n),r(e,t))},pe.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 p=l;p<t.length;p++){var d=t[p];if(0===d){if(p<t.length-1||p>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var f=pe.renderSpec(e,d,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}},pe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new pe(this.nodesFromSchema(e),this.marksFromSchema(e)))},pe.nodesFromSchema=function(e){var t=de(e.nodes);return t.text||(t.text=function(e){return e.text}),t},pe.marksFromSchema=function(e){return de(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){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};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 p=s+r+((l?e==s?-1:e==u?1:t:t)<0?0:c);if(n)return p;var d=e==(t<0?s:u)?null:a/3+(e-s)*he;return new ve(p,t<0?e!=s:e!=u,d)}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 p)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?d.empty:new d(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?d.empty:new d(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,d.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,d.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 De(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 _e(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(Me).concat({type:t,attrs:n}).concat(i.map(Me)):null}function Me(e){return{type:e,attrs:null}}function Pe(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 p=c.content.cutByIndex(u,c.childCount),d=r&&r[l]||c;if(d!=c&&(p=p.replaceChild(0,d.type.create(d.attrs))),!c.canReplace(u+1,c.childCount)||!d.type.validContent(p))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 Le(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),p=!1;if(1==a)p=u.canReplace(c,c,o);else{var d=u.contentMatchAt(c).findWrapping(o.firstChild.type);p=d&&u.canReplaceWith(c,c,d[0])}if(p)return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Be(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var a=e.child(o);a.content.size&&(a=a.copy(Be(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,p=0,f=o,h=!1;f>t;f--)h||n.index(f)>0?(h=!0,u=i.from(n.node(f).copy(u)),p++):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 d(u.append(m),p,v),u.size-p,!0))},ke.prototype.wrap=function(e,t){for(var n=i.empty,r=t.length-1;r>=0;r--)n=i.from(t[r].type.create(t[r].attrs,n));var o=e.start,a=e.end;return this.step(new Ie(o,a,o,a,new d(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 d(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 d(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 d(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,d.empty,!0);return this.step(n)};var ze=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 d(Be(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",ze);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 d(Be(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 ze(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=d.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 p=Math.max(l,e),d=Math.min(l+r.nodeSize,t),f=n.addToSet(u),h=0;h<u.length;h++)u[h].isInSet(f)||(a&&a.to==p&&a.mark.eq(u[h])?a.to=d:o.push(a=new Ve(p,d,u[h])));s&&s.to==p?s.to=d:i.push(s=new ze(p,d,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),p=0;p<s.length;p++){for(var d=s[p],f=void 0,h=0;h<o.length;h++){var m=o[h];m.step==i-1&&d.eq(o[h].style)&&(f=m)}f?(f.to=u,f.step=i):o.push({style:d,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 p=0;p<l.marks.length;p++)t.allowsMarkType(l.marks[p].type)||this.step(new Ve(a,c,l.marks[p]))}else o.push(new Ee(a,c,d.empty));a=c}if(!n.validEnd){var f=n.fillBefore(i.empty,!0);this.replace(a,a,new d(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=d.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 d(i.from(n),0,0))},ke.prototype.delete=function(e,t){return this.replace(e,t,d.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 Ue(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(Ue(e.firstChild.content,t-1,n)))}function qe(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(qe(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,t,n,r,o){if(t<n){var a=e.firstChild;e=e.replaceChild(0,a.copy(Ye(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 Ze(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 d(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 d(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 d(Ue(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new d(Ue(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,p=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);p<c.childCount;){var b=c.child(p),k=m.matchType(b.type);if(!k)break;(++p>1||0==u||b.content.size)&&(m=k,f.push(Xe(b.mark(v.allowedMarks(b.marks)),1==p?u:0,p==c.childCount?y:-1)))}var w=p==c.childCount;w||(y=-1),this.placed=qe(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?d.empty:new d(Ue(l.content,t-1,1),t-1,y<0?l.openEnd:t-1):new d(Ue(l.content,t,p),l.openStart,l.openEnd)},We.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)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=qe(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=qe(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=qe(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=Ze(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.isolating)break;i.indexOf(s)>-1?a=s:r.before(s)==l&&i.splice(1,0,-s)}for(var u=i.indexOf(a),p=[],f=n.openStart,h=n.content,m=0;;m++){var v=h.firstChild;if(p.push(v),m==n.openStart)break;h=v.content}f>0&&p[f-1].type.spec.defining&&r.node(u).type!=p[f-1].type?f-=1:f>=2&&p[f-1].isTextblock&&p[f-2].type.spec.defining&&r.node(u).type!=p[f-2].type&&(f-=2);for(var g=n.openStart;g>=0;g--){var y=(g+f+1)%(n.openStart+1),b=p[y];if(b)for(var k=0;k<i.length;k++){var w=i[(k+u)%i.length],C=!0;w<0&&(C=!1,w=-w);var O=r.node(w-1),x=r.index(w-1);if(O.canReplaceWith(x,x,b.type,b.marks))return this.replace(r.before(w),C?o.after(w):t,new d(Ye(n.content,0,n.openStart,y),y,n.openEnd))}}for(var S=this.steps.length,E=i.length-1;E>=0&&(this.replace(e,t,n),!(this.steps.length>S));E--){var I=i[E];I<0||(e=r.before(I),t=o.after(I))}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 d(i.from(n),0,0))},ke.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=Ze(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 Qe=Object.create(null),et=function(e,t,n){this.ranges=n||[new nt(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},tt={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};tt.anchor.get=function(){return this.$anchor.pos},tt.head.get=function(){return this.$head.pos},tt.from.get=function(){return this.$from.pos},tt.to.get=function(){return this.$to.pos},tt.$from.get=function(){return this.ranges[0].$from},tt.$to.get=function(){return this.ranges[0].$to},tt.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},et.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},et.prototype.replace=function(e,t){void 0===t&&(t=d.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,p=e.mapping.slice(i);e.replaceRange(p.map(c.pos),p.map(u.pos),s?d.empty:t),0==s&&ut(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}},et.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),ut(e,n,t.isInline?-1:1))}},et.findFrom=function(e,t,n){var r=e.parent.inlineContent?new rt(e):ct(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?ct(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):ct(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},et.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new st(e.node(0))},et.atStart=function(e){return ct(e,e,0,0,1)||new st(e)},et.atEnd=function(e){return ct(e,e,e.content.size,e.childCount,-1)||new st(e)},et.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Qe[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},et.jsonID=function(e,t){if(e in Qe)throw new RangeError("Duplicate use of selection JSON ID "+e);return Qe[e]=t,t.prototype.jsonID=e,t},et.prototype.getBookmark=function(){return rt.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(et.prototype,tt),et.prototype.visible=!0;var nt=function(e,t){this.$from=e,this.$to=t},rt=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=d.empty),e.prototype.replace.call(this,t,n),n==d.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 ot(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}(et);et.jsonID("text",rt);var ot=function(e,t){this.anchor=e,this.head=t};ot.prototype.map=function(e){return new ot(e.map(this.anchor),e.map(this.head))},ot.prototype.resolve=function(e){return rt.between(e.resolve(this.anchor),e.resolve(this.head))};var it=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 d(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 at(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}(et);it.prototype.visible=!1,et.jsonID("node",it);var at=function(e){this.anchor=e};at.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new ot(r,r):new at(r)},at.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&it.isSelectable(n)?new it(t):et.near(t)};var st=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=d.empty),n==d.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 lt},t}(et);et.jsonID("all",st);var lt={map:function(){return this},resolve:function(e){return new st(e)}};function ct(e,t,n,r,o,i){if(t.inlineContent)return rt.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&&it.isSelectable(s))return it.create(e,n-(o<0?s.nodeSize:0))}else{var l=ct(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function ut(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(et.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(et.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 dt(e,t){return t&&e?e.bind(t):e}var ft=function(e,t,n){this.name=e,this.init=dt(t.init,n),this.apply=dt(t.apply,n)},ht=[new ft("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new ft("selection",{init:function(e,t){return e.selection||et.atStart(t.doc)},apply:function(e){return e.selection}}),new ft("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new ft("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],mt=function(e,t){var n=this;this.schema=e,this.fields=ht.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 ft(e.key,e.spec.state,e))}))},vt=function(e){this.config=e},gt={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};gt.schema.get=function(){return this.config.schema},gt.plugins.get=function(){return this.config.plugins},vt.prototype.apply=function(e){return this.applyTransaction(e).state},vt.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},vt.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}}},vt.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new vt(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<yt.length;i++)yt[i](this,e,t);return t},gt.tr.get=function(){return new pt(this)},vt.create=function(e){for(var t=new mt(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new vt(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},vt.prototype.reconfigure=function(e){for(var t=new mt(this.schema,e.plugins),n=t.fields,r=new vt(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},vt.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},vt.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 mt(e.schema,e.plugins),o=new vt(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=et.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},vt.addApplyListener=function(e){yt.push(e)},vt.removeApplyListener=function(e){var t=yt.indexOf(e);t>-1&&yt.splice(t,1)},Object.defineProperties(vt.prototype,gt);var yt=[];var bt=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:wt("plugin")};bt.prototype.getState=function(e){return e[this.key]};var kt=Object.create(null);function wt(e){return e in kt?e+"$"+ ++kt[e]:(kt[e]=0,e+"$")}var Ct=function(e){void 0===e&&(e="key"),this.key=wt(e)};Ct.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Ct.prototype.getState=function(e){return e[this.key]};var Ot=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"],xt=function(e,t){void 0===t&&(t=Ot);var n=t.join("|");return e.replace(new RegExp("\\s*(<(?:"+n+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+n+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},St=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},Et=function(e){return pe.fromSchema(e.type.schema).serializeFragment(e.content)},It=function(e,t,n){return ee.fromSchema(t).parse(e,n)},Nt=function(e,t,n){var r=St(e);return It(r,t,n)},Tt=function(e){var t=Et(e.doc),n=document.createElement("div");return n.appendChild(t),n.innerHTML},Dt=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 st(r.doc)).replaceSelectionWith(Nt(e,r.schema,n)).setMeta("commandName",t))}};var _t=function(){return(_t=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 Mt(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 Pt=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}},jt=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},Rt=function(e){return e instanceof T?e.type.name:e.name},At=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 Rt(t)===Rt(e)}),t)(n)}},Ft=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},Lt=function(e,t,n,r){var o=i.from(Nt(e,n,r)),a=i.from(Nt(t,n,r));return o.eq(a)},Bt=function(e){var t=e.selection;if(t instanceof rt||t instanceof st){var n=t.content().content;return n.textBetween(0,n.size)}return""},zt=function(e){if(e.selection instanceof it)return e.selection.node},Vt=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=Bt(e))),t},Ht=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$/,"")},Kt={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i},Wt=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r=!0===n.applyToWord?Kt: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,p=c.findIndex((function(e){var t=e.node,n=e.pos;return n<=u&&n+t.nodeSize>=u})),d=c[p].node.text,f=!1,h=p-1;h>=0;h--){var m=c[h];!f&&m&&"text"===m.node.type.name?d=m.node.text+d:(f=!0,u-=m.node.nodeSize)}for(h=p+1;h<c.length;h++){if(!(m=c[h])||"text"!==m.node.type.name)break;d+=m.node.text}var v=d.substring(0,u),g=d.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(rt.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(rt.create(e.doc,o)),t(e)}}}}return{state:e,dispatch:t}},$t=function(e,t){return function(n,r,o){var i=Wt(n,r,t),a=i.state,s=i.dispatch;return e(t)(a,s)}},Ut=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||!Ut(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 p=l[u],d=p.$from,f=p.$to;c=r.doc.rangeHasMark(d.pos,f.pos,e)}for(u=0;u<l.length;u++){var h=l[u];d=h.$from,f=h.$to;c?n.removeMark(d.pos,f.pos,e):n.addMark(d.pos,f.pos,e.create(t))}o(n.scrollIntoView())}return!0}},Gt=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 p=s[u],d=void 0,f=0;f<o.length;f++){var h=o[f];h.step===i-1&&p.eq(h.style)&&(d=h)}d?(d.to=c,d.step=i):o.push({style:p,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},Xt=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.tr;Jt(o,{except:(r=n,r instanceof Array?r:[r])}),o.docChanged&&t(o)}},Jt=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)}))}))}},Yt=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,p=r[t.mark],d=e.doc,f=!1;return u?(n=e.storedMarks||l.marks(),f=p&&p.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):f=p&&d.rangeHasMark(s,c,p)||o.some((function(e){return d.rangeHasMark(s,c,r[e])})),!f&&i&&r.style?Qt(e,r.style).some((function(e){return null!==Zt(e,i)})):Boolean(f)},Zt=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},Qt=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},en=function(e,t){var n=Qt(e,t),r=n.filter((function(e){return Boolean(e)}));return n.length===r.length?n[0]:void 0},tn=function(e,t){var n=Qt(e,t),r=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==r.length,marks:r}},nn=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return Pt(r,t)},rn=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,p){if(e.isInline){var d=e.marks;if(!i.isInSet(d)&&p.type.allowsMarkType(i.type)){var f=Math.max(u,t),h=Math.min(u+e.nodeSize,n),m=nn(d,r);if(m.changed||r.newValue){for(var v=m.changed?{style:m.style||null}:{style:[r.style]+": "+r.newValue+";"},g=o.isInSet(d)?d.find((function(e){return"style"===e.type.name})):null,y=g?_t({},g.attrs,v):v,b=o.create(y),k=b.addToSet(d),w=0;w<d.length;w++)d[w].isInSet(k)||(l&&l.to===f&&l.mark.eq(d[w])?l.to=h:(l=new Ve(f,h,d[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 ze(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},on=function(e,t){var n=e.schema.marks.style;return(n?Qt(e,n):[]).map((function(e){return Zt(e,t)})).filter((function(e){return null!==e}))},an=function(e,t){return function(n,r,o){var i=n.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Ut(n.doc,l,e))return!1;var c,u,p,d,f=!1;if(r){var h=o||n.tr;if(s){var m=n.storedMarks||s.marks();if(e.isInSet(m)){var v=nn(m,t),g=m.find((function(e){return"style"===e.type.name})),y=_t({},g?g.attrs:{},{style:v.style||null});if(c=g.attrs,u=y,p=Object.keys(c),d=Object.keys(u),p.length===d.length&&p.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=rn(h,w.pos,C.pos,t,e)}f&&(h.scrollIntoView(),r(h))}}return f}},sn=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,p=!1,d=!1,f=function(){return d=!0};a&&i.style&&(p=an(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 Yt(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){Gt(r,o.pos,i.pos,e)}))},l=0;l<a.length;l++)s(l);n(r.scrollIntoView())}}(h,r,f,u):p||qt(i[c],n,u)(r,f),d&&o(u),d}},ln=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||!Ut(n.doc,u,o))return!1;if(c){var p=n.storedMarks||c.marks(),d=o.isInSet(p)?p.find((function(e){return"style"===e.type.name})):null,f={style:null};if(d&&d.attrs.style){var h=Pt(d.attrs.style,i);h.changed&&h.style&&(f.style=h.style)}else i.newValue&&(f.style=[i.style]+": "+i.newValue+";");var m=d?_t({},d.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 an(o,i)(n,r,a)}},cn=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,p=i.child(a).nodeSize,d=void 0,f=void 0;for(d=a-1;d>=0&&l.isInSet(i.child(d).marks);)p+=f=i.child(d).nodeSize,u-=f,d-=1;for(d=a+1;d<c&&l.isInSet(i.child(d).marks);)p+=i.child(d).nodeSize,d+=1;r(Gt(t||n.tr,u,u+p,l))}else sn(e,t)(n,r)}},un=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=Qt(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(),p=c.child(u).marks.find((function(e){return e.type===l})),d=c.childCount,f=i.pos-i.textOffset,h=c.child(u).nodeSize,m=void 0,v=void 0;for(m=u-1;m>=0&&p.isInSet(c.child(m).marks);)h+=v=c.child(m).nodeSize,f-=v,m-=1;for(m=u+1;m<d&&p.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;Yt(e,{mark:n})&&(cn({mark:n,attrs:r},a)(e,l),c=vt.create({doc:a.doc,selection:a.selection})),s?qt(i[n],r,a)(c,l):sn({mark:n},a,r)(c,l)}return s&&o(a),s}},pn=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}},dn=function(e){return function(t,n){var r=t.schema.nodes.image,o=r.createAndFill(e);Ft(o)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}},fn=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),p=new d(i.from(n.create(r,null,o.marks)),0,0);return e.step(new Ie(c,u,c+1,u-1,p,1,!0)),!1}}))}))},hn=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 it?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},mn=function(e,t){return function(n,r){var o=hn(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=Mt(n,["level"]);fn(a,t,i.paragraph,o)}else if(/^h[1-6]$/i.test(e)){r=parseInt(e.substr(1),10);fn(a,t,i.heading,_t({},t.attrs,{level:r}))}else if("blockquote"===e){var s=t.attrs;r=s.level,o=Mt(s,["level"]);fn(a,t,i.blockquote,o)}}));var s=a.docChanged;return s&&r(a.scrollIntoView()),s}},vn=function(e,t){void 0===t&&(t={blocksInSelection:!0});var n=e.doc,r=e.selection,o=t.blocksInSelection,i=t.blockNodeType;hn({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=Mt(n,["style","class"]),c=i||t.type;(o||s||c!==t.type)&&fn(e,t,c,l)}))},gn=function(e){var t=hn(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&&r.push("blockquote")})),r},yn=function(e,t){var n,r,o=e.attrs.style;o&&t.forEach((function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=Pt(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})},bn=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},kn=function(e){var t=gn(e);return 1===new Set(t).size?t[0]:null},wn=function(e){return{tag:kn(e)||""}},Cn=function(e,t){return function(n,r){var o=hn(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=yn(t,r.style)),fn(i,t,t.type,n)}}));var a=i.docChanged;return a&&r(i.scrollIntoView()),a}},On=function(e,t){var n=hn(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},xn=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);Jt(r,{except:a}),vn(r,{blocksInSelection:o,blockNodeType:i});var s=r.docChanged;return s&&n&&n(r),s}},Sn=["ol",0],En=["ul",0],In=["li",0],Nn={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?Sn:["ol",{start:e.attrs.order},0]}},Tn={parseDOM:[{tag:"ul"}],toDOM:function(){return En}},Dn={parseDOM:[{tag:"li"}],toDOM:function(){return In},defining:!0};function _n(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 Mn(e,t,n){return e.append({ordered_list:_n(Nn,{content:"list_item+",group:n}),bullet_list:_n(Tn,{content:"list_item+",group:n}),list_item:_n(Dn,{content:t})})}function Pn(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 p=n.doc.resolve(l.start-2);u=new E(p,p,l.depth),l.endIndex<l.parent.childCount&&(l=new E(a,n.doc.resolve(s.end(l.depth)),l.depth)),c=!0}var f=_e(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 d(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,p=t.start+n.length-(r?2:0),f=t.parent,h=t.startIndex,m=t.endIndex,v=!0;h<m;h++,v=!1)!v&&Pe(e.doc,p,u)&&(e.split(p,u),p+=2*u),p+=f.child(h).nodeSize;return e}(n.tr,l,f,c,e).scrollIntoView()),!0)}}function jn(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,p=o.depth-u;p>=o.depth-3;p--)c=i.from(o.node(p).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 d(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!!Pe(y.doc,o.pos,2,b)&&(n&&n(y.split(o.pos,2,b).scrollIntoView()),!0)}}function Rn(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 d(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,De(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 p=0==n.startIndex,f=n.endIndex==o.childCount,h=c.node(-1),m=c.index(-1);if(!h.canReplace(m+(p?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-(p?1:0),g+(f?1:0),v+1,g-1,new d((p?i.empty:i.from(o.copy(i.empty))).append(f?i.empty:i.from(o.copy(i.empty))),p?0:1,f?0:1),p?0:1)),t(r.scrollIntoView()),!0}(t,n,s)))}}function An(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 p=u.lastChild&&u.lastChild.type==c.type,f=i.from(p?e.create():null),h=new d(i.from(e.create(null,i.from(c.type.create(null,f)))),p?3:1,0),m=s.start,v=s.end;n(t.tr.step(new Ie(m-(p?3:1),v,m,v,h,1,!0)).scrollIntoView())}return!0}}var Fn={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},Ln={listType:Fn.orderedList,types:_t({},Fn)},Bn={listType:Fn.bulletList,types:_t({},Fn)},zn={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:_t({},Fn)},Vn={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:_t({},Fn)};function Hn(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function Kn(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=Un(r);if(!o){var i=r.blockRange(),a=i&&De(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&lr(e,o,t))return!0;if(0==r.parent.content.size&&(Wn(s,"end")||it.isSelectable(s))){if(t){var l=e.tr.deleteRange(r.before(),r.after());l.setSelection(Wn(s,"end")?et.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):it.create(l.doc,o.pos-s.nodeSize)),t(l.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 Wn(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 $n(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=Un(o)}var a=i&&i.nodeBefore;return!(!a||!it.isSelectable(a))&&(t&&t(e.tr.setSelection(it.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)}function Un(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=Xn(r);if(!o)return!1;var i=o.nodeAfter;if(lr(e,o,t))return!0;if(0==r.parent.content.size&&(Wn(i,"start")||it.isSelectable(i))){if(t){var a=e.tr.deleteRange(r.before(),r.after());a.setSelection(Wn(i,"start")?et.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):it.create(a.doc,a.mapping.map(o.pos))),t(a.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 Gn(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=Xn(o)}var a=i&&i.nodeAfter;return!(!a||!it.isSelectable(a))&&(t&&t(e.tr.setSelection(it.create(e.doc,i.pos)).scrollIntoView()),!0)}function Xn(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 Jn(e,t){var n,r=e.selection,o=r instanceof it;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(it.create(i.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0}function Yn(e,t){var n,r=e.selection;if(r instanceof it){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 Zn(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&De(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function Qn(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 er(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 tr(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=er(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(et.near(c.doc.resolve(l),1)),t(c.scrollIntoView())}return!0}function nr(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof st||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=er(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(rt.create(s.doc,a+1)),t(s.scrollIntoView())}return!0}function rr(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(Pe(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&De(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)}function or(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof it&&e.selection.node.isBlock)return!(!r.parentOffset||!Pe(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 rt||e.selection instanceof st)&&a.deleteSelection();var s=0==r.depth?null:er(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=i&&s?[{type:s}]:null,c=Pe(a.doc,a.mapping.map(r.pos),1,l);if(l||c||!Pe(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()),p=a.doc.resolve(u);r.node(-1).canReplaceWith(p.index(),p.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0}function ir(e,t){return or(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})}function ar(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(it.create(e.doc,n))),!0)}function sr(e,t){return t&&t(e.tr.setSelection(new st(e.doc))),!0}function lr(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,p=r.length-1;p>=0;p--)u=i.from(r[p].create(null,u));u=i.from(a.copy(u));var f=e.tr.step(new Ie(t.pos-1,c,t.pos,c,new d(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=et.findFrom(t,1),v=m&&m.$from.blockRange(m.$to),g=v&&De(v);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(v,g).scrollIntoView()),!0;if(l&&Wn(s,"start",!0)&&Wn(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 d(C,b.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function cr(e,t){return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=s&&_e(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}function ur(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 pr(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 p=s[u],d=p.$from,f=p.$to;l=n.doc.rangeHasMark(d.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 dr(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],p=n.doc.resolve(c),d=p.sharedDepth(u),f=p.node(d),h=p.indexAfter(d),m=p.after(d+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 fr(){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 hr=fr(Hn,Kn,$n),mr=fr(Hn,qn,Gn),vr={Enter:fr(Qn,nr,rr,or),"Mod-Enter":tr,Backspace:hr,"Mod-Backspace":hr,"Shift-Backspace":hr,Delete:mr,"Mod-Delete":mr,"Mod-a":sr},gr={"Ctrl-h":vr.Backspace,"Alt-Backspace":vr["Mod-Backspace"],"Ctrl-d":vr.Delete,"Ctrl-Alt-Backspace":vr["Mod-Delete"],"Alt-Delete":vr["Mod-Delete"],"Alt-d":vr["Mod-Delete"]};for(var yr in vr)gr[yr]=vr[yr];var br=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?gr:vr,kr=function(e,t){return cr(e.schema.nodes.blockquote)(e,t)},wr=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},Cr=function(e,t,n){return function(r,o){var i=hn(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=yn(t,[s])}r&&fn(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},Or=function(e,t,n){var r=hn(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},xr=function(e,t){return An(t)(e)},Sr=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=!!At(r,2)(e.selection),a=!!At(o,2)(e.selection);return(i||a)&&Rn(n)(e)},Er=function(e,t){var n=e.schema.nodes,r=n[zn.listsTypes.listItem];return(Or(e,t.nodes)||zn.nodes.some((function(t){return n[t.node]&&bn(e,n[t.node])})))&&!bn(e,r)},Ir=function(e,t){var n=e.schema.nodes[zn.listsTypes.listItem],r=Er(e,zn);xr(e,n)?An(n)(e,t):r&&Cr(zn.nodes)(e,t)},Nr=function(e,t){var n=e.schema.nodes,r=n[Vn.listsTypes.listItem],o=Er(e,Vn);bn(e,n.blockquote)?wr(e,t):Sr(e,Vn)?Rn(r)(e,t):o&&Cr(Vn.nodes)(e,t)},Tr=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 Dr(e){return function(t,n,r){if(!r)return!1;var o,i=(t=r.state).schema.nodes[e.listType],a=t.selection,s=a.$from,l=a.$to,c=s.node(-2),u=s.node(-3),p=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,s,l,i);return(c&&c.type===i||u&&u.type===i)&&p?Mr(e)(t,n):(p||(Mr(e)(t,n),t=r.state),dr(Pn(o=i),(function(e,t){return e.type===t.type&&e.type===o}))(t,n))}}function _r(e,t,n,r){r||(r=e.schema.nodes.listItem);var o=t.$from,a=t.$to,s=o.blockRange(a,(function(e){return e.childCount&&e.firstChild.type===r}));if(!s||s.depth<2||o.node(s.depth-1).type!==r)return n;var l=s.end,c=a.end(s.depth);return l<c&&(n.step(new Ie(l-1,c,l,c,new d(i.from(r.create(void 0,s.parent.copy())),1,0),1,!0)),s=new E(n.doc.resolve(o.pos),n.doc.resolve(c),s.depth)),n.lift(s,De(s)).scrollIntoView()}function Mr(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 it(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&&De(a);if(null==s)return!1;r.lift(a,s)}})),n&&n(r),!0}}var Pr=function(e,t,n,r,o){var i=r.listType,a=e.selection,s=a.$from.node(a.$from.depth-2),l=a.$to.node(a.$to.depth-2);if(s&&s.type.name===i&&l&&l.type.name===i){var c=n.state.schema.nodes,u={bulletList:c[r.bulletList],orderedList:c[r.orderedList],listItem:c[r.listItem]},p=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}(a.$to,u),d=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)),p=new rt(c,u);o=_r(e,p,o,i)}}})),o}(e,a.$to.pos,a.$to.end(p),p,n.state.tr,u.listItem);return(d=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 p=c[u],d=t.doc.resolve(t.mapping.map(p.pos));if(d.depth>0){var f=void 0;f=p.node.textContent&&p.node.textContent.length>0?t.doc.resolve(t.mapping.map(p.pos+p.node.textContent.length)):t.doc.resolve(t.mapping.map(p.pos+1));var h=d.blockRange(f);h&&t.lift(h,Tr(e.schema,d,n))}}return t}(e,d,r)).setMeta("commandName",o),t(d),!0}return Dr(r)(e,t,n)};function jr(e,t,n){return Pr(e,t,n,_t({listType:Bn.listType},Bn.types))}function Rr(e,t,n){return Pr(e,t,n,_t({listType:Ln.listType},Ln.types))}for(var Ar=function(e,t){return{name:e,value:t}},Fr=[{node:"paragraph",style:[Ar("text-align","left")]},{node:"heading",style:[Ar("text-align","left")]}],Lr=[{node:"paragraph",style:[Ar("text-align","right")]},{node:"heading",style:[Ar("text-align","right")]}],Br=[{node:"paragraph",style:[Ar("text-align","center")]},{node:"heading",style:[Ar("text-align","center")]}],zr=[{node:"paragraph",style:[Ar("text-align","justify")]},{node:"heading",style:[Ar("text-align","justify")]}],Vr=[{node:"paragraph",style:[Ar("text-align","")]},{node:"heading",style:[Ar("text-align","")]}],Hr={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"},Kr={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"},Wr="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),$r="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Ur="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),qr="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Gr="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Xr=Wr&&(qr||+Wr[1]<57)||Ur&&qr,Jr=0;Jr<10;Jr++)Hr[48+Jr]=Hr[96+Jr]=String(Jr);for(Jr=1;Jr<=24;Jr++)Hr[Jr+111]="F"+Jr;for(Jr=65;Jr<=90;Jr++)Hr[Jr]=String.fromCharCode(Jr+32),Kr[Jr]=String.fromCharCode(Jr);for(var Yr in Hr)Kr.hasOwnProperty(Yr)||(Kr[Yr]=Hr[Yr]);var Zr="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function Qr(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);Zr?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function eo(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 to(e){return new bt({props:{handleKeyDown:no(e)}})}function no(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Qr(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Xr&&(e.ctrlKey||e.altKey||e.metaKey)||($r||Gr)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?Kr:Hr)[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[eo(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=Hr[n.keyCode])&&r!=o){var s=t[eo(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var l=t[eo(o,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}return!1}}var ro={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var oo=/Edge\/(\d+)/.exec(navigator.userAgent),io=/MSIE \d/.test(navigator.userAgent),ao=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);ro.mac=/Mac/.test(navigator.platform);var so=ro.ie=!!(io||ao||oo);ro.ie_version=io?document.documentMode||6:ao?+ao[1]:oo?+oo[1]:null,ro.gecko=!so&&/gecko\/(\d+)/i.test(navigator.userAgent),ro.gecko_version=ro.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var lo=!so&&/Chrome\/(\d+)/.exec(navigator.userAgent);ro.chrome=!!lo,ro.chrome_version=lo&&+lo[1],ro.safari=!so&&/Apple Computer/.test(navigator.vendor),ro.ios=ro.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),ro.android=/Android \d/.test(navigator.userAgent),ro.webkit="webkitFontSmoothing"in document.documentElement.style,ro.webkit_version=ro.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var co=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},uo=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},po=null,fo=function(e,t,n){var r=po||(po=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},ho=function(e,t,n,r){return n&&(vo(e,t,n,r,-1)||vo(e,t,n,r,1))},mo=/^(img|br|input|textarea|hr)$/i;function vo(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:go(e))){var i=e.parentNode;if(1!=i.nodeType||yo(e)||mo.test(e.nodeName)||"false"==e.contentEditable)return!1;t=co(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?go(e):0}}}function go(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function yo(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 bo=function(e){var t=e.isCollapsed;return t&&ro.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function ko(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function wo(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Co(e,t){return"number"==typeof e?e:e[t]}function Oo(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 xo(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=uo(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,l=s?wo(i):Oo(a),c=0,u=0;if(t.top<l.top+Co(r,"top")?u=-(l.top-t.top+Co(o,"top")):t.bottom>l.bottom-Co(r,"bottom")&&(u=t.bottom-l.bottom+Co(o,"bottom")),t.left<l.left+Co(r,"left")?c=-(l.left-t.left+Co(o,"left")):t.right>l.right-Co(r,"right")&&(c=t.right-l.right+Co(o,"right")),c||u)if(s)i.defaultView.scrollBy(c,u);else{var p=a.scrollLeft,d=a.scrollTop;u&&(a.scrollTop+=u),c&&(a.scrollLeft+=c);var f=a.scrollLeft-p,h=a.scrollTop-d;t={left:t.left-f,top:t.top-h,right:t.right-f,bottom:t.bottom-h}}if(s)break}}function So(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=uo(e));return t}function Eo(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 Io=null;function No(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=fo(l).getClientRects()}for(var p=0;p<u.length;p++){var d=u[p];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var f=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(f<o){n=l,o=f,r=f&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==l.nodeType&&f&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.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=_o(r,1);if(i.top!=i.bottom&&To(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}:No(n,r)}function To(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Do(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 p=e.dom.getBoundingClientRect();if(!To(t,p))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(To(n,u))return e(s,n,u)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,p)))return null}if(ro.safari)for(var d=u;o&&d;d=uo(d))d.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(ro.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=No(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 _o(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var Mo=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Po(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=ro.webkit||ro.gecko;if(3==o.nodeType){if(!a||!Mo.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++,jo(_o(fo(o,s,l),c),c<0)}var u=_o(fo(o,i,i),n);if(ro.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var p=_o(fo(o,i-1,i-1),-1);if(p.top==u.top){var d=_o(fo(o,i,i+1),-1);if(d.top!=u.top)return jo(d,d.left<p.left)}}return u}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==go(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return Ro(f.getBoundingClientRect(),!1)}if(i<go(o)){var h=o.childNodes[i];if(1==h.nodeType)return Ro(h.getBoundingClientRect(),!0)}return Ro(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==go(o))){var m=o.childNodes[i-1],v=3==m.nodeType?fo(m,go(m)-(a?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return jo(_o(v,1),!1)}if(i<go(o)){for(var g=o.childNodes[i];g.pmViewDesc&&g.pmViewDesc.ignoreForCoords;)g=g.nextSibling;var y=g?3==g.nodeType?fo(g,0,a?0:1):1==g.nodeType?g:null:null;if(y)return jo(_o(y,-1),!0)}return jo(_o(3==o.nodeType?fo(o):o,-n),n>=0)}function jo(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 Ro(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 Ao(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 Fo=/[\u0590-\u08ac]/;var Lo=null,Bo=null,zo=!1;function Vo(e,t,n){return Lo==t&&Bo==n?zo:(Lo=t,Bo=n,zo="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Ao(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=Po(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=fo(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 Fo.test(r.parent.textContent)&&s.modify?Ao(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 Ho=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},Ko={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}};Ho.prototype.matchesWidget=function(){return!1},Ho.prototype.matchesMark=function(){return!1},Ho.prototype.matchesNode=function(){return!1},Ho.prototype.matchesHack=function(e){return!1},Ho.prototype.parseRule=function(){return null},Ho.prototype.stopEvent=function(){return!1},Ko.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},Ko.border.get=function(){return 0},Ho.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()},Ho.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}},Ko.posBefore.get=function(){return this.parent.posBeforeChild(this)},Ko.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},Ko.posAfter.get=function(){return this.posBefore+this.size},Ko.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},Ho.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>co(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},Ho.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}}},Ho.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},Ho.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},Ho.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}},Ho.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 Yo){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 $o&&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?co(l.dom)+1:0}}for(var u,p=!0;(u=n<this.children.length?this.children[n]:null)&&u.dom.parentNode!=this.contentDOM;n++,p=!1);return u&&p&&!u.border&&!u.domAtom?u.domFromPos(0,t):{node:this.contentDOM,offset:u?co(u.dom):this.contentDOM.childNodes.length}},Ho.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 p=this.children[u-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){r=co(p.dom)+1;break}e-=p.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var d=a+1;d<this.children.length;d++){var f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=co(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}},Ho.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)},Ho.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]},Ho.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),p=t==e?u:this.domFromPos(t,t?-1:1),d=n.getSelection(),f=!1;if((ro.gecko||ro.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=p={node:g.parentNode,offset:co(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(ro.gecko&&d.focusNode&&d.focusNode!=p.node&&1==d.focusNode.nodeType){var k=d.focusNode.childNodes[d.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||f&&ro.safari||!ho(u.node,u.offset,d.anchorNode,d.anchorOffset)||!ho(p.node,p.offset,d.focusNode,d.focusOffset)){var w=!1;if((d.extend||e==t)&&!f){d.collapse(u.node,u.offset);try{e!=t&&d.extend(p.node,p.offset),w=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!w){if(e>t){var C=u;u=p,p=C}var O=document.createRange();O.setEnd(p.node,p.offset),O.setStart(u.node,u.offset),d.removeAllRanges(),d.addRange(O)}}},Ho.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},Ko.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Ho.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?2:3}n=i}this.dirty=2},Ho.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)}},Ko.domAtom.get=function(){return!1},Ko.ignoreForCoords.get=function(){return!1},Object.defineProperties(Ho.prototype,Ko);var Wo=[],$o=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,Wo,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},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(Ho),Uo=function(e){function t(t,n,r,o){e.call(this,t,Wo,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}(Ho),qo=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=pe.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,a.dom,a.contentDOM||a.dom)},t.prototype.parseRule=function(){return{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=ci(i,n,a,r)),e>0&&(i=ci(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},t}(Ho),Go=function(e){function t(t,n,r,o,i,a,s,l,c){e.call(this,t,n.isLeaf?Wo:[],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),p=u&&u.dom,d=u&&u.contentDOM;if(n.isText)if(p){if(3!=p.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else p=document.createTextNode(n.text);else p||(p=(s=pe.renderSpec(document,n.type.spec.toDOM(n))).dom,d=s.contentDOM);d||n.isText||"BR"==p.nodeName||(p.hasAttribute("contenteditable")||(p.contentEditable=!1),n.type.spec.draggable&&(p.draggable=!0));var f=p;return p=oi(p,r,n),u?l=new Zo(e,n,r,o,p,d,f,u,i,a+1):n.isText?new Jo(e,n,r,o,p,f,i):new t(e,n,r,o,p,d,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};return this.node.type.spec.code&&(t.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?t.contentElement=this.contentDOM:t.getContent=function(){return e.contentDOM?i.empty:e.node.content},t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ii(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 si(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,p=0;;){if(l<o.length&&o[l].to==i){for(var d=o[l++],f=void 0;l<o.length&&o[l].to==i;)(f||(f=[d])).push(o[l++]);if(f){f.sort(li);for(var h=0;h<f.length;h++)n(f[h],p,!!u)}else n(d,p,!!u)}var m=void 0,v=void 0;if(u)v=-1,m=u,u=null;else{if(!(p<e.childCount))break;v=p,m=e.child(p++)}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():Wo;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(Wo,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=ai(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(s instanceof qo){var c=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=c?c.nextSibling:t.firstChild}}for(;o;)o=ai(o),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),ro.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 rt)||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=go(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=l.lastIndexOf(t,r-s);if(u>=0&&u+t.length+s>=n)return s+u}}}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 Uo(this,i,n,o);e.compositionNodes.push(a),this.children=ci(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(!ii(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=ni(this.dom,this.nodeDOM,ti(this.outerDeco,this.node,t),ti(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}(Ho);function Xo(e,t,n,r,o){return oi(r,t,e),new Go(null,e,t,n,r,r,r,o,0)}var Jo=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}(Go),Yo=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}(Ho),Zo=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}(Go);function Qo(e){e&&(this.nodeName=e)}Qo.prototype=Object.create(null);var ei=[new Qo];function ti(e,t,n){if(0==e.length)return ei;for(var r=n?ei[0]:new Qo,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 Qo(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new Qo(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 ni(e,t,n,r){if(n==ei&&r==ei)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=ei[0]),o=l}ri(o,s||ei[0],a)}return o}function ri(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):Wo,a=n.class?n.class.split(" ").filter(Boolean):Wo,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])}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 oi(e,t,n){return ni(e,e,ei,ti(t,n,1!=e.nodeType))}function ii(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 ai(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var si=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(e,t){for(var n=e.childCount,r=t.length,o=new Map;n>0&&r>0;r--){var i=t[r-1],a=i.node;if(a){if(a!=e.child(n-1))break;--n,o.set(i,n)}}return{index:n,matched:o}}(e.node.content,e.children)};function li(e,t){return e.type.side-t.type.side}function ci(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 ui(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(bo(n)){for(s=c;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&it.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(e,t,n){for(var r=0==t,o=t==go(e);r||o;){if(e==n)return!0;var i=co(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==go(e)}}(n.focusNode,n.focusOffset,o.dom))){var u=o.posBefore;l=new it(a==u?c:r.resolve(u))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;s=r.resolve(p)}l||(l=bi(e,s,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1));return l}function pi(e){return e.editable?e.hasFocus():ki(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function di(e,t){var n=e.state.selection;if(gi(e,n),pi(e)){if(!t&&e.mouseDown&&e.mouseDown.allowDefault)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,co(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&ro.ie&&ro.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var r,o,i=n.anchor,a=n.head;!fi||n instanceof rt||(n.$from.parent.inlineContent||(r=hi(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=hi(e,n.to))),e.docView.setSelection(i,a,e.root,t),fi&&(r&&vi(r),o&&vi(o)),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(){pi(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}si.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}},si.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},si.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=qo.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++}},si.prototype.findNodeMatch=function(e,t,n,r){var o=this.top.children,i=-1;if(r>=this.preMatch.index){for(var a=this.index;a<o.length;a++)if(o[a].matchesNode(e,t,n)){i=a;break}}else for(var s=this.index,l=Math.min(o.length,s+1);s<l;s++){var c=o[s];if(c.matchesNode(e,t,n)&&!this.preMatch.matched.has(c)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},si.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)},si.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}},si.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 Go){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&&ii(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},si.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,Go.create(this.top,e,t,n,r,o)),this.changed=!0},si.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 $o(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},si.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof qo;)e=e.children[e.children.length-1];e&&e instanceof Jo&&!/\n$/.test(e.node.text)||((ro.safari||ro.chrome)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},si.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"),"BR"==e&&(t.className="ProseMirror-trailingBreak"),this.top.children.splice(this.index++,0,new Yo(this.top,Wo,t,null)),this.changed=!0}};var fi=ro.safari||ro.chrome&&ro.chrome_version<63;function hi(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(ro.safari&&i&&"false"==i.contentEditable)return mi(i);if(!(i&&"false"!=i.contentEditable||a&&"false"!=a.contentEditable)){if(i)return mi(i);if(a)return mi(a)}}function mi(e){return e.contentEditable="true",ro.safari&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function vi(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function gi(e,t){if(t instanceof it){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(yi(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else yi(e)}function yi(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function bi(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||rt.between(t,n,r)}function ki(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 wi(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&&et.findFrom(a,t)}function Ci(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Oi(e,t,n){var r=e.state.selection;if(!(r instanceof rt)){if(r instanceof it&&r.node.isInline)return Ci(e,new rt(t>0?r.$to:r.$from));var o=wi(e.state,t);return!!o&&Ci(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=wi(e.state,t);return!!(i&&i instanceof it)&&Ci(e,i)}if(!(ro.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)&&(it.isSelectable(l)?Ci(e,new it(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!ro.webkit&&Ci(e,new rt(e.state.doc.resolve(t<0?c:c+l.nodeSize))))}}function xi(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Si(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Ei(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(ro.gecko&&1==n.nodeType&&r<xi(n)&&Si(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Si(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Ni(n))break;for(var l=n.previousSibling;l&&Si(l);)o=n.parentNode,i=co(l),l=l.previousSibling;if(l)r=xi(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Ti(e,t,n,r):o&&Ti(e,t,o,i)}}function Ii(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=xi(n);;)if(r<a){if(1!=n.nodeType)break;if(!Si(n.childNodes[r]))break;o=n,i=++r}else{if(Ni(n))break;for(var s=n.nextSibling;s&&Si(s);)o=s.parentNode,i=co(s)+1,s=s.nextSibling;if(s)r=0,a=xi(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Ti(e,t,o,i)}}function Ni(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ti(e,t,n,r){if(bo(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&&di(e)}),50)}function Di(e,t,n){var r=e.state.selection;if(r instanceof rt&&!r.empty||n.indexOf("s")>-1)return!1;if(ro.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=wi(e.state,t);if(a&&a instanceof it)return Ci(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof st?et.near(s,t):et.findFrom(s,t);return!!l&&Ci(e,l)}return!1}function _i(e,t){if(!(e.state.selection instanceof rt))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 Mi(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Pi(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||ro.mac&&72==n&&"c"==r?_i(e,-1)||Ei(e):46==n||ro.mac&&68==n&&"c"==r?_i(e,1)||Ii(e):13==n||27==n||(37==n?Oi(e,-1,r)||Ei(e):39==n?Oi(e,1,r)||Ii(e):38==n?Di(e,-1,r)||Ei(e):40==n?function(e){if(ro.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;Mi(e,o,!0),setTimeout((function(){return Mi(e,o,!1)}),20)}}}(e)||Di(e,1,r)||Ii(e):r==(ro.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function ji(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(ro.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||ro.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function Ri(e,t,n,r,o){if(t<0){var a=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,s=ui(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 p=e.state.selection,d=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,p=c.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(u=[{node:p,offset:c.anchorOffset}],bo(c)||u.push({node:c.focusNode,offset:c.focusOffset})),ro.chrome&&8===e.lastKeyCode)for(var d=a;d>i;d--){var f=o.childNodes[d-1],h=f.pmViewDesc;if("BR"==f.nodeName&&!h){a=d;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:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:u,ruleFromNode:ji,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(ro.chrome&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,v,g=e.state.doc,y=g.slice(d.from,d.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,d.doc.content,d.from,m,v);if(!b){if(!(r&&p instanceof rt&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if((ro.ios&&e.lastIOSEnter>Date.now()-225||ro.android)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&e.someProp("handleKeyDown",(function(t){return t(e,ko(13,"Enter"))})))return void(e.lastIOSEnter=0);if(d.sel){var k=Ai(e,e.state.doc,d.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}b={start:p.from,endA:p.to,endB:p.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&b.start==b.endB&&e.state.selection instanceof rt&&(b.start>e.state.selection.from&&b.start<=e.state.selection.from+2?b.start=e.state.selection.from:b.endA<e.state.selection.to&&b.endA>=e.state.selection.to-2&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),ro.ie&&ro.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>d.from&&" "==d.doc.textBetween(b.start-d.from-1,b.start-d.from+1)&&(b.start--,b.endA--,b.endB--);var w,C=d.doc.resolveNoCache(b.start-d.from),O=d.doc.resolveNoCache(b.endB-d.from),x=C.sameParent(O)&&C.parent.inlineContent;if((ro.ios&&e.lastIOSEnter>Date.now()-225&&(!x||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!x&&C.pos<d.doc.content.size&&(w=et.findFrom(d.doc.resolve(C.pos+1),1,!0))&&w.head==O.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,ko(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||Fi(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(Fi(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Fi(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,ko(8,"Backspace"))})))ro.android&&ro.chrome&&e.domObserver.suppressSelectionUpdates();else{ro.chrome&&ro.android&&b.toB==b.from&&(e.lastAndroidDelete=Date.now()),ro.android&&!x&&C.start()!=O.start()&&0==O.parentOffset&&C.depth==O.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==b.endA&&(b.endB-=2,O=d.doc.resolveNoCache(b.endB-d.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,ko(13,"Enter"))}))}),20));var S,E,I,N,T=b.start,D=b.endA;if(x)if(C.pos==O.pos)ro.ie&&ro.ie_version<=11&&0==C.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return di(e)}),20)),S=e.state.tr.delete(T,D),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 p=0;p<a.length;p++)c=a[p].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 d=[],f=0;f<t.childCount;f++)d.push(o(t.child(f)));if(i.from(d).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,D,I.mark):S.removeMark(T,D,I.mark);else if(C.parent.child(C.index()).isText&&C.index()==O.index()-(O.textOffset?0:1)){var _=C.parent.textBetween(C.parentOffset,O.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,T,D,_)})))return;S=e.state.tr.insertText(_,T,D)}if(S||(S=e.state.tr.replace(T,D,d.doc.slice(b.start-d.from,b.endB-d.from))),d.sel){var M=Ai(e,S.doc,d.sel);M&&!(ro.chrome&&ro.android&&e.composing&&M.empty&&(b.start!=b.endB||e.lastAndroidDelete<Date.now()-100)&&(M.head==T||M.head==S.mapping.map(D)-1)||ro.ie&&M.empty&&M.head==T)&&S.setSelection(M)}E&&S.ensureMarks(E),e.dispatch(S.scrollIntoView())}}}function Ai(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:bi(e,t.resolve(n.anchor),t.resolve(n.head))}function Fi(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 Li(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")||pe.fromSchema(e.state.schema),l=$i(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));for(var u,p=c.firstChild;p&&1==p.nodeType&&(u=Ki[p.nodeName.toLowerCase()]);){for(var d=u.length-1;d>=0;d--){for(var f=l.createElement(u[d]);c.firstChild;)f.appendChild(c.firstChild);c.appendChild(f),"tbody"!=u[d]&&(o++,i++)}p=c.firstChild}return p&&1==p.nodeType&&p.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 Bi(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 d(i.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):d.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)s=u;else{var p=o.marks(),f=e.state.schema,h=pe.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,p)))}))}}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=$i().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Ki[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),ro.webkit&&function(e){for(var t=e.querySelectorAll(ro.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})}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 d(o,a,s)}(Hi(s,+v[1],+v[2]),v[3]);else if((s=d.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=Hi(s,y,b)}return e.someProp("transformPasted",(function(e){s=e(s)})),s}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 Vi(e,t,n,r,o,a){var s=t<0?e.firstChild:e.lastChild,l=s.content;return o<r-1&&(l=Vi(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 Hi(e,t,n){return t<e.openStart&&(e=new d(Vi(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new d(Vi(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Ki={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Wi=null;function $i(){return Wi||(Wi=document.implementation.createHTMLDocument("title"))}var Ui={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},qi=ro.ie&&ro.ie_version<=11,Gi=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Gi.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Gi.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Xi=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]);ro.ie&&ro.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 Gi,qi&&(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};Xi.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Xi.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Xi.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ui),qi&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Xi.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()}qi&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Xi.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Xi.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Xi.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},Xi.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&ki(e)){var e;if(this.suppressingSelectionUpdates)return di(this.view);if(ro.ie&&ro.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&ho(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},Xi.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Xi.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},Xi.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)&&ki(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(ro.gecko&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var u=c[0],p=c[1];u.parentNode&&u.parentNode.parentNode==p.parentNode?p.remove():u.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Ji)return;Ji=!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.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||di(this.view),this.currentSelection.set(t))}},Xi.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(ro.ie&&ro.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?co(o)+1:0,p=n.localPosFromDOM(e.target,u,-1),d=i&&i.parentNode==e.target?co(i):e.target.childNodes.length;return{from:p,to:n.localPosFromDOM(e.target,d,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 Ji=!1;var Yi={},Zi={};function Qi(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function ea(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return ta(e,t)})}))}function ta(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function na(e){return{left:e.clientX,top:e.clientY}}function ra(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 oa(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ia(e,t,n,r,o){return ra(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 it&&(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(it.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&&(oa(e,it.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&&it.isSelectable(r))&&(oa(e,new it(n),"pointer"),!0)}(e,n))}function aa(e,t,n,r){return ra(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function sa(e,t,n,r){return ra(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&&(oa(e,rt.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)oa(e,rt.create(r,s+1,s+1+a.content.size),"pointer");else{if(!it.isSelectable(a))continue;oa(e,it.create(r,s),"pointer")}return!0}}(e,n,r)}function la(e){return ma(e)}Zi.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!pa(e,t))if(229!=t.keyCode&&e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!ro.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||Pi(e,t)?t.preventDefault():Qi(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,ko(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Zi.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Zi.keypress=function(e,t){if(!(pa(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||ro.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof rt&&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 ca=ro.mac?"metaKey":"ctrlKey";Yi.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=la(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[ca]&&("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(na(t));i&&("singleClick"==o?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new ua(e,i,t,n)):("doubleClick"==o?aa:sa)(e,i.pos,i.inside,t)?t.preventDefault():Qi(e,"pointer"))};var ua=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[ca],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 it&&u.from<=i&&u.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&ro.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)),Qi(e,"pointer")};function pa(e,t){return!!e.composing||!!(ro.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}ua.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 di(e.view)})),this.view.mouseDown=null},ua.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(na(e))),this.allowDefault||!t?Qi(this.view,"pointer"):ia(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ro.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||ro.chrome&&!(this.view.state.selection instanceof rt)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(oa(this.view,et.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Qi(this.view,"pointer")}},ua.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),Qi(this.view,"pointer"),0==e.buttons&&this.done()},Yi.touchdown=function(e){la(e),Qi(e,"pointer")},Yi.contextmenu=function(e){return la(e)};var da=ro.android?5e3:-1;function fa(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return ma(e)}),t))}function ha(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 ma(e,t){if(e.domObserver.forceFlush(),ha(e),t||e.docView.dirty){var n=ui(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}Zi.compositionstart=Zi.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(),ma(e,!0),e.markCursor=null;else if(ma(e),ro.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}fa(e,da)},Zi.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,fa(e,20))};var va=ro.ie&&ro.ie_version<15||ro.ios&&ro.webkit_version<604;function ga(e,t,n,r){var o=Bi(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||d.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}Yi.copy=Zi.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=va?null:t.clipboardData,i=Li(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"))}},Zi.paste=function(e,t){var n=va?null:t.clipboardData;n&&ga(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?ga(e,r.value,null,t):ga(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)};var ya=function(e,t){this.slice=e,this.move=t},ba=ro.mac?"altKey":"ctrlKey";for(var ka in Yi.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(na(t));if(o&&o.pos>=r.from&&o.pos<=(r instanceof it?r.to-1:r.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(it.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(it.create(e.state.doc,i.posBefore)))}var a=e.state.selection.content(),s=Li(e,a),l=s.dom,c=s.text;t.dataTransfer.clearData(),t.dataTransfer.setData(va?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",va||t.dataTransfer.setData("text/plain",c),e.dragging=new ya(a,!t[ba])}},Yi.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Zi.dragover=Zi.dragenter=function(e,t){return t.preventDefault()},Zi.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var r=e.posAtCoords(na(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=Bi(e,t.dataTransfer.getData(va?"Text":"text/plain"),va?null:t.dataTransfer.getData("text/html"),!1,o);var a=n&&!t[ba];if(e.someProp("handleDrop",(function(n){return n(e,t,i||d.empty,a)})))t.preventDefault();else if(i){t.preventDefault();var s=i?Le(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,p=l.doc;if(u?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),!l.doc.eq(p)){var f=l.doc.resolve(c);if(u&&it.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new it(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(bi(e,f,l.doc.resolve(h)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}}}}}},Yi.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())&&di(e)}),20))},Yi.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)},Yi.beforeinput=function(e,t){if(ro.chrome&&ro.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,ko(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)}},Zi)Yi[ka]=Zi[ka];function wa(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 Ca=function(e,t){this.spec=t||Na,this.side=this.spec.side||0,this.toDOM=e};Ca.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 Sa(i-n,i-n,this)},Ca.prototype.valid=function(){return!0},Ca.prototype.eq=function(e){return this==e||e instanceof Ca&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&wa(this.spec,e.spec))};var Oa=function(e,t){this.spec=t||Na,this.attrs=e};Oa.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 Sa(o,i,this)},Oa.prototype.valid=function(e,t){return t.from<t.to},Oa.prototype.eq=function(e){return this==e||e instanceof Oa&&wa(this.attrs,e.attrs)&&wa(this.spec,e.spec)},Oa.is=function(e){return e.type instanceof Oa};var xa=function(e,t){this.spec=t||Na,this.attrs=e};xa.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 Sa(o.pos-n,i.pos-n,this)},xa.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},xa.prototype.eq=function(e){return this==e||e instanceof xa&&wa(this.attrs,e.attrs)&&wa(this.spec,e.spec)};var Sa=function(e,t,n){this.from=e,this.to=t,this.type=n},Ea={spec:{configurable:!0},inline:{configurable:!0}};Sa.prototype.copy=function(e,t){return new Sa(e,t,this.type)},Sa.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},Sa.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},Sa.widget=function(e,t,n){return new Sa(e,e,new Ca(t,n))},Sa.inline=function(e,t,n,r){return new Sa(e,t,new Oa(n,r))},Sa.node=function(e,t,n,r){return new Sa(e,t,new xa(n,r))},Ea.spec.get=function(){return this.type.spec},Ea.inline.get=function(){return this.type instanceof Oa},Object.defineProperties(Sa.prototype,Ea);var Ia=[],Na={},Ta=function(e,t){this.local=e&&e.length?e:Ia,this.children=t&&t.length?t:Ia};Ta.create=function(e,t){return t.length?Ra(t,e,0,Na):Da},Ta.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},Ta.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)}},Ta.prototype.map=function(e,t,n){return this==Da||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Na)},Ta.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;-1==l||e>l+i||(t>=s[a]+i?s[a+1]=-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,p=0;p<s.length;p+=3)if(-1==s[p+1]){var d=n.map(e[p]+i),f=d-o;if(f<0||f>=r.content.size){u=!0;continue}var h=n.map(e[p+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[p+2].mapInner(n,y,d+1,e[p]+i+1,a);b!=Da?(s[p]=f,s[p+1]=h,s[p+2]=b):(s[p+1]=-2,u=!0)}else u=!0}if(u){var k=Ra(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 Ta(t&&t.sort(Aa),s)}(this.children,i,e,t,n,r,o):i?new Ta(i.sort(Aa)):Da},Ta.prototype.add=function(e,t){return t.length?this==Da?Ta.create(e,t):this.addInner(e,t,0):this},Ta.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach((function(e,a){var s,l=a+n;if(s=Pa(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,Ra(s,e,l+1,Na)),i+=3}}));for(var a=Ma(i?ja(t):t,-n),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Ta(a.length?this.local.concat(a).sort(Aa):this.local,r||this.children)},Ta.prototype.remove=function(e){return 0==e.length||this==Da?this:this.removeInner(e,0)},Ta.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!=Da?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var p=0,d=void 0;p<e.length;p++)if(d=e[p])for(var f=0;f<r.length;f++)r[f].eq(d,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 Ta(r,n):Da},Ta.prototype.forChild=function(e,t){if(this==Da)return this;if(t.isLeaf)return Ta.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 Oa){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 p=new Ta(r.sort(Aa));return n?new _a([p,n]):p}return n||Da},Ta.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof Ta)||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},Ta.prototype.locals=function(e){return Fa(this.localsInner(e))},Ta.prototype.localsInner=function(e){if(this==Da)return Ia;if(e.inlineContent||!this.local.some(Oa.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Oa||t.push(this.local[n]);return t};var Da=new Ta;Ta.empty=Da,Ta.removeOverlap=Fa;var _a=function(e){this.members=e};function Ma(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new Sa(o.from+t,o.to+t,o.type))}return n}function Pa(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 ja(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Ra(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=Pa(e,t,a+n);if(s){i=!0;var l=Ra(s,t,n+a+1,r);l!=Da&&o.push(a,a+t.nodeSize,l)}}));for(var a=Ma(i?ja(e):e,-n).sort(Aa),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 Ta(a,o):Da}function Aa(e,t){return e.from-t.from||e.to-t.to}function Fa(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),La(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),La(t,o+1,i.copy(r.to,i.to)))}}return t}function La(e,t,n){for(;t<e.length&&Aa(n,e[t])>0;)t++;e.splice(t,0,n)}function Ba(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=Da&&t.push(r)})),e.cursorWrapper&&t.push(Ta.create(e.state.doc,[e.cursorWrapper.deco])),_a.from(t)}_a.prototype.map=function(e,t){var n=this.members.map((function(n){return n.map(e,t,Na)}));return _a.from(n)},_a.prototype.forChild=function(e,t){if(t.isLeaf)return Ta.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=Da&&(o instanceof _a?n=n.concat(o.members):n.push(o))}return _a.from(n)},_a.prototype.eq=function(e){if(!(e instanceof _a)||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},_a.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?Fa(n?t:t.sort(Aa)):Ia},_a.from=function(e){switch(e.length){case 0:return Da;case 1:return e[0];default:return new _a(e)}};var za,Va,Ha=function(e,t){this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Ga),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=Ua(this),this.markCursor=null,this.cursorWrapper=null,$a(this),this.nodeViews=qa(this),this.docView=Xo(this.state.doc,Wa(this),Ba(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 Xi(e,(function(t,n,r,o){return Ri(e,t,n,r,o)})),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=Yi[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)||ta(e,t)||!e.editable&&t.type in Zi||n(e,t)})};for(var n in Yi)t(n);ro.safari&&e.dom.addEventListener("input",(function(){return null})),ea(e)}(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()},Ka={props:{configurable:!0},root:{configurable:!0}};function Wa(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]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[Sa.node(0,e.state.doc.content.size,t)]}function $a(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),e.cursorWrapper={dom:t,deco:Sa.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Ua(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function qa(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 Ga(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(Ka.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},Ha.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ea(this),this._props=e,e.plugins&&(e.plugins.forEach(Ga),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)},Ha.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)},Ha.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},Ha.prototype.updateStateInner=function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(ha(this),i=!0),this.state=e,t){var a=qa(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),ea(this)}this.editable=Ua(this),$a(this);var s=Ba(this),l=Wa(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 p,d,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:So(e.dom)}}(this);if(i){this.domObserver.stop();var O=u&&(ro.ie||ro.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=ro.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=Xo(e.doc,l,s,this.dom,this)),x&&!this.trackWrites&&(O=!0)}O||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,d=p.docView.domFromPos(p.state.selection.anchor,0),f=p.root.getSelection(),ho(d.node,d.offset,f.anchorNode,f.anchorOffset)))?di(this,O):(gi(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 it?xo(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),S):xo(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,Eo(k,0==w?0:w-b))},Ha.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},Ha.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))}}},Ha.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}},Ha.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Ha.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(Io)return e.focus(Io);var t=So(e);e.focus(null==Io?{get preventScroll(){return Io={preventScroll:!0},!0}}:void 0),Io||(Io=!1,Eo(t,0))}(this.dom),di(this),this.domObserver.start()},Ka.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},Ha.prototype.posAtCoords=function(e){return Do(this,e)},Ha.prototype.coordsAtPos=function(e,t){return void 0===t&&(t=1),Po(this,e,t)},Ha.prototype.domAtPos=function(e,t){return void 0===t&&(t=0),this.docView.domFromPos(e,t)},Ha.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},Ha.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},Ha.prototype.endOfTextblock=function(e,t){return Vo(this,t||this.state,e)},Ha.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,[],Ba(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Ha.prototype.dispatchEvent=function(e){return function(e,t){ta(e,t)||!Yi[t.type]||!e.editable&&t.type in Zi||Yi[t.type](e,t)}(this,e)},Ha.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(Ha.prototype,Ka),"undefined"!=typeof WeakMap){var Xa=new WeakMap;za=function(e){return Xa.get(e)},Va=function(e,t){return Xa.set(e,t),t}}else{var Ja=[],Ya=0;za=function(e){for(var t=0;t<Ja.length;t+=2)if(Ja[t]==e)return Ja[t+1]},Va=function(e,t){return 10==Ya&&(Ya=0),Ja[Ya++]=e,Ja[Ya++]=t}}var Za=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},Qa=function(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r};function es(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}function ts(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 ns(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 rs(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 ts(e,t)}}],toDOM:function(e){return["td",ns(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return ts(e,t)}}],toDOM:function(e){return["th",ns(e,t),0]}}}}function is(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}Qa.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 Za(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")},Qa.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")},Qa.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)]},Qa.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,p=s.bottom;return new Za(Math.min(r,l),Math.min(i,u),Math.max(o,c),Math.max(a,p))},Qa.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},Qa.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}},Qa.get=function(e){return za(e)||Va(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 p=o.child(u);i+=p.attrs.colspan,p.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 p=e.child(c);u++;for(var d=0;;d++){for(;o<r.length&&0!=r[o];)o++;if(d==p.childCount)break;for(var f=p.child(d),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 Qa(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=es(a.attrs)))[l]=u)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(E,a,e);return E}(e))};var as=new Ct("selectingCells");function ss(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 ls(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 cs(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:ss(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 us(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function ps(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ds(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function fs(e){return Qa.get(e.node(-1)).findCell(e.pos-e.start(-1))}function hs(e){return Qa.get(e.node(-1)).colCount(e.pos-e.start(-1))}function ms(e,t,n){var r=e.start(-1),o=Qa.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function vs(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function gs(e,t,n){void 0===n&&(n=1);var r=vs(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 ys(e,t,n){void 0===n&&(n=1);var r=vs(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 bs(e,t,n){for(var r=is(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 ks=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=Qa.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 nt(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(us(r)&&us(o)&&ds(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 rt.between(r,o)},t.prototype.content=function(){for(var e=this.$anchorCell.node(-1),t=Qa.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 p=t.map[c];if(!o[p]){o[p]=!0;var f=t.findCell(p),h=e.nodeAt(p),m=r.left-f.left,v=f.right-r.right;if(m>0||v>0){var g=h.attrs;m>0&&(g=gs(g,0,m)),v>0&&(g=gs(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=vs(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 d(i.from(b),1,1)},t.prototype.replace=function(t,n){void 0===n&&(n=d.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?d.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 d(i.from(t),0,0))},t.prototype.forEachCell=function(e){for(var t=this.$anchorCell.node(-1),n=Qa.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=Qa.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=Qa.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=Qa.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 ws(this.$anchorCell.pos,this.$headCell.pos)},t}(et);ks.prototype.visible=!1,et.jsonID("cell",ks);var ws=function(e,t){this.anchor=e,this.head=t};function Cs(e){if(!(e.selection instanceof ks))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(Sa.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Ta.create(e.doc,t)}function Os(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,p=c?0:Math.max(0,n-1),f=c<t.childCount-1?0:Math.max(0,r-1);(p||f)&&(u=xs(is(s).row,new d(u,p,f)).content),l.push(u)}else{if("cell"!=a&&"header_cell"!=a)return null;l.push(n||r?xs(is(s).row,new d(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 p=0,d=0;d<n.length;d++)p=Math.max(p,n[d]);for(var f=0;f<n.length;f++)if(f>=t.length&&t.push(i.empty),n[f]<p){for(var h=is(e).cell.createAndFill(),m=[],v=n[f];v<p;v++)m.push(h);t[f]=t[f].append(i.from(m))}return{height:t.length,width:p,rows:t}}(s,l)}function xs(e,t){var n=e.createAndFill();return new ke(n).replace(0,n.content.size,t).doc}function Ss(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],p=[],d=s[c]||0,f=0;d<t;f++){var h=u.child(f%u.childCount);d+h.attrs.colspan>t&&(h=h.type.create(gs(h.attrs,h.attrs.colspan,d+h.attrs.colspan-t),h.content)),p.push(h),d+=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(p))}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(vs(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}}function Es(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,p=t.map[u];if(t.map[u-t.width]==p){l=!0;var d=n.nodeAt(p),f=t.findCell(p),h=f.top,m=f.left;e.setNodeMarkup(e.mapping.slice(s).map(p+r),null,vs(d.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),d.type.createAndFill(vs(d.attrs,"rowspan",h+d.attrs.rowspan-a))),c+=d.attrs.colspan-1}}return l}function Is(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,p=t.map[u];if(t.map[u-1]==p){l=!0;var d=n.nodeAt(p),f=t.colCount(p),h=e.mapping.slice(s).map(p+r);e.setNodeMarkup(h,null,gs(d.attrs,a-f,d.attrs.colspan-(a-f))),e.insert(h+d.nodeSize,d.type.createAndFill(gs(d.attrs,0,a-f))),c+=d.attrs.rowspan-1}}return l}function Ns(e,t,n,r,o){var a=n?e.doc.nodeAt(n-1):e.doc,s=Qa.get(a),l=r.top,c=r.left,u=c+o.width,p=l+o.height,f=e.tr,h=0;function m(){a=n?f.doc.nodeAt(n-1):f.doc,s=Qa.get(a),h=f.mapping.maps.length}(function(e,t,n,r,o,a,s){var l,c,u=is(e.doc.type.schema);if(o>t.width)for(var p=0,d=0;p<t.height;p++){var f=n.child(p);d+=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(d-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,p,h)&&m(),Es(f,s,a,n,c,u,l,h)&&m(),Es(f,s,a,n,c,u,p,h)&&m(),Is(f,s,a,n,l,p,c,h)&&m(),Is(f,s,a,n,l,p,u,h)&&m();for(var v=l;v<p;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 d(o.rows[v-l],0,0))}m(),f.setSelection(new ks(f.doc.resolve(n+s.positionAt(l,c,a)),f.doc.resolve(n+s.positionAt(p-1,u-1,a)))),t(f)}ws.prototype.map=function(e){return new ws(e.map(this.anchor),e.map(this.head))},ws.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&&ds(t,n)?new ks(t,n):et.near(n,1)};var Ts=no({ArrowLeft:_s("horiz",-1),ArrowRight:_s("horiz",1),ArrowUp:_s("vert",-1),ArrowDown:_s("vert",1),"Shift-ArrowLeft":Ms("horiz",-1),"Shift-ArrowRight":Ms("horiz",1),"Shift-ArrowUp":Ms("vert",-1),"Shift-ArrowDown":Ms("vert",1),Backspace:Ps,"Mod-Backspace":Ps,Delete:Ps,"Mod-Delete":Ps});function Ds(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function _s(e,t){return function(n,r,o){var i=n.selection;if(i instanceof ks)return Ds(n,r,et.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;var a=Fs(o,e,t);if(null==a)return!1;if("horiz"==e)return Ds(n,r,et.near(n.doc.resolve(i.head+t),t));var s,l=n.doc.resolve(a),c=ms(l,e,t);return s=c?et.near(c,1):t<0?et.near(n.doc.resolve(l.before(-1)),-1):et.near(n.doc.resolve(l.after(-1)),1),Ds(n,r,s)}}function Ms(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof ks)){var a=Fs(o,e,t);if(null==a)return!1;i=new ks(n.doc.resolve(a))}var s=ms(i.$headCell,e,t);return!!s&&Ds(n,r,new ks(i.$anchorCell,s))}}function Ps(e,t){var n=e.selection;if(!(n instanceof ks))return!1;if(t){var r=e.tr,o=is(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 d(o,0,0))})),r.docChanged&&t(r)}return!0}function js(e,t){var n=ss(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new ks(n))),!0)}function Rs(e,t,n){if(!ls(e.state))return!1;var r=Os(n),o=e.state.selection;if(o instanceof ks){r||(r={width:1,height:1,rows:[i.from(xs(is(e.state.schema).cell,n))]});var a=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=Qa.get(a).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=Ss(r,l.right-l.left,l.bottom-l.top),Ns(e.state,e.dispatch,s,l,r),!0}if(r){var c=cs(e.state),u=c.start(-1);return Ns(e.state,e.dispatch,u,Qa.get(c.node(-1)).findCell(c.pos-u),r),!0}return!1}function As(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=Ls(e,t.target);if(t.shiftKey&&e.state.selection instanceof ks)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=ss(e.state.selection.$anchor))&&Bs(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=Bs(e,n),o=null==as.getState(e.state);if(!r||!ds(t,r)){if(!o)return;r=t}var i=new ks(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(as,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=as.getState(e.state)&&e.dispatch(e.state.tr.setMeta(as,-1))}function a(n){var a,s=as.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(Ls(e,n.target)!=r&&!(a=Bs(e,t)))return i();a&&o(a,n)}}function Fs(e,t,n){if(!(e.state.selection instanceof rt))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 Ls(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Bs(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?ss(e.state.doc.resolve(n.pos)):null}var zs=new Ct("fix-tables");function Vs(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=Qa.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 p=t.nodeAt(u.pos),d=0;d<p.attrs.rowspan;d++)s[u.row+d]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,gs(p.attrs,p.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,vs(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,vs(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(is(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(zs,{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,p=Math.min(i,s+3);u<p;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 Hs(e){var t,n=e.selection,r=cs(e),o=r.node(-1),i=r.start(-1),a=Qa.get(o);return(t=n instanceof ks?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 Ks(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;bs(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,ys(u.attrs,n-r.colCount(c))),s+=u.attrs.rowspan-1}else{var p=null==a?is(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,d=r.positionAt(s,n,i);e.insert(e.mapping.map(o+d),p.createAndFill())}}return e}function Ws(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Ks(e.tr,n,n.left))}return!0}function $s(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Ks(e.tr,n,n.right))}return!0}function Us(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,gs(u.attrs,n-r.colCount(c)));else{var p=e.mapping.slice(a).map(i+c);e.delete(p,p+u.nodeSize)}s+=u.attrs.rowspan}}function qs(e,t){if(!ls(e))return!1;if(t){var n=Hs(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;Us(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Qa.get(n.table);t(r)}return!0}function Gs(e,t,n){for(var r=is(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 Xs(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;Gs(r,i,n+c)&&(c=0==n||n==r.height?null:0);for(var u=0,p=r.width*n;u<r.width;u++,p++)if(n>0&&n<r.height&&r.map[p]==r.map[p-r.width]){var d=r.map[p],f=i.nodeAt(d).attrs;e.setNodeMarkup(o+d,null,vs(f,"rowspan",f.rowspan+1)),u+=f.colspan-1}else{var h=null==c?is(i.type.schema).cell:i.nodeAt(r.map[p+c*r.width]).type;l.push(h.createAndFill())}return e.insert(a,is(i.type.schema).row.create(null,l)),e}function Js(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Xs(e.tr,n,n.top))}return!0}function Ys(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Xs(e.tr,n,n.bottom))}return!0}function Zs(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,p=n*r.width;u<r.width;u++,p++){var d=r.map[p];if(n>0&&d==r.map[p-r.width]){var f=o.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(c).map(d+i),null,vs(f,"rowspan",f.rowspan-1)),u+=f.colspan-1}else if(n<r.width&&d==r.map[p+r.width]){var h=o.nodeAt(d),m=h.type.create(vs(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 Qs(e,t){if(!ls(e))return!1;if(t){var n=Hs(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;Zs(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Qa.get(n.table);t(r)}return!0}function el(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function tl(e,t){var n=e.selection;if(!(n instanceof ks)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=Hs(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,p=r.top;p<r.bottom;p++)for(var d=r.left;d<r.right;d++){var f=o.map[p*o.width+d],h=r.table.nodeAt(f);if(!c[f])if(c[f]=!0,null==a)a=f,s=h;else{el(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,vs(ys(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=el(s)?a+1:v;l.replaceWith(g+r.tableStart,v+r.tableStart,u)}l.setSelection(new ks(l.doc.resolve(a+r.tableStart))),t(l)}return!0}function nl(e,t){var n=is(e.schema);return rl((function(e){var t=e.node;return n[t.type.spec.tableRole]}))(e,t)}function rl(e){return function(t,n){var r,o,i=t.selection;if(i instanceof ks){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=ss(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=vs(a,"rowspan",1)),a.colspan>1&&(a=vs(a,"colspan",1));for(var c,u=Hs(t),p=t.tr,d=0;d<u.right-u.left;d++)s.push(l?vs(a,"colwidth",l&&l[d]?[l[d]]: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||p.insert(c=p.mapping.map(h+u.tableStart,1),e({node:r,row:f,col:m}).createAndFill(s[v]))}p.setNodeMarkup(o,e({node:r,row:u.top,col:u.left}),s[0]),i instanceof ks&&p.setSelection(new ks(p.doc.resolve(i.$anchorCell.pos),c&&p.doc.resolve(c))),n(p)}return!0}}function ol(e,t){return function(n,r){if(!ls(n))return!1;var o=cs(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof ks?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,vs(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,vs(o.nodeAfter.attrs,e,t)),r(i)}return!0}}function il(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 al(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!ls(t))return!1;if(n){for(var r=is(t.schema),o=Hs(t),i=t.tr,a=o.map.cellsInRect("column"==e?new Za(o.left,0,o.right,o.map.height):"row"==e?new Za(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(!ls(t))return!1;if(n){var r=is(t.schema),o=Hs(t),i=t.tr,a=il("row",o,r),s=il("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new Za(0,l,1,o.map.height):"row"==e?new Za(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 sl=al("row",{useDeprecatedLogic:!0}),ll=al("column",{useDeprecatedLogic:!0}),cl=al("cell",{useDeprecatedLogic:!0});function ul(e){return function(t,n){if(!ls(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}}}(cs(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(rt.between(o,ps(o))).scrollIntoView())}return!0}}}function pl(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 dl=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")),fl(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function fl(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,c=e.firstChild,u=0,p=0;u<c.childCount;u++)for(var d=c.child(u).attrs,f=d.colspan,h=d.colwidth,m=0;m<f;m++,p++){var v=o==p?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")}dl.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,fl(e,this.colgroup,this.table,this.cellMinWidth),!0)},dl.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var hl=new Ct("tableColumnResizing");function ml(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=dl);var o=e.lastColumnResizable;return void 0===o&&(o=!0),new bt({key:hl,state:{init:function(e,t){return this.spec.props.nodeViews[is(t.schema).table.name]=function(e,t){return new r(e,n,t)},new vl(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return hl.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=hl.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=gl(e,t,"left"):u-t.clientX<=n&&(s=gl(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var p=e.state.doc.resolve(s),d=p.node(-1),f=Qa.get(d),h=p.start(-1);if(f.colCount(p.pos-h)+p.nodeAfter.attrs.colspan-1==f.width-1)return}bl(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=hl.getState(e.state);t.activeHandle>-1&&!t.dragging&&bl(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=hl.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=hl.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=Qa.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 p=i.map[u],d=o.nodeAt(p).attrs,f=1==d.colspan?0:s-i.colCount(p);if(!d.colwidth||d.colwidth[f]!=n){var h=d.colwidth?d.colwidth.slice():kl(d.colspan);h[f]=n,l.setNodeMarkup(a+p,null,vs(d,"colwidth",h))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,yl(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(hl,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=hl.getState(e.state),o=yl(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=Qa.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;fl(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(hl,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=hl.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=Qa.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],p=a+u+o.nodeAt(u).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",n.push(Sa.widget(p,d))}}return Ta.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})}var vl=function(e,t){this.activeHandle=e,this.dragging=t};function gl(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=ss(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=Qa.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 yl(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function bl(e,t){e.dispatch(e.state.tr.setMeta(hl,{setHandle:t}))}function kl(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function wl(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;return void 0===t&&(t=!1),new bt({key:as,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(as);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:Cs,handleDOMEvents:{mousedown:As},createSelectionBetween:function(e){if(null!=as.getState(e.state))return e.state.selection},handleTripleClick:js,handleKeyDown:Ts,handlePaste:Rs},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof it&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=ks.create(a,i.from);else if("row"==o){var s=a.resolve(i.from+1);r=ks.rowSelection(s,s)}else if(!n){var l=Qa.get(i.node),c=i.from+1,u=c+l.map[l.width*l.height-1];r=ks.create(a,c+1,u)}}else i instanceof rt&&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=rt.create(a,i.from):i instanceof rt&&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=rt.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,Vs(r,n),t)}})}vl.prototype.apply=function(e){var t=this,n=e.getMeta(hl);if(n&&null!=n.setHandle)return new vl(n.setHandle,null);if(n&&void 0!==n.setDragging)return new vl(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);us(e.doc.resolve(r))||(r=null),t=new vl(r,t.dragging)}return t};var Cl=["blockquote",0],Ol=["hr"],xl=["pre",["code",0]],Sl=["ol",0],El=["ul",0],Il=["li",0],Nl=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},Tl=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},Dl=function(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n},_l=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},Ml=_t({link:{attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:Nl}],toDOM:function(e){return["a",Dl(e.attrs),0]}}},_l("strong"),_l("b"),_l("em"),_l("i"),_l("u"),_l("del"),_l("sub"),_l("sup"),_l("code"),{style:{attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["span",Dl(e.attrs),0]:["span",0]}}}),Pl=_t({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["p",Dl(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["div",Dl(e.attrs),0]:["div",0]}},blockquote:{attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["blockquote",Dl(e.attrs),0]:Cl}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return Ol}},heading:{attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return _t({},Nl(e),{level:1})}},{tag:"h2",getAttrs:function(e){return _t({},Nl(e),{level:2})}},{tag:"h3",getAttrs:function(e){return _t({},Nl(e),{level:3})}},{tag:"h4",getAttrs:function(e){return _t({},Nl(e),{level:4})}},{tag:"h5",getAttrs:function(e){return _t({},Nl(e),{level:5})}},{tag:"h6",getAttrs:function(e){return _t({},Nl(e),{level:6})}}],toDOM:function(e){return Tl(e.attrs,"level")?["h"+e.attrs.level,Dl(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 xl}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:_t({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["img",Dl(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["br",Dl(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return _t({},Nl(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?Tl(e.attrs,"order")?["ol",Dl(e.attrs,"order"),0]:Sl:["ol",_t({},Dl(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["ul",Dl(e.attrs),0]:El}},list_item:{content:"(paragraph | heading) block*",attrs:_t({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["li",Dl(e.attrs),0]:Il},defining:!0}},rs({tableGroup:"block",cellContent:"block+",cellAttributes:{}})),jl=function(){};jl.prototype.append=function(e){return e.length?(e=jl.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},jl.prototype.prepend=function(e){return e.length?jl.from(e).append(this):this},jl.prototype.appendInner=function(e){return new Al(this,e)},jl.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?jl.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},jl.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},jl.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)},jl.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},jl.from=function(e){return e instanceof jl?e:e&&e.length?new Rl(e):jl.empty};var Rl=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}(jl);jl.empty=new Rl([]);var Al=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}(jl),Fl=jl,Ll=function(e,t){this.items=e,this.eventCount=t};Ll.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 Bl(e.map));var p,d=e.step.map(r.slice(o));d&&l.maybeStep(d).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],c.push(new Bl(p,null,null,c.length+u.length))),o--,p&&r.appendMap(p,o)}else l.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,s=new Ll(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}},Ll.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]),p=new Bl(e.mapping.maps[l],u,t);(c=s&&s.merge(p))&&(p=c,l?o.pop():a=a.slice(0,a.length-1)),o.push(p),t&&(i++,t=null),r||(s=p)}var d,f,h,m=i-n.depth;return m>Vl&&(f=m,(d=a).forEach((function(e,t){if(e.selection&&0==f--)return h=t,!1})),a=d.slice(h),i-=m),new Ll(a.append(o),i)},Ll.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},Ll.prototype.addMaps=function(e){return 0==this.eventCount?this:new Ll(this.items.append(e.map((function(e){return new Bl(e)}))),this.eventCount)},Ll.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 Bl(l,c,u))}else n.push(new Bl(l))}}),r);for(var l=[],c=t;c<i;c++)l.push(new Bl(o.maps[c]));var u=this.items.slice(0,r).append(l).append(n),p=new Ll(u,a);return p.emptyItemCount()>500&&(p=p.compress(this.items.length-n.length)),p},Ll.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},Ll.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,p=new Bl(l.invert(),s,c),d=r.length-1;(u=r.length&&r[d].merge(p))?r[d]=u:r.push(p)}}else i.map&&n--}),this.items.length,0),new Ll(Fl.from(r.reverse()),o)},Ll.empty=new Ll(Fl.empty,0);var Bl=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};Bl.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new Bl(t.getMap().invert(),t,this.selection)}};var zl=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r},Vl=20;function Hl(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function Kl(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 Wl(e,t,n,r){var o=ql(t),i=Xl.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 zl(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(Xl,{redo:r,historyState:c}).scrollIntoView())}}var $l=!1,Ul=null;function ql(e){var t=e.plugins;if(Ul!=t){$l=!1,Ul=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){$l=!0;break}}return $l}function Gl(e){return e.setMeta(Jl,!0)}var Xl=new Ct("history"),Jl=new Ct("closeHistory");function Yl(e){return e={depth:e&&e.depth||100,newGroupDelay:e&&e.newGroupDelay||500},new bt({key:Xl,state:{init:function(){return new zl(Ll.empty,Ll.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(Xl);if(i)return i.historyState;n.getMeta(Jl)&&(e=new zl(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(Xl))return a.getMeta(Xl).redo?new zl(e.done.addTransform(n,null,r,ql(t)),e.undone,Hl(n.mapping.maps[n.steps.length-1]),e.prevTime):new zl(e.done,e.undone.addTransform(n,null,r,ql(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new zl(e.done.rebased(n,o),e.undone.rebased(n,o),Kl(e.prevRanges,n.mapping),e.prevTime):new zl(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Kl(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?Kl(e.prevRanges,n.mapping):Hl(n.mapping.maps[n.steps.length-1]);return new zl(e.done.addTransform(n,s?t.selection.getBookmark():null,r,ql(t)),Ll.empty,l,n.time)}(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput:function(e,t){var n="historyUndo"==t.inputType?Zl(e.state,e.dispatch):"historyRedo"==t.inputType&&Ql(e.state,e.dispatch);return n&&t.preventDefault(),n}}}})}function Zl(e,t){var n=Xl.getState(e);return!(!n||0==n.done.eventCount)&&(t&&Wl(n,e,t,!1),!0)}function Ql(e,t){var n=Xl.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&Wl(n,e,t,!0),!0)}function ec(e){var t=Xl.getState(e);return t?t.done.eventCount:0}function tc(e){var t=Xl.getState(e);return t?t.undone.eventCount:0}var nc=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 rc(e){var t=e.rules,n=new bt({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),p=u&&o[c].handler(a,u,t-(u[0].length-r.length),n);if(p)return e.dispatch(p.setMeta(i,{transform:p,from:t,to:n,text:r})),!0}return!1}function ic(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 ac=new nc(/--$/,"—"),sc=new nc(/\.\.\.$/,"…"),lc=new nc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),cc=new nc(/"$/,"”"),uc=new nc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),pc=new nc(/'$/,"’"),dc=[lc,cc,uc,pc];function fc(e,t,n,r){return new nc(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&&_e(c,t,s);if(!u)return null;l.wrap(c,u);var p=l.doc.resolve(i-1).nodeBefore;return p&&p.type==t&&je(l.doc,i-1)&&(!r||r(o,p))&&l.join(i-1),l}))}function hc(e,t,n){return new nc(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 mc={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},vc={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},gc={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},yc={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},bc={mark:"sub"},kc={mark:"sup"},wc={mark:"link"},Cc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Oc=function(e,t){var n={},r=t&&t.applyToWord||!1;if(n["Mod-z"]=Zl,n["Shift-Mod-z"]=Ql,n.Backspace=fr(ic,Hn,Kn,$n),n.Enter=fr(Qn,nr,rr,ir),Cc||(n["Mod-y"]=Ql),e.marks.strong&&(n["Mod-b"]=$t(sn,_t({},mc,{applyToWord:r}))),e.marks.em&&(n["Mod-i"]=$t(sn,_t({},vc,{applyToWord:r}))),e.marks.u&&(n["Mod-u"]=$t(sn,_t({},gc,{applyToWord:r}))),e.nodes.hard_break){var o=e.nodes.hard_break,i=fr(tr,(function(e,t){return t(e.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}));n["Shift-Enter"]=i}return n},xc=function(e){var t,n={};return e.nodes.list_item&&(n.Enter=(t=e.nodes.list_item,function(e,n){return jn(t)(e,(function(t){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&t.ensureMarks(r),n(t)}))})),n},Sc=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,Ec=function(e){return/^MsoListParagraph/.test(e.className)},Ic=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},Nc=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},Tc=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},Dc=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)):Ec(r)&&n.length?n.push(e):(n=[],"DIV"===r.nodeName?Dc(r.children,t):"TABLE"===r.nodeName&&Array.from(r.querySelectorAll("td,th")).forEach((function(e){Dc(e.children,t)})))}}))},_c=function(e){var t,n=e.innerHTML,r=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(n)?{tag:"ul",style:(t=r(Ic(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:Tc(r(Ic(e)))}:void 0},Mc=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?Ic(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\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},Pc=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(Sc,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return Dc(t.children,n),n.forEach((function(e){return function(e){var t,n,r,o,i,a,s,l,c,u,p,d,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=_c(c);if(u=g&&g.tag){if(p=f.datalevel||parseFloat(c.style.marginLeft||0),f.datalevel||c.style.marginLeft){var y=u+v;m[p]||(m[p]={}),(!n||n<0)&&(n=p,r=v,o=(s=e.filter((function(e){return e.getAttribute("datalist")===String(r)})))[s.length-1],a=Nc(u,g&&g.style),c.parentNode.insertBefore(a,c),h=p,m[p][y]=a),i=o===c,d=m[p][y],(p>h||!d)&&(d=Nc(u,g&&g.style),m[p][y]=d,t.appendChild(d)),t=Mc(c),d.appendChild(t),i?n=h=-1:h=p}}else!t||i&&!Ec(c)||(c.style.marginLeft&&(c.style.marginLeft=""),c.style.marginLeft&&(c.style.margin=""),t.appendChild(c))}}(e)})),t.innerHTML},jc=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,"")},Rc=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},Ac=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},Fc=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},Lc=function(e){/^Mso/.test(e.value)&&Fc(e)},Bc=/\s*;\s*/,zc=/\s*:\s*/,Vc=function(e){var t,n,r=e.value.split(Bc).filter((function(e){return Boolean(e)})),o=e.ownerElement.style,i="";r.forEach((function(e){var r;r=e.split(zc),t=r[0],n=r[1],void 0!==o[t]&&(i+=t+": "+n+"; ")})),(i=i.trim())?e.value=i:Fc(e)},Hc=function(e,t){var n=e;if(t.convertMsLists&&(n=Pc(n)),t.stripTags&&(n=Ac(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 Kc(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 Wc=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,$c=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,Uc=new RegExp("(?:("+$c.source+"))([\\da-fA-F\\s]+)\\}","g"),qc=/[^\da-fA-F]/g,Gc=/file:\/[^'"]+\.(jpg|png|gif)/i,Xc=/\\(png|jpeg)blip\\/,Jc=function(e,t){var n=e.match(Wc);if(!n||-1===t.types.indexOf("text/rtf"))return e;var r=t.getData("text/rtf"),o=[],i=r.match(Uc);if(!r||!i)return e;for(var a=0,s=i;a<s.length;a++){var l=s[a],c=Xc.exec(l);if(c){var u=l.replace($c,"").replace(qc,"");o.push("data:image/"+c[1]+";base64,"+Kc(u))}}return n.length!==o.length?e:e.replace(Wc,(function(e){var t=o.shift()||"";return e.replace(Gc,t)}))},Yc=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)},Zc=function(e,t,n,r,o){var i,a,s,l,c,u,p=[],d=[],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 p;var g=f?"g":"gi",y=m?new RegExp(v,g):iu(v,g);return e.nodesBetween(n,r,(function(t,f,m){if(o(p))return!1;t.inlineContent&&f+t.content.size>=n&&(d.length=0,t.nodesBetween(0,t.content.size,(function(t,m,v,g){if(o(p))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),d.push(n<=b?{text:c,start:b}:{text:c.slice(n-b),start:n}),u&&u.isText)return;for(a=d.map((function(e){return e.text})).join(""),i=y.exec(a);null!==i&&(s=d[0].start+i.index,l=s+i[0].length,n<=s&&r>=l&&ou(i,h)&&p.push(rt.create(e,s,l)),!o(p));)i=y.exec(a)}else d.length=0})))})),p},Qc=function(e,t){var n=t.backward,r=t.matchCyclic,o=Mt(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return e.length>0},a=e.doc,s=e.selection,l=[];return n?!(l=Zc(a,o,0,s.from,i)).length&&r&&(l=Zc(a,o,s.from,a.content.size,i)):!(l=Zc(a,o,s.to,a.content.size,i)).length&&r&&(l=Zc(a,o,0,s.to,i)),l.length?l[l.length-1]:null},eu=function(e,t){return Zc(e,t,0,e.content.size,(function(){return!1}))},tu=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(rt.create(n.doc,r,r+t.length)),n},nu=function(e,t,n){var r=eu(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},ru=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,ou=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 ru.test(r)&&ru.test(o)}return t(e)}return!0},iu=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)};function au(e){var t={class:"k-placeholder","data-placeholder":e};return new bt({key:new Ct("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 Ta.empty;var o=[];return n.descendants((function(e,n){o.push(Sa.node(n,n+e.nodeSize,t))})),Ta.create(n,o)}}})}var su=/\s+/g,lu=/text-align/,cu=function(){return new bt({key:new Ct("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 lu.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(Sa.inline(t+o,t+o+1,{style:"white-space: normal"}));n=su.exec(e.text||"")}})),Ta.create(a,i)}}})},uu=new Ct("highlight");function pu(e){return void 0===e&&(e=uu),new bt({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 Sa.inline(e.from,e.to,e.attrs)}));return Ta.create(e.doc,t)}}})}var du=new Ct("image-resize"),fu={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}},hu=Object.keys(fu),mu=function(e,t,n){e.style[t]=n+"px"},vu=/[^\-]width:|[^\-]height:/,gu=/^.+$/,yu=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(du);return n?new e(n.activeHandle,n.setDragging,n.rect,n.nodePosition):this},e}(),bu=function(e,t,n){var r=t.target.getAttribute("data-direction");if(!r)return!1;var o=du.getState(e.state);t.preventDefault();var i=e.state.tr;function a(t){!function(e,t,n){var r=du.getState(e.state),o=r.rect,i=r.dragging,a=r.nodePosition,s=r.activeHandle;if(i&&o){var l=e.nodeDOM(a),c=fu[s],u=(t.clientX-i.startX)*c.x,p=(t.clientY-i.startY)*c.y,d=c.x?u+l.width:o.width,f=c.y?p+l.height:o.height;if(n.lockRatio&&c.x&&c.y){var h=Math.min(d/l.width,f/l.height),m=l.width*h,v=l.height*h;i.startX=t.clientX-(d-m)*c.x,i.startY=t.clientY-(f-v)*c.y,d=m,f=v}else i.startX=c.x?t.clientX:i.startX,i.startY=c.y?t.clientY:i.startY;mu(l,"width",d),mu(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(du,{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=du.getState(e.state),n=t.rect,r=t.dragging,o=t.nodePosition;if(r&&n){var i=e.state.selection;if(i instanceof it){var a=i.node.attrs,s=n.width,l=n.height,c=void 0;if(vu.test(a.style||"")){var u=Pt(a.style,{style:"width",value:gu,newValue:s+"px"}),p=Pt(u.style||"",{style:"height",value:gu,newValue:l+"px"}).style;c=_t({},a,{style:p})}else c=_t({},a,{width:s,height:l});var d=i.node.type.createAndFill(c);if(d){var f=e.state.tr;f.replaceWith(o,o+1,d),f.setSelection(it.create(f.doc,o)),f.setMeta("commandName","image-resize"),f.setMeta("args",c),f.setMeta(du,{setDragging:null,activeHandle:null,rect:n,nodePosition:o}),e.dispatch(f)}}}}(e)})),t.view.addEventListener("mousemove",a),!0},ku=function(e){return void 0===e&&(e={node:"image",lockRatio:!0}),new bt({key:du,view:function(t){return{resize:function(){du.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=du.getState(r),s=a.rect;if(o instanceof it&&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(du,{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 yu("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(t,n){return bu(t,n,e)}},decorations:function(t){var n=t.selection,r=t.schema.nodes[e.node],o=du.getState(t).rect;if(o&&n instanceof it&&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<hu.length;a++){var s=document.createElement("div");s.className="k-editor-resize-handle "+hu[a],s.setAttribute("data-direction",hu[a]),i.appendChild(s)}return Ta.create(t.doc,[Sa.widget(t.selection.from+1,i)])}return Ta.empty}}})};function wu(e){return void 0===e&&(e={}),new bt({view:function(t){return new Cu(t,e)}})}var Cu=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}}))};Cu.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)}))},Cu.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())},Cu.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},Cu.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"},Cu.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)},Cu.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY});if(t){var n=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(n=Le(this.editorView.state.doc,n,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(n),this.scheduleRemoval(5e3)}}},Cu.prototype.dragend=function(){this.scheduleRemoval(20)},Cu.prototype.drop=function(){this.scheduleRemoval(20)},Cu.prototype.dragleave=function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)};var Ou=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 d.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 xu(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);if(0!=n)for(var r=e.node(t).child(n-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}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}}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&&!it.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}(et);Ou.prototype.visible=!1,et.jsonID("gapcursor",Ou);var xu=function(e){this.pos=e};xu.prototype.map=function(e){return new xu(e.map(this.pos))},xu.prototype.resolve=function(e){var t=e.resolve(this.pos);return Ou.valid(t)?new Ou(t):et.near(t)};var Su=function(){return new bt({props:{decorations:Tu,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&Ou.valid(n))return new Ou(n)},handleClick:Nu,handleKeyDown:Eu}})},Eu=no({ArrowLeft:Iu("horiz",-1),ArrowRight:Iu("horiz",1),ArrowUp:Iu("vert",-1),ArrowDown:Iu("vert",1)});function Iu(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 rt){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}var l=Ou.findFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new Ou(l))),!0)}}function Nu(e,t,n){if(!e.editable)return!1;var r=e.state.doc.resolve(t);if(!Ou.valid(r))return!1;var o=e.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(o>-1&&it.isSelectable(e.state.doc.nodeAt(o)))&&(e.dispatch(e.state.tr.setSelection(new Ou(r))),!0)}function Tu(e){if(!(e.selection instanceof Ou))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ta.create(e.doc,[Sa.widget(e.selection.head,t,{key:"gapcursor"})])}},function(e,t){e.exports=r},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,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return u}));var r,o=n(0),i=n(1),a=n(2),s=((r={})["labels.optional"]="(Optional)",r),l=n(3),c={name:"@progress/kendo-react-labels",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493545,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"},u=function(e){Object(a.v)(c);var t=e.id,n=e.editorId,r=e.editorRef,i=e.editorDisabled,u=e.children,p=e.editorValid,d=e.style,f=e.className,h=e.optional,m=Object(l.useLocalization)(),v=h?m.toLanguageString("labels.optional",s["labels.optional"]):"",g=v&&o.createElement("span",{className:"k-label-optional"},v),y=o.useCallback((function(e){if(r&&r.current&&!i){r.current.focus&&(e.preventDefault(),r.current.focus());var t=r.current.actionElement;t&&(e.preventDefault(),t.click())}}),[r]),b=Object(a.e)({"k-label":!0,"k-label-empty":!u,"k-text-error":!1===p,"k-text-disabled":!0===i},f);return o.createElement("label",{id:t,htmlFor:n,onClick:y,style:d,className:b},u,g)};u.propTypes={id:i.string,editorId:i.string,editorRef:i.oneOfType([i.func,i.shape({current:i.any})]),editorValid:i.bool,editorDisabled:i.bool,style:i.object,className:i.string,optional:i.bool},u.displayName="KendoReactLabel";var p=function(e){Object(a.v)(c);var t=Object(a.e)({"k-form-error":!0,"k-text-start":"start"===e.direction,"k-text-end":"end"===e.direction},e.className);return o.createElement("div",{id:e.id,role:"alert",style:e.style,className:t},e.children)};p.propTypes={id:i.string,direction:i.oneOf(["start","end"]),children:i.oneOfType([i.element,i.node]),style:i.object,className:i.string},p.defaultProps={direction:"start"},p.displayName="KendoReactError";var d=function(e){Object(a.v)(c);var t=Object(a.e)({"k-form-hint":!0,"k-text-start":"start"===e.direction,"k-text-end":"end"===e.direction,"k-text-disabled":!0===e.editorDisabled},e.className);return o.createElement("div",{id:e.id,style:e.style,className:t},e.children)};d.propTypes={id:i.string,direction:i.oneOf(["start","end"]),children:i.oneOfType([i.element,i.node]),style:i.object,className:i.string,editorDisabled:i.bool},d.defaultProps={direction:"start"},d.displayName="KendoReactHint";var f,h=(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)}),m=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(a.v)(c),n}return h(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,p=e.editorDisabled,d=e.style,f=e.id,h=e.optional,m=Object(l.provideLocalizationService)(this),v=h?m.toLanguageString("labels.optional",s["labels.optional"]):"",g=v&&o.createElement("span",{className:"k-label-optional"},v),y=Object(a.e)({"k-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!c&&!i&&0!==i,"k-text-disabled":p,"k-rtl":"rtl"===this.props.dir},r),b=Object(a.e)({"k-label":!0,"k-text-error":!1===u,"k-text-disabled":p});return o.createElement("span",{className:y,onFocus:this.handleFocus,onBlur:this.handleBlur,style:d,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(l.registerForLocalization)(m)},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.r(t),n.d(t,"Popup",(function(){return le})),n.d(t,"PopupPropsContext",(function(){return se}));var r=n(0),o=n(13),i=n(1),a=function(e){e.style.transitionDuration="",e.classList.remove("k-slide-down-appear","k-slide-down-appear-active","k-slide-down-exit","k-slide-down-exit-active","k-slide-up-appear","k-slide-up-appear-active","k-slide-up-exit","k-slide-up-exit-active")},s="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),l=n(2),c="bottom",u="center",p="middle",d="left",f="right",h="top";function m(e){return e.ownerDocument||e.document||e}var v=function(e){return m(e).defaultView},g=function(e){return m(e).documentElement},y=0;function b(){if(!y&&"undefined"!=typeof document){var e=document.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML=" ",document.body.appendChild(e),y=e.offsetWidth-e.scrollWidth,document.body.removeChild(e)}return y}function k(e){var t=v(e),n=g(e),r={height:t.innerHeight,width:t.innerWidth};return n.scrollHeight-n.clientHeight>0&&(r.width-=b()),r}var w=function(e){for(var t=e.offsetParent;t&&"static"===t.style.position;)t=t.offsetParent;return t||g(e)},C=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}},O=function(e,t){for(var n=[],r=e.parentNode;r&&(n.push(r),r!==t);)r=r.parentNode;return n};function x(e){var t=g(e),n=v(e);return{x:n.pageXOffset||t.scrollLeft||0,y:n.pageYOffset||t.scrollTop||0}}var S=function(e){return e===(e.ownerDocument||{}).body?x(e):{x:e.scrollLeft,y:e.scrollTop}};var E=function(e,t){var n=v(e),r=n.getComputedStyle(e),o=C(e),i=t||w(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=C(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}},I=function(e,t){return e?S(e):function(e){var t=w(e);return t?S(t):{x:0,y:0}}(t)};var N="fit",T="flip",D=function(e,t,n){var r=0;return e+t>n&&(r=n-(e+t)),e<0&&(r=-e),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===u||a===p)&&!(i===u||i===p)){var c=i===h||i===d;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},M=function(e){for(var t=[],n=e.parentNode.firstElementChild;n;)n!==e&&t.push(n),n=n.nextElementSibling;return t},P=function(e,t){for(var n,r,o=O(e),i=t;i&&(n=M(i),!(r=o.reduce((function(e,t){return e.concat(n.filter((function(e){return e===t})))}),[])[0]));)i=i.parentElement;return r};var j,R,A,F,L=(j=function(e){if(!B())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},A=!1,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return A||(R=j.apply(void 0,e),A=!0),R}),B=function(){return Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},z={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:L,canUseDOM:B},V=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],H=function(){return z.canUseDOM()?window:null},K=/auto|scroll/,W=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)},$=function(e){if(!e||!z.hasRelativeStackingContext())return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},U=function(){return z.canUseDOM()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},q={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,d=o.vertical,h=i.horizontal||0,m=i.vertical||0,v=t.top,g=t.left;return s===c&&(v+=t.height),s!==u&&s!==p||(v+=Math.round(t.height/2)),d===c&&(v-=r.height,m*=-1),d!==u&&d!==p||(v-=Math.round(r.height/2),m*=-1),a===f&&(g+=t.width),a!==u&&a!==p||(g+=Math.round(t.width/2)),l===f&&(g-=r.width,h*=-1),l!==u&&l!==p||(g-=Math.round(r.width/2),h*=-1),{top:v+m,left:g+h}},boundingOffset:function(e){if(!e.getBoundingClientRect){var t=k(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=H();if(!t||!e)return[];var n=t.getComputedStyle(e);return V.map((function(e){return{key:e,value:n[e]}}))},getWindow:H,hasOffsetParent:function(e){return!!e&&Boolean(e.offsetParent)},offset:function(e){return e?C(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=C(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?w(t):null,o=E(e,r),i=o.top,a=o.left,s=o.height,l=o.width,c=I(r,e),u=c.x,p=c.y,d=e.ownerDocument,f=r===d.body||r===d.documentElement?1:n;return{top:i+p*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,p=r.width,d=a.height,f=a.width,h=s.horizontal||0,m=s.vertical||0,v=0,g=0,y=i.horizontal===T,b=i.vertical===T;i.vertical===N&&(g+=D(l,u,d)),i.horizontal===N&&(v+=D(c,p,f)),b&&(g+=_({margin:m,offset:l,size:u,anchorSize:t.height,viewPortSize:d,anchorAlignPoint:n.vertical,elementAlignPoint:o.vertical})),y&&(v+=_({margin:h,offset:c,size:p,anchorSize:t.width,viewPortSize:f,anchorAlignPoint:n.horizontal,elementAlignPoint:o.horizontal}));var k=y&&0!==v,w=b&&0!==g;return{flipped:k||w,flip:{horizontal:k,vertical:w},offset:{left:v,top:g}}},scrollPosition:x,scrollableParents:function(e){var t=[];if(!z.canUseDOM())return t;for(var n=e.parentElement;n;)(K.test(W(n))||n.hasAttribute("data-scrollable"))&&t.push(n),n=n.parentElement;return t.push(window),t},getRelativeContextElement:$,stackingElementOffset:function(e){var t=$(e);return t?C(t):null},stackingElementScroll:function(e){var t=$(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},stackingElementViewPort:function(e){var t=$(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},useRelativePosition:function(e){return Boolean($(e))},windowViewPort:k,zoomLevel:U,isZoomed:function(){return U()>1},zIndex:function(e,t){if(!e||!z.canUseDOM())return null;var n=P(e,t);if(!n)return null;var r=[e].concat(O(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}},G=function(e,t){return e?{x:0,y:0}:q.scrollPosition(t)},X=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||!q.hasOffsetParent(n)?function(e,t,n,r){var o=G(e,t),i=z.eitherRect(q.offset(e),n),a=2*r,s=q.stackingElementScroll(t);1!==r&&s&&(s.x/=a,s.y/=a);var l=q.stackingElementOffset(t);return 1!==r&&l&&(l.left/=a,l.top/=a),q.removeScroll(q.addScroll(z.removeStackingOffset(z.scaleRect(i,r),l),s),o)}(t,n,a,l):function(e,t,n,r){var o=z.eitherRect(q.position(e,t,r),n);return z.scaleRect(o,r)}(t,n,a,l),u=z.scaleRect(q.offset(n),l);return q.align({anchorAlign:r,anchorRect:c,elementAlign:o,elementRect:u,margin:i})},J=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=q.offsetAtPoint(r,n),u=z.scaleRect(c,l),p=z.scaleRect(q.offset(t),l),d=z.eitherRect(p,n),f=e.viewPort||q.windowViewPort(r);f.width=f.width/l,f.height=f.height/l;var h=q.restrictToView({anchorAlign:o,anchorRect:d,collisions:a,elementAlign:i,elementRect:u,margin:s,viewPort:f}),m=q.addOffset(n,h.offset);return{flip:h.flip,flipped:h.flipped,offset:m}},Y="fit",Z="flip",Q={name:"@progress/kendo-react-popup",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493347,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"},ee=(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)}),te=function(){return(te=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 ne(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 re,oe={left:-1e3,top:0};!function(e){e.hiding="hiding",e.hidden="hidden",e.showing="showing",e.shown="shown",e.reposition="reposition"}(re||(re={}));var ie=function(e){function t(t){var n=e.call(this,t)||this;return n.state={current:re.hidden,previous:re.hidden,props:{}},n._popup=null,n.show=function(e){n.setPosition(e),n.animate(e.firstChild,"enter",n.onOpened),n.setState({current:re.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;e.style.top="0px",e.style.left="-10000px";var p=X({anchor:s,element:e,elementAlign:o,anchorAlign:r,offset:a,margin:l,positionMode:u,scale:c}),d=J({anchor:s,anchorAlign:r,collisions:i,element:e,currentLocation:p,elementAlign:o,margin:n.props.margin});e.style.top=d.offset.top+"px",e.style.left=d.offset.left+"px",n._flipped=d.flipped},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){!function(e,t,n,r,o){if(0===n)return o();var i="k-slide-"+t+"-"+r,l=i+"-active",c=function(){e.removeEventListener("transitionend",c),a(e),o()};e.addEventListener("transitionend",c);var u=e.ownerDocument;if(u){var p=u.defaultView;if(p){var d=function(){a(e),e.classList.add(i),p.requestAnimationFrame((function(){e.style.transitionDuration=n+"ms",e.classList.add(l)}))};s?p.requestAnimationFrame(d):d()}}}(e,n._flipped?"up":"down",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===re.hiding&&n.state.previous===re.shown&&n.setState({current:re.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.v)(Q),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 ee(t,e),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,p=e.offset,d=e.contentKey,f=te({},t,{props:{show:n,anchor:r,anchorAlign:o,appendTo:i,collision:a,popupAlign:s,className:l,popupClass:c,style:u,offset:p,contentKey:d}});return e.show?t.current===re.hidden||t.current===re.hiding?te({},f,{current:re.showing,previous:t.current}):t.current===re.showing?te({},f,{current:re.shown,previous:t.current}):t.current!==re.shown||ne(p,t.props.offset)&&ne(o,t.props.anchorAlign)&&ne(i,t.props.appendTo)&&ne(a,t.props.collision)&&ne(s,t.props.popupAlign)&&ne(u,t.props.style)&&r===t.props.anchor&&c===t.props.popupClass&&l===t.props.className?f:te({},f,{current:re.reposition,previous:t.current}):t.current===re.hiding||t.current===re.hidden?te({},f,{current:re.hidden,previous:t.current}):te({},f,{current:re.hiding,previous:t.current})},t.prototype.componentDidUpdate=function(e){this.state.current===re.showing&&this._popup?this.show(this._popup):this.state.current===re.hiding&&this._popup?(this.onClosing(this._popup),this.animate(this._popup.firstChild,"exit",this.onClosed)):this.state.current===re.reposition&&this.state.previous===re.shown?this.setState({current:re.shown,previous:this.state.current}):this.state.current===re.shown&&e.contentKey!==this.props.contentKey&&this._popup&&this.setPosition(this._popup)},t.prototype.componentDidMount=function(){this.state.current===re.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,c=t.id,u=t.positionMode,p=this.props.appendTo?this.props.appendTo:l.d?this.props.anchor&&this.props.anchor.ownerDocument?this.props.anchor.ownerDocument.body:document.body:void 0;this.state.current===re.reposition&&this.state.previous===re.shown&&this._popup&&this.setPosition(this._popup);var d=Object.assign({},{position:u},this.props.style||{}),f=this.state.current===re.hiding;if((s||f)&&p){var h=this.getCurrentZIndex(),m=r.createElement(l.c.Provider,{value:h},r.createElement("div",{className:Object(l.e)("k-animation-container","k-animation-container-relative",i),id:c,ref:function(t){return e._popup=t},style:te({zIndex:h},d)},r.createElement("div",{className:Object(l.e)(a,"k-popup","k-child-animation-container"),style:{transitionDelay:"0ms"}},n)));return o.createPortal(m,p)}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=q.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:re.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.string,id:i.string,popupClass:i.string,collision:i.shape({horizontal:i.oneOf([Y,Z]),vertical:i.oneOf([Y,Z])}),anchorAlign:i.shape({horizontal:i.oneOf([d,u,f]),vertical:i.oneOf([h,u,c])}),popupAlign:i.shape({horizontal:i.oneOf([d,u,f]),vertical:i.oneOf([h,u,c])}),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},t.defaultProps={collision:{horizontal:Y,vertical:Z},anchorAlign:{horizontal:d,vertical:c},popupAlign:{horizontal:d,vertical:h},offset:oe,animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},t.contextType=l.c,t}(r.Component),ae=function(){return(ae=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)},se=r.createContext((function(e){return e})),le=r.forwardRef((function(e,t){var n=r.useContext(se).call(void 0,e);return r.createElement(ie,ae({ref:t},n))}))},function(e,t){e.exports=o},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),a=r({},i.indentRules.listsTypes);!function(e){var t={type:"button"};e.bold=r({},i.bold,{props:r({icon:"bold"},t),messages:{title:o.keys.bold},commandName:"Bold"}),e.italic=r({},i.italic,{props:r({icon:"italic"},t),messages:{title:o.keys.italic},commandName:"Italic"}),e.underline=r({},i.underline,{props:r({icon:"underline"},t),messages:{title:o.keys.underline},commandName:"Underline"}),e.strikethrough=r({},i.strikethrough,{props:r({icon:"strikethrough"},t),messages:{title:o.keys.strikethrough},commandName:"Strikethrough"}),e.subscript=r({},i.subscript,{props:r({icon:"subscript"},t),messages:{title:o.keys.subscript},commandName:"Subscript"}),e.superscript=r({},i.superscript,{props:r({icon:"superscript"},t),messages:{title:o.keys.superscript},commandName:"Superscript"}),e.link=r({},i.link,{props:r({icon:"link-horizontal"},t),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"},t),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"},t),messages:{createTable:o.keys.createTable,createTableHint:o.keys.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:r({icon:"table-row-insert-above"},t),messages:{title:o.keys.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:r({icon:"table-row-insert-below"},t),messages:{title:o.keys.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:r({icon:"table-column-insert-left"},t),messages:{title:o.keys.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:r({icon:"table-column-insert-right"},t),messages:{title:o.keys.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:r({icon:"table-row-delete"},t),messages:{title:o.keys.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:r({icon:"table-column-delete"},t),messages:{title:o.keys.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:r({icon:"table-delete"},t),messages:{title:o.keys.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:r({icon:"cells-merge"},t),messages:{title:o.keys.mergeCells},commandName:"MergeCells"},e.splitCell={props:r({icon:"cell-split-horizontally"},t),messages:{title:o.keys.splitCell},commandName:"SplitCell"},e.print={props:r({icon:"print"},t),messages:{title:o.keys.print}},e.selectAll={props:r({icon:"select-all"},t),messages:{title:o.keys.selectAll}},e.pdf={props:r({icon:"pdf"},t),messages:{title:o.keys.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:r({icon:"clear-css"},t),messages:{title:o.keys.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:r({icon:"image"},t),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"},t),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"},t),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"},t),messages:{title:o.keys.unlink},commandName:"Unlink"}),e.undo={props:r({icon:"undo"},t),messages:{title:o.keys.undo},commandName:"Undo"},e.redo={props:r({icon:"redo"},t),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"},t),messages:{title:o.keys.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:i.alignRightRules.slice(),props:r({icon:"align-right"},t),messages:{title:o.keys.alignRight},commandName:"AlignRight"},e.alignCenter={actions:i.alignCenterRules.slice(),props:r({icon:"align-center"},t),messages:{title:o.keys.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:i.alignJustifyRules.slice(),props:r({icon:"align-justify"},t),messages:{title:o.keys.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:i.alignRemoveRules.slice(),props:r({icon:"align-remove"},t),messages:{},commandName:"AlignRemove"},e.indent={actions:i.indentRules.nodes,listsTypes:a,props:r({icon:"indent-increase"},t),messages:{title:o.keys.indent},commandName:"Indent"},e.outdent={actions:i.outdentRules.nodes,listsTypes:a,props:r({icon:"indent-decrease"},t),messages:{title:o.keys.outdent},commandName:"Outdent"},e.orderedList={listType:a.orderedList,props:r({icon:"list-ordered"},t),messages:{title:o.keys.orderedList},commandName:"OrderedList",types:r({},a)},e.bulletList={listType:a.bulletList,props:r({icon:"list-unordered"},t),messages:{title:o.keys.bulletList},commandName:"UnorderedList",types:r({},a)}}(t.EditorToolsSettings||(t.EditorToolsSettings={}))},function(e,t){e.exports=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return K})),n.d(t,"c",(function(){return W}));var r,o=n(0),i=n(1),a=n(2),s=n(17),l=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},c=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},u={"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"},p=(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)},f=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},h=u,m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.children,r=t.style,i=t.appear,l=t.enter,c=t.exit,u=t.transitionName,p=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,D=f(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onAfterExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),_=Object(a.e)(v,h["child-animation-container"]),M=d({transitionDelay:"0ms"},r),P={entering:d({transitionDuration:p+"ms"},E),entered:d({},I),exiting:d({transitionDuration:m+"ms"},N),exited:d({},T)},j={in:this.props.in,appear:i,enter:l,exit:c,mountOnEnter:x,unmountOnExit:S,timeout:{enter:p,exit:m},onEnter:function(t){g&&g.call(void 0,{animatedElement:t,target:e})},onEntering:function(t){y&&y.call(void 0,{animatedElement:t,target:e})},onEntered:function(t){b&&b.call(void 0,{animatedElement:t,target:e})},onExit:function(t){k&&k.call(void 0,{animatedElement:t,target:e})},onExiting:function(t){w&&w.call(void 0,{animatedElement:t,target:e})},onExited:function(t){O&&O.call(void 0,{animatedElement:t,target:e}),C&&C.call(void 0,{animatedElement:t,target:e})},classNames:{appear:h[u+"-appear"]||u+"-appear",appearActive:h[u+"-appear-active"]||u+"-appear-active",enter:h[u+"-enter"]||u+"-enter",enterActive:h[u+"-enter-active"]||u+"-enter-active",exit:h[u+"-exit"]||u+"-exit",exitActive:h[u+"-exit-active"]||u+"-exit-active"}};return o.createElement(s.CSSTransition,d({},j,D),(function(t){return o.createElement("div",{style:d({},M,P[t]),className:_,ref:function(t){e._element=t}},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:a.o,onEntering:a.o,onEntered:a.o,onExit:a.o,onExiting:a.o,onExited:a.o,onAfterExited:a.o,animationEnteringStyle:{},animationEnteredStyle:{},animationExitingStyle:{},animationExitedStyle:{}},t}(o.Component),v={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493314,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=u,w=function(e){function t(t){var n=e.call(this,t)||this;return Object(a.v)(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,l=e.className,c=e.childFactory,u=(e.stackChildren,e.componentChildStyle),p=e.componentChildClassName,d=b(e,["id","style","children","component","className","childFactory","stackChildren","componentChildStyle","componentChildClassName"]),f={id:t,style:n,component:i,childFactory:c,className:Object(a.e)(k["animation-container"],k["animation-container-relative"],l)},h=o.Children.map(r||null,(function(e){return o.createElement(m,y({},d,{style:u,className:p}),e)}));return o.createElement(s.TransitionGroup,y({},f),h)},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),C=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)}}(),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,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},S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=x(e,["children"]);return o.createElement(w,O({},{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),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)}}(),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,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=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}E(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,r=N(e,["direction","children"]),i={transitionName:"expand-"+t};return o.createElement(w,I({},i,r),n)},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"}}(o.Component),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)},_=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},M={position:"absolute",top:"0",left:"0"},P=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}T(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,r=_(e,["children","direction"]);return o.createElement(w,D({},r,{transitionName:"push-"+n,animationExitingStyle:this.props.stackChildren?M:void 0}),t)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["up","down","left","right"]),component:i.string,id:i.string,style:i.any,stackChildren:i.bool},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"right",stackChildren:!1}}(o.Component),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)}}()),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,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},A=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}P(t,e),t.prototype.render=function(){var e=this.props,t=e.direction,n=e.children,r=R(e,["direction","children"]),i={transitionName:"slide-"+t};return o.createElement(w,j({},i,r),n)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["up","down","left","right"]),component:i.string,id:i.string,style:i.any},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"}}(o.Component),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(){return(F=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)},L=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},B={position:"absolute",top:"0",left:"0"},z=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}A(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.direction,r=L(e,["children","direction"]);return o.createElement(w,F({},r,{transitionName:"zoom-"+n,animationExitingStyle:this.props.stackChildren?B:void 0}),t)},t.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["in","out"]),component:i.string,id:i.string,style:i.any,stackChildren:i.bool},t.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1}}(o.Component),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(){return(V=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)},H=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=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=a.o);var r=e.firstChild;if(r){var o=l(r),i=c(r);t.setState({maxHeight:o,maxWidth:i},n)}},t}return z(t,e),t.prototype.render=function(){var e,t=this.props,n=t.direction,r=t.children,i=t.childFactory,a=H(t,["direction","children","childFactory"]),s=this.state,l=s.maxHeight,c=s.maxWidth,u={maxHeight:(e="vertical"===n?{maxHeight:l?l+"px":null}:{maxWidth:c?c+"px":null}).maxHeight,maxWidth:e.maxWidth};return o.createElement(w,V({},a,{childFactory:function(t){var n=i?i(t):t;return n.props.in?n:o.cloneElement(n,V({},n.props,{style:V({},n.props.style,{maxHeight:e.maxHeight,maxWidth:e.maxWidth})}))},onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:u,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),W=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}),[])}},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(29),a=n(30),s=n(31),l=n(21);!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.r(t),n.d(t,"Dialog",(function(){return y})),n.d(t,"DialogActionsBar",(function(){return l})),n.d(t,"DialogPropsContext",(function(){return g})),n.d(t,"Window",(function(){return P})),n.d(t,"WindowActionsBar",(function(){return I})),n.d(t,"WindowPropsContext",(function(){return M}));var r=n(0),o=n(13),i=n(1),a=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",{href:"#",role:"button","aria-label":"Close",onClick:n,className:"k-button k-flat k-button-icon k-window-action k-dialog-action k-dialog-close"},r.createElement("span",{className:"k-icon k-i-x"}))))},s=n(2),l=function(e){var t=e.layout,n=void 0===t?p.layout:t,o=e.children,i=Object(s.e)("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)};l.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var c,u,p={layout:"stretched"},d={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493851,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"},f=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},h=(c=function(e,t){return(c=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}c(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(t){var n=e.call(this,t)||this;return n._id=Object(s.m)(),n.titleId=n.generateTitleId(),n.onCloseDialog=function(e){e.preventDefault(),Object(s.g)(n.props.onClose,e,n,void 0)},n.onKeyDown=function(e){e.keyCode===s.b.esc&&n.props.onClose&&(e.preventDefault(),n.onCloseDialog(e));var t=n.element;if(t&&e.keyCode===s.b.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&&(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(s.v)(d),n.state={zIndex:f(n.getCurrentZIndex(),n.getDocument(),n._id)},n}return h(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,l=i.title,c=i.width,u=i.height,p=i.children,d=i.minWidth,f=i.dir,h=i.style,v=i.contentStyle,g=r.Children.toArray(p),y=this.getContent(g),b=this.getActionBar(g),k=l?{"aria-labelledby":n}:null,w=void 0===this.props.closeIcon||this.props.closeIcon,C=this.getCurrentZIndex(),O=r.createElement(s.c.Provider,{value:C},r.createElement("div",m({},((e={})["data-windowid"]=this._id,e),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:f,style:m({zIndex:C},h),ref:function(e){return t.element=e}}),r.createElement("div",{className:"k-overlay"}),r.createElement("div",m({},k,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:c,height:u,minWidth:d}}),this.props.title&&r.createElement(a,{closeIcon:w,onCloseButtonClick:this.onCloseDialog,id:n},l),r.createElement("div",{className:"k-window-content k-dialog-content",style:v},y),b)));return s.d?o.createPortal(O,this.props.appendTo||document.body):null},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===l}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==l}))},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=s.c,t}(r.Component),g=Object(s.f)(),y=Object(s.w)(g,v);y.displayName="KendoReactDialog",function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(u||(u={}));var b=function(){return(b=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)},k=function(e){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,a=e.onRestoreButtonClick,s=e.onDoubleClick,l=e.stage,c=e.forwardedRef,p=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},r.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),d=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:i,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:i},r.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),f=e.restoreButton?r.createElement(e.restoreButton,{onClick:a,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:a},r.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),h=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},r.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:c,onDoubleClick:s},r.createElement("div",{className:"k-window-title"},t||""),r.createElement("div",{className:"k-window-actions"},l===u.DEFAULT&&p,l===u.DEFAULT&&d,l!==u.DEFAULT&&f,h))},w=r.forwardRef((function(e,t){return r.createElement(k,b({},e,{forwardedRef:t}))})),C=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)}}(),O=["n","e","s","w","se","sw","ne","nw"],x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return C(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",null," ",O.map((function(t,n){return r.createElement(s.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),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.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(r.Component),I=function(e){var t=e.layout,n=void 0===t?N.layout:t,o=e.children,i=Object(s.e)("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)};I.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var N={layout:"end"},T=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)},_=function(e){function t(t){var n=e.call(this,t)||this;return n.offSetCoordinates={x:0,y:0},n._id=Object(s.m)(),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 s.b.up:e.preventDefault(),r<=n.height-5&&n.setState({height:n.height-5});break;case s.b.down:e.preventDefault(),n.setState({height:n.height+5});break;case s.b.left:t<=n.width-5&&n.setState({width:n.width-5});break;case s.b.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 s.b.up:n.windowStage===u.MINIMIZED?(n.handleRestore(e),Object(s.g)(n.props.onStageChange,e,n,{state:u.DEFAULT})):n.windowStage===u.DEFAULT&&(n.handleFullscreen(e),Object(s.g)(n.props.onStageChange,e,n,{state:u.FULLSCREEN}));break;case s.b.down:n.windowStage===u.FULLSCREEN?(n.handleRestore(e),Object(s.g)(n.props.onStageChange,e,n,{state:u.DEFAULT})):n.windowStage===u.DEFAULT&&(n.handleMinimize(e),Object(s.g)(n.props.onStageChange,e,n,{state:u.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case s.b.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case s.b.up:n.setState({top:n.state.top-5});break;case s.b.down:n.setState({top:n.state.top+5});break;case s.b.left:n.setState({left:n.state.left-5});break;case s.b.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!==u.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!==u.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:f(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:u.MINIMIZED,height:0}),Object(s.g)(n.props.onStageChange,e,n,{state:u.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:u.FULLSCREEN}),Object(s.g)(n.props.onStageChange,e,n,{state:u.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===u.FULLSCREEN?n.setState({stage:u.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===u.MINIMIZED&&n.setState({stage:u.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),Object(s.g)(n.props.onStageChange,e,n,{state:u.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),Object(s.g)(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===u.FULLSCREEN||n.windowStage===u.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,p=r-n.left,d=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-d<0&&(f.height=d),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-p<0&&(f.width=p),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===u.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(s.v)(d),n.state={stage:n.props.stage||u.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0,zIndex:f(n.getCurrentZIndex(),n.getDocument(),n._id)},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return T(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),l=this.getCurrentZIndex(),c=Object(s.e)("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),p=r.createElement(s.c.Provider,{value:l},r.createElement(r.Fragment,null,this.props.modal&&r.createElement("div",{className:"k-overlay",style:D({zIndex:l},this.props.overlayStyle)}),r.createElement("div",D({},((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:D({top:this.top,left:this.left,width:this.width,height:this.height||"",zIndex:l},this.props.style)}),r.createElement(E,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},r.createElement(s.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},r.createElement(w,{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!==u.MINIMIZED?r.createElement(r.Fragment,null,r.createElement("div",{className:"k-window-content"},i),a):null,this.windowStage===u.DEFAULT&&this.props.resizable?r.createElement(x,{onResize:this.handleResize}):null))));return s.d?o.createPortal(p,this.props.appendTo||document.body):null},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==u.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!==u.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===u.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===u.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetHeight;var t=this.getWindow();e=t?t.innerHeight:0}else this.windowStage===u.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===I}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==I}))},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=s.c,t}(r.Component),M=Object(s.f)(),P=Object(s.w)(M,_);P.displayName="KendoReactWindow"},function(e,t){e.exports=a},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(32),i=n(20),a=n(5),s=n(18);!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.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";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);t.marks=o.marks;var i=function(e){var t;return(t={})[e]={default:null,getFromDOM:function(t){return t.getAttribute(e)},setDOMAttr:function(t,n){n[e]=t}},t},a=function(e){var t={};return Array.from(e.attributes).forEach((function(e){t[e.nodeName]=e.nodeValue})),t},s=r({},i("style"),i("class"),i("id")),l=o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:s});l.table_row.attrs=l.table_row.attrs||{},l.table_row.attrs.style={default:null},l.table_row.attrs.class={default:null},l.table_row.attrs.id={default:null},l.table_row.toDOM=function(e){return["tr",e.attrs,0]},l.table_row.parseDOM=[{tag:"tr",getAttrs:a}],l.table.attrs=l.table.attrs||{},l.table.attrs.style={default:null},l.table.attrs.class={default:null},l.table.attrs.id={default:null},l.table.toDOM=function(e){return["table",e.attrs,["tbody",0]]},l.table.parseDOM=[{tag:"table",getAttrs:a}];var c=r({},o.nodes,l);t.nodes=c},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(16),l=n(59),c=n(3),u=n(7),p=n(12),d=n(9),f=n(5),h={className:"k-checkbox",type:"checkbox"},m=p.EditorToolsSettings.findAndReplace,v=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(f.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 d.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=f.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=f.replace(t,r,e.state.tr);a.setSelection(f.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(f.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},p=r.state.selection,d=f.findAll(r.state.doc,u),h=!n.state.searchText&&d[0]||d.find((function(e){return e.from>=p.from}))||c&&d[0]||void 0;n.setState(i({},t,{matches:d,nextMatch:h}))}else n.setState(t)},n.state={selectedTab:0,searchText:f.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||m},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(f.textHighlightKey,c),l.setSelection(a||f.TextSelection.create(s.doc,s.selection.from)),n.dispatch(l)}},t.prototype.render=function(){var e=c.provideLocalizationService(this),t=this.settings.messages,n=t.findReplaceDialogTitle,r=t.findReplaceTabFind,o=t.findReplaceTabReplace,p=t.findReplaceFindWhat,d=t.findReplaceReplaceWith,f=t.findReplaceReplace,m=t.findReplaceReplaceAll,v=t.findReplaceMatchCase,g=t.findReplaceMatchWord,y=t.findReplaceMatchCyclic,b=t.findReplaceUseRegExp,k=t.findReplacePrevMatch,w=t.findReplaceNextMatch,C=t.findReplaceMatches,O=this.state,x=O.matchCase,S=O.matchWord,E=O.matchCyclic,I=O.useRegExp,N=O.searchText,T=O.replaceText,D=O.nextMatch,_=a.createElement("div",{className:"k-search-options"},a.createElement("span",null,a.createElement("input",i({},h,{id:"match-case",checked:x,onChange:this.onMatchCaseChecked})),a.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(v,u.messages[v]))),a.createElement("span",null,a.createElement("input",i({},h,{id:"match-whole",checked:S,onChange:this.onMatchWordChecked})),a.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(g,u.messages[g]))),a.createElement("span",null,a.createElement("input",i({},h,{id:"match-cyclic",checked:E,onChange:this.onMatchCyclicChecked})),a.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(y,u.messages[y]))),a.createElement("span",null,a.createElement("input",i({},h,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked})),a.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(b,u.messages[b])))),M=a.createElement("div",{className:"k-matches-container"},a.createElement("button",{className:"k-button k-flat k-primary",onClick:this.onFindPrev},a.createElement("span",{className:"k-icon k-i-arrow-chevron-left"}),e.toLanguageString(k,u.messages[k])),a.createElement("span",null,this.matchesMessage(e.toLanguageString(C,u.messages[C]))),a.createElement("button",{className:"k-button k-flat k-primary",onClick:this.onFindNext},e.toLanguageString(w,u.messages[w]),a.createElement("span",{className:"k-icon k-i-arrow-chevron-right"}))),P=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"findWhat"},e.toLanguageString(p,u.messages[p]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"findWhat",type:"text",className:"k-textbox",value:N,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))),j=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"replaceWith"},e.toLanguageString(d,u.messages[d]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"replaceWith",className:"k-textbox",type:"text",value:T,onChange:this.onReplaceChange})));return a.createElement(s.Window,{title:e.toLanguageString(n,u.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(l.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},a.createElement(l.TabStripTab,{title:e.toLanguageString(r,u.messages[r])},a.createElement("div",{className:"k-edit-form-container"},P),_,M),a.createElement(l.TabStripTab,{title:e.toLanguageString(o,u.messages[o])},a.createElement("div",{className:"k-edit-form-container"},P,j),a.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},a.createElement("button",{className:"k-button",disabled:!Boolean(D),onClick:this.onReplace},e.toLanguageString(f,u.messages[f])),a.createElement("button",{className:"k-button",disabled:!Boolean(D),onClick:this.onReplaceAll},e.toLanguageString(m,u.messages[m]))),_,M)))},t}(a.Component);t.FindAndReplaceDialog=v,c.registerForLocalization(v)},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(10),l=n(39);!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,p=void 0===u?t.defaultProps.columns:u,d="rtl"===o?"right":"left";return i.createElement(s.Popup,{anchor:r,anchorAlign:{horizontal:d,vertical:"bottom"},popupAlign:{horizontal:d,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:n,style:"rtl"===o?{direction:"rtl"}:void 0},i.createElement(l.default,{rows:c,columns:p,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),p=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,d=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,p.messages[h])},e.props,d));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 It})),n.d(t,"getMultiSelectTreeValue",(function(){return Nt})),n.d(t,"AutoComplete",(function(){return se})),n.d(t,"AutoCompletePropsContext",(function(){return ae})),n.d(t,"DropDownList",(function(){return U})),n.d(t,"DropDownListPropsContext",(function(){return $})),n.d(t,"ComboBox",(function(){return ne})),n.d(t,"ComboBoxPropsContext",(function(){return te})),n.d(t,"MultiSelect",(function(){return ke})),n.d(t,"MultiSelectPropsContext",(function(){return be})),n.d(t,"MultiColumnComboBox",(function(){return Ee})),n.d(t,"MultiColumnComboBoxPropsContext",(function(){return Se})),n.d(t,"DropDownTree",(function(){return mt})),n.d(t,"DropDownTreePropsContext",(function(){return ht})),n.d(t,"MultiSelectTree",(function(){return St})),n.d(t,"MultiSelectTreePropsContext",(function(){return xt}));var r,o,i=n(0),a=n(1),s=n(2),l=n(8),c=n(10),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)}),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)},d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(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(c.Popup,p({style:{width:n,direction:r},contentKey:o&&o.join()},a),t)},t}(i.Component),f=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)}}(),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(t,e),t.prototype.render=function(){var e=this;return i.createElement("span",{className:"k-list-filter"},i.createElement("input",{ref:function(t){return e.input=t},value:this.props.value||"",className:"k-textbox",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown}),i.createElement("span",{className:"k-icon k-i-search"}))},t}(i.Component),m=function(e){return null!=e},v=function(e,t,n){if(!m(e))return!1;var r=String(e);return n&&(r=r.toLowerCase()),0===r.indexOf(t)},g=function(e,t,n){var r=-1;if(t){t=t.toLowerCase();for(var o=0;o<e.length;o++){var i=(b(e[o],n)||"")+"";if(i&&i.toLowerCase().startsWith(t)){r=o;break}}}return r},y=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(b(e,n))===o(t):o(t)===o(e.toString())}))},b=function(e,t){if(t&&m(e)){var n=t.split("."),r=e;return n.forEach((function(e){r=r?r[e]:void 0})),r}return e},k=function(e,t,n){t.forEach((function(t){var r=e.findIndex((function(e){return w(e,t,n)}));-1!==r&&e.splice(r,1)}))},w=function(e,t,n){return e===t||m(e)===m(t)&&b(e,n)===b(t,n)},C=function(e,t,n){if(t){var r=y(e,t,n,!0);return-1!==r?e[r]:e[g(e,t,n)]}return e[0]},O=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},x=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(!w(e[r],t[r],n))return!1;return!0}(e.data,t.data,n))},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){return e.preventDefault()},I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return S(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:E,className:Object(s.e)("k-list-optionlabel",{"k-state-selected":t})},b(n,r)||"")},t}(i.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(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(e){return t.props.onClick(t.props.index,e)},t}return N(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.group,r=e.dataItem,o=e.render,a=i.createElement("li",{id:this.props.id,role:"option","aria-selected":t,className:Object(s.e)("k-item",{"k-state-selected":t,"k-state-focused":this.props.focused,"k-first":Boolean(n)}),onClick:this.handleClick},b(r,this.props.textField).toString(),void 0!==n?i.createElement("div",{className:"k-group"},n):null);return void 0!==o?o.call(void 0,a,this.props):a},t}(i.Component),D=n(3),_="dropdowns.nodata",M="dropdowns.clear",P=((o={})[M]="clear",o[_]="NO DATA FOUND.",o),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.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.focusedIndex,u=t.highlightSelected,p=void 0===u||u,d=t.value,f=t.data,h=t.itemRender,m=Array.isArray(d);return f.map((function(t,s){var u,v,g=l+s,y=p&&(!m&&w(t,d,r)||m&&-1!==d.findIndex((function(e){return w(e,t,r)}))),k=void 0;return s>0&&void 0!==o&&(u=b(t,o),v=b(f[s-1],o),u&&v&&u!==v&&(k=u)),i.createElement(T,{id:"option-"+a+"-"+g,dataItem:t,selected:y,focused:c===s,index:g,key:g,onClick:e.props.onClick,textField:n,group:k,render:h})}))},t.prototype.renderNoValueElement=function(e){var t=this.props.noDataRender,n=i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.toLanguageString(_,P[_])));return t?t.call(void 0,n):n},t.prototype.render=function(){var e=Object(D.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,p=void 0===u?"k-list":u,d=this.renderItems();return d.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:p+" k-reset",ref:l,style:s},d)):this.renderNoValueElement(e)},t}(i.Component),A=R;Object(D.registerForLocalization)(R);var F=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-this.list.offsetHeight))},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-this.list.offsetHeight,e)},e}(),L=function(){function e(){}return e.prototype.navigate=function(e){var t=e.keyCode;return t===s.b.up||t===s.b.left?this.next({current:e.current,min:e.min,max:e.max,step:-1}):t===s.b.down||t===s.b.right?this.next({current:e.current,min:e.min,max:e.max,step:1}):t===s.b.home?0:t===s.b.end?e.max:void 0},e.prototype.next=function(e){return m(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}(),B=function(){return(B=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=function(){function e(e){var t=this;this.vs=new F,this.navigation=new L,this.handleItemClick=function(e,n){var r=t.initState();r.syntheticEvent=n,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.renderScrollWrapper=function(e,n){var r=t.getPopupSettings(),o=t.vs;return o.enabled?i.createElement("div",{onScroll:function(e){o.scrollHandler(e),n&&n.call(void 0,e)},ref:o.scrollerRef,style:{height:r.height,overflowY:"scroll"}},e):e},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(s.m)(),this.guid=Object(s.m)(),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,B({},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&&w(e,o[0],i)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!s&&a.skip+a.pageSize<a.total&&w(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.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,itemRender:a.func,listNoDataRender:a.func,focusedItemIndex:a.func,header:a.node,footer:a.node},e.propTypes=B({},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}(),V={name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493676,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"},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)}}(),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(t){var n=e.call(this,t)||this;return n.state={},n.base=new z(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],p=!w(u,n.value,s);n.triggerOnChange(u,t),p&&n.base.triggerPageChangeCornerItems(u,t)},n.renderDropDownWrapper=function(){var e=n.props,t=e.dataItemKey,r=e.data,o=void 0===r?[]:r,a=e.textField,l=e.disabled,c=e.tabIndex,u=e.loading,p=e.iconClassName,d=e.virtual,f=void 0===d?{skip:0}:d,h=e.valueRender,m=n.state.focused,v=void 0!==n.props.opened?n.props.opened:n.state.opened,g=n.value,y=o.findIndex((function(e){return w(e,g,t)})),k=b(g,a),C=i.createElement("span",{className:"k-input"},k),O=void 0!==h?h.call(void 0,C,g):C;return i.createElement("span",{ref:function(e){return n.base.wrapper=e},role:"listbox",tabIndex:Object(s.k)(c,l),accessKey:n.props.accessKey,className:Object(s.e)("k-dropdown-wrap",{"k-state-focused":m,"k-state-disabled":l}),onKeyDown:n.handleKeyDown,onKeyPress:n.handleKeyPress,onClick:l?void 0:n.handleWrapperClick,"aria-disabled":l||void 0,"aria-haspopup":!0,"aria-expanded":v||!1,"aria-owns":n.base.listBoxId,"aria-activedescendant":v?"option-"+n.base.guid+"-"+(y+f.skip):void 0,"aria-label":n.props.label,"aria-labelledby":n.props.ariaLabelledBy,"aria-describedby":n.props.ariaDescribedBy,id:n.props.id,title:n.props.title},O,i.createElement("span",{className:"k-select"},i.createElement("span",{className:Object(s.e)("k-icon",p,{"k-i-arrow-s":!u&&!p,"k-i-loading":u&&!p})})),n.dummySelect(g))},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=n.props,t=e.header,r=e.footer,o=e.dir,a=e.data,l=void 0===a?[]:a,c=n.base,u=c.getPopupSettings(),p=void 0!==n.props.opened?n.props.opened:n.state.opened,f=void 0!==n.props.virtual,h=void 0!==u.width?u.width:c.popupWidth,m={dir:void 0!==o?o:c.dirCalculated,width:h,popupSettings:{popupClass:u.popupClass,className:Object(s.e)("k-list-container k-reset",u.className),animate:u.animate,anchor:n.element,show:p,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:u.appendTo},itemsCount:[l.length]};return i.createElement(d,K({},m),n.renderListFilter(),f&&n.renderDefaultItem(),f&&t,n.base.renderScrollWrapper(i.createElement(i.Fragment,null,!f&&n.renderDefaultItem(),!f&&t,n.renderList(),!f&&r,n.base.renderScrollElement())),f&&r)},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,p=n.base.vs,d=l.skip,f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=n.base.getPopupSettings(),m="translateY("+p.translate+"px)";return i.createElement(A,{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 p.list=n.base.list=e},wrapperStyle:p.enabled?{float:"left",width:"100%"}:{maxHeight:h.height},wrapperCssClass:p.enabled?void 0:"k-list-scroller",listStyle:p.enabled?{transform:m}:void 0,key:"listkey",skip:d,onClick:n.handleItemClick,itemRender:u,noDataRender:c})},n.renderListFilter=function(){var e=void 0!==n.props.filter?n.props.filter:n.state.text;return n.props.filterable&&i.createElement(h,{value:e,ref:function(e){return n._filterInput=e&&e.input},onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,r=e.defaultItem,o=e.dataItemKey;return void 0!==r&&i.createElement(I,{defaultItem:r,textField:t,selected:w(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),p=s.length,d=Math.max(0,i.findIndex((function(e){return w(e,n.value,a)})));n.props.defaultItem&&(t={item:n.props.defaultItem,itemIndex:-1},p+=1,d+=1),s=function(e,t,n){var r=e;return n&&(r=[n].concat(r)),r.slice(t).concat(r.slice(0,t))}(s,d+=u?1:0,t);for(var f,h,m,g=0,y=n.props,k=y.textField,C=y.ignoreCase;g<p;g++)if(f=b(s[g].item,k),h=u&&v(f,c,C),m=v(f,l,C),h||m){g=s[g].itemIndex;break}if(g!==p){var O=n.base.initState();O.syntheticEvent=e,n.handleItemSelect(g,O),n.applyState(O),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,l=t.leftRightKeysNavigation,c=void 0===l||l,u=t.virtual,p=void 0===u?{skip:0,total:0,pageSize:0}:u,d=void 0!==n.props.opened?n.props.opened:n.state.opened,f=e.keyCode,h=f===s.b.home||f===s.b.end,m=f===s.b.up||f===s.b.down,v=!d&&(e.altKey&&f===s.b.down||f===s.b.enter||f===s.b.space),g=d&&(e.altKey&&f===s.b.up||f===s.b.esc),y=c&&(f===s.b.left||f===s.b.right),b=m||!i&&(y||h),k=n.base.initState();if(k.syntheticEvent=e,!a){if(h&&n.base.vs.enabled)f===s.b.home?0!==p.skip?(n.base.triggerOnPageChange(k,0,p.pageSize),n._navigated=!0):n.triggerOnChange(o[0],k):p.skip<p.total-p.pageSize?(n.base.triggerOnPageChange(k,p.total-p.pageSize,p.pageSize),n._navigated=!0):n.triggerOnChange(o[o.length-1],k);else if(d&&f===s.b.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){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!==s.b.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(s.v)(V),n}return H(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){return this.base.wrapper},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),m(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 w(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 p=this.value,d=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return w(e,p,i)})),h=!w(d,p,i);u&&a?this.base.scrollToVirtualItem(a,f):u&&!a||l&&c&&p&&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=this,t=this.props,n=t.style,r=t.className,o=t.label,a=t.dir,c=t.virtual,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=b(this.value,this.props.textField),d=!this.validityStyles||this.validity.valid,f=this.base;f.vs.enabled=void 0!==c,void 0!==c&&(f.vs.skip=c.skip,f.vs.total=c.total,f.vs.pageSize=c.pageSize);var h=i.createElement("span",{ref:function(t){return e._element=t},className:Object(s.e)("k-widget k-dropdown",{"k-state-invalid":!d},r),style:o?K({},n,{width:void 0}):n,dir:a,onMouseDown:u?O:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur},this.renderDropDownWrapper(),this.renderListContainer());return o?i.createElement(l.a,{label:o,editorValue:p,editorValid:d,editorDisabled:this.props.disabled,style:{width:n?n.width:void 0},children:h}):h},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,p=o.findIndex((function(e){return w(e,u,a)})),d=this.base.navigation.navigate({current:l.skip+p,max:(c.enabled?l.total:o.length)-1,min:void 0!==i?-1:0,keyCode:t});void 0!==d&&this.handleItemSelect(d,e),this.applyState(e)},t.prototype.focusedIndex=function(){var e=m(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 w(e,c,a)}))<0&&!this.props.defaultItem);return!u&&e&&0===i.skip?l?l(r,e,s):r.indexOf(C(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){w(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=K({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,leftRightKeysNavigation:a.bool,title:a.string},z.propTypes),t.defaultProps=K({delay:500,tabIndex:0,ignoreCase:!0},z.defaultProps,{required:!1}),t}(i.Component),$=Object(s.f)(),U=Object(s.w)($,W);U.displayName="KendoReactDropDownList";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)}}(),G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){return e.preventDefault()},t}return q(t,e),t.prototype.render=function(){var e=Object(D.provideLocalizationService)(this).toLanguageString(M,P[M]);return i.createElement("span",{className:"k-icon k-clear-value k-i-close",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"})},t}(i.Component),X=G;Object(D.registerForLocalization)(G);var 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(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(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("span",{className:"k-searchbar",key:"searchbar"},i.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",size:this.props.size,placeholder:this.props.placeholder,className:"k-input",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,!this.props.loading&&this.props.clearButton&&i.createElement(X,{onClick:this.props.clearButtonClick,key:"clearbutton"}),this.props.loading&&i.createElement("span",{className:"k-icon k-i-loading",key:"loading"})]},t}(i.Component),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)}}(),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)},ee=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new z(n),n._inputId=Object(s.m)(),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=!w(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.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.props,r=t.data,o=void 0===r?[]:r,i=t.groupField;if(i&&o.length){for(var a=n.base,s=a.vs,l=a.list,c=n.itemHeight=n.itemHeight||(s.enabled?s.itemHeight:l?l.children[0].offsetHeight:0),u=e.target.scrollTop-s.skip*c,p=o[0][i],d=1;d<o.length&&!(c*d>u);d++)o[d]&&o[d][i]&&(p=o[d][i]);p!==n.state.group&&n.setState({group:p})}},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===s.b.up||t===s.b.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===s.b.up?i():t===s.b.enter?(e.preventDefault(),n.applyValueOnEnter(e.currentTarget.value,o)):t===s.b.esc&&n.applyValueOnRejectSuggestions(e.currentTarget.value,o):e.altKey&&t===s.b.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;m(s)||(s=b(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(s.v)(V),n}return Z(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 w(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,p=this.value;if(this._valueOnDidUpdate=p,a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var d=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return w(e,p,i)})),h=!w(d,p,i);u&&a?this.base.scrollToVirtualItem(a,f):(u&&!a||l&&c&&p&&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=this,n=this.props,r=n.dir,o=n.disabled,a=n.clearButton,c=void 0===a?t.defaultProps.clearButton:a,u=n.label,p=n.textField,d=n.className,f=n.style,h=n.loading,v=n.iconClassName,g=n.virtual,y=this.state.focused,k=!this.validityStyles||this.validity.valid,w=void 0!==this.props.filter?this.props.filter:this.state.text,C=b(this.value,p),O=m(w)?w:C,x=c&&(!!O||m(this.value)),S=this.base,E=S.vs,I=this.props.id||this._inputId;E.enabled=void 0!==g,void 0!==g&&(E.skip=g.skip,E.total=g.total,E.pageSize=g.pageSize);var N=i.createElement("span",{className:Object(s.e)("k-widget k-combobox",{"k-combobox-clearable":c,"k-state-invalid":!k},d),ref:function(t){return e._element=t},style:u?Q({},f,{width:void 0}):f,dir:r},i.createElement("span",{ref:function(e){return S.wrapper=e},className:Object(s.e)("k-dropdown-wrap",{"k-state-disabled":o,"k-state-focused":y&&!o})},this.renderSearchBar(x,O||"",I),i.createElement("span",{className:"k-select",onClick:this.toggleBtnClick,onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:Object(s.e)("k-icon",v,{"k-i-arrow-s":!h&&!v,"k-i-loading":h&&!v})}))),this.renderListContainer());return u?i.createElement(l.a,{label:u,editorId:I,editorValue:O,editorValid:k,editorDisabled:o,style:{width:f?f.width:void 0},children:N}):N},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||m(u))if(""===s)this.handleItemSelect(0,e);else{var p=a.skip+l,d=this.base.navigation.navigate({keyCode:t,current:p,max:(c.enabled?c.total:o.length)-1,min:0});void 0!==d&&this.handleItemSelect(d,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=b(this.value,a)===e?this.index:y(i,e,a),u=-1!==c,p=void 0;if(this._suggested="",u)p=i[c];else{if(!s)return this.selectFocusedItem(e,t);p=void 0!==a?((n={})[a]=e,n):e}this.triggerOnChange(p,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=b(this.value,a);if(this._suggested="",e===c||""===e&&!m(c))return l&&this.base.togglePopup(t),this.applyState(t);var u=y(i,e,a,!0),p=null;-1!==u?p=i[u]:s&&(p=e?a?((n={})[a]=e,n):e:null),this.triggerOnChange(p,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?g:c,p=l.skip,d=""===e&&0===p?0:u(i,e,a);return-1!==d?this.handleItemSelect(d+p,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=this.base,t=this.props,n=t.dir,r=t.header,o=t.footer,a=t.data,l=void 0===a?[]:a,c=t.groupField,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=e.getPopupSettings(),f=void 0!==p.width?p.width:e.popupWidth,h=this.state.group;return void 0===h&&void 0!==c&&(h=b(l[0],c)),i.createElement(d,{width:f,popupSettings:{animate:p.animate,anchor:this.element,show:u,popupClass:p.popupClass,className:Object(s.e)("k-list-container k-reset",p.className),appendTo:p.appendTo},dir:void 0!==n?n:this.base.dirCalculated,itemsCount:[l.length]},r,h&&i.createElement("div",{className:"k-group-header"},h),e.renderScrollWrapper([this.renderList(),e.renderScrollElement()],this.onScroll),o)},t.prototype.renderList=function(){var e=this,t=this.base,n=this.props,r=n.textField,o=n.dataItemKey,a=n.listNoDataRender,s=n.itemRender,l=n.data,c=void 0===l?[]:l,u=n.virtual,p=void 0===u?{skip:0}:u,d=t.getPopupSettings(),f=t.vs,h=p.skip,v=void 0!==this.props.opened?this.props.opened:this.state.opened,g="translateY("+f.translate+"px)",y=v?this.getFocusedIndex():void 0,k=void 0!==this.props.filter?this.props.filter:this.state.text,w=b(this.value,r),C=m(k)&&k!==w?null:this.value,O=this.props.list||A;return i.createElement(O,{id:t.listBoxId,show:v,data:c,focusedIndex:y,value:C,textField:r,valueField:o,groupField:this.props.groupField,optionsGuid:t.guid,listRef:function(t){f.list=e.base.list=t,e.itemHeight=0},wrapperStyle:f.enabled?{float:"left",width:"100%"}:{maxHeight:d.height},wrapperCssClass:f.enabled?void 0:"k-list-scroller",listStyle:f.enabled?{transform:g}:void 0,key:"listkey",skip:h,onClick:this.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:function(e){return e.preventDefault()},onScroll:this.onScroll})},t.prototype.renderSearchBar=function(e,t,n){var r=this,o=this.props,a=o.placeholder,s=o.tabIndex,l=o.disabled,c=o.data,u=void 0===c?[]:c,p=o.dataItemKey,d=o.virtual,f=void 0===d?{skip:0}:d,h=void 0!==this.props.opened?this.props.opened:this.state.opened,m=this.value,v=Math.max(0,u.findIndex((function(e){return w(e,m,p)})));return this._suggested&&!w(this._valueOnDidUpdate,m,p)&&(this._suggested=""),i.createElement(Y,{id:n,placeholder:a,tabIndex:s||void 0,accessKey:this.props.accessKey,value:t+this._suggested,suggestedText:this._suggested,ref:function(e){return r._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:l,expanded:h,owns:this.base.listBoxId,activedescendant:this.base.guid+"-"+(v+f.skip),role:"combobox",clearButton:e,clearButtonClick:this.clearButtonClick,ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.triggerOnChange=function(e,t){var n=this.value;!m(n)&&!m(e)||w(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?g:l,u=this.props.filter?this.props.filter:this.state.text;return m(e)&&void 0===u?r.findIndex((function(t){return w(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[g(t,e,n)];if(o){var i=b(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=Q({},z.propTypes,{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=Q({},z.defaultProps,{allowCustom:!1,clearButton:!0,required:!1}),t}(i.Component),te=Object(s.f)(),ne=Object(s.w)(te,ee);ne.displayName="KendoReactComboBox";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(){return(oe=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)},ie=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new z(n),n._inputId=Object(s.m)(),n._suggested="",n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props.data,o=b((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];w(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,p=n.props.suggest,d=void 0!==n.props.opened?n.props.opened:n.state.opened;if(void 0!==p&&!1!==p){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);(!d&&o||d&&!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===s.b.enter||t===s.b.esc?(i(),n.applyInputValue(e.currentTarget.value,o,e.keyCode)):t!==s.b.up&&t!==s.b.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(s.v)(V),n}return re(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,p=void 0!==e.opened?e.opened:t.opened;(u&&(c||l)||!p&&u)&&this.base.scrollToItem(a),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.dir,r=t.disabled,o=t.label,a=t.className,c=t.style,u=t.loading,p=t.suggest,d=!this.validityStyles||this.validity.valid,f=this.state.focused,h=this.base,m=this.value,v=!1!==this.props.clearButton&&!u&&!!m,g=this.props.id||this._inputId;"string"==typeof p&&(this._suggested=p);var y=i.createElement("span",{className:Object(s.e)("k-widget k-autocomplete",a,{"k-state-disabled":r,"k-state-focused":f&&!r,"k-state-invalid":!d}),ref:function(t){e._element=t,h.wrapper=t},style:o?oe({},c,{width:void 0}):c,dir:n},this.renderSearchBar(v,m||"",g),u&&i.createElement("span",{className:"k-icon k-i-loading"}),this.renderListContainer());return o?i.createElement(l.a,{label:o,editorId:g,editorValue:m,editorValid:d,editorDisabled:r,style:{width:c?c.width:void 0},children:y}):y},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 w(e,n.state.focusedItem,s)})):l?l(a,r,s):a.indexOf(C(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,l=o.textField;if(this._suggested="",r&&n===s.b.enter){var c=b(a[this.focusedIndex(e)],l);this.triggerOnChange(c,t)}r&&this.togglePopup(t),this.applyState(t)},t.prototype.renderSearchBar=function(e,t,n){var r=this,o=this.base,a=this.props,s=a.placeholder,l=a.tabIndex,c=a.disabled,u=a.readonly,p=this.state.focused,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return i.createElement(Y,{id:n,placeholder:s,tabIndex:l||void 0,accessKey:this.props.accessKey,value:t,suggestedText:this._suggested,focused:p,name:this.props.name,ref:function(e){return r._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:o.handleFocus,onBlur:this.handleBlur,disabled:c,readOnly:u,expanded:d,owns:o.listBoxId,activedescendant:"option-"+o.guid+"-"+this.focusedIndex(),role:"combobox",clearButton:e,clearButtonClick:this.clearButtonClick,ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.renderListContainer=function(){var e=this.base,t=this.props,n=t.dir,r=t.header,o=t.footer,a=t.data,l=void 0===a?[]:a,c=e.getPopupSettings(),u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=void 0!==c.width?c.width:e.popupWidth;return i.createElement(d,{width:p,popupSettings:{animate:c.animate,anchor:this.element,show:u,popupClass:c.popupClass,className:Object(s.e)("k-list-container k-reset",c.className),appendTo:c.appendTo},dir:void 0!==n?n:this.base.dirCalculated,itemsCount:[l.length]},r,this.renderList(),o)},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(A,{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-scroller",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(oe({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[g(r,e,o)];if(i){var a=b(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 w(e,t.state.focusedItem,i)})):a?a(o,s,i):Math.max(0,o.indexOf(C(o,s,i)))},t.displayName="AutoComplete",t.propTypes=oe({},z.basicPropTypes,{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=oe({},z.defaultProps),t}(i.Component),ae=Object(s.f)(),se=Object(s.w)(ae,ie);se.displayName="KendoReactAutoComplete";var le,ce=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)}}(),ue=function(e){return e.preventDefault()},pe=function(e){return e.stopPropagation()},de=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ce(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.data,r=t.guid,o=this.props.tag;return i.createElement("ul",{className:"k-reset",role:"listbox",id:"tagslist-"+r},n.map((function(t,a){var s=o?i.createElement(o,{tagData:t,guid:r,focusedTag:e.props.focused,onTagDelete:e.props.onTagDelete}):i.createElement("li",{className:t===e.props.focused?"k-button k-state-focused":"k-button",key:t.text+a,id:"tag-"+r+"-"+t.text.replace(/\s+/g,"-"),onMouseDown:ue,onClick:pe,"aria-selected":!0,role:"option","aria-setsize":n.length},i.createElement("span",null,t.text),i.createElement("span",{"aria-label":"delete",className:"k-select",onClick:function(n){return e.props.onTagDelete.call(void 0,t.data,n)}},i.createElement("span",{className:"k-icon k-i-close"})));return e.props.tagRender?e.props.tagRender(t,s):s})))},t}(i.Component);!function(e){e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList"}(le||(le={}));var fe,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)}}(),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)},ve=function(e){return e.preventDefault()},ge=function(e){return e===fe.CustomItem};!function(e){e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem"}(fe||(fe={}));var ye=function(e){function t(t){var n=e.call(this,t)||this;return n.state={activedescendant:le.PopupList},n._valueItemsDuringOnChange=null,n._inputId=Object(s.m)(),n.base=new z(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 w(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;k(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,p=a&&c,d=i[e-l];d&&u!==e?n.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=le.PopupList):p&&-1===e&&void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.base.triggerPageChangeCornerItems(d,t)},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;m(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===s.b.left||t===s.b.right||t===s.b.home||t===s.b.end||t===s.b.delete||t===s.b.backspace))return n.onTagsNavigate(e,a);var l=function(){e.preventDefault(),n.base.togglePopup(a),n.applyState(a)};o?e.altKey&&t===s.b.up?l():t===s.b.up||t===s.b.down?(e.preventDefault(),n.onNavigate(a,t)):t===s.b.enter?(e.preventDefault(),n.props.allowCustom&&r&&null===i?n.customItemSelect(e):n.selectFocusedItem(e)):t===s.b.esc&&l():e.altKey&&t===s.b.down&&l()},n.renderListContainer=function(){var e=n.base,t=n.props,r=t.header,o=t.footer,a=t.allowCustom,l=t.dir,c=t.data,u=void 0===c?[]:c,p=n.base.getPopupSettings(),f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=void 0!==n.props.filter?n.props.filter:n.state.text,m=void 0!==n.props.virtual,v=void 0!==p.width?p.width:e.popupWidth,g={dir:void 0!==l?l:e.dirCalculated,width:v,popupSettings:{popupClass:p.popupClass,className:Object(s.e)("k-list-container k-reset",p.className),animate:p.animate,anchor:n.element,show:f,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:p.appendTo},itemsCount:[u.length,n.value.length]},y=n.getFocusedState().focusedType,b=a&&h&&i.createElement("div",{className:"k-list",key:"customitem",onClick:n.customItemSelect,onMouseDown:ve},i.createElement("div",{className:Object(s.e)("k-item k-custom-item",{"k-state-focused":ge(y)})},h,i.createElement("span",{className:"k-icon k-i-plus",style:{float:"right"}})));return i.createElement(d,me({},g),m&&r,n.base.renderScrollWrapper(i.createElement(i.Fragment,null,!m&&r,b,n.renderList(),!m&&o,n.base.renderScrollElement())),m&&o)},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,p=c?c.skip:0,d=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(A,{id:n.base.listBoxId,show:d,data:r.slice(),focusedIndex:f-p,value:n.value,textField:o,valueField:l,optionsGuid:n.base.guid,listRef:function(e){u.list=n.base.list=e},wrapperStyle:u.enabled?{float:"left",width:"100%"}:{maxHeight:h.height},wrapperCssClass:u.enabled?void 0:"k-list-scroller",listStyle:u.enabled?{transform:m}:void 0,key:"listKey",skip:p,onClick:n.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:ve,onBlur:n.handleBlur})},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),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(s.v)(V),n}return he(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,p=c.focusedIndex;s&&n?this.base.scrollToVirtualItem(n,p-r):s&&!n?this.base.scrollToItem(p):i&&a&&u&&this.scrollToFocused&&this.base.scrollToItem(p-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,l=void 0!==this.props.filter?this.props.filter:this.state.text,c=this.getFocusedState(),u=c.focusedType,p=c.focusedIndex,d=r&&l,f=ge(u),h=this.base,m=h.vs;if(a&&t===s.b.up&&f)void 0!==this.state.focusedIndex&&(e.data.focusedIndex=void 0);else{var v=h.navigation.navigate({keyCode:t,current:p,max:(m.enabled?m.total:i.length)-1,min:d?-1:0});void 0!==v&&(this.itemFocus(v,e),this.scrollToFocused=!0)}this.applyState(e)},t.prototype.render=function(){var e=this,t=this.props,n=t.style,r=t.className,o=t.label,a=t.dir,c=t.disabled,u=t.tags,p=t.textField,d=t.dataItemKey,f=t.virtual,h=this.state,m=h.focused,v=h.text,g=h.focusedTag,y=this.base.vs,k=this.props.id||this._inputId;y.enabled=void 0!==f,void 0!==f&&(y.skip=f.skip,y.total=f.total,y.pageSize=f.pageSize);var w=[];void 0===u?this.value.forEach((function(e){w.push({text:b(e,p),data:[e]})})):w.push.apply(w,u),this.setItems(w,this._tags);var C=!this.validityStyles||this.validity.valid,S=i.createElement("span",{ref:function(t){return e._element=t},className:Object(s.e)("k-widget k-multiselect",r,{"k-state-focused":m&&!c,"k-state-invalid":!C,"k-state-disabled":c}),style:o?me({},n,{width:void 0}):n,dir:a,onFocus:this.handleFocus,onBlur:this.handleBlur},i.createElement("div",{onClick:this.handleWrapperClick,ref:function(t){return e.base.wrapper=t},className:"k-multiselect-wrap k-floatwrap",onMouseDown:O},w.length>0&&i.createElement(de,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:w,guid:this.base.guid,focused:g?w.find((function(e){return x(e,g,d)})):void 0}),this.renderSearchbar(k)),this.renderListContainer());return o?i.createElement(l.a,{label:o,editorId:k,editorValue:v||b(this.value[0],p),editorValid:C,editorDisabled:c,style:{width:n?n.width:void 0},children:S}):S},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,p=this.getFocusedState().focusedIndex,d=!!c||this.value.length>0,f=0!==this.value.length||c?void 0:s,h=n===le.TagsList&&void 0!==r?"tag-"+this.base.guid+"-"+r.text.replace(/\s+/g,"-"):"option-"+this.base.guid+"-"+p;return i.createElement(Y,{id:e,size:Math.max((f||"").length,c.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:f,value:c,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:a,expanded:u,owns:this.base.listBoxId,activedescendant:h,ariaDescribedBy:"tagslist-"+this.base.guid+(l?" "+l:""),clearButton:d,clearButtonClick:this.clearButtonClick,loading:this.props.loading,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 x(e,r,i)})):-1,l=void 0,c=-1!==a;if(n===s.b.left)l=o[a=c?Math.max(0,a-1):o.length-1];else if(n===s.b.right)a===o.length-1?l=void 0:c&&(l=o[a=Math.min(o.length-1,a+1)]);else if(n===s.b.home)l=o[0];else if(n===s.b.end)l=o[o.length-1];else if(n===s.b.delete){if(c){var u=this.value;k(u,o[a].data,i),this.triggerOnChange(u,t)}}else if(n===s.b.backspace){u=this.value;if(c)k(u,o[a].data,i),this.triggerOnChange(u,t);else if(!c&&o.length){var p=o.pop();k(u,p.data,i),this.triggerOnChange(u,t)}}l!==r&&(t.data.focusedTag=l,t.data.activedescendant=le.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,p=void 0===u?g:u,d=l&&l.skip||0;if(void 0!==t)return{focusedIndex:t,focusedItem:a[t-d],focusedType:fe.ListItem};var f=this.value;if(o&&n)return{focusedItem:null,focusedIndex:-1,focusedType:fe.CustomItem};if(n)return{focusedItem:a[e=p(a,n,c)],focusedIndex:e+d,focusedType:fe.ListItem};if(f.length){var h=f[f.length-1];return e=a.findIndex((function(e){return w(e,h,s)})),void 0!==a[e]?{focusedIndex:e+d,focusedItem:a[e],focusedType:fe.ListItem}:{focusedType:fe.None,focusedIndex:-1}}return 0===d?{focusedItem:a[0],focusedIndex:0,focusedType:fe.ListItem}:{focusedType:fe.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({},z.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({},z.defaultProps,{autoClose:!0,required:!1}),t}(i.Component),be=Object(s.f)(),ke=Object(s.w)(be,ye);ke.displayName="KendoReactMultiSelect";var we=function(){return(we=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=function(e){return i.createElement(A,we({},e,{listClassName:"k-grid-list"}))},Oe=function(){return(Oe=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,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=Object(s.f)(),Ee=i.forwardRef((function(e,t){var n=Object(s.t)(Se,e),r=i.useRef(null),o=i.useRef(null),a=Object(s.j)(),l=n.columns,c=void 0===l?Ne.columns:l,u=n.popupSettings,p=void 0===u?Ne.popupSettings:u,d=n.onOpen,f=n.onClose,h=n.onFocus,m=n.onBlur,v=n.onChange,g=n.onFilterChange,y=n.onPageChange,b=xe(n,["columns","popupSettings","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(){return"calc("+c.map((function(e){return t=e.width,n=Ne.width,t?"number"==typeof t?t+"px":t:n;var t,n})).filter(Boolean).join(" + ")+" + "+a+"px)"}),[c,a]),w=i.useMemo((function(){return i.createElement(i.Fragment,null,n.header,i.createElement("div",{className:"k-grid-header"},i.createElement("div",{className:"k-grid-header-wrap"},i.createElement("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:Ne.width}})}))),i.createElement("tbody",null,i.createElement("tr",null,c.map((function(e,t){return i.createElement("th",{key:e.uniqueKey?e.uniqueKey:t,className:"k-header"},e.header||" ")}))))))))}),[n.header,c]),C=n.virtual?n.virtual.skip:0,O=i.useCallback((function(e,t){var r,o,a,l=c.map((function(e,n){return i.createElement("span",{className:"k-cell",style:{width:e.width?e.width:Ne.width},key:e.uniqueKey?e.uniqueKey:n},e.field?Object(s.l)(e.field)(t.dataItem):"")})),u=void 0,p=n.data||[],d=t.index-C;void 0!==n.groupField&&(r=(a=Object(s.l)(n.groupField))(p[d]),o=a(p[d-1]),r&&o&&r!==o&&(u=r)),u&&l.push(i.createElement("div",{key:"group",className:"k-cell k-group-cell"},i.createElement("span",null,u)));var f=i.cloneElement(e,Oe({},e.props),l);return n.itemRender?n.itemRender.call(void 0,f,t):f}),[c,n.groupField,n.itemRender,n.data,C]),x=i.useCallback((function(e,t){e&&e.call(void 0,Oe({},t,{target:r.current}))}),[]),S=i.useCallback((function(e){return x(d,e)}),[d]),E=i.useCallback((function(e){return x(f,e)}),[f]),I=i.useCallback((function(e){return x(h,e)}),[h]),N=i.useCallback((function(e){return x(m,e)}),[m]),T=i.useCallback((function(e){return x(v,e)}),[v]),D=i.useCallback((function(e){return x(g,e)}),[g]),_=i.useCallback((function(e){return x(y,e)}),[y]);i.useEffect((function(){Object(s.p)()}));var M=i.useCallback((function(e){return i.createElement(Ce,Oe({},e))}),[]);return i.createElement(ne,Oe({},b,{list:M,popupSettings:Oe({width:k},p,{popupClass:"k-dropdowngrid-popup",className:Object(s.e)("k-popup-flush",p.className)}),ref:o,header:w,itemRender:O,onOpen:S,onClose:E,onFocus:I,onBlur:N,onChange:T,onFilterChange:D,onPageChange:_}))})),Ie=Oe({},ee.propTypes,{columns:a.any.isRequired}),Ne={columns:[],popupSettings:{},width:"200px"};Ee.displayName="KendoMultiColumnComboBox",Ee.propTypes=Ie,Ee.defaultProps=Ne;function Te(e,t,n){if(Ae(e))return t[Number(e)];var r=t[Number(De(e))],o=r&&r[n]||[];return o.length?Te(_e(e),o,n):void 0}function De(e){return Re(e)?e:e.split("_")[0]}function _e(e){if(Re(e))return e;var t=e.indexOf("_");return e.substring(t+1)}function Me(e){return Pe("0",e)}function Pe(e,t){return e=e.toString(),t?t+"_"+e:e}function je(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function Re(e){return""===e||e.indexOf("_")<0}function Ae(e){return""!==e&&e.indexOf("_")<0}function Fe(e){return e.split("_")}function Le(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}var Be=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 ze(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}function Ve(e,t){var n=ze(t,e);return Boolean(n&&n.length)}function He(e,t){return t.expanded(e)&&Ve(e,t.getChildrenField())}function Ke(e,t,n,r){var o=[],i=new Be;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=Pe(s,o);t.hasId(ze(n,l))&&i.push(c),Ve(l,a)&&e(t,n,ze(a,l),c,i,a)}}(i,t,n,"",o,r),o}function We(e,t,n){for(var r=Fe(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 $e(e,t,n,r,o){switch(r){case s.b.left:return Ae(t)||o.expanded(e)&&We(t,n,o)?t:je(t);case s.b.right:return He(e,o)?Me(t):t;case s.b.up:return i=Number(Le(t)),a=je(t),i?function e(t,n,r){var o=Te(t,n,r.getChildrenField());return He(o,r)?e(Pe(o[r.getChildrenField()].length-1,t),n,r):t}(Pe(i-1,a),n,o):Ae(t)?t:a;case s.b.down:return He(e,o)?Me(t):function e(t,n,r){var o=je(t),i=o?Te(o,n,r.getChildrenField()):void 0,a=i?i[r.getChildrenField()]:n,s=Number(Le(t));return s<a.length-1?Pe(s+1,o):i?e(o,n,r):void 0}(t,n,o)||t;case s.b.home:return"0";case s.b.end:return function(){var e,t=(n.length-1).toString(),r=n[n.length-1];for(;He(r,o);)e=r[o.getChildrenField()],t=Pe(e.length-1,t),r=e[e.length-1];return t}();default:return t}var i,a}var Ue=n(14),qe=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)}}(),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=i.createContext((function(e){return e})),Je=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=Object(s.m)(),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 qe(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-mid",ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?i.createElement(s.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},n):n),this.props.animate?i.createElement(Ue.b,{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=this;return this.props.checkboxes?i.createElement("div",{className:"k-checkbox-wrapper"},i.createElement("input",{type:"checkbox",className:"k-checkbox",checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(t){return e.checkboxElement=t}}),i.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid})):void 0},t.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||Ve(this.item,this.fieldsSvc.getChildrenField()))?i.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}):void 0},t.prototype.renderSubitemsIfApplicable=function(){var e=this;return He(this.item,this.fieldsSvc)?i.createElement("ul",{className:"k-content",role:"group"},this.fieldsSvc.children(this.item).map((function(t,n){return i.createElement(Ye,{item:t,itemId:Pe(n,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:n})}))):void 0},t.prototype.renderItemInPart=function(){return i.createElement("span",{className:this.getContentClassName(),style:{touchAction:"none"},onClick:this.onItemClick},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)||Ve(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(){return Object(s.e)("k-icon",{"k-i-expand":!this.fieldsSvc.expanded(this.item),"k-i-collapse":this.fieldsSvc.expanded(this.item),"k-i-loading":this.fieldsSvc.expanded(this.item)&&!Ve(this.item,this.fieldsSvc.getChildrenField())})},t.prototype.getRootClassName=function(){return Object(s.e)("k-item k-treeview-item",{"k-state-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return Object(s.e)("k-in",{"k-state-focused":this.props.focusedItemId===this.itemId,"k-state-selected":this.fieldsSvc.selected(this.item)})},t}(i.Component),Ye=i.forwardRef((function(e,t){var n=i.useContext(Xe).call(void 0,e);return i.createElement(Je,Ge({ref:t},n))}));Ye.displayName="TreeViewItem";var Ze=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 ze(this.expandField,e)},e.prototype.selected=function(e){return ze(this.selectField,e)},e.prototype.text=function(e){return ze(this.textField,e)},e.prototype.disabled=function(e){return ze(this.disableField,e)},e.prototype.hasChildren=function(e){return ze(this.hasChildrenField,e)},e.prototype.children=function(e){var t=ze(this.childrenField,e);return t||[]},e.prototype.checked=function(e){return ze(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return ze(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&ze(this.focusIdField,e)},e.prototype.getChildrenField=function(){return this.childrenField},e}(),Qe={name:"@progress/kendo-react-treeview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493641,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)}}(),tt=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(s.m)(),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=$e(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(s.v)(Qe),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=this;return this.fieldsSvc=new Ze(this.props),i.createElement("div",{className:"k-widget k-treeview"+(this.props.className?" "+this.props.className:""),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(t){return e._element=t},tabIndex:this.props.tabIndex},i.createElement("ul",{className:"k-treeview-lines k-group",role:"group"},this.data.map((function(t,n){return i.createElement(Ye,{item:t,itemId:n.toString(),treeGuid:e.treeGuid,animate:e.props.animate,focusedItemId:e.state.focusedItemId,tabbableItemId:e.state.tabbableItemId,fieldsService:e.fieldsSvc,itemUI:e.props.item,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.ariaMultiSelectable,onItemClick:e.onItemClick,onFocusDomElNeeded:e.onFocusDomElNeeded,draggable:e.props.draggable,onPress:e.onPress,onDrag:e.onDrag,onRelease:e.onRelease,expandIcons:e.props.expandIcons,onExpandChange:e.onExpandChange,onCheckChange:e.onCheckChange,key:n})}))))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,r=function(){return We(n.state.focusedItemId,n.data,n.fieldsSvc)};e.keyCode===s.b.left&&this.fieldsSvc.expanded(t)&&r()||e.keyCode===s.b.right&&!this.fieldsSvc.expanded(t)&&(this.fieldsSvc.hasChildren(t)||Ve(t,this.props.childrenField))&&r()?this.dispatchExpandChange(e,t,this.state.focusedItemId):e.keyCode===s.b.enter&&r()?this.dispatchItemClick(e,t,this.state.focusedItemId):e.keyCode===s.b.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 Te(e,this.data,this.props.childrenField||"items")},t.prototype.dispatchCheckChange=function(e,t,n){Object(s.g)(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){Object(s.g)(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){Object(s.g)(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):(n=e,r=this.fieldsSvc.focusIdField,o=this.data,i=this.props.childrenField,(a=Ke([n],r,o,i)).length?a[0]:void 0);t!==this.state.focusedItemId&&(this.allowExplicitFocus=!0,this.setState({focusedItemId:t}))}}var n,r,o,i,a},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},t.defaultProps={animate:!0,expandField:"expanded",selectField:"selected",hasChildrenField:"hasChildren",childrenField:"items",textField:"text",disableField:"disabled",checkField:"checked",checkIndeterminateField:"checkIndeterminate"},t}(i.Component);var nt=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)}}(),rt=function(){return(rt=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(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={visible:!1,top:0,left:0,text:"",operationClassName:"k-i-cancel"},t}nt(t,e),t.prototype.render=function(){var e={top:this.state.top+"px",left:this.state.left+"px"};return this.state.visible&&i.createElement("div",{className:"k-header k-drag-clue",style:rt({},this.props.style,e)},i.createElement("span",{className:Object(s.e)("k-icon k-drag-status k-icon-with-modifier",this.state.operationClassName)},i.createElement("span",{className:"k-icon k-icon-modifier"})),this.state.text)},t.prototype.show=function(e,t,n,r){this.setState({visible:!0,top:e,left:t,text:n,operationClassName:r})},t.prototype.hide=function(){this.setState({visible:!1})},t.defaultProps={style:{display:"block",position:"absolute",zIndex:2e4,padding:"4px 6px"}}})(i.PureComponent),function(){function e(e){this.event=e,this.initialized=!1,this.itemId=e.itemHierarchicalIndex,this.treeViewGuid=e.target.guid}e.prototype.init=function(){return this.initialized||(this.setDestimationMeta(document.elementFromPoint(this.event.clientX,this.event.clientY)),this.initialized=!0),this},Object.defineProperty(e.prototype,"isDropAllowed",{get:function(){return!!(this.initialized&&this.destItemId&&this.destTreeViewGuid)&&!(this.destTreeViewGuid+"_"+this.destItemId+"_").startsWith(this.treeViewGuid+"_"+this.itemId+"_")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destinationMeta",{get:function(){return{itemHierarchicalIndex:this.destItemId,treeViewGuid:this.destTreeViewGuid}},enumerable:!0,configurable:!0}),e.prototype.getDropOperation=function(){if(this.initialized&&this.isDropAllowed){var e=this.destDomNodeWithMeta.getBoundingClientRect(),t=e.top;return t+e.height-this.event.clientY<6?"after":this.event.clientY-t<6?"before":"child"}},e.prototype.setDestimationMeta=function(e){for(var t=e;t&&!t._kendoItemId;)t=t.parentNode;t&&t._kendoItemId&&(this.destDomNodeWithMeta=t,this.destItemId=t._kendoItemId,this.destTreeViewGuid=t._kendoTreeViewGuid)}}();function ot(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 it=function(e){return i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.children))},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)},st=function(e){return i.createElement(i.Fragment,null,e.children)},lt=function(e){return e.split("_").map((function(e){return parseInt(e,10)}))},ct="selected",ut="items",pt={animate:!0,width:"200px",height:"200px"},dt=!1,ft=!0,ht=Object(s.f)(),mt=i.forwardRef((function(e,t){Object(s.v)(V);var n=Object(s.t)(ht,e),r=i.useMemo((function(){return Object(s.m)()}),[]),o=n.id||r,a=n.data,u=void 0===a?[]:a,p=n.dataItemKey,d=n.popupSettings,f=void 0===d?{}:d,h=n.style,v=void 0===h?{}:h,g=n.opened,y=n.disabled,k=n.onOpen,C=void 0===k?s.o:k,O=n.onClose,x=void 0===O?s.o:O,S=n.placeholder,E=n.label,I=n.name,N=n.selectField,T=void 0===N?ct:N,j=n.subItemsField,R=void 0===j?ut:j,A=n.validationMessage,F=n.valid,L=n.required,B=void 0===L?dt:L,z=n.validityStyles,H=void 0===z?ft:z,K=Object(s.k)(n.tabIndex,y),W=i.useRef(null),$=i.useRef(null),U=i.useRef(null),q=i.useRef(null),G=i.useRef(null),X=i.useRef(!1),J=i.useState(void 0),Y=J[0],Z=J[1],Q=void 0!==n.value,ee=Q?n.value:void 0!==Y?Y:n.defaultValue,te=m(ee),ne=te?b(ee,n.textField):"",re=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:A,valid:F,required:B},te),oe=i.useCallback((function(){return $.current&&$.current.focus()}),[]);i.useImperativeHandle(W,(function(){return{props:n,element:$.current,actionElement:$.current,focus:oe}})),i.useImperativeHandle(t,(function(){return W.current}));var ie=Object(s.u)($,n.dir),ae=void 0!==f.width?f.width:void 0!==v.width?v.width:pt.width,se=ot($,ae),le=at({width:se},void 0!==ie?{direction:ie}:{}),ce=i.useState(!1),ue=ce[0],pe=ce[1],de=void 0!==g?g:ue,fe=i.useState(!1),he=fe[0],me=fe[1],ve=i.useState(""),ge=ve[0],ye=ve[1],be=i.useCallback((function(){q.current&&q.current.setCustomValidity&&q.current.setCustomValidity(re.valid?"":void 0===A?"Please select a value from the list!":A)}),[A,re]);i.useEffect(be);var ke=i.useCallback((function(e){if(!de){if(C){var t=at({},e);C.call(void 0,t)}void 0===g&&pe(!0)}}),[de,g,C]),we=i.useCallback((function(e){if(de){if(x){var t=at({},e);x.call(void 0,t)}void 0===g&&pe(!1)}}),[de,g,x]),Ce=i.useCallback((function(e){if(!e.isDefaultPrevented()&&W.current){me(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:W.current};(de?we:ke)(t)}}),[de,g,C,x]),Oe=i.useCallback((function(e){X.current=!0,e(),window.setTimeout((function(){return X.current=!1}),0)}),[]),xe=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=G.current&&G.current.element;if(W.current&&(!e.isDefaultPrevented()||U.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:W.current};if(de)if(t===s.b.esc||n&&t===s.b.up)we(o);else if(r&&r.querySelector(".k-state-focused")&&(t===s.b.up||t===s.b.down||t===s.b.left||t===s.b.right||t===s.b.home||t===s.b.end)){if(t===s.b.up&&U.current){var i=Array.from(r.querySelectorAll(".k-treeview-item")),a=i.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-state-focused"))}));if(a&&0===i.indexOf(a))return Oe((function(){Ee(U.current)}))}Oe(s.o)}else t===s.b.down&&Oe((function(){Ee(U.current||r)}));else n&&t===s.b.down&&ke(o)}}),[de,g,C,x]),Se=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==s.b.up&&t!==s.b.down||(e.preventDefault(),Oe(t===s.b.up?function(){Ee($.current)}:function(){Ee(G.current&&G.current.element)}))}),[]),Ee=i.useCallback((function(e){e&&Oe((function(){return e.focus()}))}),[]),Ie=i.useCallback((function(){!he&&de?we({target:W.current}):n.filterable?Ee(U.current):Ee(G.current&&G.current.element)}),[x,n.filterable,he,g,de]),Ne=i.useCallback((function(){he&&Ee($.current)}),[he]),Te=i.useCallback((function(e){if(!he&&!X.current&&(me(!0),n.onFocus&&W.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:W.current};n.onFocus.call(void 0,t)}}),[he,n.onFocus]),De=i.useCallback((function(e){if(he&&!X.current&&W.current){me(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:W.current};if(n.onBlur){var r=at({},t);n.onBlur.call(void 0,r)}we(t)}}),[he,n.onBlur,de,g,x]),_e=i.useCallback((function(){he&&Oe(s.o)}),[he]),Me=i.useCallback((function(e,t,r){if(n.onChange){var o=at({value:t,level:r?lt(r):[]},e);n.onChange.call(void 0,o)}Q||Z(t)}),[n.onChange,Q]),Pe=i.useCallback((function(e){if(!w(e.item,ee,p)&&W.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o={syntheticEvent:e.syntheticEvent,nativeEvent:r,target:W.current};Me(o,t,n),we(o)}}),[Q,ee,n.onChange,p,de,g,x]),je=i.useCallback((function(e){if(W.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:W.current};Me(t,null),we(t),e.preventDefault()}}),[Q,n.onChange,de,g,x]),Re=i.useCallback((function(e){if(n.onExpandChange&&W.current){var t=e.item,r=e.itemHierarchicalIndex,o=e.nativeEvent,i=e.syntheticEvent,a={level:lt(r),item:t,nativeEvent:o,syntheticEvent:i,target:W.current};n.onExpandChange.call(void 0,a)}}),[n.onExpandChange]),Ae=i.useCallback((function(e){if(n.onFilterChange&&W.current){var t={filter:{field:n.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:W.current};n.onFilterChange.call(void 0,t),void 0===n.filter&&ye(e.target.value)}}),[n.onFilterChange,n.filter,n.textField]),Fe=i.useMemo((function(){return Q||!te?u:Object(s.n)(u,R,(function(e){var t;return Object(s.h)(e,R,((t={})[T]=w(e,ee,p),t))}))}),[u,ee,Q,te,T,R]),Le=n.listNoData||it,Be=n.valueHolder||st,ze=Object(D.useLocalization)(),Ve=!H||re.valid,He=i.createElement("span",{className:Object(s.e)("k-widget k-dropdowntree k-dropdowntree-clearable",n.className),tabIndex:K,accessKey:n.accessKey,id:o,style:E?at({},v,{width:void 0}):v,dir:ie,ref:$,onKeyDown:y?void 0:xe,onMouseDown:_e,onFocus:Te,onBlur:De,role:"listbox","aria-haspopup":"true","aria-expanded":de,"aria-disabled":y,"aria-label":E,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy},i.createElement("span",{className:Object(s.e)("k-dropdown-wrap",{"k-state-focused":he,"k-state-disabled":y,"k-state-invalid":!Ve}),onClick:y?void 0:Ce},i.createElement("span",{className:"k-input"},i.createElement(Be,{item:ee},ne||S)),te&&!y&&i.createElement("span",{onClick:je,className:"k-icon k-clear-value k-i-close",title:ze.toLanguageString(M,P[M]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}}),i.createElement("span",{className:"k-select","aria-label":"select"},i.createElement("span",{className:Object(s.e)("k-icon",{"k-i-arrow-60-down":!n.loading,"k-i-loading":n.loading})})),i.createElement("select",{name:I,ref:q,tabIndex:-1,"aria-hidden":!0,title:E,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:n.valueMap?n.valueMap.call(void 0,ee):ee}))),i.createElement(c.Popup,{className:Object(s.e)("k-list-container k-group k-reset k-popup-dropdowntree",f.className,{"k-rtl":"rtl"===ie}),popupClass:f.popupClass,style:le,animate:f.animate,anchor:$.current,show:de,onOpen:Ie,onClose:Ne,appendTo:f.appendTo},n.filterable&&i.createElement("span",{className:"k-list-filter"},i.createElement("input",{className:"k-textbox",tabIndex:K,ref:U,value:void 0===n.filter?ge:n.filter,onChange:Ae,onKeyDown:Se}),i.createElement("span",{className:"k-icon k-i-zoom"})),u.length>0?i.createElement(tt,{ref:G,tabIndex:K,data:Fe,focusIdField:p,textField:n.textField,selectField:T,expandField:n.expandField,childrenField:R,expandIcons:!0,onItemClick:Pe,onExpandChange:Re,item:n.item}):i.createElement(Le,null,ze.toLanguageString(_,P[_]))));return E?i.createElement(l.a,{label:E,editorValue:ne,editorPlaceholder:S,editorValid:Ve,editorDisabled:y,editorId:o,style:{width:v?v.width:void 0},children:He,dir:ie}):He})),vt={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};mt.displayName="KendoReactDropDownTree",mt.propTypes=vt;var gt=function(){return(gt=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="checkField",bt="checkIndeterminateField",kt="items",wt={animate:!0,width:"200px",height:"200px"},Ct=!1,Ot=!0,xt=Object(s.f)(),St=i.forwardRef((function(e,t){var n=Object(s.t)(xt,e);Object(s.v)(V);var r=i.useMemo((function(){return Object(s.m)()}),[]),o=n.id||r,a=n.data,u=void 0===a?[]:a,p=n.dataItemKey,d=n.popupSettings,f=void 0===d?{}:d,h=n.style,m=void 0===h?{}:h,v=n.opened,g=n.disabled,y=n.onOpen,k=void 0===y?s.o:y,C=n.onClose,O=void 0===C?s.o:C,S=n.placeholder,E=n.label,I=n.name,N=n.checkField,T=void 0===N?yt:N,j=n.checkIndeterminateField,R=void 0===j?bt:j,A=n.subItemsField,F=void 0===A?kt:A,L=n.validationMessage,B=n.valid,z=n.tags,H=n.value,K=n.required,W=void 0===K?Ct:K,$=n.validityStyles,U=void 0===$?Ot:$,q=Object(s.k)(n.tabIndex,g),G=i.useRef(null),X=i.useRef(null),J=i.useRef(null),Y=i.useRef(null),Z=i.useRef(null),Q=i.useRef(!1),ee=i.useRef([]),te=i.useRef(null),ne=i.useState(),re=ne[0],oe=ne[1],ie=i.useState(!1),ae=ie[0],se=ie[1],le=i.useState(!1),ce=le[0],ue=le[1],pe=i.useState(""),fe=pe[0],he=pe[1],me=void 0!==v?v:ae,ve=Boolean(Array.isArray(H)&&H.length),ge=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:L,valid:B,required:W},ve),ye=Object(s.u)(X,n.dir),be=void 0!==f.width?f.width:void 0!==m.width?m.width:wt.width,ke=ot(X,be),we=gt({width:ke},void 0!==ye?{direction:ye}:{}),Ce=i.useCallback((function(){return X.current&&X.current.focus()}),[]);ee.current=void 0===z?(H||[]).map((function(e){return{text:b(e,n.textField),data:[e]}})):z.slice(),i.useImperativeHandle(G,(function(){return{props:n,element:X.current,actionElement:X.current,focus:Ce}})),i.useImperativeHandle(t,(function(){return G.current}));var Oe=i.useCallback((function(){Y.current&&Y.current.setCustomValidity&&Y.current.setCustomValidity(ge.valid?"":void 0===L?"Please select a value from the list!":L)}),[L,ge]);i.useEffect(Oe),i.useEffect((function(){te.current&&me&&te.current.setPosition(te.current._popup)}),[H,me]);var xe=i.useCallback((function(e,t,r){if(n.onChange){var o=gt({items:t,operation:r},e);n.onChange.call(void 0,o)}}),[n.onChange]),Se=i.useCallback((function(e){if(!w(e.item,H,p)&&G.current){var t=e.item,n=e.nativeEvent,r={syntheticEvent:e.syntheticEvent,nativeEvent:n,target:G.current};xe(r,[t],"toggle")}}),[H,p,xe]),Ee=i.useCallback((function(e){if(!me){if(k){var t=gt({},e);k.call(void 0,t)}void 0===v&&se(!0)}}),[me,v,k]),Ie=i.useCallback((function(e){if(me){if(O){var t=gt({},e);O.call(void 0,t)}void 0===v&&se(!1)}}),[me,v,O]),Ne=i.useCallback((function(e){Q.current=!0,e(),window.setTimeout((function(){return Q.current=!1}),0)}),[]),Te=i.useCallback((function(e){e&&Ne((function(){return e.focus()}))}),[Ne]),De=i.useCallback((function(){!ce&&me?Ie({target:G.current}):n.filterable?Te(J.current):Te(Z.current&&Z.current.element)}),[ce,me,Te,Ie,n.filterable]),_e=i.useCallback((function(){ce&&Te(X.current)}),[ce,Te]),Me=i.useCallback((function(e){if(!ce&&!Q.current&&(ue(!0),n.onFocus&&G.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};n.onFocus.call(void 0,t)}}),[ce,n.onFocus]),Pe=i.useCallback((function(e){if(ce&&!Q.current&&G.current){ue(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};if(n.onBlur){var r=gt({},t);n.onBlur.call(void 0,r)}Ie(t)}}),[ce,n.onBlur,me,v,O]),je=i.useCallback((function(){ce&&Ne(s.o)}),[ce,Ne]),Re=i.useCallback((function(e){if(!e.isDefaultPrevented()&&G.current){ue(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};me||Ee(t)}}),[me,Ee]),Ae=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=Z.current&&Z.current.element;if(G.current&&(!e.isDefaultPrevented()||J.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};if(H&&H.length>0&&(t===s.b.left||t===s.b.right||t===s.b.home||t===s.b.end||t===s.b.delete)){var i=ee.current,a=re?i.findIndex((function(e){return x(e,re,p)})):-1,l=void 0,c=-1!==a;t===s.b.left?l=i[a=c?Math.max(0,a-1):i.length-1]:t===s.b.right?a===i.length-1?l=void 0:c&&(l=i[a=Math.min(i.length-1,a+1)]):t===s.b.home?l=i[0]:t===s.b.end?l=i[i.length-1]:t===s.b.delete&&c&&xe(o,i[a].data,"delete"),l!==re&&oe(l)}if(me)if(t===s.b.esc||n&&t===s.b.up)Ie(o);else if(r&&r.querySelector(".k-state-focused")&&(t===s.b.up||t===s.b.down||t===s.b.left||t===s.b.right||t===s.b.home||t===s.b.end)){if(t===s.b.up&&J.current){var u=Array.from(r.querySelectorAll(".k-treeview-item")),d=u.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-state-focused"))}));if(d&&0===u.indexOf(d))return Ne((function(){Te(J.current)}))}Ne(s.o)}else t===s.b.down&&Ne((function(){Te(J.current||r)}));else n&&t===s.b.down&&Ee(o)}}),[me,Ie,Te,Ne,Ee,re,p,H,xe]),Fe=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==s.b.up&&t!==s.b.down||(e.preventDefault(),Ne(t===s.b.up?function(){Te(X.current)}:function(){Te(Z.current&&Z.current.element)}))}),[Te,Ne]),Le=i.useCallback((function(e){if(G.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};xe(t,[],"clear"),Ie(t),e.preventDefault()}}),[xe,Ie]),Be=i.useCallback((function(e,t){Ie({target:G.current}),ce||Te(J.current),xe({syntheticEvent:t,nativeEvent:t.nativeEvent,target:G.current},e,"delete")}),[xe,Ie,Te,ce]),ze=i.useCallback((function(e){if(n.onExpandChange&&G.current){var t=e.item,r=e.itemHierarchicalIndex,o=e.nativeEvent,i=e.syntheticEvent,a={level:(s=r,s.split("_").map((function(e){return parseInt(e,10)}))),item:t,nativeEvent:o,syntheticEvent:i,target:G.current};n.onExpandChange.call(void 0,a)}var s}),[n.onExpandChange]),Ve=i.useCallback((function(e){if(n.onFilterChange&&G.current){var t={filter:{field:n.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};n.onFilterChange.call(void 0,t),void 0===n.filter&&he(e.target.value)}}),[n.onFilterChange,n.filter,n.textField]),He=n.listNoData||it,Ke=Object(D.useLocalization)(),We=!U||ge.valid,$e=i.createElement("span",{className:Object(s.e)("k-widget k-dropdowntree",n.className,{"k-state-focused":ce&&!g,"k-state-invalid":!We,"k-state-disabled":g}),tabIndex:q,accessKey:n.accessKey,id:o,style:E?gt({},m,{width:void 0}):m,dir:ye,ref:X,onKeyDown:g?void 0:Ae,onMouseDown:je,onFocus:Me,onBlur:Pe,role:"listbox","aria-haspopup":"true","aria-expanded":me,"aria-disabled":g,"aria-label":E,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy},i.createElement("span",{className:Object(s.e)("k-multiselect-wrap k-floatwrap",{"k-state-focused":ce,"k-state-disabled":g,"k-state-invalid":!We}),onClick:g?void 0:Re},ee.current.length>0&&i.createElement(de,{tag:n.tag,onTagDelete:Be,data:ee.current,guid:r,focused:re?ee.current.find((function(e){return x(e,re,p)})):void 0}),n.loading&&i.createElement("span",{className:Object(s.e)("k-icon",{"k-i-loading":n.loading})}),ve&&!g&&i.createElement("span",{onClick:Le,className:"k-icon k-clear-value k-i-close",title:Ke.toLanguageString(M,P[M]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}}),i.createElement("select",{name:I,ref:Y,tabIndex:-1,"aria-hidden":!0,title:E,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:n.valueMap?n.valueMap.call(void 0,H):H}))),i.createElement(c.Popup,{popupClass:f.popupClass,className:Object(s.e)("k-list-container k-group k-reset k-popup-dropdowntree",f.className,{"k-rtl":"rtl"===ye}),style:we,animate:f.animate,anchor:X.current,show:me,onOpen:De,onClose:_e,appendTo:f.appendTo,ref:te},n.filterable&&i.createElement("span",{className:"k-list-filter"},i.createElement("input",{className:"k-textbox",tabIndex:q,ref:J,value:void 0===n.filter?fe:n.filter,onChange:Ve,onKeyDown:Fe}),i.createElement("span",{className:"k-icon k-i-zoom"})),u.length>0?i.createElement(tt,{ref:Z,tabIndex:q,data:u,focusIdField:p,textField:n.textField,checkField:T,checkIndeterminateField:R,expandField:n.expandField,childrenField:F,expandIcons:!0,onItemClick:Se,onCheckChange:Se,onExpandChange:ze,checkboxes:!0,item:n.item}):i.createElement(He,null,Ke.toLanguageString(_,P[_]))));return E?i.createElement(l.a,{label:E,editorValue:ve,editorPlaceholder:S,editorValid:We,editorDisabled:g,editorId:o,style:{width:m?m.width:void 0},children:$e,dir:ye}):$e})),Et={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};St.displayName="KendoReactMultiSelectTree",St.propTypes=Et;var It=function(e,t){var n={};return e&&e.length&&e.forEach((function(e){n[t(e)]=!0})),n},Nt=function(e,t){var n=t.items,r=t.dataItemKey,o=t.value,i=t.subItemsField,a=void 0===i?"items":i,l=t.operation,c=Object(s.l)(r),u=It(o,c);if("clear"===l)return[];if("delete"===l){var p=It(n,c);return o.filter((function(e){return!p[c(e)]}))}for(var d,f,h=n[0],m=c(h),v=Object(s.l)(a),g=e.slice(),y=[];g.length;){var b=g.pop();if(m===c(b)){d=y.map((function(e){return e.item})),f=b;break}y&&y.length&&y[y.length-1].parentPosition===g.length&&y.pop(),(E=v(b))&&E.length&&(y.push({item:b,parentPosition:g.length}),g.push.apply(g,E))}for(var k=(v(f)||[]).slice(),w=[];k.length;){b=k.pop();w.push(b),(E=v(b))&&E.length&&k.push.apply(k,E)}var C=[];if(!u[m]){C.push.apply(C,o),C.push(f),C.push.apply(C,w.filter((function(e){return!u[c(e)]})));for(var O=d.filter((function(e){return!u[c(e)]})),x=It(C,c),S=O.length-1;S>-1;S--){var E,I=O[S];if((E=v(I)).filter((function(e){return x[c(e)]})).length<E.length)break;C.push(I),x[c(I)]=!0}}else{var N=c(f),T=It(w,c),D=It(d,c);C.push.apply(C,o.filter((function(e){var t=c(e);return!T[t]&&N!==t&&!D[t]})))}return C}},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);t.Editor=r.default;var o=n(36);t.EditorTools=o.EditorTools;var i=n(12);t.EditorToolsSettings=i.EditorToolsSettings;var a=n(19);t.EditorUtils=a.EditorUtils;var s=n(15);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(61),u=n(5),p=n(20),d=n(28),f=n(12),h=n(15),m=n(19),v=n(18),g=n(33),y=f.EditorToolsSettings.link,b=f.EditorToolsSettings.bold,k=f.EditorToolsSettings.italic,w=f.EditorToolsSettings.underline,C=n(34),O=n(6),x=n(35),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,p=t.style,d=t.className;this.view&&(v.editorPropsKey.getState(this.view.state).preserveWhitespace=u);var f=this.props.contentStyle;void 0===f&&void 0===(p||{}).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",d,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:p},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;[d.defaultStyle,d.tablesStyles,"rtl"===this.props.dir?d.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.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:p.nodes,marks:p.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',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 .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 /* 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(16),s=n(4),l=n(5),c=n(3),u=n(7),p=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,p=t.render,d=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"},d.toLanguageString(m,u.messages[m]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-textbox",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"},d.toLanguageString(v,u.messages[v]))),i.createElement("div",{className:"k-edit-field k-editor-link-text-row"},i.createElement("input",{type:"text",className:"k-textbox",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",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"},d.toLanguageString(g,u.messages[g])))),C=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},d.toLanguageString(y,u.messages[y])),i.createElement(s.Button,{onClick:this.onInsert,primary:!0,dir:o,key:"insert"},d.toLanguageString(b,u.messages[b]))],O=i.createElement(a.Dialog,{title:d.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 p?p(O,{content:w,actionButtons:C}):O},t}(i.Component);t.InsertLinkDialog=p,c.registerForLocalization(p)},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(16),s=n(4),l=n(5),c=n(3),u=n(7),p=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,p=t.render,d=r.messages,f=d.insertImageDialogTitle,h=d.insertImageAddress,m=d.insertImageTitle,v=d.insertImageAltText,g=d.insertImageWidth,y=d.insertImageHeight,b=d.insertImageCancel,k=d.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-textbox",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-textbox",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-textbox",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-textbox",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-textbox",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,primary:!0,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 p?p(E,{content:x,actionButtons:S}):E},t}(i.Component);t.InsertImageDialog=p,c.registerForLocalization(p)},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(16),s=n(4),l=n(5),c=n(3),u=n(7),p=n(18),d=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=p.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,p=t.render,d=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"},d.toLanguageString(m,u.messages[m])),i.createElement(s.Button,{onClick:this.onUpdate,primary:!0,dir:o,key:"update"},d.toLanguageString(v,u.messages[v]))],b=i.createElement(a.Dialog,{title:d.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 p?p(b,{content:g,actionButtons:y}):b},t}(i.Component);t.ViewHtmlDialog=d,c.registerForLocalization(d)},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(12),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(19),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:1639494022,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(12),l=n(37),c=n(40),u=n(41),p=n(42),d=n(43),f=n(44),h=n(45),m=n(46),v=n(47),g=n(48),y=n(49),b=n(50),k=n(51),w=n(52),C=n(53),O=n(54),x=n(55),S=n(56),E=n(57),I=n(58);!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 N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignCenter));e.AlignCenter=N;var T=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=T,e.createInsertTableTool=D;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(D(s.EditorToolsSettings.insertTable));e.InsertTable=_;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.InsertTablePopupNS.InsertTablePopup);function P(e){return u.FontStyleToolNS.createStyleDropDownList(e)}e.InsertTablePopup=M,e.createStyleDropDownList=P;var j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(P(s.EditorToolsSettings.fontSize));e.FontSize=j;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(P(s.EditorToolsSettings.fontName));function A(e){return d.FormatBlockToolNS.createFormatBlockDropDownList(e)}e.FontName=R,e.ForeColor=function(e){return a.createElement(p.ApplyColorTool,i({},s.EditorToolsSettings.foreColor,e))},e.BackColor=function(e){return a.createElement(p.ApplyColorTool,i({},s.EditorToolsSettings.backColor,e))},e.createFormatBlockDropDownList=A;var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(A(s.EditorToolsSettings.formatBlock));function L(e){return f.HistoryToolNS.createUndoTool(e)}function B(e){return f.HistoryToolNS.createRedoTool(e)}e.FormatBlock=F,e.createUndoTool=L,e.createRedoTool=B;var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(L(s.EditorToolsSettings.undo));e.Undo=z;var V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(B(s.EditorToolsSettings.redo));function H(e){return h.IndentToolNS.createIndentTool(e)}e.Redo=V,e.createIndentTool=H;var K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(H(s.EditorToolsSettings.indent));function W(e){return m.InlineFormatToolNS.createInlineFormatTool(e)}e.Indent=K,e.createInlineFormatTool=W;var $=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.bold));e.Bold=$;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.italic));e.Italic=U;var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.underline));e.Underline=q;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.strikethrough));e.Strikethrough=G;var X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.subscript));e.Subscript=X;var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.superscript));function Y(e){return v.createInsertImageTool(e)}e.Superscript=J,e.createInsertImageTool=Y;var Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Y(s.EditorToolsSettings.image));function Q(e){return g.LinkToolNS.createLinkTool(e)}e.InsertImage=Z,e.createLinkTool=Q;var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Q(s.EditorToolsSettings.link));e.Link=ee;var te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Q(s.EditorToolsSettings.insertFile));function ne(e){return y.ListToolNS.createListTool(e)}e.InsertFile=te,e.createListTool=ne;var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ne(s.EditorToolsSettings.orderedList));e.OrderedList=re;var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ne(s.EditorToolsSettings.bulletList));function ie(e){return b.OutdentToolNS.createOutdentTool(e)}e.UnorderedList=oe,e.createOutdentTool=ie;var ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ie(s.EditorToolsSettings.outdent));function se(e){return k.TableEditNS.createAddRowBeforeTool(e)}function le(e){return k.TableEditNS.createAddRowAfterTool(e)}function ce(e){return k.TableEditNS.createAddColumnBeforeTool(e)}function ue(e){return k.TableEditNS.createAddColumnAfterTool(e)}function pe(e){return k.TableEditNS.createDeleteRowTool(e)}function de(e){return k.TableEditNS.createDeleteColumnTool(e)}function fe(e){return k.TableEditNS.createDeleteTableTool(e)}function he(e){return k.TableEditNS.createMergeCellsTool(e)}function me(e){return k.TableEditNS.createSplitCellTool(e)}e.Outdent=ae,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=se,e.createAddRowAfterTool=le,e.createAddColumnBeforeTool=ce,e.createAddColumnAfterTool=ue,e.createDeleteRowTool=pe,e.createDeleteColumnTool=de,e.createDeleteTableTool=fe,e.createMergeCellsTool=he,e.createSplitCellTool=me;var ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(se(s.EditorToolsSettings.addRowBefore));e.AddRowBefore=ve;var ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(le(s.EditorToolsSettings.addRowAfter));e.AddRowAfter=ge;var ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ce(s.EditorToolsSettings.addColumnBefore));e.AddColumnBefore=ye;var be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ue(s.EditorToolsSettings.addColumnAfter));e.AddColumnAfter=be;var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(pe(s.EditorToolsSettings.deleteRow));e.DeleteRow=ke;var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(de(s.EditorToolsSettings.deleteColumn));e.DeleteColumn=we;var Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(fe(s.EditorToolsSettings.deleteTable));e.DeleteTable=Ce;var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(he(s.EditorToolsSettings.mergeCells));e.MergeCells=Oe;var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(me(s.EditorToolsSettings.splitCell));function Se(e){return w.UnlinkToolNS.createUnlinkTool(e)}e.SplitCell=xe,e.createUnlinkTool=Se;var Ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Se(s.EditorToolsSettings.unlink));function Ie(e){return C.ViewHtmlToolNS.createViewHtmlTool(e)}e.Unlink=Ee,e.createViewHtmlTool=Ie;var Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ie(s.EditorToolsSettings.viewHtml));e.ViewHtml=Ne;var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(I.FindAndReplace);e.FindAndReplace=Te}(t.EditorTools||(t.EditorTools={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(38);t.InsertTableToolNS=r.InsertTableToolNS;var o=n(22);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),p=n(7),d=n(22),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,p.messages[y]),w=v.toLanguageString(b,p.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(d.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-state-disabled"+(s?" k-state-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(12),u=n(5),p=n(9),d=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=d.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},p.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 d.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(24),c=n(5),u=n(9),p=n(3),d=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=p.provideLocalizationService(this);g&&g.localizationKey&&((g=i({},g)).text=g.localizationKey?b.toLanguageString(g.localizationKey,d.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 p.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(60),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,p=c.title,d=c.view,f=void 0===d?"palette":d,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:p?s.useLocalization().toLanguageString(p,l.messages[p]):p}))}},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(24),c=n(5),u=n(9),p=n(3),d=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=p.provideLocalizationService(this);v&&v.localizationKey&&((v=i({},v)).text=v.localizationKey?b.toLanguageString(v.localizationKey,d.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 p.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(23);!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),p=n(3),d=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=p.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,d.messages[w]),disabled:!b},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return p.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),p=n(3),d=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=p.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,d.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return p.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),p=n(15),d=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=d.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(p.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 d.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),p=n(15),d=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=d.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(p.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 d.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),p=n(3),d=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=p.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,d.messages[m])},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return p.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),p=n(3),d=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=p.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,d.messages[b]),disabled:!g},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return p.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(23),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),p=n(3),d=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=p.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,d.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return p.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(15),p=n(3),d=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=p.provideLocalizationService(this),h=e.messages.viewHtml,m=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"viewHtml"},c.onDownPreventDefault,{title:f.toLanguageString(h,d.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 p.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(12).EditorToolsSettings.print;t.Print=function(e){var t=e.view,n=e.render,p=e.settings,d=void 0===p?u:p,f=o(e,["view","render","settings"]),h=t&&t.dom,m=h&&h.ownerDocument,v=m&&m.defaultView,g=d.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,d.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(62),c=n(9),u=n(7),p=n(12),d=p.EditorToolsSettings.pdf,f=p.EditorToolsSettings.savePdfOptions;t.Pdf=function(e){var t=e.view,n=e.render,p=e.settings,h=void 0===p?d:p,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),p=n(12).EditorToolsSettings.selectAll;t.SelectAll=function(e){var t=e.view,n=e.render,d=e.settings,f=void 0===d?p:d,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),p=n(12).EditorToolsSettings.cleanFormatting,d=u.cleanFormatting();t.CleanFormatting=function(e){var t=e.view,n=e.render,u=e.settings,f=void 0===u?p:u,h=o(e,["view","render","settings"]),m=f.messages.title,v=i.useCallback((function(){t&&d(t.state,(function(e){e.setMeta("commandName",f.commandName),t.dispatch(e)}))}),[t]),g=i.createElement(a.Button,r({onClick:v,disabled:!t||!d(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(21),u=n(9),p=n(7),d=n(12),f=n(3),h=d.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),d=h.messages.findReplaceToolTitle;return[s.createElement(l.Button,i({onClick:this.onOpen},u.onDownPreventDefault,{disabled:!t,title:o.toLanguageString(d,p.messages[d]),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";n.r(t),n.d(t,"TabStrip",(function(){return k})),n.d(t,"TabStripContent",(function(){return v})),n.d(t,"TabStripNavigation",(function(){return d})),n.d(t,"TabStripNavigationItem",(function(){return c})),n.d(t,"TabStripTab",(function(){return C})),n.d(t,"PanelBar",(function(){return L})),n.d(t,"PanelBarItem",(function(){return S})),n.d(t,"renderChildren",(function(){return I})),n.d(t,"getInitialState",(function(){return N})),n.d(t,"flatVisibleItems",(function(){return T})),n.d(t,"isPresent",(function(){return _})),n.d(t,"PanelBarUtils",(function(){return D})),n.d(t,"isArrayEqual",(function(){return P})),n.d(t,"Menu",(function(){return Fe})),n.d(t,"MenuItemLink",(function(){return Oe})),n.d(t,"MenuItem",(function(){return J})),n.d(t,"downArrowClass",(function(){return Se})),n.d(t,"rightArrowClass",(function(){return Ee})),n.d(t,"leftArrowClass",(function(){return Ie})),n.d(t,"MenuItemArrow",(function(){return Ne})),n.d(t,"Splitter",(function(){return Ue})),n.d(t,"SplitterPane",(function(){return Be})),n.d(t,"Card",(function(){return qe})),n.d(t,"CardHeader",(function(){return Ge})),n.d(t,"CardTitle",(function(){return Xe})),n.d(t,"CardBody",(function(){return Je})),n.d(t,"CardActions",(function(){return Ye})),n.d(t,"CardImage",(function(){return Ze})),n.d(t,"CardSubtitle",(function(){return Qe})),n.d(t,"CardFooter",(function(){return et})),n.d(t,"Avatar",(function(){return tt})),n.d(t,"Drawer",(function(){return ut})),n.d(t,"DrawerNavigation",(function(){return ct})),n.d(t,"DrawerContent",(function(){return pt})),n.d(t,"DrawerItem",(function(){return it})),n.d(t,"Stepper",(function(){return Tt})),n.d(t,"Step",(function(){return yt})),n.d(t,"AppBar",(function(){return _t})),n.d(t,"AppBarSection",(function(){return Pt})),n.d(t,"AppBarSpacer",(function(){return jt})),n.d(t,"TileLayout",(function(){return $t})),n.d(t,"BottomNavigation",(function(){return Zt})),n.d(t,"BottomNavigationItem",(function(){return Jt})),n.d(t,"StackLayout",(function(){return nn})),n.d(t,"GridLayout",(function(){return an})),n.d(t,"GridLayoutItem",(function(){return cn})),n.d(t,"Breadcrumb",(function(){return bn})),n.d(t,"BreadcrumbOrderedList",(function(){return vn})),n.d(t,"BreadcrumbListItem",(function(){return un})),n.d(t,"BreadcrumbDelimiter",(function(){return dn})),n.d(t,"BreadcrumbLink",(function(){return hn}));var r,o=n(0),i=n(1),a=n(2),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.active,r=t.disabled,i=t.title,s=void 0===i?"Untitled":i,c=t.first,u=t.last,p={"aria-selected":n,role:"tab",onClick:r?void 0:this.onClick},d=Object(a.e)("k-item",((e={})["k-first"]=c,e["k-last"]=u,e["k-state-disabled"]=r,e["k-state-active"]=n,e));return o.createElement("li",l({},p,{className:d}),o.createElement("span",{className:"k-link"},s))},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)}}(),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)},d=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,d=o.Children.count(s),f=o.Children.toArray(s);s&&(e=(t=d,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,p({key:t},i))})));var h=Object(a.e)("k-tabstrip-items-wrapper",{"k-hstack":"top"===i||"bottom"===i,"k-vstack":"left"===i||"right"===i}),m=Object(a.e)("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(14),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){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.contentId=Object(a.m)(),t.childFactory=function(e){return o.cloneElement(e,m({},e.props,{in:e.props.children.props.id===String(t.contentId+t.props.selected)}))},t}return h(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.e)("k-content","k-state-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,style:{display:n?void 0:"none"}},i={position:"initial",display:n?void 0:"none"};return e.props.disabled?null:this.props.animation?o.createElement(f.a,{appear:!0,exit:this.props.keepTabsMounted,style:i,childFactory:this.props.keepTabsMounted?this.childFactory:void 0},o.createElement("div",m({},r,{id:String(this.contentId+t),key:t}),e.props.children)):o.createElement("div",m({},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),g={name:"@progress/kendo-react-layout",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493924,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"},y=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)}}(),b=function(){return(b=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)},k=function(e){function t(t){var n,r=e.call(this,t)||this;return r._element=null,r.keyBinding=((n={})[a.b.left]=function(){return r.prevNavigatableTab()},n[a.b.right]=function(){return r.nextNavigatableTab()},n[a.b.down]=function(){return r.nextNavigatableTab()},n[a.b.up]=function(){return r.prevNavigatableTab()},n[a.b.home]=function(){return 0},n[a.b.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 a.b.left:t=r.keyBinding[r.invertKeys(a.b.left,a.b.right)];break;case a.b.right:t=r.keyBinding[r.invertKeys(a.b.right,a.b.left)];break;case a.b.up:t=r.keyBinding[a.b.up];break;case a.b.down:t=r.keyBinding[a.b.down];break;case a.b.home:t=r.keyBinding[a.b.home];break;case a.b.end:t=r.keyBinding[a.b.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(v,b({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(a.v)(g),r}return y(t,e),t.prototype.render=function(){var e=this,t=b({},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.e)("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",{ref:function(t){return e._element=t},dir:this.props.dir,className:l,style:this.props.style},!s&&o.createElement(d,b({},t,{tabIndex:i})),this.renderContent(t),s&&o.createElement(d,b({},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),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(){return null!==e&&e.apply(this,arguments)||this}return w(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),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(){return(x=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 S=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,x({},e.props,{in:n.props.expanded})):e},n.state={show:t.expanded},n}return O(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,p=n.focused,d=n.expanded,h=n.className,m=n.level,v=n.headerClassName,g=n.animation,y=n.keepItemsMounted,b={role:"treeitem","aria-disabled":c,"aria-hidden":!c&&!d,"aria-selected":!c&&u,"aria-expanded":!c&&d&&!!i},k=Object(a.e)("k-item",{"k-panelbar-header":0===m,"k-panelbar-item":0!==m,"k-state-expanded":d&&!!i},"k-level-"+m,h),w=Object(a.e)("k-link",{"k-state-selected":!c&&u,"k-state-focus":!c&&p,"k-state-disabled":c},v),C=Object(a.e)("k-panelbar-toggle","k-icon",((e={})["k-i-arrow-chevron-up"]=d&&!!i,e["k-panelbar-collapse"]=d&&!!i,e["k-i-arrow-chevron-down"]=!d&&!!i,e["k-panelbar-expand"]=!d&&!!i,e)),O=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.e)("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),S=!c&&i?o.createElement("span",{className:C}):null,E=!c&&d||y?o.createElement("ul",{role:"group",className:"k-panelbar-group k-panel k-group",style:{display:y?this.state.show?"block":"none":"block"}},i):null,I=void 0!==g&&!g||c||!i?E:o.createElement(f.b,{transitionEnterDuration:200,transitionExitDuration:200,key:l+"_animation",style:{display:"block"},children:E,childFactory:y&&this.childFactory,unmountOnExit:!y,onBeforeEnter:function(){return y&&t.setState({show:!0})},onAfterExited:function(){return y&&t.setState({show:!1})}});return o.createElement("li",x({id:r,className:k},b),o.createElement("span",{className:w,onClick:this.handleItemClick},O,o.createElement("span",{className:"k-panelbar-item-text"},s),S),I)},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),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,t,n,r,i,a,s,l){return void 0===e&&(e=!0),void 0===t&&(t=!1),void 0===a&&(a=!0),void 0===s&&(s=0),void 0===l&&(l=[]),o.Children.map(i,(function(i,c){if(i&&i.type===S){var u=void 0,p=l.length?l[l.length-1]+"."+c:"."+c;return i.props.children&&(u=I(e,t,n,r,i.props.children,(n.expanded||[]).indexOf(p)>-1,s+1,l.concat([p]))),o.cloneElement(i,E({},i.props,{animation:void 0!==i.props.animation?i.props.animation:e,keepItemsMounted:t,id:i.props.id||"k-panelbar-item-default-"+p,uniquePrivateKey:p,parentUniquePrivateKey:l,parentExpanded:a,level:s,expanded:(n.expanded||[]).indexOf(p)>-1,focused:n.focused===p&&n.wrapperFocused,selected:n.selected===p,children:u,onSelect:r}))}return o.createElement("div",{className:"k-panelbar-content k-content"},i)}))},N=function(e,t,n,r,i,a){return void 0===n&&(n={expanded:e.expanded||[],selected:e.selected||"",focused:e.focused||".0",wrapperFocused:!1}),void 0===r&&(r=!0),void 0===i&&(i=!0),void 0===a&&(a=[]),o.Children.map(e.children,(function(e,r){if(e&&e.type===S){var o=a.length?a[a.length-1]+"."+r:"."+r;!e.props.disabled&&i&&(e.props.selected&&(n.selected=o),e.props.focused&&(n.focused=o),e.props.expanded&&("multiple"===t?n.expanded.push(o):"single"===t&&(n.expanded=[o])),e.props.children&&(n=N(e.props,t,n,!1,!!e.props.expanded,a.concat([o]))))}})),n};function T(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=null),(e||[]).forEach((function(e){e.disabled||(t.push(e),e.expanded&&e.children&&T(e.children,t))})),t}var D,_=function(e){return null!=e};(D||(D={})).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(S,E({},t,{children:r,key:t.id||n}))}))};var M,P=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))},j=function(){function e(e,t,n){var r=this;this.flatChildren=function(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&&r.flatChildren(e.props.children,t))})),t},this.flatVisibleChildren=function(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&&r.flatVisibleChildren(e.props.children,t))})),t},this.onSelect=e,this.onFocus=t,this.expandMode=n}return e.prototype.select=function(e,t,n){var r,i;switch(this.flatChildren(o.Children.toArray(t)).forEach((function(t){t.props.uniquePrivateKey===e&&(r=t)})),this.expandMode){case"single":i=r.props.parentUniquePrivateKey.concat([r.props.uniquePrivateKey]),P(n,i)&&(i=r.props.parentUniquePrivateKey?r.props.parentUniquePrivateKey.slice():[]);break;case"multiple":var a=(i=n.slice()).indexOf(r.props.uniquePrivateKey);-1===a?i.push(r.props.uniquePrivateKey):i.splice(a,1);break;default:i=n.slice()}this.onSelect(r,i)},e.prototype.focus=function(e,t,n){var r,i=this.flatVisibleChildren(o.Children.toArray(n));i.forEach((function(n,o){if(n.props.uniquePrivateKey===e){var a=o+t<0?0:o+t>=i.length?i.length-1:o+t;r=i[a]}})),this.onFocus(r)},e.prototype.setExpandMode=function(e){this.expandMode=e},e}();!function(e){e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous"}(M||(M={}));var R=function(){function e(e){this.onNavigate=e}return e.prototype.navigate=function(e,t){var n;switch(e.keyCode){case a.b.left:n=t?M.Next:M.Previous;break;case a.b.up:n=M.Previous;break;case a.b.right:n=t?M.Previous:M.Next;break;case a.b.down:n=M.Next;break;case a.b.space:case a.b.enter:n=M.Toggle;break;default:n=null}null!==n&&(e.preventDefault(),this.onNavigate(n))},e}(),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(){return(F=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)},L=function(e){function t(t){var n=e.call(this,t)||this;return n._element=null,n.handleSelect=function(e){var t=F({},n.state,{selected:n.selected});n._selectionService.select(e.uniquePrivateKey,I(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children),t.expanded),n._selectionService.focus(e.uniquePrivateKey,0,I(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children))},n.onSelect=function(e,t){n.setState({selected:e.props.uniquePrivateKey,expanded:t},(function(){n.props.onSelect&&n.props.onSelect.call(void 0,{target:e,action:"select"})}))},n.onFocus=function(e){n.activeDescendant=e.props.id,n.setState({focused:e.props.uniquePrivateKey})},n.onNavigate=function(e){var t=F({},n.state,{selected:n.selected});switch(e){case M.Previous:n._selectionService.focus(t.focused,-1,I(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children));break;case M.Next:n._selectionService.focus(t.focused,1,I(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children));break;case M.Toggle:n._selectionService.select(t.focused,I(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children),t.expanded)}},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;e.target===e.currentTarget&&n._navigationService.navigate(e,t)},Object(a.v)(g),n.state=N(t,t.expandMode||"multiple"),n._selectionService=new j(n.onSelect,n.onFocus,n.props.expandMode||"multiple"),n._navigationService=new R(n.onNavigate),n}return A(t,e),Object.defineProperty(t.prototype,"selected",{get:function(){var e=this.props.selected;return void 0===e?this.state.selected:e},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t=this.props;t.expandMode!==e.expandMode&&this._selectionService.setExpandMode(t.expandMode)},t.prototype.render=function(){var e=this,t={"aria-activedescendant":this.activeDescendant},n=F({},this.state,{selected:this.selected}),r=I(this.props.animation,this.props.keepItemsMounted,n,this.handleSelect,this.props.children),i=Object(a.e)("k-panelbar",this.props.className);return o.createElement("ul",F({ref:function(t){e._element=t},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:i,style:this.props.style},t),r)},t.prototype.nextTick=function(e){clearTimeout(this.nextTickId),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!==S)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(n.type!==S)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);function B(e,t){if($(e))return t[Number(e)];var n=t[Number(z(e))];return n.items?B(function(e){if(W(e))return e;var t=e.indexOf("_");return e.substring(t+1)}(e),n.items):void 0}function z(e){return W(e)?e:e.split("_")[0]}function V(e){return H("0",e)}function H(e,t){return t?t+"_"+e:e}function K(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function W(e){return""===e||e.indexOf("_")<0}function $(e){return""!==e&&e.indexOf("_")<0}function U(e){return 1===function(e){return e.split("_").length-1}(e)}function q(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}function G(e,t,n){return $(t)?e?Number(t)<n-1?(Number(t)+1).toString():"0":Number(t)>0?(Number(t)-1).toString():(n-1).toString():t}var X=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)}}(),J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return X(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 Y(e,t){if(e&&e.length>0)return{items:ee(e),inputItems:e};if(Q(t).length>0){var n=function e(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=Z(void 0,o),a=e(Q(o.props.children));a.length>0&&(i.items=a),n.push(i)}return n}(Q(t));return{items:ee(n),inputItems:n}}return{items:[],inputItems:[]}}function Z(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,p=r.linkRender,d=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!==p&&(n.linkRender=p),void 0!==d&&(n.contentRender=d),void 0!==f&&(n.data=f),n}function Q(e){return o.Children.toArray(e).filter((function(e){return e&&e.type===J}))}function ee(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=Z(o);i.id=H(r.toString(),t),i.isLastFromSiblings=r===e.length-1,i.items=te(o,i),n.push(i)}return n}function te(e,t){return e.contentRender?[{contentParentItemId:t.id,id:H("0",t.id),isLastFromSiblings:!0,contentRender:e.contentRender,items:[]}]:e.items?ee(e.items,t.id):[]}var ne=/\S/;function re(e,t,n,r,o,i){var s,l=m();switch(n){case a.b.left:return o?i?d():u():i?p():c();case a.b.right:return o?i?u():d():i?c():p();case a.b.up:return o?g():$(t)?h():g();case a.b.down:return o?y():$(t)?f():y();case a.b.enter:case a.b.space:return l.disabled?t:v()?V(t):z(t);case a.b.home:return b()[0].id;case a.b.end:return(s=b())[s.length-1].id;case a.b.esc:return $(t)?t:K(t);default:return 1===r.length&&ne.test(r)?function(){var e=r.toLowerCase(),n=b(),o=Number(q(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 c(){return $(t)?g():U(t)?f(g(z(t))):K(t)}function u(){return $(t)?h():K(t)}function p(){return $(t)?y():f(v()?t:y(z(t)))}function d(){return f($(t)||v()?t:y(z(t)))}function f(e){return k(!0,e)}function h(e){return k(!1,e)}function m(n,r){return void 0===n&&(n=t),void 0===r&&(r=e),B(n,r)}function v(e){return m(e).items.length>0}function g(e){return w(!1,e)}function y(e){return w(!0,e)}function b(){return $(t)?e:m(K(t),e).items}function k(e,n){void 0===n&&(n=t);var r=m(n);return v(n)&&!r.disabled?e?V(n):function(e){var t=m(e).items;return t[t.length-1].id}(n):n}function w(n,r){if(void 0===r&&(r=t),$(r))return G(n,r,e.length);var o=K(r);return H(G(n,q(r),m(o).items.length),o)}}var oe=n(10),ie={vertical:"top",horizontal:"left"},ae={vertical:"top",horizontal:"right"},se={vertical:"flip",horizontal:"fit"},le={vertical:"fit",horizontal:"flip"},ce={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:ae,collision:se},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:ae,collision:le}},ue={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:ie,collision:se},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:ie,collision:le}};function pe(e,t,n){return $(e)?t?n?"leftward":"rightward":"downward":n?"leftward":"rightward"}function de(e){return e?"rtl":"ltr"}function fe(e,t){return e+"_"+t}var he,me,ve,ge,ye,be,ke,we,Ce=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 Ce(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.e)("k-link","k-menu-link",{"k-state-active":this.props.opened})},t.propTypes={opened:i.bool,url:i.string},t}(o.Component),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="k-i-arrow-60-down",Ee="k-i-arrow-60-right",Ie="k-i-arrow-60-left",Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xe(t,e),t.prototype.render=function(){return o.createElement("span",{className:this.getArrowClassName(),role:"presentation"})},t.prototype.getArrowClassName=function(){var e,t=pe(this.props.itemId,!0===this.props.verticalMenu,"rtl"===this.props.dir);return Object(a.e)("k-icon","k-menu-expand-arrow",((e={})[Se]="downward"===t,e[Ee]="rightward"===t,e[Ie]="leftward"===t,e))},t.propTypes={itemId:i.string,dir:i.string,verticalMenu:i.bool},t}(o.Component),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)}}(),De=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 Te(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("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?fe(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:de(this.props.isDirectionRightToLeft)});var t=this.itemRender?o.createElement(this.itemRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,key:"1"}):e.text;return o.createElement(Oe,{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=pe(e,t,n);return n?"downward"===r?ce.downward:ce.leftward:"downward"===r?ue.downward:ue.rightward}(e,this.props.isMenuVertical,this.props.isDirectionRightToLeft),n=t.anchorAlign,r=t.popupAlign,i=t.collision;return o.createElement(oe.Popup,{anchor:this.itemElement,show:!0,popupClass:this.getPopupClassName(),anchorAlign:n,popupAlign:r,collision:i,animate:!1,key:"1"},o.createElement(Me,{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(Ne,{itemId:this.props.item.id,verticalMenu:this.props.isMenuVertical,dir:de(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.e)("k-menu-popup",{"k-rtl":this.props.isDirectionRightToLeft})},t.prototype.getMenuItemClassName=function(e){return Object(a.e)("k-item","k-menu-item",{"k-first":(t=e.id,"0"===q(t)),"k-last":e.isLastFromSiblings,"k-state-disabled":e.disabled},e.cssClass);var t},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)}}(),Me=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 _e(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?fe(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(De,{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),Pe=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}(),je=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}(),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={focusedItemId:"",hoveredItemId:"",tabbableItemId:"0"},Fe=function(e){function t(t){var n=e.call(this,t)||this;return n.guid=Object(a.m)(),n.directionHolder=new Pe,n.reset=function(){n.clearItemHoverAndLeaveRequestsIfApplicable(),n.setState(Ae)},n.onKeyDown=function(e){if(""!==n.state.focusedItemId){var t=B(n.state.focusedItemId,n.items),r=re(n.items,t.id,e.keyCode,e.key,n.props.vertical,n.directionHolder.getIsDirectionRightToLeft());t.id!==r&&(e.preventDefault(),n.setFocusedItemId(r)),e.keyCode!==a.b.enter&&e.keyCode!==a.b.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=B(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 B(e,n.inputItems)},Object(a.v)(g),n.mouseOverHandler=new je(n.props.openOnClick,n.reset,n.onItemMouseOver),n.state=Object.assign({},Ae,{isFirstRender:!0}),n}return Re(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?K(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(Me,{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:z(e);return{hoveredItemId:""===e||W(t.hoveredItemId)&&W(e)?t.hoveredItemId:"",focusedItemId:e,tabbableItemId:n}}))},t.prototype.setHoveredItemId=function(e){this.setState((function(t){return W(e)&&W(t.focusedItemId)?{hoveredItemId:e,focusedItemId:t.focusedItemId,tabbableItemId:t.tabbableItemId}:{hoveredItemId:e,focusedItemId:"",tabbableItemId:"0"}}))},t.prototype.getMenuWrapperClassName=function(){return Object(a.e)({"k-rtl":this.directionHolder.getIsDirectionRightToLeft()},this.props.className)},t.prototype.getMenuClassName=function(){return Object(a.e)("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=Y(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(a.g)(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),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)}}(),Be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Le(t,e),t.prototype.render=function(){var e,t=this.props,n=t.size,r=t.collapsed,i=t.overlay,s=t.containsSplitter,l=t.collapsible,c=t.resizable,u=t.scrollable,p=t.keepMounted,d=n&&n.length>0,f={flexBasis:n},h=Object(a.e)("k-pane",((e={})["k-state-hidden"]=r,e.hidden=r,e["k-pane-flex"]=s,e["k-pane-static"]=!c&&!l||d,e["k-scrollable"]=u,e));return o.createElement("div",{style:f,className:h},!r||p?this.props.children:void 0,i?o.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)},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)}}(),Ve=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,s=function(t,r,o){e.preventDefault(),n.props.onKeyboardResize(t,r,o,e)};i&&(t===a.b.enter?(e.preventDefault(),n.onToggle(e)):n.isDraggable&&(r&&t===a.b.left?s(i,o,-10):r&&t===a.b.right?s(i,o,10):r||t!==a.b.up?r||t!==a.b.down||s(i,o,10):s(i,o,-10)))},n.previousArrowClass=function(e){var t,r=n.props.prev,o=r.collapsible,i=r.collapsed;return Object(a.e)("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.e)("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 ze(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.e)("k-splitbar",((e={})["k-state-focused"]=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(a.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),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=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={collapsible:!1,collapsed:!1,resizable:!0,scrollable:!0},Ue=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,p=t[c];o.isValidElement(p)&&(u="Splitter"===p.type.displayName);var d=!1;s&&void 0!==a&&(d=a===c||a+1===c),l.push(Ke({},$e,{orientation:r,containsSplitter:u,overlay:d},(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(Ve,{key:l,index:i,orientation:r.orientation,prev:r,next:c,onDrag:n.onBarDragResize,onToggle:n.onBarToggle,onKeyboardResize:n.onBarKeyboardResize})}return[o.createElement(Be,Ke({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?Ke({},o,{collapsed:!t.collapsed}):Ke({},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,p=c.nextElement;if(u&&p)if(o)n.setState({isDragging:!0,dragIndex:r,startTime:a,originalX:s,originalY:l,originalPrevSize:n.elementSize(u),originalNextSize:n.elementSize(p)});else{var d,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 d="vertical"===n.orientation?l-y:n.isRtl?g-s:s-g,n.resize(r,r+1,h,m,d,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(a.v)(g),n.state={isDragging:!1,dragIndex:void 0,startTime:0,originalX:0,originalY:0,originalPrevSize:0,originalNextSize:0,panes:t.defaultPanes||[]},n}return He(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.e)("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),p=u[e],d=u[t],f=n+r,h=this.containerSize(),m=function(e){return c.toPixels(e,h)},v={index:e,initialSize:n,min:m(p.min)||f-m(d.max)||0,max:m(p.max)||f-m(d.min)||f},g={index:t,initialSize:r,min:m(d.min)||f-m(p.max)||0,max:m(d.max)||f-m(p.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(p.size)&&this.fixedSize(d.size)?(s=y(v,o),l=y(g,-o)):d.collapsible||this.fixedSize(d.size)?l=y(g,-o):s=y(v,o);var b=u.map((function(n,r){var o=c.getPaneProps(n);return r===e?Ke({},o,{size:s}):r===t?Ke({},o,{size:l}):Ke({},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 We(e,["orientation","overlay","containsSplitter"])},t.displayName="Splitter",t}(o.Component);!function(e){e.CIRCLE="circle",e.SQUARE="square",e.ROUNDED="rounded",e.RECTANGLE="rectangle"}(he||(he={})),function(e){e.TEXT="text",e.IMAGE="image",e.ICON="icon"}(me||(me={})),function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(ve||(ve={})),function(e){e.SOLID="solid",e.OUTLINE="outline"}(ge||(ge={})),function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error",e.DARK="dark",e.LIGHT="light",e.INVERSE="inverse",e.INHERIT="inherit"}(ye||(ye={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(be||(be={})),function(e){e.DEFAULT="default",e.primary="primary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(ke||(ke={})),function(e){e.START="start",e.CENTER="center",e.END="end",e.STRETCHED="stretched"}(we||(we={}));var qe=function(e){var t;return Object(a.v)(g),o.createElement("div",{dir:e.dir,style:e.style,className:Object(a.e)("k-card",e.className,(t={},t["k-card-"+e.type]=e.type!==ke.DEFAULT,t),e.orientation!==be.HORIZONTAL?"k-card-vertical":"k-card-horizontal")},e.children)};qe.propTypes={className:i.string,type:i.oneOf(["default","primary","info","success","warning","error"]),orientation:i.oneOf(["horizontal","vertical"])},qe.defaultProps={type:ke.DEFAULT,orientation:be.VERTICAL,dir:"ltr"};var Ge=function(e){return o.createElement("div",{style:e.style,className:Object(a.e)("k-card-header",e.className)},e.children)};Ge.propTypes={className:i.string};var Xe=function(e){return o.createElement("div",{style:e.style,className:Object(a.e)("k-card-title",e.className)},e.children)};Xe.propTypes={className:i.string};var Je=function(e){return o.createElement("div",{style:e.style,className:Object(a.e)("k-card-body",e.className)},e.children)};Je.propTypes={className:i.string};var Ye=function(e){return o.createElement("div",{style:e.style,className:Object(a.e)("k-card-actions",e.className,"k-card-actions-"+e.layout,e.orientation!==be.VERTICAL?"k-card-actions-horizontal":"k-card-actions-vertical")},e.children)};Ye.propTypes={layout:i.oneOf(["stretched","start","center","end"]),orientation:i.oneOf(["horizontal","vertical"])},Ye.defaultProps={layout:we.START,orientation:be.HORIZONTAL};var Ze=function(e){return o.createElement("img",{style:e.style,className:Object(a.e)("k-card-image",e.className),src:e.src})};Ze.propTypes={className:i.string,src:i.string},Ze.defaultProps={src:""};var Qe=function(e){return o.createElement("div",{style:e.style,className:Object(a.e)("k-card-subtitle",e.className)},e.children)};Qe.propTypes={className:i.string};var et=function(e){return o.createElement("div",{style:e.style,className:Object(a.e)("k-card-footer",e.className)},e.children)};et.propTypes={className:i.string};var tt=function(e){return Object(a.v)(g),o.createElement("div",{style:e.style,className:Object(a.e)("k-avatar","k-avatar-"+e.fill,"k-avatar-"+e.shape,"k-avatar-"+e.themeColor,{"k-avatar-bordered":e.border,"k-avatar-sm":"small"===e.size,"k-avatar-md":"medium"===e.size,"k-avatar-lg":"large"===e.size},e.className)},o.createElement("span",{className:"k-avatar-"+e.type},e.children))};tt.propTypes={className:i.string,shape:i.oneOf(["circle","square","rounded","rectangle"]),type:i.oneOf(["text","image","icon"]),fill:i.oneOf(["solid","outline"]),size:i.oneOf(["small","medium","large"]),themeColor:i.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse","inherit"])},tt.defaultProps={type:me.TEXT,shape:he.SQUARE,size:ve.MEDIUM,fill:ge.SOLID,themeColor:ye.PRIMARY};var nt=o.createContext({animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50}),rt=function(){return(rt=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)},ot=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},it=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,p=e.onSelect,d=e.index,f=e.tabIndex,h=e.children,m=ot(e,["className","style","text","icon","separator","disabled","selected","onSelect","index","tabIndex","children"]),v=o.useContext(nt),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.e)("k-drawer-item",{"k-state-selected":u,"k-state-disabled":c},n),O=o.useCallback((function(){if(p&&!c){var t={element:k.current,focus:w,props:e};p(t,d)}}),[p,d,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",rt({ref:k,className:C,style:r,role:"option","aria-selected":u,"aria-disabled":c,onClick:O,tabIndex:Object(a.k)(f,c)},m),b?h:x)}));it.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},it.displayName="KendoDrawerItem";var 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)},st={type:"slide",duration:200},lt={type:"slide",duration:0},ct=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useContext(nt),l=s.animation,c=s.expanded,u=s.mode,p=s.position,d=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?lt:st,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.e)({"k-drawer-start":"start"===p,"k-drawer-end":"end"===p},r)}),[p]),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"},D={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},_={transform:"translateX(0%)",WebkitTransitionDuration:(C&&C.duration)+"ms",transitionDuration:(C&&C.duration)+"ms"},M=c?"push"===u?E:I:"push"===u?N:"ltr"===h&&"start"===p||"rtl"===h&&"end"===p?f?_:T:f?_:D,P=g&&o.createElement("ul",{className:"k-drawer-items",role:"listbox",title:"drawer-list","aria-expanded":c},g.map((function(e,t){var n=at({index:t},e,{onSelect:b}),r=y||it;return o.createElement(r,at({key:t},n))}))),j=o.createElement("div",{style:C?at({},M,i):i,className:S,ref:k},o.createElement("div",{className:"k-drawer-wrapper",style:!c&&f&&"overlay"===u?{width:x}:{width:O}},P||n));return"overlay"===u?o.createElement(o.Fragment,null,c&&o.createElement("div",{className:"k-overlay",onClick:d}),j):j}));ct.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number},ct.displayName="KendoDrawerNavigation";var ut=o.forwardRef((function(e,t){Object(a.v)(g);var n=e.expanded,r=e.mode,i=e.position,s=e.className,l=e.children,c=e.style,u=e.animation,p=e.mini,d=e.width,f=e.miniWidth,h=e.items,m=e.item,v=e.tabIndex,y=e.onOverlayClick,b=e.onSelect,k=o.useRef(null),w=o.useCallback((function(){k.current&&k.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:k.current,focus:w}}));var C=o.useCallback((function(e,t){h&&b&&b.call(void 0,{itemTarget:e,itemIndex:t})}),[h,b]),O=Object(a.q)(k,e.dir),x=Object(a.e)({"k-drawer-container":!0,"k-drawer-expanded":n,"k-drawer-overlay":"overlay"===r,"k-drawer-push":"push"===r,"k-drawer-mini":p},s);return o.createElement(nt.Provider,{value:{animation:u,expanded:n,mode:r,position:i,mini:p,dir:O,items:h,item:m,width:d,miniWidth:f,onOverlayClick:y,onSelect:C}},o.createElement("div",{className:x,ref:k,dir:O,style:c,tabIndex:v},h&&o.createElement(ct,null),l))}));ut.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};ut.defaultProps={animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50},ut.displayName="KendoDrawer";var pt=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.e)({"k-drawer-content":!0},r);return o.createElement("div",{className:l,style:i,ref:s},n)}));pt.propTypes={children:i.any,className:i.string,style:i.object},pt.displayName="KendoDrawerContent";var dt,ft=o.createContext({linear:!1,mode:"steps",value:0}),ht=n(3),mt=((dt={})["stepper.optionalText"]="(Optional)",dt),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)},gt=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},yt=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,p=e.isValid,d=e.label,f=e.optional,h=e.style,m=e.tabIndex,v=e.text,g=gt(e,["children","className","current","disabled","focused","icon","index","isValid","label","optional","style","tabIndex","text"]),y=o.useContext(ft),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,D=o.useRef(null),_=o.useCallback((function(){D.current&&Object(a.i)(D.current)}),[]),M=o.useCallback((function(){return{element:D.current,focus:_}}),[_]);o.useImperativeHandle(t,M);var P,j=!C||u===S-1||u===S||u===S+1,R="labels"===O||Boolean(c)&&Boolean(d),A=Object(ht.useLocalization)(),F=(P="stepper.optionalText",A.toLanguageString(P,mt[P])),L="number"==typeof b?b:!1!==b?400:0,B=o.useCallback((function(e){N&&!s&&Object(a.g)(N,e,M(),{value:u})}),[N,S,s]),z=o.useCallback((function(e){T&&!s&&Object(a.g)(T,e,M(),void 0)}),[T,s]),V=o.useMemo((function(){return Object(a.e)("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!==p&&!p,"k-step-success":p},r)}),[u,x,S,i,f,s,l,p,r]),H=o.useMemo((function(){return vt({maxWidth:k?void 0:"calc(100% / "+x+")",pointerEvents:j?void 0:"none"},h)}),[k,x,h,j]),K=p?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:L+"ms"}},c?R||void 0===p?o.createElement("span",{className:"k-step-indicator-icon k-icon "+c}):W:void 0!==p?W:o.createElement("span",{className:"k-step-indicator-text"},v||u+1)):null),U=o.createElement("span",{className:"k-step-label"},d&&o.createElement("span",{className:"k-step-text"},d),R&&void 0!==p&&W,f&&o.createElement("span",{className:"k-step-label-optional"},F)),q=o.createElement(o.Fragment,null,$,U);return o.createElement("li",vt({ref:D,className:V,style:H},g),o.createElement("a",{className:"k-step-link",title:d||void 0,onClick:B,onFocus:z,tabIndex:m||(l?0:-1),"aria-current":i?"step":void 0,"aria-disabled":s||!j||void 0,"aria-invalid":void 0!==p&&!p||void 0},w?n:q))}));yt.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};yt.defaultProps={tabIndex:0},yt.displayName="KendoStep";var bt=function(e,t,n){var r=Math.abs((t-e)/100);return Math.abs((n-e)/r)},kt=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%")},wt={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493887,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"},Ct=function(){return(Ct=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)},Ot=o.forwardRef((function(e,t){Object(a.v)(wt);var n=e.chunkCount,r=void 0===n?xt.chunkCount:n,i=e.className,s=e.disabled,l=e.orientation,c=e.min,u=void 0===c?xt.min:c,p=e.max,d=void 0===p?xt.max:p,f=e.reverse,h=void 0===f?xt.reverse:f,m=e.style,v=e.tabIndex,g=e.emptyStyle,y=e.emptyClassName,b=e.progressStyle,k=e.progressClassName,w=o.useRef(null),C=o.useCallback((function(){w.current&&w.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:w.current,focus:C}}));var O=e.value||xt.value,x=null===e.value,S=Object(a.u)(w,e.dir),E="vertical"===l,I={className:Object(a.e)("k-widget k-progressbar",{"k-progressbar-horizontal":!E,"k-progressbar-vertical":E,"k-progressbar-reverse":h,"k-progressbar-indeterminate":x,"k-state-disabled":s},i),ref:w,dir:S,tabIndex:Object(a.k)(v,s),role:"progressbar","aria-valuemin":u,"aria-valuemax":d,"aria-valuenow":x?void 0:O,"aria-disabled":s,style:m};return o.createElement("div",Ct({},I),o.createElement("ul",{className:"k-reset"},o.createElement((function(e){for(var t=e.count,n=[],r=100/t+"%",i=function(e,t,n){return Math.max((n-e)/(t-e),1e-5)}(u,d,O),s=Math.floor(i*t),l=Array(t).fill(!1),c=E&&!h||!E&&h,p=0;p<s;p++)l[p]=!0;c&&l.reverse();for(p=0;p<t;++p){var f=l[p],m=f?k:y,v=Ct({},{width:E?void 0:r,height:E?r:void 0},f?b:g);n.push(o.createElement("li",{key:p,className:Object(a.e)("k-item",{"k-first":0===p,"k-last":p===t-1,"k-state-selected":f},m),style:v}))}return o.createElement(o.Fragment,null,n)}),{count:r||xt.chunkCount})))}));Ot.propTypes={chunkCount:i.number,disabled:i.bool,reverse:i.bool,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 xt={chunkCount:5,min:0,max:100,value:0,disabled:!1,reverse:!1};Ot.defaultProps=xt,Ot.displayName="KendoChunkProgressBar";var St=function(){return(St=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)},Et=o.forwardRef((function(e,t){Object(a.v)(wt);var n=e.animation,r=e.disabled,i=e.reverse,s=void 0===i?It.reverse:i,l=e.orientation,c=e.labelVisible,u=e.labelPlacement,p=e.max,d=void 0===p?It.max:p,h=e.min,m=void 0===h?It.min:h,v=e.tabIndex,g=e.className,y=e.style,b=e.emptyStyle,k=e.emptyClassName,w=e.progressStyle,C=e.progressClassName,O=o.useRef(null),x=o.useRef(null),S=o.useRef(null),E=o.useCallback((function(){O.current&&O.current.focus()}),[]);o.useImperativeHandle(t,(function(){return{element:O.current,progressStatusElement:x.current,progressStatusWrapElement:S.current,focus:E}}));var I=e.value||It.value,N=function(e){var t=o.useRef();return o.useEffect((function(){t.current=e})),t.current}(I),T=null===e.value,D=Object(a.u)(O,e.dir),_="vertical"===l,M=function(e){var t=e.toString().split(".");return 1===t.length?""+t[0]:t[0]+"."+t[1].substr(0,3)}(I),P={value:I},j=c?e.label?o.createElement("span",{className:"k-progress-status"},o.createElement(e.label,St({},P))):o.createElement("span",{className:"k-progress-status"},M):void 0,R={className:Object(a.e)("k-widget k-progressbar",{"k-progressbar-horizontal":!_,"k-progressbar-vertical":_,"k-progressbar-reverse":s,"k-progressbar-indeterminate":T,"k-state-disabled":r},g),ref:O,dir:D,tabIndex:Object(a.k)(v,r),role:"progressbar","aria-valuemin":m,"aria-valuemax":d,"aria-valuenow":T?void 0:I,"aria-disabled":r,style:y},A=Object(a.e)("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,L=o.useCallback((function(){var e=bt(m,d,N);kt(x,S,e,_)}),[_,d,m,N]),B=o.useCallback((function(e){var t=bt(m,d,N+(I-N)*e);kt(x,S,t,_)}),[m,d,N,I,_]),z=o.useCallback((function(){var e=bt(m,d,I);kt(x,S,e,_)}),[_,d,m,I]);return Object(f.c)({duration:F,onStart:L,onUpdate:B,onEnd:z},[I,F]),o.createElement("div",St({},R),o.createElement("span",{className:A+(k?" "+k:""),style:b},j),o.createElement("div",{className:"k-state-selected",style:w,ref:x},o.createElement("span",{className:A+(C?" "+C:""),ref:S},j)))}));Et.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 It={animation:!1,min:0,max:100,value:0,disabled:!1,reverse:!1,labelVisible:!0};Et.defaultProps=It,Et.displayName="KendoProgressBar";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=o.forwardRef((function(e,t){Object(a.v)(g);var n=e.animationDuration,r=e.children,i=e.className,s=e.disabled,l=e.errorIcon,c=e.item,u=e.items,p=e.linear,d=e.mode,f=e.orientation,h=e.style,m=e.successIcon,v=e.onChange,y=e.onFocus,b=o.useRef(null),k=o.useCallback((function(){b.current&&Object(a.i)(b.current)}),[]),w=o.useCallback((function(){return{element:b.current,focus:k}}),[k]);o.useImperativeHandle(t,w);var C=e.value||Dt.value,O=o.useState(C),x=O[0],S=O[1],E=u?u.length:0,I="vertical"===f,N=Object(a.u)(b,e.dir),T="number"==typeof n?n:!1!==n?400:0,D=o.useCallback((function(e,t){C!==t&&v&&!s&&(!p||t===C-1||t===C||t===C+1)&&(Object(a.g)(v,e,w(),{value:t}),S(t))}),[C,p,v,s,S]),_=o.useCallback((function(e){var t=e.value,n=e.syntheticEvent;D(n,t)}),[D]),M=o.useCallback((function(e){y&&!s&&Object(a.g)(y,e.syntheticEvent,w(),void 0)}),[y,s]),P=o.useCallback((function(e){D(e,x)}),[D,x]),j=o.useCallback((function(e){var t="rtl"===N,n=x,r=u.length-1;switch(e.keyCode){case a.b.left:e.preventDefault(),!t&&n>0&&S(n-1),t&&n<r&&S(n+1);break;case a.b.right:e.preventDefault(),!t&&n<r&&S(n+1),t&&n>0&&S(n-1);break;case a.b.up:e.preventDefault(),!t&&n>0&&S(n-1),t&&n>0&&S(n-1);break;case a.b.down:e.preventDefault(),!t&&n<r&&S(n+1),t&&n<r&&S(n+1);break;case a.b.home:e.preventDefault(),S(0);break;case a.b.end:e.preventDefault(),S(r);break;case a.b.space:case a.b.enter:e.preventDefault(),u[n].disabled||P(e)}}),[u,S,x,N,P]),R=o.useMemo((function(){return Object(a.e)("k-stepper",{"k-stepper-linear":p},i)}),[p,i]),A=o.useMemo((function(){return Nt({display:"grid",gridTemplateColumns:I?void 0:"repeat("+2*E+", 1fr)",gridTemplateRows:I?"repeat("+4*E+", 1fr)":void 0},h)}),[I,E,h]),F=o.useMemo((function(){return Object(a.e)("k-step-list",{"k-step-list-horizontal":!I,"k-step-list-vertical":I})}),[I]),L=o.useMemo((function(){return{gridColumnStart:I?void 0:1,gridColumnEnd:I?void 0:-1,gridRowStart:I?1:void 0,gridRowEnd:I?-1:void 0}}),[I]),B=o.useMemo((function(){return{gridColumnStart:I?void 0:2,gridColumnEnd:I?void 0:2*E,gridRowStart:I?2:void 0,gridRowEnd:I?4*E-2:void 0}}),[I,E]),z=u&&u.map((function(e,t){var n=Nt({index:t,disabled:s||e.disabled,focused:t===x,current:t===C},e),r=c||yt;return o.createElement(r,Nt({key:t},n))}));return o.createElement(ft.Provider,{value:{animationDuration:n,isVertical:I,item:c,linear:p,mode:d,numOfSteps:E,value:C,successIcon:m,errorIcon:l,onChange:_,onFocus:M}},o.createElement("nav",{className:R,style:A,dir:N,onKeyDown:j},o.createElement("ol",{className:F,style:L},z||r),o.createElement(Et,{style:B,animation:{duration:T},"aria-hidden":!0,max:E-1,labelVisible:!1,orientation:f,reverse:"vertical"===f,value:C,disabled:s,tabIndex:-1})))}));Tt.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 Dt={value:0};Tt.defaultProps=Dt,Tt.displayName="KendoStepper";var _t=o.forwardRef((function(e,t){Object(a.v)(g);var n=e.children,r=e.className,i=e.style,s=e.id,l=o.useRef(null),c=o.useCallback((function(){l.current&&Object(a.i)(l.current)}),[]),u=o.useCallback((function(){return{element:l.current,focus:c}}),[c]);o.useImperativeHandle(t,u);var p=o.useMemo((function(){return Object(a.m)()}),[]),d=o.useMemo((function(){return e.themeColor||Mt.themeColor}),[e.themeColor]),f=o.useMemo((function(){return e.position||Mt.position}),[e.position]),h=o.useMemo((function(){return e.positionMode||Mt.positionMode}),[e.positionMode]),m=o.useMemo((function(){return Object(a.e)("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"===d,"k-appbar-dark":"dark"===d,"k-appbar-inherit":"inherit"===d},r)}),[f,h,d,r]);return o.createElement("div",{className:m,style:i,id:s||p},n)}));_t.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 Mt={themeColor:"light",position:"top",positionMode:"static"};_t.displayName="KendoAppBar";var Pt=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(a.i)(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.e)("k-appbar-section",r)}),[r]);return o.createElement("div",{className:u,style:i},n)}));Pt.propTypes={children:i.any,className:i.string,style:i.object},Pt.displayName="KendoAppBarSection";var jt=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(a.i)(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.e)("k-appbar-spacer",{"k-appbar-spacer-sized":i&&i.width&&null!==i.width},r)}),[r,i]),p=o.useMemo((function(){return{flexBasis:i&&i.width?i.width:void 0}}),[i]);return o.createElement("span",{className:u,style:p},n)}));jt.propTypes={children:i.any,className:i.string,style:i.object},jt.displayName="KendoAppBarSpacer";var 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){return o.createElement(a.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:At({bottom:0,right:0},e.style)}))},Lt=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 Rt(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(Ft,{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(Ft,{onPress:n,onResize:this.handleResize,d:"ns",style:{left:0,height:9}}),!0===t&&o.createElement(Ft,{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),Bt=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)}}(),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)},Vt=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 Bt(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=zt({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.e)("k-tilelayout-item k-card",{"k-cursor-grab":this.reorderable},this.props.className),style:zt({height:"100%"},this.props.style)},this.props.children,o.createElement(Lt,{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(a.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),Ht=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)}}(),Kt=function(){return(Kt=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)},Wt={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"},$t=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 s=!1,l=t.state.positions.map((function(e){return Object.assign({},e)})),c=l[e],u=l.find((function(e){return e.order===c.order+n}));u&&u!==c&&(c.order+=n,u.order+=-n,s=!0);var p=c.col+r;0!==r&&p>=1&&p+c.colSpan<=(t.props.columns||3)+1&&(c.col=p,s=!0);var d=c.colSpan+i;i&&d>=1&&d+c.col<=(t.props.columns||3)+1&&(c.colSpan=d,s=!0);var f=c.rowSpan+o;o&&f>=1&&(c.rowSpan=f,s=!0),s&&(t.setState({positions:l}),Object(a.g)(t.props.onReposition,{},t,{value:l}))}},t}return Ht(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,p=void 0===u?"1fr":u,d=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=Kt({gridTemplateColumns:"repeat("+i+", minmax(0px, "+("number"==typeof l?l+"px":l)+"))",gridAutoRows:"minmax(0px, "+("number"==typeof p?p+"px":p)+")",gap:g,padding:g},d);return o.createElement("div",{ref:function(t){e._element=t},dir:this.props.dir,className:Object(a.e)("k-tilelayout",Wt[h],n),style:y,id:this.props.id,children:v.map((function(t,n){return o.createElement(Vt,{key:e.props.dataItemKey?Object(a.l)(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),Ut={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"},qt={flat:"k-bottom-nav-flat",solid:"k-bottom-nav-solid"},Gt={vertical:"k-bottom-nav-item-flow-vertical",horizontal:"k-bottom-nav-item-flow-horizontal"},Xt={fixed:"k-pos-fixed",sticky:"k-pos-sticky"},Jt=o.forwardRef((function(e,t){Object(a.v)(g);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,p=e.dataItem,d=e.icon,f=e.text,h=e.id,m=e.onSelect,v=e.onKeyDown,y=e.index,b=e.tabIndex,k=o.useMemo((function(){return Object(a.e)("k-bottom-nav-item",{"k-state-selected":s,"k-state-disabled":l},r)}),[s,l,r]),w=o.useCallback((function(e){m&&void 0!==y&&!l&&m(e,y)}),[m,y,l]),C=o.useCallback((function(e){v&&void 0!==y&&!l&&v(e,y)}),[v,y,l]),O=u,x=c,S=o.createElement("span",{ref:n,className:k,style:i,role:"link",id:h,tabIndex:b,onClick:w,onKeyDown:C,"aria-selected":s,"aria-disabled":l},x?o.createElement(x,{itemIndex:y,item:p}):o.createElement(o.Fragment,null,d&&o.createElement("span",{className:"k-bottom-nav-item-icon k-icon k-i-"+d}),f&&o.createElement("span",{className:"k-bottom-nav-item-text",style:{userSelect:"none"}},f)));return void 0!==O?O.call(void 0,S,e):S}));Jt.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},Jt.defaultProps={tabIndex:0},Jt.displayName="KendoReactBottomNavigationItem";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)},Zt=o.forwardRef((function(e,t){Object(a.v)(g);var n=o.useRef(null),r=o.useCallback((function(){n.current&&Object(a.i)(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?Qt.themeColor:s,c=e.fill,u=void 0===c?Qt.fill:c,p=e.positionMode,d=void 0===p?Qt.positionMode:p,f=e.itemFlow,h=void 0===f?Qt.itemFlow:f,m=e.border,v=void 0===m?Qt.border:m,y=e.className,b=e.items,k=e.item,w=e.itemRender,C=e.disabled,O=e.style,x=e.id,S=e.onSelect,E=e.onKeyDown,I=o.useMemo((function(){return Object(a.m)()}),[]),N=Object(a.q)(n,e.dir),T=o.useMemo((function(){return Object(a.e)("k-bottom-nav",Xt[d],Ut[l],qt[u],Gt[h],{"k-bottom-nav-border":v,"k-state-disabled":C},y)}),[d,l,u,h,v,C,y]),D=o.useCallback((function(e,t){b&&!b[t].disabled&&S&&Object(a.g)(S,e,i(),{itemTarget:b[t],itemIndex:t})}),[b,S]),_=o.useCallback((function(e,t){D(e,t)}),[D]),M=o.useCallback((function(e,t){switch(e.keyCode){case a.b.enter:case a.b.space:D(e,t),e.preventDefault()}Object(a.g)(E,e,i(),void 0)}),[D,E]);return o.createElement("nav",{ref:n,className:T,style:O,id:x||I,dir:N},b&&b.map((function(e,t){return o.createElement(Jt,Yt({},e,{key:t,index:t,id:(x||I)+"-"+t,disabled:C||e.disabled,selected:e.selected,dataItem:e,item:k,render:w,onSelect:_,onKeyDown:M}))})))})),Qt={themeColor:"primary",fill:"flat",itemFlow:"vertical",positionMode:"fixed",border:!0};Zt.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},Zt.defaultProps=Qt,Zt.displayName="KendoReactBottomNavigation";var en=n(6),tn=function(){return(tn=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)},nn=o.forwardRef((function(e,t){Object(en.validatePackage)(g);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(a.m)()}),[]),p=o.useMemo((function(){return e.orientation||rn.orientation}),[e.orientation]),d="horizontal"===p,f=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:rn.hAlign}),[e.align]),h=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:rn.vAlign}),[e.align]),m=o.useMemo((function(){return Object(a.e)("k-stack-layout",{"k-hstack":"horizontal"===p,"k-vstack":"vertical"===p,"k-justify-content-start":d&&"start"===f||!d&&"top"===h,"k-justify-content-center":d&&"center"===f||!d&&"middle"===h,"k-justify-content-end":d&&"end"===f||!d&&"bottom"===h,"k-justify-content-stretch":d&&"stretch"===f||!d&&"stretch"===h,"k-align-items-start":!d&&"start"===f||d&&"top"===h,"k-align-items-center":!d&&"center"===f||d&&"middle"===h,"k-align-items-end":!d&&"end"===f||d&&"bottom"===h,"k-align-items-stretch":!d&&"stretch"===f||d&&"stretch"===h},i)}),[p,d,f,h,i]),v=tn({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)})),rn={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};nn.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"])})},nn.defaultProps=rn,nn.displayName="KendoReactStackLayout";var on=function(){return(on=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)},an=o.forwardRef((function(e,t){Object(en.validatePackage)(g);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,p=o.useMemo((function(){return Object(a.m)()}),[]),d=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:sn.hAlign}),[e.align]),f=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:sn.vAlign}),[e.align]),h=o.useMemo((function(){return Object(a.e)("k-grid-layout",{"k-justify-items-start":"start"===d,"k-justify-items-center":"center"===d,"k-justify-items-end":"end"===d,"k-justify-items-stretch":"stretch"===d,"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)}),[d,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(" "),y=e.cols&&e.cols.map((function(e){return""+("number"==typeof e.width?e.width+"px":e.width)})).join(" "),b=on({gap:m,gridTemplateColumns:y,gridTemplateRows:v},s);return o.createElement("div",{ref:n,className:h,style:b,id:l||p},c)})),sn={hAlign:"stretch",vAlign:"stretch",gap:void 0};an.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"])})},an.defaultProps=sn,an.displayName="KendoReactGridLayout";var ln=function(){return(ln=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)},cn=o.forwardRef((function(e,t){Object(en.validatePackage)(g);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.row,p=e.col,d=e.rowSpan,f=e.colSpan,h=o.useMemo((function(){return Object(a.m)()}),[]),m=ln({gridArea:(u||"auto")+" / "+(p||"auto")+" / "+(d?"span "+d:"auto")+" / "+(f?"span "+f:"auto")},s);return o.createElement("div",{ref:n,className:i,style:m,id:l||h},c)}));cn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string},cn.displayName="KendoReactGridLayoutItem";var un=o.forwardRef((function(e,t){Object(en.validatePackage)(g);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.e)("k-flex-none k-breadcrumb-item",e.className)},e.children)})),pn={id:i.string,className:i.string,children:i.any,style:i.object};un.displayName="KendoReactBreadcrumbListItem",un.propTypes=pn;var dn=o.forwardRef((function(e,t){Object(en.validatePackage)(g);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.e)("k-icon k-i-arrow-chevron-right k-breadcrumb-delimiter-icon",e.className)})})),fn={id:i.string,className:i.string,style:i.object,tabIndex:i.number};dn.displayName="KendoReactBreadcrumbDelimiter",dn.propTypes=fn;var hn=o.forwardRef((function(e,t){Object(en.validatePackage)(g);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){n.current&&t.target.id&&Object(a.g)(e.onItemSelect,t,t.target,{id:t.target.id})}),[e.onItemSelect]),l=o.useCallback((function(t){n.current&&t.target.id&&Object(a.g)(e.onKeyDown,t,t.target,{id:t.target.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(a.q)(r,e.dir),tabIndex:Object(a.k)(e.tabIndex,e.disabled),className:Object(a.e)("k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link",{"k-state-disabled":e.disabled}),onClick:s,onKeyDown:l},e.iconClass?o.createElement("span",{className:Object(a.e)("k-icon",e.iconClass)}):e.icon?e.icon:"",e.text)})),mn={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};hn.displayName="KendoReactBreadcrumbLink",hn.propTypes=mn;var vn=o.forwardRef((function(e,t){Object(en.validatePackage)(g);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(a.q)(r,e.dir),tabIndex:Object(a.k)(e.tabIndex,e.disabled),className:Object(a.e)("k-breadcrumb-container k-flex-wrap",{"k-state-disabled":e.disabled},e.className)},e.children)})),gn={id:i.string,className:i.string,children:i.element,tabIndex:i.number,style:i.object,dir:i.string,disabled:i.bool};vn.displayName="KendoReactBreadcrumbOrderedList",vn.propTypes=gn;var yn=function(){return(yn=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)},bn=o.forwardRef((function(e,t){Object(en.validatePackage)(g);var n=o.useRef(null),r=o.useRef(null),i=o.useMemo((function(){return e.breadcrumbOrderedList||vn}),[e.breadcrumbOrderedList]),s=o.useMemo((function(){return e.breadcrumbListItem||un}),[e.breadcrumbListItem]),l=o.useMemo((function(){return e.breadcrumbDelimiter||dn}),[e.breadcrumbDelimiter]),c=o.useMemo((function(){return e.breadcrumbLink||hn}),[e.breadcrumbLink]),u=o.useCallback((function(){r.current&&r.current.focus()}),[r]),p=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 d=Object(a.q)(r,e.dir),f=function(t){n.current&&Object(a.g)(e.onItemSelect,t,t.target,{id:t.target.id})},h=function(t){n.current&&Object(a.g)(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:d,className:Object(a.e)("k-breadcrumb",{"k-rtl":"rtl"===d,"k-state-disabled":p},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||wn.valueField]},"0"!==t&&o.createElement(l,null),o.createElement(c,yn({isLast:e.data.length-1===Number(t),id:e.data[t][e.valueField||wn.valueField],icon:e.data[t][e.iconField||wn.iconField],iconClass:e.data[t][e.iconClassField||wn.iconClassField],text:e.data[t][e.textField||wn.textField],disabled:e.data[t].disabled||!1,onItemSelect:f,onKeyDown:h},e)))})))))})),kn={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},wn={valueField:"id",textField:"text",iconField:"icon",iconClassField:"iconClass"};bn.displayName="KendoReactBreadcrumb",bn.propTypes=kn,bn.defaultProps=wn},function(e,t,n){"use strict";n.r(t),n.d(t,"ColorGradient",(function(){return V})),n.d(t,"ColorGradientPropsContext",(function(){return z})),n.d(t,"ColorPalette",(function(){return q})),n.d(t,"ColorPalettePropsContext",(function(){return U})),n.d(t,"ColorPickerPropsContext",(function(){return ee})),n.d(t,"ColorPicker",(function(){return te})),n.d(t,"FlatColorPicker",(function(){return ne})),n.d(t,"Input",(function(){return pe})),n.d(t,"InputPropsContext",(function(){return ue})),n.d(t,"MaskedTextBox",(function(){return Te})),n.d(t,"MaskedTextBoxPropsContext",(function(){return Ne})),n.d(t,"NumericTextBoxPropsContext",(function(){return Ze})),n.d(t,"NumericTextBox",(function(){return Qe})),n.d(t,"Slider",(function(){return st})),n.d(t,"SliderPropsContext",(function(){return at})),n.d(t,"SLIDER_LABEL_ATTRIBUTE",(function(){return tt})),n.d(t,"SliderLabel",(function(){return nt})),n.d(t,"RangeSliderPropsContext",(function(){return dt})),n.d(t,"RangeSlider",(function(){return ft})),n.d(t,"Switch",(function(){return kt})),n.d(t,"SwitchPropsContext",(function(){return bt})),n.d(t,"CheckboxPropsContext",(function(){return Ot})),n.d(t,"Checkbox",(function(){return xt})),n.d(t,"RadioGroupPropsContext",(function(){return Dt})),n.d(t,"RadioGroup",(function(){return _t})),n.d(t,"RadioButtonPropsContext",(function(){return It})),n.d(t,"RadioButton",(function(){return Nt})),n.d(t,"TextAreaPropsContext",(function(){return Rt})),n.d(t,"TextArea",(function(){return At})),n.d(t,"RatingPropsContext",(function(){return qt})),n.d(t,"Rating",(function(){return Gt})),n.d(t,"RatingItem",(function(){return Ft}));var r=n(0),o=n(1),i=n(2),a={name:"@progress/kendo-react-inputs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493726,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(e){return null!=e},l=function(e,t,n){return!s(e)||isNaN(e)||e<=t?t:e>=n?n:e},c=n(11),u=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(s(e)){var r=Object(c.parseColor)(e.trim(),n);if(s(r))return"hex"===t?r.toCss():r.toCssRgba()}},p=function(e,t){void 0===t&&(t=!0);var n=Object(c.parseColor)(e,t);return s(n)?n.toHSV():{}},d=function(e,t){void 0===t&&(t=!0);var n=Object(c.parseColor)(e,t);return s(n)?n.toBytes():{}},f=function(e){var t=l(e.h,0,359.9),n=l(e.s,0,1),r=l(e.v,0,1),o=l(e.a,0,1);return c.Color.fromHSV(t,n,r,o).toCssRgba()},h=function(e){return f({h:e,s:1,v:1,a:1})},m=function(e,t){var n=l(e.r,0,255),r=l(e.g,0,255),o=l(e.b,0,255),i=l(e.a,0,1),a=l(t.r,0,255),s=l(t.g,0,255),c=l(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)*c+i*o)}},v=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]},g=function(e,t){return n=v(m(e,t)),r=v(m(t,{r:0,g:0,b:0,a:1})),(Math.max(n,r)+.05)/(Math.min(n,r)+.05);var n,r},y={};var b,k,w=(b=function(e,t){return(b=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}b(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=function(e){var t=e.target.value,r=u(t,"rgba");n.setState({hex:t}),s(r)&&n.props.onHexChange(t,r,e)},n.onBlur=function(){s(u(n.state.hex,"rgba"))||n.setState({hex:n.state.originalHex})},n.state={hex:n.props.hex,originalHex:n.props.hex},n}return w(t,e),t.prototype.render=function(){return r.createElement("input",{value:this.state.hex,className:"k-input",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}(r.Component),O=n(4),x=n(8),S=n(3),E=((k={})["numerictextbox.increment"]="Increase value",k["numerictextbox.decrement"]="Decrease value",k["slider.increment"]="Increase",k["slider.decrement"]="Decrease",k["slider.dragTitle"]="Drag",k["colorGradient.r"]="r",k["colorGradient.g"]="g",k["colorGradient.b"]="b",k["colorGradient.a"]="a",k["colorGradient.hex"]="hex",k["colorGradient.contrastRatio"]="Contrast ratio",k["colorGradient.colorGradientAALevel"]="AA",k["colorGradient.colorGradientAAALevel"]="AAA",k["colorGradient.colorGradientPass"]="Pass",k["colorGradient.colorGradientFail"]="Fail",k["flatColorPicker.cancelBtn"]="Cancel",k["flatColorPicker.applyBtn"]="Apply",k["checkbox.validation"]="Please check this box if you want to proceed!",k["checkbox.optionalText"]="(Optional)",k["radioButton.validation"]="Please select option if you want to proceed!",k["switch.validation"]="Please turn on if you want to proceed!",k),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=["rgba","rgb","hex"],D=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={inputMode:T[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 I(t,e),t.prototype.render=function(){var e=Object(S.provideLocalizationService)(this),t=e.toLanguageString("colorGradient.r",E["colorGradient.hex"]),n=e.toLanguageString("colorGradient.r",E["colorGradient.r"]),o=e.toLanguageString("colorGradient.r",E["colorGradient.g"]),i=e.toLanguageString("colorGradient.r",E["colorGradient.b"]),a=e.toLanguageString("colorGradient.r",E["colorGradient.a"]);return r.createElement("div",{className:"k-colorgradient-inputs k-hstack"},r.createElement("div",{className:"k-vstack"},r.createElement(O.Button,{look:"flat",icon:"arrows-kpi",className:"k-colorgradient-toggle-mode k-icon-button",onClick:this.onToggleModeChange.bind(this)})),"hex"===this.state.inputMode&&r.createElement("div",{className:"k-vstack k-flex-1"},r.createElement("span",{className:"k-hex-value k-textbox"},r.createElement(C,{hex:this.props.hex,onHexChange:this.props.onHexChange,disabled:this.props.disabled})),r.createElement(x.b,{className:"k-colorgradient-input-label"},t)),("rgb"===this.state.inputMode||"rgba"===this.state.inputMode)&&r.createElement(r.Fragment,null,r.createElement("div",{className:"k-vstack"},r.createElement(Qe,{value:this.props.rgba.r,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaRChange,disabled:this.props.disabled}),r.createElement(x.b,{className:"k-colorgradient-input-label"},n)),r.createElement("div",{className:"k-vstack"},r.createElement(Qe,{value:this.props.rgba.g,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaGChange,disabled:this.props.disabled}),r.createElement(x.b,{className:"k-colorgradient-input-label"},o)),r.createElement("div",{className:"k-vstack"},r.createElement(Qe,{value:this.props.rgba.b,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaBChange,disabled:this.props.disabled}),r.createElement(x.b,{className:"k-colorgradient-input-label"},i))),"rgba"===this.state.inputMode&&r.createElement("div",{className:"k-vstack"},this.props.opacity&&r.createElement(Qe,{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&&r.createElement(x.b,{className:"k-colorgradient-input-label"},a)))},t.prototype.dispatchRgbaChange=function(e,t){var n=N({},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=T.length-1===T.indexOf(this.state.inputMode)?0:T.indexOf(this.state.inputMode)+1;if(this.props.opacity)this.setState({inputMode:T[e]});else{var t="rgba"===T[e]?e+1:e;this.setState({inputMode:T[t]})}},t}(r.Component),_=D;Object(S.registerForIntl)(D),Object(S.registerForLocalization)(D);var M=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){function t(){return null!==e&&e.apply(this,arguments)||this}return M(t,e),t.prototype.render=function(){var e=Object(S.provideLocalizationService)(this),t=e.toLanguageString("colorGradient.contrastRatio",E["colorGradient.contrastRatio"]),n=e.toLanguageString("colorGradient.colorGradientAALevel",E["colorGradient.colorGradientAALevel"]),o=e.toLanguageString("colorGradient.colorGradientAAALevel",E["colorGradient.colorGradientAAALevel"]),i=e.toLanguageString("colorGradient.colorGradientPass",E["colorGradient.colorGradientPass"]),a=e.toLanguageString("colorGradient.colorGradientFail",E["colorGradient.colorGradientFail"]),s=g(this.props.rgba,this.props.bgColor),l=4.5.toFixed(1),c=7..toFixed(1),u=t+": "+s.toFixed(2),p=n+": "+l,d=o+": "+c,f=r.createElement("span",{className:"k-contrast-validation k-text-success"},i," ",r.createElement("span",{className:"k-icon k-i-check"})),h=r.createElement("span",{className:"k-contrast-validation k-text-error"},a," ",r.createElement("span",{className:"k-icon k-i-close"}));return r.createElement("div",{className:"k-vbox k-colorgradient-color-contrast"},r.createElement("div",{className:"k-contrast-ratio"},r.createElement("span",{className:"k-contrast-ratio-text"},u),s>=4.5?r.createElement("span",{className:"k-contrast-validation k-text-success"},r.createElement("span",{className:"k-icon k-i-check"}),s>=7&&r.createElement("span",{className:"k-icon k-i-check"})):r.createElement("span",{className:"k-contrast-validation k-text-error"},r.createElement("span",{className:"k-icon k-i-close"}))),r.createElement("div",null,r.createElement("span",null,p),s>=4.5?f:h),r.createElement("div",null,r.createElement("span",null,d),s>=7?f:h))},t}(r.Component);Object(S.registerForLocalization)(P);var j=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"/>'},R=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)}},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.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=g(d(f(c)),d(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=R,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 j(i(4.5,16),a)+j(i(4.5,16,!0),a)+j(i(7,16),a)+j(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 r.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}(r.Component),L=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)}}(),B=function(e){function t(n){var r=e.call(this,n)||this;r.onHexChange=function(e,t,n){if(r.isUncontrolled){var o=p(t);r.setState({hsva:o,backgroundColor:h(o.h),rgba:d(t),hex:e})}else!function(e,t,n){y[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=l(e.r,0,255),n=l(e.g,0,255),r=l(e.b,0,255),o=l(e.a,0,1);return c.Color.fromBytes(t,n,r,o).toCssRgba()}(e);if(r.isUncontrolled){var o=p(n),i=u(n,"hex");r.setState({hsva:o,backgroundColor:h(o.h),rgba:e,hex:i})}else!function(e,t,n){y[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=l(n,0,t.width),a=l(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(i.i)(r.wrapper)},Object(i.v)(a);var o=n.value||n.defaultValue||u("rgba(255, 255, 255, 1)","rgba");return r.state=Object.assign({},t.getStateFromValue(o),{isFirstRender:!0,guid:Object(i.m)()}),r}return L(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 y[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,o=this.state.hsva.s*t.width;e.top=n+"px",e.left=o+"px"}return r.createElement("div",{className:"k-hsv-draghandle k-draghandle",style:e})},t.prototype.handleHsvaChange=function(e,t,n){var r=f(e);if(this.isUncontrolled){var o=u(r,"hex");this.setState({hsva:e,backgroundColor:h(e.h),rgba:d(r),hex:o})}else!function(e,t,n){y[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){s(u(e,"hex"))||(e="rgba(255, 255, 255, 1)");var n=function(e,t){if(e){var n=y[e];return n&&n.value===t?n.hsva:void 0}}(t,e)||p(e),r=function(e,t){if(e){var n=y[e];return n&&n.value===t?n.rgba:void 0}}(t,e)||d(e),o=function(e,t){if(e){var n=y[e];return n&&n.value===t?n.hex:void 0}}(t,e)||u(e,"hex");return{hsva:n,backgroundColor:h(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(i.e)("k-colorgradient",{"k-state-disabled":this.props.disabled});return r.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(i.k)(this.props.tabIndex,this.props.disabled),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,onFocus:this.onFocus},r.createElement("div",{className:"k-colorgradient-canvas k-hstack"},r.createElement("div",{className:"k-hsv-rectangle",style:{background:this.state.backgroundColor}},r.createElement(i.a,{onDrag:this.onDrag,onRelease:this.onRelease,ref:function(t){return e.gradientWrapper=t?t.element:void 0}},r.createElement("div",{className:"k-hsv-gradient",style:{touchAction:"none"},onClick:this.onGradientWrapperClick},this.renderRectangleDragHandle())),this.props.backgroundColor&&!this.state.isFirstRender&&r.createElement(F,{metrics:this.gradientWrapper?this.getGradientRectMetrics():void 0,hsva:this.state.hsva,backgroundColor:this.props.backgroundColor})),r.createElement("div",{className:"k-hsv-controls k-hstack"},r.createElement(st,{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&&r.createElement(st,{value:s(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}}))),r.createElement(_,{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&&r.createElement(P,{bgColor:d(this.props.backgroundColor),rgba:this.state.rgba}))},t.displayName="ColorGradient",t.propTypes={defaultValue:o.string,value:o.string,onChange:o.func,onFocus:o.func,opacity:o.bool,backgroundColor:o.string,disabled:o.bool,style:o.any,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string},t.defaultProps={opacity:!0},t}(r.Component),z=Object(i.f)(),V=Object(i.w)(z,B);V.displayName="KendoReactColorGradient";var H=function(){function e(){this.colorRows=[]}return e.prototype.setColorMatrix=function(e,t){if(this.colorRows=[],s(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(s(e)){var n=e?Object(c.parseColor)(e,!0):e,r=[e];s(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 l=o(a);if("object"==typeof l)return l.value}}},e.prototype.getColorAt=function(e){if(s(e)&&s(this.colorRows[e.row]))return this.colorRows[e.row][e.col]},e.prototype.getNextCell=function(e,t,n){if(!(s(e)&&s(e.row)&&s(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}(),K={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}},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)}}(),$=function(e){function t(t){var n=e.call(this,t)||this;return n.wrapper=null,n.guid=Object(i.m)(),n.focus=function(){n.wrapper&&n.wrapper.focus()},n.onKeyDown=function(e){switch(e.keyCode){case i.b.down:n.handleCellNavigation(0,1);break;case i.b.up:n.handleCellNavigation(0,-1);break;case i.b.right:n.handleCellNavigation(1,0);break;case i.b.left:n.handleCellNavigation(-1,0);break;case i.b.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(i.v)(a),n.state={selectedColor:void 0!==n.props.value?n.props.value:n.props.defaultValue,isFirstRender:!0},n}return W(t,e),t.prototype.render=function(){var e=this,t=this.getPaletteInfo(),n=this.paletteService=new H;n.setColorMatrix(t.colors,t.columns);var o=n.getCellCoordsFor(this.state.selectedColor),a=n.getCellCoordsFor(this.state.focusedColor),s=Object(i.e)("k-colorpalette",{"k-state-disabled":this.props.disabled});return t.colors.length?r.createElement("div",{id:this.props.id,className:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,"aria-disabled":this.props.disabled?"true":void 0,"aria-activedescendant":o&&this.createCellId(o),"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,tabIndex:Object(i.k)(this.props.tabIndex,this.props.disabled),ref:function(t){return e.wrapper=t}},r.createElement("div",{className:"k-colorpalette-table-wrap",role:"grid"},r.createElement("table",{className:"k-colorpalette-table k-palette",role:"presentation"},r.createElement("tbody",null,this.renderRows(n.colorRows,o,a))))):""},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(i.g)(this.props.onChange,t,this,{value:e,rgbaValue:u(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=K[this.props.palette];return s(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 o=this;return e.map((function(e,i){return r.createElement("tr",{role:"row",key:i},o.renderColumns(e,i,t,n))}))},t.prototype.renderColumns=function(e,t,n,o){var a=this,s=void 0!==n&&n.row===t,l=n&&n.col,c=void 0!==o&&o.row===t,u=o&&o.col,p="number"!=typeof this.props.tileSize?this.props.tileSize:{width:this.props.tileSize,height:this.props.tileSize},d=p.width+"px",f=p.height+"px";return e.map((function(e,n){var o=s&&l===n,p=Object(i.e)("k-colorpalette-tile",{"k-state-selected":o,"k-state-focus":c&&u===n});return r.createElement("td",{className:p,"aria-label":e,"aria-selected":!!o||!!a.props.disabled&&void 0,style:{backgroundColor:e,width:d,height:f,minWidth:d},onClick:function(t){return a.onColorClick(e,t)},id:a.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:o.oneOfType([o.arrayOf(o.string.isRequired),o.string]),columns:o.number,tileSize:o.any,defaultValue:o.string,value:o.string,disabled:o.bool,tabIndex:o.number,onChange:o.func,onFocus:o.func,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string},t.defaultProps={palette:"office",tileSize:24},t}(r.Component),U=Object(i.f)(),q=Object(i.w)(U,$);q.displayName="KendoReactColorPalette";var G=n(10),X=function(){return(X=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)},J=function(e){var t=e.popupSettings||{},n="rtl"===e.dir?"right":"left",o=r.useMemo((function(){return{horizontal:n,vertical:"bottom"}}),[n]),a=r.useMemo((function(){return{horizontal:n,vertical:"top"}}),[n]);return r.createElement(r.Fragment,null,e.input,e.button,r.createElement(G.Popup,X({style:X({},(t||{}).style,{direction:e.dir})},t,{anchor:e.popupAnchor,anchorAlign:o,popupAlign:a,show:e.open,onOpen:e.onOpen,onClose:e.onClose,className:Object(i.e)("k-reset",t.className)}),e.content))};J.displayName="KendoPickerComponent";var 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={palette:"office",tileSize:24},Q=function(e){return void 0!==e},ee=Object(i.f)(),te=r.forwardRef((function(e,t){Object(i.v)(a);var n=Object(i.t)(ee,e),o=n.popupSettings,s=n.gradientSettings,l=n.paletteSettings,c=n.valid,u=n.disabled,p=n.tabIndex,d=n.view,f=n.icon,h=n.onChange,m=n.onFocus,v=n.onBlur,g=n.onActiveColorClick,y=r.useRef(null),b=r.useRef(null),k=r.useRef(null),w=r.useRef(),C=r.useRef(null),O=r.useCallback((function(){y.current&&y.current.focus()}),[]);r.useImperativeHandle(t,(function(){return{element:y.current,actionElement:C.current,focus:O}}));var x=r.useState(!1),S=x[0],E=x[1],I=r.useState(n.defaultValue),N=I[0],T=I[1],D=r.useState(!1),_=D[0],M=D[1],P=Q(n.value),j=Q(n.open),R=P?n.value:N,A=j?n.open:_,F=r.useCallback((function(e,t){j||(!e&&!t&&y&&y.current&&y.current.focus(),M(e))}),[j]),L=r.useCallback((function(e){var t=e.altKey,n=e.keyCode;if(n!==i.b.esc)return n!==i.b.enter||j?void(!t||n!==i.b.up&&n!==i.b.down||(e.preventDefault(),e.stopPropagation(),n===i.b.up&&y&&y.current&&(y.current.focus(),F(!1)),n===i.b.down&&F(!0))):(e.preventDefault(),e.stopPropagation(),void F(!A));F(!1)}),[A,j]),B=r.useCallback((function(){j||(b.current?b.current.focus():k.current&&k.current.focus())}),[j]),z=r.useCallback((function(){F(!A,!0)}),[A]),H=r.useCallback((function(e){g&&g.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:R})}),[g,R]),K=r.useCallback((function(e){w.current?(clearTimeout(w.current),w.current=void 0):E(!0),m&&m.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[m]),W=r.useCallback((function(){F(!1,!0),E(!1),w.current=void 0}),[]),$=r.useCallback((function(e){clearTimeout(w.current),w.current=window.setTimeout(W),v&&v.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[v]),U=r.useCallback((function(e,t){var n=t?e.rgbaValue:e.value;P||T(n),t&&F(!1),h&&h.call(void 0,{value:n,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent})}),[P,h]),G=r.useCallback((function(e){return U(e,!0)}),[Q,U]),X=Object(i.q)(y,n.dir),Z=n.iconClassName||f&&"k-icon k-i-"+f,te=Object(i.e)({"k-widget":!0,"k-colorpicker":!0,"k-state-invalid":!1===c}),ne=r.useMemo((function(){return Object(i.e)({"k-picker-wrap":!0,"k-state-disabled":u,"k-state-focused":S})}),[S,u]);return r.createElement("span",{className:te,dir:X},r.createElement("span",{id:n.id,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy,className:ne,ref:y,tabIndex:Object(i.k)(p,u),title:n.title,onKeyDown:L,onFocus:K,onBlur:$},r.createElement(J,{dir:X,open:A,onOpen:B,popupAnchor:y.current||void 0,popupSettings:Y({},o),input:Z?r.createElement("span",{onClick:H,className:Object(i.e)("k-tool-icon",Z)},r.createElement("span",{className:"k-selected-color",style:{backgroundColor:R}})):r.createElement("span",{onClick:H,className:"k-selected-color",style:{backgroundColor:R}},!R&&r.createElement("span",{className:"k-icon k-i-line"})),button:r.createElement("span",{onClick:z,className:"k-select",ref:C},r.createElement("span",{className:"k-icon k-i-arrow-s"})),content:r.createElement(r.Fragment,null,("combo"===d||"gradient"===d)&&r.createElement(V,Y({},s,{tabIndex:0,ref:b,value:R,onChange:U})),("combo"===d||"palette"===d)&&r.createElement(q,Y({},l,{ref:k,value:R,onChange:G})))})))}));te.propTypes={value:o.string,defaultValue:o.string,disabled:o.bool,view:o.oneOf(["gradient","palette","combo"]),dir:o.string,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string},te.defaultProps={view:"palette",gradientSettings:{opacity:!0},paletteSettings:Z},te.displayName="KendoColorPicker";var ne=r.forwardRef((function(e,t){Object(i.v)(a);var n=r.useRef(null),o=r.useRef(null),s=r.useRef(null),l=r.useState("ColorGradient"===(e.view||"ColorGradient")),c=l[0],u=l[1],p=r.useState("rgba(255, 255, 255, 1)"),d=p[0],f=p[1],h=r.useState("rgba(255, 255, 255, 1)"),m=h[0],v=h[1],g=r.useCallback((function(){n.current&&n.current.focus()}),[n]);r.useImperativeHandle(n,(function(){return{element:o.current,focus:g,props:e}})),r.useImperativeHandle(t,(function(){return n.current}));var y=r.useCallback((function(e){("ColorGradient"===e&&!c||"ColorPalette"===e&&c)&&u(!c)}),[c]),b=r.useCallback((function(){f("rgba(255, 255, 255, 1)")}),[]),k=r.useCallback((function(e){f(e.value)}),[]),w=r.useCallback((function(){v(d)}),[d]),C=r.useCallback((function(){v("rgba(255, 255, 255, 1)")}),[]),x=r.useCallback((function(){f(m)}),[m]),S=r.useCallback((function(){o.current&&o.current.focus()}),[o]),I=r.useCallback((function(){v(d)}),[d]);return r.createElement("div",{id:e.id,style:e.style,ref:o,tabIndex:Object(i.k)(e.tabIndex,e.disabled),className:Object(i.e)("k-flatcolorpicker k-coloreditor",{"k-state-disabled":e.disabled},e.className),onBlur:I},e.header||r.createElement("div",{className:"k-coloreditor-header k-hstack"},r.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},r.createElement(O.ButtonGroup,null,r.createElement(O.Button,{type:"button",togglable:!0,look:"flat",selected:c,onClick:function(){return y("ColorGradient")}},r.createElement("span",{className:"k-icon k-i-color-canvas"})),r.createElement(O.Button,{type:"button",togglable:!0,look:"flat",selected:!c,onClick:function(){return y("ColorPalette")}},r.createElement("span",{className:"k-icon k-i-palette"})))),r.createElement("div",{className:"k-spacer"}),r.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},e.showClearButton&&oe.showClearButton&&r.createElement(O.Button,{type:"button",look:"flat",onClick:b},r.createElement("span",{className:"k-icon k-i-reset-color"})),e.showPreview&&oe.showPreview&&r.createElement("div",{className:"k-coloreditor-preview k-vstack"},r.createElement("span",{className:"k-coloreditor-preview-color k-color-preview",style:{background:d}}),r.createElement("span",{className:"k-coloreditor-current-color k-color-preview",style:{background:m},onClick:x})))),r.createElement("div",{className:"k-coloreditor-views k-vstack"},c?r.createElement(V,{ref:s,value:d,onChange:k,onFocus:S}):r.createElement(q,{value:d,onChange:k,onFocus:S})),e.showButtons&&oe.showButtons&&r.createElement("div",{className:"k-coloreditor-footer k-actions k-actions-end"},r.createElement(O.Button,{type:"button",className:"k-coloreditor-cancel",onClick:C},E["flatColorPicker.cancelBtn"]),r.createElement(O.Button,{type:"button",className:"k-coloreditor-apply k-primary",onClick:w},E["flatColorPicker.applyBtn"])))})),re={id:o.string,value:o.string,view:o.string,header:o.elementType,showClearButton:o.bool,showPreview:o.bool,showButtons:o.bool},oe={showClearButton:!0,showPreview:!0,showButtons:!0};ne.displayName="KendoFlatColorPicker",ne.propTypes=re,ne.defaultProps=oe;var ie,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(){return(se=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,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},ce=function(e){function t(n){var r=e.call(this,n)||this;return r._inputId=Object(i.m)(),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-state-invalid"):r._input.classList.add("k-state-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-state-empty")&&t.classList.remove("k-state-empty")}},Object(i.v)(a),r.state={value:r.props.defaultValue||t.defaultProps.defaultValue},r}return ae(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 se({},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,o=t.label,a=t.id,s=(t.validationMessage,t.defaultValue,t.valid,t.visited,t.touched,t.modified,t.ariaLabelledBy),l=t.ariaDescribedBy,c=(t.validityStyles,t.style),u=le(t,["className","label","id","validationMessage","defaultValue","valid","visited","touched","modified","ariaLabelledBy","ariaDescribedBy","validityStyles","style"]),p=a||this._inputId,d=!this.validityStyles||this.validity.valid,f=Object(i.e)(n,"k-textbox"),h=r.createElement("input",se({"aria-labelledby":s,"aria-describedby":l},u,{style:o?void 0:c,value:this.value,id:p,className:f,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:function(t){e._input=t}}));return o?r.createElement(x.a,{label:o,editorId:p,editorValue:String(this.value),editorValid:d,editorDisabled:u.disabled,editorPlaceholder:u.placeholder,children:h,style:c,dir:u.dir}):h},t.displayName="Input",t.propTypes={label:o.string,validationMessage:o.string,required:o.bool,validate:o.bool,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string},t.defaultProps={defaultValue:"",required:!1,validityStyles:!0},t}(r.Component),ue=Object(i.f)(),pe=Object(i.w)(ue,ce);pe.displayName="KendoReactInput",function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(ie||(ie={}));var de=function(){function e(e,t,n){void 0===n&&(n=ie.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}(),fe=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}(),he=function(e){return(e||"").split("")},me=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof fe?this.parse(e):this.parse(new fe(he(e),he(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===ie.Literal},e}(),ve=function(e,t){return new me((function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new de(t.literal(r),n)):new de(o?t.mask(o):t.literal(r),n)}))},ge=function(e){var t=e.prompt,n=e.promptPlaceholder;return new me((function(e){var r=e.next().char;return new de(r===t?n:r,e)}))},ye=function(e){return new me((function(t){var n=t.next().char;return new de(e?n:"",t)}))},be=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 me((function(e){return new de(t,e)}))));var t},ke=function(e){return new me((function(t){for(var n=new de([],t);!t.eof();)n=n.concat(e.run(t));return n}))},we=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 be(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?(be(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?(be(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 be(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 be(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 be(this.unmaskTokens).run(a,t).chain((function(e){i=e.join("").length;var n=t.slice(i);return be(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 me((function(e){return e.peek().char===t?(e.eat(),new de(t,e,ie.Literal)):new de(t,e,ie.Literal)}));var t},mask:function(n){return function(e){var t=e.prompt,n=e.promptPlaceholder;return function(e){return new me((function(r){for(;!r.eof();){var o=r.peek(),i=o.char,a=o.control;if(i===a&&a===t)return r.eat(),new de(t,r,ie.Mask);if(e.test(i))return r.eat(),new de(i,r,ie.Mask);if(i===n)return r.eat(),new de(t,r,ie.Mask);r.eat_input()}return r.eat(),new de(t,r,ie.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 me((function(e){return e.eof()?new de("",e):(e.peek().char===t&&e.eat(),new de(t,e))}));var t},mask:function(t){return(n=e.prompt,function(e){return new me((function(t){for(;!t.eof();){var r=t.peek(),o=r.char,i=r.control;if(o===n&&i===n)return t.eat(),new de(o,t);if(e.test(o))return t.eat(),new de(o,t);t.eat_input()}return t.eat(),new de("",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 ye(n)},mask:function(n){return ge({prompt:e,promptPlaceholder:t})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return ye(!1)},mask:function(t){return ge({prompt:e,promptPlaceholder:""})}}},enumerable:!0,configurable:!0}),e.prototype.tokenize=function(){var e=this;ke(ve(this.rules,this.maskTokenCreator)).run(this.mask).fold((function(t,n){e.maskTokens=t})),ke(ve(this.rules,this.unmaskTokenCreator)).run(this.mask).fold((function(t,n){e.unmaskTokens=t})),ke(ve(this.rules,this.rawTokenCreator)).run(this.mask).fold((function(t,n){e.rawTokens=t})),ke(ve(this.rules,this.validationTokenCreator)).run(this.mask).fold((function(t,n){e.validationTokens=t}))},e}(),Ce={"#":/[\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]/},Oe=function(){return!1},xe=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},Se=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)}}(),Ee=function(){return(Ee=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)},Ie=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._inputId="k-"+Object(i.m)(),n._service=new we,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(i.v)(a),n}return Se(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&&xe(s.rules,l.rules)||this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e=this,t=this.props.id||this._inputId,n=!this.validityStyles||this.validity.valid,o=this.props.style||{},a=r.createElement("span",{dir:this.props.dir,className:Object(i.e)("k-widget k-maskedtextbox",this.props.className,{"k-state-focused":this.state.focused,"k-state-disabled":this.props.disabled,"k-state-invalid":!n}),style:this.props.label?o:Ee({width:this.props.width},o)},r.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-textbox",value:this.value,id:t,"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,name:this.props.name,tabIndex:Object(i.k)(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(t){return e._input=t},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:Oe,onDrop:Oe}));return this.props.label?r.createElement(x.a,{label:this.props.label,editorId:t,editorValue:this.value,editorValid:n,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:a,style:{width:this.props.width},dir:this.props.dir}):a},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({},Ce,this.props.rules)},enumerable:!0,configurable:!0}),t.displayName="MaskedTextBox",t.propTypes={value:o.string,defaultValue:o.string,placeholder:o.string,title:o.string,dir:o.string,id:o.string,style:o.object,className:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string,width:o.oneOfType([o.string,o.number]),tabIndex:o.number,accessKey:o.string,disabled:o.bool,readonly:o.bool,prompt:o.string,promptPlaceholder:o.string,includeLiterals:o.bool,maskValidation:o.bool,mask:o.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:o.shape({start:o.number.isRequired,end:o.number.isRequired}),name:o.string,label:o.string,validationMessage:o.string,required:o.bool,valid:o.bool,validityStyles:o.bool,onChange:o.func},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:Ce,required:!1,validityStyles:!0},t}(r.Component),Ne=Object(i.f)(),Te=Object(i.w)(Ne,Ie);Te.displayName="KendoReactMaskedTextBox";var De=function(){return(De=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=/\d/,Me=function(e,t){return void 0!==e?e:t},Pe=function(e,t,n){return null===e&&void 0===e?"":"string"==typeof e?e:n.formatNumber(e,t)},je=function(e){return(String(e).split(".")[1]||"").length},Re=function(e,t){return Math.max(je(e),je(t))},Ae=function(e,t){var n=function(e){return Math.min(e,15)}(t);return parseFloat(e.toFixed(n))},Fe=function(e,t,n,r,o,i,a){var s=Re(e||0,n||0),l=Be(Ae((e||0)+(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=Pe(l,i,a),t.selectionStart=t.selectionEnd=$e(t.currentLooseValue,_e)},Le=function(e,t,n,r,o,i,a){var s=Re(e||0,n||0),l=Be(Ae((e||0)-(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=Pe(l,i,a),t.selectionStart=t.selectionEnd=$e(t.currentLooseValue,_e)},Be=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},ze=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)}},Ve=function(e,t,n,r){e.selectionStart=e.selectionEnd=t,ze(n,r,e)},He=function(e,t,n,r){e.eventValue=r.parseNumber(e.prevLooseValue,t),e.currentLooseValue=e.prevLooseValue,e.valueIsCorrected=!0,Ve(e,e.selectionStart,e.currentLooseValue,n)},Ke=function(e,t){var n=e.indexOf(t.decimal);return n>-1?n:$e(e,_e)},We=function(e){return e.split("").reverse().join("")},$e=function(e,t){return e.length-We(e).search(t)},Ue=function(e){return e.split(e[e.search(_e)])[0]},qe=function(e){var t=We(e);return We(t.split(t[t.search(_e)])[0])},Ge=function(e,t){return e.search(t)},Xe=function(e,t){var n=e.indexOf(t);return n>-1?e.length-n-1:0},Je=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++)_e.test(e.charAt(l))&&s++;for(var c=0;s>0&&t.length>c;)_e.test(t.charAt(c))&&s--,c++;return c},Ye=function(e,t,n){var r=De({},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"),p=new RegExp("[\\d\\"+i.decimal+"\\"+i.group+"]"),d=s.replace(c,""),f=Ge(s,_e),h=-1===f?-1:$e(s,_e),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(p)})).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=Ue(n),s=Ue(r),l=Ue(o),c=Ue(i);return{positiveInfo:[a,qe(n)],negativeInfo:[s,qe(r)],zeroInfo:[l,qe(o)],oneInfo:[c,qe(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=Pe(r.eventValue,t,n),Ve(r,Ke(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=Pe(r.eventValue,t,n);var T=Ge(r.currentLooseValue,_e),D=Ge(l,_e);return Ve(r,r.selectionEnd-1+(T-D),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),Ve(r,r.selectionStart,r.currentLooseValue,x),r;if(r.currentLooseValue===i.decimal){r.eventValue=0;var _=Pe(r.eventValue,t,n);if(0===C&&b>0){var M=$e(_,_e);r.currentLooseValue=_.substring(0,M)+i.decimal+_.substring(M)}else r.currentLooseValue=_;return Ve(r,Ke(r.currentLooseValue,i)+1,r.currentLooseValue,x),r}if(function(e,t){return String(e.currentLooseValue).split(t.decimal).length>2}(r,i))return He(r,t,x,n),r;if(I)return r.eventValue=n.parseNumber(s,t)/100,r.currentLooseValue=Pe(r.eventValue,t,n),r;if(String(r.currentLooseValue).replace(/[^\d]/g,"").length>15)return He(r,t,x,n),r;if(d!==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 He(r,t,x,n),r;if(d[d.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!==Xe(l.replace(c,""),i.decimal))}))>-1)return r.eventValue=n.parseNumber(e.prevLooseValue,t),r.currentLooseValue=e.prevLooseValue,r;var P=Xe(d,i.decimal),j="0"===d[d.length-1];if(E&&j&&P<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=Pe(r.eventValue,t,n),r;if(P>0){var R=s.substring(0,m);if(j&&(!R||0!==l.indexOf(R))){r.eventValue=n.parseNumber(r.currentLooseValue,t);var A=Pe(r.eventValue,t,n);return Ve(r,Je(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A,r}if(P>b){var F=s.indexOf(i.decimal),L=s.substring(0,F)+s.substring(F,F+1+b)+s.substring(h,String(r.currentLooseValue).length);return r.eventValue=n.parseNumber(L,t),r.currentLooseValue=L,Ve(r,r.selectionStart,L,x),r}if(C!==b&&P<=b&&j)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=v,r;if(P<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=Pe(r.eventValue,t,n),r}}if(r.eventValue=n.parseNumber(r.currentLooseValue,t),I&&(r.eventValue=r.eventValue/100),"number"==typeof r.eventValue){A=Pe(r.eventValue,t,n);1===s.length?Ve(r,Ke(A,i),A,x):Ve(r,Je(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A}else r.currentLooseValue=Pe(n.parseNumber(d),t,n);return r},Ze=Object(i.f)(),Qe=r.forwardRef((function(e,t){Object(i.v)(a);var n=Object(i.t)(Ze,e),o=r.useMemo((function(){return Object(i.m)()}),[]),s=n.id||o,l=Object(S.useInternationalization)(),c=Object(S.useLocalization)(),u=r.useRef(null),p=r.useRef(null),d=r.useRef(),f=r.useState(!1),h=f[0],m=f[1],v=r.useRef({eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1}),g=r.useRef(!1),y=r.useRef(),b=r.useRef(n.defaultValue),k=Pe(v.current.focused&&!n.disabled?v.current.currentLooseValue:Me(n.value,b.current),n.format,l);y.current=k,r.useEffect((function(){u.current&&u.current.setCustomValidity&&u.current.setCustomValidity(N().valid?"":n.validationMessage||"Please enter a valid value!")}));var w=r.useCallback((function(){u.current&&u.current.focus()}),[]),C=r.useCallback((function(){return void 0!==d.current?d.current:Me(n.value,b.current)}),[n.value]),O=r.useCallback((function(){return n.name}),[n.name]),I=r.useCallback((function(){return n.required}),[n.required]),N=r.useCallback((function(){var e=void 0!==n.validationMessage,t=C();return{customError:e,valid:void 0!==n.valid?n.valid:!(v.current.valueIsOutOfRange||I()&&null==t),valueMissing:null==t}}),[n.validationMessage,n.valid,C,I]),T=r.useCallback((function(){return n.validityStyles}),[n.validityStyles]),D=r.useCallback((function(){return n}),[n]),_=r.useCallback((function(){var e={element:u.current,focus:w};return Object.defineProperty(e,"name",{get:O}),Object.defineProperty(e,"value",{get:C}),Object.defineProperty(e,"validity",{get:N}),Object.defineProperty(e,"validityStyles",{get:T}),Object.defineProperty(e,"required",{get:I}),Object.defineProperty(e,"props",{get:D}),e}),[O,C,N,T,I,w,D]);r.useImperativeHandle(t,_);var M=r.useCallback((function(){return{eventValue:Me(n.value,b.current),prevLooseValue:y.current,currentLooseValue:u.current.value,selectionStart:u.current.selectionStart,selectionEnd:u.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:g.current,focused:v.current.focused}}),[n.value]),P=r.useCallback((function(e,t){if(!n.disabled){d.current=t.eventValue,b.current=t.eventValue;var r=Pe(Be(t.eventValue,n.min,n.max),n.format,l),o=Be(l.parseNumber(r,n.format),n.min,n.max);if(o!==t.eventValue&&(t.valueIsOutOfRange=!0,t.eventValue=o,b.current=o),t.valueIsCorrected){var a=p.current;a&&-1===a.className.indexOf("k-state-invalid")&&(a.className+=" k-state-invalid",window.setTimeout((function(){return a.className=a.className.replace(" k-state-invalid","")}),50))}n.value!==t.eventValue&&Object(i.g)(n.onChange,e,_(),{value:t.eventValue}),d.current=void 0,v.current=t,m((function(e){return!e}))}}),[n.value,n.onChange,n.disabled,m,_]),j=r.useCallback((function(e){var t=M();g.current=!1,P(e,Ye(t,n.format,l))}),[n.format,n.onChange,l,P,M]),R=r.useCallback((function(e){var t=M(),r=l.parseNumber(String(t.currentLooseValue),n.format);if(t.selectionEnd>t.selectionStart&&t.selectionEnd-t.selectionStart===String(t.currentLooseValue).length)g.current=!0;else{switch(e.keyCode){case 38:Fe(r,t,n.step,n.min,n.max,n.format,l);break;case 40:Le(r,t,n.step,n.min,n.max,n.format,l);break;case 13:if(!1===n.rangeOnEnter)return;var o=Pe(Be(r,n.min,n.max),n.format,l),i=Be(l.parseNumber(o,n.format),n.min,n.max);t.eventValue=i,t.currentLooseValue=Pe(i,n.format,l),t.selectionStart=t.selectionEnd=t.currentLooseValue.length;break;case 110:var a=u.current,s=l.numberSymbols();a&&(t.currentLooseValue=t.currentLooseValue.slice(0,t.selectionStart)+s.decimal+t.currentLooseValue.slice(t.selectionEnd),t.selectionStart=t.selectionEnd=t.selectionStart+1,t=Ye(t,n.format,l));break;default:return}e.preventDefault(),P(e,t)}}),[n.format,n.min,n.max,n.step,n.onChange,n.rangeOnEnter,P,M]),A=r.useCallback((function(){g.current=!0}),[]),F=r.useCallback((function(e){if(!n.readOnly&&!n.disabled){var t=M();Fe(l.parseNumber(String(t.currentLooseValue),n.format),t,n.step,n.min,n.max,n.format,l),P(e,t)}}),[n.format,n.min,n.max,n.step,n.onChange,n.readOnly,n.disabled,P,M]),L=r.useCallback((function(e){if(!n.readOnly&&!n.disabled){var t=M();Le(l.parseNumber(String(t.currentLooseValue),n.format),t,n.step,n.min,n.max,n.format,l),P(e,t)}}),[n.format,n.min,n.max,n.step,n.onChange,n.readOnly,n.disabled,P,M]),B=r.useCallback((function(e){document&&document.activeElement===u.current&&u.current&&!n.readOnly&&!n.disabled&&(e.nativeEvent.deltaY<0&&F(e),e.nativeEvent.deltaY>0&&L(e))}),[F,L,n.disabled,n.readOnly]),z=r.useCallback((function(e){v.current.currentLooseValue=y.current,v.current.focused=!0,Object(i.g)(n.onFocus,e,_(),{}),m((function(e){return!e}))}),[n.onFocus,m,_]),V=r.useCallback((function(e){v.current={eventValue:null,prevLooseValue:"",currentLooseValue:"",focused:!1,selectionStart:void 0,selectionEnd:void 0,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1},Object(i.g)(n.onBlur,e,_(),{}),m((function(e){return!e}))}),[n.onBlur,m,_]),H=r.useCallback((function(e){document&&u.current&&(e.preventDefault(),document.activeElement!==u.current&&u.current.focus())}),[]);r.useLayoutEffect((function(){u.current&&void 0!==v.current.selectionStart&&void 0!==v.current.selectionEnd&&(u.current.selectionStart=v.current.selectionStart,u.current.selectionEnd=v.current.selectionEnd,v.current.selectionStart=void 0,v.current.selectionEnd=void 0)}),[h]);var K=!T()||N().valid,W=r.createElement("span",{dir:n.dir,style:n.label?void 0:{width:n.width},className:"k-widget k-numerictextbox"+(n.className?" "+n.className:""),"aria-disabled":n.disabled?"true":void 0},r.createElement("span",{className:Object(i.e)("k-numeric-wrap",{"k-state-disabled":n.disabled,"k-state-invalid":!K,"k-state-focused":v.current.focused}),ref:p},r.createElement("input",{value:null===k?"":k,tabIndex:Object(i.k)(n.tabIndex,n.disabled),accessKey:n.accessKey,disabled:n.disabled,title:n.title,"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy,placeholder:n.placeholder,spellCheck:!1,autoComplete:"off",autoCorrect:"off",type:n.inputType||"tel",className:"k-input k-formatted-value",id:s,name:n.name,readOnly:n.readOnly,onChange:j,onFocus:z,onBlur:V,onKeyDown:R,onPaste:A,onWheel:B,ref:u}),n.children,n.spinners&&r.createElement("span",{className:"k-select",onMouseDown:H},r.createElement("span",{className:"k-link k-link-increase","aria-label":c.toLanguageString("numerictextbox.increment",E["numerictextbox.increment"]),title:c.toLanguageString("numerictextbox.increment",E["numerictextbox.increment"]),onClick:F},r.createElement("span",{className:"k-icon k-i-arrow-n"})),r.createElement("span",{className:"k-link k-link-decrease","aria-label":c.toLanguageString("numerictextbox.decrement",E["numerictextbox.decrement"]),title:c.toLanguageString("numerictextbox.decrement",E["numerictextbox.decrement"]),onClick:L},r.createElement("span",{className:"k-icon k-i-arrow-s"})))));return n.label?r.createElement(x.a,{label:n.label,editorId:s,editorValue:null===k?"":k,editorValid:K,editorDisabled:n.disabled,editorPlaceholder:n.placeholder,children:W,style:{width:n.width},dir:n.dir}):W}));Qe.propTypes={value:o.number,defaultValue:o.number,step:o.number,format:o.oneOfType([o.string,o.shape({style:o.oneOf(["decimal","currency","percent","scientific","accounting"]),currency:o.string,currencyDisplay:o.oneOf(["symbol","code","name"]),useGrouping:o.bool,minimumIntegerDigits:o.number,minimumFractionDigits:o.number,maximumFractionDigits:o.number})]),width:o.oneOfType([o.string,o.number]),tabIndex:o.number,accessKey:o.string,title:o.string,placeholder:o.string,min:o.number,max:o.number,spinners:o.bool,disabled:o.bool,readOnly:o.bool,dir:o.string,name:o.string,label:o.string,validationMessage:o.string,required:o.bool,id:o.string,rangeOnEnter:o.bool,ariaLabelledBy:o.string,ariaDescribedBy:o.string,onChange:o.func,onFocus:o.func,onBlur:o.func},Qe.displayName="KendoNumericTextBox",Qe.defaultProps={step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,onChange:function(e){},onFocus:function(e){},onBlur:function(e){}};var et=function(){return(et=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="data-slider-label",nt=function(e){var t,n,o=r.useRef(null),a=Object(i.q)(o),s=e.vertical?{bottom:e.position+"%",height:"1px",width:"100%"}:((t={})["rtl"===a?"right":"left"]=e.position+"%",t.width="1px",t);return r.createElement("li",{ref:o,role:"presentation",className:"k-tick k-tick-large",title:e.title,style:et({zIndex:1,position:"absolute"},s)},r.createElement("span",et({},((n={})[tt]=!0,n),{className:"k-label",onClick:e.onClick}),e.children))},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)}}(),ot=function(){return(ot=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)},it=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?r.createElement(r.Fragment,null,r.createElement("a",{className:"k-button k-button-decrease",style:{position:"relative"},title:e.decrementTitle,onClick:e.decrement},r.createElement("span",{className:Object(i.e)("k-icon",{"k-i-arrow-s":n.props.vertical,"k-i-arrow-w":!n.props.vertical})})),e.children,r.createElement("a",{className:"k-button k-button-increase",style:{position:"relative"},title:e.incrementTitle,onClick:e.increment},r.createElement("span",{className:Object(i.e)("k-icon",{"k-i-arrow-n":n.props.vertical,"k-i-arrow-e":!n.props.vertical})}))):e.children},n.focus=function(){n._element&&n._element.focus()},n.isLabel=function(e){for(var t=e;t;){if(Boolean(t.getAttribute(tt)))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===i.b.left||e.keyCode===i.b.down?t=n.state.value-(n.props.step||0):e.keyCode===i.b.right||e.keyCode===i.b.up?t=n.state.value+(n.props.step||0):e.keyCode===i.b.home?t=n.props.min:e.keyCode===i.b.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(i.v)(a),n}return rt(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,n=this,o=Object(S.provideLocalizationService)(this),a=(this.state.value-this.props.min)/(this.props.max-this.props.min)*100,s=this.props.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},l=this.props.vertical?{paddingTop:0,height:"100%"}:{};return r.createElement("div",{ref:function(e){return n._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:this.props.style,tabIndex:Object(i.k)(this.props.tabIndex,this.props.disabled,void 0),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,className:Object(i.e)("k-slider k-widget",{"k-state-focused":this.state.focused,"k-state-disabled":this.props.disabled,"k-slider-horizontal":!this.props.vertical,"k-slider-vertical":this.props.vertical},this.props.className)},r.createElement("div",{className:Object(i.e)("k-slider-wrap",{"k-slider-buttons":this.props.buttons}),style:{display:"flex",position:"relative",flexDirection:this.props.vertical?"column-reverse":"row"}},r.createElement(this.buttons,{enabled:this.props.buttons,decrement:this.decrement,increment:this.increment,incrementTitle:o.toLanguageString("slider.increment",E["slider.increment"]),decrementTitle:o.toLanguageString("slider.decrement",E["slider.decrement"])},r.createElement(i.a,{onDrag:this.dragOver,onPress:this.dragStart},r.createElement("div",{className:"k-slider-track-wrap",style:ot({flexGrow:1,position:"relative",touchAction:"none"},s)},this.props.children&&r.createElement("ul",{className:"k-reset k-slider-items",style:ot({margin:0},l)},r.Children.map(this.props.children,(function(e){return e&&r.cloneElement(e,{position:100*(e.props.position-n.props.min)/(n.props.max-n.props.min),vertical:n.props.vertical},e.props.children)}))),r.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 n._sliderTrack=e}},r.createElement("div",{className:"k-slider-selection",style:this.props.vertical?{height:a+"%"}:{width:a+"%"}}),r.createElement("a",{className:"k-draghandle",title:o.toLanguageString("slider.dragTitle",E["slider.dragTitle"]),style:this.props.vertical?{bottom:"calc("+a+"% - 8px)",zIndex:1}:(t={},t["rtl"===this.state.dir?"right":"left"]="calc("+a+"% - 8px)",t.zIndex=1,t)})))))))},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(i.g)(this.props.onChange,e,this,{value:t})},t.displayName="Slider",t.propTypes={min:o.number.isRequired,max:o.number.isRequired,value:o.number,vertical:o.bool,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string},t}(r.Component),at=Object(i.f)(),st=Object(i.w)(at,it);st.displayName="KendoReactSlider",Object(S.registerForLocalization)(it);var lt,ct=function(){return(ct=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"}(lt||(lt={}));var ut=function(){return(ut=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,n){var o=r.useState(e),i=o[0],a=o[1],s=r.useCallback((function(e){var r=function(e,t){var n,r;switch(t.type){case lt.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 lt.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 lt.min:n="start"===t.key?ct({},e,{start:t.min}):ct({},e,{end:Math.max(t.min,e.start)});break;case lt.max:n="start"===t.key?ct({},e,{start:Math.min(t.max,e.end)}):ct({},e,{end:t.max});break;case lt.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?ct({},e,{start:t.min}):ct({},e,{start:Math.min(r,e.end)}):r>t.max?ct({},e,{end:t.max}):ct({},e,{end:Math.max(r,e.start)});break;case lt.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?ct({},e,{start:t.min}):ct({},e,{start:Math.min(r,e.end)}):r>t.max?ct({},e,{end:t.max}):ct({},e,{end:Math.max(r,e.start)});break;default:n=e}return n}(t.state||i,ut({},e,t));n&&n(r,e.event),a(r)}),[t,n]);return[i,s]},dt=Object(i.f)(),ft=r.forwardRef((function(e,t){var n,o,s,l;Object(i.v)(a);var c=Object(i.t)(dt,e),u=r.useRef(null),p=r.useRef(null),d=r.useRef(null),f=r.useRef(null),h=r.useRef(null),m=r.useCallback((function(){f.current&&f.current.focus()}),[f]);r.useImperativeHandle(u,(function(){return{element:p.current,focus:m,props:c}})),r.useImperativeHandle(t,(function(){return u.current}));var v=r.useMemo((function(){return c.min}),[c.min]),g=r.useMemo((function(){return c.max}),[c.max]),y=r.useMemo((function(){return void 0!==c.step?c.step:mt.step}),[c.step,mt.step]),b=Object(i.q)(p,c.dir),k=r.useState(""),w=k[0],C=k[1],O=pt(c.defaultValue||mt.defaultValue,{min:v,max:g,step:y,state:c.value},(function(e,t){c.onChange&&u.current&&c.onChange.call(void 0,{value:e,target:u.current,syntheticEvent:t})})),x=O[0],I=O[1],N=r.useMemo((function(){return c.value||x}),[c.value,x]),T=r.useRef(null),D=r.useRef(null),_=r.useMemo((function(){return(N.start-v)/(g-v)*100}),[N.start,v,g]),M=r.useMemo((function(){return(N.end-v)/(g-v)*100}),[N.end,v,g]),P=r.useMemo((function(){return c.vertical?{paddingTop:0,height:"100%"}:{}}),[c.vertical]),j=r.useMemo((function(){return c.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"}}),[c.vertical]),R=Object(S.useLocalization)(),A=r.useCallback((function(e){if(D.current){e.originalEvent.preventDefault();var t=D.current.getBoundingClientRect(),n=c.vertical?t.bottom-e.clientY:"rtl"===b?t.right-e.clientX:e.clientX-t.left,r=c.vertical?t.height:t.width;return v+n/r*(g-v)}}),[D,c.vertical,b,v,g,x.start,x.end,c.value&&c.value.start,c.value&&c.value.end]),F=r.useCallback((function(e){return e<=N.start?"start":e>=N.end?"end":2*e<N.end+N.start?"start":"end"}),[x.start,x.end,c.value&&c.value.start,c.value&&c.value.end]),L=r.useCallback((function(e){switch(e.keyCode){case i.b.right:e.preventDefault(),I({type:"rtl"===b?lt.decrease:lt.increase,key:"start",event:e});break;case i.b.up:e.preventDefault(),I({type:lt.increase,key:"start",event:e});break;case i.b.left:e.preventDefault(),I({type:"rtl"===b?lt.increase:lt.decrease,key:"start",event:e});break;case i.b.down:e.preventDefault(),I({type:lt.decrease,key:"start",event:e});break;case i.b.home:e.preventDefault(),I({type:lt.min,key:"start",event:e});break;case i.b.end:e.preventDefault(),I({type:lt.max,key:"start",event:e})}}),[I]),B=r.useCallback((function(e){switch(e.keyCode){case i.b.right:e.preventDefault(),I({type:"rtl"===b?lt.decrease:lt.increase,key:"end",event:e});break;case i.b.up:e.preventDefault(),I({type:lt.increase,key:"end",event:e});break;case i.b.left:e.preventDefault(),I({type:"rtl"===b?lt.increase:lt.decrease,key:"end",event:e});break;case i.b.down:e.preventDefault(),I({type:lt.decrease,key:"end",event:e});break;case i.b.home:e.preventDefault(),I({type:lt.min,key:"end",event:e});break;case i.b.end:e.preventDefault(),I({type:lt.max,key:"end",event:e})}}),[I,b]),z=r.useCallback((function(e){var t=A(e),n=F(t);C(n),"end"===n?h.current.focus():f.current.focus();var r="end"===n?lt.end:lt.start;I({type:r,payload:t,event:e})}),[c.vertical,v,g,I]);return Object(i.r)(D,{onPress:z,onDrag:function(e){var t=A(e),n="end"===w?lt.end:lt.start;I({type:n,payload:t,event:e})},onRelease:function(e){var t=A(e),n="end"===w?lt.end:lt.start;I({type:n,payload:t,event:e}),C("")}}),r.createElement("div",{role:"slider",id:c.id,style:c.style,ref:p,dir:b,className:Object(i.e)("k-widget k-slider",{"k-rtl":"rtl"===b,"k-state-disabled":c.disabled,"k-slider-vertical":c.vertical,"k-slider-horizontal":!c.vertical},c.className),"aria-labelledby":c.ariaLabelledBy,"aria-describedby":c.ariaDescribedBy},r.createElement("div",{className:"k-slider-wrap",style:{display:"flex",position:"relative",flexDirection:c.vertical?"column-reverse":"row"}},r.createElement("div",{ref:D,className:"k-slider-track-wrap",style:ut({flexGrow:1,position:"relative",touchAction:"none"},j)},c.children&&r.createElement("ul",{className:"k-reset k-slider-items",style:ut({margin:0},P)},r.Children.map(c.children,(function(e){return e&&r.cloneElement(e,{position:100*(e.props.position-c.min)/(c.max-c.min),vertical:c.vertical},e.props.children)}))),r.createElement("div",{ref:T,className:"k-slider-track",style:c.vertical?{bottom:0,height:"100%"}:(n={},n["rtl"===b?"right":"left"]=0,n.width="100%",n)},null!==_&&null!==M&&r.createElement("div",{"data-selection":!0,ref:d,title:N.start+" - "+N.end,className:"k-slider-selection",style:c.vertical?{height:M-_+"%",bottom:_+"%"}:(o={},o["rtl"===b?"right":"left"]=_+"%",o.width=M-_+"%",o)}),r.createElement("a",{ref:f,role:"slider",tabIndex:Object(i.k)(c.startTabIndex,c.disabled,void 0),"aria-valuemin":v,"aria-valuemax":Math.max(g,N.end),"aria-valuenow":N.start,"aria-disabled":c.disabled?"true":void 0,className:"k-draghandle",title:R.toLanguageString("slider.dragTitle",E["slider.dragTitle"]),style:c.vertical?{bottom:"calc("+_+"% - 8px)",zIndex:1}:(s={},s["rtl"===b?"right":"left"]="calc("+_+"% - 8px)",s.zIndex=1,s),onKeyDown:L}),r.createElement("a",{ref:h,role:"slider",tabIndex:Object(i.k)(c.endTabIndex,c.disabled,void 0),"aria-valuemin":Math.min(v,N.start),"aria-valuemax":g,"aria-valuenow":N.end,"aria-disabled":c.disabled?"true":void 0,className:"k-draghandle",title:R.toLanguageString("slider.dragTitle",E["slider.dragTitle"]),style:c.vertical?{bottom:"calc("+M+"% - 8px)",zIndex:1}:(l={},l["rtl"===b?"right":"left"]="calc("+M+"% - 8px)",l.zIndex=1,l),onKeyDown:B})))))})),ht={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:o.func,step:o.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:o.bool,disabled:o.bool,dir:o.oneOf(["ltr","rtl"])},mt={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};ft.displayName="KendoReactRangeSlider",ft.propTypes=ht,ft.defaultProps=mt;var vt=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)}}(),gt=function(){return(gt=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){function t(n){var o=e.call(this,n)||this;return o.setValidity=function(){o._input&&o._input.setCustomValidity&&o._input.setCustomValidity(o.validity.valid?"":o.props.validationMessage||o.defaultValidationMessage.toLanguageString("switch.validation",E["switch.validation"]))},o.limit=function(e,t,n){var r=n.offsetWidth,o=t.offsetWidth;return e<0?0:e>r-o?r-o:e},o.toggle=function(e,t){o.setState({checked:e}),o.valueDuringOnChange=e,Object(i.g)(o.props.onChange,t,o,{value:e}),o.valueDuringOnChange=void 0},o._id=Object(i.m)(),o.defaultValidationMessage=Object(S.provideLocalizationService)(o),o.focus=function(){o._element&&o._element.focus()},o.dummyInput=function(e){return r.createElement("input",{type:"checkbox",checked:o.props.checked,ref:function(e){o._input=e},tabIndex:-1,"aria-hidden":!0,value:e,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:i.o})},o.handleClick=function(e){o.eventTimeStamp!==e.timeStamp&&(o.eventTimeStamp=e.timeStamp,o.toggle(!o.value,e))},o.handleKeyDown=function(e){if(!o.props.disabled){var t=e.keyCode;t!==i.b.space&&t!==i.b.enter||o.toggle(!o.value,e)}},o.handleWrapperFocus=function(e){if(!o.props.disabled){o.setState({focused:!0});var t=o.props.onFocus;t&&t.call(void 0,e)}},o.handleWrapperBlur=function(e){if(!o.props.disabled){o.setState({focused:!1});var t=o.props.onBlur;t&&t.call(void 0,e)}},Object(i.v)(a),o.state={checked:n.defaultChecked||t.defaultProps.defaultChecked,focused:!1},o}return vt(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=this,t=this.state.focused,n=this.props,o=n.dir,a=n.disabled,s=n.id,l=n.offLabel,c=n.onLabel,u=n.tabIndex;this.dir=o||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var p=!this.validityStyles||this.validity.valid,d=Object(i.e)({"k-widget":!0,"k-switch":!0,"k-switch-on":this.value,"k-switch-off":!this.value,"k-state-focused":t,"k-state-disabled":a,"k-state-invalid":!p},this.props.className),f={"aria-checked":this.value,"aria-disabled":a||void 0};return r.createElement("span",{ref:function(t){e._wrapper=t},className:d,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},r.createElement("span",gt({className:"k-switch-container",id:s||this._id,role:"switch"},f,{"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,ref:function(t){e._element=t},tabIndex:Object(i.k)(u,a,void 0),accessKey:this.props.accessKey}),this.dummyInput(this.value),r.createElement("span",{className:"k-switch-label-on"},c),r.createElement("span",{className:"k-switch-label-off"},l),r.createElement("span",{className:"k-switch-handle"})))},t.displayName="Switch",t.propTypes={accessKey:o.string,checked:o.bool,className:o.string,disabled:o.bool,defaultChecked:o.bool,dir:o.string,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string,offLabel:o.string,required:o.bool,tabIndex:o.number,valid:o.bool,validate:o.bool,validationMessage:o.string,onBlur:o.any,onChange:o.any,onFocus:o.any,onLabel:o.string},t.defaultProps={disabled:!1,defaultChecked:!1,offLabel:"OFF",onBlur:i.o,onFocus:i.o,onLabel:"ON",required:!1,validityStyles:!0},t}(r.Component),bt=Object(i.f)(),kt=Object(i.w)(bt,yt);kt.displayName="KendoReactSwitch";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)},Ct=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},Ot=Object(i.f)(),xt=r.forwardRef((function(e,t){Object(i.v)(a);var n=Object(i.t)(Ot,e),o=n,s=o.ariaDescribedBy,l=o.ariaLabelledBy,c=o.checked,u=o.className,p=o.children,d=o.defaultChecked,f=o.disabled,h=o.defaultValue,m=o.id,v=o.label,g=o.labelPlacement,y=o.name,b=o.labelOptional,k=o.onChange,w=o.onFocus,C=o.onBlur,O=o.tabIndex,x=o.value,I=o.required,N=o.valid,T=o.validationMessage,D=o.validityStyles,_=(o.visited,o.touched,o.modified,Ct(o,["ariaDescribedBy","ariaLabelledBy","checked","className","children","defaultChecked","disabled","defaultValue","id","label","labelPlacement","name","labelOptional","onChange","onFocus","onBlur","tabIndex","value","required","valid","validationMessage","validityStyles","visited","touched","modified"])),M=r.useRef(null),P=r.useCallback((function(){M.current&&M.current.focus()}),[]),j=r.useCallback((function(){return{element:M.current,focus:P,get name(){return M.current&&M.current.name}}}),[P]);r.useImperativeHandle(t,j);var R=r.useState(d),A=R[0],F=R[1],L=r.useState(h),B=L[0],z=L[1],V="boolean"==typeof x||null===x,H=void 0!==c,K=V,W=K?x:B,$=H?c:K?void 0:A,U=void 0===$&&W,q=U?W:$,G=U||K?null===x?x:void 0:x||W,X=null===q||null===G,J=r.useMemo((function(){return Object(i.m)()}),[]),Y=Object(S.useLocalization)(),Z=function(e){return Y.toLanguageString(e,E[e])},Q=Z("checkbox.validation"),ee=Z("checkbox.optionalText"),te=void 0!==N?N:!I||!!$;r.useEffect((function(){M.current&&M.current.setCustomValidity&&M.current.setCustomValidity(te?"":T||Q)}),[te,T,Q]);var ne=r.useCallback((function(e,t){K||f||(z(t),H||f||F(t)),k&&!f&&Object(i.g)(k,e,wt({},j(),{value:t}),{value:t})}),[H,f,k,K,j]),re=r.useCallback((function(e){var t=e.target.checked;ne(e,t)}),[ne,x]),oe=r.useCallback((function(e){if(!f){var t=e.keyCode,n=e.currentTarget.checked;t===i.b.space&&(e.preventDefault(),e.stopPropagation(),ne(e,!n))}}),[f,ne]),ie=r.useCallback((function(e){f||e.keyCode===i.b.space&&e.preventDefault()}),[f]),ae=r.useCallback((function(e){w&&!f&&Object(i.g)(w,e,j(),void 0)}),[w,f,j]),se=r.useCallback((function(e){C&&!f&&Object(i.g)(C,e,j(),void 0)}),[C,f,j]),le=Object(i.q)(M,n.dir),ce=Object(i.e)({"k-state-disabled":f},u),ue=wt({type:"checkbox",className:Object(i.e)({"k-checkbox":!0,"k-state-indeterminate":X,"k-state-invalid k-invalid":!(te||void 0!==D||!0===D)}),ref:M,name:y,id:m||J,"aria-labelledby":l,"aria-describedby":s,checked:Boolean(q),disabled:f,tabIndex:Object(i.k)(O,f),role:"checkbox",required:void 0!==I&&I,"aria-checked":!(!$&&!q)||!!X&&"mixed","aria-disabled":f||void 0},_,{onChange:re,onKeyDown:oe,onKeyUp:ie,onFocus:ae,onBlur:se}),pe=r.createElement(r.Fragment,null,void 0===G?r.createElement("input",wt({},ue)):r.createElement("input",wt({},ue,{value:V?void 0:null===G?"":G}))),de=r.createElement(r.Fragment,null,void 0!==v?r.createElement("label",{className:"k-checkbox-label",htmlFor:m||J,style:{userSelect:"none"}},v,b&&r.createElement("span",{className:"k-label-optional"},ee)):null);return r.createElement(r.Fragment,null,"before"===g?r.createElement("span",{className:ce,dir:"rtl"},pe,de,p):r.createElement("span",{className:ce,dir:le},pe,de,p))}));xt.propTypes={checked:o.bool,className:o.string,defaultChecked:o.bool,defaultValue:o.any,dir:o.string,disabled:o.bool,id:o.string,ariaLabelledBy:o.string,ariaDescribedBy:o.string,label:o.any,labelPlacement:o.string,labelOptional:o.bool,name:o.string,tabIndex:o.number,value:o.any,validationMessage:o.string,required:o.bool,validate:o.bool,valid:o.bool,onChange:o.func,onFocus:o.func,onBlur:o.func},xt.displayName="KendoCheckbox";var St=function(){return(St=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)},Et=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},It=Object(i.f)(),Nt=r.forwardRef((function(e,t){Object(i.v)(a);var n=Object(i.t)(It,e),o=n.ariaDescribedBy,s=n.checked,l=n.children,c=n.className,u=n.disabled,p=n.id,d=n.label,f=n.labelPlacement,h=n.name,m=n.style,v=n.tabIndex,g=n.value,y=n.valid,b=n.onChange,k=n.onFocus,w=n.onBlur,C=Et(n,["ariaDescribedBy","checked","children","className","disabled","id","label","labelPlacement","name","style","tabIndex","value","valid","onChange","onFocus","onBlur"]),O=r.useRef(null),x=r.useCallback((function(){O.current&&O.current.focus()}),[]),S=r.useCallback((function(){return{element:O.current,focus:x}}),[x]);r.useImperativeHandle(t,S);var E=r.useMemo((function(){return Object(i.m)()}),[]),I=r.useCallback((function(e){Object(i.g)(b,e,S(),{value:g})}),[b,g,u]),N=r.useCallback((function(e){k&&!u&&Object(i.g)(k,e,S(),void 0)}),[k,u]),T=r.useCallback((function(e){w&&!u&&Object(i.g)(w,e,S(),void 0)}),[w,u]),D=St({type:"radio",id:p||E,name:h,className:Object(i.e)({"k-radio":!0,"k-state-invalid":!1===y,"k-invalid":!1===y},c),ref:O,disabled:u,tabIndex:Object(i.k)(v,u),checked:s,style:m,"aria-describedby":o,value:g,onChange:I,onFocus:N,onBlur:T},C),_=r.createElement(r.Fragment,null,void 0!==d?r.createElement("label",{className:"k-radio-label",htmlFor:p||E,style:{userSelect:"none"},"aria-label":d},d):null),M=r.createElement("input",St({},D));return"before"===f?r.createElement(r.Fragment,null,_,M,l):r.createElement(r.Fragment,null,M,_,l)}));Nt.propTypes={ariaDescribedBy:o.string,checked:o.bool,className:o.string,disabled:o.bool,id:o.string,label:o.string,labelPlacement:o.string,name:o.string,style:o.object,tabIndex:o.number,value:o.any,valid:o.bool,onChange:o.func,onFocus:o.func,onBlur:o.func},Nt.displayName="KendoRadioButton";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)},Dt=Object(i.f)(),_t=r.forwardRef((function(e,t){Object(i.v)(a);var n=Object(i.t)(Dt,e),o=n.ariaLabelledBy,s=n.ariaDescribedBy,l=n.className,c=n.data,u=n.defaultValue,p=n.disabled,d=n.name,f=n.labelPlacement,h=n.layout,m=n.style,v=n.value,g=n.valid,y=n.item,b=void 0===y?Mt.item:y,k=n.onChange,w=n.onFocus,C=r.useRef(null),O=r.useCallback((function(){C.current&&Object(i.i)(C.current)}),[]),x=r.useCallback((function(){return{element:C.current,focus:O}}),[O]);r.useImperativeHandle(t,x);var S=r.useState(u),E=S[0],I=S[1],N=void 0!==v,T=N?v:E,D=r.useCallback((function(e){var t=e.value;N||p||I(t),k&&!p&&Object(i.g)(k,e.syntheticEvent,x(),{value:t})}),[I,k,p]),_=r.useCallback((function(e){w&&!p&&Object(i.g)(w,e.syntheticEvent,x(),void 0)}),[w,p]),M=r.useMemo((function(){return Object(i.m)()}),[]),P=Object(i.e)("k-radio-list",{"k-list-horizontal":"horizontal"===h,"k-list-vertical":"vertical"===h||void 0===h},l),j=Object(i.u)(C,n.dir),R=c&&c.map((function(e,t){var n=T===e.value,o=null==T,a=Tt({},e,{valid:g,checked:n,disabled:!(!e.disabled&&!p),labelPlacement:e.labelPlacement?e.labelPlacement:f,tabIndex:e.tabIndex?e.tabIndex:o&&0===t||n?0:-1,index:t,name:d||M,onChange:D,onFocus:_});return r.createElement(b,{className:Object(i.e)("k-radio-item",{"k-state-disabled":a.disabled||p}),key:t,role:"radio"},r.createElement(Nt,Tt({},a)))}));return r.createElement("ul",{role:"radiogroup",className:P,ref:C,dir:j,style:m,"aria-labelledby":o,"aria-describedby":s},R)})),Mt={item:function(e){return r.createElement("li",Tt({},e))}};_t.propTypes={ariaLabelledBy:o.string,ariaDescribedBy:o.string,className:o.string,data:o.arrayOf(o.object),defaultValue:o.any,dir:o.string,disabled:o.bool,labelPlacement:o.string,layout:o.string,name:o.string,style:o.object,value:o.any,onChange:o.func,onFocus:o.func},_t.defaultProps=Mt,_t.displayName="KendoRadioGroup";var Pt=function(){return(Pt=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=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=Object(i.f)(),At=r.forwardRef((function(e,t){var n=Object(i.t)(Rt,e),o=n,a=o.ariaDescribedBy,s=o.ariaLabelledBy,l=o.autoSize,c=o.className,u=o.defaultValue,p=o.disabled,d=o.readOnly,f=o.required,h=o.rows,m=o.id,v=o.name,g=o.placeholder,y=o.style,b=o.tabIndex,k=o.value,w=o.valid,C=o.validationMessage,O=o.validityStyles,x=o.onChange,S=o.onFocus,E=o.onBlur,I=(o.visited,o.touched,o.modified,jt(o,["ariaDescribedBy","ariaLabelledBy","autoSize","className","defaultValue","disabled","readOnly","required","rows","id","name","placeholder","style","tabIndex","value","valid","validationMessage","validityStyles","onChange","onFocus","onBlur","visited","touched","modified"])),N=r.useRef(null),T=r.useCallback((function(){N.current&&N.current.focus()}),[]),D=r.useCallback((function(){return{element:N,focus:T,get name(){return N.current&&N.current.name}}}),[T]);r.useImperativeHandle(t,D);var _=r.useState(u),M=_[0],P=_[1],j=r.useState("auto"),R=j[0],A=j[1],F=r.useMemo((function(){return Object(i.m)()}),[]),L=Object(i.q)(N,n.dir),B=void 0!==k,z=B?k:M,V=void 0!==w?w:!f||!!z;r.useEffect((function(){N.current&&N.current.setCustomValidity&&N.current.setCustomValidity(V?"":C||"")}),[V,C]),r.useLayoutEffect((function(){N.current&&A(N.current.scrollHeight+"px")}),[z]);var H=r.useCallback((function(e){var t=e.target.value;B||p||(A("auto"),P(t)),x&&!p&&Object(i.g)(x,e,D(),{value:t})}),[P,x,p,B]),K=r.useCallback((function(e){S&&!p&&Object(i.g)(S,e,D(),void 0)}),[S,p]),W=r.useCallback((function(e){E&&!p&&Object(i.g)(E,e,D(),void 0)}),[E,p]),$={className:Object(i.e)("k-textarea",{"k-state-invalid":!(V||void 0!==O||!0===O),"k-state-disabled":p},c),style:y,dir:L},U=Pt({id:m||F,name:v,className:"k-input",ref:N,disabled:p,rows:h,placeholder:g,readOnly:d,required:f,tabIndex:Object(i.k)(b,p),style:l?{resize:"none",overflow:"hidden",height:R}:{},"aria-labelledby":s,"aria-describedby":a,"aria-multiline":!0,"aria-disabled":p||void 0,value:B?k:M},I,{onChange:H,onFocus:K,onBlur:W});return r.createElement("span",Pt({},$),r.createElement("textarea",Pt({},U)))}));At.propTypes={ariaDescribedBy:o.string,ariaLabelledBy:o.string,autoSize:o.bool,className:o.string,defaultValue:o.string,dir:o.string,disabled:o.bool,readOnly:o.bool,rows:o.number,id:o.string,name:o.string,placeholder:o.string,style:o.object,tabIndex:o.number,value:o.oneOfType([o.string,o.arrayOf(o.string),o.number]),onChange:o.func,onFocus:o.func,onBlur:o.func},At.displayName="KendoTextArea";var Ft=r.forwardRef((function(e,t){var n=r.useRef(null),o=r.useRef(null),a=Object(i.q)(o,e.dir);r.useImperativeHandle(n,(function(){return{element:o.current,props:e,value:e.value}})),r.useImperativeHandle(t,(function(){return n.current}));var s=r.useCallback((function(t){e.onClick&&e.onClick.call(void 0,{value:e.value,target:n.current,syntheticEvent:t})}),[e.onClick,e.value]),l=r.useCallback((function(t){e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onKeyDown]),c=r.useCallback((function(t){e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onFocus]),u=r.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onBlur]),p=r.useCallback((function(t){e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseMove]),d=r.useCallback((function(t){e.onMouseEnter&&e.onMouseEnter.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseEnter]),f=r.useCallback((function(t){e.onMouseLeave&&e.onMouseLeave.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseLeave]);return r.createElement("span",{id:e.id,ref:o,dir:a,"data-half":e.half,tabIndex:e.tabIndex,title:e.title,style:e.style,className:Object(i.e)("k-rating-item",{"k-rtl":"rtl"===a,"k-state-selected":e.selected,"k-state-hovered":e.hovered},e.className),onClick:s,onKeyDown:l,onFocus:c,onBlur:u,onMouseEnter:d,onMouseLeave:f,onMouseMove:p},e.children)})),Lt={id:o.string,icon:o.any,dir:o.oneOf(["ltr","rtl"]),title:o.string,value:o.number,half:o.bool,selected:o.bool,hovered:o.bool};Ft.displayName="KendoReactRatingItem",Ft.propTypes=Lt,Ft.defaultProps={dir:"ltr"};var Bt,zt=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},Vt=function(e,t,n){return zt(e-n,n)<t&&t<e},Ht=function(e,t,n,r){return null!==t&&("continues"===r?Vt(e,t,n)?zt(e-n/2,n/2)<=t:e<=t:"single"===r&&(Vt(e,t,n)?zt(e-n/2,n/2)===t:e===t))},Kt=function(e,t,n){return"ltr"===e?n<t.x+t.width/2:n>t.x+t.width/2},Wt=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"}(Bt||(Bt={}));var $t=function(){return($t=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)},Ut=function(e,t,n){var o=r.useState(e),i=o[0],a=o[1];return[i,function(e){var r=function(e,t){switch(t.type){case Bt.select:return void 0===t.payload||void 0===t.step?e:t.payload===e?null:t.payload>=t.min?t.payload<t.max?zt(t.payload,t.step):t.max:t.min;case Bt.deselect:return null;case Bt.increase:return void 0===t.step?e:e<t.min?t.min:e+t.step<t.max?zt(e+t.step,t.step):t.max;case Bt.decrease:return void 0===t.step?e:zt(e-t.step,t.step)>=t.min?zt(e-t.step,t.step):t.min;case Bt.min:return void 0===t.step?e:t.min;case Bt.max:return t.max;case Bt.reset:return null;default:return e}}(t.state||i,$t({},e,t));n&&n(r,e.event),a(r)}]},qt=Object(i.f)(),Gt=r.forwardRef((function(e,t){var n,o,a,s,l=Object(i.t)(qt,e),c=r.useRef(null),u=r.useRef(null),p=Object(i.q)(u,l.dir);r.useImperativeHandle(c,(function(){return{element:u.current,props:l}})),r.useImperativeHandle(t,(function(){return c.current}));for(var d,f,h=r.useCallback((function(e,t){l.onChange&&c.current&&l.onChange.call(void 0,{value:e,target:c.current,syntheticEvent:t})}),[l.onChange]),m=r.useMemo((function(){return void 0!==l.min?l.min:Jt.min}),[l.min]),v=r.useMemo((function(){return void 0!==l.max?l.max:Jt.max}),[l.max]),g=r.useMemo((function(){return l.precision||Jt.precision}),[l.precision]),y=r.useMemo((function(){return void 0!==l.step?l.step:Jt.step}),[l.step]),b=r.useMemo((function(){return l.readonly||Jt.readonly}),[l.readonly]),k=r.useMemo((function(){return l.disabled||Jt.disabled}),[l.disabled]),w=r.useMemo((function(){return l.item||Jt.item}),[l.item]),C=Ut(l.defaultValue||Jt.defaultValue,{state:l.value,min:m,max:v,step:"half"===g?y/2:y},h),O=C[0],x=C[1],S=Ut(null,{state:l.value,min:m,max:v,step:"half"===g?y/2:y,precision:g}),E=S[0],I=S[1],N=r.useMemo((function(){return l.value||O}),[l.value,O]),T=r.useMemo((function(){return E}),[E]),D=r.useMemo((function(){return l.selection||Jt.selection}),[l.selection]),_=r.useMemo((function(){return y/("half"===g?2:1)}),[y,g]),M=r.useCallback((function(e){if(e.target&&e.target.element&&!b&&!k){if("half"===g){var t=e.target.element.getBoundingClientRect(),n=Kt(p||"ltr",t,e.syntheticEvent.clientX)?zt(e.target.value-y/2,_):e.target.value;x({type:Bt.select,payload:n,event:e.syntheticEvent})}else x({type:Bt.select,payload:e.target.value,event:e.syntheticEvent});l.onClick&&l.onClick.call(void 0,{value:N,target:c.current,syntheticEvent:e.syntheticEvent})}}),[l.onClick,x,N]),P=r.useCallback((function(e){if(!b&&!k){switch(e.keyCode){case i.b.right:e.preventDefault(),x({type:"rtl"===p?Bt.decrease:Bt.increase,event:e});break;case i.b.left:e.preventDefault(),x({type:"rtl"===p?Bt.increase:Bt.decrease,event:e});break;case i.b.home:e.preventDefault(),x({type:"rtl"===p?Bt.min:Bt.max,event:e});break;case i.b.end:e.preventDefault(),x({type:"rtl"===p?Bt.max:Bt.min,event:e});break;case i.b.esc:e.preventDefault(),x({type:Bt.deselect,event:e})}l.onKeyDown&&l.onKeyDown.call(void 0,{value:N,target:c.current,syntheticEvent:e})}}),[l.onKeyDown,x,N]),j=r.useCallback((function(e){l.onFocus&&l.onFocus.call(void 0,{target:c.current,syntheticEvent:e})}),[l.onFocus]),R=r.useCallback((function(e){l.onBlur&&l.onBlur.call(void 0,{target:c.current,syntheticEvent:e})}),[l.onBlur]),A=r.useCallback((function(e){if(e.target&&e.target.element)if("half"===g){var t=e.target.element.getBoundingClientRect(),n=Kt(p||"ltr",t,e.syntheticEvent.clientX)?e.target.value-y/2:e.target.value;I({type:Bt.select,payload:n,event:e.syntheticEvent})}else I({type:Bt.select,payload:e.target.value,event:e.syntheticEvent})}),[g,y,p]),F=r.useCallback((function(e){I({type:Bt.reset,event:e.syntheticEvent})}),[]),L=[],B=(d=zt(v-m,_))-(f=y)*Math.floor(d/f),z=m;z<=v;z=zt(z+y,_)){var V=zt(z+B,_),H="half"===g&&Vt(V,null!==T?T:null!==N?N:0,y),K=Ht(V,N,y,D),W=Ht(V,null!==T?T:N,y,D),$=Ht(V,T,y,D);L.push(r.createElement(w,{key:V,value:V,dir:p,title:String(H?zt(V-y/2,_):V),icon:l.icon,half:H,selected:K||W,hovered:$,onClick:M,onMouseMove:A,onMouseLeave:F},H&&r.createElement("span",{className:"k-rating-precision-complement",style:(n={width:"12px"},n["rtl"===p?"right":"left"]="50%",n)},r.createElement("span",{className:Object(i.e)("k-icon",(o={"k-i-star-outline":!l.icon},o[l.icon+"-outline"]=l.icon,o))})),H&&r.createElement("span",{className:"k-rating-precision-part",style:{width:"12px"}},r.createElement("span",{className:Object(i.e)("k-icon",(a={"k-i-star":!l.icon},a[""+l.icon]=l.icon,a))})),H&&r.createElement("span",{style:{width:"24px",height:"24px",display:"block"}}),!H&&r.createElement("span",{className:Object(i.e)("k-icon",(s={"k-i-star":!l.icon&&($||W&&!$),"k-i-star-outline":!l.icon&&!$},s[""+l.icon]=l.icon&&($||W&&!$),s[l.icon+"-outline"]=l.icon&&!$,s))})))}return r.createElement("span",{id:l.id,style:l.style,ref:u,role:"slider",dir:p,tabIndex:Object(i.k)(l.tabIndex,l.disabled,void 0),className:Object(i.e)("k-rating k-widget",{"k-rtl":"rtl"===p,"k-state-readonly":b,"k-state-disabled":k},l.className),onKeyDown:P,onFocus:j,onBlur:R,"aria-valuemin":m,"aria-valuemax":v,"aria-valuenow":null!==N?N:void 0,"aria-disabled":k?"true":void 0,"aria-labelledby":l.ariaLabelledBy,"aria-describedby":l.ariaDescribedBy},r.createElement("input",{id:"rating",className:"k-hidden",readOnly:b,disabled:k}),r.createElement("span",{className:"k-rating-container"},L),l.label&&r.createElement("span",{className:"k-rating-label"},l.label))})),Xt={id:o.string,dir:o.oneOf(["ltr","rtl"]),selection:o.oneOf(["continues","single"]),precision:o.oneOf(["item","half"]),value:function(e,t,n){if(e.value&&e.min&&e.max&&e.step&&(!("half"===e.precision?Wt(e.min,e.max,e.step/2,e.value):Wt(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:o.number,min:o.number,max:o.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:o.number,label:o.string,readonly:o.bool,disabled:o.bool,half:o.bool,icon:o.string,ariaDescribedBy:o.string},Jt={dir:"ltr",min:1,max:5,step:1,item:Ft,defaultValue:null,readonly:!1,disabled:!1,selection:"continues",precision:"item"};Gt.displayName="KendoReactRating",Gt.propTypes=Xt,Gt.defaultProps=Jt},function(e,t,n){"use strict";n.r(t),n.d(t,"BrowserSupportService",(function(){return o})),n.d(t,"canUseDOM",(function(){return i})),n.d(t,"canUseRef",(function(){return a})),n.d(t,"classNames",(function(){return s})),n.d(t,"cloneDate",(function(){return l})),n.d(t,"clone",(function(){return c})),n.d(t,"cloneObject",(function(){return u})),n.d(t,"cloneValue",(function(){return p})),n.d(t,"cloneArray",(function(){return d})),n.d(t,"Draggable",(function(){return I})),n.d(t,"focusFirstFocusableChild",(function(){return N})),n.d(t,"FormComponent",(function(){return T})),n.d(t,"getTabIndex",(function(){return D})),n.d(t,"getter",(function(){return j})),n.d(t,"guid",(function(){return R})),n.d(t,"Keys",(function(){return A})),n.d(t,"noop",(function(){return F})),n.d(t,"getScrollbarWidth",(function(){return L})),n.d(t,"setScrollbarWidth",(function(){return B})),n.d(t,"setter",(function(){return H})),n.d(t,"mapTree",(function(){return $})),n.d(t,"mapTreeItem",(function(){return U})),n.d(t,"extendDataItem",(function(){return q})),n.d(t,"getItemPath",(function(){return G})),n.d(t,"validatePackage",(function(){return J})),n.d(t,"hasRelativeStackingContext",(function(){return Y})),n.d(t,"dispatchEvent",(function(){return Z})),n.d(t,"AsyncFocusBlur",(function(){return te})),n.d(t,"useDir",(function(){return ne})),n.d(t,"useAsyncFocusBlur",(function(){return Q})),n.d(t,"useDraggable",(function(){return re})),n.d(t,"useRtl",(function(){return oe})),n.d(t,"useMouse",(function(){return ie})),n.d(t,"useCustomComponent",(function(){return ae})),n.d(t,"Icon",(function(){return ue})),n.d(t,"SvgIcon",(function(){return he})),n.d(t,"Typography",(function(){return Ie}));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=" ",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}(),i=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),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=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?s.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},l=function(e){return e?new Date(e.getTime()):null};function c(e){var t={};return u(e,t),t}function u(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 d(e);if(e instanceof Date)return l(e);if(e&&"object"==typeof e){var n=t||{};return u(e,n),n}return e}function d(e){return e.map((function(e){return p(e,void 0)}))}var f=n(0),h=n(1),m=function(e,t){return function(n){return t(e(n))}},v=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},g=function(e,t,n){return e&&e.removeEventListener&&e.removeEventListener(t,n)},y=function(){},b=function(e){return e.preventDefault()},k=/touch/;function w(e){return e.type.match(k)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var C=function(e){var t=this,n=e.press;void 0===n&&(n=y);var r=e.drag;void 0===r&&(r=y);var o=e.release;void 0===o&&(o=y);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=m(w,n),this._dragHandler=m(w,r),this._releaseHandler=m(w,o),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(v(t.document,"mousemove",t._mousemove),v(t.document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){g(t.document,"mousemove",t._mousemove),g(t.document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(v(t.document,"pointermove",t._pointermove),v(t.document,"pointerup",t._pointerup),v(t.document,"pointercancel",t._pointerup),v(t.document,"contextmenu",b),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(g(t.document,"pointermove",t._pointermove),g(t.document,"pointerup",t._pointerup),g(t.document,"pointercancel",t._pointerup),g(t.document,"contextmenu",b),t._releaseHandler(e))}},O={document:{configurable:!0}};C.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},O.document.get=function(){return this._element?this._element.ownerDocument:document},C.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},C.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?v(e,"pointerdown",this._pointerdown):(v(e,"mousedown",this._mousedown),this._mouseOnly||(v(e,"touchstart",this._touchstart),v(e,"touchmove",this._touchmove),v(e,"touchend",this._touchend)))},C.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return g(e,"pointerdown",this._pointerdown),g(this.document,"pointermove",this._pointermove),g(this.document,"pointerup",this._pointerup),g(this.document,"contextmenu",b),void g(this.document,"pointercancel",this._pointerup);g(e,"mousedown",this._mousedown),this._mouseOnly||(g(e,"touchstart",this._touchstart),g(e,"touchmove",this._touchmove),g(e,"touchend",this._touchend))},C.prototype._usePointers=function(){return!this._mouseOnly&&C.supportPointerEvent()},C.prototype.update=function(e){var t=e.press;void 0===t&&(t=y);var n=e.drag;void 0===n&&(n=y);var r=e.release;void 0===r&&(r=y);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=m(w,t),this._dragHandler=m(w,n),this._releaseHandler=m(w,r),this._mouseOnly=o},C.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(C.prototype,O),C.default=C;var x,S=C,E=(x=function(e,t){return(x=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}x(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),I=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new S({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t.childRef=function(e){var n=t.props.childRef;t.element=e,n&&"function"==typeof n&&n(e)},t}return E(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){return f.cloneElement(f.Children.only(this.props.children),{ref:this.childRef})},t.propTypes={children:h.element.isRequired},t}(f.Component),N=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()}},T=function(){},D=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},_=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function M(e){var t=[];return e.replace(_,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}var P={};function j(e){if(P[e])return P[e];var t=M(e);return P[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},P[e]}P.undefined=function(){};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},A={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},F=function(){},L=function(){return!(!i||!document.body)&&(new o).scrollbarWidth},B=function(){if(!i||!document.body)return!1;var e=(new o).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},z={undefined:function(e){return e}},V=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function H(e){if(z[e])return z[e];var t=M(e);return z[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]]||V(t[a+1],r);o[t[i]]=n},z[e]}var 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)};function W(e,t,n){var r;return n?K({},e,((r={})[t]=n.length?n.slice():void 0,r)):e&&e[t]?e[t].slice():[]}var $=function(e,t,n){return e.map((function(e){return function e(t,n,r){if(t[n]){var o=W(t,n).map((function(t){return e(t,n,r)}));return r(W(t,n,o))}return r(t)}(e,t,n)})).slice()},U=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)},q=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},G=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},X=n(6);function J(e){if(void 0!==X)X.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)}}var Y=function(e){if(!i)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};function Z(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}function Q(e){var t=e.onFocus,n=e.onBlur,r=e.onSyncFocus,o=e.onSyncBlur,i=f.useRef(!1),a=f.useRef(0),s=f.useCallback((function(e){clearTimeout(a.current),a.current=window.setTimeout((function(){return e()}))}),[a]),l=f.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(a.current),r&&r.call.apply(r,[void 0].concat(e)),i.current||(i.current=!0,t&&t.call.apply(t,[void 0].concat(e)))}),[i,t,r]),c=f.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o&&o.call.apply(o,[void 0].concat(e)),s((function(){i.current&&n&&(i.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[i,s,n,o]);return f.useEffect((function(){return function(){clearTimeout(a.current)}}),[]),{onFocus:l,onBlur:c}}var ee=function(){return(ee=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)},te=function(e){var t=e.children,n=Q({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return t.call(void 0,ee({},n))};function ne(e,t,n){var r=f.useState(t),o=r[0],i=r[1];return f.useEffect((function(){if(!o&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),o}function re(e,t){var n=t.onPress,r=t.onDrag,o=t.onRelease,i=f.useMemo((function(){return new S({press:n,drag:r,release:o})}),[]);f.useEffect((function(){var t=e.current;if(t)return i.bindTo(t),function(){i.destroy()}}),[]),f.useEffect((function(){i.update({press:n,drag:r,release:o})}),[n,r,o])}function oe(e,t,n){var r=f.useState(t),o=r[0],i=r[1];return f.useEffect((function(){if(!o&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),o}var ie=function(e,t,n){void 0===n&&(n={});var r=f.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]),o=f.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:f.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:o,onMouseDown:r,onDoubleClick:f.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:f.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:f.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:f.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:f.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:f.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])}},ae=function(e){return f.isValidElement(e)?[e.type,e.props]:[e,{}]},se={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},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=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},ue=f.forwardRef((function(e,t){var n=e.className,r=e.name,o=e.themeColor,i=e.size,a=e.flip,l=e.style,c=ce(e,["className","name","themeColor","size","flip","style"]),u=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(u,(function(){return{element:p.current}})),f.useImperativeHandle(t,(function(){return u.current}));var d=f.useMemo((function(){return o||pe.themeColor}),[o]),h=f.useMemo((function(){return i||pe.size}),[i]),m=f.useMemo((function(){return a||pe.flip}),[a]),v=f.useMemo((function(){return s("k-icon","k-i-"+r,"k-color-"+d,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},se[h],n)}),[r,d,h,m,n]),g=ie(e,u);return f.createElement("span",le({ref:p},c,g,{className:v,style:l,role:"presentation"}))}));ue.propTypes={style:h.object,classNames:h.string,name:h.string,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var pe={size:"default",themeColor:"inherit",flip:"default"};ue.displayName="KendoIcon";var de=function(){return(de=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=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},he=f.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.svgClassName,i=e.icon,a=e.flip,l=e.size,c=e.style,u=e.svgStyle,p=e.themeColor,d=e.viewBox,h=fe(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=f.useRef(null);f.useImperativeHandle(t,(function(){return{element:m.current}}));var v=f.useMemo((function(){return i?i.name:me.icon}),[i]),g=f.useMemo((function(){return p||me.themeColor}),[p]),y=f.useMemo((function(){return l||me.size}),[l]),b=f.useMemo((function(){return a||me.flip}),[a]),k=f.useMemo((function(){return d||me.viewBox}),[d]),w=f.useMemo((function(){return s("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},se[y],r)}),[v,g,y,b,r]),C=f.useMemo((function(){return e.width&&e.height?de({width:e.width,height:e.height},c):e.width?de({width:e.width,height:e.width},c):e.height?de({width:e.height,height:e.height},c):de({},c)}),[e.width,e.height,c]);return f.createElement("span",{className:w,style:C,ref:m},f.createElement("svg",de({className:o,style:u,"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))}));he.propTypes={style:h.object,classNames:h.string,children:h.any,icon:h.object,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var me={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};he.displayName="KendoSvgIcon";var ve={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},ge={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},ye={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"},be={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},ke={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},we={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},Ce={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"},xe=function(){return(xe=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)},Se=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=function(e){var t=f.forwardRef((function(t,n){var r=t.className,o=t.fontSize,i=t.fontWeight,a=t.textAlign,s=t.textTransform,l=t.themeColor,c=t.margin,u=Se(t,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),p=f.useRef(null),d=f.useRef(null);f.useImperativeHandle(p,(function(){return{element:d.current,props:t}})),f.useImperativeHandle(n,(function(){return p.current}));var h=e,m=function(){if(void 0!==c){if("string"==typeof c)return[ye[c]];if("number"==typeof c&&c>=0&&c<=24)return["k-m-"+c];if("object"==typeof c){var e=[];return Object.keys(c).forEach((function(t){var n,r;null!==c[t]&&void 0!==c[t]&&e.push((n=t,r=c[t],""+ke[n]+("string"==typeof r?be[r]:r)))})),e.join(" ")}}};return f.createElement(h,xe({ref:d,className:["k-"+("p"===e?"paragraph":e),ve[o],ge[i],we[a],Ce[s],Oe[l],m(),r].filter((function(e){return void 0!==e})).join(" ")},u),t.children)}));return t.propTypes={style:h.object,className:h.string,fontSize:h.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:h.oneOf(["light","normal","bold"]),margin:h.oneOfType([h.number,h.object,h.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:h.oneOf(["left","right","center","justify"]),textTransform:h.oneOf(["lowercase","uppercase","capitalize"]),themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},Ie={h1:Ee("h1"),h2:Ee("h2"),h3:Ee("h3"),h4:Ee("h4"),h5:Ee("h5"),h6:Ee("h6"),p:Ee("p"),code:Ee("code"),pre:Ee("pre")}},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 B})),n.d(t,"TreeListPDFExport",(function(){return W}));var r=n(0),o=n(1),i=n(11);function a(e,t,n){void 0===n&&(n={});var r=p;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 p(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 d,f=(d=function(e,t){return(d=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}d(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(25),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(6),k={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1639493984,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(13),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}}},D=N("TABLE"),_=function(e){return e?"locked":"wrap"},M=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-"+_(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-"+_(e)))},e.prototype.table=function(){return T(this.element,D)},e}(),P=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++)P(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++)P(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 M(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,p)}function p(){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 L=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)}}(),B=function(e){function t(t){var n=e.call(this,t)||this;return n.saveGridPDF=F(n.getSavePDF()),n}return L(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),z=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,z)},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,p)}function p(){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((d=n.allPages&&i?{data:i,take:Number.MAX_VALUE,skip:0}:{},f={style:Object.assign({},t.props.style,{width:"1000px"})},h=Object.assign({},d,f),a&&a.length>0?r.cloneElement(t,Object.assign({},h,{columns:a})):r.cloneElement(t,h)),l,u);var d,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)}])}));
|
|
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=40)}([function(t,n){t.exports=e},function(e,n){e.exports=t},,function(e,t){e.exports=n},function(e,t,n){"use strict";function r(e){this.content=e}n.r(t),n.d(t,"getHtml",(function(){return Tt})),n.d(t,"setHtml",(function(){return Dt})),n.d(t,"parseContent",(function(){return Nt})),n.d(t,"trimWhitespace",(function(){return xt})),n.d(t,"htmlToFragment",(function(){return St})),n.d(t,"domToPmDoc",(function(){return It})),n.d(t,"pmDocToFragment",(function(){return Et})),n.d(t,"applyInlineStyle",(function(){return ln})),n.d(t,"getInlineStyles",(function(){return on})),n.d(t,"toggleInlineFormat",(function(){return sn})),n.d(t,"applyLink",(function(){return un})),n.d(t,"removeLink",(function(){return cn})),n.d(t,"insertText",(function(){return pn})),n.d(t,"insertImage",(function(){return dn})),n.d(t,"alignBlocks",(function(){return Cn})),n.d(t,"isAligned",(function(){return On})),n.d(t,"cleanFormatting",(function(){return xn})),n.d(t,"hasNode",(function(){return bn})),n.d(t,"activeNode",(function(){return wn})),n.d(t,"formatBlockElements",(function(){return mn})),n.d(t,"getBlockFormats",(function(){return gn})),n.d(t,"parentBlockFormat",(function(){return kn})),n.d(t,"changeTextBlock",(function(){return fn})),n.d(t,"blockNodes",(function(){return hn})),n.d(t,"cleanTextBlockFormatting",(function(){return vn})),n.d(t,"hasMark",(function(){return Yt})),n.d(t,"getMark",(function(){return en})),n.d(t,"getActiveMarks",(function(){return tn})),n.d(t,"removeAllMarks",(function(){return Xt})),n.d(t,"cleanMarks",(function(){return Jt})),n.d(t,"selectionMarks",(function(){return Qt})),n.d(t,"indent",(function(){return Ir})),n.d(t,"canIndentAsListItem",(function(){return xr})),n.d(t,"outdent",(function(){return Nr})),n.d(t,"canOutdentAsListItem",(function(){return Sr})),n.d(t,"isIndented",(function(){return Or})),n.d(t,"canBeIndented",(function(){return Er})),n.d(t,"indentBlocks",(function(){return Cr})),n.d(t,"toggleOrderedList",(function(){return jr})),n.d(t,"toggleUnorderedList",(function(){return Rr})),n.d(t,"toggleList",(function(){return Pr})),n.d(t,"blockquote",(function(){return kr})),n.d(t,"liftBlockquote",(function(){return wr})),n.d(t,"hasSameMarkup",(function(){return Lt})),n.d(t,"getSelectionText",(function(){return Bt})),n.d(t,"getNodeFromSelection",(function(){return zt})),n.d(t,"selectedLineTextOnly",(function(){return Vt})),n.d(t,"expandSelection",(function(){return Wt})),n.d(t,"expandToWordWrap",(function(){return $t})),n.d(t,"canInsert",(function(){return Rt})),n.d(t,"insertNode",(function(){return Ft})),n.d(t,"indentHtml",(function(){return Ht})),n.d(t,"alignLeftRules",(function(){return Fr})),n.d(t,"alignCenterRules",(function(){return Br})),n.d(t,"alignRightRules",(function(){return Lr})),n.d(t,"alignJustifyRules",(function(){return zr})),n.d(t,"alignRemoveRules",(function(){return Vr})),n.d(t,"indentRules",(function(){return zn})),n.d(t,"outdentRules",(function(){return Vn})),n.d(t,"nodes",(function(){return Pl})),n.d(t,"marks",(function(){return _l})),n.d(t,"buildKeymap",(function(){return Oc})),n.d(t,"buildListKeymap",(function(){return xc})),n.d(t,"bold",(function(){return mc})),n.d(t,"italic",(function(){return vc})),n.d(t,"underline",(function(){return gc})),n.d(t,"strikethrough",(function(){return yc})),n.d(t,"subscript",(function(){return bc})),n.d(t,"superscript",(function(){return kc})),n.d(t,"link",(function(){return wc})),n.d(t,"sanitize",(function(){return Rc})),n.d(t,"removeComments",(function(){return jc})),n.d(t,"removeTag",(function(){return Ac})),n.d(t,"pasteCleanup",(function(){return Hc})),n.d(t,"sanitizeClassAttr",(function(){return Lc})),n.d(t,"sanitizeStyleAttr",(function(){return Vc})),n.d(t,"removeAttribute",(function(){return Fc})),n.d(t,"replaceImageSourcesFromRtf",(function(){return Jc})),n.d(t,"convertMsLists",(function(){return Pc})),n.d(t,"createTable",(function(){return Yc})),n.d(t,"find",(function(){return Qc})),n.d(t,"findAt",(function(){return Zc})),n.d(t,"findAll",(function(){return eu})),n.d(t,"replace",(function(){return tu})),n.d(t,"replaceAll",(function(){return nu})),n.d(t,"placeholder",(function(){return au})),n.d(t,"spacesFix",(function(){return cu})),n.d(t,"textHighlight",(function(){return pu})),n.d(t,"textHighlightKey",(function(){return uu})),n.d(t,"imageResizing",(function(){return ku})),n.d(t,"imageResizeKey",(function(){return du})),n.d(t,"autoJoin",(function(){return dr})),n.d(t,"baseKeymap",(function(){return br})),n.d(t,"chainCommands",(function(){return fr})),n.d(t,"createParagraphNear",(function(){return nr})),n.d(t,"deleteSelection",(function(){return Hn})),n.d(t,"exitCode",(function(){return tr})),n.d(t,"joinBackward",(function(){return Kn})),n.d(t,"joinDown",(function(){return Yn})),n.d(t,"joinForward",(function(){return qn})),n.d(t,"joinUp",(function(){return Jn})),n.d(t,"lift",(function(){return Zn})),n.d(t,"liftEmptyBlock",(function(){return rr})),n.d(t,"macBaseKeymap",(function(){return gr})),n.d(t,"newlineInCode",(function(){return Qn})),n.d(t,"pcBaseKeymap",(function(){return vr})),n.d(t,"selectAll",(function(){return sr})),n.d(t,"selectNodeBackward",(function(){return $n})),n.d(t,"selectNodeForward",(function(){return Gn})),n.d(t,"selectParentNode",(function(){return ar})),n.d(t,"setBlockType",(function(){return ur})),n.d(t,"splitBlock",(function(){return or})),n.d(t,"splitBlockKeepMarks",(function(){return ir})),n.d(t,"toggleMark",(function(){return pr})),n.d(t,"wrapIn",(function(){return cr})),n.d(t,"dropCursor",(function(){return wu})),n.d(t,"GapCursor",(function(){return Ou})),n.d(t,"gapCursor",(function(){return Su})),n.d(t,"HistoryState",(function(){return zl})),n.d(t,"closeHistory",(function(){return Gl})),n.d(t,"history",(function(){return Yl})),n.d(t,"redo",(function(){return Ql})),n.d(t,"redoDepth",(function(){return tc})),n.d(t,"undo",(function(){return Zl})),n.d(t,"undoDepth",(function(){return ec})),n.d(t,"InputRule",(function(){return nc})),n.d(t,"closeDoubleQuote",(function(){return cc})),n.d(t,"closeSingleQuote",(function(){return pc})),n.d(t,"ellipsis",(function(){return sc})),n.d(t,"emDash",(function(){return ac})),n.d(t,"inputRules",(function(){return rc})),n.d(t,"openDoubleQuote",(function(){return lc})),n.d(t,"openSingleQuote",(function(){return uc})),n.d(t,"smartQuotes",(function(){return dc})),n.d(t,"textblockTypeInputRule",(function(){return hc})),n.d(t,"undoInputRule",(function(){return ic})),n.d(t,"wrappingInputRule",(function(){return fc})),n.d(t,"keydownHandler",(function(){return no})),n.d(t,"keymap",(function(){return to})),n.d(t,"ContentMatch",(function(){return P})),n.d(t,"DOMParser",(function(){return ee})),n.d(t,"DOMSerializer",(function(){return pe})),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 q})),n.d(t,"ReplaceError",(function(){return p})),n.d(t,"ResolvedPos",(function(){return w})),n.d(t,"Schema",(function(){return Z})),n.d(t,"Slice",(function(){return d})),n.d(t,"addListNodes",(function(){return _n})),n.d(t,"bulletList",(function(){return Tn})),n.d(t,"liftListItem",(function(){return jn})),n.d(t,"listItem",(function(){return Dn})),n.d(t,"orderedList",(function(){return Nn})),n.d(t,"sinkListItem",(function(){return An})),n.d(t,"splitListItem",(function(){return Rn})),n.d(t,"wrapInList",(function(){return Pn})),n.d(t,"AllSelection",(function(){return st})),n.d(t,"EditorState",(function(){return vt})),n.d(t,"NodeSelection",(function(){return it})),n.d(t,"Plugin",(function(){return bt})),n.d(t,"PluginKey",(function(){return Ct})),n.d(t,"Selection",(function(){return et})),n.d(t,"SelectionRange",(function(){return nt})),n.d(t,"TextSelection",(function(){return rt})),n.d(t,"Transaction",(function(){return pt})),n.d(t,"CellSelection",(function(){return ks})),n.d(t,"TableMap",(function(){return Qa})),n.d(t,"TableView",(function(){return dl})),n.d(t,"__clipCells",(function(){return Ss})),n.d(t,"__insertCells",(function(){return Ns})),n.d(t,"__pastedCells",(function(){return Os})),n.d(t,"addColSpan",(function(){return ys})),n.d(t,"addColumn",(function(){return Ks})),n.d(t,"addColumnAfter",(function(){return $s})),n.d(t,"addColumnBefore",(function(){return Ws})),n.d(t,"addRow",(function(){return Xs})),n.d(t,"addRowAfter",(function(){return Ys})),n.d(t,"addRowBefore",(function(){return Js})),n.d(t,"cellAround",(function(){return ss})),n.d(t,"colCount",(function(){return hs})),n.d(t,"columnIsHeader",(function(){return bs})),n.d(t,"columnResizing",(function(){return ml})),n.d(t,"columnResizingPluginKey",(function(){return hl})),n.d(t,"deleteColumn",(function(){return qs})),n.d(t,"deleteRow",(function(){return Qs})),n.d(t,"deleteTable",(function(){return pl})),n.d(t,"findCell",(function(){return fs})),n.d(t,"fixTables",(function(){return Vs})),n.d(t,"fixTablesKey",(function(){return zs})),n.d(t,"goToNextCell",(function(){return ul})),n.d(t,"handlePaste",(function(){return js})),n.d(t,"inSameTable",(function(){return ds})),n.d(t,"isInTable",(function(){return ls})),n.d(t,"mergeCells",(function(){return tl})),n.d(t,"moveCellForward",(function(){return ps})),n.d(t,"nextCell",(function(){return ms})),n.d(t,"pointsAtCell",(function(){return us})),n.d(t,"removeColSpan",(function(){return gs})),n.d(t,"removeColumn",(function(){return Us})),n.d(t,"removeRow",(function(){return Zs})),n.d(t,"rowIsHeader",(function(){return Gs})),n.d(t,"selectedRect",(function(){return Hs})),n.d(t,"selectionCell",(function(){return cs})),n.d(t,"setAttr",(function(){return vs})),n.d(t,"setCellAttr",(function(){return ol})),n.d(t,"splitCell",(function(){return nl})),n.d(t,"splitCellWithType",(function(){return rl})),n.d(t,"tableEditing",(function(){return wl})),n.d(t,"tableEditingKey",(function(){return as})),n.d(t,"tableNodeTypes",(function(){return is})),n.d(t,"tableNodes",(function(){return rs})),n.d(t,"toggleHeader",(function(){return al})),n.d(t,"toggleHeaderCell",(function(){return cl})),n.d(t,"toggleHeaderColumn",(function(){return ll})),n.d(t,"toggleHeaderRow",(function(){return sl})),n.d(t,"updateColumnsOnResize",(function(){return fl})),n.d(t,"AddMarkStep",(function(){return ze})),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 Re})),n.d(t,"canSplit",(function(){return Pe})),n.d(t,"dropPoint",(function(){return Le})),n.d(t,"findWrapping",(function(){return Me})),n.d(t,"insertPoint",(function(){return Fe})),n.d(t,"joinPoint",(function(){return Ae})),n.d(t,"liftTarget",(function(){return De})),n.d(t,"replaceStep",(function(){return He})),n.d(t,"Decoration",(function(){return Sa})),n.d(t,"DecorationSet",(function(){return Ta})),n.d(t,"EditorView",(function(){return Ha})),n.d(t,"__endComposition",(function(){return ma})),n.d(t,"__parseFromClipboard",(function(){return Bi})),n.d(t,"__serializeForClipboard",(function(){return Li})),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,p=Math.min(s.text.length,l.text.length);u<p&&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 d=e(s.content,l.content,r-1,o-1);if(d)return d}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 p(e){var t=Error.call(this,e);return t.__proto__=p.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=[],p.prototype=Object.create(Error.prototype),p.prototype.constructor=p,p.prototype.name="ReplaceError";var d=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 p("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new p("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,p=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,p,n,o))}var d=t.parent,f=d.content;return b(d,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 p("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 p("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},d.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 d(n,this.openStart,this.openEnd)},d.prototype.removeBetween=function(e,t){return new d(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)},d.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},d.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},d.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},d.fromJSON=function(e,t){if(!t)return d.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 d(i.fromJSON(e,t.content),n,r)},d.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 d(e,n,r)},Object.defineProperties(d.prototype,f),d.empty=new d(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},D={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}};D.nodeSize.get=function(){return this.isLeaf?1:2+this.content.size},D.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)},D.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)},D.firstChild.get=function(){return this.content.firstChild},D.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 d.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 d(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},D.isBlock.get=function(){return this.type.isBlock},D.isTextblock.get=function(){return this.type.isTextblock},D.inlineContent.get=function(){return this.type.inlineContent},D.isInline.get=function(){return this.type.isInline},D.isText.get=function(){return this.type.isText},D.isLeaf.get=function(){return this.type.isLeaf},D.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()+")"),_(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,D);var M=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):_(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 _(e,t){for(var n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}var P=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},R={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};P.parse=function(e,t){var n=new j(e,t);if(null==n.next)return P.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 P(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,p=0;p<t.min;p++){var d=n();o(e(t.expr,u),d),u=d}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},P.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},P.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},R.inlineContent.get=function(){var e=this.next[0];return!!e&&e.isInline},R.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}},P.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},P.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],p=a.next[c+1];if(!u.isText&&!u.hasRequiredAttrs()&&-1==r.indexOf(p)){r.push(p);var d=o(p,s.concat(u));if(d)return d}}}(this,[])},P.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},P.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)}}},R.edgeCount.get=function(){return this.next.length>>1},P.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]}},P.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(P.prototype,R),P.empty=new P(!0);var j=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(L(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function L(e){var t=[];do{t.push(B(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function B(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 z(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=z(e),r=n;return e.eat(",")&&(r="}"!=e.next?z(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 U(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]},j.prototype.eat=function(e){return this.next==e&&(this.pos++||!0)},j.prototype.err=function(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")},Object.defineProperties(j.prototype,A);var q=function(e,t,n){this.name=e,this.schema=t,this.spec=n,this.groups=n.group?n.group.split(" "):[],this.attrs=U(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}};G.isInline.get=function(){return!this.isBlock},G.isTextblock.get=function(){return this.isBlock&&this.inlineContent},G.isLeaf.get=function(){return this.contentMatch==P.empty},G.isAtom.get=function(){return this.isLeaf||this.spec.atom},q.prototype.hasRequiredAttrs=function(){for(var e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1},q.prototype.compatibleContent=function(e){return this==e||this.contentMatch.compatible(e.contentMatch)},q.prototype.computeAttrs=function(e){return!e&&this.defaultAttrs?this.defaultAttrs:$(this.attrs,e)},q.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))},q.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))},q.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},q.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},q.prototype.allowsMarkType=function(e){return null==this.markSet||this.markSet.indexOf(e)>-1},q.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},q.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},q.compile=function(e,t){var n=Object.create(null);e.forEach((function(e,r){return n[e]=new q(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(q.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=U(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=q.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]=P.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 q))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 M(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),d.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){return(e?1:0)|("full"===e?2:0)}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(t.preserveWhitespace)|(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=null==r?-5&o.options:oe(r);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 pe=function(e,t){this.nodes=e||{},this.marks=t||{}};function de(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}pe.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},pe.prototype.serializeNodeInner=function(e,t){void 0===t&&(t={});var n=pe.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},pe.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},pe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&pe.renderSpec(fe(n),r(e,t))},pe.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 p=l;p<t.length;p++){var d=t[p];if(0===d){if(p<t.length-1||p>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var f=pe.renderSpec(e,d,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}},pe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new pe(this.nodesFromSchema(e),this.marksFromSchema(e)))},pe.nodesFromSchema=function(e){var t=de(e.nodes);return t.text||(t.text=function(e){return e.text}),t},pe.marksFromSchema=function(e){return de(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){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};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 p=s+r+((l?e==s?-1:e==u?1:t:t)<0?0:c);if(n)return p;var d=e==(t<0?s:u)?null:a/3+(e-s)*he;return new ve(p,t<0?e!=s:e!=u,d)}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 p)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?d.empty:new d(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?d.empty:new d(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,d.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,d.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 De(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 Me(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(_e).concat({type:t,attrs:n}).concat(i.map(_e)):null}function _e(e){return{type:e,attrs:null}}function Pe(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 p=c.content.cutByIndex(u,c.childCount),d=r&&r[l]||c;if(d!=c&&(p=p.replaceChild(0,d.type.create(d.attrs))),!c.canReplace(u+1,c.childCount)||!d.type.validContent(p))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 Re(e,t){var n=e.resolve(t),r=n.index();return je(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function je(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&&je(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 Le(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),p=!1;if(1==a)p=u.canReplace(c,c,o);else{var d=u.contentMatchAt(c).findWrapping(o.firstChild.type);p=d&&u.canReplaceWith(c,c,d[0])}if(p)return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function Be(e,t,n){for(var r=[],o=0;o<e.childCount;o++){var a=e.child(o);a.content.size&&(a=a.copy(Be(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,p=0,f=o,h=!1;f>t;f--)h||n.index(f)>0?(h=!0,u=i.from(n.node(f).copy(u)),p++):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 d(u.append(m),p,v),u.size-p,!0))},ke.prototype.wrap=function(e,t){for(var n=i.empty,r=t.length-1;r>=0;r--)n=i.from(t[r].type.create(t[r].attrs,n));var o=e.start,a=e.end;return this.step(new Ie(o,a,o,a,new d(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 d(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 d(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 d(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,d.empty,!0);return this.step(n)};var ze=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 d(Be(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",ze);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 d(Be(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 ze(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=d.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 p=Math.max(l,e),d=Math.min(l+r.nodeSize,t),f=n.addToSet(u),h=0;h<u.length;h++)u[h].isInSet(f)||(a&&a.to==p&&a.mark.eq(u[h])?a.to=d:o.push(a=new Ve(p,d,u[h])));s&&s.to==p?s.to=d:i.push(s=new ze(p,d,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),p=0;p<s.length;p++){for(var d=s[p],f=void 0,h=0;h<o.length;h++){var m=o[h];m.step==i-1&&d.eq(o[h].style)&&(f=m)}f?(f.to=u,f.step=i):o.push({style:d,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 p=0;p<l.marks.length;p++)t.allowsMarkType(l.marks[p].type)||this.step(new Ve(a,c,l.marks[p]))}else o.push(new Ee(a,c,d.empty));a=c}if(!n.validEnd){var f=n.fillBefore(i.empty,!0);this.replace(a,a,new d(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=d.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 d(i.from(n),0,0))},ke.prototype.delete=function(e,t){return this.replace(e,t,d.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 Ue(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(Ue(e.firstChild.content,t-1,n)))}function qe(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(qe(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,t,n,r,o){if(t<n){var a=e.firstChild;e=e.replaceChild(0,a.copy(Ye(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 Ze(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 d(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 d(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 d(Ue(t,n-1,1),n-1,i?n-1:r)}else this.unplaced=new d(Ue(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,p=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);p<c.childCount;){var b=c.child(p),k=m.matchType(b.type);if(!k)break;(++p>1||0==u||b.content.size)&&(m=k,f.push(Xe(b.mark(v.allowedMarks(b.marks)),1==p?u:0,p==c.childCount?y:-1)))}var w=p==c.childCount;w||(y=-1),this.placed=qe(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?d.empty:new d(Ue(l.content,t-1,1),t-1,y<0?l.openEnd:t-1):new d(Ue(l.content,t,p),l.openStart,l.openEnd)},We.prototype.mustMoveInline=function(){if(!this.$to.parent.isTextblock||this.$to.end()==this.$to.pos)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=qe(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=qe(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=qe(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=Ze(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.isolating)break;i.indexOf(s)>-1?a=s:r.before(s)==l&&i.splice(1,0,-s)}for(var u=i.indexOf(a),p=[],f=n.openStart,h=n.content,m=0;;m++){var v=h.firstChild;if(p.push(v),m==n.openStart)break;h=v.content}f>0&&p[f-1].type.spec.defining&&r.node(u).type!=p[f-1].type?f-=1:f>=2&&p[f-1].isTextblock&&p[f-2].type.spec.defining&&r.node(u).type!=p[f-2].type&&(f-=2);for(var g=n.openStart;g>=0;g--){var y=(g+f+1)%(n.openStart+1),b=p[y];if(b)for(var k=0;k<i.length;k++){var w=i[(k+u)%i.length],C=!0;w<0&&(C=!1,w=-w);var O=r.node(w-1),x=r.index(w-1);if(O.canReplaceWith(x,x,b.type,b.marks))return this.replace(r.before(w),C?o.after(w):t,new d(Ye(n.content,0,n.openStart,y),y,n.openEnd))}}for(var S=this.steps.length,E=i.length-1;E>=0&&(this.replace(e,t,n),!(this.steps.length>S));E--){var I=i[E];I<0||(e=r.before(I),t=o.after(I))}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 d(i.from(n),0,0))},ke.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=Ze(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 Qe=Object.create(null),et=function(e,t,n){this.ranges=n||[new nt(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},tt={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};tt.anchor.get=function(){return this.$anchor.pos},tt.head.get=function(){return this.$head.pos},tt.from.get=function(){return this.$from.pos},tt.to.get=function(){return this.$to.pos},tt.$from.get=function(){return this.ranges[0].$from},tt.$to.get=function(){return this.ranges[0].$to},tt.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},et.prototype.content=function(){return this.$from.node(0).slice(this.from,this.to,!0)},et.prototype.replace=function(e,t){void 0===t&&(t=d.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,p=e.mapping.slice(i);e.replaceRange(p.map(c.pos),p.map(u.pos),s?d.empty:t),0==s&&ut(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}},et.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),ut(e,n,t.isInline?-1:1))}},et.findFrom=function(e,t,n){var r=e.parent.inlineContent?new rt(e):ct(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?ct(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):ct(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},et.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new st(e.node(0))},et.atStart=function(e){return ct(e,e,0,0,1)||new st(e)},et.atEnd=function(e){return ct(e,e,e.content.size,e.childCount,-1)||new st(e)},et.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=Qe[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},et.jsonID=function(e,t){if(e in Qe)throw new RangeError("Duplicate use of selection JSON ID "+e);return Qe[e]=t,t.prototype.jsonID=e,t},et.prototype.getBookmark=function(){return rt.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(et.prototype,tt),et.prototype.visible=!0;var nt=function(e,t){this.$from=e,this.$to=t},rt=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=d.empty),e.prototype.replace.call(this,t,n),n==d.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 ot(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}(et);et.jsonID("text",rt);var ot=function(e,t){this.anchor=e,this.head=t};ot.prototype.map=function(e){return new ot(e.map(this.anchor),e.map(this.head))},ot.prototype.resolve=function(e){return rt.between(e.resolve(this.anchor),e.resolve(this.head))};var it=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 d(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 at(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}(et);it.prototype.visible=!1,et.jsonID("node",it);var at=function(e){this.anchor=e};at.prototype.map=function(e){var t=e.mapResult(this.anchor),n=t.deleted,r=t.pos;return n?new ot(r,r):new at(r)},at.prototype.resolve=function(e){var t=e.resolve(this.anchor),n=t.nodeAfter;return n&&it.isSelectable(n)?new it(t):et.near(t)};var st=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=d.empty),n==d.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 lt},t}(et);et.jsonID("all",st);var lt={map:function(){return this},resolve:function(e){return new st(e)}};function ct(e,t,n,r,o,i){if(t.inlineContent)return rt.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&&it.isSelectable(s))return it.create(e,n-(o<0?s.nodeSize:0))}else{var l=ct(e,s,n+o,o<0?s.childCount:0,o,i);if(l)return l}n+=s.nodeSize*o}}function ut(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(et.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(et.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 dt(e,t){return t&&e?e.bind(t):e}var ft=function(e,t,n){this.name=e,this.init=dt(t.init,n),this.apply=dt(t.apply,n)},ht=[new ft("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new ft("selection",{init:function(e,t){return e.selection||et.atStart(t.doc)},apply:function(e){return e.selection}}),new ft("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new ft("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],mt=function(e,t){var n=this;this.schema=e,this.fields=ht.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 ft(e.key,e.spec.state,e))}))},vt=function(e){this.config=e},gt={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};gt.schema.get=function(){return this.config.schema},gt.plugins.get=function(){return this.config.plugins},vt.prototype.apply=function(e){return this.applyTransaction(e).state},vt.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},vt.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}}},vt.prototype.applyInner=function(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var t=new vt(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<yt.length;i++)yt[i](this,e,t);return t},gt.tr.get=function(){return new pt(this)},vt.create=function(e){for(var t=new mt(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new vt(t),r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n},vt.prototype.reconfigure=function(e){for(var t=new mt(this.schema,e.plugins),n=t.fields,r=new vt(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},vt.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},vt.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 mt(e.schema,e.plugins),o=new vt(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=et.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},vt.addApplyListener=function(e){yt.push(e)},vt.removeApplyListener=function(e){var t=yt.indexOf(e);t>-1&&yt.splice(t,1)},Object.defineProperties(vt.prototype,gt);var yt=[];var bt=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:wt("plugin")};bt.prototype.getState=function(e){return e[this.key]};var kt=Object.create(null);function wt(e){return e in kt?e+"$"+ ++kt[e]:(kt[e]=0,e+"$")}var Ct=function(e){void 0===e&&(e="key"),this.key=wt(e)};Ct.prototype.get=function(e){return e.config.pluginsByKey[this.key]},Ct.prototype.getState=function(e){return e[this.key]};var Ot=["div","ol","ul","li","table","tbody","thead","tfoot","td","th","p","tr","col","colgroup","article","main","nav","header","footer","aside","section"],xt=function(e,t){void 0===t&&(t=Ot);var n=t.join("|");return e.replace(new RegExp("\\s*(<(?:"+n+")(?:\\s[^>]*?)?>)","g"),"$1").replace(new RegExp("(<\\/(?:"+n+")(?:\\s[^>]*?)?>)\\s*","g"),"$1")},St=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},Et=function(e){return pe.fromSchema(e.type.schema).serializeFragment(e.content)},It=function(e,t,n){return ee.fromSchema(t).parse(e,n)},Nt=function(e,t,n){var r=St(e);return It(r,t,n)},Tt=function(e){var t=Et(e.doc),n=document.createElement("div");return n.appendChild(t),n.innerHTML},Dt=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 st(r.doc)).replaceSelectionWith(Nt(e,r.schema,n)).setMeta("commandName",t))}};var 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)};function _t(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 Pt=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}},Rt=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},jt=function(e){return e instanceof T?e.type.name:e.name},At=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 jt(t)===jt(e)}),t)(n)}},Ft=function(e,t){return function(n,r){var o=n.tr.replaceSelectionWith(e);t&&o.scrollIntoView(),r(o)}},Lt=function(e,t,n,r){var o=i.from(Nt(e,n,r)),a=i.from(Nt(t,n,r));return o.eq(a)},Bt=function(e){var t=e.selection;if(t instanceof rt||t instanceof st){var n=t.content().content;return n.textBetween(0,n.size)}return""},zt=function(e){if(e.selection instanceof it)return e.selection.node},Vt=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=Bt(e))),t},Ht=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$/,"")},Kt={before:/[^ !,?.\[\]{}()]+$/i,after:/^[^ !,?.\[\]{}()]+/i},Wt=function(e,t,n){if(!n.applyToWord||!e.selection.empty)return{state:e,dispatch:t};var r=!0===n.applyToWord?Kt: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,p=c.findIndex((function(e){var t=e.node,n=e.pos;return n<=u&&n+t.nodeSize>=u})),d=c[p].node.text,f=!1,h=p-1;h>=0;h--){var m=c[h];!f&&m&&"text"===m.node.type.name?d=m.node.text+d:(f=!0,u-=m.node.nodeSize)}for(h=p+1;h<c.length;h++){if(!(m=c[h])||"text"!==m.node.type.name)break;d+=m.node.text}var v=d.substring(0,u),g=d.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(rt.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(rt.create(e.doc,o)),t(e)}}}}return{state:e,dispatch:t}},$t=function(e,t){return function(n,r,o){var i=Wt(n,r,t),a=i.state,s=i.dispatch;return e(t)(a,s)}},Ut=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||!Ut(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 p=l[u],d=p.$from,f=p.$to;c=r.doc.rangeHasMark(d.pos,f.pos,e)}for(u=0;u<l.length;u++){var h=l[u];d=h.$from,f=h.$to;c?n.removeMark(d.pos,f.pos,e):n.addMark(d.pos,f.pos,e.create(t))}o(n.scrollIntoView())}return!0}},Gt=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 p=s[u],d=void 0,f=0;f<o.length;f++){var h=o[f];h.step===i-1&&p.eq(h.style)&&(d=h)}d?(d.to=c,d.step=i):o.push({style:p,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},Xt=function(e){var t=(void 0===e?{}:e).except,n=void 0===t?[]:t;return function(e,t){var r,o=e.tr;Jt(o,{except:(r=n,r instanceof Array?r:[r])}),o.docChanged&&t(o)}},Jt=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)}))}))}},Yt=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,p=r[t.mark],d=e.doc,f=!1;return u?(n=e.storedMarks||l.marks(),f=p&&p.isInSet(n)||o.some((function(e){return r[e].isInSet(n)}))):f=p&&d.rangeHasMark(s,c,p)||o.some((function(e){return d.rangeHasMark(s,c,r[e])})),!f&&i&&r.style?Qt(e,r.style).some((function(e){return null!==Zt(e,i)})):Boolean(f)},Zt=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},Qt=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},en=function(e,t){var n=Qt(e,t),r=n.filter((function(e){return Boolean(e)}));return n.length===r.length?n[0]:void 0},tn=function(e,t){var n=Qt(e,t),r=n.filter((function(e){return Boolean(e)}));return{hasNodesWithoutMarks:n.length!==r.length,marks:r}},nn=function(e,t){var n=e.find((function(e){return"style"===e.type.name})),r=n&&n.attrs.style;return Pt(r,t)},rn=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,p){if(e.isInline){var d=e.marks;if(!i.isInSet(d)&&p.type.allowsMarkType(i.type)){var f=Math.max(u,t),h=Math.min(u+e.nodeSize,n),m=nn(d,r);if(m.changed||r.newValue){for(var v=m.changed?{style:m.style||null}:{style:[r.style]+": "+r.newValue+";"},g=o.isInSet(d)?d.find((function(e){return"style"===e.type.name})):null,y=g?Mt({},g.attrs,v):v,b=o.create(y),k=b.addToSet(d),w=0;w<d.length;w++)d[w].isInSet(k)||(l&&l.to===f&&l.mark.eq(d[w])?l.to=h:(l=new Ve(f,h,d[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 ze(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},on=function(e,t){var n=e.schema.marks.style;return(n?Qt(e,n):[]).map((function(e){return Zt(e,t)})).filter((function(e){return null!==e}))},an=function(e,t){return function(n,r,o){var i=n.selection,a=i.empty,s=i.$cursor,l=i.ranges;if(a&&!s||!Ut(n.doc,l,e))return!1;var c,u,p,d,f=!1;if(r){var h=o||n.tr;if(s){var m=n.storedMarks||s.marks();if(e.isInSet(m)){var v=nn(m,t),g=m.find((function(e){return"style"===e.type.name})),y=Mt({},g?g.attrs:{},{style:v.style||null});if(c=g.attrs,u=y,p=Object.keys(c),d=Object.keys(u),p.length===d.length&&p.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=rn(h,w.pos,C.pos,t,e)}f&&(h.scrollIntoView(),r(h))}}return f}},sn=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,p=!1,d=!1,f=function(){return d=!0};a&&i.style&&(p=an(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 Yt(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){Gt(r,o.pos,i.pos,e)}))},l=0;l<a.length;l++)s(l);n(r.scrollIntoView())}}(h,r,f,u):p||qt(i[c],n,u)(r,f),d&&o(u),d}},ln=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||!Ut(n.doc,u,o))return!1;if(c){var p=n.storedMarks||c.marks(),d=o.isInSet(p)?p.find((function(e){return"style"===e.type.name})):null,f={style:null};if(d&&d.attrs.style){var h=Pt(d.attrs.style,i);h.changed&&h.style&&(f.style=h.style)}else i.newValue&&(f.style=[i.style]+": "+i.newValue+";");var m=d?Mt({},d.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 an(o,i)(n,r,a)}},cn=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,p=i.child(a).nodeSize,d=void 0,f=void 0;for(d=a-1;d>=0&&l.isInSet(i.child(d).marks);)p+=f=i.child(d).nodeSize,u-=f,d-=1;for(d=a+1;d<c&&l.isInSet(i.child(d).marks);)p+=i.child(d).nodeSize,d+=1;r(Gt(t||n.tr,u,u+p,l))}else sn(e,t)(n,r)}},un=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=Qt(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(),p=c.child(u).marks.find((function(e){return e.type===l})),d=c.childCount,f=i.pos-i.textOffset,h=c.child(u).nodeSize,m=void 0,v=void 0;for(m=u-1;m>=0&&p.isInSet(c.child(m).marks);)h+=v=c.child(m).nodeSize,f-=v,m-=1;for(m=u+1;m<d&&p.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;Yt(e,{mark:n})&&(cn({mark:n,attrs:r},a)(e,l),c=vt.create({doc:a.doc,selection:a.selection})),s?qt(i[n],r,a)(c,l):sn({mark:n},a,r)(c,l)}return s&&o(a),s}},pn=function(e){return function(t,n){n(t.tr.insertText(e.text,e.from,e.to))}},dn=function(e){return function(t,n){var r=t.schema.nodes.image,o=r.createAndFill(e);Ft(o)(t,(function(t){return n(t.setMeta("commandName","insertImage").setMeta("args",e))}))}},fn=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),p=new d(i.from(n.create(r,null,o.marks)),0,0);return e.step(new Ie(c,u,c+1,u-1,p,1,!0)),!1}}))}))},hn=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 it?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},mn=function(e,t){return function(n,r){var o=hn(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=_t(n,["level"]);fn(a,t,i.paragraph,o)}else if(/^h[1-6]$/i.test(e)){r=parseInt(e.substr(1),10);fn(a,t,i.heading,Mt({},t.attrs,{level:r}))}else if("blockquote"===e){var s=t.attrs;r=s.level,o=_t(s,["level"]);fn(a,t,i.blockquote,o)}}));var s=a.docChanged;return s&&r(a.scrollIntoView()),s}},vn=function(e,t){void 0===t&&(t={blocksInSelection:!0});var n=e.doc,r=e.selection,o=t.blocksInSelection,i=t.blockNodeType;hn({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=_t(n,["style","class"]),c=i||t.type;(o||s||c!==t.type)&&fn(e,t,c,l)}))},gn=function(e){var t=hn(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&&r.push("blockquote")})),r},yn=function(e,t){var n,r,o=e.attrs.style;o&&t.forEach((function(e){r={style:e.name,value:/^.+$/,newValue:e.value},n=Pt(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})},bn=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},kn=function(e){var t=gn(e);return 1===new Set(t).size?t[0]:null},wn=function(e){return{tag:kn(e)||""}},Cn=function(e,t){return function(n,r){var o=hn(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=yn(t,r.style)),fn(i,t,t.type,n)}}));var a=i.docChanged;return a&&r(i.scrollIntoView()),a}},On=function(e,t){var n=hn(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},xn=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);Jt(r,{except:a}),vn(r,{blocksInSelection:o,blockNodeType:i});var s=r.docChanged;return s&&n&&n(r),s}},Sn=["ol",0],En=["ul",0],In=["li",0],Nn={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?Sn:["ol",{start:e.attrs.order},0]}},Tn={parseDOM:[{tag:"ul"}],toDOM:function(){return En}},Dn={parseDOM:[{tag:"li"}],toDOM:function(){return In},defining:!0};function Mn(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 _n(e,t,n){return e.append({ordered_list:Mn(Nn,{content:"list_item+",group:n}),bullet_list:Mn(Tn,{content:"list_item+",group:n}),list_item:Mn(Dn,{content:t})})}function Pn(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 p=n.doc.resolve(l.start-2);u=new E(p,p,l.depth),l.endIndex<l.parent.childCount&&(l=new E(a,n.doc.resolve(s.end(l.depth)),l.depth)),c=!0}var f=Me(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 d(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,p=t.start+n.length-(r?2:0),f=t.parent,h=t.startIndex,m=t.endIndex,v=!0;h<m;h++,v=!1)!v&&Pe(e.doc,p,u)&&(e.split(p,u),p+=2*u),p+=f.child(h).nodeSize;return e}(n.tr,l,f,c,e).scrollIntoView()),!0)}}function Rn(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,p=o.depth-u;p>=o.depth-3;p--)c=i.from(o.node(p).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 d(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!!Pe(y.doc,o.pos,2,b)&&(n&&n(y.split(o.pos,2,b).scrollIntoView()),!0)}}function jn(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 d(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,De(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 p=0==n.startIndex,f=n.endIndex==o.childCount,h=c.node(-1),m=c.index(-1);if(!h.canReplace(m+(p?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-(p?1:0),g+(f?1:0),v+1,g-1,new d((p?i.empty:i.from(o.copy(i.empty))).append(f?i.empty:i.from(o.copy(i.empty))),p?0:1,f?0:1),p?0:1)),t(r.scrollIntoView()),!0}(t,n,s)))}}function An(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 p=u.lastChild&&u.lastChild.type==c.type,f=i.from(p?e.create():null),h=new d(i.from(e.create(null,i.from(c.type.create(null,f)))),p?3:1,0),m=s.start,v=s.end;n(t.tr.step(new Ie(m-(p?3:1),v,m,v,h,1,!0)).scrollIntoView())}return!0}}var Fn={orderedList:"ordered_list",bulletList:"bullet_list",listItem:"list_item"},Ln={listType:Fn.orderedList,types:Mt({},Fn)},Bn={listType:Fn.bulletList,types:Mt({},Fn)},zn={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:Mt({},Fn)},Vn={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:Mt({},Fn)};function Hn(e,t){return!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0)}function Kn(e,t,n){var r=e.selection.$cursor;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;var o=Un(r);if(!o){var i=r.blockRange(),a=i&&De(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}var s=o.nodeBefore;if(!s.type.spec.isolating&&lr(e,o,t))return!0;if(0==r.parent.content.size&&(Wn(s,"end")||it.isSelectable(s))){if(t){var l=e.tr.deleteRange(r.before(),r.after());l.setSelection(Wn(s,"end")?et.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):it.create(l.doc,o.pos-s.nodeSize)),t(l.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 Wn(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 $n(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=Un(o)}var a=i&&i.nodeBefore;return!(!a||!it.isSelectable(a))&&(t&&t(e.tr.setSelection(it.create(e.doc,i.pos-a.nodeSize)).scrollIntoView()),!0)}function Un(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=Xn(r);if(!o)return!1;var i=o.nodeAfter;if(lr(e,o,t))return!0;if(0==r.parent.content.size&&(Wn(i,"start")||it.isSelectable(i))){if(t){var a=e.tr.deleteRange(r.before(),r.after());a.setSelection(Wn(i,"start")?et.findFrom(a.doc.resolve(a.mapping.map(o.pos)),1):it.create(a.doc,a.mapping.map(o.pos))),t(a.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 Gn(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=Xn(o)}var a=i&&i.nodeAfter;return!(!a||!it.isSelectable(a))&&(t&&t(e.tr.setSelection(it.create(e.doc,i.pos)).scrollIntoView()),!0)}function Xn(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 Jn(e,t){var n,r=e.selection,o=r instanceof it;if(o){if(r.node.isTextblock||!Re(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(it.create(i.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(i.scrollIntoView())}return!0}function Yn(e,t){var n,r=e.selection;if(r instanceof it){if(r.node.isTextblock||!Re(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 Zn(e,t){var n=e.selection,r=n.$from,o=n.$to,i=r.blockRange(o),a=i&&De(i);return null!=a&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)}function Qn(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 er(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 tr(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=er(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(et.near(c.doc.resolve(l),1)),t(c.scrollIntoView())}return!0}function nr(e,t){var n=e.selection,r=n.$from,o=n.$to;if(n instanceof st||r.parent.inlineContent||o.parent.inlineContent)return!1;var i=er(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(rt.create(s.doc,a+1)),t(s.scrollIntoView())}return!0}function rr(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(Pe(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}var o=n.blockRange(),i=o&&De(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)}function or(e,t){var n=e.selection,r=n.$from,o=n.$to;if(e.selection instanceof it&&e.selection.node.isBlock)return!(!r.parentOffset||!Pe(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 rt||e.selection instanceof st)&&a.deleteSelection();var s=0==r.depth?null:er(r.node(-1).contentMatchAt(r.indexAfter(-1))),l=i&&s?[{type:s}]:null,c=Pe(a.doc,a.mapping.map(r.pos),1,l);if(l||c||!Pe(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()),p=a.doc.resolve(u);r.node(-1).canReplaceWith(p.index(),p.index()+1,s)&&a.setNodeMarkup(a.mapping.map(r.before()),s)}t(a.scrollIntoView())}return!0}function ir(e,t){return or(e,t&&function(n){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&n.ensureMarks(r),t(n)})}function ar(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(it.create(e.doc,n))),!0)}function sr(e,t){return t&&t(e.tr.setSelection(new st(e.doc))),!0}function lr(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&&!Re(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,p=r.length-1;p>=0;p--)u=i.from(r[p].create(null,u));u=i.from(a.copy(u));var f=e.tr.step(new Ie(t.pos-1,c,t.pos,c,new d(u,1,0),r.length,!0)),h=c+2*r.length;Re(f.doc,h)&&f.join(h),n(f.scrollIntoView())}return!0}var m=et.findFrom(t,1),v=m&&m.$from.blockRange(m.$to),g=v&&De(v);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(v,g).scrollIntoView()),!0;if(l&&Wn(s,"start",!0)&&Wn(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 d(C,b.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function cr(e,t){return function(n,r){var o=n.selection,i=o.$from,a=o.$to,s=i.blockRange(a),l=s&&Me(s,e,t);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}function ur(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 pr(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 p=s[u],d=p.$from,f=p.$to;l=n.doc.rangeHasMark(d.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 dr(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],p=n.doc.resolve(c),d=p.sharedDepth(u),f=p.node(d),h=p.indexAfter(d),m=p.after(d+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--)Re(n.doc,s[y])&&n.join(s[y]);e(n)}}(r,t),o)}}function fr(){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 hr=fr(Hn,Kn,$n),mr=fr(Hn,qn,Gn),vr={Enter:fr(Qn,nr,rr,or),"Mod-Enter":tr,Backspace:hr,"Mod-Backspace":hr,"Shift-Backspace":hr,Delete:mr,"Mod-Delete":mr,"Mod-a":sr},gr={"Ctrl-h":vr.Backspace,"Alt-Backspace":vr["Mod-Backspace"],"Ctrl-d":vr.Delete,"Ctrl-Alt-Backspace":vr["Mod-Delete"],"Alt-Delete":vr["Mod-Delete"],"Alt-d":vr["Mod-Delete"]};for(var yr in vr)gr[yr]=vr[yr];var br=("undefined"!=typeof navigator?/Mac/.test(navigator.platform):"undefined"!=typeof os&&"darwin"==os.platform())?gr:vr,kr=function(e,t){return cr(e.schema.nodes.blockquote)(e,t)},wr=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},Cr=function(e,t,n){return function(r,o){var i=hn(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=yn(t,[s])}r&&fn(a,t,t.type,r)}}));var s=a.docChanged;return s&&o(a.scrollIntoView()),s}},Or=function(e,t,n){var r=hn(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},xr=function(e,t){return An(t)(e)},Sr=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=!!At(r,2)(e.selection),a=!!At(o,2)(e.selection);return(i||a)&&jn(n)(e)},Er=function(e,t){var n=e.schema.nodes,r=n[zn.listsTypes.listItem];return(Or(e,t.nodes)||zn.nodes.some((function(t){return n[t.node]&&bn(e,n[t.node])})))&&!bn(e,r)},Ir=function(e,t){var n=e.schema.nodes[zn.listsTypes.listItem],r=Er(e,zn);xr(e,n)?An(n)(e,t):r&&Cr(zn.nodes)(e,t)},Nr=function(e,t){var n=e.schema.nodes,r=n[Vn.listsTypes.listItem],o=Er(e,Vn);bn(e,n.blockquote)?wr(e,t):Sr(e,Vn)?jn(r)(e,t):o&&Cr(Vn.nodes)(e,t)},Tr=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 Dr(e){return function(t,n,r){if(!r)return!1;var o,i=(t=r.state).schema.nodes[e.listType],a=t.selection,s=a.$from,l=a.$to,c=s.node(-2),u=s.node(-3),p=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,s,l,i);return(c&&c.type===i||u&&u.type===i)&&p?_r(e)(t,n):(p||(_r(e)(t,n),t=r.state),dr(Pn(o=i),(function(e,t){return e.type===t.type&&e.type===o}))(t,n))}}function Mr(e,t,n,r){r||(r=e.schema.nodes.listItem);var o=t.$from,a=t.$to,s=o.blockRange(a,(function(e){return e.childCount&&e.firstChild.type===r}));if(!s||s.depth<2||o.node(s.depth-1).type!==r)return n;var l=s.end,c=a.end(s.depth);return l<c&&(n.step(new Ie(l-1,c,l,c,new d(i.from(r.create(void 0,s.parent.copy())),1,0),1,!0)),s=new E(n.doc.resolve(o.pos),n.doc.resolve(c),s.depth)),n.lift(s,De(s)).scrollIntoView()}function _r(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 it(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&&De(a);if(null==s)return!1;r.lift(a,s)}})),n&&n(r),!0}}var Pr=function(e,t,n,r,o){var i=r.listType,a=e.selection,s=a.$from.node(a.$from.depth-2),l=a.$to.node(a.$to.depth-2);if(s&&s.type.name===i&&l&&l.type.name===i){var c=n.state.schema.nodes,u={bulletList:c[r.bulletList],orderedList:c[r.orderedList],listItem:c[r.listItem]},p=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}(a.$to,u),d=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)),p=new rt(c,u);o=Mr(e,p,o,i)}}})),o}(e,a.$to.pos,a.$to.end(p),p,n.state.tr,u.listItem);return(d=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 p=c[u],d=t.doc.resolve(t.mapping.map(p.pos));if(d.depth>0){var f=void 0;f=p.node.textContent&&p.node.textContent.length>0?t.doc.resolve(t.mapping.map(p.pos+p.node.textContent.length)):t.doc.resolve(t.mapping.map(p.pos+1));var h=d.blockRange(f);h&&t.lift(h,Tr(e.schema,d,n))}}return t}(e,d,r)).setMeta("commandName",o),t(d),!0}return Dr(r)(e,t,n)};function Rr(e,t,n){return Pr(e,t,n,Mt({listType:Bn.listType},Bn.types))}function jr(e,t,n){return Pr(e,t,n,Mt({listType:Ln.listType},Ln.types))}for(var Ar=function(e,t){return{name:e,value:t}},Fr=[{node:"paragraph",style:[Ar("text-align","left")]},{node:"heading",style:[Ar("text-align","left")]}],Lr=[{node:"paragraph",style:[Ar("text-align","right")]},{node:"heading",style:[Ar("text-align","right")]}],Br=[{node:"paragraph",style:[Ar("text-align","center")]},{node:"heading",style:[Ar("text-align","center")]}],zr=[{node:"paragraph",style:[Ar("text-align","justify")]},{node:"heading",style:[Ar("text-align","justify")]}],Vr=[{node:"paragraph",style:[Ar("text-align","")]},{node:"heading",style:[Ar("text-align","")]}],Hr={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"},Kr={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"},Wr="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),$r="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Ur="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),qr="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Gr="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Xr=Wr&&(qr||+Wr[1]<57)||Ur&&qr,Jr=0;Jr<10;Jr++)Hr[48+Jr]=Hr[96+Jr]=String(Jr);for(Jr=1;Jr<=24;Jr++)Hr[Jr+111]="F"+Jr;for(Jr=65;Jr<=90;Jr++)Hr[Jr]=String.fromCharCode(Jr+32),Kr[Jr]=String.fromCharCode(Jr);for(var Yr in Hr)Kr.hasOwnProperty(Yr)||(Kr[Yr]=Hr[Yr]);var Zr="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function Qr(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);Zr?o=!0:n=!0}}return t&&(a="Alt-"+a),n&&(a="Ctrl-"+a),o&&(a="Meta-"+a),r&&(a="Shift-"+a),a}function eo(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 to(e){return new bt({props:{handleKeyDown:no(e)}})}function no(e){var t=function(e){var t=Object.create(null);for(var n in e)t[Qr(n)]=e[n];return t}(e);return function(e,n){var r,o=function(e){var t=!(Xr&&(e.ctrlKey||e.altKey||e.metaKey)||($r||Gr)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?Kr:Hr)[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[eo(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=Hr[n.keyCode])&&r!=o){var s=t[eo(r,n,!0)];if(s&&s(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){var l=t[eo(o,n,!0)];if(l&&l(e.state,e.dispatch,e))return!0}return!1}}var ro={};if("undefined"!=typeof navigator&&"undefined"!=typeof document){var oo=/Edge\/(\d+)/.exec(navigator.userAgent),io=/MSIE \d/.test(navigator.userAgent),ao=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);ro.mac=/Mac/.test(navigator.platform);var so=ro.ie=!!(io||ao||oo);ro.ie_version=io?document.documentMode||6:ao?+ao[1]:oo?+oo[1]:null,ro.gecko=!so&&/gecko\/(\d+)/i.test(navigator.userAgent),ro.gecko_version=ro.gecko&&+(/Firefox\/(\d+)/.exec(navigator.userAgent)||[0,0])[1];var lo=!so&&/Chrome\/(\d+)/.exec(navigator.userAgent);ro.chrome=!!lo,ro.chrome_version=lo&&+lo[1],ro.safari=!so&&/Apple Computer/.test(navigator.vendor),ro.ios=ro.safari&&(/Mobile\/\w+/.test(navigator.userAgent)||navigator.maxTouchPoints>2),ro.android=/Android \d/.test(navigator.userAgent),ro.webkit="webkitFontSmoothing"in document.documentElement.style,ro.webkit_version=ro.webkit&&+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]}var co=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},uo=function(e){var t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t},po=null,fo=function(e,t,n){var r=po||(po=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},ho=function(e,t,n,r){return n&&(vo(e,t,n,r,-1)||vo(e,t,n,r,1))},mo=/^(img|br|input|textarea|hr)$/i;function vo(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:go(e))){var i=e.parentNode;if(1!=i.nodeType||yo(e)||mo.test(e.nodeName)||"false"==e.contentEditable)return!1;t=co(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?go(e):0}}}function go(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function yo(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 bo=function(e){var t=e.isCollapsed;return t&&ro.chrome&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function ko(e,t){var n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function wo(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Co(e,t){return"number"==typeof e?e:e[t]}function Oo(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 xo(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=uo(a))if(1==a.nodeType){var s=a==i.body||1!=a.nodeType,l=s?wo(i):Oo(a),c=0,u=0;if(t.top<l.top+Co(r,"top")?u=-(l.top-t.top+Co(o,"top")):t.bottom>l.bottom-Co(r,"bottom")&&(u=t.bottom-l.bottom+Co(o,"bottom")),t.left<l.left+Co(r,"left")?c=-(l.left-t.left+Co(o,"left")):t.right>l.right-Co(r,"right")&&(c=t.right-l.right+Co(o,"right")),c||u)if(s)i.defaultView.scrollBy(c,u);else{var p=a.scrollLeft,d=a.scrollTop;u&&(a.scrollTop+=u),c&&(a.scrollLeft+=c);var f=a.scrollLeft-p,h=a.scrollTop-d;t={left:t.left-f,top:t.top-h,right:t.right-f,bottom:t.bottom-h}}if(s)break}}function So(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=uo(e));return t}function Eo(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 Io=null;function No(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=fo(l).getClientRects()}for(var p=0;p<u.length;p++){var d=u[p];if(d.top<=a&&d.bottom>=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var f=d.left>t.left?d.left-t.left:d.right<t.left?t.left-d.right:0;if(f<o){n=l,o=f,r=f&&3==n.nodeType?{left:d.right<t.left?d.right:d.left,top:t.top}:t,1==l.nodeType&&f&&(i=c+(t.left>=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.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=Mo(r,1);if(i.top!=i.bottom&&To(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}:No(n,r)}function To(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Do(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 p=e.dom.getBoundingClientRect();if(!To(t,p))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(To(n,u))return e(s,n,u)}if((a=(a+1)%o)==i)break}return t}(e.dom,t,p)))return null}if(ro.safari)for(var d=u;o&&d;d=uo(d))d.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(ro.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=No(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 Mo(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}var _o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Po(e,t,n){var r=e.docView.domFromPos(t,n<0?-1:1),o=r.node,i=r.offset,a=ro.webkit||ro.gecko;if(3==o.nodeType){if(!a||!_o.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++,Ro(Mo(fo(o,s,l),c),c<0)}var u=Mo(fo(o,i,i),n);if(ro.gecko&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){var p=Mo(fo(o,i-1,i-1),-1);if(p.top==u.top){var d=Mo(fo(o,i,i+1),-1);if(d.top!=u.top)return Ro(d,d.left<p.left)}}return u}if(!e.state.doc.resolve(t).parent.inlineContent){if(i&&(n<0||i==go(o))){var f=o.childNodes[i-1];if(1==f.nodeType)return jo(f.getBoundingClientRect(),!1)}if(i<go(o)){var h=o.childNodes[i];if(1==h.nodeType)return jo(h.getBoundingClientRect(),!0)}return jo(o.getBoundingClientRect(),n>=0)}if(i&&(n<0||i==go(o))){var m=o.childNodes[i-1],v=3==m.nodeType?fo(m,go(m)-(a?0:1)):1!=m.nodeType||"BR"==m.nodeName&&m.nextSibling?null:m;if(v)return Ro(Mo(v,1),!1)}if(i<go(o)){for(var g=o.childNodes[i];g.pmViewDesc&&g.pmViewDesc.ignoreForCoords;)g=g.nextSibling;var y=g?3==g.nodeType?fo(g,0,a?0:1):1==g.nodeType?g:null:null;if(y)return Ro(Mo(y,-1),!0)}return Ro(Mo(3==o.nodeType?fo(o):o,-n),n>=0)}function Ro(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 jo(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 Ao(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 Fo=/[\u0590-\u08ac]/;var Lo=null,Bo=null,zo=!1;function Vo(e,t,n){return Lo==t&&Bo==n?zo:(Lo=t,Bo=n,zo="up"==n||"down"==n?function(e,t,n){var r=t.selection,o="up"==n?r.$from:r.$to;return Ao(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=Po(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=fo(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 Fo.test(r.parent.textContent)&&s.modify?Ao(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 Ho=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},Ko={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}};Ho.prototype.matchesWidget=function(){return!1},Ho.prototype.matchesMark=function(){return!1},Ho.prototype.matchesNode=function(){return!1},Ho.prototype.matchesHack=function(e){return!1},Ho.prototype.parseRule=function(){return null},Ho.prototype.stopEvent=function(){return!1},Ko.size.get=function(){for(var e=0,t=0;t<this.children.length;t++)e+=this.children[t].size;return e},Ko.border.get=function(){return 0},Ho.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()},Ho.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}},Ko.posBefore.get=function(){return this.parent.posBeforeChild(this)},Ko.posAtStart.get=function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0},Ko.posAfter.get=function(){return this.posBefore+this.size},Ko.posAtEnd.get=function(){return this.posAtStart+this.size-2*this.border},Ho.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>co(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},Ho.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}}},Ho.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},Ho.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},Ho.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}},Ho.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 Yo){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 $o&&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?co(l.dom)+1:0}}for(var u,p=!0;(u=n<this.children.length?this.children[n]:null)&&u.dom.parentNode!=this.contentDOM;n++,p=!1);return u&&p&&!u.border&&!u.domAtom?u.domFromPos(0,t):{node:this.contentDOM,offset:u?co(u.dom):this.contentDOM.childNodes.length}},Ho.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 p=this.children[u-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){r=co(p.dom)+1;break}e-=p.size}-1==r&&(r=0)}if(r>-1&&(l>t||a==this.children.length-1)){t=l;for(var d=a+1;d<this.children.length;d++){var f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=co(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}},Ho.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)},Ho.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]},Ho.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),p=t==e?u:this.domFromPos(t,t?-1:1),d=n.getSelection(),f=!1;if((ro.gecko||ro.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=p={node:g.parentNode,offset:co(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(ro.gecko&&d.focusNode&&d.focusNode!=p.node&&1==d.focusNode.nodeType){var k=d.focusNode.childNodes[d.focusOffset];k&&"false"==k.contentEditable&&(r=!0)}if(r||f&&ro.safari||!ho(u.node,u.offset,d.anchorNode,d.anchorOffset)||!ho(p.node,p.offset,d.focusNode,d.focusOffset)){var w=!1;if((d.extend||e==t)&&!f){d.collapse(u.node,u.offset);try{e!=t&&d.extend(p.node,p.offset),w=!0}catch(e){if(!(e instanceof DOMException))throw e}}if(!w){if(e>t){var C=u;u=p,p=C}var O=document.createRange();O.setEnd(p.node,p.offset),O.setStart(u.node,u.offset),d.removeAllRanges(),d.addRange(O)}}},Ho.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},Ko.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},Ho.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?2:3}n=i}this.dirty=2},Ho.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)}},Ko.domAtom.get=function(){return!1},Ko.ignoreForCoords.get=function(){return!1},Object.defineProperties(Ho.prototype,Ko);var Wo=[],$o=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,Wo,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},n.domAtom.get=function(){return!0},Object.defineProperties(t.prototype,n),t}(Ho),Uo=function(e){function t(t,n,r,o){e.call(this,t,Wo,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}(Ho),qo=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=pe.renderSpec(document,n.type.spec.toDOM(n,r))),new t(e,n,a.dom,a.contentDOM||a.dom)},t.prototype.parseRule=function(){return{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=ci(i,n,a,r)),e>0&&(i=ci(i,0,e,r));for(var s=0;s<i.length;s++)i[s].parent=o;return o.children=i,o},t}(Ho),Go=function(e){function t(t,n,r,o,i,a,s,l,c){e.call(this,t,n.isLeaf?Wo:[],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),p=u&&u.dom,d=u&&u.contentDOM;if(n.isText)if(p){if(3!=p.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else p=document.createTextNode(n.text);else p||(p=(s=pe.renderSpec(document,n.type.spec.toDOM(n))).dom,d=s.contentDOM);d||n.isText||"BR"==p.nodeName||(p.hasAttribute("contenteditable")||(p.contentEditable=!1),n.type.spec.draggable&&(p.draggable=!0));var f=p;return p=oi(p,r,n),u?l=new Zo(e,n,r,o,p,d,f,u,i,a+1):n.isText?new Jo(e,n,r,o,p,f,i):new t(e,n,r,o,p,d,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};return this.node.type.spec.code&&(t.preserveWhitespace="full"),this.contentDOM&&!this.contentLost?t.contentElement=this.contentDOM:t.getContent=function(){return e.contentDOM?i.empty:e.node.content},t},t.prototype.matchesNode=function(e,t,n){return 0==this.dirty&&e.eq(this.node)&&ii(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 si(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,p=0;;){if(l<o.length&&o[l].to==i){for(var d=o[l++],f=void 0;l<o.length&&o[l].to==i;)(f||(f=[d])).push(o[l++]);if(f){f.sort(li);for(var h=0;h<f.length;h++)n(f[h],p,!!u)}else n(d,p,!!u)}var m=void 0,v=void 0;if(u)v=-1,m=u,u=null;else{if(!(p<e.childCount))break;v=p,m=e.child(p++)}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():Wo;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(Wo,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=ai(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(s instanceof qo){var c=o?o.previousSibling:t.lastChild;e(s.contentDOM,s.children,r),o=c?c.nextSibling:t.firstChild}}for(;o;)o=ai(o),i=!0;i&&r.trackWrites==t&&(r.trackWrites=null)}(this.contentDOM,this.children,e),ro.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 rt)||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=go(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=l.lastIndexOf(t,r-s);if(u>=0&&u+t.length+s>=n)return s+u}}}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 Uo(this,i,n,o);e.compositionNodes.push(a),this.children=ci(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(!ii(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=ni(this.dom,this.nodeDOM,ti(this.outerDeco,this.node,t),ti(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}(Ho);function Xo(e,t,n,r,o){return oi(r,t,e),new Go(null,e,t,n,r,r,r,o,0)}var Jo=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}(Go),Yo=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}(Ho),Zo=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}(Go);function Qo(e){e&&(this.nodeName=e)}Qo.prototype=Object.create(null);var ei=[new Qo];function ti(e,t,n){if(0==e.length)return ei;for(var r=n?ei[0]:new Qo,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 Qo(a.nodeName)),a){var l=a[s];null!=l&&(n&&1==o.length&&o.push(r=new Qo(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 ni(e,t,n,r){if(n==ei&&r==ei)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=ei[0]),o=l}ri(o,s||ei[0],a)}return o}function ri(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):Wo,a=n.class?n.class.split(" ").filter(Boolean):Wo,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])}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 oi(e,t,n){return ni(e,e,ei,ti(t,n,1!=e.nodeType))}function ii(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 ai(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var si=function(e,t){this.top=e,this.lock=t,this.index=0,this.stack=[],this.changed=!1,this.preMatch=function(e,t){for(var n=e.childCount,r=t.length,o=new Map;n>0&&r>0;r--){var i=t[r-1],a=i.node;if(a){if(a!=e.child(n-1))break;--n,o.set(i,n)}}return{index:n,matched:o}}(e.node.content,e.children)};function li(e,t){return e.type.side-t.type.side}function ci(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 ui(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(bo(n)){for(s=c;o&&!o.node;)o=o.parent;if(o&&o.node.isAtom&&it.isSelectable(o.node)&&o.parent&&(!o.node.isInline||!function(e,t,n){for(var r=0==t,o=t==go(e);r||o;){if(e==n)return!0;var i=co(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==go(e)}}(n.focusNode,n.focusOffset,o.dom))){var u=o.posBefore;l=new it(a==u?c:r.resolve(u))}}else{var p=e.docView.posFromDOM(n.anchorNode,n.anchorOffset);if(p<0)return null;s=r.resolve(p)}l||(l=bi(e,s,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1));return l}function pi(e){return e.editable?e.hasFocus():ki(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function di(e,t){var n=e.state.selection;if(gi(e,n),pi(e)){if(!t&&e.mouseDown&&e.mouseDown.allowDefault)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,co(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&ro.ie&&ro.ie_version<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{var r,o,i=n.anchor,a=n.head;!fi||n instanceof rt||(n.$from.parent.inlineContent||(r=hi(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=hi(e,n.to))),e.docView.setSelection(i,a,e.root,t),fi&&(r&&vi(r),o&&vi(o)),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(){pi(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}si.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}},si.prototype.destroyRest=function(){this.destroyBetween(this.index,this.top.children.length)},si.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=qo.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++}},si.prototype.findNodeMatch=function(e,t,n,r){var o=this.top.children,i=-1;if(r>=this.preMatch.index){for(var a=this.index;a<o.length;a++)if(o[a].matchesNode(e,t,n)){i=a;break}}else for(var s=this.index,l=Math.min(o.length,s+1);s<l;s++){var c=o[s];if(c.matchesNode(e,t,n)&&!this.preMatch.matched.has(c)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)},si.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)},si.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}},si.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 Go){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&&ii(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},si.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,Go.create(this.top,e,t,n,r,o)),this.changed=!0},si.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 $o(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++},si.prototype.addTextblockHacks=function(){for(var e=this.top.children[this.index-1];e instanceof qo;)e=e.children[e.children.length-1];e&&e instanceof Jo&&!/\n$/.test(e.node.text)||((ro.safari||ro.chrome)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG"),this.addHackNode("BR"))},si.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"),"BR"==e&&(t.className="ProseMirror-trailingBreak"),this.top.children.splice(this.index++,0,new Yo(this.top,Wo,t,null)),this.changed=!0}};var fi=ro.safari||ro.chrome&&ro.chrome_version<63;function hi(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(ro.safari&&i&&"false"==i.contentEditable)return mi(i);if(!(i&&"false"!=i.contentEditable||a&&"false"!=a.contentEditable)){if(i)return mi(i);if(a)return mi(a)}}function mi(e){return e.contentEditable="true",ro.safari&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function vi(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function gi(e,t){if(t instanceof it){var n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(yi(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else yi(e)}function yi(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=null)}function bi(e,t,n,r){return e.someProp("createSelectionBetween",(function(r){return r(e,t,n)}))||rt.between(t,n,r)}function ki(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 wi(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&&et.findFrom(a,t)}function Ci(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Oi(e,t,n){var r=e.state.selection;if(!(r instanceof rt)){if(r instanceof it&&r.node.isInline)return Ci(e,new rt(t>0?r.$to:r.$from));var o=wi(e.state,t);return!!o&&Ci(e,o)}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var i=wi(e.state,t);return!!(i&&i instanceof it)&&Ci(e,i)}if(!(ro.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)&&(it.isSelectable(l)?Ci(e,new it(t<0?e.state.doc.resolve(s.pos-l.nodeSize):s)):!!ro.webkit&&Ci(e,new rt(e.state.doc.resolve(t<0?c:c+l.nodeSize))))}}function xi(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Si(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function Ei(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,a=!1;for(ro.gecko&&1==n.nodeType&&r<xi(n)&&Si(n.childNodes[r])&&(a=!0);;)if(r>0){if(1!=n.nodeType)break;var s=n.childNodes[r-1];if(Si(s))o=n,i=--r;else{if(3!=s.nodeType)break;r=(n=s).nodeValue.length}}else{if(Ni(n))break;for(var l=n.previousSibling;l&&Si(l);)o=n.parentNode,i=co(l),l=l.previousSibling;if(l)r=xi(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}a?Ti(e,t,n,r):o&&Ti(e,t,o,i)}}function Ii(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=xi(n);;)if(r<a){if(1!=n.nodeType)break;if(!Si(n.childNodes[r]))break;o=n,i=++r}else{if(Ni(n))break;for(var s=n.nextSibling;s&&Si(s);)o=s.parentNode,i=co(s)+1,s=s.nextSibling;if(s)r=0,a=xi(n=s);else{if((n=n.parentNode)==e.dom)break;r=a=0}}o&&Ti(e,t,o,i)}}function Ni(e){var t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ti(e,t,n,r){if(bo(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&&di(e)}),50)}function Di(e,t,n){var r=e.state.selection;if(r instanceof rt&&!r.empty||n.indexOf("s")>-1)return!1;if(ro.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=wi(e.state,t);if(a&&a instanceof it)return Ci(e,a)}if(!o.parent.inlineContent){var s=t<0?o:i,l=r instanceof st?et.near(s,t):et.findFrom(s,t);return!!l&&Ci(e,l)}return!1}function Mi(e,t){if(!(e.state.selection instanceof rt))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 _i(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Pi(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||ro.mac&&72==n&&"c"==r?Mi(e,-1)||Ei(e):46==n||ro.mac&&68==n&&"c"==r?Mi(e,1)||Ii(e):13==n||27==n||(37==n?Oi(e,-1,r)||Ei(e):39==n?Oi(e,1,r)||Ii(e):38==n?Di(e,-1,r)||Ei(e):40==n?function(e){if(ro.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;_i(e,o,!0),setTimeout((function(){return _i(e,o,!1)}),20)}}}(e)||Di(e,1,r)||Ii(e):r==(ro.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ri(e){var t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(ro.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||ro.safari&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0}}function ji(e,t,n,r,o){if(t<0){var a=e.lastSelectionTime>Date.now()-50?e.lastSelectionOrigin:null,s=ui(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 p=e.state.selection,d=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,p=c.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(u=[{node:p,offset:c.anchorOffset}],bo(c)||u.push({node:c.focusNode,offset:c.focusOffset})),ro.chrome&&8===e.lastKeyCode)for(var d=a;d>i;d--){var f=o.childNodes[d-1],h=f.pmViewDesc;if("BR"==f.nodeName&&!h){a=d;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:!g.parent.type.spec.code||"full",editableContent:!0,findPositions:u,ruleFromNode:Ri,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(ro.chrome&&e.cursorWrapper&&d.sel&&d.sel.anchor==e.cursorWrapper.deco.from){var f=e.cursorWrapper.deco.type.toDOM.nextSibling,h=f&&f.nodeValue?f.nodeValue.length:1;d.sel={anchor:d.sel.anchor+h,head:d.sel.anchor+h}}var m,v,g=e.state.doc,y=g.slice(d.from,d.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,d.doc.content,d.from,m,v);if(!b){if(!(r&&p instanceof rt&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if((ro.ios&&e.lastIOSEnter>Date.now()-225||ro.android)&&o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName}))&&e.someProp("handleKeyDown",(function(t){return t(e,ko(13,"Enter"))})))return void(e.lastIOSEnter=0);if(d.sel){var k=Ai(e,e.state.doc,d.sel);k&&!k.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(k))}return}b={start:p.from,endA:p.to,endB:p.to}}e.domChangeCount++,e.state.selection.from<e.state.selection.to&&b.start==b.endB&&e.state.selection instanceof rt&&(b.start>e.state.selection.from&&b.start<=e.state.selection.from+2?b.start=e.state.selection.from:b.endA<e.state.selection.to&&b.endA>=e.state.selection.to-2&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),ro.ie&&ro.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>d.from&&" "==d.doc.textBetween(b.start-d.from-1,b.start-d.from+1)&&(b.start--,b.endA--,b.endB--);var w,C=d.doc.resolveNoCache(b.start-d.from),O=d.doc.resolveNoCache(b.endB-d.from),x=C.sameParent(O)&&C.parent.inlineContent;if((ro.ios&&e.lastIOSEnter>Date.now()-225&&(!x||o.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!x&&C.pos<d.doc.content.size&&(w=et.findFrom(d.doc.resolve(C.pos+1),1,!0))&&w.head==O.pos)&&e.someProp("handleKeyDown",(function(t){return t(e,ko(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||Fi(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(Fi(i,!0,!0));if(!a.parent.isTextblock||a.pos>n||Fi(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,ko(8,"Backspace"))})))ro.android&&ro.chrome&&e.domObserver.suppressSelectionUpdates();else{ro.chrome&&ro.android&&b.toB==b.from&&(e.lastAndroidDelete=Date.now()),ro.android&&!x&&C.start()!=O.start()&&0==O.parentOffset&&C.depth==O.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==b.endA&&(b.endB-=2,O=d.doc.resolveNoCache(b.endB-d.from),setTimeout((function(){e.someProp("handleKeyDown",(function(t){return t(e,ko(13,"Enter"))}))}),20));var S,E,I,N,T=b.start,D=b.endA;if(x)if(C.pos==O.pos)ro.ie&&ro.ie_version<=11&&0==C.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((function(){return di(e)}),20)),S=e.state.tr.delete(T,D),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 p=0;p<a.length;p++)c=a[p].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 d=[],f=0;f<t.childCount;f++)d.push(o(t.child(f)));if(i.from(d).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,D,I.mark):S.removeMark(T,D,I.mark);else if(C.parent.child(C.index()).isText&&C.index()==O.index()-(O.textOffset?0:1)){var M=C.parent.textBetween(C.parentOffset,O.parentOffset);if(e.someProp("handleTextInput",(function(t){return t(e,T,D,M)})))return;S=e.state.tr.insertText(M,T,D)}if(S||(S=e.state.tr.replace(T,D,d.doc.slice(b.start-d.from,b.endB-d.from))),d.sel){var _=Ai(e,S.doc,d.sel);_&&!(ro.chrome&&ro.android&&e.composing&&_.empty&&(b.start!=b.endB||e.lastAndroidDelete<Date.now()-100)&&(_.head==T||_.head==S.mapping.map(D)-1)||ro.ie&&_.empty&&_.head==T)&&S.setSelection(_)}E&&S.ensureMarks(E),e.dispatch(S.scrollIntoView())}}}function Ai(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:bi(e,t.resolve(n.anchor),t.resolve(n.head))}function Fi(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 Li(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")||pe.fromSchema(e.state.schema),l=$i(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));for(var u,p=c.firstChild;p&&1==p.nodeType&&(u=Ki[p.nodeName.toLowerCase()]);){for(var d=u.length-1;d>=0;d--){for(var f=l.createElement(u[d]);c.firstChild;)f.appendChild(c.firstChild);c.appendChild(f),"tbody"!=u[d]&&(o++,i++)}p=c.firstChild}return p&&1==p.nodeType&&p.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 Bi(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 d(i.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):d.empty;var u=e.someProp("clipboardTextParser",(function(e){return e(t,o,r)}));if(u)s=u;else{var p=o.marks(),f=e.state.schema,h=pe.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,p)))}))}}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=$i().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Ki[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),ro.webkit&&function(e){for(var t=e.querySelectorAll(ro.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})}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 d(o,a,s)}(Hi(s,+v[1],+v[2]),v[3]);else if((s=d.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=Hi(s,y,b)}return e.someProp("transformPasted",(function(e){s=e(s)})),s}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 Vi(e,t,n,r,o,a){var s=t<0?e.firstChild:e.lastChild,l=s.content;return o<r-1&&(l=Vi(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 Hi(e,t,n){return t<e.openStart&&(e=new d(Vi(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new d(Vi(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Ki={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Wi=null;function $i(){return Wi||(Wi=document.implementation.createHTMLDocument("title"))}var Ui={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},qi=ro.ie&&ro.ie_version<=11,Gi=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};Gi.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},Gi.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Xi=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]);ro.ie&&ro.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 Gi,qi&&(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};Xi.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Xi.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Xi.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ui),qi&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Xi.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()}qi&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()},Xi.prototype.connectSelection=function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)},Xi.prototype.disconnectSelection=function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)},Xi.prototype.suppressSelectionUpdates=function(){var e=this;this.suppressingSelectionUpdates=!0,setTimeout((function(){return e.suppressingSelectionUpdates=!1}),50)},Xi.prototype.onSelectionChange=function(){if((!(e=this.view).editable||e.root.activeElement==e.dom)&&ki(e)){var e;if(this.suppressingSelectionUpdates)return di(this.view);if(ro.ie&&ro.ie_version<=11&&!this.view.state.selection.empty){var t=this.view.root.getSelection();if(t.focusNode&&ho(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}},Xi.prototype.setCurSelection=function(){this.currentSelection.set(this.view.root.getSelection())},Xi.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},Xi.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)&&ki(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(ro.gecko&&a.length>1){var c=a.filter((function(e){return"BR"==e.nodeName}));if(2==c.length){var u=c[0],p=c[1];u.parentNode&&u.parentNode.parentNode==p.parentNode?p.remove():u.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(Ji)return;Ji=!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.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||di(this.view),this.currentSelection.set(t))}},Xi.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(ro.ie&&ro.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?co(o)+1:0,p=n.localPosFromDOM(e.target,u,-1),d=i&&i.parentNode==e.target?co(i):e.target.childNodes.length;return{from:p,to:n.localPosFromDOM(e.target,d,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 Ji=!1;var Yi={},Zi={};function Qi(e,t){e.lastSelectionOrigin=t,e.lastSelectionTime=Date.now()}function ea(e){e.someProp("handleDOMEvents",(function(t){for(var n in t)e.eventHandlers[n]||e.dom.addEventListener(n,e.eventHandlers[n]=function(t){return ta(e,t)})}))}function ta(e,t){return e.someProp("handleDOMEvents",(function(n){var r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function na(e){return{left:e.clientX,top:e.clientY}}function ra(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 oa(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function ia(e,t,n,r,o){return ra(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 it&&(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(it.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&&(oa(e,it.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&&it.isSelectable(r))&&(oa(e,new it(n),"pointer"),!0)}(e,n))}function aa(e,t,n,r){return ra(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function sa(e,t,n,r){return ra(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&&(oa(e,rt.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)oa(e,rt.create(r,s+1,s+1+a.content.size),"pointer");else{if(!it.isSelectable(a))continue;oa(e,it.create(r,s),"pointer")}return!0}}(e,n,r)}function la(e){return ma(e)}Zi.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!pa(e,t))if(229!=t.keyCode&&e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!ro.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||Pi(e,t)?t.preventDefault():Qi(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,ko(13,"Enter"))})),e.lastIOSEnter=0)}),200)}},Zi.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Zi.keypress=function(e,t){if(!(pa(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||ro.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof rt&&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 ca=ro.mac?"metaKey":"ctrlKey";Yi.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=la(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[ca]&&("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(na(t));i&&("singleClick"==o?(e.mouseDown&&e.mouseDown.done(),e.mouseDown=new ua(e,i,t,n)):("doubleClick"==o?aa:sa)(e,i.pos,i.inside,t)?t.preventDefault():Qi(e,"pointer"))};var ua=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[ca],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 it&&u.from<=i&&u.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&ro.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)),Qi(e,"pointer")};function pa(e,t){return!!e.composing||!!(ro.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}ua.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 di(e.view)})),this.view.mouseDown=null},ua.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(na(e))),this.allowDefault||!t?Qi(this.view,"pointer"):ia(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||ro.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||ro.chrome&&!(this.view.state.selection instanceof rt)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(oa(this.view,et.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Qi(this.view,"pointer")}},ua.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),Qi(this.view,"pointer"),0==e.buttons&&this.done()},Yi.touchdown=function(e){la(e),Qi(e,"pointer")},Yi.contextmenu=function(e){return la(e)};var da=ro.android?5e3:-1;function fa(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return ma(e)}),t))}function ha(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 ma(e,t){if(e.domObserver.forceFlush(),ha(e),t||e.docView.dirty){var n=ui(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):e.updateState(e.state),!0}return!1}Zi.compositionstart=Zi.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(),ma(e,!0),e.markCursor=null;else if(ma(e),ro.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}fa(e,da)},Zi.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,fa(e,20))};var va=ro.ie&&ro.ie_version<15||ro.ios&&ro.webkit_version<604;function ga(e,t,n,r){var o=Bi(e,t,n,e.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(function(t){return t(e,r,o||d.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}Yi.copy=Zi.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=va?null:t.clipboardData,i=Li(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"))}},Zi.paste=function(e,t){var n=va?null:t.clipboardData;n&&ga(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?ga(e,r.value,null,t):ga(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)};var ya=function(e,t){this.slice=e,this.move=t},ba=ro.mac?"altKey":"ctrlKey";for(var ka in Yi.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(na(t));if(o&&o.pos>=r.from&&o.pos<=(r instanceof it?r.to-1:r.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(it.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(it.create(e.state.doc,i.posBefore)))}var a=e.state.selection.content(),s=Li(e,a),l=s.dom,c=s.text;t.dataTransfer.clearData(),t.dataTransfer.setData(va?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",va||t.dataTransfer.setData("text/plain",c),e.dragging=new ya(a,!t[ba])}},Yi.dragend=function(e){var t=e.dragging;window.setTimeout((function(){e.dragging==t&&(e.dragging=null)}),50)},Zi.dragover=Zi.dragenter=function(e,t){return t.preventDefault()},Zi.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var r=e.posAtCoords(na(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=Bi(e,t.dataTransfer.getData(va?"Text":"text/plain"),va?null:t.dataTransfer.getData("text/html"),!1,o);var a=n&&!t[ba];if(e.someProp("handleDrop",(function(n){return n(e,t,i||d.empty,a)})))t.preventDefault();else if(i){t.preventDefault();var s=i?Le(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,p=l.doc;if(u?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),!l.doc.eq(p)){var f=l.doc.resolve(c);if(u&&it.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new it(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(bi(e,f,l.doc.resolve(h)))}e.focus(),e.dispatch(l.setMeta("uiEvent","drop"))}}}}}},Yi.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())&&di(e)}),20))},Yi.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)},Yi.beforeinput=function(e,t){if(ro.chrome&&ro.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,ko(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)}},Zi)Yi[ka]=Zi[ka];function wa(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 Ca=function(e,t){this.spec=t||Na,this.side=this.spec.side||0,this.toDOM=e};Ca.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 Sa(i-n,i-n,this)},Ca.prototype.valid=function(){return!0},Ca.prototype.eq=function(e){return this==e||e instanceof Ca&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&wa(this.spec,e.spec))};var Oa=function(e,t){this.spec=t||Na,this.attrs=e};Oa.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 Sa(o,i,this)},Oa.prototype.valid=function(e,t){return t.from<t.to},Oa.prototype.eq=function(e){return this==e||e instanceof Oa&&wa(this.attrs,e.attrs)&&wa(this.spec,e.spec)},Oa.is=function(e){return e.type instanceof Oa};var xa=function(e,t){this.spec=t||Na,this.attrs=e};xa.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 Sa(o.pos-n,i.pos-n,this)},xa.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},xa.prototype.eq=function(e){return this==e||e instanceof xa&&wa(this.attrs,e.attrs)&&wa(this.spec,e.spec)};var Sa=function(e,t,n){this.from=e,this.to=t,this.type=n},Ea={spec:{configurable:!0},inline:{configurable:!0}};Sa.prototype.copy=function(e,t){return new Sa(e,t,this.type)},Sa.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},Sa.prototype.map=function(e,t,n){return this.type.map(e,this,t,n)},Sa.widget=function(e,t,n){return new Sa(e,e,new Ca(t,n))},Sa.inline=function(e,t,n,r){return new Sa(e,t,new Oa(n,r))},Sa.node=function(e,t,n,r){return new Sa(e,t,new xa(n,r))},Ea.spec.get=function(){return this.type.spec},Ea.inline.get=function(){return this.type instanceof Oa},Object.defineProperties(Sa.prototype,Ea);var Ia=[],Na={},Ta=function(e,t){this.local=e&&e.length?e:Ia,this.children=t&&t.length?t:Ia};Ta.create=function(e,t){return t.length?ja(t,e,0,Na):Da},Ta.prototype.find=function(e,t,n){var r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r},Ta.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)}},Ta.prototype.map=function(e,t,n){return this==Da||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Na)},Ta.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;-1==l||e>l+i||(t>=s[a]+i?s[a+1]=-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,p=0;p<s.length;p+=3)if(-1==s[p+1]){var d=n.map(e[p]+i),f=d-o;if(f<0||f>=r.content.size){u=!0;continue}var h=n.map(e[p+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[p+2].mapInner(n,y,d+1,e[p]+i+1,a);b!=Da?(s[p]=f,s[p+1]=h,s[p+2]=b):(s[p+1]=-2,u=!0)}else u=!0}if(u){var k=ja(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 Ta(t&&t.sort(Aa),s)}(this.children,i,e,t,n,r,o):i?new Ta(i.sort(Aa)):Da},Ta.prototype.add=function(e,t){return t.length?this==Da?Ta.create(e,t):this.addInner(e,t,0):this},Ta.prototype.addInner=function(e,t,n){var r,o=this,i=0;e.forEach((function(e,a){var s,l=a+n;if(s=Pa(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,ja(s,e,l+1,Na)),i+=3}}));for(var a=_a(i?Ra(t):t,-n),s=0;s<a.length;s++)a[s].type.valid(e,a[s])||a.splice(s--,1);return new Ta(a.length?this.local.concat(a).sort(Aa):this.local,r||this.children)},Ta.prototype.remove=function(e){return 0==e.length||this==Da?this:this.removeInner(e,0)},Ta.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!=Da?n[o+2]=u:(n.splice(o,3),o-=3)}}if(r.length)for(var p=0,d=void 0;p<e.length;p++)if(d=e[p])for(var f=0;f<r.length;f++)r[f].eq(d,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 Ta(r,n):Da},Ta.prototype.forChild=function(e,t){if(this==Da)return this;if(t.isLeaf)return Ta.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 Oa){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 p=new Ta(r.sort(Aa));return n?new Ma([p,n]):p}return n||Da},Ta.prototype.eq=function(e){if(this==e)return!0;if(!(e instanceof Ta)||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},Ta.prototype.locals=function(e){return Fa(this.localsInner(e))},Ta.prototype.localsInner=function(e){if(this==Da)return Ia;if(e.inlineContent||!this.local.some(Oa.is))return this.local;for(var t=[],n=0;n<this.local.length;n++)this.local[n].type instanceof Oa||t.push(this.local[n]);return t};var Da=new Ta;Ta.empty=Da,Ta.removeOverlap=Fa;var Ma=function(e){this.members=e};function _a(e,t){if(!t||!e.length)return e;for(var n=[],r=0;r<e.length;r++){var o=e[r];n.push(new Sa(o.from+t,o.to+t,o.type))}return n}function Pa(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 Ra(e){for(var t=[],n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function ja(e,t,n,r){var o=[],i=!1;t.forEach((function(t,a){var s=Pa(e,t,a+n);if(s){i=!0;var l=ja(s,t,n+a+1,r);l!=Da&&o.push(a,a+t.nodeSize,l)}}));for(var a=_a(i?Ra(e):e,-n).sort(Aa),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 Ta(a,o):Da}function Aa(e,t){return e.from-t.from||e.to-t.to}function Fa(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),La(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),La(t,o+1,i.copy(r.to,i.to)))}}return t}function La(e,t,n){for(;t<e.length&&Aa(n,e[t])>0;)t++;e.splice(t,0,n)}function Ba(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=Da&&t.push(r)})),e.cursorWrapper&&t.push(Ta.create(e.state.doc,[e.cursorWrapper.deco])),Ma.from(t)}Ma.prototype.map=function(e,t){var n=this.members.map((function(n){return n.map(e,t,Na)}));return Ma.from(n)},Ma.prototype.forChild=function(e,t){if(t.isLeaf)return Ta.empty;for(var n=[],r=0;r<this.members.length;r++){var o=this.members[r].forChild(e,t);o!=Da&&(o instanceof Ma?n=n.concat(o.members):n.push(o))}return Ma.from(n)},Ma.prototype.eq=function(e){if(!(e instanceof Ma)||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},Ma.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?Fa(n?t:t.sort(Aa)):Ia},Ma.from=function(e){switch(e.length){case 0:return Da;case 1:return e[0];default:return new Ma(e)}};var za,Va,Ha=function(e,t){this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Ga),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=Ua(this),this.markCursor=null,this.cursorWrapper=null,$a(this),this.nodeViews=qa(this),this.docView=Xo(this.state.doc,Wa(this),Ba(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 Xi(e,(function(t,n,r,o){return ji(e,t,n,r,o)})),e.domObserver.start(),e.domChangeCount=0,e.eventHandlers=Object.create(null);var t=function(t){var n=Yi[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)||ta(e,t)||!e.editable&&t.type in Zi||n(e,t)})};for(var n in Yi)t(n);ro.safari&&e.dom.addEventListener("input",(function(){return null})),ea(e)}(this),this.prevDirectPlugins=[],this.pluginViews=[],this.updatePluginViews()},Ka={props:{configurable:!0},root:{configurable:!0}};function Wa(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]:t[r]||"contenteditable"==r||"nodeName"==r||(t[r]=String(n[r]))})),[Sa.node(0,e.state.doc.content.size,t)]}function $a(e){if(e.markCursor){var t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),e.cursorWrapper={dom:t,deco:Sa.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Ua(e){return!e.someProp("editable",(function(t){return!1===t(e.state)}))}function qa(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 Ga(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(Ka.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},Ha.prototype.update=function(e){e.handleDOMEvents!=this._props.handleDOMEvents&&ea(this),this._props=e,e.plugins&&(e.plugins.forEach(Ga),this.directPlugins=e.plugins),this.updateStateInner(e.state,!0)},Ha.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)},Ha.prototype.updateState=function(e){this.updateStateInner(e,this.state.plugins!=e.plugins)},Ha.prototype.updateStateInner=function(e,t){var n=this,r=this.state,o=!1,i=!1;if(e.storedMarks&&this.composing&&(ha(this),i=!0),this.state=e,t){var a=qa(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),ea(this)}this.editable=Ua(this),$a(this);var s=Ba(this),l=Wa(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 p,d,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:So(e.dom)}}(this);if(i){this.domObserver.stop();var O=u&&(ro.ie||ro.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=ro.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=Xo(e.doc,l,s,this.dom,this)),x&&!this.trackWrites&&(O=!0)}O||!(this.mouseDown&&this.domObserver.currentSelection.eq(this.root.getSelection())&&(p=this,d=p.docView.domFromPos(p.state.selection.anchor,0),f=p.root.getSelection(),ho(d.node,d.offset,f.anchorNode,f.anchorOffset)))?di(this,O):(gi(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 it?xo(this,this.docView.domAfterPos(e.selection.from).getBoundingClientRect(),S):xo(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,Eo(k,0==w?0:w-b))},Ha.prototype.destroyPluginViews=function(){for(var e;e=this.pluginViews.pop();)e.destroy&&e.destroy()},Ha.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))}}},Ha.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}},Ha.prototype.hasFocus=function(){return this.root.activeElement==this.dom},Ha.prototype.focus=function(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(Io)return e.focus(Io);var t=So(e);e.focus(null==Io?{get preventScroll(){return Io={preventScroll:!0},!0}}:void 0),Io||(Io=!1,Eo(t,0))}(this.dom),di(this),this.domObserver.start()},Ka.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},Ha.prototype.posAtCoords=function(e){return Do(this,e)},Ha.prototype.coordsAtPos=function(e,t){return void 0===t&&(t=1),Po(this,e,t)},Ha.prototype.domAtPos=function(e,t){return void 0===t&&(t=0),this.docView.domFromPos(e,t)},Ha.prototype.nodeDOM=function(e){var t=this.docView.descAt(e);return t?t.nodeDOM:null},Ha.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},Ha.prototype.endOfTextblock=function(e,t){return Vo(this,t||this.state,e)},Ha.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,[],Ba(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)},Ha.prototype.dispatchEvent=function(e){return function(e,t){ta(e,t)||!Yi[t.type]||!e.editable&&t.type in Zi||Yi[t.type](e,t)}(this,e)},Ha.prototype.dispatch=function(e){var t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))},Object.defineProperties(Ha.prototype,Ka),"undefined"!=typeof WeakMap){var Xa=new WeakMap;za=function(e){return Xa.get(e)},Va=function(e,t){return Xa.set(e,t),t}}else{var Ja=[],Ya=0;za=function(e){for(var t=0;t<Ja.length;t+=2)if(Ja[t]==e)return Ja[t+1]},Va=function(e,t){return 10==Ya&&(Ya=0),Ja[Ya++]=e,Ja[Ya++]=t}}var Za=function(e,t,n,r){this.left=e,this.top=t,this.right=n,this.bottom=r},Qa=function(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r};function es(e){if(e.colwidth)return e.colwidth.slice();for(var t=[],n=0;n<e.colspan;n++)t.push(0);return t}function ts(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 ns(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 rs(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 ts(e,t)}}],toDOM:function(e){return["td",ns(e,t),0]}},table_header:{content:e.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:function(e){return ts(e,t)}}],toDOM:function(e){return["th",ns(e,t),0]}}}}function is(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}Qa.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 Za(r,o,i,a)}}throw new RangeError("No cell with offset "+e+" found")},Qa.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")},Qa.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)]},Qa.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,p=s.bottom;return new Za(Math.min(r,l),Math.min(i,u),Math.max(o,c),Math.max(a,p))},Qa.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},Qa.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}},Qa.get=function(e){return za(e)||Va(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 p=o.child(u);i+=p.attrs.colspan,p.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 p=e.child(c);u++;for(var d=0;;d++){for(;o<r.length&&0!=r[o];)o++;if(d==p.childCount)break;for(var f=p.child(d),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 Qa(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=es(a.attrs)))[l]=u)}s&&e.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:s})}}}(E,a,e);return E}(e))};var as=new Ct("selectingCells");function ss(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 ls(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 cs(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:ss(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 us(e){return"row"==e.parent.type.spec.tableRole&&e.nodeAfter}function ps(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ds(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function fs(e){return Qa.get(e.node(-1)).findCell(e.pos-e.start(-1))}function hs(e){return Qa.get(e.node(-1)).colCount(e.pos-e.start(-1))}function ms(e,t,n){var r=e.start(-1),o=Qa.get(e.node(-1)).nextCell(e.pos-r,t,n);return null==o?null:e.node(0).resolve(r+o)}function vs(e,t,n){var r={};for(var o in e)r[o]=e[o];return r[t]=n,r}function gs(e,t,n){void 0===n&&(n=1);var r=vs(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 ys(e,t,n){void 0===n&&(n=1);var r=vs(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 bs(e,t,n){for(var r=is(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 ks=function(e){function t(t,n){void 0===n&&(n=t);var r=t.node(-1),o=Qa.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 nt(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(us(r)&&us(o)&&ds(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 rt.between(r,o)},t.prototype.content=function(){for(var e=this.$anchorCell.node(-1),t=Qa.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 p=t.map[c];if(!o[p]){o[p]=!0;var f=t.findCell(p),h=e.nodeAt(p),m=r.left-f.left,v=f.right-r.right;if(m>0||v>0){var g=h.attrs;m>0&&(g=gs(g,0,m)),v>0&&(g=gs(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=vs(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 d(i.from(b),1,1)},t.prototype.replace=function(t,n){void 0===n&&(n=d.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?d.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 d(i.from(t),0,0))},t.prototype.forEachCell=function(e){for(var t=this.$anchorCell.node(-1),n=Qa.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=Qa.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=Qa.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=Qa.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 ws(this.$anchorCell.pos,this.$headCell.pos)},t}(et);ks.prototype.visible=!1,et.jsonID("cell",ks);var ws=function(e,t){this.anchor=e,this.head=t};function Cs(e){if(!(e.selection instanceof ks))return null;var t=[];return e.selection.forEachCell((function(e,n){t.push(Sa.node(n,n+e.nodeSize,{class:"selectedCell"}))})),Ta.create(e.doc,t)}function Os(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,p=c?0:Math.max(0,n-1),f=c<t.childCount-1?0:Math.max(0,r-1);(p||f)&&(u=xs(is(s).row,new d(u,p,f)).content),l.push(u)}else{if("cell"!=a&&"header_cell"!=a)return null;l.push(n||r?xs(is(s).row,new d(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 p=0,d=0;d<n.length;d++)p=Math.max(p,n[d]);for(var f=0;f<n.length;f++)if(f>=t.length&&t.push(i.empty),n[f]<p){for(var h=is(e).cell.createAndFill(),m=[],v=n[f];v<p;v++)m.push(h);t[f]=t[f].append(i.from(m))}return{height:t.length,width:p,rows:t}}(s,l)}function xs(e,t){var n=e.createAndFill();return new ke(n).replace(0,n.content.size,t).doc}function Ss(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],p=[],d=s[c]||0,f=0;d<t;f++){var h=u.child(f%u.childCount);d+h.attrs.colspan>t&&(h=h.type.create(gs(h.attrs,h.attrs.colspan,d+h.attrs.colspan-t),h.content)),p.push(h),d+=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(p))}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(vs(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}}function Es(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,p=t.map[u];if(t.map[u-t.width]==p){l=!0;var d=n.nodeAt(p),f=t.findCell(p),h=f.top,m=f.left;e.setNodeMarkup(e.mapping.slice(s).map(p+r),null,vs(d.attrs,"rowspan",a-h)),e.insert(e.mapping.slice(s).map(t.positionAt(a,m,n)),d.type.createAndFill(vs(d.attrs,"rowspan",h+d.attrs.rowspan-a))),c+=d.attrs.colspan-1}}return l}function Is(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,p=t.map[u];if(t.map[u-1]==p){l=!0;var d=n.nodeAt(p),f=t.colCount(p),h=e.mapping.slice(s).map(p+r);e.setNodeMarkup(h,null,gs(d.attrs,a-f,d.attrs.colspan-(a-f))),e.insert(h+d.nodeSize,d.type.createAndFill(gs(d.attrs,0,a-f))),c+=d.attrs.rowspan-1}}return l}function Ns(e,t,n,r,o){var a=n?e.doc.nodeAt(n-1):e.doc,s=Qa.get(a),l=r.top,c=r.left,u=c+o.width,p=l+o.height,f=e.tr,h=0;function m(){a=n?f.doc.nodeAt(n-1):f.doc,s=Qa.get(a),h=f.mapping.maps.length}(function(e,t,n,r,o,a,s){var l,c,u=is(e.doc.type.schema);if(o>t.width)for(var p=0,d=0;p<t.height;p++){var f=n.child(p);d+=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(d-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,p,h)&&m(),Es(f,s,a,n,c,u,l,h)&&m(),Es(f,s,a,n,c,u,p,h)&&m(),Is(f,s,a,n,l,p,c,h)&&m(),Is(f,s,a,n,l,p,u,h)&&m();for(var v=l;v<p;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 d(o.rows[v-l],0,0))}m(),f.setSelection(new ks(f.doc.resolve(n+s.positionAt(l,c,a)),f.doc.resolve(n+s.positionAt(p-1,u-1,a)))),t(f)}ws.prototype.map=function(e){return new ws(e.map(this.anchor),e.map(this.head))},ws.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&&ds(t,n)?new ks(t,n):et.near(n,1)};var Ts=no({ArrowLeft:Ms("horiz",-1),ArrowRight:Ms("horiz",1),ArrowUp:Ms("vert",-1),ArrowDown:Ms("vert",1),"Shift-ArrowLeft":_s("horiz",-1),"Shift-ArrowRight":_s("horiz",1),"Shift-ArrowUp":_s("vert",-1),"Shift-ArrowDown":_s("vert",1),Backspace:Ps,"Mod-Backspace":Ps,Delete:Ps,"Mod-Delete":Ps});function Ds(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Ms(e,t){return function(n,r,o){var i=n.selection;if(i instanceof ks)return Ds(n,r,et.near(i.$headCell,t));if("horiz"!=e&&!i.empty)return!1;var a=Fs(o,e,t);if(null==a)return!1;if("horiz"==e)return Ds(n,r,et.near(n.doc.resolve(i.head+t),t));var s,l=n.doc.resolve(a),c=ms(l,e,t);return s=c?et.near(c,1):t<0?et.near(n.doc.resolve(l.before(-1)),-1):et.near(n.doc.resolve(l.after(-1)),1),Ds(n,r,s)}}function _s(e,t){return function(n,r,o){var i=n.selection;if(!(i instanceof ks)){var a=Fs(o,e,t);if(null==a)return!1;i=new ks(n.doc.resolve(a))}var s=ms(i.$headCell,e,t);return!!s&&Ds(n,r,new ks(i.$anchorCell,s))}}function Ps(e,t){var n=e.selection;if(!(n instanceof ks))return!1;if(t){var r=e.tr,o=is(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 d(o,0,0))})),r.docChanged&&t(r)}return!0}function Rs(e,t){var n=ss(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new ks(n))),!0)}function js(e,t,n){if(!ls(e.state))return!1;var r=Os(n),o=e.state.selection;if(o instanceof ks){r||(r={width:1,height:1,rows:[i.from(xs(is(e.state.schema).cell,n))]});var a=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=Qa.get(a).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=Ss(r,l.right-l.left,l.bottom-l.top),Ns(e.state,e.dispatch,s,l,r),!0}if(r){var c=cs(e.state),u=c.start(-1);return Ns(e.state,e.dispatch,u,Qa.get(c.node(-1)).findCell(c.pos-u),r),!0}return!1}function As(e,t){if(!t.ctrlKey&&!t.metaKey){var n,r=Ls(e,t.target);if(t.shiftKey&&e.state.selection instanceof ks)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(n=ss(e.state.selection.$anchor))&&Bs(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=Bs(e,n),o=null==as.getState(e.state);if(!r||!ds(t,r)){if(!o)return;r=t}var i=new ks(t,r);if(o||!e.state.selection.eq(i)){var a=e.state.tr.setSelection(i);o&&a.setMeta(as,t.pos),e.dispatch(a)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",a),null!=as.getState(e.state)&&e.dispatch(e.state.tr.setMeta(as,-1))}function a(n){var a,s=as.getState(e.state);if(null!=s)a=e.state.doc.resolve(s);else if(Ls(e,n.target)!=r&&!(a=Bs(e,t)))return i();a&&o(a,n)}}function Fs(e,t,n){if(!(e.state.selection instanceof rt))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 Ls(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t}function Bs(e,t){var n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?ss(e.state.doc.resolve(n.pos)):null}var zs=new Ct("fix-tables");function Vs(e,t){var n,r=function(t,r){"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){var o=Qa.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 p=t.nodeAt(u.pos),d=0;d<p.attrs.rowspan;d++)s[u.row+d]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,gs(p.attrs,p.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,vs(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,vs(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(is(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(zs,{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,p=Math.min(i,s+3);u<p;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 Hs(e){var t,n=e.selection,r=cs(e),o=r.node(-1),i=r.start(-1),a=Qa.get(o);return(t=n instanceof ks?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 Ks(e,t,n){var r=t.map,o=t.tableStart,i=t.table,a=n>0?-1:0;bs(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,ys(u.attrs,n-r.colCount(c))),s+=u.attrs.rowspan-1}else{var p=null==a?is(i.type.schema).cell:i.nodeAt(r.map[l+a]).type,d=r.positionAt(s,n,i);e.insert(e.mapping.map(o+d),p.createAndFill())}}return e}function Ws(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Ks(e.tr,n,n.left))}return!0}function $s(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Ks(e.tr,n,n.right))}return!0}function Us(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,gs(u.attrs,n-r.colCount(c)));else{var p=e.mapping.slice(a).map(i+c);e.delete(p,p+u.nodeSize)}s+=u.attrs.rowspan}}function qs(e,t){if(!ls(e))return!1;if(t){var n=Hs(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(var o=n.right-1;Us(r,n,o),o!=n.left;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Qa.get(n.table);t(r)}return!0}function Gs(e,t,n){for(var r=is(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 Xs(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;Gs(r,i,n+c)&&(c=0==n||n==r.height?null:0);for(var u=0,p=r.width*n;u<r.width;u++,p++)if(n>0&&n<r.height&&r.map[p]==r.map[p-r.width]){var d=r.map[p],f=i.nodeAt(d).attrs;e.setNodeMarkup(o+d,null,vs(f,"rowspan",f.rowspan+1)),u+=f.colspan-1}else{var h=null==c?is(i.type.schema).cell:i.nodeAt(r.map[p+c*r.width]).type;l.push(h.createAndFill())}return e.insert(a,is(i.type.schema).row.create(null,l)),e}function Js(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Xs(e.tr,n,n.top))}return!0}function Ys(e,t){if(!ls(e))return!1;if(t){var n=Hs(e);t(Xs(e.tr,n,n.bottom))}return!0}function Zs(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,p=n*r.width;u<r.width;u++,p++){var d=r.map[p];if(n>0&&d==r.map[p-r.width]){var f=o.nodeAt(d).attrs;e.setNodeMarkup(e.mapping.slice(c).map(d+i),null,vs(f,"rowspan",f.rowspan-1)),u+=f.colspan-1}else if(n<r.width&&d==r.map[p+r.width]){var h=o.nodeAt(d),m=h.type.create(vs(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 Qs(e,t){if(!ls(e))return!1;if(t){var n=Hs(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(var o=n.bottom-1;Zs(r,n,o),o!=n.top;o--)n.table=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc,n.map=Qa.get(n.table);t(r)}return!0}function el(e){var t=e.content;return 1==t.childCount&&t.firstChild.isTextblock&&0==t.firstChild.childCount}function tl(e,t){var n=e.selection;if(!(n instanceof ks)||n.$anchorCell.pos==n.$headCell.pos)return!1;var r=Hs(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,p=r.top;p<r.bottom;p++)for(var d=r.left;d<r.right;d++){var f=o.map[p*o.width+d],h=r.table.nodeAt(f);if(!c[f])if(c[f]=!0,null==a)a=f,s=h;else{el(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,vs(ys(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=el(s)?a+1:v;l.replaceWith(g+r.tableStart,v+r.tableStart,u)}l.setSelection(new ks(l.doc.resolve(a+r.tableStart))),t(l)}return!0}function nl(e,t){var n=is(e.schema);return rl((function(e){var t=e.node;return n[t.type.spec.tableRole]}))(e,t)}function rl(e){return function(t,n){var r,o,i=t.selection;if(i instanceof ks){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=ss(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=vs(a,"rowspan",1)),a.colspan>1&&(a=vs(a,"colspan",1));for(var c,u=Hs(t),p=t.tr,d=0;d<u.right-u.left;d++)s.push(l?vs(a,"colwidth",l&&l[d]?[l[d]]: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||p.insert(c=p.mapping.map(h+u.tableStart,1),e({node:r,row:f,col:m}).createAndFill(s[v]))}p.setNodeMarkup(o,e({node:r,row:u.top,col:u.left}),s[0]),i instanceof ks&&p.setSelection(new ks(p.doc.resolve(i.$anchorCell.pos),c&&p.doc.resolve(c))),n(p)}return!0}}function ol(e,t){return function(n,r){if(!ls(n))return!1;var o=cs(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){var i=n.tr;n.selection instanceof ks?n.selection.forEachCell((function(n,r){n.attrs[e]!==t&&i.setNodeMarkup(r,null,vs(n.attrs,e,t))})):i.setNodeMarkup(o.pos,null,vs(o.nodeAfter.attrs,e,t)),r(i)}return!0}}function il(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 al(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!ls(t))return!1;if(n){for(var r=is(t.schema),o=Hs(t),i=t.tr,a=o.map.cellsInRect("column"==e?new Za(o.left,0,o.right,o.map.height):"row"==e?new Za(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(!ls(t))return!1;if(n){var r=is(t.schema),o=Hs(t),i=t.tr,a=il("row",o,r),s=il("column",o,r),l=("column"===e?a:"row"===e&&s)?1:0,c="column"==e?new Za(0,l,1,o.map.height):"row"==e?new Za(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 sl=al("row",{useDeprecatedLogic:!0}),ll=al("column",{useDeprecatedLogic:!0}),cl=al("cell",{useDeprecatedLogic:!0});function ul(e){return function(t,n){if(!ls(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}}}(cs(t),e);if(null!=r){if(n){var o=t.doc.resolve(r);n(t.tr.setSelection(rt.between(o,ps(o))).scrollIntoView())}return!0}}}function pl(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 dl=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")),fl(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))};function fl(e,t,n,r,o,i){for(var a=0,s=!0,l=t.firstChild,c=e.firstChild,u=0,p=0;u<c.childCount;u++)for(var d=c.child(u).attrs,f=d.colspan,h=d.colwidth,m=0;m<f;m++,p++){var v=o==p?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")}dl.prototype.update=function(e){return e.type==this.node.type&&(this.node=e,fl(e,this.colgroup,this.table,this.cellMinWidth),!0)},dl.prototype.ignoreMutation=function(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))};var hl=new Ct("tableColumnResizing");function ml(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=dl);var o=e.lastColumnResizable;return void 0===o&&(o=!0),new bt({key:hl,state:{init:function(e,t){return this.spec.props.nodeViews[is(t.schema).table.name]=function(e,t){return new r(e,n,t)},new vl(-1,!1)},apply:function(e,t){return t.apply(e)}},props:{attributes:function(e){return hl.getState(e).activeHandle>-1?{class:"resize-cursor"}:null},handleDOMEvents:{mousemove:function(e,n){!function(e,t,n,r,o){var i=hl.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=gl(e,t,"left"):u-t.clientX<=n&&(s=gl(e,t,"right"))}if(s!=i.activeHandle){if(!o&&-1!==s){var p=e.state.doc.resolve(s),d=p.node(-1),f=Qa.get(d),h=p.start(-1);if(f.colCount(p.pos-h)+p.nodeAfter.attrs.colspan-1==f.width-1)return}bl(e,s)}}}(e,n,t,0,o)},mouseleave:function(e){!function(e){var t=hl.getState(e.state);t.activeHandle>-1&&!t.dragging&&bl(e,-1)}(e)},mousedown:function(e,t){!function(e,t,n){var r=hl.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=hl.getState(e.state);r.dragging&&(!function(e,t,n){for(var r=e.state.doc.resolve(t),o=r.node(-1),i=Qa.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 p=i.map[u],d=o.nodeAt(p).attrs,f=1==d.colspan?0:s-i.colCount(p);if(!d.colwidth||d.colwidth[f]!=n){var h=d.colwidth?d.colwidth.slice():kl(d.colspan);h[f]=n,l.setNodeMarkup(a+p,null,vs(d,"colwidth",h))}}}l.docChanged&&e.dispatch(l)}(e,r.activeHandle,yl(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(hl,{setDragging:null})))}function s(t){if(!t.which)return a(t);var r=hl.getState(e.state),o=yl(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=Qa.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;fl(i,l.firstChild,l,r,s,n)}(e,r.activeHandle,o,n)}e.dispatch(e.state.tr.setMeta(hl,{setDragging:{startX:t.clientX,startWidth:i}})),window.addEventListener("mouseup",a),window.addEventListener("mousemove",s),t.preventDefault()}(e,t,n)}},decorations:function(e){var t=hl.getState(e);if(t.activeHandle>-1)return function(e,t){for(var n=[],r=e.doc.resolve(t),o=r.node(-1),i=Qa.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],p=a+u+o.nodeAt(u).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",n.push(Sa.widget(p,d))}}return Ta.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}})}var vl=function(e,t){this.activeHandle=e,this.dragging=t};function gl(e,t,n){var r=e.posAtCoords({left:t.clientX,top:t.clientY});if(!r)return-1;var o=r.pos,i=ss(e.state.doc.resolve(o));if(!i)return-1;if("right"==n)return i.pos;var a=Qa.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 yl(e,t,n){var r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function bl(e,t){e.dispatch(e.state.tr.setMeta(hl,{setHandle:t}))}function kl(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function wl(e){void 0===e&&(e={});var t=e.allowTableNodeSelection;return void 0===t&&(t=!1),new bt({key:as,state:{init:function(){return null},apply:function(e,t){var n=e.getMeta(as);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:Cs,handleDOMEvents:{mousedown:As},createSelectionBetween:function(e){if(null!=as.getState(e.state))return e.state.selection},handleTripleClick:Rs,handleKeyDown:Ts,handlePaste:js},appendTransaction:function(e,n,r){return function(e,t,n){var r,o,i=(t||e).selection,a=(t||e).doc;if(i instanceof it&&(o=i.node.type.spec.tableRole)){if("cell"==o||"header_cell"==o)r=ks.create(a,i.from);else if("row"==o){var s=a.resolve(i.from+1);r=ks.rowSelection(s,s)}else if(!n){var l=Qa.get(i.node),c=i.from+1,u=c+l.map[l.width*l.height-1];r=ks.create(a,c+1,u)}}else i instanceof rt&&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=rt.create(a,i.from):i instanceof rt&&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=rt.create(a,i.$from.start(),i.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}(r,Vs(r,n),t)}})}vl.prototype.apply=function(e){var t=this,n=e.getMeta(hl);if(n&&null!=n.setHandle)return new vl(n.setHandle,null);if(n&&void 0!==n.setDragging)return new vl(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){var r=e.mapping.map(t.activeHandle,-1);us(e.doc.resolve(r))||(r=null),t=new vl(r,t.dragging)}return t};var Cl=["blockquote",0],Ol=["hr"],xl=["pre",["code",0]],Sl=["ol",0],El=["ul",0],Il=["li",0],Nl=function(e){for(var t,n={},r=e.attributes,o=0;o<r.length;o++)n[(t=r[o]).name]=t.value;return n},Tl=function(e,t){for(var n in e)if(n&&null!==e[n]&&n!==t)return!0;return!1},Dl=function(e,t){var n={};for(var r in e)r&&null!==e[r]&&r!==t&&(n[r]=e[r]);return n},Ml=function(e){var t;return(t={})[e]={name:e,inclusive:!0,parseDOM:[{tag:e}],toDOM:function(){return[e,0]}},t},_l=Mt({link:{attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}},{href:{default:null},target:{default:null},title:{default:null}}),inclusive:!1,parseDOM:[{tag:"a",getAttrs:Nl}],toDOM:function(e){return["a",Dl(e.attrs),0]}}},Ml("strong"),Ml("b"),Ml("em"),Ml("i"),Ml("u"),Ml("del"),Ml("sub"),Ml("sup"),Ml("code"),{style:{attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"span",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["span",Dl(e.attrs),0]:["span",0]}}}),Pl=Mt({doc:{content:"block+"},paragraph:{content:"inline*",group:"block",attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"p",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["p",Dl(e.attrs),0]:["p",0]}},div:{content:"block*",group:"block",attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"div",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["div",Dl(e.attrs),0]:["div",0]}},blockquote:{attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}}),content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["blockquote",Dl(e.attrs),0]:Cl}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:function(){return Ol}},heading:{attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}},{level:{default:1}}),content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",getAttrs:function(e){return Mt({},Nl(e),{level:1})}},{tag:"h2",getAttrs:function(e){return Mt({},Nl(e),{level:2})}},{tag:"h3",getAttrs:function(e){return Mt({},Nl(e),{level:3})}},{tag:"h4",getAttrs:function(e){return Mt({},Nl(e),{level:4})}},{tag:"h5",getAttrs:function(e){return Mt({},Nl(e),{level:5})}},{tag:"h6",getAttrs:function(e){return Mt({},Nl(e),{level:6})}}],toDOM:function(e){return Tl(e.attrs,"level")?["h"+e.attrs.level,Dl(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 xl}},text:{inline:!0,group:"inline"},image:{inline:!0,attrs:Mt({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",draggable:!0,parseDOM:[{tag:"img",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["img",Dl(e.attrs)]:["img"]}},hard_break:{inline:!0,attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}}),group:"inline",selectable:!1,parseDOM:[{tag:"br",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["br",Dl(e.attrs)]:["br"]}},ordered_list:{content:"list_item+",group:"block",attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}},{type:{default:null},order:{default:1}}),parseDOM:[{tag:"ol",getAttrs:function(e){return Mt({},Nl(e),{order:e.hasAttribute("start")?parseInt(e.getAttribute("start")||"1",10):1})}}],toDOM:function(e){return 1===e.attrs.order?Tl(e.attrs,"order")?["ol",Dl(e.attrs,"order"),0]:Sl:["ol",Mt({},Dl(e.attrs,"order"),{start:e.attrs.order}),0]}},bullet_list:{content:"list_item+",group:"block",attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"ul",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["ul",Dl(e.attrs),0]:El}},list_item:{content:"(paragraph | heading) block*",attrs:Mt({},{style:{default:null},class:{default:null},id:{default:null}}),parseDOM:[{tag:"li",getAttrs:Nl}],toDOM:function(e){return Tl(e.attrs)?["li",Dl(e.attrs),0]:Il},defining:!0}},rs({tableGroup:"block",cellContent:"block+",cellAttributes:{}})),Rl=function(){};Rl.prototype.append=function(e){return e.length?(e=Rl.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Rl.prototype.prepend=function(e){return e.length?Rl.from(e).append(this):this},Rl.prototype.appendInner=function(e){return new Al(this,e)},Rl.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Rl.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Rl.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Rl.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)},Rl.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},Rl.from=function(e){return e instanceof Rl?e:e&&e.length?new jl(e):Rl.empty};var jl=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}(Rl);Rl.empty=new jl([]);var Al=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}(Rl),Fl=Rl,Ll=function(e,t){this.items=e,this.eventCount=t};Ll.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 Bl(e.map));var p,d=e.step.map(r.slice(o));d&&l.maybeStep(d).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],c.push(new Bl(p,null,null,c.length+u.length))),o--,p&&r.appendMap(p,o)}else l.maybeStep(e.step);return e.selection?(a=r?e.selection.map(r.slice(o)):e.selection,s=new Ll(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}},Ll.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]),p=new Bl(e.mapping.maps[l],u,t);(c=s&&s.merge(p))&&(p=c,l?o.pop():a=a.slice(0,a.length-1)),o.push(p),t&&(i++,t=null),r||(s=p)}var d,f,h,m=i-n.depth;return m>Vl&&(f=m,(d=a).forEach((function(e,t){if(e.selection&&0==f--)return h=t,!1})),a=d.slice(h),i-=m),new Ll(a.append(o),i)},Ll.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},Ll.prototype.addMaps=function(e){return 0==this.eventCount?this:new Ll(this.items.append(e.map((function(e){return new Bl(e)}))),this.eventCount)},Ll.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 Bl(l,c,u))}else n.push(new Bl(l))}}),r);for(var l=[],c=t;c<i;c++)l.push(new Bl(o.maps[c]));var u=this.items.slice(0,r).append(l).append(n),p=new Ll(u,a);return p.emptyItemCount()>500&&(p=p.compress(this.items.length-n.length)),p},Ll.prototype.emptyItemCount=function(){var e=0;return this.items.forEach((function(t){t.step||e++})),e},Ll.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,p=new Bl(l.invert(),s,c),d=r.length-1;(u=r.length&&r[d].merge(p))?r[d]=u:r.push(p)}}else i.map&&n--}),this.items.length,0),new Ll(Fl.from(r.reverse()),o)},Ll.empty=new Ll(Fl.empty,0);var Bl=function(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r};Bl.prototype.merge=function(e){if(this.step&&e.step&&!e.selection){var t=e.step.merge(this.step);if(t)return new Bl(t.getMap().invert(),t,this.selection)}};var zl=function(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r},Vl=20;function Hl(e){var t=[];return e.forEach((function(e,n,r,o){return t.push(r,o)})),t}function Kl(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 Wl(e,t,n,r){var o=ql(t),i=Xl.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 zl(r?l:a.remaining,r?a.remaining:l,null,0);n(a.transform.setSelection(s).setMeta(Xl,{redo:r,historyState:c}).scrollIntoView())}}var $l=!1,Ul=null;function ql(e){var t=e.plugins;if(Ul!=t){$l=!1,Ul=t;for(var n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){$l=!0;break}}return $l}function Gl(e){return e.setMeta(Jl,!0)}var Xl=new Ct("history"),Jl=new Ct("closeHistory");function Yl(e){return e={depth:e&&e.depth||100,newGroupDelay:e&&e.newGroupDelay||500},new bt({key:Xl,state:{init:function(){return new zl(Ll.empty,Ll.empty,null,0)},apply:function(t,n,r){return function(e,t,n,r){var o,i=n.getMeta(Xl);if(i)return i.historyState;n.getMeta(Jl)&&(e=new zl(e.done,e.undone,null,0));var a=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(a&&a.getMeta(Xl))return a.getMeta(Xl).redo?new zl(e.done.addTransform(n,null,r,ql(t)),e.undone,Hl(n.mapping.maps[n.steps.length-1]),e.prevTime):new zl(e.done,e.undone.addTransform(n,null,r,ql(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||a&&!1===a.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new zl(e.done.rebased(n,o),e.undone.rebased(n,o),Kl(e.prevRanges,n.mapping),e.prevTime):new zl(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Kl(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?Kl(e.prevRanges,n.mapping):Hl(n.mapping.maps[n.steps.length-1]);return new zl(e.done.addTransform(n,s?t.selection.getBookmark():null,r,ql(t)),Ll.empty,l,n.time)}(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput:function(e,t){var n="historyUndo"==t.inputType?Zl(e.state,e.dispatch):"historyRedo"==t.inputType&&Ql(e.state,e.dispatch);return n&&t.preventDefault(),n}}}})}function Zl(e,t){var n=Xl.getState(e);return!(!n||0==n.done.eventCount)&&(t&&Wl(n,e,t,!1),!0)}function Ql(e,t){var n=Xl.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&Wl(n,e,t,!0),!0)}function ec(e){var t=Xl.getState(e);return t?t.done.eventCount:0}function tc(e){var t=Xl.getState(e);return t?t.undone.eventCount:0}var nc=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 rc(e){var t=e.rules,n=new bt({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),p=u&&o[c].handler(a,u,t-(u[0].length-r.length),n);if(p)return e.dispatch(p.setMeta(i,{transform:p,from:t,to:n,text:r})),!0}return!1}function ic(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 ac=new nc(/--$/,"—"),sc=new nc(/\.\.\.$/,"…"),lc=new nc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),cc=new nc(/"$/,"”"),uc=new nc(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),pc=new nc(/'$/,"’"),dc=[lc,cc,uc,pc];function fc(e,t,n,r){return new nc(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&&Me(c,t,s);if(!u)return null;l.wrap(c,u);var p=l.doc.resolve(i-1).nodeBefore;return p&&p.type==t&&Re(l.doc,i-1)&&(!r||r(o,p))&&l.join(i-1),l}))}function hc(e,t,n){return new nc(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 mc={mark:"strong",altMarks:["b"],altStyle:{name:"font-weight",value:/^(bold(er)?|[5-9]\d{2,})$/}},vc={mark:"em",altMarks:["i"],altStyle:{name:"font-style",value:/^italic$/i}},gc={mark:"u",altStyle:{name:"text-decoration",value:/^underline$/i}},yc={mark:"del",altStyle:{name:"text-decoration",value:/^line-through$/i}},bc={mark:"sub"},kc={mark:"sup"},wc={mark:"link"},Cc="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Oc=function(e,t){var n={},r=t&&t.applyToWord||!1;if(n["Mod-z"]=Zl,n["Shift-Mod-z"]=Ql,n.Backspace=fr(ic,Hn,Kn,$n),n.Enter=fr(Qn,nr,rr,ir),Cc||(n["Mod-y"]=Ql),e.marks.strong&&(n["Mod-b"]=$t(sn,Mt({},mc,{applyToWord:r}))),e.marks.em&&(n["Mod-i"]=$t(sn,Mt({},vc,{applyToWord:r}))),e.marks.u&&(n["Mod-u"]=$t(sn,Mt({},gc,{applyToWord:r}))),e.nodes.hard_break){var o=e.nodes.hard_break,i=fr(tr,(function(e,t){return t(e.tr.replaceSelectionWith(o.create()).scrollIntoView()),!0}));n["Shift-Enter"]=i}return n},xc=function(e){var t,n={};return e.nodes.list_item&&(n.Enter=(t=e.nodes.list_item,function(e,n){return Rn(t)(e,(function(t){var r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();r&&t.ensureMarks(r),n(t)}))})),n},Sc=/style=['"]?[^'"]*?mso-list:\s*[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,Ec=function(e){return/^MsoListParagraph/.test(e.className)},Ic=function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},Nc=function(e,t){var n=document.createElement(e);return n.style.listStyleType=t,n},Tc=function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},Dc=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)):Ec(r)&&n.length?n.push(e):(n=[],"DIV"===r.nodeName?Dc(r.children,t):"TABLE"===r.nodeName&&Array.from(r.querySelectorAll("td,th")).forEach((function(e){Dc(e.children,t)})))}}))},Mc=function(e){var t,n=e.innerHTML,r=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return n=n.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),/^[\u2022\u00b7\u00a7\u00d8oØüvn][\u00a0 ]+/.test(n)?{tag:"ul",style:(t=r(Ic(e)),/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(t)?null:/^o/.test(t)?"circle":"square")}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(n)?{tag:"ol",style:Tc(r(Ic(e)))}:void 0},_c=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?Ic(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(e.removeChild(e.firstChild),3===e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&e.removeChild(e.firstChild),/^( |\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},Pc=function(e){var t=document.createElement("div");t.innerHTML=function(e){return e=e.replace(Sc,(function(e,t,n){return'datalist="'+t+'" datalevel="'+n+'" '+e}))}(e);var n=new Set;return Dc(t.children,n),n.forEach((function(e){return function(e){var t,n,r,o,i,a,s,l,c,u,p,d,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=Mc(c);if(u=g&&g.tag){if(p=f.datalevel||parseFloat(c.style.marginLeft||0),f.datalevel||c.style.marginLeft){var y=u+v;m[p]||(m[p]={}),(!n||n<0)&&(n=p,r=v,o=(s=e.filter((function(e){return e.getAttribute("datalist")===String(r)})))[s.length-1],a=Nc(u,g&&g.style),c.parentNode.insertBefore(a,c),h=p,m[p][y]=a),i=o===c,d=m[p][y],(p>h||!d)&&(d=Nc(u,g&&g.style),m[p][y]=d,t.appendChild(d)),t=_c(c),d.appendChild(t),i?n=h=-1:h=p}}else!t||i&&!Ec(c)||(c.style.marginLeft&&(c.style.marginLeft=""),c.style.marginLeft&&(c.style.margin=""),t.appendChild(c))}}(e)})),t.innerHTML},Rc=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,"")},jc=function(e){return e.replace(/<!--[\s\S]+?-->/g,"")},Ac=function(e,t){return e.replace(new RegExp("<\\/?("+t+")(?:\\s[^>]*?)?>","gi"),"")},Fc=function(e){e.ownerElement&&e.ownerElement.removeAttribute(e.name)},Lc=function(e){/^Mso/.test(e.value)&&Fc(e)},Bc=/\s*;\s*/,zc=/\s*:\s*/,Vc=function(e){var t,n,r=e.value.split(Bc).filter((function(e){return Boolean(e)})),o=e.ownerElement.style,i="";r.forEach((function(e){var r;r=e.split(zc),t=r[0],n=r[1],void 0!==o[t]&&(i+=t+": "+n+"; ")})),(i=i.trim())?e.value=i:Fc(e)},Hc=function(e,t){var n=e;if(t.convertMsLists&&(n=Pc(n)),t.stripTags&&(n=Ac(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 Kc(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 Wc=/<img\s[^>]*?src=(?:'|")file:\/[^'"]+(?:'|")[^>]*>/gi,$c=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,Uc=new RegExp("(?:("+$c.source+"))([\\da-fA-F\\s]+)\\}","g"),qc=/[^\da-fA-F]/g,Gc=/file:\/[^'"]+\.(jpg|png|gif)/i,Xc=/\\(png|jpeg)blip\\/,Jc=function(e,t){var n=e.match(Wc);if(!n||-1===t.types.indexOf("text/rtf"))return e;var r=t.getData("text/rtf"),o=[],i=r.match(Uc);if(!r||!i)return e;for(var a=0,s=i;a<s.length;a++){var l=s[a],c=Xc.exec(l);if(c){var u=l.replace($c,"").replace(qc,"");o.push("data:image/"+c[1]+";base64,"+Kc(u))}}return n.length!==o.length?e:e.replace(Wc,(function(e){var t=o.shift()||"";return e.replace(Gc,t)}))},Yc=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)},Zc=function(e,t,n,r,o){var i,a,s,l,c,u,p=[],d=[],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 p;var g=f?"g":"gi",y=m?new RegExp(v,g):iu(v,g);return e.nodesBetween(n,r,(function(t,f,m){if(o(p))return!1;t.inlineContent&&f+t.content.size>=n&&(d.length=0,t.nodesBetween(0,t.content.size,(function(t,m,v,g){if(o(p))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),d.push(n<=b?{text:c,start:b}:{text:c.slice(n-b),start:n}),u&&u.isText)return;for(a=d.map((function(e){return e.text})).join(""),i=y.exec(a);null!==i&&(s=d[0].start+i.index,l=s+i[0].length,n<=s&&r>=l&&ou(i,h)&&p.push(rt.create(e,s,l)),!o(p));)i=y.exec(a)}else d.length=0})))})),p},Qc=function(e,t){var n=t.backward,r=t.matchCyclic,o=_t(t,["backward","matchCyclic"]),i=n?function(){return!1}:function(e){return e.length>0},a=e.doc,s=e.selection,l=[];return n?!(l=Zc(a,o,0,s.from,i)).length&&r&&(l=Zc(a,o,s.from,a.content.size,i)):!(l=Zc(a,o,s.to,a.content.size,i)).length&&r&&(l=Zc(a,o,0,s.to,i)),l.length?l[l.length-1]:null},eu=function(e,t){return Zc(e,t,0,e.content.size,(function(){return!1}))},tu=function(e,t,n){var r=e.from,o=e.to;return n.insertText(t,r,o).setSelection(rt.create(n.doc,r,r+t.length)),n},nu=function(e,t,n){var r=eu(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},ru=/^[\s0-9~`!@#$%\^&*\(\)_\-=+\\|\[\]{};:'"\?/.,<>]?$/,ou=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 ru.test(r)&&ru.test(o)}return t(e)}return!0},iu=function(e,t){var n=e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d").replace(/\s/g,"\\s");return new RegExp(n,t)};function au(e){var t={class:"k-placeholder","data-placeholder":e};return new bt({key:new Ct("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 Ta.empty;var o=[];return n.descendants((function(e,n){o.push(Sa.node(n,n+e.nodeSize,t))})),Ta.create(n,o)}}})}var su=/\s+/g,lu=/text-align/,cu=function(){return new bt({key:new Ct("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 lu.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(Sa.inline(t+o,t+o+1,{style:"white-space: normal"}));n=su.exec(e.text||"")}})),Ta.create(a,i)}}})},uu=new Ct("highlight");function pu(e){return void 0===e&&(e=uu),new bt({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 Sa.inline(e.from,e.to,e.attrs)}));return Ta.create(e.doc,t)}}})}var du=new Ct("image-resize"),fu={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}},hu=Object.keys(fu),mu=function(e,t,n){e.style[t]=n+"px"},vu=/[^\-]width:|[^\-]height:/,gu=/^.+$/,yu=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(du);return n?new e(n.activeHandle,n.setDragging,n.rect,n.nodePosition):this},e}(),bu=function(e,t,n){var r=t.target.getAttribute("data-direction");if(!r)return!1;var o=du.getState(e.state);t.preventDefault();var i=e.state.tr;function a(t){!function(e,t,n){var r=du.getState(e.state),o=r.rect,i=r.dragging,a=r.nodePosition,s=r.activeHandle;if(i&&o){var l=e.nodeDOM(a),c=fu[s],u=(t.clientX-i.startX)*c.x,p=(t.clientY-i.startY)*c.y,d=c.x?u+l.width:o.width,f=c.y?p+l.height:o.height;if(n.lockRatio&&c.x&&c.y){var h=Math.min(d/l.width,f/l.height),m=l.width*h,v=l.height*h;i.startX=t.clientX-(d-m)*c.x,i.startY=t.clientY-(f-v)*c.y,d=m,f=v}else i.startX=c.x?t.clientX:i.startX,i.startY=c.y?t.clientY:i.startY;mu(l,"width",d),mu(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(du,{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=du.getState(e.state),n=t.rect,r=t.dragging,o=t.nodePosition;if(r&&n){var i=e.state.selection;if(i instanceof it){var a=i.node.attrs,s=n.width,l=n.height,c=void 0;if(vu.test(a.style||"")){var u=Pt(a.style,{style:"width",value:gu,newValue:s+"px"}),p=Pt(u.style||"",{style:"height",value:gu,newValue:l+"px"}).style;c=Mt({},a,{style:p})}else c=Mt({},a,{width:s,height:l});var d=i.node.type.createAndFill(c);if(d){var f=e.state.tr;f.replaceWith(o,o+1,d),f.setSelection(it.create(f.doc,o)),f.setMeta("commandName","image-resize"),f.setMeta("args",c),f.setMeta(du,{setDragging:null,activeHandle:null,rect:n,nodePosition:o}),e.dispatch(f)}}}}(e)})),t.view.addEventListener("mousemove",a),!0},ku=function(e){return void 0===e&&(e={node:"image",lockRatio:!0}),new bt({key:du,view:function(t){return{resize:function(){du.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=du.getState(r),s=a.rect;if(o instanceof it&&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(du,{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 yu("",null,null,-1)},apply:function(e,t){return t.apply(e)}},props:{handleDOMEvents:{mousedown:function(t,n){return bu(t,n,e)}},decorations:function(t){var n=t.selection,r=t.schema.nodes[e.node],o=du.getState(t).rect;if(o&&n instanceof it&&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<hu.length;a++){var s=document.createElement("div");s.className="k-editor-resize-handle "+hu[a],s.setAttribute("data-direction",hu[a]),i.appendChild(s)}return Ta.create(t.doc,[Sa.widget(t.selection.from+1,i)])}return Ta.empty}}})};function wu(e){return void 0===e&&(e={}),new bt({view:function(t){return new Cu(t,e)}})}var Cu=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}}))};Cu.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)}))},Cu.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())},Cu.prototype.setCursor=function(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())},Cu.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"},Cu.prototype.scheduleRemoval=function(e){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.setCursor(null)}),e)},Cu.prototype.dragover=function(e){if(this.editorView.editable){var t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY});if(t){var n=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice&&null==(n=Le(this.editorView.state.doc,n,this.editorView.dragging.slice)))return this.setCursor(null);this.setCursor(n),this.scheduleRemoval(5e3)}}},Cu.prototype.dragend=function(){this.scheduleRemoval(20)},Cu.prototype.drop=function(){this.scheduleRemoval(20)},Cu.prototype.dragleave=function(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)};var Ou=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 d.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 xu(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);if(0!=n)for(var r=e.node(t).child(n-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}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}}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&&!it.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}(et);Ou.prototype.visible=!1,et.jsonID("gapcursor",Ou);var xu=function(e){this.pos=e};xu.prototype.map=function(e){return new xu(e.map(this.pos))},xu.prototype.resolve=function(e){var t=e.resolve(this.pos);return Ou.valid(t)?new Ou(t):et.near(t)};var Su=function(){return new bt({props:{decorations:Tu,createSelectionBetween:function(e,t,n){if(t.pos==n.pos&&Ou.valid(n))return new Ou(n)},handleClick:Nu,handleKeyDown:Eu}})},Eu=no({ArrowLeft:Iu("horiz",-1),ArrowRight:Iu("horiz",1),ArrowUp:Iu("vert",-1),ArrowDown:Iu("vert",1)});function Iu(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 rt){if(!o.endOfTextblock(n)||0==a.depth)return!1;s=!1,a=e.doc.resolve(t>0?a.after():a.before())}var l=Ou.findFrom(a,t,s);return!!l&&(r&&r(e.tr.setSelection(new Ou(l))),!0)}}function Nu(e,t,n){if(!e.editable)return!1;var r=e.state.doc.resolve(t);if(!Ou.valid(r))return!1;var o=e.posAtCoords({left:n.clientX,top:n.clientY}).inside;return!(o>-1&&it.isSelectable(e.state.doc.nodeAt(o)))&&(e.dispatch(e.state.tr.setSelection(new Ou(r))),!0)}function Tu(e){if(!(e.selection instanceof Ou))return null;var t=document.createElement("div");return t.className="ProseMirror-gapcursor",Ta.create(e.doc,[Sa.widget(e.selection.head,t,{key:"gapcursor"})])}},function(e,t){e.exports=r},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,n){"use strict";n.r(t),n.d(t,"Toolbar",(function(){return P})),n.d(t,"ToolbarItem",(function(){return j})),n.d(t,"ToolbarSeparator",(function(){return F})),n.d(t,"ToolbarSpacer",(function(){return L})),n.d(t,"Button",(function(){return o.a})),n.d(t,"ButtonGroup",(function(){return i.a})),n.d(t,"SplitButton",(function(){return S})),n.d(t,"SplitButtonItem",(function(){return m})),n.d(t,"DropDownButton",(function(){return D})),n.d(t,"DropDownButtonItem",(function(){return I})),n.d(t,"Chip",(function(){return oe})),n.d(t,"ChipList",(function(){return ee})),n.d(t,"FloatingActionButton",(function(){return ge})),n.d(t,"FloatingActionButtonItem",(function(){return ce}));var r,o=n(31),i=n(32),a=n(0),s=n(1),l=n(82),c=n(81),u=n(19),p=n(83),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)}),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){return t.props.onClick(e,t.props.index)},t}return d(t,e),t.prototype.render=function(){var e=this.props,t=e.dataItem,n=e.focused,r=e.id,o=e.onDown,i=e.render,s=a.createElement("li",{id:r,className:Object(u.a)("k-item",{"k-state-focused":n,"k-state-selected":t.selected,"k-state-disabled":t.disabled}),onClick:this.onClick,onMouseDown:o,onPointerDown:o,role:"menuItem","aria-disabled":t.disabled||void 0},this.renderContent());return void 0!==this.props.item&&void 0!==i?i.call(void 0,s,this.props):s},t.prototype.renderContent=function(){var e=this.props,t=e.dataItem,n=e.textField,r=e.index,o=this.props.dataItem.render||this.props.item||(void 0===this.props.item?this.props.render:null),i=void 0!==t.text?t.text:n?t[n]:t,s=t.icon?"k-icon k-i-"+t.icon:t.iconClass;return o&&a.createElement(o,{item:t,itemIndex:r})||[s&&a.createElement("span",{className:s,role:"presentation",key:"icon"}),t.imageUrl&&a.createElement("img",{className:"k-image",alt:"",src:t.imageUrl,role:"presentation",key:"image"}),i]},t}(a.Component),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(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){return null},t.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,disabled:s.bool,render:s.any},t}(a.Component),v=function(e,t,n,r){if(n)return e;switch(t){case c.a.enter:case c.a.space:case c.a.esc:return-1;case c.a.up:case c.a.left:return Math.max(0,e-1);case c.a.down:case c.a.right:return Math.min(r-1,e+1);default:return e}},g=n(28);function y(e){var t={horizontal:"left",vertical:"bottom"};return e&&(t.horizontal="right"),t}function b(e){var t={horizontal:"left",vertical:"top"};return e&&(t.horizontal="right"),t}var k=n(30),w=n(9),C=n(16),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=C.a.styles,S=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(l.a)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==c.a.down?n.opened&&e.keyCode===c.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===c.a.enter||e.keyCode===c.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===c.a.esc&&(r={focusedIndex:-1,opened:!1},n.dispatchPopupEvent(e,r.opened)),n.opened){var o=v(t,e.keyCode,e.altKey,n.buttonsData.length);o!==t&&((r=r||{}).focusedIndex=o);var i=e.keyCode===c.a.up||e.keyCode===c.a.down||e.keyCode===c.a.left||e.keyCode===c.a.right;!e.altKey&&i&&e.preventDefault()}r&&n.setState(r)}},n.onFocus=function(e){Object(p.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(p.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(p.a)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(k.a)(w.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||a.Children.toArray(this.props.children).filter((function(e){return e&&e.type===m})).map((function(e){return e.props}));var t=this.isRtl(),n=t?"rtl":void 0,r=this.props,i=r.tabIndex,s=r.disabled,l=this.state.focusedIndex;return a.createElement("div",{className:Object(u.a)("k-widget","k-split-button","k-button-group",[x[""+this.props.look]],{"k-state-focused":this.state.focused},this.props.className),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},a.createElement(o.a,{onClick:function(t){return e.onItemClick(t,-1)},disabled:s||void 0,tabIndex:i,accessKey:this.props.accessKey,className:this.props.buttonClass,icon:this.props.icon,iconClass:this.props.iconClass,imageUrl:this.props.imageUrl,look:this.props.look,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":s,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" splitbutton","aria-owns":this.guid,"aria-activedescendant":l>=0?this.guid+"-"+l:void 0},this.props.text),a.createElement(o.a,{icon:"arrow-s",disabled:s||void 0,tabIndex:-1,look:this.props.look,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(p.a)(this.props.onButtonClick,e,this,void 0):Object(p.a)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t}))},t.prototype.renderPopup=function(e){var t=this.props.popupSettings,n=void 0===t?{}:t;return a.createElement(g.a,{anchor:this.wrapper,show:this.opened,animate:n.animate,popupClass:Object(u.a)("k-list-container k-reset k-group",n.popupClass),anchorAlign:n.anchorAlign||y(e),popupAlign:n.popupAlign||b(e),style:e?{direction:"rtl"}:void 0},a.createElement("ul",{className:"k-list k-reset",role:"menu",id:this.guid},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,i){return a.createElement(f,{dataItem:t,textField:o,focused:e.state.focusedIndex===i,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,key:i,index:i,id:e.guid+"-"+i})})):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:s.string,onButtonClick:s.func,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,text:s.string,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.any,item:s.func,look:s.string,className:s.string,buttonClass:s.string,dir:s.string},t}(a.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)}}(),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return E(t,e),t.prototype.render=function(){return null},t.propTypes={text:s.string,icon:s.string,iconClass:s.string,imageUrl:s.string,selected:s.bool,disabled:s.bool,render:s.any},t}(a.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(){return(T=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){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(l.a)(),n.buttonsData=[],n.onKeyDown=function(e){var t=n.state.focusedIndex;if(e.altKey)n.opened||e.keyCode!==c.a.down?n.opened&&e.keyCode===c.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=T({},n.state);if(e.keyCode===c.a.enter||e.keyCode===c.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===c.a.esc&&(r.focusedIndex=-1,r.opened=!1,n.dispatchPopupEvent(e,r.opened)),n.opened){var o=v(t,e.keyCode,e.altKey,n.buttonsData.length);r.focusedIndex=o;var i=e.keyCode===c.a.up||e.keyCode===c.a.down||e.keyCode===c.a.left||e.keyCode===c.a.right;!e.altKey&&i&&e.preventDefault()}n.setState(r)}},n.onFocus=function(e){n.setState({focused:!0,focusedIndex:n.opened?0:-1}),Object(p.a)(n.props.onFocus,e,n,void 0)},n.onBlur=function(e){n.setState({focused:!1,opened:!1,focusedIndex:-1}),Object(p.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(p.a)(t?n.props.onOpen:n.props.onClose,e,n,void 0)},Object(k.a)(w.a),n}return N(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,r=this.props,i=r.tabIndex,s=r.disabled,l=this.state.focusedIndex;return this.buttonsData=this.props.items||a.Children.toArray(this.props.children).filter((function(e){return e&&e.type===I})).map((function(e){return e.props})),a.createElement("div",{className:Object(u.a)("k-widget","k-dropdown-button",this.props.className,{"k-state-focused":this.state.focused}),onKeyDown:this.onKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,dir:n,ref:function(t){return e.wrapper=t}},a.createElement(o.a,{onClick:this.onClickMainButton,onMouseDown:this.mouseDown,disabled:s||void 0,tabIndex:i,accessKey:this.props.accessKey,icon:this.props.icon,iconClass:this.props.iconClass,className:this.props.buttonClass,imageUrl:this.props.imageUrl,look:this.props.look,primary:this.props.primary,dir:n,ref:function(t){return e.mainButton=t&&t.element},type:"button","aria-disabled":s,"aria-haspopup":!0,"aria-expanded":this.opened,"aria-label":this.props.text+" dropdownbutton","aria-owns":this.guid,"aria-activedescendant":l>=0?this.guid+"-"+l: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(p.a)(this.props.onItemClick,e,this,{item:this.buttonsData[t],itemIndex:t})},t.prototype.renderPopup=function(e){var t=this.props.popupSettings,n=void 0===t?{}:t;return a.createElement(g.a,{anchor:this.wrapper,show:this.opened,animate:n.animate,popupClass:Object(u.a)("k-list-container k-reset k-group",n.popupClass),anchorAlign:n.anchorAlign||y(e),popupAlign:n.popupAlign||b(e),style:e?{direction:"rtl"}:void 0},a.createElement("ul",{className:"k-list k-reset",role:"menu",id:this.guid},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,i){return a.createElement(f,{dataItem:t,textField:o,focused:e.state.focusedIndex===i,onClick:e.onItemClick,onDown:e.onItemDown,render:r,item:n,index:i,key:i,id:e.guid+"-"+i})})):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:s.string,primary:s.bool,onFocus:s.func,onBlur:s.func,onItemClick:s.func,onOpen:s.func,onClose:s.func,items:s.arrayOf(s.any),textField:s.string,tabIndex:s.number,disabled:s.bool,icon:s.string,iconClass:s.string,imageUrl:s.string,popupSettings:s.object,itemRender:s.func,item:s.func,look:s.string,className:s.string,buttonClass:s.string,dir:s.string},t}(a.Component),M=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)}}(),_=function(){return(_=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(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===c.a.left||e.keyCode===c.a.right)&&!e.defaultPrevented&&-1!==r.buttons.findIndex((function(e){return e===t}))){var n=r.focusedIndex;e.keyCode===c.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,_({target:r},i,{nativeEvent:e}))}}},Object(k.a)(w.a),r}return M(t,e),Object.defineProperty(t.prototype,"selectors",{get:function(){return this.props.buttons||C.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 a.createElement("div",{className:Object(u.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:s.number,dir:s.string,keyboardNavigation:s.bool,style:s.object,className:s.string,onResize:s.func,buttons:s.arrayOf(s.string)},t.defaultProps={tabIndex:0},t}(a.Component),R=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)}}(),j=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._element=null,t}return R(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;return a.createElement("span",{className:this.props.className,style:this.props.style,ref:function(t){return e._element=t}},this.props.children)},t.propTypes={className:s.string},t}(a.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 a.createElement(j,{className:"k-separator"})},t}(a.PureComponent),L=a.forwardRef((function(e,t){var n=a.useRef(null),r=a.useRef(null);a.useImperativeHandle(r,(function(){return{element:n.current}})),a.useImperativeHandle(t,(function(){return{element:n.current}}));var o=a.useMemo((function(){return Object(u.a)("k-spacer",e.className)}),[e.className]);return a.createElement("span",{ref:n,className:o})}));L.propTypes={className:s.string};var B,z,V=n(85),H=function(e,t,n){void 0===n&&(n={});var r=a.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]),o=a.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:a.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:o,onMouseDown:r,onDoubleClick:a.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:a.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:a.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:a.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:a.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:a.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])}},K=n(86),W=n(93);!function(e){e.single="single",e.multiple="multiple",e.none="none"}(B||(B={})),function(e){e.toggle="toggle",e.remove="remove"}(z||(z={}));var $;!function(e){e.next="next",e.prev="prev",e.current="current",e.reset="reset"}($||($={}));var U;!function(e){e.remove="remove",e.add="add",e.reorder="reorder"}(U||(U={}));var 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)},G=a.createContext([null,function(e){}]),X=a.createContext([null,function(e){}]),J=a.createContext([null,function(e){}]),Y=function(e,t,n){var r=a.useState(e),o=r[0],i=r[1];return[o,function(e){var r=function(e,t){switch(t.selection){case B.single:switch(t.type){case z.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 z.remove:return t.payload===e?null:e;default:return e}case B.multiple:switch(t.type){case z.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 z.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 B.none:return null;default:return e}}(t.state||o,q({},e,t));n&&n(r,e.event),i(r)}]},Z=function(e){var t=a.useState(null),n=t[0],r=t[1];return[n,function(t){var n=function(e,t){var n=t.items.findIndex((function(t){return t===e}));switch(t.type){case $.next:return n===t.items.length-1?e:t.items[n+1];case $.prev:return 0===n?e:t.items[n-1];case $.current:return t.payload;case $.reset:return null;default:return e}}(t.payload,q({},t,e));r(n)}]},Q=function(e,t,n){var r=a.useState(e),o=r[0],i=r[1];return[o,function(e){var r=function(e,t){switch(t.type){case U.add:break;case U.remove:return e.filter((function(e){return e[t.valueField]!==t.payload}));case U.reorder:break;default:return e}}(t.state||o,q({},e,t));n&&n(r,e.event),i(r)}]},ee=a.forwardRef((function(e,t){Object(k.a)(w.a);var n=a.useRef(null),r=a.useRef(null),o=Object(V.a)(r,e.dir),i=a.useMemo((function(){return e.chip||oe}),[e.chip,oe]),s=a.useMemo((function(){return e.selection||ne.selection}),[e.selection,ne.selection]);a.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),a.useImperativeHandle(t,(function(){return n.current}));var l=a.useCallback((function(t,r){e.onChange&&n.current&&e.onChange.call(void 0,{value:t,target:n.current,syntheticEvent:r})}),[e.onChange]),c=Y(e.value||e.defaultValue,{selection:s,state:e.value},l),p=c[0],d=c[1],f=a.useCallback((function(t,r){e.onDataChange&&n.current&&e.onDataChange.call(void 0,{value:t,target:n.current,syntheticEvent:r})}),[e.onDataChange]),h=Q(e.data||e.defaultData||ne.defaultData,{state:e.data,valueField:e.valueField||ne.valueField},f),m=h[0],v=h[1],g=a.useCallback((function(t,n){return t.push(n[e.valueField||ne.valueField]),t}),[e.valueField,ne.valueField]),y=a.useMemo((function(){return e.data||m}),[e.data,m]),b=a.useMemo((function(){return e.value||p}),[e.value,p]),C=a.useMemo((function(){return y.reduce(g,[])}),[y,g]),O=Z({items:C}),x=O[0],S=O[1],E=H(e,n);return a.createElement(G.Provider,{value:[b,d]},a.createElement(X.Provider,{value:[x,S]},a.createElement(J.Provider,{value:[y,v]},a.createElement("div",q({ref:r},E,{role:"listbox",id:e.id,dir:o,style:e.style,tabIndex:Object(K.a)(e.tabIndex,e.disabled,void 0),className:Object(u.a)("k-chip-list",{"k-rtl":"rtl"===o,"k-selection-single":"single"===s,"k-selection-multiple":"multiple"===s,"k-state-disabled":e.disabled},e.className),"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy}),y.map((function(t){return a.createElement(i,{role:"option",dataItem:t,key:Object(W.a)(e.valueField||ne.valueField)(t),text:Object(W.a)(e.textField||ne.textField)(t),value:Object(W.a)(e.valueField||ne.valueField)(t)})}))))))})),te={id:s.string,className:s.string,tabIndex:s.number,data:s.any,defaultData:s.arrayOf(s.any),onDataChange:s.func,value:s.oneOfType([s.any,s.arrayOf(s.any)]),defaultValue:s.oneOfType([s.any,s.arrayOf(s.any)]),onChange:s.func,selection:s.oneOf(["single","none","multiple"]),textField:s.string,valueField:s.string,disabled:s.bool,dir:s.oneOf(["ltr","rtl"]),ariaLabelledBy:s.string,ariaDescribedBy:s.string},ne={chip:oe,disabled:!1,defaultValue:null,defaultData:[],dir:"ltr",selection:"none",textField:"text",valueField:"value",removable:"removable"};ee.displayName="KendoReactChipList",ee.propTypes=te,ee.defaultProps=ne;var 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)},oe=a.forwardRef((function(e,t){Object(k.a)(w.a);var n=a.useRef(null),r=a.useRef(null),o=Object(V.a)(r,e.dir);a.useImperativeHandle(n,(function(){return{element:r.current,props:e}})),a.useImperativeHandle(t,(function(){return n.current}));var i=a.useContext(G),s=i[0],l=i[1],p=a.useContext(X),d=p[0],f=p[1],h=a.useContext(J)[1],m=a.useMemo((function(){return e.selected||(Array.isArray(s)?s.some((function(t){return t===e.value})):s===e.value)}),[e.selected,e.value,s]),v=a.useMemo((function(){return d===e.value}),[e.value,d]),g=a.useMemo((function(){return e.look||ae.look}),[e.look]);a.useEffect((function(){v&&r.current&&r.current.focus()}),[v]);var y=a.useCallback((function(t){l({type:z.toggle,payload:e.value,event:t})}),[e.onClick,l,e.value]),b=a.useCallback((function(t){e.removable&&(h({type:U.remove,payload:e.value,event:t}),f({type:$.reset,payload:e.value,event:t}),l({type:z.remove,payload:e.value,event:t}),e.onRemove&&e.onRemove.call(void 0,{target:n.current,syntheticEvent:t}))}),[e.onRemove,e.removable,h,f,l]),C=a.useCallback((function(t){switch(t.keyCode){case c.a.left:f({type:$.prev,payload:e.value,event:t});break;case c.a.right:f({type:$.next,payload:e.value,event:t});break;case c.a.enter:l({type:z.toggle,payload:e.value,event:t});break;case c.a.delete:b(t)}e.onKeyDown&&e.onKeyDown.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onKeyDown,f,l,b]),O=a.useCallback((function(t){f({payload:e.value,type:$.current,event:t}),e.onFocus&&e.onFocus.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onFocus,f]),x=a.useCallback((function(t){e.onBlur&&e.onBlur.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onBlur]),S=H(e,n,{onClick:y});return a.createElement("div",re({},S,{role:e.role,id:e.value,style:e.style,ref:r,dir:o,tabIndex:Object(K.a)(e.tabIndex,e.disabled,void 0),className:Object(u.a)("k-chip",{"k-rtl":"rtl"===o,"k-state-disabled":e.disabled,"k-state-selected":m,"k-state-focus":v,"k-chip-success":"success"===e.type,"k-chip-warning":"warning"===e.type,"k-chip-error":"error"===e.type,"k-chip-info":"info"===e.type,"k-chip-has-icon":e.icon,"k-chip-outline":"outline"===g||"outlined"===g,"k-chip-solid":"solid"===g||"filled"===g},e.className),"aria-checked":m,"aria-disabled":e.disabled,"aria-describedby":e.ariaDescribedBy,onFocus:O,onBlur:x,onKeyDown:C}),m&&a.createElement("span",{className:"k-selected-icon-wrapper"},a.createElement("span",{className:"k-selected-icon k-icon "+(e.selectedIcon||ae.selectedIcon)})),e.icon&&a.createElement("span",{className:"k-icon k-chip-icon "+e.icon}),a.createElement("span",{className:"k-chip-content"},void 0!==e.children?e.children:e.text&&a.createElement("span",{"aria-label":e.text,className:"k-chip-label"},e.text)),e.removable&&a.createElement("span",{className:"k-remove-icon",onClick:b},a.createElement("span",{className:"k-icon "+e.removeIcon})))})),ie={id:s.string,text:s.string,value:s.any,type:s.oneOf(["none","success","warning","error","info"]),dir:s.oneOf(["ltr","rtl"]),removable:s.bool,removeIcon:s.string,disabled:s.bool,icon:s.string,selectedIcon:s.string,look:s.string,onRemove:s.func,dataItem:s.any,selected:s.bool,ariaDescribedBy:s.string},ae={disabled:!1,removable:!1,selectedIcon:"k-i-check",look:"solid",removeIcon:"k-i-close-circle",dir:"ltr"};oe.displayName="KendoReactChip",oe.propTypes=ie,oe.defaultProps=ae;var se=function(){return(se=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,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},ce=a.forwardRef((function(e,t){var n=e.className,r=e.disabled,o=e.text,i=e.icon,s=e.style,l=e.id,c=e.focused,p=e.tabIndex,d=e.index,f=e.dataItem,h=e.item,m=e.onDown,v=e.onClick,g=le(e,["className","disabled","text","icon","style","id","focused","tabIndex","index","dataItem","item","onDown","onClick"]),y=a.useRef(null),b=a.useCallback((function(){y.current&&y.current.focus()}),[]),k=a.useCallback((function(){return{element:y.current,focus:b}}),[b]);a.useImperativeHandle(t,k);var w=a.useCallback((function(e){v&&void 0!==d&&!r&&v(e,d)}),[v,d]),C=a.useMemo((function(){return Object(u.a)("k-fab-item",{"k-state-focus":c,"k-state-disabled":r},n)}),[n,r,c]),O=h;return a.createElement("li",se({ref:y,id:l,className:C,style:s,role:"menuitem",tabIndex:Object(K.a)(p,r),"aria-disabled":r,"aria-label":(o||"")+" floatingactionbutton item",onClick:w,onMouseDown:m,onPointerDown:m},g),O?a.createElement(O,{itemIndex:d,item:f}):a.createElement(a.Fragment,null,o&&a.createElement("span",{className:"k-fab-item-text"},o),i&&a.createElement("span",{className:Object(u.a)("k-fab-item-icon k-icon k-i-"+i)})))}));ce.propTypes={className:s.string,style:s.object,children:s.any,disabled:s.bool,focused:s.bool,index:s.number,icon:s.string,text:s.string,tabIndex:s.number,customProp:s.any},ce.displayName="KendoFloatingActionButtonItem";var ue=function(e){return"number"==typeof e?e+"px":e},pe=function(e,t){var n={horizontal:t?"right":"left",vertical:"bottom"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},de=function(e,t){var n={horizontal:t?"right":"left",vertical:"top"};return"end"===e.horizontal&&(n.horizontal=t?"left":"right"),n},fe=function(e,t){return{end:t?"left":"right",center:"left",start:t?"right":"left"}[e.horizontal||"end"]},he=function(e){return{top:"top",middle:"top",bottom:"bottom"}[e.vertical||"bottom"]},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)},ve=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},ge=a.forwardRef((function(e,t){Object(k.a)(w.a);var n=e.align,r=void 0===n?ye.align:n,o=e.alignOffset,i=e.className,s=e.disabled,d=e.icon,f=e.iconClass,h=e.id,m=e.items,v=e.item,y=e.text,b=e.positionMode,C=void 0===b?ye.positionMode:b,O=e.shape,x=void 0===O?ye.shape:O,S=e.size,E=void 0===S?ye.size:S,I=e.style,N=e.themeColor,T=void 0===N?ye.themeColor:N,D=e.tabIndex,M=e.accessKey,_=e.popupSettings,P=void 0===_?{}:_,R=e.onClick,j=e.onItemClick,A=e.onFocus,F=e.onBlur,L=e.onKeyDown,B=e.onOpen,z=e.onClose,H=ve(e,["align","alignOffset","className","disabled","icon","iconClass","id","items","item","text","positionMode","shape","size","style","themeColor","tabIndex","accessKey","popupSettings","onClick","onItemClick","onFocus","onBlur","onKeyDown","onOpen","onClose"]),W=a.useRef(null),$=a.useRef(null),U=a.useRef(null),q=a.useRef(null),G=a.useCallback((function(){$.current&&$.current.focus()}),[]),X=a.useCallback((function(){return{element:$.current,focus:G}}),[G]);a.useImperativeHandle(W,X),a.useImperativeHandle(t,(function(){return W.current}));var J=a.useState(!1),Y=J[0],Z=J[1],Q=a.useState(!1),ee=Q[0],te=Q[1],ne=a.useState(-1),re=ne[0],oe=ne[1],ie=a.useMemo((function(){return Object(l.a)()}),[]),ae=Object(V.a)($,e.dir),se="rtl"===ae,le=a.useMemo((function(){return Object(l.a)()}),[]);a.useEffect((function(){!function(e,t,n,r){var o=t.horizontal,i=t.vertical;if(e.current){var a=n&&void 0!==n.x?ue(n.x):"16px",s=n&&void 0!==n.x?"calc(50% + "+ue(n.x)+")":"50%",l=n&&void 0!==n.y?ue(n.y):"16px",c=n&&void 0!==n.y?"calc(50% + "+ue(n.y)+")":"50%";e.current.style.setProperty(fe(t,r),"center"===o?s:a),e.current.style.setProperty(he(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"))}}($,r,o,se)}),[$,r,o,se]),a.useEffect((function(){ee&&$&&$.current&&$.current.focus()}),[ee,$]);var ge=a.useCallback((function(e,t){m&&Object(p.a)(t?B:z,e,X(),void 0)}),[B,z,m]),be=a.useCallback((function(e){e.target&&!s&&(!m&&R?Object(p.a)(R,e,X(),void 0):(Z(!Y),te(!0),oe(Y?-1:0),ge(e,!Y)))}),[Z,te,oe,R,ge,Y,m,s]),ke=a.useCallback((function(e){te(!0),oe(Y?0:-1),A&&Object(p.a)(A,e,X(),void 0)}),[A,te,oe]),we=a.useCallback((function(e){te(!1),Z(!1),oe(-1),Object(p.a)(F,e,X(),void 0),Y&&ge(e,!1)}),[F,te,Z,oe,ge]),Ce=a.useCallback((function(e){e.preventDefault()}),[]),Oe=a.useCallback((function(e,t){m&&(m[t].disabled||Object(p.a)(j,e,X(),{itemProps:m[t],itemIndex:t}))}),[j]),xe=a.useCallback((function(e,t){e.target&&m&&(oe(t),Z(!1),Oe(e,t),ge(e,!1))}),[oe,Z,Oe,ge]),Se=a.useCallback((function(e){document.activeElement===$.current&&e.preventDefault()}),[$,document.activeElement]),Ee=a.useCallback((function(e){var t=re,n=m?m.length-1:-1,o="bottom"===r.vertical;switch(e.keyCode){case c.a.enter:case c.a.space:t>=0&&Oe(e,t),e.preventDefault(),Z(!Y),oe(Y?-1:0);break;case c.a.esc:e.preventDefault(),Z(!1),oe(-1);break;case c.a.home:e.preventDefault(),oe(0);break;case c.a.end:e.preventDefault(),oe(n);break;case c.a.down:case c.a.right:e.preventDefault(),t<n&&!o&&oe(t+1),t>0&&o&&oe(t-1);break;case c.a.up:case c.a.left:e.preventDefault(),t>0&&!o&&oe(t-1),t<n&&o&&oe(t+1)}Object(p.a)(L,e,X(),void 0)}),[L,re,oe,se,Z]),Ie=a.useMemo((function(){return Object(u.a)("k-fab","k-fab-"+T,"k-fab-"+x,{"k-fab-sm":"small"===E,"k-fab-md":"medium"===E,"k-fab-lg":"large"===E,"k-state-disabled":s,"k-pos-absolute":"absolute"===C,"k-pos-fixed":"fixed"===C,"k-state-focus":ee},"k-"+r.vertical+"-"+r.horizontal,i)}),[T,E,x,s,C,r,ee,i]),Ne=m&&m.map((function(e,t){return a.createElement(ce,me({},e,{key:t,index:t,id:le+"-"+t,disabled:s||e.disabled,focused:re===t,dataItem:e,item:v,className:Object(u.a)(e.className,(n=ae||"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:xe,onDown:Se}));var n,o})),Te=d&&!y,De=($.current?$.current.offsetWidth:0)/2-16;return a.createElement(a.Fragment,null,a.createElement("button",me({ref:$,id:h||ie,role:m?"menubutton":"button",type:"button","aria-disabled":s,"aria-expanded":m?Y:void 0,"aria-haspopup":!!m,"aria-label":(y||"")+" floatingactionbutton","aria-owns":m?le:void 0,"aria-activedescendant":re>=0&&m?le+"-"+re:void 0,tabIndex:Object(K.a)(D,s),accessKey:M,dir:ae,disabled:s,className:Ie,style:I,onClick:be,onMouseDown:Ce,onFocus:ke,onBlur:we,onKeyDown:Ee},H),d?a.createElement("span",{role:"presentation",className:Object(u.a)("k-fab-icon k-icon k-i-"+d)}):f?a.createElement("span",{role:"presentation",className:f}):null,y&&a.createElement("span",{className:"k-fab-text"},y)),a.createElement(g.a,{ref:q,anchor:$.current,show:Y,animate:P.animate,popupClass:Object(u.a)("k-popup-transparent k-fab-popup",P.popupClass),anchorAlign:P.anchorAlign||pe(r,se),popupAlign:P.popupAlign||de(r,se),style:{boxShadow:"none"}},a.createElement("ul",{ref:U,role:"menu","aria-labelledby":h,id:le,className:Object(u.a)("k-fab-items",{"k-fab-items-bottom":"bottom"!==r.vertical,"k-fab-items-top":"bottom"===r.vertical}),style:{paddingLeft:Te?De:void 0,paddingRight:Te?De:void 0}},Ne)))}));ge.propTypes={className:s.string,style:s.object,id:s.string,dir:s.string,tabIndex:s.number,accessKey:s.string,disabled:s.bool,icon:s.string,iconClass:s.string,text:s.string,alignOffset:s.shape({x:s.oneOfType([s.number,s.string]),y:s.oneOfType([s.number,s.string])}),align:s.shape({vertical:s.oneOf(["top","middle","bottom"]),horizontal:s.oneOf(["start","center","end"])}),positionMode:s.oneOf(["absolute","fixed"]),shape:s.oneOf(["rectangle","rounded","pill"]),size:s.oneOf(["small","medium","large"]),themeColor:s.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse"])};var ye={align:{vertical:"bottom",horizontal:"end"},shape:"pill",size:"medium",themeColor:"primary",positionMode:"fixed"};ge.displayName="KendoFloatingActionButton"},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={name:"@progress/kendo-react-buttons",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167220,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 r}));var r=function(){}},function(e,t){e.exports=o},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(6),i=n(4),a=r({},i.indentRules.listsTypes);!function(e){var t={type:"button"};e.bold=r({},i.bold,{props:r({icon:"bold"},t),messages:{title:o.keys.bold},commandName:"Bold"}),e.italic=r({},i.italic,{props:r({icon:"italic"},t),messages:{title:o.keys.italic},commandName:"Italic"}),e.underline=r({},i.underline,{props:r({icon:"underline"},t),messages:{title:o.keys.underline},commandName:"Underline"}),e.strikethrough=r({},i.strikethrough,{props:r({icon:"strikethrough"},t),messages:{title:o.keys.strikethrough},commandName:"Strikethrough"}),e.subscript=r({},i.subscript,{props:r({icon:"subscript"},t),messages:{title:o.keys.subscript},commandName:"Subscript"}),e.superscript=r({},i.superscript,{props:r({icon:"superscript"},t),messages:{title:o.keys.superscript},commandName:"Superscript"}),e.link=r({},i.link,{props:r({icon:"link-horizontal"},t),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"},t),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"},t),messages:{createTable:o.keys.createTable,createTableHint:o.keys.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:r({icon:"table-row-insert-above"},t),messages:{title:o.keys.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:r({icon:"table-row-insert-below"},t),messages:{title:o.keys.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:r({icon:"table-column-insert-left"},t),messages:{title:o.keys.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:r({icon:"table-column-insert-right"},t),messages:{title:o.keys.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:r({icon:"table-row-delete"},t),messages:{title:o.keys.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:r({icon:"table-column-delete"},t),messages:{title:o.keys.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:r({icon:"table-delete"},t),messages:{title:o.keys.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:r({icon:"cells-merge"},t),messages:{title:o.keys.mergeCells},commandName:"MergeCells"},e.splitCell={props:r({icon:"cell-split-horizontally"},t),messages:{title:o.keys.splitCell},commandName:"SplitCell"},e.print={props:r({icon:"print"},t),messages:{title:o.keys.print}},e.selectAll={props:r({icon:"select-all"},t),messages:{title:o.keys.selectAll}},e.pdf={props:r({icon:"pdf"},t),messages:{title:o.keys.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:r({icon:"clear-css"},t),messages:{title:o.keys.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:r({icon:"image"},t),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"},t),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"},t),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"},t),messages:{title:o.keys.unlink},commandName:"Unlink"}),e.undo={props:r({icon:"undo"},t),messages:{title:o.keys.undo},commandName:"Undo"},e.redo={props:r({icon:"redo"},t),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"},t),messages:{title:o.keys.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:i.alignRightRules.slice(),props:r({icon:"align-right"},t),messages:{title:o.keys.alignRight},commandName:"AlignRight"},e.alignCenter={actions:i.alignCenterRules.slice(),props:r({icon:"align-center"},t),messages:{title:o.keys.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:i.alignJustifyRules.slice(),props:r({icon:"align-justify"},t),messages:{title:o.keys.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:i.alignRemoveRules.slice(),props:r({icon:"align-remove"},t),messages:{},commandName:"AlignRemove"},e.indent={actions:i.indentRules.nodes,listsTypes:a,props:r({icon:"indent-increase"},t),messages:{title:o.keys.indent},commandName:"Indent"},e.outdent={actions:i.outdentRules.nodes,listsTypes:a,props:r({icon:"indent-decrease"},t),messages:{title:o.keys.outdent},commandName:"Outdent"},e.orderedList={listType:a.orderedList,props:r({icon:"list-ordered"},t),messages:{title:o.keys.orderedList},commandName:"OrderedList",types:r({},a)},e.bulletList={listType:a.bulletList,props:r({icon:"list-unordered"},t),messages:{title:o.keys.bulletList},commandName:"UnorderedList",types:r({},a)}}(t.EditorToolsSettings||(t.EditorToolsSettings={}))},function(e,t){e.exports=i},,function(e,t,n){"use strict";n.r(t);var r=n(28);n.d(t,"Popup",(function(){return r.a})),n.d(t,"PopupPropsContext",(function(){return r.b}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=':not(.k-state-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-state-selected","button-icon":"k-button-icon","button-icontext":"k-button-icontext","state-disabled":"k-state-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";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";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 r}));var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?r.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")}},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(44),a=n(45),s=n(46),l=n(34);!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.r(t),n.d(t,"Dialog",(function(){return S})),n.d(t,"DialogActionsBar",(function(){return l})),n.d(t,"DialogPropsContext",(function(){return x})),n.d(t,"Window",(function(){return V})),n.d(t,"WindowActionsBar",(function(){return j})),n.d(t,"WindowPropsContext",(function(){return z}));var r=n(0),o=n(13),i=n(1),a=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",{href:"#",role:"button","aria-label":"Close",onClick:n,className:"k-button k-flat k-button-icon k-window-action k-dialog-action k-dialog-close"},r.createElement("span",{className:"k-icon k-i-x"}))))},s=n(19),l=function(e){var t=e.layout,n=void 0===t?p.layout:t,o=e.children,i=Object(s.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)};l.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var c,u,p={layout:"stretched"},d=n(82),f=n(83),h=n(81),m=n(84),v=n(29),g=n(87),y=n(30),b={name:"@progress/kendo-react-dialogs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167748,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"},k=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},w=(c=function(e,t){return(c=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}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),C=function(){return(C=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=function(e){function t(t){var n=e.call(this,t)||this;return n._id=Object(d.a)(),n.titleId=n.generateTitleId(),n.onCloseDialog=function(e){e.preventDefault(),Object(f.a)(n.props.onClose,e,n,void 0)},n.onKeyDown=function(e){e.keyCode===h.a.esc&&n.props.onClose&&(e.preventDefault(),n.onCloseDialog(e));var t=n.element;if(t&&e.keyCode===h.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&&(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(y.a)(b),n.state={zIndex:k(n.getCurrentZIndex(),n.getDocument(),n._id)},n}return w(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,s=i.title,l=i.width,c=i.height,u=i.children,p=i.minWidth,d=i.dir,f=i.style,h=i.contentStyle,g=r.Children.toArray(u),y=this.getContent(g),b=this.getActionBar(g),k=s?{"aria-labelledby":n}:null,w=void 0===this.props.closeIcon||this.props.closeIcon,O=this.getCurrentZIndex(),x=r.createElement(m.a.Provider,{value:O},r.createElement("div",C({},((e={})["data-windowid"]=this._id,e),{className:"k-dialog-wrapper"+(this.props.className?" "+this.props.className:""),onKeyDown:this.onKeyDown,tabIndex:0,dir:d,style:C({zIndex:O},f),ref:function(e){return t.element=e}}),r.createElement("div",{className:"k-overlay"}),r.createElement("div",C({},k,{className:"k-widget k-window k-dialog",role:"dialog",style:{width:l,height:c,minWidth:p}}),this.props.title&&r.createElement(a,{closeIcon:w,onCloseButtonClick:this.onCloseDialog,id:n},s),r.createElement("div",{className:"k-window-content k-dialog-content",style:h},y),b)));return v.a?o.createPortal(x,this.props.appendTo||document.body):null},t.prototype.getActionBar=function(e){return e.filter((function(e){return e&&e.type===l}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==l}))},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=m.a,t}(r.Component),x=Object(g.a)(),S=Object(g.b)(x,O);S.displayName="KendoReactDialog",function(e){e.DEFAULT="DEFAULT",e.FULLSCREEN="FULLSCREEN",e.MINIMIZED="MINIMIZED"}(u||(u={}));var 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){var t=e.children,n=e.onCloseButtonClick,o=e.onMinimizeButtonClick,i=e.onFullScreenButtonClick,a=e.onRestoreButtonClick,s=e.onDoubleClick,l=e.stage,c=e.forwardedRef,p=e.minimizeButton?r.createElement(e.minimizeButton,{onClick:o,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:o},r.createElement("span",{className:"k-icon k-i-window-minimize",role:"presentation"})),d=e.maximizeButton?r.createElement(e.maximizeButton,{onClick:i,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:i},r.createElement("span",{className:"k-icon k-i-window-maximize",role:"presentation"})),f=e.restoreButton?r.createElement(e.restoreButton,{onClick:a,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:a},r.createElement("span",{className:"k-icon k-i-window-restore",role:"presentation"})),h=e.closeButton?r.createElement(e.closeButton,{onClick:n,stage:l}):r.createElement("button",{className:"k-button-icon k-button k-flat",onClick:n},r.createElement("span",{className:"k-icon k-i-close",role:"presentation"}));return r.createElement("div",{className:"k-window-titlebar k-dialog-titlebar",style:{touchAction:"none"},ref:c,onDoubleClick:s},r.createElement("div",{className:"k-window-title"},t||""),r.createElement("div",{className:"k-window-actions"},l===u.DEFAULT&&p,l===u.DEFAULT&&d,l!==u.DEFAULT&&f,h))},N=r.forwardRef((function(e,t){return r.createElement(I,E({},e,{forwardedRef:t}))})),T=n(88),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)}}(),M=["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," ",M.map((function(t,n){return r.createElement(T.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),P=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 P(t,e),t.prototype.shouldComponentUpdate=function(e){return e.shouldUpdateOnDrag||!e.isDragging},t.prototype.render=function(){return this.props.children},t}(r.Component),j=function(e){var t=e.layout,n=void 0===t?A.layout:t,o=e.children,i=Object(s.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)};j.propTypes={children:i.any,layout:i.oneOf(["start","center","end","stretched"])};var A={layout:"end"},F=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(d.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 h.a.up:e.preventDefault(),r<=n.height-5&&n.setState({height:n.height-5});break;case h.a.down:e.preventDefault(),n.setState({height:n.height+5});break;case h.a.left:t<=n.width-5&&n.setState({width:n.width-5});break;case h.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 h.a.up:n.windowStage===u.MINIMIZED?(n.handleRestore(e),Object(f.a)(n.props.onStageChange,e,n,{state:u.DEFAULT})):n.windowStage===u.DEFAULT&&(n.handleFullscreen(e),Object(f.a)(n.props.onStageChange,e,n,{state:u.FULLSCREEN}));break;case h.a.down:n.windowStage===u.FULLSCREEN?(n.handleRestore(e),Object(f.a)(n.props.onStageChange,e,n,{state:u.DEFAULT})):n.windowStage===u.DEFAULT&&(n.handleMinimize(e),Object(f.a)(n.props.onStageChange,e,n,{state:u.MINIMIZED}))}else{if(!e.ctrlKey)switch(e.keyCode){case h.a.esc:return void(n.props.onClose&&n.handleCloseWindow(e));case h.a.up:n.setState({top:n.state.top-5});break;case h.a.down:n.setState({top:n.state.top+5});break;case h.a.left:n.setState({left:n.state.left-5});break;case h.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!==u.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!==u.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:k(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:u.MINIMIZED,height:0}),Object(f.a)(n.props.onStageChange,e,n,{state:u.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:u.FULLSCREEN}),Object(f.a)(n.props.onStageChange,e,n,{state:u.FULLSCREEN})},n.handleRestore=function(e){e.preventDefault(),n.windowStage===u.FULLSCREEN?n.setState({stage:u.DEFAULT,left:n.windowCoordinatesState.leftBeforeAction,top:n.windowCoordinatesState.topBeforeAction,width:n.windowCoordinatesState.widthBeforeAction,height:n.windowCoordinatesState.heightBeforeAction}):n.windowStage===u.MINIMIZED&&n.setState({stage:u.DEFAULT,height:n.windowCoordinatesState.heightBeforeAction}),Object(f.a)(n.props.onStageChange,e,n,{state:u.DEFAULT})},n.handleCloseWindow=function(e){e.preventDefault(),Object(f.a)(n.props.onClose,e,n,{state:void 0})},n.handleDoubleClick=function(e){n.windowStage===u.FULLSCREEN||n.windowStage===u.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,p=r-n.left,d=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-d<0&&(f.height=d),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-p<0&&(f.width=p),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===u.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(y.a)(b),n.state={stage:n.props.stage||u.DEFAULT,isDragging:!1,top:n.getInitialTop(),left:n.getInitialLeft(),width:n.getInitialWidth(),height:n.getInitialHeight(),focused:!0,zIndex:k(n.getCurrentZIndex(),n.getDocument(),n._id)},n.windowCoordinatesState={leftBeforeAction:n.getInitialLeft(),topBeforeAction:n.getInitialTop(),widthBeforeAction:n.getInitialWidth(),heightBeforeAction:n.getInitialHeight()},n}return F(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),l=this.getCurrentZIndex(),c=Object(s.a)("k-widget","k-window",this.props.className,{"k-window-minimized":"MINIMIZED"===this.state.stage},{"k-window-focused":this.state.focused}),p=r.createElement(m.a.Provider,{value:l},r.createElement(r.Fragment,null,this.props.modal&&r.createElement("div",{className:"k-overlay",style:L({zIndex:l},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:l},this.props.style)}),r.createElement(R,{shouldUpdateOnDrag:this.props.shouldUpdateOnDrag||!1,isDragging:this.state.isDragging},r.createElement(T.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease,ref:function(e){return t.draggable=e}},r.createElement(N,{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!==u.MINIMIZED?r.createElement(r.Fragment,null,r.createElement("div",{className:"k-window-content"},i),a):null,this.windowStage===u.DEFAULT&&this.props.resizable?r.createElement(_,{onResize:this.handleResize}):null))));return v.a?o.createPortal(p,this.props.appendTo||document.body):null},Object.defineProperty(t.prototype,"top",{get:function(){return this.windowStage!==u.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!==u.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===u.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===u.FULLSCREEN){if(this.props.appendTo)return e=this.props.appendTo.offsetHeight;var t=this.getWindow();e=t?t.innerHeight:0}else this.windowStage===u.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===j}))},t.prototype.getContent=function(e){return e.filter((function(e){return e&&e.type!==j}))},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=m.a,t}(r.Component),z=Object(g.a)(),V=Object(g.b)(z,B);V.displayName="KendoReactWindow"},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:1640167409,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(19),s=n(10),l=n(22),c=n(18),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)}),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)},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},f=c.a.styles,h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},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,D=d(t,["children","style","appear","enter","exit","transitionName","transitionEnterDuration","transitionExitDuration","className","onEnter","onEntering","onEntered","onExit","onExiting","onExited","onAfterExited","mountOnEnter","unmountOnExit","animationEnteringStyle","animationEnteredStyle","animationExitingStyle","animationExitedStyle"]),M=Object(a.a)(v,f["child-animation-container"]),_=p({transitionDelay:"0ms"},r),P={entering:p({transitionDuration:h+"ms"},E),entered:p({},I),exiting:p({transitionDuration:m+"ms"},N),exited:p({},T)},R={in:this.props.in,appear:i,enter:s,exit:c,mountOnEnter:x,unmountOnExit:S,timeout:{enter:h,exit:m},onEnter:function(t){g&&g.call(void 0,{animatedElement:t,target:e})},onEntering:function(t){y&&y.call(void 0,{animatedElement:t,target:e})},onEntered:function(t){b&&b.call(void 0,{animatedElement:t,target:e})},onExit:function(t){k&&k.call(void 0,{animatedElement:t,target:e})},onExiting:function(t){w&&w.call(void 0,{animatedElement:t,target:e})},onExited:function(t){O&&O.call(void 0,{animatedElement:t,target:e}),C&&C.call(void 0,{animatedElement:t,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,p({},R,D),(function(t){return o.createElement("div",{style:p({},_,P[t]),className:M,ref:function(t){e._element=t}},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(30),v={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167148,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),p=e.componentChildClassName,d=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({},d,{style:u,className:p}),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";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);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(47),i=n(33),a=n(4),s=n(26);!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.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 ue})),n.d(t,"a",(function(){return pe}));var r=n(0),o=n(13),i=n(1),a=function(e){e.style.transitionDuration="",e.classList.remove("k-slide-down-appear","k-slide-down-appear-active","k-slide-down-exit","k-slide-down-exit-active","k-slide-up-appear","k-slide-up-appear-active","k-slide-up-exit","k-slide-up-exit-active")},s="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),l=n(30),c=n(29),u=n(84),p=n(19),d="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=" ",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}},D=function(e,t){return e?N(e):function(e){var t=x(e);return t?N(t):{x:0,y:0}}(t)};var M="fit",_="flip",P=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},j=function(e){for(var t=[],n=e.parentNode.firstElementChild;n;)n!==e&&t.push(n),n=n.nextElementSibling;return t},A=function(e,t){for(var n,r,o=E(e),i=t;i&&(n=j(i),!(r=o.reduce((function(e,t){return e.concat(n.filter((function(e){return e===t})))}),[])[0]));)i=i.parentElement;return r};var F,L,B,z,V=(F=function(e){if(!H())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=F.apply(void 0,e),B=!0),L}),H=function(){return Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)},K={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:V,canUseDOM:H},W=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],$=function(){return K.canUseDOM()?window:null},U=/auto|scroll/,q=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)},G=function(e){if(!e||!K.hasRelativeStackingContext())return null;for(var t=e.parentElement;t;){if("none"!==window.getComputedStyle(t).transform)return t;t=t.parentElement}return null},X=function(){return K.canUseDOM()&&parseFloat((document.documentElement.clientWidth/window.innerWidth).toFixed(2))||1},J={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,p=i.vertical||0,m=t.top,g=t.left;return s===d&&(m+=t.height),s!==f&&s!==h||(m+=Math.round(t.height/2)),c===d&&(m-=r.height,p*=-1),c!==f&&c!==h||(m-=Math.round(r.height/2),p*=-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+p,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=$();if(!t||!e)return[];var n=t.getComputedStyle(e);return W.map((function(e){return{key:e,value:n[e]}}))},getWindow:$,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=D(r,e),u=c.x,p=c.y,d=e.ownerDocument,f=r===d.body||r===d.documentElement?1:n;return{top:i+p*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,p=r.width,d=a.height,f=a.width,h=s.horizontal||0,m=s.vertical||0,v=0,g=0,y=i.vertical===M,b=i.horizontal===M,k=i.vertical===_,w=i.horizontal===_;y&&(g+=P(l,u,d)),b&&(v+=P(c,p,f)),k&&(g+=R({margin:m,offset:l,size:u,anchorSize:t.height,viewPortSize:d,anchorAlignPoint:n.vertical,elementAlignPoint:o.vertical})),w&&(v+=R({margin:h,offset:c,size:p,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(!K.canUseDOM())return t;for(var n=e.parentElement;n;)(U.test(q(n))||n.hasAttribute("data-scrollable"))&&t.push(n),n=n.parentElement;return t.push(window),t},getRelativeContextElement:G,stackingElementOffset:function(e){var t=G(e);return t?S(t):null},stackingElementScroll:function(e){var t=G(e);return t?{x:t.scrollLeft,y:t.scrollTop}:{x:0,y:0}},stackingElementViewPort:function(e){var t=G(e);return t?{height:t.scrollHeight,width:t.scrollWidth}:null},useRelativePosition:function(e){return Boolean(G(e))},windowViewPort:O,zoomLevel:X,isZoomed:function(){return X()>1},zIndex:function(e,t){if(!e||!K.canUseDOM())return null;var n=A(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}},Y=function(e,t){return e?{x:0,y:0}:J.scrollPosition(t)},Z=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||!J.hasOffsetParent(n)?function(e,t,n,r){var o=Y(e,t),i=K.eitherRect(J.offset(e),n),a=2*r,s=J.stackingElementScroll(t);1!==r&&s&&(s.x/=a,s.y/=a);var l=J.stackingElementOffset(t);return 1!==r&&l&&(l.left/=a,l.top/=a),J.removeScroll(J.addScroll(K.removeStackingOffset(K.scaleRect(i,r),l),s),o)}(t,n,a,l):function(e,t,n,r){var o=K.eitherRect(J.position(e,t,r),n);return K.scaleRect(o,r)}(t,n,a,l),u=K.scaleRect(J.offset(n),l);return J.align({anchorAlign:r,anchorRect:c,elementAlign:o,elementRect:u,margin:i})},Q=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=J.offsetAtPoint(r,n),u=K.scaleRect(c,l),p=K.scaleRect(J.offset(t),l),d=K.eitherRect(p,n),f=e.viewPort||J.windowViewPort(r);f.width=f.width/l,f.height=f.height/l;var h=J.restrictToView({anchorAlign:o,anchorRect:d,collisions:a,elementAlign:i,elementRect:u,margin:s,viewPort:f}),m=J.addOffset(n,h.offset);return{flip:h.flip,flipped:h.flipped,offset:m}},ee="fit",te="flip",ne={name:"@progress/kendo-react-popup",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167184,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"},re=(z=function(e,t){return(z=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}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),oe=function(){return(oe=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 ie(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 ae,se={left:-1e3,top:0};!function(e){e.hiding="hiding",e.hidden="hidden",e.showing="showing",e.shown="shown",e.reposition="reposition"}(ae||(ae={}));var le=function(e){function t(t){var n=e.call(this,t)||this;return n.state={current:ae.hidden,previous:ae.hidden,props:{}},n._popup=null,n.show=function(e){n.setPosition(e),n.animate(e.firstChild,"enter",n.onOpened),n.setState({current:ae.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;e.style.top="0px",e.style.left="-10000px";var p=Z({anchor:s,element:e,elementAlign:o,anchorAlign:r,offset:a,margin:l,positionMode:u,scale:c}),d=Q({anchor:s,anchorAlign:r,collisions:i,element:e,currentLocation:p,elementAlign:o,margin:n.props.margin});e.style.top=d.offset.top+"px",e.style.left=d.offset.left+"px",n._flipped=d.flipped},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){!function(e,t,n,r,o){if(0===n)return o();var i="k-slide-"+t+"-"+r,l=i+"-active",c=function(){e.removeEventListener("transitionend",c),a(e),o()};e.addEventListener("transitionend",c);var u=e.ownerDocument;if(u){var p=u.defaultView;if(p){var d=function(){a(e),e.classList.add(i),p.requestAnimationFrame((function(){e.style.transitionDuration=n+"ms",e.classList.add(l)}))};s?p.requestAnimationFrame(d):d()}}}(e,n._flipped?"up":"down",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===ae.hiding&&n.state.previous===ae.shown&&n.setState({current:ae.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)(ne),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 re(t,e),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,p=e.offset,d=e.contentKey,f=oe({},t,{props:{show:n,anchor:r,anchorAlign:o,appendTo:i,collision:a,popupAlign:s,className:l,popupClass:c,style:u,offset:p,contentKey:d}});return e.show?t.current===ae.hidden||t.current===ae.hiding?oe({},f,{current:ae.showing,previous:t.current}):t.current===ae.showing?oe({},f,{current:ae.shown,previous:t.current}):t.current!==ae.shown||ie(p,t.props.offset)&&ie(o,t.props.anchorAlign)&&ie(i,t.props.appendTo)&&ie(a,t.props.collision)&&ie(s,t.props.popupAlign)&&ie(u,t.props.style)&&r===t.props.anchor&&c===t.props.popupClass&&l===t.props.className?f:oe({},f,{current:ae.reposition,previous:t.current}):t.current===ae.hiding||t.current===ae.hidden?oe({},f,{current:ae.hidden,previous:t.current}):oe({},f,{current:ae.hiding,previous:t.current})},t.prototype.componentDidUpdate=function(e){this.state.current===ae.showing&&this._popup?this.show(this._popup):this.state.current===ae.hiding&&this._popup?(this.onClosing(this._popup),this.animate(this._popup.firstChild,"exit",this.onClosed)):this.state.current===ae.reposition&&this.state.previous===ae.shown?this.setState({current:ae.shown,previous:this.state.current}):this.state.current===ae.shown&&e.contentKey!==this.props.contentKey&&this._popup&&this.setPosition(this._popup)},t.prototype.componentDidMount=function(){this.state.current===ae.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,d=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===ae.reposition&&this.state.previous===ae.shown&&this._popup&&this.setPosition(this._popup);var h=Object.assign({},{position:d},this.props.style||{}),m=this.state.current===ae.hiding;if((s||m)&&f){var v=this.getCurrentZIndex(),g=r.createElement(u.a.Provider,{value:v},r.createElement("div",{className:Object(p.a)("k-animation-container","k-animation-container-relative",i),id:l,ref:function(t){return e._popup=t},style:oe({zIndex:v},h)},r.createElement("div",{className:Object(p.a)(a,"k-popup","k-child-animation-container"),style:{transitionDelay:"0ms"}},n)));return o.createPortal(g,f)}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=J.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:ae.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.string,id:i.string,popupClass:i.string,collision:i.shape({horizontal:i.oneOf([ee,te]),vertical:i.oneOf([ee,te])}),anchorAlign:i.shape({horizontal:i.oneOf([m,f,v]),vertical:i.oneOf([g,f,d])}),popupAlign:i.shape({horizontal:i.oneOf([m,f,v]),vertical:i.oneOf([g,f,d])}),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},t.defaultProps={collision:{horizontal:ee,vertical:te},anchorAlign:{horizontal:m,vertical:d},popupAlign:{horizontal:m,vertical:g},offset:se,animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},t.contextType=u.a,t}(r.Component),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=r.createContext((function(e){return e})),pe=r.forwardRef((function(e,t){var n=r.useContext(ue).call(void 0,e);return r.createElement(le,ce({ref:t},n))}))},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";n.d(t,"a",(function(){return o}));var r=n(5);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";var r,o=n(0),i=n(1),a=n(19),s=n(30),l=n(9),c=n(16),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)}),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)},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},f=c.a.styles;var h=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(s.a)(l.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,t=this,n=this.props,r=n.children,i=n.look,s=n.primary,l=n.togglable,c=n.icon,u=n.iconClass,h=n.imageUrl,m=n.imageAlt,v=n.className,g=(n.onClick,d(n,["children","look","primary","togglable","icon","iconClass","imageUrl","imageAlt","className","onClick"])),y=void 0!==c||void 0!==u||void 0!==h,b=void 0!==r,k={className:Object(a.a)([f.button],((e={})[f[""+i]]="default"!==i,e[f.primary]=s,e[f["state-disabled"]]=this.props.disabled,e[f["state-selected"]]=this.state.selected,e[f["button-icon"]]=!b&&y,e[f["button-icontext"]]=b&&y,e),[f[""+this.props.dir]],v),onClick:this.handleClick,role:l?"checkbox":void 0,"aria-disabled":this.props.disabled||void 0,"aria-checked":l?this.state.selected:void 0},w=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-image",alt:i,src:t});if(n){var s=Object(a.a)("k-icon","k-i-"+n);return o.createElement("span",{role:"presentation",className:s})}return r?o.createElement("span",{role:"presentation",className:r}):null}({icon:c,iconClass:u,imageUrl:h,imageAlt:m});return o.createElement("button",p({},k,g,{ref:function(e){return t._element=e}}),w,r)},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,look:i.oneOf(["default","flat","outline","clear"]),primary:i.bool,selected:i.bool,togglable:i.bool,icon:i.string,iconClass:i.string,imageUrl:i.string,imageAlt:i.string},t.defaultProps={look:"default",primary:!1,togglable:!1},t}(o.Component);t.a=h},function(e,t,n){"use strict";var r,o=n(0),i=n(1),a=n(19),s=n(30),l=n(9),c=n(16),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)}),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)},d=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)([d["button-group"]],((e={})[d["state-disabled"]]=this.props.disabled,e[d["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",p({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={})[d["group-start"]]=r?n:0===t,i[d["group-end"]]=r?0===t:n,i)),l=p({},this.props.width?{width:this.props.width}:{},e.props.style||{}),c=this.props.disabled||e.props.disabled,u=p({},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";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(4);t.marks=o.marks;var i=function(e){var t;return(t={})[e]={default:null,getFromDOM:function(t){return t.getAttribute(e)},setDOMAttr:function(t,n){n[e]=t}},t},a=function(e){var t={};return Array.from(e.attributes).forEach((function(e){t[e.nodeName]=e.nodeValue})),t},s=r({},i("style"),i("class"),i("id")),l=o.tableNodes({tableGroup:"block",cellContent:"block+",cellAttributes:s});l.table_row.attrs=l.table_row.attrs||{},l.table_row.attrs.style={default:null},l.table_row.attrs.class={default:null},l.table_row.attrs.id={default:null},l.table_row.toDOM=function(e){return["tr",e.attrs,0]},l.table_row.parseDOM=[{tag:"tr",getAttrs:a}],l.table.attrs=l.table.attrs||{},l.table.attrs.style={default:null},l.table.attrs.class={default:null},l.table.attrs.id={default:null},l.table.toDOM=function(e){return["table",e.attrs,["tbody",0]]},l.table.parseDOM=[{tag:"table",getAttrs:a}];var c=r({},o.nodes,l);t.nodes=c},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(21),l=n(74),c=n(3),u=n(6),p=n(12),d=n(8),f=n(4),h={className:"k-checkbox",type:"checkbox"},m=p.EditorToolsSettings.findAndReplace,v=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(f.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 d.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=f.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=f.replace(t,r,e.state.tr);a.setSelection(f.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(f.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},p=r.state.selection,d=f.findAll(r.state.doc,u),h=!n.state.searchText&&d[0]||d.find((function(e){return e.from>=p.from}))||c&&d[0]||void 0;n.setState(i({},t,{matches:d,nextMatch:h}))}else n.setState(t)},n.state={selectedTab:0,searchText:f.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||m},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(f.textHighlightKey,c),l.setSelection(a||f.TextSelection.create(s.doc,s.selection.from)),n.dispatch(l)}},t.prototype.render=function(){var e=c.provideLocalizationService(this),t=this.settings.messages,n=t.findReplaceDialogTitle,r=t.findReplaceTabFind,o=t.findReplaceTabReplace,p=t.findReplaceFindWhat,d=t.findReplaceReplaceWith,f=t.findReplaceReplace,m=t.findReplaceReplaceAll,v=t.findReplaceMatchCase,g=t.findReplaceMatchWord,y=t.findReplaceMatchCyclic,b=t.findReplaceUseRegExp,k=t.findReplacePrevMatch,w=t.findReplaceNextMatch,C=t.findReplaceMatches,O=this.state,x=O.matchCase,S=O.matchWord,E=O.matchCyclic,I=O.useRegExp,N=O.searchText,T=O.replaceText,D=O.nextMatch,M=a.createElement("div",{className:"k-search-options"},a.createElement("span",null,a.createElement("input",i({},h,{id:"match-case",checked:x,onChange:this.onMatchCaseChecked})),a.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(v,u.messages[v]))),a.createElement("span",null,a.createElement("input",i({},h,{id:"match-whole",checked:S,onChange:this.onMatchWordChecked})),a.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(g,u.messages[g]))),a.createElement("span",null,a.createElement("input",i({},h,{id:"match-cyclic",checked:E,onChange:this.onMatchCyclicChecked})),a.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(y,u.messages[y]))),a.createElement("span",null,a.createElement("input",i({},h,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked})),a.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(b,u.messages[b])))),_=a.createElement("div",{className:"k-matches-container"},a.createElement("button",{className:"k-button k-flat k-primary",onClick:this.onFindPrev},a.createElement("span",{className:"k-icon k-i-arrow-chevron-left"}),e.toLanguageString(k,u.messages[k])),a.createElement("span",null,this.matchesMessage(e.toLanguageString(C,u.messages[C]))),a.createElement("button",{className:"k-button k-flat k-primary",onClick:this.onFindNext},e.toLanguageString(w,u.messages[w]),a.createElement("span",{className:"k-icon k-i-arrow-chevron-right"}))),P=a.createElement(a.Fragment,null,a.createElement("div",{className:"k-edit-label"},a.createElement("label",{htmlFor:"findWhat"},e.toLanguageString(p,u.messages[p]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"findWhat",type:"text",className:"k-textbox",value:N,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(d,u.messages[d]))),a.createElement("div",{className:"k-edit-field"},a.createElement("input",{id:"replaceWith",className:"k-textbox",type:"text",value:T,onChange:this.onReplaceChange})));return a.createElement(s.Window,{title:e.toLanguageString(n,u.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(l.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},a.createElement(l.TabStripTab,{title:e.toLanguageString(r,u.messages[r])},a.createElement("div",{className:"k-edit-form-container"},P),M,_),a.createElement(l.TabStripTab,{title:e.toLanguageString(o,u.messages[o])},a.createElement("div",{className:"k-edit-form-container"},P,R),a.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},a.createElement("button",{className:"k-button",disabled:!Boolean(D),onClick:this.onReplace},e.toLanguageString(f,u.messages[f])),a.createElement("button",{className:"k-button",disabled:!Boolean(D),onClick:this.onReplaceAll},e.toLanguageString(m,u.messages[m]))),M,_)))},t}(a.Component);t.FindAndReplaceDialog=v,c.registerForLocalization(v)},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(15),l=n(54);!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,p=void 0===u?t.defaultProps.columns:u,d="rtl"===o?"right":"left";return i.createElement(s.Popup,{anchor:r,anchorAlign:{horizontal:d,vertical:"bottom"},popupAlign:{horizontal:d,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:n,style:"rtl"===o?{direction:"rtl"}:void 0},i.createElement(l.default,{rows:c,columns:p,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(7),c=n(8),u=n(3),p=n(6);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,d=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,p.messages[h])},e.props,d));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 Ht})),n.d(t,"getMultiSelectTreeValue",(function(){return Kt})),n.d(t,"AutoComplete",(function(){return de})),n.d(t,"AutoCompletePropsContext",(function(){return pe})),n.d(t,"DropDownList",(function(){return Y})),n.d(t,"DropDownListPropsContext",(function(){return J})),n.d(t,"ComboBox",(function(){return se})),n.d(t,"ComboBoxPropsContext",(function(){return ae})),n.d(t,"MultiSelect",(function(){return Se})),n.d(t,"MultiSelectPropsContext",(function(){return xe})),n.d(t,"MultiColumnComboBox",(function(){return Ae})),n.d(t,"MultiColumnComboBoxPropsContext",(function(){return je})),n.d(t,"DropDownTree",(function(){return Dt})),n.d(t,"DropDownTreePropsContext",(function(){return Tt})),n.d(t,"MultiSelectTree",(function(){return zt})),n.d(t,"MultiSelectTreePropsContext",(function(){return Bt}));var r,o,i=n(0),a=n(1),s=n(86),l=n(19),c=n(81),u=n(87),p=n(92),d=n(28),f=(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)}),h=function(){return(h=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)},m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return f(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(d.a,h({style:{width:n,direction:r},contentKey:o&&o.join()},a),t)},t}(i.Component),v=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)}}(),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return v(t,e),t.prototype.render=function(){var e=this;return i.createElement("span",{className:"k-list-filter"},i.createElement("input",{ref:function(t){return e.input=t},value:this.props.value||"",className:"k-textbox",onChange:this.props.onChange,onKeyDown:this.props.onKeyDown}),i.createElement("span",{className:"k-icon k-i-search"}))},t}(i.Component),y=function(e){return null!=e},b=function(e,t,n){if(!y(e))return!1;var r=String(e);return n&&(r=r.toLowerCase()),0===r.indexOf(t)},k=function(e,t,n){var r=-1;if(t){t=t.toLowerCase();for(var o=0;o<e.length;o++){var i=(C(e[o],n)||"")+"";if(i&&i.toLowerCase().startsWith(t)){r=o;break}}}return r},w=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(C(e,n))===o(t):o(t)===o(e.toString())}))},C=function(e,t){if(t&&y(e)){var n=t.split("."),r=e;return n.forEach((function(e){r=r?r[e]:void 0})),r}return e},O=function(e,t,n){t.forEach((function(t){var r=e.findIndex((function(e){return x(e,t,n)}));-1!==r&&e.splice(r,1)}))},x=function(e,t,n){return e===t||y(e)===y(t)&&C(e,n)===C(t,n)},S=function(e,t,n){if(t){var r=w(e,t,n,!0);return-1!==r?e[r]:e[k(e,t,n)]}return e[0]},E=function(e){"INPUT"!==e.target.nodeName&&e.preventDefault()},I=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(!x(e[r],t[r],n))return!1;return!0}(e.data,t.data,n))},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){return e.preventDefault()},D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return N(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:T,className:Object(l.a)("k-list-optionlabel",{"k-state-selected":t})},C(n,r)||"")},t}(i.Component),M=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)}}(),_=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 M(t,e),t.prototype.render=function(){var e=this.props,t=e.selected,n=e.group,r=e.dataItem,o=e.render,a=i.createElement("li",{id:this.props.id,role:"option","aria-selected":t,className:Object(l.a)("k-item",{"k-state-selected":t,"k-state-focused":this.props.focused,"k-first":Boolean(n)}),onClick:this.handleClick},C(r,this.props.textField).toString(),void 0!==n?i.createElement("div",{className:"k-group"},n):null);return void 0!==o?o.call(void 0,a,this.props):a},t}(i.Component),P=n(3),R="dropdowns.nodata",j="dropdowns.clear",A=((o={})[j]="clear",o[R]="NO DATA FOUND.",o),F=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(){return null!==e&&e.apply(this,arguments)||this}return F(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.focusedIndex,u=t.highlightSelected,p=void 0===u||u,d=t.value,f=t.data,h=t.itemRender,m=Array.isArray(d);return f.map((function(t,s){var u,v,g=l+s,y=p&&(!m&&x(t,d,r)||m&&-1!==d.findIndex((function(e){return x(e,t,r)}))),b=void 0;return s>0&&void 0!==o&&(u=C(t,o),v=C(f[s-1],o),u&&v&&u!==v&&(b=u)),i.createElement(_,{id:"option-"+a+"-"+g,dataItem:t,selected:y,focused:c===s,index:g,key:g,onClick:e.props.onClick,textField:n,group:b,render:h})}))},t.prototype.renderNoValueElement=function(e){var t=this.props.noDataRender,n=i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.toLanguageString(R,A[R])));return t?t.call(void 0,n):n},t.prototype.render=function(){var e=Object(P.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,p=void 0===u?"k-list":u,d=this.renderItems();return d.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:p+" k-reset",ref:l,style:s},d)):this.renderNoValueElement(e)},t}(i.Component),B=L;Object(P.registerForLocalization)(L);var z=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-this.list.offsetHeight))},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-this.list.offsetHeight,e)},e}(),V=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 y(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min},e}(),H=n(82),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(){function e(e){var t=this;this.vs=new z,this.navigation=new V,this.handleItemClick=function(e,n){var r=t.initState();r.syntheticEvent=n,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.renderScrollWrapper=function(e,n){var r=t.getPopupSettings(),o=t.vs;return o.enabled?i.createElement("div",{onScroll:function(e){o.scrollHandler(e),n&&n.call(void 0,e)},ref:o.scrollerRef,style:{height:r.height,overflowY:"scroll"}},e):e},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(H.a)(),this.guid=Object(H.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,K({},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&&x(e,o[0],i)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!s&&a.skip+a.pageSize<a.total&&x(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.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,itemRender:a.func,listNoDataRender:a.func,focusedItemIndex:a.func,header:a.node,footer:a.node},e.propTypes=K({},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}(),$=n(30),U={name:"@progress/kendo-react-dropdowns",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167543,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"},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)}}(),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)},X=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new W(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],p=!x(u,n.value,s);n.triggerOnChange(u,t),p&&n.base.triggerPageChangeCornerItems(u,t)},n.renderDropDownWrapper=function(){var e=n.props,t=e.dataItemKey,r=e.data,o=void 0===r?[]:r,a=e.textField,c=e.disabled,u=e.tabIndex,p=e.loading,d=e.iconClassName,f=e.virtual,h=void 0===f?{skip:0}:f,m=e.valueRender,v=n.state.focused,g=void 0!==n.props.opened?n.props.opened:n.state.opened,y=n.value,b=o.findIndex((function(e){return x(e,y,t)})),k=C(y,a),w=i.createElement("span",{className:"k-input"},k),O=void 0!==m?m.call(void 0,w,y):w;return i.createElement("span",{ref:function(e){return n.base.wrapper=e},role:"listbox",tabIndex:Object(s.a)(u,c),accessKey:n.props.accessKey,className:Object(l.a)("k-dropdown-wrap",{"k-state-focused":v,"k-state-disabled":c}),onKeyDown:n.handleKeyDown,onKeyPress:n.handleKeyPress,onClick:c?void 0:n.handleWrapperClick,"aria-disabled":c||void 0,"aria-haspopup":!0,"aria-expanded":g||!1,"aria-owns":n.base.listBoxId,"aria-activedescendant":g?"option-"+n.base.guid+"-"+(b+h.skip):void 0,"aria-label":n.props.label,"aria-labelledby":n.props.ariaLabelledBy,"aria-describedby":n.props.ariaDescribedBy,id:n.props.id,title:n.props.title},O,i.createElement("span",{className:"k-select"},i.createElement("span",{className:Object(l.a)("k-icon",d,{"k-i-arrow-s":!p&&!d,"k-i-loading":p&&!d})})),n.dummySelect(y))},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=n.props,t=e.header,r=e.footer,o=e.dir,a=e.data,s=void 0===a?[]:a,c=n.base,u=c.getPopupSettings(),p=void 0!==n.props.opened?n.props.opened:n.state.opened,d=void 0!==n.props.virtual,f=void 0!==u.width?u.width:c.popupWidth,h={dir:void 0!==o?o:c.dirCalculated,width:f,popupSettings:{popupClass:u.popupClass,className:Object(l.a)("k-list-container k-reset",u.className),animate:u.animate,anchor:n.element,show:p,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:u.appendTo},itemsCount:[s.length]};return i.createElement(m,G({},h),n.renderListFilter(),d&&n.renderDefaultItem(),d&&t,n.base.renderScrollWrapper(i.createElement(i.Fragment,null,!d&&n.renderDefaultItem(),!d&&t,n.renderList(),!d&&r,n.base.renderScrollElement())),d&&r)},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,p=n.base.vs,d=l.skip,f=void 0!==n.props.opened?n.props.opened:n.state.opened,h=n.base.getPopupSettings(),m="translateY("+p.translate+"px)";return i.createElement(B,{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 p.list=n.base.list=e},wrapperStyle:p.enabled?{float:"left",width:"100%"}:{maxHeight:h.height},wrapperCssClass:p.enabled?void 0:"k-list-scroller",listStyle:p.enabled?{transform:m}:void 0,key:"listkey",skip:d,onClick:n.handleItemClick,itemRender:u,noDataRender:c})},n.renderListFilter=function(){var e=void 0!==n.props.filter?n.props.filter:n.state.text;return n.props.filterable&&i.createElement(g,{value:e,ref:function(e){return n._filterInput=e&&e.input},onChange:n.handleListFilterChange,onKeyDown:n.handleKeyDown})},n.renderDefaultItem=function(){var e=n.props,t=e.textField,r=e.defaultItem,o=e.dataItemKey;return void 0!==r&&i.createElement(D,{defaultItem:r,textField:t,selected:x(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),p=s.length,d=Math.max(0,i.findIndex((function(e){return x(e,n.value,a)})));n.props.defaultItem&&(t={item:n.props.defaultItem,itemIndex:-1},p+=1,d+=1),s=function(e,t,n){var r=e;return n&&(r=[n].concat(r)),r.slice(t).concat(r.slice(0,t))}(s,d+=u?1:0,t);for(var f,h,m,v=0,g=n.props,y=g.textField,k=g.ignoreCase;v<p;v++)if(f=C(s[v].item,y),h=u&&b(f,c,k),m=b(f,l,k),h||m){v=s[v].itemIndex;break}if(v!==p){var w=n.base.initState();w.syntheticEvent=e,n.handleItemSelect(v,w),n.applyState(w),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,p=void 0===u?{skip:0,total:0,pageSize:0}:u,d=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=!d&&(e.altKey&&f===c.a.down||f===c.a.enter||f===c.a.space),g=d&&(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!==p.skip?(n.base.triggerOnPageChange(k,0,p.pageSize),n._navigated=!0):n.triggerOnChange(o[0],k):p.skip<p.total-p.pageSize?(n.base.triggerOnPageChange(k,p.total-p.pageSize,p.pageSize),n._navigated=!0):n.triggerOnChange(o[o.length-1],k);else if(d&&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){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($.a)(U),n}return q(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionElement",{get:function(){return this.base.wrapper},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),y(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 x(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 p=this.value,d=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return x(e,p,i)})),h=!x(d,p,i);u&&a?this.base.scrollToVirtualItem(a,f):u&&!a||l&&c&&p&&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=this,t=this.props,n=t.style,r=t.className,o=t.label,a=t.dir,s=t.virtual,c=void 0!==this.props.opened?this.props.opened:this.state.opened,u=C(this.value,this.props.textField),d=!this.validityStyles||this.validity.valid,f=this.base;f.vs.enabled=void 0!==s,void 0!==s&&(f.vs.skip=s.skip,f.vs.total=s.total,f.vs.pageSize=s.pageSize);var h=i.createElement("span",{ref:function(t){return e._element=t},className:Object(l.a)("k-widget k-dropdown",{"k-state-invalid":!d},r),style:o?G({},n,{width:void 0}):n,dir:a,onMouseDown:c?E:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur},this.renderDropDownWrapper(),this.renderListContainer());return o?i.createElement(p.a,{label:o,editorValue:u,editorValid:d,editorDisabled:this.props.disabled,style:{width:n?n.width:void 0},children:h}):h},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,p=o.findIndex((function(e){return x(e,u,a)})),d=this.base.navigation.navigate({current:l.skip+p,max:(c.enabled?l.total:o.length)-1,min:void 0!==i?-1:0,keyCode:t});void 0!==d&&this.handleItemSelect(d,e),this.applyState(e)},t.prototype.focusedIndex=function(){var e=y(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 x(e,c,a)}))<0&&!this.props.defaultItem);return!u&&e&&0===i.skip?l?l(r,e,s):r.indexOf(S(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){x(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=G({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,leftRightKeysNavigation:a.bool,title:a.string},W.propTypes),t.defaultProps=G({delay:500,tabIndex:0,ignoreCase:!0},W.defaultProps,{required:!1}),t}(i.Component),J=Object(u.a)(),Y=Object(u.b)(J,X);Y.displayName="KendoReactDropDownList";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)}}(),Q=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){return e.preventDefault()},t}return Z(t,e),t.prototype.render=function(){var e=Object(P.provideLocalizationService)(this).toLanguageString(j,A[j]);return i.createElement("span",{className:"k-icon k-clear-value k-i-close",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"})},t}(i.Component),ee=Q;Object(P.registerForLocalization)(Q);var 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)}}(),ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return te(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("span",{className:"k-searchbar",key:"searchbar"},i.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",size:this.props.size,placeholder:this.props.placeholder,className:"k-input",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,!this.props.loading&&this.props.clearButton&&i.createElement(ee,{onClick:this.props.clearButtonClick,key:"clearbutton"}),this.props.loading&&i.createElement("span",{className:"k-icon k-i-loading",key:"loading"})]},t}(i.Component),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(){return(oe=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)},ie=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new W(n),n._inputId=Object(H.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=!x(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.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.props,r=t.data,o=void 0===r?[]:r,i=t.groupField;if(i&&o.length){for(var a=n.base,s=a.vs,l=a.list,c=n.itemHeight=n.itemHeight||(s.enabled?s.itemHeight:l?l.children[0].offsetHeight:0),u=e.target.scrollTop-s.skip*c,p=o[0][i],d=1;d<o.length&&!(c*d>u);d++)o[d]&&o[d][i]&&(p=o[d][i]);p!==n.state.group&&n.setState({group:p})}},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;y(s)||(s=C(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($.a)(U),n}return re(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 x(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,p=this.value;if(this._valueOnDidUpdate=p,a&&a.total!==s)this.base.vs.calcScrollElementHeight(),this.base.vs.reset();else{var d=void 0!==e.value?e.value:t.value,f=o.findIndex((function(e){return x(e,p,i)})),h=!x(d,p,i);u&&a?this.base.scrollToVirtualItem(a,f):(u&&!a||l&&c&&p&&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=this,n=this.props,r=n.dir,o=n.disabled,a=n.clearButton,s=void 0===a?t.defaultProps.clearButton:a,c=n.label,u=n.textField,d=n.className,f=n.style,h=n.loading,m=n.iconClassName,v=n.virtual,g=this.state.focused,b=!this.validityStyles||this.validity.valid,k=void 0!==this.props.filter?this.props.filter:this.state.text,w=C(this.value,u),O=y(k)?k:w,x=s&&(!!O||y(this.value)),S=this.base,E=S.vs,I=this.props.id||this._inputId;E.enabled=void 0!==v,void 0!==v&&(E.skip=v.skip,E.total=v.total,E.pageSize=v.pageSize);var N=i.createElement("span",{className:Object(l.a)("k-widget k-combobox",{"k-combobox-clearable":s,"k-state-invalid":!b},d),ref:function(t){return e._element=t},style:c?oe({},f,{width:void 0}):f,dir:r},i.createElement("span",{ref:function(e){return S.wrapper=e},className:Object(l.a)("k-dropdown-wrap",{"k-state-disabled":o,"k-state-focused":g&&!o})},this.renderSearchBar(x,O||"",I),i.createElement("span",{className:"k-select",onClick:this.toggleBtnClick,onMouseDown:function(e){return e.preventDefault()}},i.createElement("span",{className:Object(l.a)("k-icon",m,{"k-i-arrow-s":!h&&!m,"k-i-loading":h&&!m})}))),this.renderListContainer());return c?i.createElement(p.a,{label:c,editorId:I,editorValue:O,editorValid:b,editorDisabled:o,style:{width:f?f.width:void 0},children:N}):N},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||y(u))if(""===s)this.handleItemSelect(0,e);else{var p=a.skip+l,d=this.base.navigation.navigate({keyCode:t,current:p,max:(c.enabled?c.total:o.length)-1,min:0});void 0!==d&&this.handleItemSelect(d,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=C(this.value,a)===e?this.index:w(i,e,a),u=-1!==c,p=void 0;if(this._suggested="",u)p=i[c];else{if(!s)return this.selectFocusedItem(e,t);p=void 0!==a?((n={})[a]=e,n):e}this.triggerOnChange(p,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=C(this.value,a);if(this._suggested="",e===c||""===e&&!y(c))return l&&this.base.togglePopup(t),this.applyState(t);var u=w(i,e,a,!0),p=null;-1!==u?p=i[u]:s&&(p=e?a?((n={})[a]=e,n):e:null),this.triggerOnChange(p,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?k:c,p=l.skip,d=""===e&&0===p?0:u(i,e,a);return-1!==d?this.handleItemSelect(d+p,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=this.base,t=this.props,n=t.dir,r=t.header,o=t.footer,a=t.data,s=void 0===a?[]:a,c=t.groupField,u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=e.getPopupSettings(),d=void 0!==p.width?p.width:e.popupWidth,f=this.state.group;return void 0===f&&void 0!==c&&(f=C(s[0],c)),i.createElement(m,{width:d,popupSettings:{animate:p.animate,anchor:this.element,show:u,popupClass:p.popupClass,className:Object(l.a)("k-list-container k-reset",p.className),appendTo:p.appendTo},dir:void 0!==n?n:this.base.dirCalculated,itemsCount:[s.length]},r,f&&i.createElement("div",{className:"k-group-header"},f),e.renderScrollWrapper([this.renderList(),e.renderScrollElement()],this.onScroll),o)},t.prototype.renderList=function(){var e=this,t=this.base,n=this.props,r=n.textField,o=n.dataItemKey,a=n.listNoDataRender,s=n.itemRender,l=n.data,c=void 0===l?[]:l,u=n.virtual,p=void 0===u?{skip:0}:u,d=t.getPopupSettings(),f=t.vs,h=p.skip,m=void 0!==this.props.opened?this.props.opened:this.state.opened,v="translateY("+f.translate+"px)",g=m?this.getFocusedIndex():void 0,b=void 0!==this.props.filter?this.props.filter:this.state.text,k=C(this.value,r),w=y(b)&&b!==k?null:this.value,O=this.props.list||B;return i.createElement(O,{id:t.listBoxId,show:m,data:c,focusedIndex:g,value:w,textField:r,valueField:o,groupField:this.props.groupField,optionsGuid:t.guid,listRef:function(t){f.list=e.base.list=t,e.itemHeight=0},wrapperStyle:f.enabled?{float:"left",width:"100%"}:{maxHeight:d.height},wrapperCssClass:f.enabled?void 0:"k-list-scroller",listStyle:f.enabled?{transform:v}:void 0,key:"listkey",skip:h,onClick:this.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:function(e){return e.preventDefault()},onScroll:this.onScroll})},t.prototype.renderSearchBar=function(e,t,n){var r=this,o=this.props,a=o.placeholder,s=o.tabIndex,l=o.disabled,c=o.data,u=void 0===c?[]:c,p=o.dataItemKey,d=o.virtual,f=void 0===d?{skip:0}:d,h=void 0!==this.props.opened?this.props.opened:this.state.opened,m=this.value,v=Math.max(0,u.findIndex((function(e){return x(e,m,p)})));return this._suggested&&!x(this._valueOnDidUpdate,m,p)&&(this._suggested=""),i.createElement(ne,{id:n,placeholder:a,tabIndex:s||void 0,accessKey:this.props.accessKey,value:t+this._suggested,suggestedText:this._suggested,ref:function(e){return r._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.inputOnChange,onFocus:this.base.handleFocus,onBlur:this.handleBlur,disabled:l,expanded:h,owns:this.base.listBoxId,activedescendant:this.base.guid+"-"+(v+f.skip),role:"combobox",clearButton:e,clearButtonClick:this.clearButtonClick,ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.triggerOnChange=function(e,t){var n=this.value;!y(n)&&!y(e)||x(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?k:l,u=this.props.filter?this.props.filter:this.state.text;return y(e)&&void 0===u?r.findIndex((function(t){return x(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[k(t,e,n)];if(o){var i=C(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=oe({},W.propTypes,{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=oe({},W.defaultProps,{allowCustom:!1,clearButton:!0,required:!1}),t}(i.Component),ae=Object(u.a)(),se=Object(u.b)(ae,ie);se.displayName="KendoReactComboBox";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=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.base=new W(n),n._inputId=Object(H.a)(),n._suggested="",n.focus=function(){n._input&&n._input.focus()},n.handleItemSelect=function(e,t){var r=n.props.data,o=C((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];x(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,p=n.props.suggest,d=void 0!==n.props.opened?n.props.opened:n.state.opened;if(void 0!==p&&!1!==p){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);(!d&&o||d&&!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($.a)(U),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:""},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,p=void 0!==e.opened?e.opened:t.opened;(u&&(c||l)||!p&&u)&&this.base.scrollToItem(a),this.setValidity()},t.prototype.componentDidMount=function(){this.base.didMount(),this.setValidity()},t.prototype.render=function(){var e=this,t=this.props,n=t.dir,r=t.disabled,o=t.label,a=t.className,s=t.style,c=t.loading,u=t.suggest,d=!this.validityStyles||this.validity.valid,f=this.state.focused,h=this.base,m=this.value,v=!1!==this.props.clearButton&&!c&&!!m,g=this.props.id||this._inputId;"string"==typeof u&&(this._suggested=u);var y=i.createElement("span",{className:Object(l.a)("k-widget k-autocomplete",a,{"k-state-disabled":r,"k-state-focused":f&&!r,"k-state-invalid":!d}),ref:function(t){e._element=t,h.wrapper=t},style:o?ce({},s,{width:void 0}):s,dir:n},this.renderSearchBar(v,m||"",g),c&&i.createElement("span",{className:"k-icon k-i-loading"}),this.renderListContainer());return o?i.createElement(p.a,{label:o,editorId:g,editorValue:m,editorValid:d,editorDisabled:r,style:{width:s?s.width:void 0},children:y}):y},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 x(e,n.state.focusedItem,s)})):l?l(a,r,s):a.indexOf(S(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=C(a[this.focusedIndex(e)],s);this.triggerOnChange(l,t)}r&&this.togglePopup(t),this.applyState(t)},t.prototype.renderSearchBar=function(e,t,n){var r=this,o=this.base,a=this.props,s=a.placeholder,l=a.tabIndex,c=a.disabled,u=a.readonly,p=this.state.focused,d=void 0!==this.props.opened?this.props.opened:this.state.opened;return i.createElement(ne,{id:n,placeholder:s,tabIndex:l||void 0,accessKey:this.props.accessKey,value:t,suggestedText:this._suggested,focused:p,name:this.props.name,ref:function(e){return r._input=e&&e.input},onKeyDown:this.onInputKeyDown,onChange:this.onChangeHandler,onFocus:o.handleFocus,onBlur:this.handleBlur,disabled:c,readOnly:u,expanded:d,owns:o.listBoxId,activedescendant:"option-"+o.guid+"-"+this.focusedIndex(),role:"combobox",clearButton:e,clearButtonClick:this.clearButtonClick,ariaLabelledBy:this.props.ariaLabelledBy,ariaDescribedBy:this.props.ariaDescribedBy,render:this.props.valueRender})},t.prototype.renderListContainer=function(){var e=this.base,t=this.props,n=t.dir,r=t.header,o=t.footer,a=t.data,s=void 0===a?[]:a,c=e.getPopupSettings(),u=void 0!==this.props.opened?this.props.opened:this.state.opened,p=void 0!==c.width?c.width:e.popupWidth;return i.createElement(m,{width:p,popupSettings:{animate:c.animate,anchor:this.element,show:u,popupClass:c.popupClass,className:Object(l.a)("k-list-container k-reset",c.className),appendTo:c.appendTo},dir:void 0!==n?n:this.base.dirCalculated,itemsCount:[s.length]},r,this.renderList(),o)},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(B,{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-scroller",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(ce({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[k(r,e,o)];if(i){var a=C(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 x(e,t.state.focusedItem,i)})):a?a(o,s,i):Math.max(0,o.indexOf(S(o,s,i)))},t.displayName="AutoComplete",t.propTypes=ce({},W.basicPropTypes,{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=ce({},W.defaultProps),t}(i.Component),pe=Object(u.a)(),de=Object(u.b)(pe,ue);de.displayName="KendoReactAutoComplete";var fe,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)}}(),me=function(e){return e.preventDefault()},ve=function(e){return e.stopPropagation()},ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return he(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.data,r=t.guid,o=this.props.tag;return i.createElement("ul",{className:"k-reset",role:"listbox",id:"tagslist-"+r},n.map((function(t,a){var s=o?i.createElement(o,{tagData:t,guid:r,focusedTag:e.props.focused,onTagDelete:e.props.onTagDelete}):i.createElement("li",{className:t===e.props.focused?"k-button k-state-focused":"k-button",key:t.text+a,id:"tag-"+r+"-"+t.text.replace(/\s+/g,"-"),onMouseDown:me,onClick:ve,"aria-selected":!0,role:"option","aria-setsize":n.length},i.createElement("span",null,t.text),i.createElement("span",{"aria-label":"delete",className:"k-select",onClick:function(n){return e.props.onTagDelete.call(void 0,t.data,n)}},i.createElement("span",{className:"k-icon k-i-close"})));return e.props.tagRender?e.props.tagRender(t,s):s})))},t}(i.Component);!function(e){e[e.PopupList=0]="PopupList",e[e.TagsList=1]="TagsList"}(fe||(fe={}));var ye,be=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=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){return e.preventDefault()},Ce=function(e){return e===ye.CustomItem};!function(e){e[e.None=0]="None",e[e.ListItem=1]="ListItem",e[e.CustomItem=2]="CustomItem"}(ye||(ye={}));var Oe=function(e){function t(t){var n=e.call(this,t)||this;return n.state={activedescendant:fe.PopupList},n._valueItemsDuringOnChange=null,n._inputId=Object(H.a)(),n.base=new W(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 x(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;O(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,p=a&&c,d=i[e-l];d&&u!==e?n.state.focusedIndex!==e&&(t.data.focusedIndex=e,t.data.activedescendant=fe.PopupList):p&&-1===e&&void 0!==n.state.focusedIndex&&(t.data.focusedIndex=void 0),n.base.triggerPageChangeCornerItems(d,t)},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;y(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=n.base,t=n.props,r=t.header,o=t.footer,a=t.allowCustom,s=t.dir,c=t.data,u=void 0===c?[]:c,p=n.base.getPopupSettings(),d=void 0!==n.props.opened?n.props.opened:n.state.opened,f=void 0!==n.props.filter?n.props.filter:n.state.text,h=void 0!==n.props.virtual,v=void 0!==p.width?p.width:e.popupWidth,g={dir:void 0!==s?s:e.dirCalculated,width:v,popupSettings:{popupClass:p.popupClass,className:Object(l.a)("k-list-container k-reset",p.className),animate:p.animate,anchor:n.element,show:d,onOpen:n.onPopupOpened,onClose:n.onPopupClosed,appendTo:p.appendTo},itemsCount:[u.length,n.value.length]},y=n.getFocusedState().focusedType,b=a&&f&&i.createElement("div",{className:"k-list",key:"customitem",onClick:n.customItemSelect,onMouseDown:we},i.createElement("div",{className:Object(l.a)("k-item k-custom-item",{"k-state-focused":Ce(y)})},f,i.createElement("span",{className:"k-icon k-i-plus",style:{float:"right"}})));return i.createElement(m,ke({},g),h&&r,n.base.renderScrollWrapper(i.createElement(i.Fragment,null,!h&&r,b,n.renderList(),!h&&o,n.base.renderScrollElement())),h&&o)},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,p=c?c.skip:0,d=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(B,{id:n.base.listBoxId,show:d,data:r.slice(),focusedIndex:f-p,value:n.value,textField:o,valueField:l,optionsGuid:n.base.guid,listRef:function(e){u.list=n.base.list=e},wrapperStyle:u.enabled?{float:"left",width:"100%"}:{maxHeight:h.height},wrapperCssClass:u.enabled?void 0:"k-list-scroller",listStyle:u.enabled?{transform:m}:void 0,key:"listKey",skip:p,onClick:n.handleItemClick,itemRender:s,noDataRender:a,onMouseDown:we,onBlur:n.handleBlur})},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),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($.a)(U),n}return be(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,p=c.focusedIndex;s&&n?this.base.scrollToVirtualItem(n,p-r):s&&!n?this.base.scrollToItem(p):i&&a&&u&&this.scrollToFocused&&this.base.scrollToItem(p-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,p=l.focusedIndex,d=r&&s,f=Ce(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:p,max:(m.enabled?m.total:i.length)-1,min:d?-1:0});void 0!==v&&(this.itemFocus(v,e),this.scrollToFocused=!0)}this.applyState(e)},t.prototype.render=function(){var e=this,t=this.props,n=t.style,r=t.className,o=t.label,a=t.dir,s=t.disabled,c=t.tags,u=t.textField,d=t.dataItemKey,f=t.virtual,h=this.state,m=h.focused,v=h.text,g=h.focusedTag,y=this.base.vs,b=this.props.id||this._inputId;y.enabled=void 0!==f,void 0!==f&&(y.skip=f.skip,y.total=f.total,y.pageSize=f.pageSize);var k=[];void 0===c?this.value.forEach((function(e){k.push({text:C(e,u),data:[e]})})):k.push.apply(k,c),this.setItems(k,this._tags);var w=!this.validityStyles||this.validity.valid,O=i.createElement("span",{ref:function(t){return e._element=t},className:Object(l.a)("k-widget k-multiselect",r,{"k-state-focused":m&&!s,"k-state-invalid":!w,"k-state-disabled":s}),style:o?ke({},n,{width:void 0}):n,dir:a,onFocus:this.handleFocus,onBlur:this.handleBlur},i.createElement("div",{onClick:this.handleWrapperClick,ref:function(t){return e.base.wrapper=t},className:"k-multiselect-wrap k-floatwrap",onMouseDown:E},k.length>0&&i.createElement(ge,{tagRender:this.props.tagRender,onTagDelete:this.onTagDelete,data:k,guid:this.base.guid,focused:g?k.find((function(e){return I(e,g,d)})):void 0}),this.renderSearchbar(b)),this.renderListContainer());return o?i.createElement(p.a,{label:o,editorId:b,editorValue:v||C(this.value[0],u),editorValid:w,editorDisabled:s,style:{width:n?n.width:void 0},children:O}):O},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,p=this.getFocusedState().focusedIndex,d=!!c||this.value.length>0,f=0!==this.value.length||c?void 0:s,h=n===fe.TagsList&&void 0!==r?"tag-"+this.base.guid+"-"+r.text.replace(/\s+/g,"-"):"option-"+this.base.guid+"-"+p;return i.createElement(ne,{id:e,size:Math.max((f||"").length,c.length,1),tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,placeholder:f,value:c,onChange:this.onChangeHandler,onKeyDown:this.onInputKeyDown,ref:this.searchbarRef,disabled:a,expanded:u,owns:this.base.listBoxId,activedescendant:h,ariaDescribedBy:"tagslist-"+this.base.guid+(l?" "+l:""),clearButton:d,clearButtonClick:this.clearButtonClick,loading:this.props.loading,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 I(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;O(u,o[a].data,i),this.triggerOnChange(u,t)}}else if(n===c.a.backspace){u=this.value;if(l)O(u,o[a].data,i),this.triggerOnChange(u,t);else if(!l&&o.length){var p=o.pop();O(u,p.data,i),this.triggerOnChange(u,t)}}s!==r&&(t.data.focusedTag=s,t.data.activedescendant=fe.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,p=void 0===u?k:u,d=l&&l.skip||0;if(void 0!==t)return{focusedIndex:t,focusedItem:a[t-d],focusedType:ye.ListItem};var f=this.value;if(o&&n)return{focusedItem:null,focusedIndex:-1,focusedType:ye.CustomItem};if(n)return{focusedItem:a[e=p(a,n,c)],focusedIndex:e+d,focusedType:ye.ListItem};if(f.length){var h=f[f.length-1];return e=a.findIndex((function(e){return x(e,h,s)})),void 0!==a[e]?{focusedIndex:e+d,focusedItem:a[e],focusedType:ye.ListItem}:{focusedType:ye.None,focusedIndex:-1}}return 0===d?{focusedItem:a[0],focusedIndex:0,focusedType:ye.ListItem}:{focusedType:ye.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=ke({},W.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=ke({},W.defaultProps,{autoClose:!0,required:!1}),t}(i.Component),xe=Object(u.a)(),Se=Object(u.b)(xe,Oe);Se.displayName="KendoReactMultiSelect";var Ee=function(){return(Ee=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)},Ie=function(e){return i.createElement(B,Ee({},e,{listClassName:"k-grid-list"}))},Ne=n(38),Te=function(){return"undefined"!=typeof document?document:{}},De=function(){function e(){}return Object.defineProperty(e.prototype,"scrollbarWidth",{get:function(){var e=Te();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=" ",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}(),Me=n(29),_e=n(93),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)},Re=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},je=Object(u.a)(),Ae=i.forwardRef((function(e,t){var n=Object(Ne.a)(je,e),r=i.useRef(null),o=i.useRef(null),a=!(!Me.a||!document.body)&&(new De).scrollbarWidth,s=n.columns,c=void 0===s?Le.columns:s,u=n.popupSettings,p=void 0===u?Le.popupSettings:u,d=n.onOpen,f=n.onClose,h=n.onFocus,m=n.onBlur,v=n.onChange,g=n.onFilterChange,y=n.onPageChange,b=Re(n,["columns","popupSettings","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(){return"calc("+c.map((function(e){return t=e.width,n=Le.width,t?"number"==typeof t?t+"px":t:n;var t,n})).filter(Boolean).join(" + ")+" + "+a+"px)"}),[c,a]),w=i.useMemo((function(){return i.createElement(i.Fragment,null,n.header,i.createElement("div",{className:"k-grid-header"},i.createElement("div",{className:"k-grid-header-wrap"},i.createElement("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:Le.width}})}))),i.createElement("tbody",null,i.createElement("tr",null,c.map((function(e,t){return i.createElement("th",{key:e.uniqueKey?e.uniqueKey:t,className:"k-header"},e.header||" ")}))))))))}),[n.header,c]),C=n.virtual?n.virtual.skip:0,O=i.useCallback((function(e,t){var r,o,a,s=c.map((function(e,n){return i.createElement("span",{className:"k-cell",style:{width:e.width?e.width:Le.width},key:e.uniqueKey?e.uniqueKey:n},e.field?Object(_e.a)(e.field)(t.dataItem):"")})),l=void 0,u=n.data||[],p=t.index-C;void 0!==n.groupField&&(r=(a=Object(_e.a)(n.groupField))(u[p]),o=a(u[p-1]),r&&o&&r!==o&&(l=r)),l&&s.push(i.createElement("div",{key:"group",className:"k-cell k-group-cell"},i.createElement("span",null,l)));var d=i.cloneElement(e,Pe({},e.props),s);return n.itemRender?n.itemRender.call(void 0,d,t):d}),[c,n.groupField,n.itemRender,n.data,C]),x=i.useCallback((function(e,t){e&&e.call(void 0,Pe({},t,{target:r.current}))}),[]),S=i.useCallback((function(e){return x(d,e)}),[d]),E=i.useCallback((function(e){return x(f,e)}),[f]),I=i.useCallback((function(e){return x(h,e)}),[h]),N=i.useCallback((function(e){return x(m,e)}),[m]),T=i.useCallback((function(e){return x(v,e)}),[v]),D=i.useCallback((function(e){return x(g,e)}),[g]),M=i.useCallback((function(e){return x(y,e)}),[y]);i.useEffect((function(){!function(){if(!Me.a||!document.body)return!1;var e=(new De).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")}()}));var _=i.useCallback((function(e){return i.createElement(Ie,Pe({},e))}),[]);return i.createElement(se,Pe({},b,{list:_,popupSettings:Pe({width:k},p,{popupClass:"k-dropdowngrid-popup",className:Object(l.a)("k-popup-flush",p.className)}),ref:o,header:w,itemRender:O,onOpen:S,onClose:E,onFocus:I,onBlur:N,onChange:T,onFilterChange:D,onPageChange:M}))})),Fe=Pe({},ie.propTypes,{columns:a.any.isRequired}),Le={columns:[],popupSettings:{},width:"200px"};Ae.displayName="KendoMultiColumnComboBox",Ae.propTypes=Fe,Ae.defaultProps=Le;var Be=n(10),ze=n(91),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)};function He(e,t,n){var r;return n?Ve({},e,((r={})[t]=n.length?n.slice():void 0,r)):e&&e[t]?e[t].slice():[]}var Ke=function(e,t,n){return e.map((function(e){return function e(t,n,r){if(t[n]){var o=He(t,n).map((function(t){return e(t,n,r)}));return r(He(t,n,o))}return r(t)}(e,t,n)})).slice()},We=n(83);function $e(e,t,n){if(Ze(e))return t[Number(e)];var r=t[Number(Ue(e))],o=r&&r[n]||[];return o.length?$e(qe(e),o,n):void 0}function Ue(e){return Ye(e)?e:e.split("_")[0]}function qe(e){if(Ye(e))return e;var t=e.indexOf("_");return e.substring(t+1)}function Ge(e){return Xe("0",e)}function Xe(e,t){return e=e.toString(),t?t+"_"+e:e}function Je(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function Ye(e){return""===e||e.indexOf("_")<0}function Ze(e){return""!==e&&e.indexOf("_")<0}function Qe(e){return e.split("_")}function et(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}var tt=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 nt(e,t){var n=(e||"").split("."),r=t;return n.forEach((function(e){r=r?r[e]:void 0})),r}function rt(e,t){var n=nt(t,e);return Boolean(n&&n.length)}function ot(e,t){return t.expanded(e)&&rt(e,t.getChildrenField())}function it(e,t,n,r){var o=function(e,t,n,r){var o=[],i=new tt;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=Xe(s,o);t.hasId(nt(n,l))&&i.push(c),rt(l,a)&&e(t,n,nt(a,l),c,i,a)}}(i,t,n,"",o,r),o}([e],t,n,r);return o.length?o[0]:void 0}function at(e,t,n){for(var r=Qe(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 st(e,t,n,r,o){switch(r){case c.a.left:return Ze(t)||o.expanded(e)&&at(t,n,o)?t:Je(t);case c.a.right:return ot(e,o)?Ge(t):t;case c.a.up:return i=Number(et(t)),a=Je(t),i?function e(t,n,r){var o=$e(t,n,r.getChildrenField());return ot(o,r)?e(Xe(o[r.getChildrenField()].length-1,t),n,r):t}(Xe(i-1,a),n,o):Ze(t)?t:a;case c.a.down:return ot(e,o)?Ge(t):function e(t,n,r){var o=Je(t),i=o?$e(o,n,r.getChildrenField()):void 0,a=i?i[r.getChildrenField()]:n,s=Number(et(t));return s<a.length-1?Xe(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(;ot(r,o);)e=r[o.getChildrenField()],t=Xe(e.length-1,t),r=e[e.length-1];return t}();default:return t}var i,a}var lt=n(88),ct=n(89),ut=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)}}(),pt=function(){return(pt=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)},dt=i.createContext((function(e){return e})),ft=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.itemGuid=Object(H.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 ut(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-mid",ref:this.assignDraggableMeta},this.renderExpandIcon(),this.renderCheckbox(),this.props.draggable?i.createElement(lt.a,{onPress:this.onPress,onDrag:this.onDrag,onRelease:this.onRelease},n):n),this.props.animate?i.createElement(ct.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=this;return this.props.checkboxes?i.createElement("div",{className:"k-checkbox-wrapper"},i.createElement("input",{type:"checkbox",className:"k-checkbox",checked:Boolean(this.fieldsSvc.checked(this.item)),id:this.itemGuid,tabIndex:-1,onChange:this.onCheckChange,ref:function(t){return e.checkboxElement=t}}),i.createElement("label",{className:"k-checkbox-label",htmlFor:this.itemGuid})):void 0},t.prototype.renderExpandIcon=function(){return this.props.expandIcons&&(this.fieldsSvc.hasChildren(this.item)||rt(this.item,this.fieldsSvc.getChildrenField()))?i.createElement("span",{className:this.getIconClassName(),onClick:this.onExpandChange}):void 0},t.prototype.renderSubitemsIfApplicable=function(){var e=this;return ot(this.item,this.fieldsSvc)?i.createElement("ul",{className:"k-content",role:"group"},this.fieldsSvc.children(this.item).map((function(t,n){return i.createElement(ht,{item:t,itemId:Xe(n,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:n})}))):void 0},t.prototype.renderItemInPart=function(){return i.createElement("span",{className:this.getContentClassName(),style:{touchAction:"none"},onClick:this.onItemClick},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)||rt(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(){return Object(l.a)("k-icon",{"k-i-expand":!this.fieldsSvc.expanded(this.item),"k-i-collapse":this.fieldsSvc.expanded(this.item),"k-i-loading":this.fieldsSvc.expanded(this.item)&&!rt(this.item,this.fieldsSvc.getChildrenField())})},t.prototype.getRootClassName=function(){return Object(l.a)("k-item k-treeview-item",{"k-state-disabled":this.fieldsSvc.disabled(this.item)})},t.prototype.getContentClassName=function(){return Object(l.a)("k-in",{"k-state-focused":this.props.focusedItemId===this.itemId,"k-state-selected":this.fieldsSvc.selected(this.item)})},t}(i.Component),ht=i.forwardRef((function(e,t){var n=i.useContext(dt).call(void 0,e);return i.createElement(ft,pt({ref:t},n))}));ht.displayName="TreeViewItem";var mt=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 nt(this.expandField,e)},e.prototype.selected=function(e){return nt(this.selectField,e)},e.prototype.text=function(e){return nt(this.textField,e)},e.prototype.disabled=function(e){return nt(this.disableField,e)},e.prototype.hasChildren=function(e){return nt(this.hasChildrenField,e)},e.prototype.children=function(e){var t=nt(this.childrenField,e);return t||[]},e.prototype.checked=function(e){return nt(this.checkField,e)},e.prototype.checkIndeterminate=function(e){return nt(this.checkIndeterminateField,e)},e.prototype.focusId=function(e){return this.focusIdField&&nt(this.focusIdField,e)},e.prototype.getChildrenField=function(){return this.childrenField},e}(),vt={name:"@progress/kendo-react-treeview",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167506,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"},gt=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)}}(),yt=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(H.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=st(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($.a)(vt),n}return gt(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;return this.fieldsSvc=new mt(this.props),i.createElement("div",{className:"k-widget k-treeview"+(this.props.className?" "+this.props.className:""),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(t){return e._element=t},tabIndex:this.props.tabIndex},i.createElement("ul",{className:"k-treeview-lines k-group",role:"group"},this.data.map((function(t,n){return i.createElement(ht,{item:t,itemId:n.toString(),treeGuid:e.treeGuid,animate:e.props.animate,focusedItemId:e.state.focusedItemId,tabbableItemId:e.state.tabbableItemId,fieldsService:e.fieldsSvc,itemUI:e.props.item,checkboxes:e.props.checkboxes,ariaMultiSelectable:e.ariaMultiSelectable,onItemClick:e.onItemClick,onFocusDomElNeeded:e.onFocusDomElNeeded,draggable:e.props.draggable,onPress:e.onPress,onDrag:e.onDrag,onRelease:e.onRelease,expandIcons:e.props.expandIcons,onExpandChange:e.onExpandChange,onCheckChange:e.onCheckChange,key:n})}))))},t.prototype.componentDidUpdate=function(){this.allowExplicitFocus=!1,this.refocusDueToFocusIdField()},t.prototype.dispatchEventsOnKeyDown=function(e,t){var n=this,r=function(){return at(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)||rt(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 $e(e,this.data,this.props.childrenField||"items")},t.prototype.dispatchCheckChange=function(e,t,n){Object(We.a)(this.props.onCheckChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchExpandChange=function(e,t,n){Object(We.a)(this.props.onExpandChange,e,this,{item:t,itemHierarchicalIndex:n})},t.prototype.dispatchItemClick=function(e,t,n){Object(We.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):it(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},t.defaultProps={animate:!0,expandField:"expanded",selectField:"selected",hasChildrenField:"hasChildren",childrenField:"items",textField:"text",disableField:"disabled",checkField:"checked",checkIndeterminateField:"checkIndeterminate"},t}(i.Component);function bt(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 kt=function(e){return i.createElement("div",{className:"k-nodata"},i.createElement("div",null,e.children))},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){return i.createElement(i.Fragment,null,e.children)},Ot=function(e){return e.split("_").map((function(e){return parseInt(e,10)}))},xt="selected",St="items",Et={animate:!0,width:"200px",height:"200px"},It=!1,Nt=!0,Tt=Object(u.a)(),Dt=i.forwardRef((function(e,t){Object($.a)(U);var n=Object(Ne.a)(Tt,e),r=i.useMemo((function(){return Object(H.a)()}),[]),o=n.id||r,a=n.data,u=void 0===a?[]:a,f=n.dataItemKey,h=n.popupSettings,m=void 0===h?{}:h,v=n.style,g=void 0===v?{}:v,b=n.opened,k=n.disabled,w=n.onOpen,O=void 0===w?Be.a:w,S=n.onClose,E=void 0===S?Be.a:S,I=n.placeholder,N=n.label,T=n.name,D=n.selectField,M=void 0===D?xt:D,_=n.subItemsField,F=void 0===_?St:_,L=n.validationMessage,B=n.valid,z=n.required,V=void 0===z?It:z,K=n.validityStyles,W=void 0===K?Nt:K,q=Object(s.a)(n.tabIndex,k),G=i.useRef(null),X=i.useRef(null),J=i.useRef(null),Y=i.useRef(null),Z=i.useRef(null),Q=i.useRef(!1),ee=i.useState(void 0),te=ee[0],ne=ee[1],re=void 0!==n.value,oe=re?n.value:void 0!==te?te:n.defaultValue,ie=y(oe),ae=ie?C(oe,n.textField):"",se=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:L,valid:B,required:V},ie),le=i.useCallback((function(){return X.current&&X.current.focus()}),[]);i.useImperativeHandle(G,(function(){return{props:n,element:X.current,actionElement:X.current,focus:le}})),i.useImperativeHandle(t,(function(){return G.current}));var ce=Object(ze.a)(X,n.dir),ue=void 0!==m.width?m.width:void 0!==g.width?g.width:Et.width,pe=bt(X,ue),de=wt({width:pe},void 0!==ce?{direction:ce}:{}),fe=i.useState(!1),he=fe[0],me=fe[1],ve=void 0!==b?b:he,ge=i.useState(!1),ye=ge[0],be=ge[1],ke=i.useState(""),we=ke[0],Ce=ke[1],Oe=i.useCallback((function(){Y.current&&Y.current.setCustomValidity&&Y.current.setCustomValidity(se.valid?"":void 0===L?"Please select a value from the list!":L)}),[L,se]);i.useEffect(Oe);var xe=i.useCallback((function(e){if(!ve){if(O){var t=wt({},e);O.call(void 0,t)}void 0===b&&me(!0)}}),[ve,b,O]),Se=i.useCallback((function(e){if(ve){if(E){var t=wt({},e);E.call(void 0,t)}void 0===b&&me(!1)}}),[ve,b,E]),Ee=i.useCallback((function(e){if(!e.isDefaultPrevented()&&G.current){be(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};(ve?Se:xe)(t)}}),[ve,b,O,E]),Ie=i.useCallback((function(e){Q.current=!0,e(),window.setTimeout((function(){return Q.current=!1}),0)}),[]),Te=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=Z.current&&Z.current.element;if(G.current&&(!e.isDefaultPrevented()||J.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};if(ve)if(t===c.a.esc||n&&t===c.a.up)Se(o);else if(r&&r.querySelector(".k-state-focused")&&(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&&J.current){var i=Array.from(r.querySelectorAll(".k-treeview-item")),a=i.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-state-focused"))}));if(a&&0===i.indexOf(a))return Ie((function(){Me(J.current)}))}Ie(Be.a)}else t===c.a.down&&Ie((function(){Me(J.current||r)}));else n&&t===c.a.down&&xe(o)}}),[ve,b,O,E]),De=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==c.a.up&&t!==c.a.down||(e.preventDefault(),Ie(t===c.a.up?function(){Me(X.current)}:function(){Me(Z.current&&Z.current.element)}))}),[]),Me=i.useCallback((function(e){e&&Ie((function(){return e.focus()}))}),[]),_e=i.useCallback((function(){!ye&&ve?Se({target:G.current}):n.filterable?Me(J.current):Me(Z.current&&Z.current.element)}),[E,n.filterable,ye,b,ve]),Pe=i.useCallback((function(){ye&&Me(X.current)}),[ye]),Re=i.useCallback((function(e){if(!ye&&!Q.current&&(be(!0),n.onFocus&&G.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};n.onFocus.call(void 0,t)}}),[ye,n.onFocus]),je=i.useCallback((function(e){if(ye&&!Q.current&&G.current){be(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};if(n.onBlur){var r=wt({},t);n.onBlur.call(void 0,r)}Se(t)}}),[ye,n.onBlur,ve,b,E]),Ae=i.useCallback((function(){ye&&Ie(Be.a)}),[ye]),Fe=i.useCallback((function(e,t,r){if(n.onChange){var o=wt({value:t,level:r?Ot(r):[]},e);n.onChange.call(void 0,o)}re||ne(t)}),[n.onChange,re]),Le=i.useCallback((function(e){if(!x(e.item,oe,f)&&G.current){var t=e.item,n=e.itemHierarchicalIndex,r=e.nativeEvent,o={syntheticEvent:e.syntheticEvent,nativeEvent:r,target:G.current};Fe(o,t,n),Se(o)}}),[re,oe,n.onChange,f,ve,b,E]),Ve=i.useCallback((function(e){if(G.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};Fe(t,null),Se(t),e.preventDefault()}}),[re,n.onChange,ve,b,E]),He=i.useCallback((function(e){if(n.onExpandChange&&G.current){var t=e.item,r=e.itemHierarchicalIndex,o=e.nativeEvent,i=e.syntheticEvent,a={level:Ot(r),item:t,nativeEvent:o,syntheticEvent:i,target:G.current};n.onExpandChange.call(void 0,a)}}),[n.onExpandChange]),We=i.useCallback((function(e){if(n.onFilterChange&&G.current){var t={filter:{field:n.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:G.current};n.onFilterChange.call(void 0,t),void 0===n.filter&&Ce(e.target.value)}}),[n.onFilterChange,n.filter,n.textField]),$e=i.useMemo((function(){return re||!ie?u:Ke(u,F,(function(e){var t;return function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})}(e,F,((t={})[M]=x(e,oe,f),t))}))}),[u,oe,re,ie,M,F]),Ue=n.listNoData||kt,qe=n.valueHolder||Ct,Ge=Object(P.useLocalization)(),Xe=!W||se.valid,Je=i.createElement("span",{className:Object(l.a)("k-widget k-dropdowntree k-dropdowntree-clearable",n.className),tabIndex:q,accessKey:n.accessKey,id:o,style:N?wt({},g,{width:void 0}):g,dir:ce,ref:X,onKeyDown:k?void 0:Te,onMouseDown:Ae,onFocus:Re,onBlur:je,role:"listbox","aria-haspopup":"true","aria-expanded":ve,"aria-disabled":k,"aria-label":N,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy},i.createElement("span",{className:Object(l.a)("k-dropdown-wrap",{"k-state-focused":ye,"k-state-disabled":k,"k-state-invalid":!Xe}),onClick:k?void 0:Ee},i.createElement("span",{className:"k-input"},i.createElement(qe,{item:oe},ae||I)),ie&&!k&&i.createElement("span",{onClick:Ve,className:"k-icon k-clear-value k-i-close",title:Ge.toLanguageString(j,A[j]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}}),i.createElement("span",{className:"k-select","aria-label":"select"},i.createElement("span",{className:Object(l.a)("k-icon",{"k-i-arrow-60-down":!n.loading,"k-i-loading":n.loading})})),i.createElement("select",{name:T,ref:Y,tabIndex:-1,"aria-hidden":!0,title:N,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:n.valueMap?n.valueMap.call(void 0,oe):oe}))),i.createElement(d.a,{className:Object(l.a)("k-list-container k-group k-reset k-popup-dropdowntree",m.className,{"k-rtl":"rtl"===ce}),popupClass:m.popupClass,style:de,animate:m.animate,anchor:X.current,show:ve,onOpen:_e,onClose:Pe,appendTo:m.appendTo},n.filterable&&i.createElement("span",{className:"k-list-filter"},i.createElement("input",{className:"k-textbox",tabIndex:q,ref:J,value:void 0===n.filter?we:n.filter,onChange:We,onKeyDown:De}),i.createElement("span",{className:"k-icon k-i-zoom"})),u.length>0?i.createElement(yt,{ref:Z,tabIndex:q,data:$e,focusIdField:f,textField:n.textField,selectField:M,expandField:n.expandField,childrenField:F,expandIcons:!0,onItemClick:Le,onExpandChange:He,item:n.item}):i.createElement(Ue,null,Ge.toLanguageString(R,A[R]))));return N?i.createElement(p.a,{label:N,editorValue:ae,editorPlaceholder:I,editorValid:Xe,editorDisabled:k,editorId:o,style:{width:g?g.width:void 0},children:Je,dir:ce}):Je})),Mt={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};Dt.displayName="KendoReactDropDownTree",Dt.propTypes=Mt;var _t=function(){return(_t=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="checkField",Rt="checkIndeterminateField",jt="items",At={animate:!0,width:"200px",height:"200px"},Ft=!1,Lt=!0,Bt=Object(u.a)(),zt=i.forwardRef((function(e,t){var n=Object(Ne.a)(Bt,e);Object($.a)(U);var r=i.useMemo((function(){return Object(H.a)()}),[]),o=n.id||r,a=n.data,u=void 0===a?[]:a,f=n.dataItemKey,h=n.popupSettings,m=void 0===h?{}:h,v=n.style,g=void 0===v?{}:v,y=n.opened,b=n.disabled,k=n.onOpen,w=void 0===k?Be.a:k,O=n.onClose,S=void 0===O?Be.a:O,E=n.placeholder,N=n.label,T=n.name,D=n.checkField,M=void 0===D?Pt:D,_=n.checkIndeterminateField,F=void 0===_?Rt:_,L=n.subItemsField,B=void 0===L?jt:L,z=n.validationMessage,V=n.valid,K=n.tags,W=n.value,q=n.required,G=void 0===q?Ft:q,X=n.validityStyles,J=void 0===X?Lt:X,Y=Object(s.a)(n.tabIndex,b),Z=i.useRef(null),Q=i.useRef(null),ee=i.useRef(null),te=i.useRef(null),ne=i.useRef(null),re=i.useRef(!1),oe=i.useRef([]),ie=i.useRef(null),ae=i.useState(),se=ae[0],le=ae[1],ce=i.useState(!1),ue=ce[0],pe=ce[1],de=i.useState(!1),fe=de[0],he=de[1],me=i.useState(""),ve=me[0],ye=me[1],be=void 0!==y?y:ue,ke=Boolean(Array.isArray(W)&&W.length),we=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:z,valid:V,required:G},ke),Ce=Object(ze.a)(Q,n.dir),Oe=void 0!==m.width?m.width:void 0!==g.width?g.width:At.width,xe=bt(Q,Oe),Se=_t({width:xe},void 0!==Ce?{direction:Ce}:{}),Ee=i.useCallback((function(){return Q.current&&Q.current.focus()}),[]);oe.current=void 0===K?(W||[]).map((function(e){return{text:C(e,n.textField),data:[e]}})):K.slice(),i.useImperativeHandle(Z,(function(){return{props:n,element:Q.current,actionElement:Q.current,focus:Ee}})),i.useImperativeHandle(t,(function(){return Z.current}));var Ie=i.useCallback((function(){te.current&&te.current.setCustomValidity&&te.current.setCustomValidity(we.valid?"":void 0===z?"Please select a value from the list!":z)}),[z,we]);i.useEffect(Ie),i.useEffect((function(){ie.current&&be&&ie.current.setPosition(ie.current._popup)}),[W,be]);var Te=i.useCallback((function(e,t,r){if(n.onChange){var o=_t({items:t,operation:r},e);n.onChange.call(void 0,o)}}),[n.onChange]),De=i.useCallback((function(e){if(!x(e.item,W,f)&&Z.current){var t=e.item,n=e.nativeEvent,r={syntheticEvent:e.syntheticEvent,nativeEvent:n,target:Z.current};Te(r,[t],"toggle")}}),[W,f,Te]),Me=i.useCallback((function(e){if(!be){if(w){var t=_t({},e);w.call(void 0,t)}void 0===y&&pe(!0)}}),[be,y,w]),_e=i.useCallback((function(e){if(be){if(S){var t=_t({},e);S.call(void 0,t)}void 0===y&&pe(!1)}}),[be,y,S]),Pe=i.useCallback((function(e){re.current=!0,e(),window.setTimeout((function(){return re.current=!1}),0)}),[]),Re=i.useCallback((function(e){e&&Pe((function(){return e.focus()}))}),[Pe]),je=i.useCallback((function(){!fe&&be?_e({target:Z.current}):n.filterable?Re(ee.current):Re(ne.current&&ne.current.element)}),[fe,be,Re,_e,n.filterable]),Ae=i.useCallback((function(){fe&&Re(Q.current)}),[fe,Re]),Fe=i.useCallback((function(e){if(!fe&&!re.current&&(he(!0),n.onFocus&&Z.current)){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};n.onFocus.call(void 0,t)}}),[fe,n.onFocus]),Le=i.useCallback((function(e){if(fe&&!re.current&&Z.current){he(!1);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};if(n.onBlur){var r=_t({},t);n.onBlur.call(void 0,r)}_e(t)}}),[fe,n.onBlur,be,y,S]),Ve=i.useCallback((function(){fe&&Pe(Be.a)}),[fe,Pe]),He=i.useCallback((function(e){if(!e.isDefaultPrevented()&&Z.current){he(!0);var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};be||Me(t)}}),[be,Me]),Ke=i.useCallback((function(e){var t=e.keyCode,n=e.altKey,r=ne.current&&ne.current.element;if(Z.current&&(!e.isDefaultPrevented()||ee.current!==e.target)){var o={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};if(W&&W.length>0&&(t===c.a.left||t===c.a.right||t===c.a.home||t===c.a.end||t===c.a.delete)){var i=oe.current,a=se?i.findIndex((function(e){return I(e,se,f)})):-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&&Te(o,i[a].data,"delete"),s!==se&&le(s)}if(be)if(t===c.a.esc||n&&t===c.a.up)_e(o);else if(r&&r.querySelector(".k-state-focused")&&(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&&ee.current){var u=Array.from(r.querySelectorAll(".k-treeview-item")),p=u.slice().reverse().find((function(e){return Boolean(e&&e.querySelector(".k-state-focused"))}));if(p&&0===u.indexOf(p))return Pe((function(){Re(ee.current)}))}Pe(Be.a)}else t===c.a.down&&Pe((function(){Re(ee.current||r)}));else n&&t===c.a.down&&Me(o)}}),[be,_e,Re,Pe,Me,se,f,W,Te]),We=i.useCallback((function(e){var t=e.keyCode;e.altKey||t!==c.a.up&&t!==c.a.down||(e.preventDefault(),Pe(t===c.a.up?function(){Re(Q.current)}:function(){Re(ne.current&&ne.current.element)}))}),[Re,Pe]),$e=i.useCallback((function(e){if(Z.current){var t={syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};Te(t,[],"clear"),_e(t),e.preventDefault()}}),[Te,_e]),Ue=i.useCallback((function(e,t){_e({target:Z.current}),fe||Re(ee.current),Te({syntheticEvent:t,nativeEvent:t.nativeEvent,target:Z.current},e,"delete")}),[Te,_e,Re,fe]),qe=i.useCallback((function(e){if(n.onExpandChange&&Z.current){var t=e.item,r=e.itemHierarchicalIndex,o=e.nativeEvent,i=e.syntheticEvent,a={level:(s=r,s.split("_").map((function(e){return parseInt(e,10)}))),item:t,nativeEvent:o,syntheticEvent:i,target:Z.current};n.onExpandChange.call(void 0,a)}var s}),[n.onExpandChange]),Ge=i.useCallback((function(e){if(n.onFilterChange&&Z.current){var t={filter:{field:n.textField,operator:"contains",value:e.target.value},syntheticEvent:e,nativeEvent:e.nativeEvent,target:Z.current};n.onFilterChange.call(void 0,t),void 0===n.filter&&ye(e.target.value)}}),[n.onFilterChange,n.filter,n.textField]),Xe=n.listNoData||kt,Je=Object(P.useLocalization)(),Ye=!J||we.valid,Ze=i.createElement("span",{className:Object(l.a)("k-widget k-dropdowntree",n.className,{"k-state-focused":fe&&!b,"k-state-invalid":!Ye,"k-state-disabled":b}),tabIndex:Y,accessKey:n.accessKey,id:o,style:N?_t({},g,{width:void 0}):g,dir:Ce,ref:Q,onKeyDown:b?void 0:Ke,onMouseDown:Ve,onFocus:Fe,onBlur:Le,role:"listbox","aria-haspopup":"true","aria-expanded":be,"aria-disabled":b,"aria-label":N,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy},i.createElement("span",{className:Object(l.a)("k-multiselect-wrap k-floatwrap",{"k-state-focused":fe,"k-state-disabled":b,"k-state-invalid":!Ye}),onClick:b?void 0:He},oe.current.length>0&&i.createElement(ge,{tag:n.tag,onTagDelete:Ue,data:oe.current,guid:r,focused:se?oe.current.find((function(e){return I(e,se,f)})):void 0}),n.loading&&i.createElement("span",{className:Object(l.a)("k-icon",{"k-i-loading":n.loading})}),ke&&!b&&i.createElement("span",{onClick:$e,className:"k-icon k-clear-value k-i-close",title:Je.toLanguageString(j,A[j]),role:"button",tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}}),i.createElement("select",{name:T,ref:te,tabIndex:-1,"aria-hidden":!0,title:N,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:n.valueMap?n.valueMap.call(void 0,W):W}))),i.createElement(d.a,{popupClass:m.popupClass,className:Object(l.a)("k-list-container k-group k-reset k-popup-dropdowntree",m.className,{"k-rtl":"rtl"===Ce}),style:Se,animate:m.animate,anchor:Q.current,show:be,onOpen:je,onClose:Ae,appendTo:m.appendTo,ref:ie},n.filterable&&i.createElement("span",{className:"k-list-filter"},i.createElement("input",{className:"k-textbox",tabIndex:Y,ref:ee,value:void 0===n.filter?ve:n.filter,onChange:Ge,onKeyDown:We}),i.createElement("span",{className:"k-icon k-i-zoom"})),u.length>0?i.createElement(yt,{ref:ne,tabIndex:Y,data:u,focusIdField:f,textField:n.textField,checkField:M,checkIndeterminateField:F,expandField:n.expandField,childrenField:B,expandIcons:!0,onItemClick:De,onCheckChange:De,onExpandChange:qe,checkboxes:!0,item:n.item}):i.createElement(Xe,null,Je.toLanguageString(R,A[R]))));return N?i.createElement(p.a,{label:N,editorValue:ke,editorPlaceholder:E,editorValid:Ye,editorDisabled:b,editorId:o,style:{width:g?g.width:void 0},children:Ze,dir:Ce}):Ze})),Vt={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};zt.displayName="KendoReactMultiSelectTree",zt.propTypes=Vt;var Ht=function(e,t){var n={};return e&&e.length&&e.forEach((function(e){n[t(e)]=!0})),n},Kt=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(_e.a)(r),c=Ht(o,l);if("clear"===s)return[];if("delete"===s){var u=Ht(n,l);return o.filter((function(e){return!u[l(e)]}))}for(var p,d,f=n[0],h=l(f),m=Object(_e.a)(a),v=e.slice(),g=[];v.length;){var y=v.pop();if(h===l(y)){p=g.map((function(e){return e.item})),d=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(d)||[]).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(d),w.push.apply(w,k.filter((function(e){return!c[l(e)]})));for(var C=p.filter((function(e){return!c[l(e)]})),O=Ht(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(d),N=Ht(k,l),T=Ht(p,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,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){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(42);t.Editor=r.default;var o=n(51);t.EditorTools=o.EditorTools;var i=n(12);t.EditorToolsSettings=i.EditorToolsSettings;var a=n(27);t.EditorUtils=a.EditorUtils;var s=n(20);t.EditorDialogs=s.EditorDialogs;var l=n(4);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(7),c=n(76),u=n(4),p=n(33),d=n(43),f=n(12),h=n(20),m=n(27),v=n(26),g=n(48),y=f.EditorToolsSettings.link,b=f.EditorToolsSettings.bold,k=f.EditorToolsSettings.italic,w=f.EditorToolsSettings.underline,C=n(49),O=n(5),x=n(50),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,p=t.style,d=t.className;this.view&&(v.editorPropsKey.getState(this.view.state).preserveWhitespace=u);var f=this.props.contentStyle;void 0===f&&void 0===(p||{}).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",d,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:p},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;[d.defaultStyle,d.tablesStyles,"rtl"===this.props.dir?d.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.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:p.nodes,marks:p.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',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 .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 /* 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(21),s=n(7),l=n(4),c=n(3),u=n(6),p=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,p=t.render,d=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"},d.toLanguageString(m,u.messages[m]))),i.createElement("div",{className:"k-edit-field"},i.createElement("input",{type:"text",className:"k-textbox",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"},d.toLanguageString(v,u.messages[v]))),i.createElement("div",{className:"k-edit-field k-editor-link-text-row"},i.createElement("input",{type:"text",className:"k-textbox",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",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"},d.toLanguageString(g,u.messages[g])))),C=[i.createElement(s.Button,{onClick:this.onClose,dir:o,key:"cancel"},d.toLanguageString(y,u.messages[y])),i.createElement(s.Button,{onClick:this.onInsert,primary:!0,dir:o,key:"insert"},d.toLanguageString(b,u.messages[b]))],O=i.createElement(a.Dialog,{title:d.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 p?p(O,{content:w,actionButtons:C}):O},t}(i.Component);t.InsertLinkDialog=p,c.registerForLocalization(p)},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(21),s=n(7),l=n(4),c=n(3),u=n(6),p=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,p=t.render,d=r.messages,f=d.insertImageDialogTitle,h=d.insertImageAddress,m=d.insertImageTitle,v=d.insertImageAltText,g=d.insertImageWidth,y=d.insertImageHeight,b=d.insertImageCancel,k=d.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-textbox",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-textbox",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-textbox",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-textbox",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-textbox",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,primary:!0,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 p?p(E,{content:x,actionButtons:S}):E},t}(i.Component);t.InsertImageDialog=p,c.registerForLocalization(p)},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(21),s=n(7),l=n(4),c=n(3),u=n(6),p=n(26),d=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=p.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,p=t.render,d=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"},d.toLanguageString(m,u.messages[m])),i.createElement(s.Button,{onClick:this.onUpdate,primary:!0,dir:o,key:"update"},d.toLanguageString(v,u.messages[v]))],b=i.createElement(a.Dialog,{title:d.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 p?p(b,{content:g,actionButtons:y}):b},t}(i.Component);t.ViewHtmlDialog=d,c.registerForLocalization(d)},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(4),i=n(12),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(4),o=n(27),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:1640167928,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(12),l=n(52),c=n(55),u=n(56),p=n(57),d=n(58),f=n(59),h=n(60),m=n(61),v=n(62),g=n(63),y=n(64),b=n(65),k=n(66),w=n(67),C=n(68),O=n(69),x=n(70),S=n(71),E=n(72),I=n(73);!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 N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(t(s.EditorToolsSettings.alignCenter));e.AlignCenter=N;var T=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=T,e.createInsertTableTool=D;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(D(s.EditorToolsSettings.insertTable));e.InsertTable=M;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(l.InsertTablePopupNS.InsertTablePopup);function P(e){return u.FontStyleToolNS.createStyleDropDownList(e)}e.InsertTablePopup=_,e.createStyleDropDownList=P;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(P(s.EditorToolsSettings.fontSize));e.FontSize=R;var j=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(P(s.EditorToolsSettings.fontName));function A(e){return d.FormatBlockToolNS.createFormatBlockDropDownList(e)}e.FontName=j,e.ForeColor=function(e){return a.createElement(p.ApplyColorTool,i({},s.EditorToolsSettings.foreColor,e))},e.BackColor=function(e){return a.createElement(p.ApplyColorTool,i({},s.EditorToolsSettings.backColor,e))},e.createFormatBlockDropDownList=A;var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(A(s.EditorToolsSettings.formatBlock));function L(e){return f.HistoryToolNS.createUndoTool(e)}function B(e){return f.HistoryToolNS.createRedoTool(e)}e.FormatBlock=F,e.createUndoTool=L,e.createRedoTool=B;var z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(L(s.EditorToolsSettings.undo));e.Undo=z;var V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(B(s.EditorToolsSettings.redo));function H(e){return h.IndentToolNS.createIndentTool(e)}e.Redo=V,e.createIndentTool=H;var K=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(H(s.EditorToolsSettings.indent));function W(e){return m.InlineFormatToolNS.createInlineFormatTool(e)}e.Indent=K,e.createInlineFormatTool=W;var $=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.bold));e.Bold=$;var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.italic));e.Italic=U;var q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.underline));e.Underline=q;var G=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.strikethrough));e.Strikethrough=G;var X=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.subscript));e.Subscript=X;var J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(W(s.EditorToolsSettings.superscript));function Y(e){return v.createInsertImageTool(e)}e.Superscript=J,e.createInsertImageTool=Y;var Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Y(s.EditorToolsSettings.image));function Q(e){return g.LinkToolNS.createLinkTool(e)}e.InsertImage=Z,e.createLinkTool=Q;var ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Q(s.EditorToolsSettings.link));e.Link=ee;var te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Q(s.EditorToolsSettings.insertFile));function ne(e){return y.ListToolNS.createListTool(e)}e.InsertFile=te,e.createListTool=ne;var re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ne(s.EditorToolsSettings.orderedList));e.OrderedList=re;var oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ne(s.EditorToolsSettings.bulletList));function ie(e){return b.OutdentToolNS.createOutdentTool(e)}e.UnorderedList=oe,e.createOutdentTool=ie;var ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ie(s.EditorToolsSettings.outdent));function se(e){return k.TableEditNS.createAddRowBeforeTool(e)}function le(e){return k.TableEditNS.createAddRowAfterTool(e)}function ce(e){return k.TableEditNS.createAddColumnBeforeTool(e)}function ue(e){return k.TableEditNS.createAddColumnAfterTool(e)}function pe(e){return k.TableEditNS.createDeleteRowTool(e)}function de(e){return k.TableEditNS.createDeleteColumnTool(e)}function fe(e){return k.TableEditNS.createDeleteTableTool(e)}function he(e){return k.TableEditNS.createMergeCellsTool(e)}function me(e){return k.TableEditNS.createSplitCellTool(e)}e.Outdent=ae,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=se,e.createAddRowAfterTool=le,e.createAddColumnBeforeTool=ce,e.createAddColumnAfterTool=ue,e.createDeleteRowTool=pe,e.createDeleteColumnTool=de,e.createDeleteTableTool=fe,e.createMergeCellsTool=he,e.createSplitCellTool=me;var ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(se(s.EditorToolsSettings.addRowBefore));e.AddRowBefore=ve;var ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(le(s.EditorToolsSettings.addRowAfter));e.AddRowAfter=ge;var ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ce(s.EditorToolsSettings.addColumnBefore));e.AddColumnBefore=ye;var be=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ue(s.EditorToolsSettings.addColumnAfter));e.AddColumnAfter=be;var ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(pe(s.EditorToolsSettings.deleteRow));e.DeleteRow=ke;var we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(de(s.EditorToolsSettings.deleteColumn));e.DeleteColumn=we;var Ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(fe(s.EditorToolsSettings.deleteTable));e.DeleteTable=Ce;var Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(he(s.EditorToolsSettings.mergeCells));e.MergeCells=Oe;var xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(me(s.EditorToolsSettings.splitCell));function Se(e){return w.UnlinkToolNS.createUnlinkTool(e)}e.SplitCell=xe,e.createUnlinkTool=Se;var Ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Se(s.EditorToolsSettings.unlink));function Ie(e){return C.ViewHtmlToolNS.createViewHtmlTool(e)}e.Unlink=Ee,e.createViewHtmlTool=Ie;var Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(Ie(s.EditorToolsSettings.viewHtml));e.ViewHtml=Ne;var Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(I.FindAndReplace);e.FindAndReplace=Te}(t.EditorTools||(t.EditorTools={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(53);t.InsertTableToolNS=r.InsertTableToolNS;var o=n(35);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(7),c=n(8),u=n(3),p=n(6),d=n(35),f=n(4);!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,p.messages[y]),w=v.toLanguageString(b,p.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(d.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(8),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-state-disabled"+(s?" k-state-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(7),c=n(12),u=n(4),p=n(8),d=n(3),f=n(6),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=d.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},p.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 d.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(37),c=n(4),u=n(8),p=n(3),d=n(6);!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=p.provideLocalizationService(this);g&&g.localizationKey&&((g=i({},g)).text=g.localizationKey?b.toLanguageString(g.localizationKey,d.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 p.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(75),a=n(4),s=n(3),l=n(6);t.ApplyColorTool=function(e){var t=e.view,n=e.style,c=e.colorPickerProps,u=e.commandName,p=c.title,d=c.view,f=void 0===d?"palette":d,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:p?s.useLocalization().toLanguageString(p,l.messages[p]):p}))}},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(37),c=n(4),u=n(8),p=n(3),d=n(6);!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=p.provideLocalizationService(this);v&&v.localizationKey&&((v=i({},v)).text=v.localizationKey?b.toLanguageString(v.localizationKey,d.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 p.registerForLocalization(t),t}}(t.FormatBlockToolNS||(t.FormatBlockToolNS={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(36);!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(7),c=n(4),u=n(8),p=n(3),d=n(6);!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=p.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,d.messages[w]),disabled:!b},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return p.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(7),c=n(4),u=n(8),p=n(3),d=n(6);!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=p.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,d.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return p.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(4),c=n(7),u=n(8),p=n(20),d=n(3),f=n(6);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=d.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(p.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 d.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(7),c=n(4),u=n(8),p=n(20),d=n(3),f=n(6);!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=d.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(p.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 d.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(7),c=n(4),u=n(8),p=n(3),d=n(6);!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=p.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,d.messages[m])},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,C,{view:n}):C},n}(s.Component);return p.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(7),c=n(4),u=n(8),p=n(3),d=n(6);!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=p.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,d.messages[b]),disabled:!g},u.onDownPreventDefault,e.props,o));return r?r.call(void 0,k,{view:n}):k},n}(s.Component);return p.registerForLocalization(t),t}}(t.OutdentToolNS||(t.OutdentToolNS={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(36),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(7),c=n(4),u=n(8),p=n(3),d=n(6);!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=p.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,d.messages[v])},e.props,o));return r?r.call(void 0,g,{view:n}):g},n}(s.Component);return p.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(7),c=n(8),u=n(20),p=n(3),d=n(6);!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=p.provideLocalizationService(this),h=e.messages.viewHtml,m=[s.createElement(l.Button,i({onClick:this.toggleDialog,key:"viewHtml"},c.onDownPreventDefault,{title:f.toLanguageString(h,d.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 p.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(7),s=n(3),l=n(8),c=n(6),u=n(12).EditorToolsSettings.print;t.Print=function(e){var t=e.view,n=e.render,p=e.settings,d=void 0===p?u:p,f=o(e,["view","render","settings"]),h=t&&t.dom,m=h&&h.ownerDocument,v=m&&m.defaultView,g=d.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,d.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(7),s=n(3),l=n(77),c=n(8),u=n(6),p=n(12),d=p.EditorToolsSettings.pdf,f=p.EditorToolsSettings.savePdfOptions;t.Pdf=function(e){var t=e.view,n=e.render,p=e.settings,h=void 0===p?d:p,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(7),s=n(3),l=n(8),c=n(6),u=n(4),p=n(12).EditorToolsSettings.selectAll;t.SelectAll=function(e){var t=e.view,n=e.render,d=e.settings,f=void 0===d?p:d,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(7),s=n(3),l=n(8),c=n(6),u=n(4),p=n(12).EditorToolsSettings.cleanFormatting,d=u.cleanFormatting();t.CleanFormatting=function(e){var t=e.view,n=e.render,u=e.settings,f=void 0===u?p:u,h=o(e,["view","render","settings"]),m=f.messages.title,v=i.useCallback((function(){t&&d(t.state,(function(e){e.setMeta("commandName",f.commandName),t.dispatch(e)}))}),[t]),g=i.createElement(a.Button,r({onClick:v,disabled:!t||!d(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(7),c=n(34),u=n(8),p=n(6),d=n(12),f=n(3),h=d.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),d=h.messages.findReplaceToolTitle;return[s.createElement(l.Button,i({onClick:this.onOpen},u.onDownPreventDefault,{disabled:!t,title:o.toLanguageString(d,p.messages[d]),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";n.r(t),n.d(t,"TabStrip",(function(){return I})),n.d(t,"TabStripContent",(function(){return w})),n.d(t,"TabStripNavigation",(function(){return d})),n.d(t,"TabStripNavigationItem",(function(){return c})),n.d(t,"TabStripTab",(function(){return T})),n.d(t,"PanelBar",(function(){return U})),n.d(t,"PanelBarItem",(function(){return P})),n.d(t,"renderChildren",(function(){return j})),n.d(t,"getInitialState",(function(){return A})),n.d(t,"flatVisibleItems",(function(){return F})),n.d(t,"isPresent",(function(){return B})),n.d(t,"PanelBarUtils",(function(){return L})),n.d(t,"isArrayEqual",(function(){return V})),n.d(t,"Menu",(function(){return Ue})),n.d(t,"MenuItemLink",(function(){return _e})),n.d(t,"MenuItem",(function(){return ie})),n.d(t,"downArrowClass",(function(){return Re})),n.d(t,"rightArrowClass",(function(){return je})),n.d(t,"leftArrowClass",(function(){return Ae})),n.d(t,"MenuItemArrow",(function(){return Fe})),n.d(t,"Splitter",(function(){return nt})),n.d(t,"SplitterPane",(function(){return Ge})),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 Ct})),n.d(t,"DrawerNavigation",(function(){return kt})),n.d(t,"DrawerContent",(function(){return Ot})),n.d(t,"DrawerItem",(function(){return vt})),n.d(t,"Stepper",(function(){return Vt})),n.d(t,"Step",(function(){return _t})),n.d(t,"AppBar",(function(){return Kt})),n.d(t,"AppBarSection",(function(){return $t})),n.d(t,"AppBarSpacer",(function(){return Ut})),n.d(t,"TileLayout",(function(){return on})),n.d(t,"BottomNavigation",(function(){return dn})),n.d(t,"BottomNavigationItem",(function(){return un})),n.d(t,"StackLayout",(function(){return vn})),n.d(t,"GridLayout",(function(){return bn})),n.d(t,"GridLayoutItem",(function(){return Cn})),n.d(t,"Breadcrumb",(function(){return _n})),n.d(t,"BreadcrumbOrderedList",(function(){return Tn})),n.d(t,"BreadcrumbListItem",(function(){return On})),n.d(t,"BreadcrumbDelimiter",(function(){return Sn})),n.d(t,"BreadcrumbLink",(function(){return In}));var r,o=n(0),i=n(1),a=n(19),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.active,r=t.disabled,i=t.title,s=void 0===i?"Untitled":i,c=t.first,u=t.last,p={"aria-selected":n,role:"tab",onClick:r?void 0:this.onClick},d=Object(a.a)("k-item",((e={})["k-first"]=c,e["k-last"]=u,e["k-state-disabled"]=r,e["k-state-active"]=n,e));return o.createElement("li",l({},p,{className:d}),o.createElement("span",{className:"k-link"},s))},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)}}(),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)},d=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,d=o.Children.count(s),f=o.Children.toArray(s);s&&(e=(t=d,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,p({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(24),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(82),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-state-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,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(81),O=n(30),x={name:"@progress/kendo-react-layout",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167833,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",{ref:function(t){return e._element=t},dir:this.props.dir,className:l,style:this.props.style},!s&&o.createElement(d,E({},t,{tabIndex:i})),this.renderContent(t),s&&o.createElement(d,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),D=n(89),M=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)}}(),_=function(){return(_=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 P=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,_({},e.props,{in:n.props.expanded})):e},n.state={show:t.expanded},n}return M(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,p=n.focused,d=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&&!d,"aria-selected":!c&&u,"aria-expanded":!c&&d&&!!i},b=Object(a.a)("k-item",{"k-panelbar-header":0===h,"k-panelbar-item":0!==h,"k-state-expanded":d&&!!i},"k-level-"+h,f),k=Object(a.a)("k-link",{"k-state-selected":!c&&u,"k-state-focus":!c&&p,"k-state-disabled":c},m),w=Object(a.a)("k-panelbar-toggle","k-icon",((e={})["k-i-arrow-chevron-up"]=d&&!!i,e["k-panelbar-collapse"]=d&&!!i,e["k-i-arrow-chevron-down"]=!d&&!!i,e["k-panelbar-expand"]=!d&&!!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&&d||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(D.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",_({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),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)},j=function(e,t,n,r,i,a,s,l){return void 0===e&&(e=!0),void 0===t&&(t=!1),void 0===a&&(a=!0),void 0===s&&(s=0),void 0===l&&(l=[]),o.Children.map(i,(function(i,c){if(i&&i.type===P){var u=void 0,p=l.length?l[l.length-1]+"."+c:"."+c;return i.props.children&&(u=j(e,t,n,r,i.props.children,(n.expanded||[]).indexOf(p)>-1,s+1,l.concat([p]))),o.cloneElement(i,R({},i.props,{animation:void 0!==i.props.animation?i.props.animation:e,keepItemsMounted:t,id:i.props.id||"k-panelbar-item-default-"+p,uniquePrivateKey:p,parentUniquePrivateKey:l,parentExpanded:a,level:s,expanded:(n.expanded||[]).indexOf(p)>-1,focused:n.focused===p&&n.wrapperFocused,selected:n.selected===p,children:u,onSelect:r}))}return o.createElement("div",{className:"k-panelbar-content k-content"},i)}))},A=function(e,t,n,r,i,a){return void 0===n&&(n={expanded:e.expanded||[],selected:e.selected||"",focused:e.focused||".0",wrapperFocused:!1}),void 0===r&&(r=!0),void 0===i&&(i=!0),void 0===a&&(a=[]),o.Children.map(e.children,(function(e,r){if(e&&e.type===P){var o=a.length?a[a.length-1]+"."+r:"."+r;!e.props.disabled&&i&&(e.props.selected&&(n.selected=o),e.props.focused&&(n.focused=o),e.props.expanded&&("multiple"===t?n.expanded.push(o):"single"===t&&(n.expanded=[o])),e.props.children&&(n=A(e.props,t,n,!1,!!e.props.expanded,a.concat([o]))))}})),n};function F(e,t,n){return void 0===t&&(t=[]),void 0===n&&(n=null),(e||[]).forEach((function(e){e.disabled||(t.push(e),e.expanded&&e.children&&F(e.children,t))})),t}var L,B=function(e){return null!=e};(L||(L={})).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(P,R({},t,{children:r,key:t.id||n}))}))};var z,V=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))},H=function(){function e(e,t,n){var r=this;this.flatChildren=function(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&&r.flatChildren(e.props.children,t))})),t},this.flatVisibleChildren=function(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&&r.flatVisibleChildren(e.props.children,t))})),t},this.onSelect=e,this.onFocus=t,this.expandMode=n}return e.prototype.select=function(e,t,n){var r,i;switch(this.flatChildren(o.Children.toArray(t)).forEach((function(t){t.props.uniquePrivateKey===e&&(r=t)})),this.expandMode){case"single":i=r.props.parentUniquePrivateKey.concat([r.props.uniquePrivateKey]),V(n,i)&&(i=r.props.parentUniquePrivateKey?r.props.parentUniquePrivateKey.slice():[]);break;case"multiple":var a=(i=n.slice()).indexOf(r.props.uniquePrivateKey);-1===a?i.push(r.props.uniquePrivateKey):i.splice(a,1);break;default:i=n.slice()}this.onSelect(r,i)},e.prototype.focus=function(e,t,n){var r,i=this.flatVisibleChildren(o.Children.toArray(n));i.forEach((function(n,o){if(n.props.uniquePrivateKey===e){var a=o+t<0?0:o+t>=i.length?i.length-1:o+t;r=i[a]}})),this.onFocus(r)},e.prototype.setExpandMode=function(e){this.expandMode=e},e}();!function(e){e[e.Toggle=0]="Toggle",e[e.Next=1]="Next",e[e.Previous=2]="Previous"}(z||(z={}));var K=function(){function e(e){this.onNavigate=e}return e.prototype.navigate=function(e,t){var n;switch(e.keyCode){case C.a.left:n=t?z.Next:z.Previous;break;case C.a.up:n=z.Previous;break;case C.a.right:n=t?z.Previous:z.Next;break;case C.a.down:n=z.Next;break;case C.a.space:case C.a.enter:n=z.Toggle;break;default:n=null}null!==n&&(e.preventDefault(),this.onNavigate(n))},e}(),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)}}(),$=function(){return($=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(e){function t(t){var n=e.call(this,t)||this;return n._element=null,n.handleSelect=function(e){var t=$({},n.state,{selected:n.selected});n._selectionService.select(e.uniquePrivateKey,j(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children),t.expanded),n._selectionService.focus(e.uniquePrivateKey,0,j(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children))},n.onSelect=function(e,t){n.setState({selected:e.props.uniquePrivateKey,expanded:t},(function(){n.props.onSelect&&n.props.onSelect.call(void 0,{target:e,action:"select"})}))},n.onFocus=function(e){n.activeDescendant=e.props.id,n.setState({focused:e.props.uniquePrivateKey})},n.onNavigate=function(e){var t=$({},n.state,{selected:n.selected});switch(e){case z.Previous:n._selectionService.focus(t.focused,-1,j(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children));break;case z.Next:n._selectionService.focus(t.focused,1,j(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children));break;case z.Toggle:n._selectionService.select(t.focused,j(n.props.animation,n.props.keepItemsMounted,t,n.handleSelect,n.props.children),t.expanded)}},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;e.target===e.currentTarget&&n._navigationService.navigate(e,t)},Object(O.a)(x),n.state=A(t,t.expandMode||"multiple"),n._selectionService=new H(n.onSelect,n.onFocus,n.props.expandMode||"multiple"),n._navigationService=new K(n.onNavigate),n}return W(t,e),Object.defineProperty(t.prototype,"selected",{get:function(){var e=this.props.selected;return void 0===e?this.state.selected:e},enumerable:!0,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t=this.props;t.expandMode!==e.expandMode&&this._selectionService.setExpandMode(t.expandMode)},t.prototype.render=function(){var e=this,t={"aria-activedescendant":this.activeDescendant},n=$({},this.state,{selected:this.selected}),r=j(this.props.animation,this.props.keepItemsMounted,n,this.handleSelect,this.props.children),i=Object(a.a)("k-panelbar",this.props.className);return o.createElement("ul",$({ref:function(t){e._element=t},dir:this.props.dir,role:"tree",tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,className:i,style:this.props.style},t),r)},t.prototype.nextTick=function(e){clearTimeout(this.nextTickId),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!==P)return new Error("PanelBar children should be either PanelBarItem or Array of PanelBarItem.")}else if(n.type!==P)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),q=n(83);function G(e,t){if(ee(e))return t[Number(e)];var n=t[Number(X(e))];return n.items?G(function(e){if(Q(e))return e;var t=e.indexOf("_");return e.substring(t+1)}(e),n.items):void 0}function X(e){return Q(e)?e:e.split("_")[0]}function J(e){return Y("0",e)}function Y(e,t){return t?t+"_"+e:e}function Z(e){var t=e.lastIndexOf("_");return t<0?"":e.substring(0,t)}function Q(e){return""===e||e.indexOf("_")<0}function ee(e){return""!==e&&e.indexOf("_")<0}function te(e){return 1===function(e){return e.split("_").length-1}(e)}function ne(e){var t=e.lastIndexOf("_");return t<0?e:e.substring(t+1)}function re(e,t,n){return ee(t)?e?Number(t)<n-1?(Number(t)+1).toString():"0":Number(t)>0?(Number(t)-1).toString():(n-1).toString():t}var oe=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(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oe(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 ae(e,t){if(e&&e.length>0)return{items:ce(e),inputItems:e};if(le(t).length>0){var n=function e(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=se(void 0,o),a=e(le(o.props.children));a.length>0&&(i.items=a),n.push(i)}return n}(le(t));return{items:ce(n),inputItems:n}}return{items:[],inputItems:[]}}function se(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,p=r.linkRender,d=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!==p&&(n.linkRender=p),void 0!==d&&(n.contentRender=d),void 0!==f&&(n.data=f),n}function le(e){return o.Children.toArray(e).filter((function(e){return e&&e.type===ie}))}function ce(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r],i=se(o);i.id=Y(r.toString(),t),i.isLastFromSiblings=r===e.length-1,i.items=ue(o,i),n.push(i)}return n}function ue(e,t){return e.contentRender?[{contentParentItemId:t.id,id:Y("0",t.id),isLastFromSiblings:!0,contentRender:e.contentRender,items:[]}]:e.items?ce(e.items,t.id):[]}var pe=/\S/;function de(e,t,n,r,o,i){var a,s=h();switch(n){case C.a.left:return o?i?p():c():i?u():l();case C.a.right:return o?i?c():p():i?l():u();case C.a.up:return o?v():ee(t)?f():v();case C.a.down:return o?g():ee(t)?d():g();case C.a.enter:case C.a.space:return s.disabled?t:m()?J(t):X(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 ee(t)?t:Z(t);default:return 1===r.length&&pe.test(r)?function(){var e=r.toLowerCase(),n=y(),o=Number(ne(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 ee(t)?v():te(t)?d(v(X(t))):Z(t)}function c(){return ee(t)?f():Z(t)}function u(){return ee(t)?g():d(m()?t:g(X(t)))}function p(){return d(ee(t)||m()?t:g(X(t)))}function d(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),G(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 ee(t)?e:h(Z(t),e).items}function b(e,n){void 0===n&&(n=t);var r=h(n);return m(n)&&!r.disabled?e?J(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),ee(r))return re(n,r,e.length);var o=Z(r);return Y(re(n,ne(r),h(o).items.length),o)}}var fe=n(28),he={vertical:"top",horizontal:"left"},me={vertical:"top",horizontal:"right"},ve={vertical:"flip",horizontal:"fit"},ge={vertical:"fit",horizontal:"flip"},ye={downward:{anchorAlign:{vertical:"bottom",horizontal:"right"},popupAlign:me,collision:ve},leftward:{anchorAlign:{vertical:"top",horizontal:"left"},popupAlign:me,collision:ge}},be={downward:{anchorAlign:{vertical:"bottom",horizontal:"left"},popupAlign:he,collision:ve},rightward:{anchorAlign:{vertical:"top",horizontal:"right"},popupAlign:he,collision:ge}};function ke(e,t,n){return ee(e)?t?n?"leftward":"rightward":"downward":n?"leftward":"rightward"}function we(e){return e?"rtl":"ltr"}function Ce(e,t){return e+"_"+t}var Oe,xe,Se,Ee,Ie,Ne,Te,De,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)}}(),_e=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Me(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-state-active":this.props.opened})},t.propTypes={opened:i.bool,url:i.string},t}(o.Component),Pe=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)}}(),Re="k-i-arrow-60-down",je="k-i-arrow-60-right",Ae="k-i-arrow-60-left",Fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pe(t,e),t.prototype.render=function(){return o.createElement("span",{className:this.getArrowClassName(),role:"presentation"})},t.prototype.getArrowClassName=function(){var e,t=ke(this.props.itemId,!0===this.props.verticalMenu,"rtl"===this.props.dir);return Object(a.a)("k-icon","k-menu-expand-arrow",((e={})[Re]="downward"===t,e[je]="rightward"===t,e[Ae]="leftward"===t,e))},t.propTypes={itemId:i.string,dir:i.string,verticalMenu:i.bool},t}(o.Component),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)}}(),Be=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 Le(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("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?Ce(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:we(this.props.isDirectionRightToLeft)});var t=this.itemRender?o.createElement(this.itemRender,{item:this.props.onOriginalItemNeeded(e.id),itemId:e.id,key:"1"}):e.text;return o.createElement(_e,{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=ke(e,t,n);return n?"downward"===r?ye.downward:ye.leftward:"downward"===r?be.downward:be.rightward}(e,this.props.isMenuVertical,this.props.isDirectionRightToLeft),n=t.anchorAlign,r=t.popupAlign,i=t.collision;return o.createElement(fe.a,{anchor:this.itemElement,show:!0,popupClass:this.getPopupClassName(),anchorAlign:n,popupAlign:r,collision:i,animate:!1,key:"1"},o.createElement(Ve,{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(Fe,{itemId:this.props.item.id,verticalMenu:this.props.isMenuVertical,dir:we(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"===ne(t)),"k-last":e.isLastFromSiblings,"k-state-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)}}(),Ve=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?Ce(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(Be,{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),He=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}(),Ke=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}(),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)}}(),$e={focusedItemId:"",hoveredItemId:"",tabbableItemId:"0"},Ue=function(e){function t(t){var n=e.call(this,t)||this;return n.guid=Object(y.a)(),n.directionHolder=new He,n.reset=function(){n.clearItemHoverAndLeaveRequestsIfApplicable(),n.setState($e)},n.onKeyDown=function(e){if(""!==n.state.focusedItemId){var t=G(n.state.focusedItemId,n.items),r=de(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=G(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 G(e,n.inputItems)},Object(O.a)(x),n.mouseOverHandler=new Ke(n.props.openOnClick,n.reset,n.onItemMouseOver),n.state=Object.assign({},$e,{isFirstRender:!0}),n}return We(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?Z(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(Ve,{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:X(e);return{hoveredItemId:""===e||Q(t.hoveredItemId)&&Q(e)?t.hoveredItemId:"",focusedItemId:e,tabbableItemId:n}}))},t.prototype.setHoveredItemId=function(e){this.setState((function(t){return Q(e)&&Q(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=ae(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(q.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),qe=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)}}(),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qe(t,e),t.prototype.render=function(){var e,t=this.props,n=t.size,r=t.collapsed,i=t.overlay,s=t.containsSplitter,l=t.collapsible,c=t.resizable,u=t.scrollable,p=t.keepMounted,d=n&&n.length>0,f={flexBasis:n},h=Object(a.a)("k-pane",((e={})["k-state-hidden"]=r,e.hidden=r,e["k-pane-flex"]=s,e["k-pane-static"]=!c&&!l||d,e["k-scrollable"]=u,e));return o.createElement("div",{style:f,className:h},!r||p?this.props.children:void 0,i?o.createElement("div",{className:"k-splitter-overlay k-overlay"}):void 0)},t}(o.Component),Xe=n(88),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(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 Je(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-state-focused"]=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(Xe.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),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)}}(),Qe=function(){return(Qe=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)},et=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},tt={collapsible:!1,collapsed:!1,resizable:!0,scrollable:!0},nt=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,p=t[c];o.isValidElement(p)&&(u="Splitter"===p.type.displayName);var d=!1;s&&void 0!==a&&(d=a===c||a+1===c),l.push(Qe({},tt,{orientation:r,containsSplitter:u,overlay:d},(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(Ye,{key:l,index:i,orientation:r.orientation,prev:r,next:c,onDrag:n.onBarDragResize,onToggle:n.onBarToggle,onKeyboardResize:n.onBarKeyboardResize})}return[o.createElement(Ge,Qe({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?Qe({},o,{collapsed:!t.collapsed}):Qe({},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,p=c.nextElement;if(u&&p)if(o)n.setState({isDragging:!0,dragIndex:r,startTime:a,originalX:s,originalY:l,originalPrevSize:n.elementSize(u),originalNextSize:n.elementSize(p)});else{var d,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 d="vertical"===n.orientation?l-y:n.isRtl?g-s:s-g,n.resize(r,r+1,h,m,d,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 Ze(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),p=u[e],d=u[t],f=n+r,h=this.containerSize(),m=function(e){return c.toPixels(e,h)},v={index:e,initialSize:n,min:m(p.min)||f-m(d.max)||0,max:m(p.max)||f-m(d.min)||f},g={index:t,initialSize:r,min:m(d.min)||f-m(p.max)||0,max:m(d.max)||f-m(p.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(p.size)&&this.fixedSize(d.size)?(s=y(v,o),l=y(g,-o)):d.collapsible||this.fixedSize(d.size)?l=y(g,-o):s=y(v,o);var b=u.map((function(n,r){var o=c.getPaneProps(n);return r===e?Qe({},o,{size:s}):r===t?Qe({},o,{size:l}):Qe({},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 et(e,["orientation","overlay","containsSplitter"])},t.displayName="Splitter",t}(o.Component);!function(e){e.CIRCLE="circle",e.SQUARE="square",e.ROUNDED="rounded",e.RECTANGLE="rectangle"}(Oe||(Oe={})),function(e){e.TEXT="text",e.IMAGE="image",e.ICON="icon"}(xe||(xe={})),function(e){e.SMALL="small",e.MEDIUM="medium",e.LARGE="large"}(Se||(Se={})),function(e){e.SOLID="solid",e.OUTLINE="outline"}(Ee||(Ee={})),function(e){e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error",e.DARK="dark",e.LIGHT="light",e.INVERSE="inverse",e.INHERIT="inherit"}(Ie||(Ie={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(Ne||(Ne={})),function(e){e.DEFAULT="default",e.primary="primary",e.INFO="info",e.SUCCESS="success",e.WARNING="warning",e.ERROR="error"}(Te||(Te={})),function(e){e.START="start",e.CENTER="center",e.END="end",e.STRETCHED="stretched"}(De||(De={}));var rt=function(e){var t;return Object(O.a)(x),o.createElement("div",{dir:e.dir,style:e.style,className:Object(a.a)("k-card",e.className,(t={},t["k-card-"+e.type]=e.type!==Te.DEFAULT,t),e.orientation!==Ne.HORIZONTAL?"k-card-vertical":"k-card-horizontal")},e.children)};rt.propTypes={className:i.string,type:i.oneOf(["default","primary","info","success","warning","error"]),orientation:i.oneOf(["horizontal","vertical"])},rt.defaultProps={type:Te.DEFAULT,orientation:Ne.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!==Ne.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:De.START,orientation:Ne.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 pt=function(e){return Object(O.a)(x),o.createElement("div",{style:e.style,className:Object(a.a)("k-avatar","k-avatar-"+e.fill,"k-avatar-"+e.shape,"k-avatar-"+e.themeColor,{"k-avatar-bordered":e.border,"k-avatar-sm":"small"===e.size,"k-avatar-md":"medium"===e.size,"k-avatar-lg":"large"===e.size},e.className)},o.createElement("span",{className:"k-avatar-"+e.type},e.children))};pt.propTypes={className:i.string,shape:i.oneOf(["circle","square","rounded","rectangle"]),type:i.oneOf(["text","image","icon"]),fill:i.oneOf(["solid","outline"]),size:i.oneOf(["small","medium","large"]),themeColor:i.oneOf(["primary","secondary","tertiary","info","success","warning","error","dark","light","inverse","inherit"])},pt.defaultProps={type:xe.TEXT,shape:Oe.SQUARE,size:Se.MEDIUM,fill:Ee.SOLID,themeColor:Ie.PRIMARY};var dt=o.createContext({animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50}),ft=n(86),ht=function(){return(ht=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)},mt=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},vt=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,p=e.onSelect,d=e.index,f=e.tabIndex,h=e.children,m=mt(e,["className","style","text","icon","separator","disabled","selected","onSelect","index","tabIndex","children"]),v=o.useContext(dt),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-state-selected":u,"k-state-disabled":c},n),O=o.useCallback((function(){if(p&&!c){var t={element:k.current,focus:w,props:e};p(t,d)}}),[p,d,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",ht({ref:k,className:C,style:r,role:"option","aria-selected":u,"aria-disabled":c,onClick:O,tabIndex:Object(ft.a)(f,c)},m),b?h:x)}));vt.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},vt.displayName="KendoDrawerItem";var gt=function(){return(gt=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={type:"slide",duration:200},bt={type:"slide",duration:0},kt=o.forwardRef((function(e,t){var n=e.children,r=e.className,i=e.style,s=o.useContext(dt),l=s.animation,c=s.expanded,u=s.mode,p=s.position,d=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?bt:yt,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"===p,"k-drawer-end":"end"===p},r)}),[p]),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"},D={opacity:0,transform:"translateX(100%)",WebkitTransition:"all "+(C&&C.duration)+"ms",transition:"all "+(C&&C.duration)+"ms"},M={transform:"translateX(0%)",WebkitTransitionDuration:(C&&C.duration)+"ms",transitionDuration:(C&&C.duration)+"ms"},_=c?"push"===u?E:I:"push"===u?N:"ltr"===h&&"start"===p||"rtl"===h&&"end"===p?f?M:T:f?M:D,P=g&&o.createElement("ul",{className:"k-drawer-items",role:"listbox","aria-label":"drawer-list","aria-expanded":c},g.map((function(e,t){var n=gt({index:t},e,{onSelect:b}),r=y||vt;return o.createElement(r,gt({key:t},n))}))),R=o.createElement("div",{style:C?gt({},_,i):i,className:S,ref:k},o.createElement("div",{className:"k-drawer-wrapper",style:!c&&f&&"overlay"===u?{width:x}:{width:O}},P||n));return"overlay"===u?o.createElement(o.Fragment,null,c&&o.createElement("div",{className:"k-overlay",onClick:d}),R):R}));kt.propTypes={children:i.any,className:i.string,style:i.object,item:i.any,tabIndex:i.number},kt.displayName="KendoDrawerNavigation";var wt=n(85),Ct=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,p=e.mini,d=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(wt.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":p},s);return o.createElement(dt.Provider,{value:{animation:u,expanded:n,mode:r,position:i,mini:p,dir:C,items:h,item:m,width:d,miniWidth:f,onOverlayClick:g,onSelect:w}},o.createElement("div",{className:S,ref:b,dir:C,style:c,tabIndex:v},h&&o.createElement(kt,null),l))}));Ct.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};Ct.defaultProps={animation:!0,expanded:!1,mode:"overlay",position:"start",mini:!1,dir:"ltr",width:240,miniWidth:50},Ct.displayName="KendoDrawer";var Ot=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)}));Ot.propTypes={children:i.any,className:i.string,style:i.object},Ot.displayName="KendoDrawerContent";var xt,St=o.createContext({linear:!1,mode:"steps",value:0}),Et=n(90),It=n(91),Nt=n(3),Tt=((xt={})["stepper.optionalText"]="(Optional)",xt),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)},Mt=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,p=e.isValid,d=e.label,f=e.optional,h=e.style,m=e.tabIndex,v=e.text,g=Mt(e,["children","className","current","disabled","focused","icon","index","isValid","label","optional","style","tabIndex","text"]),y=o.useContext(St),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,D=o.useRef(null),M=o.useCallback((function(){D.current&&Object(Et.a)(D.current)}),[]),_=o.useCallback((function(){return{element:D.current,focus:M}}),[M]);o.useImperativeHandle(t,_);var P,R=!C||u===S-1||u===S||u===S+1,j="labels"===O||Boolean(c)&&Boolean(d),A=Object(Nt.useLocalization)(),F=(P="stepper.optionalText",A.toLanguageString(P,Tt[P])),L="number"==typeof b?b:!1!==b?400:0,B=o.useCallback((function(e){N&&!s&&Object(q.a)(N,e,_(),{value:u})}),[N,S,s]),z=o.useCallback((function(e){T&&!s&&Object(q.a)(T,e,_(),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!==p&&!p,"k-step-success":p},r)}),[u,x,S,i,f,s,l,p,r]),H=o.useMemo((function(){return Dt({maxWidth:k?void 0:"calc(100% / "+x+")",pointerEvents:R?void 0:"none"},h)}),[k,x,h,R]),K=p?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:L+"ms"}},c?j||void 0===p?o.createElement("span",{className:"k-step-indicator-icon k-icon "+c}):W:void 0!==p?W:o.createElement("span",{className:"k-step-indicator-text"},v||u+1)):null),U=o.createElement("span",{className:"k-step-label"},d&&o.createElement("span",{className:"k-step-text"},d),j&&void 0!==p&&W,f&&o.createElement("span",{className:"k-step-label-optional"},F)),G=o.createElement(o.Fragment,null,$,U);return o.createElement("li",Dt({ref:D,className:V,style:H},g),o.createElement("a",{className:"k-step-link",title:d||void 0,onClick:B,onFocus:z,tabIndex:m||(l?0:-1),"aria-current":i?"step":void 0,"aria-disabled":s||!R||void 0,"aria-invalid":void 0!==p&&!p||void 0},w?n:G))}));_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 Pt=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)},jt=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%")},At={name:"@progress/kendo-react-progressbars",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167792,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"},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)},Lt=o.forwardRef((function(e,t){Object(O.a)(At);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,p=e.max,d=void 0===p?Bt.max:p,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,D=Object(It.a)(C,e.dir),M="vertical"===l,_=function(e){var t=e.toString().split(".");return 1===t.length?""+t[0]:t[0]+"."+t[1].substr(0,3)}(I),P={value:I},R=c?e.label?o.createElement("span",{className:"k-progress-status"},o.createElement(e.label,Ft({},P))):o.createElement("span",{className:"k-progress-status"},_):void 0,j={className:Object(a.a)("k-widget k-progressbar",{"k-progressbar-horizontal":!M,"k-progressbar-vertical":M,"k-progressbar-reverse":s,"k-progressbar-indeterminate":T,"k-state-disabled":r},v),ref:C,dir:D,tabIndex:Object(ft.a)(m,r),role:"progressbar","aria-valuemin":h,"aria-valuemax":d,"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,L=o.useCallback((function(){var e=Rt(h,d,N);jt(x,S,e,M)}),[M,d,h,N]),B=o.useCallback((function(e){var t=Rt(h,d,N+(I-N)*e);jt(x,S,t,M)}),[h,d,N,I,M]),z=o.useCallback((function(){var e=Rt(h,d,I);jt(x,S,e,M)}),[M,d,h,I]);return Pt({duration:F,onStart:L,onUpdate:B,onEnd:z},[I,F]),o.createElement("div",Ft({},j),o.createElement("span",{className:A+(b?" "+b:""),style:y},R),o.createElement("div",{className:"k-state-selected",style:k,ref:x},o.createElement("span",{className:A+(w?" "+w:""),ref:S},R)))}));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 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)},Vt=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,p=e.linear,d=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(Et.a)(y.current)}),[]),k=o.useCallback((function(){return{element:y.current,focus:b}}),[b]);o.useImperativeHandle(t,k);var w=e.value||Ht.value,S=o.useState(w),E=S[0],I=S[1],N=u?u.length:0,T="vertical"===f,D=Object(It.a)(y,e.dir),M="number"==typeof n?n:!1!==n?400:0,_=o.useCallback((function(e,t){w!==t&&v&&!s&&(!p||t===w-1||t===w||t===w+1)&&(Object(q.a)(v,e,k(),{value:t}),I(t))}),[w,p,v,s,I]),P=o.useCallback((function(e){var t=e.value,n=e.syntheticEvent;_(n,t)}),[_]),R=o.useCallback((function(e){g&&!s&&Object(q.a)(g,e.syntheticEvent,k(),void 0)}),[g,s]),j=o.useCallback((function(e){_(e,E)}),[_,E]),A=o.useCallback((function(e){var t="rtl"===D,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||j(e)}}),[u,I,E,D,j]),F=o.useMemo((function(){return Object(a.a)("k-stepper",{"k-stepper-linear":p},i)}),[p,i]),L=o.useMemo((function(){return zt({display:"grid",gridTemplateColumns:T?void 0:"repeat("+2*N+", 1fr)",gridTemplateRows:T?"repeat("+4*N+", 1fr)":void 0},h)}),[T,N,h]),B=o.useMemo((function(){return Object(a.a)("k-step-list",{"k-step-list-horizontal":!T,"k-step-list-vertical":T})}),[T]),z=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?2:void 0,gridRowEnd:T?4*N-2:void 0}}),[T,N]),H=u&&u.map((function(e,t){var n=zt({index:t,disabled:s||e.disabled,focused:t===E,current:t===w},e),r=c||_t;return o.createElement(r,zt({key:t},n))}));return o.createElement(St.Provider,{value:{animationDuration:n,isVertical:T,item:c,linear:p,mode:d,numOfSteps:N,value:w,successIcon:m,errorIcon:l,onChange:P,onFocus:R}},o.createElement("nav",{className:F,style:L,dir:D,onKeyDown:A},o.createElement("ol",{className:B,style:z},H||r),o.createElement(Lt,{style:V,animation:{duration:M},"aria-hidden":!0,max:N-1,labelVisible:!1,orientation:f,reverse:"vertical"===f,value:w,disabled:s,tabIndex:-1})))}));Vt.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 Ht={value:0};Vt.defaultProps=Ht,Vt.displayName="KendoStepper";var Kt=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(Et.a)(l.current)}),[]),u=o.useCallback((function(){return{element:l.current,focus:c}}),[c]);o.useImperativeHandle(t,u);var p=o.useMemo((function(){return Object(y.a)()}),[]),d=o.useMemo((function(){return e.themeColor||Wt.themeColor}),[e.themeColor]),f=o.useMemo((function(){return e.position||Wt.position}),[e.position]),h=o.useMemo((function(){return e.positionMode||Wt.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"===d,"k-appbar-dark":"dark"===d,"k-appbar-inherit":"inherit"===d},r)}),[f,h,d,r]);return o.createElement("div",{className:m,style:i,id:s||p},n)}));Kt.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 Wt={themeColor:"light",position:"top",positionMode:"static"};Kt.displayName="KendoAppBar";var $t=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(Et.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)}));$t.propTypes={children:i.any,className:i.string,style:i.object},$t.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(Et.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]),p=o.useMemo((function(){return{flexBasis:i&&i.width?i.width:void 0}}),[i]);return o.createElement("span",{className:u,style:p},n)}));Ut.propTypes={children:i.any,className:i.string,style:i.object},Ut.displayName="KendoAppBarSpacer";var qt=n(93),Gt=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)}}(),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=function(e){return o.createElement(Xe.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:Xt({bottom:0,right:0},e.style)}))},Yt=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 Gt(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(Jt,{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(Jt,{onPress:n,onResize:this.handleResize,d:"ns",style:{left:0,height:9}}),!0===t&&o.createElement(Jt,{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),Zt=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)}}(),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){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 Zt(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=Qt({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:Qt({height:"100%"},this.props.style)},this.props.children,o.createElement(Yt,{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(Xe.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),tn=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)}}(),nn=function(){return(nn=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)},rn={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"},on=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 p=l.colSpan+i;i&&p>=1&&p+l.col<=(t.props.columns||3)+1&&(l.colSpan=p,a=!0);var d=l.rowSpan+o;o&&d>=1&&(l.rowSpan=d,a=!0),a&&(t.setState({positions:s}),Object(q.a)(t.props.onReposition,{},t,{value:s}))}},t}return tn(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,p=void 0===u?"1fr":u,d=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=nn({gridTemplateColumns:"repeat("+i+", minmax(0px, "+("number"==typeof l?l+"px":l)+"))",gridAutoRows:"minmax(0px, "+("number"==typeof p?p+"px":p)+")",gap:g,padding:g},d);return o.createElement("div",{ref:function(t){e._element=t},dir:this.props.dir,className:Object(a.a)("k-tilelayout",rn[h],n),style:y,id:this.props.id,children:v.map((function(t,n){return o.createElement(en,{key:e.props.dataItemKey?Object(qt.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),an={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"},sn={flat:"k-bottom-nav-flat",solid:"k-bottom-nav-solid"},ln={vertical:"k-bottom-nav-item-flow-vertical",horizontal:"k-bottom-nav-item-flow-horizontal"},cn={fixed:"k-pos-fixed",sticky:"k-pos-sticky"},un=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,p=e.dataItem,d=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-state-selected":s,"k-state-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:p}):o.createElement(o.Fragment,null,d&&o.createElement("span",{className:"k-bottom-nav-item-icon k-icon k-i-"+d}),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}));un.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},un.defaultProps={tabIndex:0},un.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)},dn=o.forwardRef((function(e,t){Object(O.a)(x);var n=o.useRef(null),r=o.useCallback((function(){n.current&&Object(Et.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?fn.themeColor:s,c=e.fill,u=void 0===c?fn.fill:c,p=e.positionMode,d=void 0===p?fn.positionMode:p,f=e.itemFlow,h=void 0===f?fn.itemFlow:f,m=e.border,v=void 0===m?fn.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,D=o.useMemo((function(){return Object(y.a)()}),[]),M=Object(wt.a)(n,e.dir),_=o.useMemo((function(){return Object(a.a)("k-bottom-nav",cn[d],an[l],sn[u],ln[h],{"k-bottom-nav-border":v,"k-state-disabled":S},g)}),[d,l,u,h,v,S,g]),P=o.useCallback((function(e,t){b&&!b[t].disabled&&N&&Object(q.a)(N,e,i(),{itemTarget:b[t],itemIndex:t})}),[b,N]),R=o.useCallback((function(e,t){P(e,t)}),[P]),j=o.useCallback((function(e,t){switch(e.keyCode){case C.a.enter:case C.a.space:P(e,t),e.preventDefault()}Object(q.a)(T,e,i(),void 0)}),[P,T]);return o.createElement("nav",{ref:n,className:_,style:E,id:I||D,dir:M},b&&b.map((function(e,t){return o.createElement(un,pn({},e,{key:t,index:t,id:(I||D)+"-"+t,disabled:S||e.disabled,selected:e.selected,dataItem:e,item:k,render:w,onSelect:R,onKeyDown:j}))})))})),fn={themeColor:"primary",fill:"flat",itemFlow:"vertical",positionMode:"fixed",border:!0};dn.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},dn.defaultProps=fn,dn.displayName="KendoReactBottomNavigation";var hn=n(5),mn=function(){return(mn=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)},vn=o.forwardRef((function(e,t){Object(hn.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)()}),[]),p=o.useMemo((function(){return e.orientation||gn.orientation}),[e.orientation]),d="horizontal"===p,f=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:gn.hAlign}),[e.align]),h=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:gn.vAlign}),[e.align]),m=o.useMemo((function(){return Object(a.a)("k-stack-layout",{"k-hstack":"horizontal"===p,"k-vstack":"vertical"===p,"k-justify-content-start":d&&"start"===f||!d&&"top"===h,"k-justify-content-center":d&&"center"===f||!d&&"middle"===h,"k-justify-content-end":d&&"end"===f||!d&&"bottom"===h,"k-justify-content-stretch":d&&"stretch"===f||!d&&"stretch"===h,"k-align-items-start":!d&&"start"===f||d&&"top"===h,"k-align-items-center":!d&&"center"===f||d&&"middle"===h,"k-align-items-end":!d&&"end"===f||d&&"bottom"===h,"k-align-items-stretch":!d&&"stretch"===f||d&&"stretch"===h},i)}),[p,d,f,h,i]),v=mn({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)})),gn={orientation:"horizontal",hAlign:"stretch",vAlign:"stretch"};vn.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"])})},vn.defaultProps=gn,vn.displayName="KendoReactStackLayout";var yn=function(){return(yn=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)},bn=o.forwardRef((function(e,t){Object(hn.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,p=o.useMemo((function(){return Object(y.a)()}),[]),d=o.useMemo((function(){return e.align&&e.align.horizontal?e.align.horizontal:kn.hAlign}),[e.align]),f=o.useMemo((function(){return e.align&&e.align.vertical?e.align.vertical:kn.vAlign}),[e.align]),h=o.useMemo((function(){return Object(a.a)("k-grid-layout",{"k-justify-items-start":"start"===d,"k-justify-items-center":"center"===d,"k-justify-items-end":"end"===d,"k-justify-items-stretch":"stretch"===d,"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)}),[d,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=yn({gap:m,gridTemplateColumns:g,gridTemplateRows:v},s);return o.createElement("div",{ref:n,className:h,style:b,id:l||p},c)})),kn={hAlign:"stretch",vAlign:"stretch",gap:void 0};bn.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"])})},bn.defaultProps=kn,bn.displayName="KendoReactGridLayout";var wn=function(){return(wn=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)},Cn=o.forwardRef((function(e,t){Object(hn.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,p=e.rowSpan,d=e.colSpan,f=o.useMemo((function(){return Object(y.a)()}),[]),h=wn({gridArea:(c||"auto")+" / "+(u||"auto")+" / "+(p?"span "+p:"auto")+" / "+(d?"span "+d:"auto")},a);return o.createElement("div",{ref:n,className:i,style:h,id:s||f},l)}));Cn.propTypes={className:i.string,style:i.object,children:i.any,id:i.string},Cn.displayName="KendoReactGridLayoutItem";var On=o.forwardRef((function(e,t){Object(hn.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)})),xn={id:i.string,className:i.string,children:i.any,style:i.object};On.displayName="KendoReactBreadcrumbListItem",On.propTypes=xn;var Sn=o.forwardRef((function(e,t){Object(hn.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)})})),En={id:i.string,className:i.string,style:i.object,tabIndex:i.number};Sn.displayName="KendoReactBreadcrumbDelimiter",Sn.propTypes=En;var In=o.forwardRef((function(e,t){Object(hn.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){n.current&&t.target.id&&Object(q.a)(e.onItemSelect,t,t.target,{id:t.target.id})}),[e.onItemSelect]),l=o.useCallback((function(t){n.current&&t.target.id&&Object(q.a)(e.onKeyDown,t,t.target,{id:t.target.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(wt.a)(r,e.dir),tabIndex:Object(ft.a)(e.tabIndex,e.disabled),className:Object(a.a)("k-cursor-pointer k-flex-none k-breadcrumb-link k-breadcrumb-icontext-link",{"k-state-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)})),Nn={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};In.displayName="KendoReactBreadcrumbLink",In.propTypes=Nn;var Tn=o.forwardRef((function(e,t){Object(hn.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(wt.a)(r,e.dir),tabIndex:Object(ft.a)(e.tabIndex,e.disabled),className:Object(a.a)("k-breadcrumb-container k-flex-wrap",{"k-state-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};Tn.displayName="KendoReactBreadcrumbOrderedList",Tn.propTypes=Dn;var Mn=function(){return(Mn=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(hn.validatePackage)(x);var n=o.useRef(null),r=o.useRef(null),i=o.useMemo((function(){return e.breadcrumbOrderedList||Tn}),[e.breadcrumbOrderedList]),s=o.useMemo((function(){return e.breadcrumbListItem||On}),[e.breadcrumbListItem]),l=o.useMemo((function(){return e.breadcrumbDelimiter||Sn}),[e.breadcrumbDelimiter]),c=o.useMemo((function(){return e.breadcrumbLink||In}),[e.breadcrumbLink]),u=o.useCallback((function(){r.current&&r.current.focus()}),[r]),p=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 d=Object(wt.a)(r,e.dir),f=function(t){n.current&&Object(q.a)(e.onItemSelect,t,t.target,{id:t.target.id})},h=function(t){n.current&&Object(q.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:d,className:Object(a.a)("k-breadcrumb",{"k-rtl":"rtl"===d,"k-state-disabled":p},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,Mn({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)))})))))})),Pn={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=Pn,_n.defaultProps=Rn},function(e,t,n){"use strict";n.r(t),n.d(t,"ColorGradient",(function(){return _e})),n.d(t,"ColorGradientPropsContext",(function(){return Me})),n.d(t,"ColorPalette",(function(){return Le})),n.d(t,"ColorPalettePropsContext",(function(){return Fe})),n.d(t,"ColorPickerPropsContext",(function(){return $e})),n.d(t,"ColorPicker",(function(){return Ue})),n.d(t,"FlatColorPicker",(function(){return Ge})),n.d(t,"Input",(function(){return rt})),n.d(t,"InputPropsContext",(function(){return nt})),n.d(t,"MaskedTextBox",(function(){return wt})),n.d(t,"MaskedTextBoxPropsContext",(function(){return kt})),n.d(t,"NumericTextBoxPropsContext",(function(){return ue})),n.d(t,"NumericTextBox",(function(){return pe})),n.d(t,"Slider",(function(){return I})),n.d(t,"SliderPropsContext",(function(){return E})),n.d(t,"SLIDER_LABEL_ATTRIBUTE",(function(){return w})),n.d(t,"SliderLabel",(function(){return C})),n.d(t,"RangeSliderPropsContext",(function(){return It})),n.d(t,"RangeSlider",(function(){return Nt})),n.d(t,"Switch",(function(){return At})),n.d(t,"SwitchPropsContext",(function(){return jt})),n.d(t,"CheckboxPropsContext",(function(){return Bt})),n.d(t,"Checkbox",(function(){return zt})),n.d(t,"RadioGroupPropsContext",(function(){return qt})),n.d(t,"RadioGroup",(function(){return Gt})),n.d(t,"RadioButtonPropsContext",(function(){return Kt})),n.d(t,"RadioButton",(function(){return Wt})),n.d(t,"TextAreaPropsContext",(function(){return Zt})),n.d(t,"TextArea",(function(){return Qt})),n.d(t,"RatingPropsContext",(function(){return pn})),n.d(t,"Rating",(function(){return dn})),n.d(t,"RatingItem",(function(){return en}));var r,o,i=n(0),a=n(1),s=n(90),l=n(82),c=n(19),u=n(86),p=n(88),d=n(87),f=n(30),h={name:"@progress/kendo-react-inputs",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167598,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(81),v=n(83),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),b=n(85),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);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=(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)}),x=function(){return(x=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)},S=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("a",{className:"k-button k-button-decrease",style:{position:"relative"},title:e.decrementTitle,onClick:e.decrement},i.createElement("span",{className:Object(c.a)("k-icon",{"k-i-arrow-s":n.props.vertical,"k-i-arrow-w":!n.props.vertical})})),e.children,i.createElement("a",{className:"k-button k-button-increase",style:{position:"relative"},title:e.incrementTitle,onClick:e.increment},i.createElement("span",{className:Object(c.a)("k-icon",{"k-i-arrow-n":n.props.vertical,"k-i-arrow-e":!n.props.vertical})}))):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 O(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,n=this,r=Object(g.provideLocalizationService)(this),o=(this.state.value-this.props.min)/(this.props.max-this.props.min)*100,a=this.props.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},s=this.props.vertical?{paddingTop:0,height:"100%"}:{};return i.createElement("div",{ref:function(e){return n._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: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-state-focused":this.state.focused,"k-state-disabled":this.props.disabled,"k-slider-horizontal":!this.props.vertical,"k-slider-vertical":this.props.vertical},this.props.className)},i.createElement("div",{className:Object(c.a)("k-slider-wrap",{"k-slider-buttons":this.props.buttons}),style:{display:"flex",position:"relative",flexDirection:this.props.vertical?"column-reverse":"row"}},i.createElement(this.buttons,{enabled:this.props.buttons,decrement:this.decrement,increment:this.increment,incrementTitle:r.toLanguageString("slider.increment",y["slider.increment"]),decrementTitle:r.toLanguageString("slider.decrement",y["slider.decrement"])},i.createElement(p.a,{onDrag:this.dragOver,onPress:this.dragStart},i.createElement("div",{className:"k-slider-track-wrap",style:x({flexGrow:1,position:"relative",touchAction:"none"},a)},this.props.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:x({margin:0},s)},i.Children.map(this.props.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-n.props.min)/(n.props.max-n.props.min),vertical:n.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 n._sliderTrack=e}},i.createElement("div",{className:"k-slider-selection",style:this.props.vertical?{height:o+"%"}:{width:o+"%"}}),i.createElement("a",{className:"k-draghandle",title:r.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:this.props.vertical?{bottom:"calc("+o+"% - 8px)",zIndex:1}:(t={},t["rtl"===this.state.dir?"right":"left"]="calc("+o+"% - 8px)",t.zIndex=1,t)})))))))},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),E=Object(d.a)(),I=Object(d.b)(E,S);I.displayName="KendoReactSlider",Object(g.registerForLocalization)(S);var N=function(e){return null!=e},T=function(e,t,n){return!N(e)||isNaN(e)||e<=t?t:e>=n?n:e},D=n(11),M=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(N(e)){var r=Object(D.parseColor)(e.trim(),n);if(N(r))return"hex"===t?r.toCss():r.toCssRgba()}},_=function(e,t){void 0===t&&(t=!0);var n=Object(D.parseColor)(e,t);return N(n)?n.toHSV():{}},P=function(e,t){void 0===t&&(t=!0);var n=Object(D.parseColor)(e,t);return N(n)?n.toBytes():{}},R=function(e){var t=T(e.h,0,359.9),n=T(e.s,0,1),r=T(e.v,0,1),o=T(e.a,0,1);return D.Color.fromHSV(t,n,r,o).toCssRgba()},j=function(e){return R({h:e,s:1,v:1,a:1})},A=function(e,t){var n=T(e.r,0,255),r=T(e.g,0,255),o=T(e.b,0,255),i=T(e.a,0,1),a=T(t.r,0,255),s=T(t.g,0,255),l=T(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)}},F=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=F(A(e,t)),r=F(A(t,{r:0,g:0,b:0,a:1})),(Math.max(n,r)+.05)/(Math.min(n,r)+.05);var n,r},B={};var z=n(38),V=n(92),H=function(){return(H=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)},K=/\d/,W=function(e,t){return void 0!==e?e:t},$=function(e,t,n){return null===e&&void 0===e?"":"string"==typeof e?e:n.formatNumber(e,t)},U=function(e){return(String(e).split(".")[1]||"").length},q=function(e,t){return Math.max(U(e),U(t))},G=function(e,t){var n=function(e){return Math.min(e,15)}(t);return parseFloat(e.toFixed(n))},X=function(e,t,n,r,o,i,a){var s=q(e||0,n||0),l=Y(G((e||0)+(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=$(l,i,a),t.selectionStart=t.selectionEnd=re(t.currentLooseValue,K)},J=function(e,t,n,r,o,i,a){var s=q(e||0,n||0),l=Y(G((e||0)-(n||0),s),r,o);t.eventValue=l,t.currentLooseValue=$(l,i,a),t.selectionStart=t.selectionEnd=re(t.currentLooseValue,K)},Y=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},Z=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)}},Q=function(e,t,n,r){e.selectionStart=e.selectionEnd=t,Z(n,r,e)},ee=function(e,t,n,r){e.eventValue=r.parseNumber(e.prevLooseValue,t),e.currentLooseValue=e.prevLooseValue,e.valueIsCorrected=!0,Q(e,e.selectionStart,e.currentLooseValue,n)},te=function(e,t){var n=e.indexOf(t.decimal);return n>-1?n:re(e,K)},ne=function(e){return e.split("").reverse().join("")},re=function(e,t){return e.length-ne(e).search(t)},oe=function(e){return e.split(e[e.search(K)])[0]},ie=function(e){var t=ne(e);return ne(t.split(t[t.search(K)])[0])},ae=function(e,t){return e.search(t)},se=function(e,t){var n=e.indexOf(t);return n>-1?e.length-n-1:0},le=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++)K.test(e.charAt(l))&&s++;for(var c=0;s>0&&t.length>c;)K.test(t.charAt(c))&&s--,c++;return c},ce=function(e,t,n){var r=H({},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"),p=new RegExp("[\\d\\"+i.decimal+"\\"+i.group+"]"),d=s.replace(c,""),f=ae(s,K),h=-1===f?-1:re(s,K),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(p)})).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=oe(n),s=oe(r),l=oe(o),c=oe(i);return{positiveInfo:[a,ie(n)],negativeInfo:[s,ie(r)],zeroInfo:[l,ie(o)],oneInfo:[c,ie(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=$(r.eventValue,t,n),Q(r,te(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=$(r.eventValue,t,n);var T=ae(r.currentLooseValue,K),D=ae(l,K);return Q(r,r.selectionEnd-1+(T-D),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),Q(r,r.selectionStart,r.currentLooseValue,x),r;if(r.currentLooseValue===i.decimal){r.eventValue=0;var M=$(r.eventValue,t,n);if(0===C&&b>0){var _=re(M,K);r.currentLooseValue=M.substring(0,_)+i.decimal+M.substring(_)}else r.currentLooseValue=M;return Q(r,te(r.currentLooseValue,i)+1,r.currentLooseValue,x),r}if(function(e,t){return String(e.currentLooseValue).split(t.decimal).length>2}(r,i))return ee(r,t,x,n),r;if(I)return r.eventValue=n.parseNumber(s,t)/100,r.currentLooseValue=$(r.eventValue,t,n),r;if(String(r.currentLooseValue).replace(/[^\d]/g,"").length>15)return ee(r,t,x,n),r;if(d!==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 ee(r,t,x,n),r;if(d[d.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!==se(l.replace(c,""),i.decimal))}))>-1)return r.eventValue=n.parseNumber(e.prevLooseValue,t),r.currentLooseValue=e.prevLooseValue,r;var P=se(d,i.decimal),R="0"===d[d.length-1];if(E&&R&&P<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=$(r.eventValue,t,n),r;if(P>0){var j=s.substring(0,m);if(R&&(!j||0!==l.indexOf(j))){r.eventValue=n.parseNumber(r.currentLooseValue,t);var A=$(r.eventValue,t,n);return Q(r,le(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A,r}if(P>b){var F=s.indexOf(i.decimal),L=s.substring(0,F)+s.substring(F,F+1+b)+s.substring(h,String(r.currentLooseValue).length);return r.eventValue=n.parseNumber(L,t),r.currentLooseValue=L,Q(r,r.selectionStart,L,x),r}if(C!==b&&P<=b&&R)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=v,r;if(P<C)return r.eventValue=n.parseNumber(r.currentLooseValue,t),r.currentLooseValue=$(r.eventValue,t,n),r}}if(r.eventValue=n.parseNumber(r.currentLooseValue,t),I&&(r.eventValue=r.eventValue/100),"number"==typeof r.eventValue){A=$(r.eventValue,t,n);1===s.length?Q(r,te(A,i),A,x):Q(r,le(s,A,r.selectionEnd,E,c),A,x),r.currentLooseValue=A}else r.currentLooseValue=$(n.parseNumber(d),t,n);return r},ue=Object(d.a)(),pe=i.forwardRef((function(e,t){Object(f.a)(h);var n=Object(z.a)(ue,e),r=i.useMemo((function(){return Object(l.a)()}),[]),o=n.id||r,a=Object(g.useInternationalization)(),s=Object(g.useLocalization)(),p=i.useRef(null),d=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}),O=i.useRef(!1),x=i.useRef(),S=i.useRef(n.defaultValue),E=$(C.current.focused&&!n.disabled?C.current.currentLooseValue:W(n.value,S.current),n.format,a);x.current=E,i.useEffect((function(){p.current&&p.current.setCustomValidity&&p.current.setCustomValidity(M().valid?"":n.validationMessage||"Please enter a valid value!")}));var I=i.useCallback((function(){p.current&&p.current.focus()}),[]),N=i.useCallback((function(){return void 0!==m.current?m.current:W(n.value,S.current)}),[n.value]),T=i.useCallback((function(){return n.name}),[n.name]),D=i.useCallback((function(){return n.required}),[n.required]),M=i.useCallback((function(){var e=void 0!==n.validationMessage,t=N();return{customError:e,valid:void 0!==n.valid?n.valid:!(C.current.valueIsOutOfRange||D()&&null==t),valueMissing:null==t}}),[n.validationMessage,n.valid,N,D]),_=i.useCallback((function(){return n.validityStyles}),[n.validityStyles]),P=i.useCallback((function(){return n}),[n]),R=i.useCallback((function(){var e={element:p.current,focus:I};return Object.defineProperty(e,"name",{get:T}),Object.defineProperty(e,"value",{get:N}),Object.defineProperty(e,"validity",{get:M}),Object.defineProperty(e,"validityStyles",{get:_}),Object.defineProperty(e,"required",{get:D}),Object.defineProperty(e,"props",{get:P}),e}),[T,N,M,_,D,I,P]);i.useImperativeHandle(t,R);var j=i.useCallback((function(){return{eventValue:W(n.value,S.current),prevLooseValue:x.current,currentLooseValue:p.current.value,selectionStart:p.current.selectionStart,selectionEnd:p.current.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:O.current,focused:C.current.focused}}),[n.value]),A=i.useCallback((function(e,t){if(!n.disabled){m.current=t.eventValue,S.current=t.eventValue;var r=$(Y(t.eventValue,n.min,n.max),n.format,a),o=Y(a.parseNumber(r,n.format),n.min,n.max);if(o!==t.eventValue&&(t.valueIsOutOfRange=!0,t.eventValue=o,S.current=o),t.valueIsCorrected){var i=d.current;i&&-1===i.className.indexOf("k-state-invalid")&&(i.className+=" k-state-invalid",window.setTimeout((function(){return i.className=i.className.replace(" k-state-invalid","")}),50))}n.value!==t.eventValue&&Object(v.a)(n.onChange,e,R(),{value:t.eventValue}),m.current=void 0,C.current=t,w((function(e){return!e}))}}),[n.value,n.onChange,n.disabled,w,R]),F=i.useCallback((function(e){var t=j();O.current=!1,A(e,ce(t,n.format,a))}),[n.format,n.onChange,a,A,j]),L=i.useCallback((function(e){var t=j(),r=a.parseNumber(String(t.currentLooseValue),n.format);if(t.selectionEnd>t.selectionStart&&t.selectionEnd-t.selectionStart===String(t.currentLooseValue).length)O.current=!0;else{switch(e.keyCode){case 38:X(r,t,n.step,n.min,n.max,n.format,a);break;case 40:J(r,t,n.step,n.min,n.max,n.format,a);break;case 13:if(!1===n.rangeOnEnter)return;var o=$(Y(r,n.min,n.max),n.format,a),i=Y(a.parseNumber(o,n.format),n.min,n.max);t.eventValue=i,t.currentLooseValue=$(i,n.format,a),t.selectionStart=t.selectionEnd=t.currentLooseValue.length;break;case 110:var s=p.current,l=a.numberSymbols();s&&(t.currentLooseValue=t.currentLooseValue.slice(0,t.selectionStart)+l.decimal+t.currentLooseValue.slice(t.selectionEnd),t.selectionStart=t.selectionEnd=t.selectionStart+1,t=ce(t,n.format,a));break;default:return}e.preventDefault(),A(e,t)}}),[n.format,n.min,n.max,n.step,n.onChange,n.rangeOnEnter,A,j]),B=i.useCallback((function(){O.current=!0}),[]),H=i.useCallback((function(e){if(!n.readOnly&&!n.disabled){var t=j();X(a.parseNumber(String(t.currentLooseValue),n.format),t,n.step,n.min,n.max,n.format,a),A(e,t)}}),[n.format,n.min,n.max,n.step,n.onChange,n.readOnly,n.disabled,A,j]),K=i.useCallback((function(e){if(!n.readOnly&&!n.disabled){var t=j();J(a.parseNumber(String(t.currentLooseValue),n.format),t,n.step,n.min,n.max,n.format,a),A(e,t)}}),[n.format,n.min,n.max,n.step,n.onChange,n.readOnly,n.disabled,A,j]),U=i.useCallback((function(e){document&&document.activeElement===p.current&&p.current&&!n.readOnly&&!n.disabled&&(e.nativeEvent.deltaY<0&&H(e),e.nativeEvent.deltaY>0&&K(e))}),[H,K,n.disabled,n.readOnly]),q=i.useCallback((function(e){C.current.currentLooseValue=x.current,C.current.focused=!0,Object(v.a)(n.onFocus,e,R(),{}),w((function(e){return!e}))}),[n.onFocus,w,R]),G=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)(n.onBlur,e,R(),{}),w((function(e){return!e}))}),[n.onBlur,w,R]),Z=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 Q=!_()||M().valid,ee=i.createElement("span",{dir:n.dir,style:n.label?void 0:{width:n.width},className:"k-widget k-numerictextbox"+(n.className?" "+n.className:""),"aria-disabled":n.disabled?"true":void 0},i.createElement("span",{className:Object(c.a)("k-numeric-wrap",{"k-state-disabled":n.disabled,"k-state-invalid":!Q,"k-state-focused":C.current.focused}),ref:d},i.createElement("input",{value:null===E?"":E,tabIndex:Object(u.a)(n.tabIndex,n.disabled),accessKey:n.accessKey,disabled:n.disabled,title:n.title,"aria-valuemin":n.min,"aria-valuemax":n.max,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy,placeholder:n.placeholder,spellCheck:!1,autoComplete:"off",autoCorrect:"off",type:n.inputType||"tel",className:"k-input k-formatted-value",id:o,name:n.name,readOnly:n.readOnly,onChange:F,onFocus:q,onBlur:G,onKeyDown:L,onPaste:B,onWheel:U,ref:p}),n.children,n.spinners&&i.createElement("span",{className:"k-select",onMouseDown:Z},i.createElement("span",{className:"k-link k-link-increase","aria-label":s.toLanguageString("numerictextbox.increment",y["numerictextbox.increment"]),title:s.toLanguageString("numerictextbox.increment",y["numerictextbox.increment"]),onClick:H},i.createElement("span",{className:"k-icon k-i-arrow-n"})),i.createElement("span",{className:"k-link k-link-decrease","aria-label":s.toLanguageString("numerictextbox.decrement",y["numerictextbox.decrement"]),title:s.toLanguageString("numerictextbox.decrement",y["numerictextbox.decrement"]),onClick:K},i.createElement("span",{className:"k-icon k-i-arrow-s"})))));return n.label?i.createElement(V.a,{label:n.label,editorId:o,editorValue:null===E?"":E,editorValid:Q,editorDisabled:n.disabled,editorPlaceholder:n.placeholder,children:ee,style:{width:n.width},dir:n.dir}):ee}));pe.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,onChange:a.func,onFocus:a.func,onBlur:a.func},pe.displayName="KendoNumericTextBox",pe.defaultProps={step:1,spinners:!0,disabled:!1,required:!1,validityStyles:!0,rangeOnEnter:!0,onChange:function(e){},onFocus:function(e){},onBlur:function(e){}};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)}}(),fe=function(e){function t(t){var n=e.call(this,t)||this;return n.onChange=function(e){var t=e.target.value,r=M(t,"rgba");n.setState({hex:t}),N(r)&&n.props.onHexChange(t,r,e)},n.onBlur=function(){N(M(n.state.hex,"rgba"))||n.setState({hex:n.state.originalHex})},n.state={hex:n.props.hex,originalHex:n.props.hex},n}return de(t,e),t.prototype.render=function(){return i.createElement("input",{value:this.state.hex,className:"k-input",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),he=n(31),me=n(17),ve=n(23),ge=function(e){Object(f.a)(ve.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,p=e.optional,d=Object(g.useLocalization)(),h=p?d.toLanguageString(me.a,me.b[me.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)};ge.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},ge.displayName="KendoReactLabel";var ye=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)}}(),be=function(){return(be=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)},ke=["rgba","rgb","hex"],we=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={inputMode:ke[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 ye(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(he.a,{look:"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"},i.createElement(fe,{hex:this.props.hex,onHexChange:this.props.onHexChange,disabled:this.props.disabled})),i.createElement(ge,{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(pe,{value:this.props.rgba.r,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaRChange,disabled:this.props.disabled}),i.createElement(ge,{className:"k-colorgradient-input-label"},n)),i.createElement("div",{className:"k-vstack"},i.createElement(pe,{value:this.props.rgba.g,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaGChange,disabled:this.props.disabled}),i.createElement(ge,{className:"k-colorgradient-input-label"},r)),i.createElement("div",{className:"k-vstack"},i.createElement(pe,{value:this.props.rgba.b,min:0,max:255,spinners:!1,format:"n",onChange:this.onRgbaBChange,disabled:this.props.disabled}),i.createElement(ge,{className:"k-colorgradient-input-label"},o))),"rgba"===this.state.inputMode&&i.createElement("div",{className:"k-vstack"},this.props.opacity&&i.createElement(pe,{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(ge,{className:"k-colorgradient-input-label"},a)))},t.prototype.dispatchRgbaChange=function(e,t){var n=be({},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=ke.length-1===ke.indexOf(this.state.inputMode)?0:ke.indexOf(this.state.inputMode)+1;if(this.props.opacity)this.setState({inputMode:ke[e]});else{var t="rgba"===ke[e]?e+1:e;this.setState({inputMode:ke[t]})}},t}(i.Component),Ce=we;Object(g.registerForIntl)(we),Object(g.registerForLocalization)(we);var Oe=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(){return null!==e&&e.apply(this,arguments)||this}return Oe(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),p=n+": "+l,d=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,p),s>=4.5?f:h),i.createElement("div",null,i.createElement("span",null,d),s>=7?f:h))},t}(i.Component);Object(g.registerForLocalization)(xe);var Se=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"/>'},Ee=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)}},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)}}(),Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ie(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(P(R(c)),P(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=Ee,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 Se(i(4.5,16),a)+Se(i(4.5,16,!0),a)+Se(i(7,16),a)+Se(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),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)}}(),De=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:j(o.h),rgba:P(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=T(e.r,0,255),n=T(e.g,0,255),r=T(e.b,0,255),o=T(e.a,0,1);return D.Color.fromBytes(t,n,r,o).toCssRgba()}(e);if(r.isUncontrolled){var o=_(n),i=M(n,"hex");r.setState({hsva:o,backgroundColor:j(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=T(n,0,t.width),a=T(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||M("rgba(255, 255, 255, 1)","rgba");return r.state=Object.assign({},t.getStateFromValue(o),{isFirstRender:!0,guid:Object(l.a)()}),r}return Te(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=M(r,"hex");this.setState({hsva:e,backgroundColor:j(e.h),rgba:P(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){N(M(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)||P(e),o=function(e,t){if(e){var n=B[e];return n&&n.value===t?n.hex:void 0}}(t,e)||M(e,"hex");return{hsva:n,backgroundColor:j(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-state-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(p.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(Ne,{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(I,{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(I,{value:N(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(Ce,{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(xe,{bgColor:P(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),Me=Object(d.a)(),_e=Object(d.b)(Me,De);_e.displayName="KendoReactColorGradient";var Pe=function(){function e(){this.colorRows=[]}return e.prototype.setColorMatrix=function(e,t){if(this.colorRows=[],N(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(N(e)){var n=e?Object(D.parseColor)(e,!0):e,r=[e];N(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(N(e)&&N(this.colorRows[e.row]))return this.colorRows[e.row][e.col]},e.prototype.getNextCell=function(e,t,n){if(!(N(e)&&N(e.row)&&N(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}(),Re={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}},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)}}(),Ae=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 je(t,e),t.prototype.render=function(){var e=this,t=this.getPaletteInfo(),n=this.paletteService=new Pe;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-state-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:M(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=Re[this.props.palette];return N(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,p="number"!=typeof this.props.tileSize?this.props.tileSize:{width:this.props.tileSize,height:this.props.tileSize},d=p.width+"px",f=p.height+"px";return e.map((function(e,n){var r=a&&s===n,p=Object(c.a)("k-colorpalette-tile",{"k-state-selected":r,"k-state-focus":l&&u===n});return i.createElement("td",{className:p,"aria-label":e,"aria-selected":!!r||!!o.props.disabled&&void 0,style:{backgroundColor:e,width:d,height:f,minWidth:d},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),Fe=Object(d.a)(),Le=Object(d.b)(Fe,Ae);Le.displayName="KendoReactColorPalette";var Be=n(28),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)},Ve=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(Be.a,ze({style:ze({},(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))};Ve.displayName="KendoPickerComponent";var He=function(){return(He=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)},Ke={palette:"office",tileSize:24},We=function(e){return void 0!==e},$e=Object(d.a)(),Ue=i.forwardRef((function(e,t){Object(f.a)(h);var n=Object(z.a)($e,e),r=n.popupSettings,o=n.gradientSettings,a=n.paletteSettings,s=n.valid,l=n.disabled,p=n.tabIndex,d=n.view,v=n.icon,g=n.onChange,y=n.onFocus,k=n.onBlur,w=n.onActiveColorClick,C=i.useRef(null),O=i.useRef(null),x=i.useRef(null),S=i.useRef(),E=i.useRef(null),I=i.useCallback((function(){C.current&&C.current.focus()}),[]);i.useImperativeHandle(t,(function(){return{element:C.current,actionElement:E.current,focus:I}}));var N=i.useState(!1),T=N[0],D=N[1],M=i.useState(n.defaultValue),_=M[0],P=M[1],R=i.useState(!1),j=R[0],A=R[1],F=We(n.value),L=We(n.open),B=F?n.value:_,V=L?n.open:j,H=i.useCallback((function(e,t){L||(!e&&!t&&C&&C.current&&C.current.focus(),A(e))}),[L]),K=i.useCallback((function(e){var t=e.altKey,n=e.keyCode;if(n!==m.a.esc)return n!==m.a.enter||L?void(!t||n!==m.a.up&&n!==m.a.down||(e.preventDefault(),e.stopPropagation(),n===m.a.up&&C&&C.current&&(C.current.focus(),H(!1)),n===m.a.down&&H(!0))):(e.preventDefault(),e.stopPropagation(),void H(!V));H(!1)}),[V,L]),W=i.useCallback((function(){L||(O.current?O.current.focus():x.current&&x.current.focus())}),[L]),$=i.useCallback((function(){H(!V,!0)}),[V]),U=i.useCallback((function(e){w&&w.call(void 0,{syntheticEvent:e,nativeEvent:e.nativeEvent,value:B})}),[w,B]),q=i.useCallback((function(e){S.current?(clearTimeout(S.current),S.current=void 0):D(!0),y&&y.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[y]),G=i.useCallback((function(){H(!1,!0),D(!1),S.current=void 0}),[]),X=i.useCallback((function(e){clearTimeout(S.current),S.current=window.setTimeout(G),k&&k.call(void 0,{nativeEvent:e.nativeEvent,syntheticEvent:e})}),[k]),J=i.useCallback((function(e,t){var n=t?e.rgbaValue:e.value;F||P(n),t&&H(!1),g&&g.call(void 0,{value:n,nativeEvent:e.nativeEvent,syntheticEvent:e.syntheticEvent})}),[F,g]),Y=i.useCallback((function(e){return J(e,!0)}),[We,J]),Z=Object(b.a)(C,n.dir),Q=n.iconClassName||v&&"k-icon k-i-"+v,ee=Object(c.a)({"k-widget":!0,"k-colorpicker":!0,"k-state-invalid":!1===s}),te=i.useMemo((function(){return Object(c.a)({"k-picker-wrap":!0,"k-state-disabled":l,"k-state-focused":T})}),[T,l]);return i.createElement("span",{className:ee,dir:Z},i.createElement("span",{id:n.id,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy,className:te,ref:C,tabIndex:Object(u.a)(p,l),title:n.title,onKeyDown:K,onFocus:q,onBlur:X},i.createElement(Ve,{dir:Z,open:V,onOpen:W,popupAnchor:C.current||void 0,popupSettings:He({},r),input:Q?i.createElement("span",{onClick:U,className:Object(c.a)("k-tool-icon",Q)},i.createElement("span",{className:"k-selected-color",style:{backgroundColor:B}})):i.createElement("span",{onClick:U,className:"k-selected-color",style:{backgroundColor:B}},!B&&i.createElement("span",{className:"k-icon k-i-line"})),button:i.createElement("span",{onClick:$,className:"k-select",ref:E},i.createElement("span",{className:"k-icon k-i-arrow-s"})),content:i.createElement(i.Fragment,null,("combo"===d||"gradient"===d)&&i.createElement(_e,He({},o,{tabIndex:0,ref:O,value:B,onChange:J})),("combo"===d||"palette"===d)&&i.createElement(Le,He({},a,{ref:x,value:B,onChange:Y})))})))}));Ue.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},Ue.defaultProps={view:"palette",gradientSettings:{opacity:!0},paletteSettings:Ke},Ue.displayName="KendoColorPicker";var qe=n(32),Ge=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],p=i.useState("rgba(255, 255, 255, 1)"),d=p[0],m=p[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)")}),[]),O=i.useCallback((function(e){m(e.value)}),[]),x=i.useCallback((function(){b(d)}),[d]),S=i.useCallback((function(){b("rgba(255, 255, 255, 1)")}),[]),E=i.useCallback((function(){m(g)}),[g]),I=i.useCallback((function(){r.current&&r.current.focus()}),[r]),N=i.useCallback((function(){b(d)}),[d]);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-state-disabled":e.disabled},e.className),onBlur:N},e.header||i.createElement("div",{className:"k-coloreditor-header k-hstack"},i.createElement("div",{className:"k-coloreditor-header-actions k-hstack"},i.createElement(qe.a,null,i.createElement(he.a,{type:"button",togglable:!0,look:"flat",selected:s,onClick:function(){return w("ColorGradient")}},i.createElement("span",{className:"k-icon k-i-color-canvas"})),i.createElement(he.a,{type:"button",togglable:!0,look:"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&&Je.showClearButton&&i.createElement(he.a,{type:"button",look:"flat",onClick:C},i.createElement("span",{className:"k-icon k-i-reset-color"})),e.showPreview&&Je.showPreview&&i.createElement("div",{className:"k-coloreditor-preview k-vstack"},i.createElement("span",{className:"k-coloreditor-preview-color k-color-preview",style:{background:d}}),i.createElement("span",{className:"k-coloreditor-current-color k-color-preview",style:{background:g},onClick:E})))),i.createElement("div",{className:"k-coloreditor-views k-vstack"},s?i.createElement(_e,{ref:o,value:d,onChange:O,onFocus:I}):i.createElement(Le,{value:d,onChange:O,onFocus:I})),e.showButtons&&Je.showButtons&&i.createElement("div",{className:"k-coloreditor-footer k-actions k-actions-end"},i.createElement(he.a,{type:"button",className:"k-coloreditor-cancel",onClick:S},y["flatColorPicker.cancelBtn"]),i.createElement(he.a,{type:"button",className:"k-coloreditor-apply k-primary",onClick:x},y["flatColorPicker.applyBtn"])))})),Xe={id:a.string,value:a.string,view:a.string,header:a.elementType,showClearButton:a.bool,showPreview:a.bool,showButtons:a.bool},Je={showClearButton:!0,showPreview:!0,showButtons:!0};Ge.displayName="KendoFlatColorPicker",Ge.propTypes=Xe,Ge.defaultProps=Je;var Ye,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)}}(),Qe=function(){return(Qe=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)},et=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},tt=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-state-invalid"):r._input.classList.add("k-state-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-state-empty")&&t.classList.remove("k-state-empty")}},Object(f.a)(h),r.state={value:r.props.defaultValue||t.defaultProps.defaultValue},r}return Ze(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 Qe({},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=et(t,["className","label","id","validationMessage","defaultValue","valid","visited","touched","modified","ariaLabelledBy","ariaDescribedBy","validityStyles","style"]),p=o||this._inputId,d=!this.validityStyles||this.validity.valid,f=Object(c.a)(n,"k-textbox"),h=i.createElement("input",Qe({"aria-labelledby":a,"aria-describedby":s},u,{style:r?void 0:l,value:this.value,id:p,className:f,onChange:this.handleChange,onAnimationStart:this.handleAutoFill,ref:function(t){e._input=t}}));return r?i.createElement(V.a,{label:r,editorId:p,editorValue:String(this.value),editorValid:d,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),nt=Object(d.a)(),rt=Object(d.b)(nt,tt);rt.displayName="KendoReactInput",function(e){e[e.Literal=0]="Literal",e[e.Mask=1]="Mask",e[e.Undefined=2]="Undefined"}(Ye||(Ye={}));var ot=function(){function e(e,t,n){void 0===n&&(n=Ye.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}(),it=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}(),at=function(e){return(e||"").split("")},st=function(){function e(e){this.parse=e}return e.prototype.run=function(e,t){return void 0===t&&(t=""),e instanceof it?this.parse(e):this.parse(new it(at(e),at(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===Ye.Literal},e}(),lt=function(e,t){return new st((function(n){var r=n.next().char,o=e[r];return"\\"===r?(r=n.next().char,new ot(t.literal(r),n)):new ot(o?t.mask(o):t.literal(r),n)}))},ct=function(e){var t=e.prompt,n=e.promptPlaceholder;return new st((function(e){var r=e.next().char;return new ot(r===t?n:r,e)}))},ut=function(e){return new st((function(t){var n=t.next().char;return new ot(e?n:"",t)}))},pt=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 st((function(e){return new ot(t,e)}))));var t},dt=function(e){return new st((function(t){for(var n=new ot([],t);!t.eof();)n=n.concat(e.run(t));return n}))},ft=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 pt(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?(pt(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?(pt(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 pt(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 pt(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 pt(this.unmaskTokens).run(a,t).chain((function(e){i=e.join("").length;var n=t.slice(i);return pt(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 st((function(e){return e.peek().char===t?(e.eat(),new ot(t,e,Ye.Literal)):new ot(t,e,Ye.Literal)}));var t},mask:function(n){return function(e){var t=e.prompt,n=e.promptPlaceholder;return function(e){return new st((function(r){for(;!r.eof();){var o=r.peek(),i=o.char,a=o.control;if(i===a&&a===t)return r.eat(),new ot(t,r,Ye.Mask);if(e.test(i))return r.eat(),new ot(i,r,Ye.Mask);if(i===n)return r.eat(),new ot(t,r,Ye.Mask);r.eat_input()}return r.eat(),new ot(t,r,Ye.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 st((function(e){return e.eof()?new ot("",e):(e.peek().char===t&&e.eat(),new ot(t,e))}));var t},mask:function(t){return(n=e.prompt,function(e){return new st((function(t){for(;!t.eof();){var r=t.peek(),o=r.char,i=r.control;if(o===n&&i===n)return t.eat(),new ot(o,t);if(e.test(o))return t.eat(),new ot(o,t);t.eat_input()}return t.eat(),new ot("",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 ut(n)},mask:function(n){return ct({prompt:e,promptPlaceholder:t})}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validationTokenCreator",{get:function(){var e=this.prompt;return{literal:function(e){return ut(!1)},mask:function(t){return ct({prompt:e,promptPlaceholder:""})}}},enumerable:!0,configurable:!0}),e.prototype.tokenize=function(){var e=this;dt(lt(this.rules,this.maskTokenCreator)).run(this.mask).fold((function(t,n){e.maskTokens=t})),dt(lt(this.rules,this.unmaskTokenCreator)).run(this.mask).fold((function(t,n){e.unmaskTokens=t})),dt(lt(this.rules,this.rawTokenCreator)).run(this.mask).fold((function(t,n){e.rawTokens=t})),dt(lt(this.rules,this.validationTokenCreator)).run(this.mask).fold((function(t,n){e.validationTokens=t}))},e}(),ht={"#":/[\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]/},mt=function(){return!1},vt=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},gt=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)}}(),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=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n._inputId="k-"+Object(l.a)(),n._service=new ft,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 gt(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&&vt(s.rules,l.rules)||this.updateService(),this.setValidity()},t.prototype.componentDidMount=function(){this.updateService(),this.setValidity()},t.prototype.render=function(){var e=this,t=this.props.id||this._inputId,n=!this.validityStyles||this.validity.valid,r=this.props.style||{},o=i.createElement("span",{dir:this.props.dir,className:Object(c.a)("k-widget k-maskedtextbox",this.props.className,{"k-state-focused":this.state.focused,"k-state-disabled":this.props.disabled,"k-state-invalid":!n}),style:this.props.label?r:yt({width:this.props.width},r)},i.createElement("input",{type:"text",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"k-textbox",value:this.value,id:t,"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(t){return e._input=t},onChange:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragStart:mt,onDrop:mt}));return this.props.label?i.createElement(V.a,{label:this.props.label,editorId:t,editorValue:this.value,editorValid:n,editorDisabled:this.props.disabled,editorPlaceholder:this.props.placeholder,children:o,style:{width:this.props.width},dir:this.props.dir}):o},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({},ht,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},t.defaultProps={prompt:"_",promptPlaceholder:" ",includeLiterals:!1,maskValidation:!0,rules:ht,required:!1,validityStyles:!0},t}(i.Component),kt=Object(d.a)(),wt=Object(d.b)(kt,bt);wt.displayName="KendoReactMaskedTextBox";var Ct,Ot=n(78),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)};!function(e){e.start="start",e.end="end",e.min="min",e.max="max",e.increase="increase",e.decrease="decrease"}(Ct||(Ct={}));var St=function(){return(St=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)},Et=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 Ct.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 Ct.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 Ct.min:n="start"===t.key?xt({},e,{start:t.min}):xt({},e,{end:Math.max(t.min,e.start)});break;case Ct.max:n="start"===t.key?xt({},e,{start:Math.min(t.max,e.end)}):xt({},e,{end:t.max});break;case Ct.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?xt({},e,{start:t.min}):xt({},e,{start:Math.min(r,e.end)}):r>t.max?xt({},e,{end:t.max}):xt({},e,{end:Math.max(r,e.start)});break;case Ct.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?xt({},e,{start:t.min}):xt({},e,{start:Math.min(r,e.end)}):r>t.max?xt({},e,{end:t.max}):xt({},e,{end:Math.max(r,e.start)});break;default:n=e}return n}(t.state||o,St({},e,t));n&&n(r,e.event),a(r)}),[t,n]);return[o,s]},It=Object(d.a)(),Nt=i.forwardRef((function(e,t){var n,r,o,a;Object(f.a)(h);var s=Object(z.a)(It,e),l=i.useRef(null),p=i.useRef(null),d=i.useRef(null),v=i.useRef(null),k=i.useRef(null),w=i.useCallback((function(){v.current&&v.current.focus()}),[v]);i.useImperativeHandle(l,(function(){return{element:p.current,focus:w,props:s}})),i.useImperativeHandle(t,(function(){return l.current}));var C=i.useMemo((function(){return s.min}),[s.min]),O=i.useMemo((function(){return s.max}),[s.max]),x=i.useMemo((function(){return void 0!==s.step?s.step:Dt.step}),[s.step,Dt.step]),S=Object(b.a)(p,s.dir),E=i.useState(""),I=E[0],N=E[1],T=Et(s.defaultValue||Dt.defaultValue,{min:C,max:O,step:x,state:s.value},(function(e,t){s.onChange&&l.current&&s.onChange.call(void 0,{value:e,target:l.current,syntheticEvent:t})})),D=T[0],M=T[1],_=i.useMemo((function(){return s.value||D}),[s.value,D]),P=i.useRef(null),R=i.useRef(null),j=i.useMemo((function(){return(_.start-C)/(O-C)*100}),[_.start,C,O]),A=i.useMemo((function(){return(_.end-C)/(O-C)*100}),[_.end,C,O]),F=i.useMemo((function(){return s.vertical?{paddingTop:0,height:"100%"}:{}}),[s.vertical]),L=i.useMemo((function(){return s.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"}}),[s.vertical]),B=Object(g.useLocalization)(),V=i.useCallback((function(e){if(R.current){e.originalEvent.preventDefault();var t=R.current.getBoundingClientRect(),n=s.vertical?t.bottom-e.clientY:"rtl"===S?t.right-e.clientX:e.clientX-t.left,r=s.vertical?t.height:t.width;return C+n/r*(O-C)}}),[R,s.vertical,S,C,O,D.start,D.end,s.value&&s.value.start,s.value&&s.value.end]),H=i.useCallback((function(e){return e<=_.start?"start":e>=_.end?"end":2*e<_.end+_.start?"start":"end"}),[D.start,D.end,s.value&&s.value.start,s.value&&s.value.end]),K=i.useCallback((function(e){switch(e.keyCode){case m.a.right:e.preventDefault(),M({type:"rtl"===S?Ct.decrease:Ct.increase,key:"start",event:e});break;case m.a.up:e.preventDefault(),M({type:Ct.increase,key:"start",event:e});break;case m.a.left:e.preventDefault(),M({type:"rtl"===S?Ct.increase:Ct.decrease,key:"start",event:e});break;case m.a.down:e.preventDefault(),M({type:Ct.decrease,key:"start",event:e});break;case m.a.home:e.preventDefault(),M({type:Ct.min,key:"start",event:e});break;case m.a.end:e.preventDefault(),M({type:Ct.max,key:"start",event:e})}}),[M]),W=i.useCallback((function(e){switch(e.keyCode){case m.a.right:e.preventDefault(),M({type:"rtl"===S?Ct.decrease:Ct.increase,key:"end",event:e});break;case m.a.up:e.preventDefault(),M({type:Ct.increase,key:"end",event:e});break;case m.a.left:e.preventDefault(),M({type:"rtl"===S?Ct.increase:Ct.decrease,key:"end",event:e});break;case m.a.down:e.preventDefault(),M({type:Ct.decrease,key:"end",event:e});break;case m.a.home:e.preventDefault(),M({type:Ct.min,key:"end",event:e});break;case m.a.end:e.preventDefault(),M({type:Ct.max,key:"end",event:e})}}),[M,S]),$=i.useCallback((function(e){var t=V(e),n=H(t);N(n),"end"===n?k.current.focus():v.current.focus();var r="end"===n?Ct.end:Ct.start;M({type:r,payload:t,event:e})}),[s.vertical,C,O,M]);return Object(Ot.a)(R,{onPress:$,onDrag:function(e){var t=V(e),n="end"===I?Ct.end:Ct.start;M({type:n,payload:t,event:e})},onRelease:function(e){var t=V(e),n="end"===I?Ct.end:Ct.start;M({type:n,payload:t,event:e}),N("")}}),i.createElement("div",{role:"slider",id:s.id,style:s.style,ref:p,dir:S,className:Object(c.a)("k-widget k-slider",{"k-rtl":"rtl"===S,"k-state-disabled":s.disabled,"k-slider-vertical":s.vertical,"k-slider-horizontal":!s.vertical},s.className),"aria-labelledby":s.ariaLabelledBy,"aria-describedby":s.ariaDescribedBy},i.createElement("div",{className:"k-slider-wrap",style:{display:"flex",position:"relative",flexDirection:s.vertical?"column-reverse":"row"}},i.createElement("div",{ref:R,className:"k-slider-track-wrap",style:St({flexGrow:1,position:"relative",touchAction:"none"},L)},s.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:St({margin:0},F)},i.Children.map(s.children,(function(e){return e&&i.cloneElement(e,{position:100*(e.props.position-s.min)/(s.max-s.min),vertical:s.vertical},e.props.children)}))),i.createElement("div",{ref:P,className:"k-slider-track",style:s.vertical?{bottom:0,height:"100%"}:(n={},n["rtl"===S?"right":"left"]=0,n.width="100%",n)},null!==j&&null!==A&&i.createElement("div",{"data-selection":!0,ref:d,title:_.start+" - "+_.end,className:"k-slider-selection",style:s.vertical?{height:A-j+"%",bottom:j+"%"}:(r={},r["rtl"===S?"right":"left"]=j+"%",r.width=A-j+"%",r)}),i.createElement("a",{ref:v,role:"slider",tabIndex:Object(u.a)(s.startTabIndex,s.disabled,void 0),"aria-valuemin":C,"aria-valuemax":Math.max(O,_.end),"aria-valuenow":_.start,"aria-disabled":s.disabled?"true":void 0,className:"k-draghandle",title:B.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:s.vertical?{bottom:"calc("+j+"% - 8px)",zIndex:1}:(o={},o["rtl"===S?"right":"left"]="calc("+j+"% - 8px)",o.zIndex=1,o),onKeyDown:K}),i.createElement("a",{ref:k,role:"slider",tabIndex:Object(u.a)(s.endTabIndex,s.disabled,void 0),"aria-valuemin":Math.min(C,_.start),"aria-valuemax":O,"aria-valuenow":_.end,"aria-disabled":s.disabled?"true":void 0,className:"k-draghandle",title:B.toLanguageString("slider.dragTitle",y["slider.dragTitle"]),style:s.vertical?{bottom:"calc("+A+"% - 8px)",zIndex:1}:(a={},a["rtl"===S?"right":"left"]="calc("+A+"% - 8px)",a.zIndex=1,a),onKeyDown:W})))))})),Tt={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"])},Dt={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};Nt.displayName="KendoReactRangeSlider",Nt.propTypes=Tt,Nt.defaultProps=Dt;var Mt=n(10),_t=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)}}(),Pt=function(){return(Pt=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)},Rt=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:Mt.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 _t(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=this,t=this.state.focused,n=this.props,r=n.dir,o=n.disabled,a=n.id,s=n.offLabel,l=n.onLabel,p=n.tabIndex;this.dir=r||this._wrapper&&getComputedStyle(this._wrapper).direction||void 0;var d=!this.validityStyles||this.validity.valid,f=Object(c.a)({"k-widget":!0,"k-switch":!0,"k-switch-on":this.value,"k-switch-off":!this.value,"k-state-focused":t,"k-state-disabled":o,"k-state-invalid":!d},this.props.className),h={"aria-checked":this.value,"aria-disabled":o||void 0};return i.createElement("span",{ref:function(t){e._wrapper=t},className:f,dir:this.dir,onKeyDown:this.handleKeyDown,onClick:this.handleClick,onBlur:this.handleWrapperBlur,onFocus:this.handleWrapperFocus},i.createElement("span",Pt({className:"k-switch-container",id:a||this._id,role:"switch"},h,{"aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,ref:function(t){e._element=t},tabIndex:Object(u.a)(p,o,void 0),accessKey:this.props.accessKey}),this.dummyInput(this.value),i.createElement("span",{className:"k-switch-label-on"},l),i.createElement("span",{className:"k-switch-label-off"},s),i.createElement("span",{className:"k-switch-handle"})))},t.displayName="Switch",t.propTypes={accessKey:a.string,checked:a.bool,className:a.string,disabled:a.bool,defaultChecked:a.bool,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,offLabel:"OFF",onBlur:Mt.a,onFocus:Mt.a,onLabel:"ON",required:!1,validityStyles:!0},t}(i.Component),jt=Object(d.a)(),At=Object(d.b)(jt,Rt);At.displayName="KendoReactSwitch";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)},Lt=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},Bt=Object(d.a)(),zt=i.forwardRef((function(e,t){Object(f.a)(h);var n=Object(z.a)(Bt,e),r=n,o=r.ariaDescribedBy,a=r.ariaLabelledBy,s=r.checked,p=r.className,d=r.children,k=r.defaultChecked,w=r.disabled,C=r.defaultValue,O=r.id,x=r.label,S=r.labelPlacement,E=r.name,I=r.labelOptional,N=r.onChange,T=r.onFocus,D=r.onBlur,M=r.tabIndex,_=r.value,P=r.required,R=r.valid,j=r.validationMessage,A=r.validityStyles,F=(r.visited,r.touched,r.modified,Lt(r,["ariaDescribedBy","ariaLabelledBy","checked","className","children","defaultChecked","disabled","defaultValue","id","label","labelPlacement","name","labelOptional","onChange","onFocus","onBlur","tabIndex","value","required","valid","validationMessage","validityStyles","visited","touched","modified"])),L=i.useRef(null),B=i.useCallback((function(){L.current&&L.current.focus()}),[]),V=i.useCallback((function(){return{element:L.current,focus:B,get name(){return L.current&&L.current.name}}}),[B]);i.useImperativeHandle(t,V);var H=i.useState(k),K=H[0],W=H[1],$=i.useState(C),U=$[0],q=$[1],G="boolean"==typeof _||null===_,X=void 0!==s,J=G,Y=J?_:U,Z=X?s:J?void 0:K,Q=void 0===Z&&Y,ee=Q?Y:Z,te=Q||J?null===_?_:void 0:_||Y,ne=null===ee||null===te,re=i.useMemo((function(){return Object(l.a)()}),[]),oe=Object(g.useLocalization)(),ie=function(e){return oe.toLanguageString(e,y[e])},ae=ie("checkbox.validation"),se=ie("checkbox.optionalText"),le=void 0!==R?R:!P||!!Z;i.useEffect((function(){L.current&&L.current.setCustomValidity&&L.current.setCustomValidity(le?"":j||ae)}),[le,j,ae]);var ce=i.useCallback((function(e,t){J||w||(q(t),X||w||W(t)),N&&!w&&Object(v.a)(N,e,Ft({},V(),{value:t}),{value:t})}),[X,w,N,J,V]),ue=i.useCallback((function(e){var t=e.target.checked;ce(e,t)}),[ce,_]),pe=i.useCallback((function(e){if(!w){var t=e.keyCode,n=e.currentTarget.checked;t===m.a.space&&(e.preventDefault(),e.stopPropagation(),ce(e,!n))}}),[w,ce]),de=i.useCallback((function(e){w||e.keyCode===m.a.space&&e.preventDefault()}),[w]),fe=i.useCallback((function(e){T&&!w&&Object(v.a)(T,e,V(),void 0)}),[T,w,V]),he=i.useCallback((function(e){D&&!w&&Object(v.a)(D,e,V(),void 0)}),[D,w,V]),me=Object(b.a)(L,n.dir),ve=Object(c.a)({"k-state-disabled":w},p),ge=Ft({type:"checkbox",className:Object(c.a)({"k-checkbox":!0,"k-state-indeterminate":ne,"k-state-invalid k-invalid":!(le||void 0!==A||!0===A)}),ref:L,name:E,id:O||re,"aria-labelledby":a,"aria-describedby":o,checked:Boolean(ee),disabled:w,tabIndex:Object(u.a)(M,w),role:"checkbox",required:void 0!==P&&P,"aria-checked":!(!Z&&!ee)||!!ne&&"mixed","aria-disabled":w||void 0},F,{onChange:ue,onKeyDown:pe,onKeyUp:de,onFocus:fe,onBlur:he}),ye=i.createElement(i.Fragment,null,void 0===te?i.createElement("input",Ft({},ge)):i.createElement("input",Ft({},ge,{value:G?void 0:null===te?"":te}))),be=i.createElement(i.Fragment,null,void 0!==x?i.createElement("label",{className:"k-checkbox-label",htmlFor:O||re,style:{userSelect:"none"}},x,I&&i.createElement("span",{className:"k-label-optional"},se)):null);return i.createElement(i.Fragment,null,"before"===S?i.createElement("span",{className:ve,dir:"rtl"},ye,be,d):i.createElement("span",{className:ve,dir:me},ye,be,d))}));zt.propTypes={checked:a.bool,className:a.string,defaultChecked:a.bool,defaultValue:a.any,dir:a.string,disabled:a.bool,id:a.string,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},zt.displayName="KendoCheckbox";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=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},Kt=Object(d.a)(),Wt=i.forwardRef((function(e,t){Object(f.a)(h);var n=Object(z.a)(Kt,e),r=n.ariaDescribedBy,o=n.checked,a=n.children,s=n.className,p=n.disabled,d=n.id,m=n.label,g=n.labelPlacement,y=n.name,b=n.style,k=n.tabIndex,w=n.value,C=n.valid,O=n.onChange,x=n.onFocus,S=n.onBlur,E=Ht(n,["ariaDescribedBy","checked","children","className","disabled","id","label","labelPlacement","name","style","tabIndex","value","valid","onChange","onFocus","onBlur"]),I=i.useRef(null),N=i.useCallback((function(){I.current&&I.current.focus()}),[]),T=i.useCallback((function(){return{element:I.current,focus:N}}),[N]);i.useImperativeHandle(t,T);var D=i.useMemo((function(){return Object(l.a)()}),[]),M=i.useCallback((function(e){Object(v.a)(O,e,T(),{value:w})}),[O,w,p]),_=i.useCallback((function(e){x&&!p&&Object(v.a)(x,e,T(),void 0)}),[x,p]),P=i.useCallback((function(e){S&&!p&&Object(v.a)(S,e,T(),void 0)}),[S,p]),R=Vt({type:"radio",id:d||D,name:y,className:Object(c.a)({"k-radio":!0,"k-state-invalid":!1===C,"k-invalid":!1===C},s),ref:I,disabled:p,tabIndex:Object(u.a)(k,p),checked:o,style:b,"aria-describedby":r,value:w,onChange:M,onFocus:_,onBlur:P},E),j=i.createElement(i.Fragment,null,void 0!==m?i.createElement("label",{className:"k-radio-label",htmlFor:d||D,style:{userSelect:"none"},"aria-label":m},m):null),A=i.createElement("input",Vt({},R));return"before"===g?i.createElement(i.Fragment,null,j,A,a):i.createElement(i.Fragment,null,A,j,a)}));Wt.propTypes={ariaDescribedBy:a.string,checked:a.bool,className:a.string,disabled:a.bool,id:a.string,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},Wt.displayName="KendoRadioButton";var $t=n(91),Ut=function(){return(Ut=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)},qt=Object(d.a)(),Gt=i.forwardRef((function(e,t){Object(f.a)(h);var n=Object(z.a)(qt,e),r=n.ariaLabelledBy,o=n.ariaDescribedBy,a=n.className,u=n.data,p=n.defaultValue,d=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?Xt.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(p),D=T[0],M=T[1],_=void 0!==k,P=_?k:D,R=i.useCallback((function(e){var t=e.value;_||d||M(t),x&&!d&&Object(v.a)(x,e.syntheticEvent,N(),{value:t})}),[M,x,d]),j=i.useCallback((function(e){S&&!d&&Object(v.a)(S,e.syntheticEvent,N(),void 0)}),[S,d]),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),L=Object($t.a)(E,n.dir),B=u&&u.map((function(e,t){var n=P===e.value,r=null==P,o=Ut({},e,{valid:w,checked:n,disabled:!(!e.disabled&&!d),labelPlacement:e.labelPlacement?e.labelPlacement:g,tabIndex:e.tabIndex?e.tabIndex:r&&0===t||n?0:-1,index:t,name:m||A,onChange:R,onFocus:j});return i.createElement(O,{className:Object(c.a)("k-radio-item",{"k-state-disabled":o.disabled||d}),key:t,role:"radio"},i.createElement(Wt,Ut({},o)))}));return i.createElement("ul",{role:"radiogroup",className:F,ref:E,dir:L,style:b,"aria-labelledby":r,"aria-describedby":o},B)})),Xt={item:function(e){return i.createElement("li",Ut({},e))}};Gt.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},Gt.defaultProps=Xt,Gt.displayName="KendoRadioGroup";var 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,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},Zt=Object(d.a)(),Qt=i.forwardRef((function(e,t){var n=Object(z.a)(Zt,e),r=n,o=r.ariaDescribedBy,a=r.ariaLabelledBy,s=r.autoSize,p=r.className,d=r.defaultValue,f=r.disabled,h=r.readOnly,m=r.required,g=r.rows,y=r.id,k=r.name,w=r.placeholder,C=r.style,O=r.tabIndex,x=r.value,S=r.valid,E=r.validationMessage,I=r.validityStyles,N=r.onChange,T=r.onFocus,D=r.onBlur,M=(r.visited,r.touched,r.modified,Yt(r,["ariaDescribedBy","ariaLabelledBy","autoSize","className","defaultValue","disabled","readOnly","required","rows","id","name","placeholder","style","tabIndex","value","valid","validationMessage","validityStyles","onChange","onFocus","onBlur","visited","touched","modified"])),_=i.useRef(null),P=i.useCallback((function(){_.current&&_.current.focus()}),[]),R=i.useCallback((function(){return{element:_,focus:P,get name(){return _.current&&_.current.name}}}),[P]);i.useImperativeHandle(t,R);var j=i.useState(d),A=j[0],F=j[1],L=i.useState("auto"),B=L[0],V=L[1],H=i.useMemo((function(){return Object(l.a)()}),[]),K=Object(b.a)(_,n.dir),W=void 0!==x,$=W?x:A,U=void 0!==S?S:!m||!!$;i.useEffect((function(){_.current&&_.current.setCustomValidity&&_.current.setCustomValidity(U?"":E||"")}),[U,E]),i.useLayoutEffect((function(){_.current&&V(_.current.scrollHeight+"px")}),[$]);var q=i.useCallback((function(e){var t=e.target.value;W||f||(V("auto"),F(t)),N&&!f&&Object(v.a)(N,e,R(),{value:t})}),[F,N,f,W]),G=i.useCallback((function(e){T&&!f&&Object(v.a)(T,e,R(),void 0)}),[T,f]),X=i.useCallback((function(e){D&&!f&&Object(v.a)(D,e,R(),void 0)}),[D,f]),J={className:Object(c.a)("k-textarea",{"k-state-invalid":!(U||void 0!==I||!0===I),"k-state-disabled":f},p),style:C,dir:K},Y=Jt({id:y||H,name:k,className:"k-input",ref:_,disabled:f,rows:g,placeholder:w,readOnly:h,required:m,tabIndex:Object(u.a)(O,f),style:s?{resize:"none",overflow:"hidden",height:B}:{},"aria-labelledby":a,"aria-describedby":o,"aria-multiline":!0,"aria-disabled":f||void 0,value:W?x:A},M,{onChange:q,onFocus:G,onBlur:X});return i.createElement("span",Jt({},J),i.createElement("textarea",Jt({},Y)))}));Qt.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},Qt.displayName="KendoTextArea";var en=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]),p=i.useCallback((function(t){e.onMouseMove&&e.onMouseMove.call(void 0,{target:n.current,syntheticEvent:t})}),[e.onMouseMove]),d=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-state-selected":e.selected,"k-state-hovered":e.hovered},e.className),onClick:a,onKeyDown:s,onFocus:l,onBlur:u,onMouseEnter:d,onMouseLeave:f,onMouseMove:p},e.children)})),tn={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};en.displayName="KendoReactRatingItem",en.propTypes=tn,en.defaultProps={dir:"ltr"};var nn,rn=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},on=function(e,t,n){return rn(e-n,n)<t&&t<e},an=function(e,t,n,r){return null!==t&&("continues"===r?on(e,t,n)?rn(e-n/2,n/2)<=t:e<=t:"single"===r&&(on(e,t,n)?rn(e-n/2,n/2)===t:e===t))},sn=function(e,t,n){return"ltr"===e?n<t.x+t.width/2:n>t.x+t.width/2},ln=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"}(nn||(nn={}));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)},un=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 nn.select:return void 0===t.payload||void 0===t.step?e:t.payload===e?null:t.payload>=t.min?t.payload<t.max?rn(t.payload,t.step):t.max:t.min;case nn.deselect:return null;case nn.increase:return void 0===t.step?e:e<t.min?t.min:e+t.step<t.max?rn(e+t.step,t.step):t.max;case nn.decrease:return void 0===t.step?e:rn(e-t.step,t.step)>=t.min?rn(e-t.step,t.step):t.min;case nn.min:return void 0===t.step?e:t.min;case nn.max:return t.max;case nn.reset:return null;default:return e}}(t.state||o,cn({},e,t));n&&n(r,e.event),a(r)}]},pn=Object(d.a)(),dn=i.forwardRef((function(e,t){var n,r,o,a,s=Object(z.a)(pn,e),l=i.useRef(null),p=i.useRef(null),d=Object(b.a)(p,s.dir);i.useImperativeHandle(l,(function(){return{element:p.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:hn.min}),[s.min]),y=i.useMemo((function(){return void 0!==s.max?s.max:hn.max}),[s.max]),k=i.useMemo((function(){return s.precision||hn.precision}),[s.precision]),w=i.useMemo((function(){return void 0!==s.step?s.step:hn.step}),[s.step]),C=i.useMemo((function(){return s.readonly||hn.readonly}),[s.readonly]),O=i.useMemo((function(){return s.disabled||hn.disabled}),[s.disabled]),x=i.useMemo((function(){return s.item||hn.item}),[s.item]),S=un(s.defaultValue||hn.defaultValue,{state:s.value,min:g,max:y,step:"half"===k?w/2:w},v),E=S[0],I=S[1],N=un(null,{state:s.value,min:g,max:y,step:"half"===k?w/2:w,precision:k}),T=N[0],D=N[1],M=i.useMemo((function(){return s.value||E}),[s.value,E]),_=i.useMemo((function(){return T}),[T]),P=i.useMemo((function(){return s.selection||hn.selection}),[s.selection]),R=i.useMemo((function(){return w/("half"===k?2:1)}),[w,k]),j=i.useCallback((function(e){if(e.target&&e.target.element&&!C&&!O){if("half"===k){var t=e.target.element.getBoundingClientRect(),n=sn(d||"ltr",t,e.syntheticEvent.clientX)?rn(e.target.value-w/2,R):e.target.value;I({type:nn.select,payload:n,event:e.syntheticEvent})}else I({type:nn.select,payload:e.target.value,event:e.syntheticEvent});s.onClick&&s.onClick.call(void 0,{value:M,target:l.current,syntheticEvent:e.syntheticEvent})}}),[s.onClick,I,M]),A=i.useCallback((function(e){if(!C&&!O){switch(e.keyCode){case m.a.right:e.preventDefault(),I({type:"rtl"===d?nn.decrease:nn.increase,event:e});break;case m.a.left:e.preventDefault(),I({type:"rtl"===d?nn.increase:nn.decrease,event:e});break;case m.a.home:e.preventDefault(),I({type:"rtl"===d?nn.min:nn.max,event:e});break;case m.a.end:e.preventDefault(),I({type:"rtl"===d?nn.max:nn.min,event:e});break;case m.a.esc:e.preventDefault(),I({type:nn.deselect,event:e})}s.onKeyDown&&s.onKeyDown.call(void 0,{value:M,target:l.current,syntheticEvent:e})}}),[s.onKeyDown,I,M]),F=i.useCallback((function(e){s.onFocus&&s.onFocus.call(void 0,{target:l.current,syntheticEvent:e})}),[s.onFocus]),L=i.useCallback((function(e){s.onBlur&&s.onBlur.call(void 0,{target:l.current,syntheticEvent:e})}),[s.onBlur]),B=i.useCallback((function(e){if(e.target&&e.target.element)if("half"===k){var t=e.target.element.getBoundingClientRect(),n=sn(d||"ltr",t,e.syntheticEvent.clientX)?e.target.value-w/2:e.target.value;D({type:nn.select,payload:n,event:e.syntheticEvent})}else D({type:nn.select,payload:e.target.value,event:e.syntheticEvent})}),[k,w,d]),V=i.useCallback((function(e){D({type:nn.reset,event:e.syntheticEvent})}),[]),H=[],K=(f=rn(y-g,R))-(h=w)*Math.floor(f/h),W=g;W<=y;W=rn(W+w,R)){var $=rn(W+K,R),U="half"===k&&on($,null!==_?_:null!==M?M:0,w),q=an($,M,w,P),G=an($,null!==_?_:M,w,P),X=an($,_,w,P);H.push(i.createElement(x,{key:$,value:$,dir:d,title:String(U?rn($-w/2,R):$),icon:s.icon,half:U,selected:q||G,hovered:X,onClick:j,onMouseMove:B,onMouseLeave:V},U&&i.createElement("span",{className:"k-rating-precision-complement",style:(n={width:"12px"},n["rtl"===d?"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))})),U&&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))})),U&&i.createElement("span",{style:{width:"24px",height:"24px",display:"block"}}),!U&&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:p,role:"slider",dir:d,tabIndex:Object(u.a)(s.tabIndex,s.disabled,void 0),className:Object(c.a)("k-rating k-widget",{"k-rtl":"rtl"===d,"k-state-readonly":C,"k-state-disabled":O},s.className),onKeyDown:A,onFocus:F,onBlur:L,"aria-valuemin":g,"aria-valuemax":y,"aria-valuenow":null!==M?M: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))})),fn={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?ln(e.min,e.max,e.step/2,e.value):ln(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},hn={dir:"ltr",min:1,max:5,step:1,item:en,defaultValue:null,readonly:!1,disabled:!1,selection:"continues",precision:"item"};dn.displayName="KendoReactRating",dn.propTypes=fn,dn.defaultProps=hn},function(e,t,n){"use strict";n.r(t),n.d(t,"BrowserSupportService",(function(){return o})),n.d(t,"canUseDOM",(function(){return i})),n.d(t,"canUseRef",(function(){return a})),n.d(t,"classNames",(function(){return s})),n.d(t,"cloneDate",(function(){return l})),n.d(t,"clone",(function(){return c})),n.d(t,"cloneObject",(function(){return u})),n.d(t,"cloneValue",(function(){return p})),n.d(t,"cloneArray",(function(){return d})),n.d(t,"Draggable",(function(){return I})),n.d(t,"focusFirstFocusableChild",(function(){return N})),n.d(t,"FormComponent",(function(){return T})),n.d(t,"getTabIndex",(function(){return D})),n.d(t,"getter",(function(){return R})),n.d(t,"guid",(function(){return j})),n.d(t,"Keys",(function(){return A})),n.d(t,"noop",(function(){return F})),n.d(t,"getScrollbarWidth",(function(){return L})),n.d(t,"setScrollbarWidth",(function(){return B})),n.d(t,"setter",(function(){return H})),n.d(t,"mapTree",(function(){return $})),n.d(t,"mapTreeItem",(function(){return U})),n.d(t,"extendDataItem",(function(){return q})),n.d(t,"getItemPath",(function(){return G})),n.d(t,"validatePackage",(function(){return J})),n.d(t,"hasRelativeStackingContext",(function(){return Y})),n.d(t,"dispatchEvent",(function(){return Z})),n.d(t,"AsyncFocusBlur",(function(){return te})),n.d(t,"useDir",(function(){return ne})),n.d(t,"useAsyncFocusBlur",(function(){return Q})),n.d(t,"useDraggable",(function(){return re})),n.d(t,"useRtl",(function(){return oe})),n.d(t,"useMouse",(function(){return ie})),n.d(t,"useCustomComponent",(function(){return ae})),n.d(t,"Icon",(function(){return ue})),n.d(t,"SvgIcon",(function(){return he})),n.d(t,"Typography",(function(){return Ie}));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=" ",e.body.appendChild(t),this.scrollbar=t.offsetWidth-t.scrollWidth,e.body.removeChild(t)}return this.scrollbar},enumerable:!0,configurable:!0}),e}(),i=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),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=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return!0!==e&&!!e})).map((function(e){return Array.isArray(e)?s.apply(void 0,e):"object"==typeof e?Object.keys(e).map((function(t,n){return e[n]||e[t]&&t||null})).filter((function(e){return null!==e})).join(" "):e})).filter((function(e){return!!e})).join(" ")},l=function(e){return e?new Date(e.getTime()):null};function c(e){var t={};return u(e,t),t}function u(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 d(e);if(e instanceof Date)return l(e);if(e&&"object"==typeof e){var n=t||{};return u(e,n),n}return e}function d(e){return e.map((function(e){return p(e,void 0)}))}var f=n(0),h=n(1),m=function(e,t){return function(n){return t(e(n))}},v=function(e,t,n){return e.addEventListener&&e.addEventListener(t,n)},g=function(e,t,n){return e&&e.removeEventListener&&e.removeEventListener(t,n)},y=function(){},b=function(e){return e.preventDefault()},k=/touch/;function w(e){return e.type.match(k)?{pageX:e.changedTouches[0].pageX,pageY:e.changedTouches[0].pageY,clientX:e.changedTouches[0].clientX,clientY:e.changedTouches[0].clientY,type:e.type,originalEvent:e,isTouch:!0}:{pageX:e.pageX,pageY:e.pageY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,type:e.type,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,originalEvent:e}}var C=function(e){var t=this,n=e.press;void 0===n&&(n=y);var r=e.drag;void 0===r&&(r=y);var o=e.release;void 0===o&&(o=y);var i=e.mouseOnly;void 0===i&&(i=!1),this._pressHandler=m(w,n),this._dragHandler=m(w,r),this._releaseHandler=m(w,o),this._ignoreMouse=!1,this._mouseOnly=i,this._touchstart=function(e){1===e.touches.length&&t._pressHandler(e)},this._touchmove=function(e){1===e.touches.length&&t._dragHandler(e)},this._touchend=function(e){0===e.touches.length&&1===e.changedTouches.length&&(t._releaseHandler(e),t._ignoreMouse=!0,setTimeout(t._restoreMouse,2e3))},this._restoreMouse=function(){t._ignoreMouse=!1},this._mousedown=function(e){var n=e.which;n&&n>1||t._ignoreMouse||(v(t.document,"mousemove",t._mousemove),v(t.document,"mouseup",t._mouseup),t._pressHandler(e))},this._mousemove=function(e){t._dragHandler(e)},this._mouseup=function(e){g(t.document,"mousemove",t._mousemove),g(t.document,"mouseup",t._mouseup),t._releaseHandler(e)},this._pointerdown=function(e){e.isPrimary&&0===e.button&&(v(t.document,"pointermove",t._pointermove),v(t.document,"pointerup",t._pointerup),v(t.document,"pointercancel",t._pointerup),v(t.document,"contextmenu",b),t._pressHandler(e))},this._pointermove=function(e){e.isPrimary&&t._dragHandler(e)},this._pointerup=function(e){e.isPrimary&&(g(t.document,"pointermove",t._pointermove),g(t.document,"pointerup",t._pointerup),g(t.document,"pointercancel",t._pointerup),g(t.document,"contextmenu",b),t._releaseHandler(e))}},O={document:{configurable:!0}};C.supportPointerEvent=function(){return"undefined"!=typeof window&&window.PointerEvent},O.document.get=function(){return this._element?this._element.ownerDocument:document},C.prototype.bindTo=function(e){e!==this._element&&(this._element&&this._unbindFromCurrent(),this._element=e,this._bindToCurrent())},C.prototype._bindToCurrent=function(){var e=this._element;this._usePointers()?v(e,"pointerdown",this._pointerdown):(v(e,"mousedown",this._mousedown),this._mouseOnly||(v(e,"touchstart",this._touchstart),v(e,"touchmove",this._touchmove),v(e,"touchend",this._touchend)))},C.prototype._unbindFromCurrent=function(){var e=this._element;if(this._usePointers())return g(e,"pointerdown",this._pointerdown),g(this.document,"pointermove",this._pointermove),g(this.document,"pointerup",this._pointerup),g(this.document,"contextmenu",b),void g(this.document,"pointercancel",this._pointerup);g(e,"mousedown",this._mousedown),this._mouseOnly||(g(e,"touchstart",this._touchstart),g(e,"touchmove",this._touchmove),g(e,"touchend",this._touchend))},C.prototype._usePointers=function(){return!this._mouseOnly&&C.supportPointerEvent()},C.prototype.update=function(e){var t=e.press;void 0===t&&(t=y);var n=e.drag;void 0===n&&(n=y);var r=e.release;void 0===r&&(r=y);var o=e.mouseOnly;void 0===o&&(o=!1),this._pressHandler=m(w,t),this._dragHandler=m(w,n),this._releaseHandler=m(w,r),this._mouseOnly=o},C.prototype.destroy=function(){this._unbindFromCurrent(),this._element=null},Object.defineProperties(C.prototype,O),C.default=C;var x,S=C,E=(x=function(e,t){return(x=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}x(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),I=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.element=null,t.draggable=new S({press:function(e){t.element&&t.props.onPress&&t.props.onPress.call(void 0,{target:t,event:e,element:t.element})},drag:function(e){t.element&&t.props.onDrag&&t.props.onDrag.call(void 0,{target:t,event:e,element:t.element})},release:function(e){t.element&&t.props.onRelease&&t.props.onRelease.call(void 0,{target:t,event:e})}}),t.childRef=function(e){var n=t.props.childRef;t.element=e,n&&"function"==typeof n&&n(e)},t}return E(t,e),t.prototype.componentDidMount=function(){this.element&&this.draggable.bindTo(this.element)},t.prototype.componentWillUnmount=function(){this.draggable.destroy()},t.prototype.render=function(){return f.cloneElement(f.Children.only(this.props.children),{ref:this.childRef})},t.propTypes={children:h.element.isRequired},t}(f.Component),N=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()}},T=function(){},D=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},M=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;function _(e){var t=[];return e.replace(M,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}var P={};function R(e){if(P[e])return P[e];var t=_(e);return P[e]=function(e){for(var n=e,r=0;r<t.length&&n;r++)n=n[t[r]];return n},P[e]}P.undefined=function(){};var j=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},A={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},F=function(){},L=function(){return!(!i||!document.body)&&(new o).scrollbarWidth},B=function(){if(!i||!document.body)return!1;var e=(new o).scrollbarWidth;document.body.style.setProperty("--kendo-scrollbar-width",e+"px")},z={undefined:function(e){return e}},V=function(e,t){return t&&t.arrays&&!isNaN(Number(e))?[]:{}};function H(e){if(z[e])return z[e];var t=_(e);return z[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]]||V(t[a+1],r);o[t[i]]=n},z[e]}var 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)};function W(e,t,n){var r;return n?K({},e,((r={})[t]=n.length?n.slice():void 0,r)):e&&e[t]?e[t].slice():[]}var $=function(e,t,n){return e.map((function(e){return function e(t,n,r){if(t[n]){var o=W(t,n).map((function(t){return e(t,n,r)}));return r(W(t,n,o))}return r(t)}(e,t,n)})).slice()},U=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)},q=function(e,t,n){var r;return Object.assign({},e,e[t]?((r={})[t]=e[t].slice(),r):{},n||{})},G=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},X=n(5);function J(e){if(void 0!==X)X.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)}}var Y=function(e){if(!i)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};function Z(e,t,n,r){if(e){var o={syntheticEvent:t,nativeEvent:t.nativeEvent,target:n};e.call(void 0,Object.assign(o,r))}}function Q(e){var t=e.onFocus,n=e.onBlur,r=e.onSyncFocus,o=e.onSyncBlur,i=f.useRef(!1),a=f.useRef(0),s=f.useCallback((function(e){clearTimeout(a.current),a.current=window.setTimeout((function(){return e()}))}),[a]),l=f.useCallback((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];clearTimeout(a.current),r&&r.call.apply(r,[void 0].concat(e)),i.current||(i.current=!0,t&&t.call.apply(t,[void 0].concat(e)))}),[i,t,r]),c=f.useCallback((function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o&&o.call.apply(o,[void 0].concat(e)),s((function(){i.current&&n&&(i.current=!1,n.call.apply(n,[void 0].concat(e)))}))}),[i,s,n,o]);return f.useEffect((function(){return function(){clearTimeout(a.current)}}),[]),{onFocus:l,onBlur:c}}var ee=function(){return(ee=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)},te=function(e){var t=e.children,n=Q({onFocus:e.onFocus,onBlur:e.onBlur,onSyncFocus:e.onSyncFocus,onSyncBlur:e.onSyncBlur});return t.call(void 0,ee({},n))};function ne(e,t,n){var r=f.useState(t),o=r[0],i=r[1];return f.useEffect((function(){if(!o&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),o}function re(e,t){var n=t.onPress,r=t.onDrag,o=t.onRelease,i=f.useMemo((function(){return new S({press:n,drag:r,release:o})}),[]);f.useEffect((function(){var t=e.current;if(t)return i.bindTo(t),function(){i.destroy()}}),[]),f.useEffect((function(){i.update({press:n,drag:r,release:o})}),[n,r,o])}function oe(e,t,n){var r=f.useState(t),o=r[0],i=r[1];return f.useEffect((function(){if(!o&&window&&e.current){var t=window.getComputedStyle(e.current).direction;t&&i(t)}}),n),o}var ie=function(e,t,n){void 0===n&&(n={});var r=f.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]),o=f.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:f.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:o,onMouseDown:r,onDoubleClick:f.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:f.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:f.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:f.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:f.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:f.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])}},ae=function(e){return f.isValidElement(e)?[e.type,e.props]:[e,{}]},se={default:"",xsmall:"k-icon-xs",small:"k-icon-sm",medium:"k-icon-md",large:"k-icon-lg",xlarge:"k-icon-xl"},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=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},ue=f.forwardRef((function(e,t){var n=e.className,r=e.name,o=e.themeColor,i=e.size,a=e.flip,l=e.style,c=ce(e,["className","name","themeColor","size","flip","style"]),u=f.useRef(null),p=f.useRef(null);f.useImperativeHandle(u,(function(){return{element:p.current}})),f.useImperativeHandle(t,(function(){return u.current}));var d=f.useMemo((function(){return o||pe.themeColor}),[o]),h=f.useMemo((function(){return i||pe.size}),[i]),m=f.useMemo((function(){return a||pe.flip}),[a]),v=f.useMemo((function(){return s("k-icon","k-i-"+r,"k-color-"+d,{"k-flip-h":"horizontal"===m||"both"===m,"k-flip-v":"vertical"===m||"both"===m},se[h],n)}),[r,d,h,m,n]),g=ie(e,u);return f.createElement("span",le({ref:p},c,g,{className:v,style:l,role:"presentation"}))}));ue.propTypes={style:h.object,classNames:h.string,name:h.string,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var pe={size:"default",themeColor:"inherit",flip:"default"};ue.displayName="KendoIcon";var de=function(){return(de=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=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},he=f.forwardRef((function(e,t){var n=e.children,r=e.className,o=e.svgClassName,i=e.icon,a=e.flip,l=e.size,c=e.style,u=e.svgStyle,p=e.themeColor,d=e.viewBox,h=fe(e,["children","className","svgClassName","icon","flip","size","style","svgStyle","themeColor","viewBox"]),m=f.useRef(null);f.useImperativeHandle(t,(function(){return{element:m.current}}));var v=f.useMemo((function(){return i?i.name:me.icon}),[i]),g=f.useMemo((function(){return p||me.themeColor}),[p]),y=f.useMemo((function(){return l||me.size}),[l]),b=f.useMemo((function(){return a||me.flip}),[a]),k=f.useMemo((function(){return d||me.viewBox}),[d]),w=f.useMemo((function(){return s("k-svg-icon","k-color-"+g,"k-svg-i-"+v,{"k-flip-h":"horizontal"===b||"both"===b,"k-flip-v":"vertical"===b||"both"===b},se[y],r)}),[v,g,y,b,r]),C=f.useMemo((function(){return e.width&&e.height?de({width:e.width,height:e.height},c):e.width?de({width:e.width,height:e.width},c):e.height?de({width:e.height,height:e.height},c):de({},c)}),[e.width,e.height,c]);return f.createElement("span",{className:w,style:C,ref:m},f.createElement("svg",de({className:o,style:u,"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))}));he.propTypes={style:h.object,classNames:h.string,children:h.any,icon:h.object,themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"]),size:h.oneOf(["default","xsmall","small","medium","large","xlarge"]),flip:h.oneOf(["default","horizontal","vertical","both"])};var me={size:"default",themeColor:"inherit",flip:"default",icon:"",viewBox:"0 0 24 24"};he.displayName="KendoSvgIcon";var ve={xsmall:"k-fs-xs",small:"k-fs-sm",medium:"k-fs-md",large:"k-fs-lg",xlarge:"k-fs-xl"},ge={light:"k-font-weight-light",normal:"k-font-weight-normal",bold:"k-font-weight-bold"},ye={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"},be={xsmall:"xs",small:"sm",medium:"md",large:"lg",xlarge:"xl",thin:"thin",hair:"hair"},ke={top:"k-mt-",right:"k-mr-",bottom:"k-mb-",left:"k-ml-"},we={left:"k-text-left",right:"k-text-right",center:"k-text-center",justify:"k-text-justify"},Ce={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"},xe=function(){return(xe=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)},Se=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=function(e){var t=f.forwardRef((function(t,n){var r=t.className,o=t.fontSize,i=t.fontWeight,a=t.textAlign,s=t.textTransform,l=t.themeColor,c=t.margin,u=Se(t,["className","fontSize","fontWeight","textAlign","textTransform","themeColor","margin"]),p=f.useRef(null),d=f.useRef(null);f.useImperativeHandle(p,(function(){return{element:d.current,props:t}})),f.useImperativeHandle(n,(function(){return p.current}));var h=e,m=function(){if(void 0!==c){if("string"==typeof c)return[ye[c]];if("number"==typeof c&&c>=0&&c<=24)return["k-m-"+c];if("object"==typeof c){var e=[];return Object.keys(c).forEach((function(t){var n,r;null!==c[t]&&void 0!==c[t]&&e.push((n=t,r=c[t],""+ke[n]+("string"==typeof r?be[r]:r)))})),e.join(" ")}}};return f.createElement(h,xe({ref:d,className:["k-"+("p"===e?"paragraph":e),ve[o],ge[i],we[a],Ce[s],Oe[l],m(),r].filter((function(e){return void 0!==e})).join(" ")},u),t.children)}));return t.propTypes={style:h.object,className:h.string,fontSize:h.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:h.oneOf(["light","normal","bold"]),margin:h.oneOfType([h.number,h.object,h.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:h.oneOf(["left","right","center","justify"]),textTransform:h.oneOf(["lowercase","uppercase","capitalize"]),themeColor:h.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","dark","light","inverse"])},t.displayName="KendoReactTypography"+e.toUpperCase(),t},Ie={h1:Ee("h1"),h2:Ee("h2"),h3:Ee("h3"),h4:Ee("h4"),h5:Ee("h5"),h6:Ee("h6"),p:Ee("p"),code:Ee("code"),pre:Ee("pre")}},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 B})),n.d(t,"TreeListPDFExport",(function(){return W}));var r=n(0),o=n(1),i=n(11);function a(e,t,n){void 0===n&&(n={});var r=p;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 p(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 d,f=(d=function(e,t){return(d=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}d(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(39),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(5),k={name:"@progress/kendo-react-pdf",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:1640167890,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(13),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}}},D=N("TABLE"),M=function(e){return e?"locked":"wrap"},_=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-"+M(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-"+M(e)))},e.prototype.table=function(){return T(this.element,D)},e}(),P=function(e,t){for(var n=t.length,r=0;r<n;r++)e.appendChild(t[r].cloneNode(!0))},R=function(e){var t=document.createElement("div");return t.className="k-widget k-grid",t.appendChild(e),t},j=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++)P(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++)P(i,e[a].querySelectorAll("col"));var s=j(t),l=j(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=j(r);c.className="k-grid-footer",o.appendChild(c)}return R(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 _(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=R(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),e}(),n,p)}function p(){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 L=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)}}(),B=function(e){function t(t){var n=e.call(this,t)||this;return n.saveGridPDF=F(n.getSavePDF()),n}return L(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),z=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,z)},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=R(n.table().cloneNode(!0));return t}(l);return c.appendChild(e),document.body.appendChild(c),c}(),n,p)}function p(){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((d=n.allPages&&i?{data:i,take:Number.MAX_VALUE,skip:0}:{},f={style:Object.assign({},t.props.style,{width:"1000px"})},h=Object.assign({},d,f),a&&a.length>0?r.cloneElement(t,Object.assign({},h,{columns:a})):r.cloneElement(t,h)),l,u);var d,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 k}));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,p=n.width*n.height,d=l*c;return Number((d/(u+p-d)).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&&!c(n)&&n!==document.body;)n=n.parentNode;return n===document.body?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 p=function(){},d=function(e,t,n){void 0===n&&(n={});var o,a,c,d,f=n.onIsPressedChange,h=void 0===f?p:f,m=n.onIsScrollingChange,v=void 0===m?p:m,g=n.onVelocityChange,y=void 0===g?p:g,b=n.onOffsetChange,k=void 0===b?p:b,w=n.onPageOffsetChange,C=void 0===w?p:w,O=n.onClientOffsetChange,x=void 0===O?p:O,S=n.onScrollOffsetChange,E=void 0===S?p:S,I=n.onInitialScrollOffsetChange,N=void 0===I?p:I,T=t.payload,D=T.element,M=T.hint,_=e.autoScrollDirection,P=e.scrollableParent,R=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(R.type){case r.POINTER_DOWN:if(R.type===r.POINTER_DOWN&&(!R.originalEvent.isPrimary||0!==R.originalEvent.button))break;case r.MOUSE_DOWN:if(R.type===r.MOUSE_DOWN&&R.originalEvent.which&&R.originalEvent.which>1||e.ignoreMouse)break;case r.TOUCH_START:if(R.type===r.TOUCH_START&&1!==R.originalEvent.touches.length)break;case r.START:var j=P||u(t.payload.element);N(j instanceof Window?{x:j.scrollX,y:j.scrollY}:{x:j.scrollLeft,y:j.scrollTop}),x({x:R.clientX,y:R.clientY}),C({x:R.pageX,y:R.pageY}),k({x:R.offsetX,y:R.offsetY}),h(!0),T.onPress&&T.onPress(R);break;case r.SCROLL:if(R.type===r.SCROLL&&!e.pressed)break;var A=P||u(D),F=A instanceof Window?{x:A.scrollX,y:A.scrollY}:{x:A.scrollLeft,y:A.scrollTop};R.scrollX=F.x-e.initialScrollOffset.x,R.scrollY=F.y-e.initialScrollOffset.y,E({x:R.scrollX,y:R.scrollY});case r.POINTER_MOVE:if(R.type===r.POINTER_MOVE&&!R.originalEvent.isPrimary)break;case r.MOUSE_MOVE:case r.TOUCH_MOVE:if(R.type===r.TOUCH_MOVE&&1!==R.originalEvent.touches.length)break;case r.MOVE:if(e.pressed){if(e.autoScroll&&"scroll"!==R.originalEvent.type&&D){var L=s(D),B=P||u(L.elementFromPoint(R.clientX,R.clientY)),z=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}(R.pageX,R.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}}(B,function(e){var t=s(e);return t&&t.defaultView||window}(D)));y({x:_&&!1===_.horizontal?0:z.x,y:_&&!1===_.vertical?0:z.y}),v(0!==z.y||0!==z.x)}!e.drag&&T.onDragStart&&T.onDragStart(R),T.onDrag&&T.onDrag(R);var V=i(M||D,e.drops.map((function(e){return e&&e.element})).filter((function(e){return e!==(M||D)}))),H=e.drops.find((function(e){return e.element===V}));H&&V&&(o=R.clientX,a=R.clientY,c=P||u(V),(d=c.getBoundingClientRect()).top<=a&&d.left<=o&&a<=d.bottom&&o<=d.right)&&V!==D?(e.drop&&e.drop.element)!==V?(e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(R),H.onDragEnter&&H.onDragEnter(R)):H.onDragOver&&H.onDragOver(R):e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(R)}x({x:R.clientX,y:R.clientY}),C({x:R.pageX,y:R.pageY});break;case r.POINTER_UP:if(R.type===r.POINTER_UP&&!R.originalEvent.isPrimary)break;case r.MOUSE_UP:case r.TOUCH_END:if(R.type===r.TOUCH_END&&1!==R.originalEvent.touches.length)break;case r.END:h(!1),v(!1),T.onRelease&&T.onRelease(R),e.drop&&e.drop.onDrop&&e.drop.onDrop(R),T.onDragEnd&&T.onDragEnd(R);break;case r.POINTER_CANCEL:case r.CONTEXT_MENU:case r.TOUCH_CANCEL:case r.CANCEL:h(!1),v(!1),T.onDragEnd&&T.onDragEnd(R),e.drop&&e.drop.onDragLeave&&e.drop.onDragLeave(R)}},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(10),m=function(e,t){var n=o.useContext(e),r=n[0],i=n[1],a=o.useState(t),s=a[0],l=a[1];return[void 0!==r?r:s,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];void 0!==r?i.apply(void 0,e):l(e[0])}]},v=o.createContext([void 0,h.a]),g=o.createContext([void 0,h.a]),y=o.createContext([[],h.a,h.a]),b=o.createContext([[],h.a,h.a]);function k(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,p=t.onDrag,k=void 0===p?h.a:p,w=t.onDragEnd,C=void 0===w?h.a:w,O=n.hint,x=void 0===O?null:O,S=n.mouseOnly,E=void 0!==S&&S,I=n.autoScroll,N=void 0===I||I,T=n.scrollContainer,D=void 0===T?null:T,M=o.useState(!1),_=M[0],P=M[1],R=o.useState(!1),j=R[0],A=R[1],F=m(g)[0],L=m(v),B=L[0],z=L[1],V=o.useContext(b)[0],H=o.useContext(y),K=H[0],W=H[1],$=H[2],U=o.useRef({x:0,y:0}),q=o.useRef(),G=o.useRef(!1),X=o.useRef(),J=o.useRef(!1),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=o.useRef({x:0,y:0}),ne=o.useRef({x:0,y:0}),re=Boolean(window&&"undefined"!=typeof window&&window.PointerEvent),oe=!E&&re,ie=o.useCallback((function(){return e.current&&e.current.element?e.current.element:e.current}),[e]),ae=o.useCallback((function(){return x&&x.current&&x.current.element?x.current.element:x?x.current:null}),[x]),se=o.useCallback((function(){return D&&D.current&&D.current.element?D.current.element:D?D.current:null}),[D]),le=o.useCallback((function(){return"object"==typeof N&&N.boundaryElementRef&&N.boundaryElementRef.current&&N.boundaryElementRef.current.element?N.boundaryElementRef.current.element:"object"==typeof N&&N.boundaryElementRef&&N.boundaryElementRef.current?N.boundaryElementRef.current:null}),[N]),ce=o.useRef(null);o.useImperativeHandle(ce,(function(){return{element:ie(),hint:ae(),onPress:Ce,onDragStart:xe,onDrag:Se,onDragEnd:Ee,onRelease:Oe,data:e.current}}));var ue=o.useCallback((function(){var e=ie();return e&&e.ownerDocument||document}),[ie]),pe=o.useCallback((function(){var e=ue();return e&&e.defaultView||window}),[ue]),de=o.useCallback((function(){return{drag:B?B.current:null,drop:F?F.current:null,drags:K.map((function(e){return e.current})),drops:V.map((function(e){return e.current})),pressed:_,ignoreMouse:G.current,scrollOffset:te.current,offset:Y.current,pageOffset:Z.current,initialScrollOffset:ne.current,clientOffset:Q.current,initialClientOffset:ee.current,velocity:U.current,autoScroll:Boolean("object"==typeof N?!1!==N.enabled:N),scrollableParent:le(),autoScrollDirection:"object"==typeof N?N.direction:{horizontal:!0,vertical:!0},isScrolling:j}}),[B,F,K,V,_,N,le,j]),fe=o.useCallback((function(e){P(e)}),[]),he=o.useCallback((function(e){A(e)}),[]),me=o.useCallback((function(e){U.current=e}),[]),ve=o.useCallback((function(e){Y.current=e}),[]),ge=o.useCallback((function(e){Q.current=e}),[]),ye=o.useCallback((function(e){Z.current=e}),[]),be=o.useCallback((function(e){ee.current=e}),[]),ke=o.useCallback((function(e){te.current=e}),[]),we=o.useCallback((function(e){ne.current=e}),[]),Ce=o.useCallback((function(e){i(e)}),[i]),Oe=o.useCallback((function(e){s(e)}),[s]),xe=o.useCallback((function(t){z(ce,{target:e.current,event:t}),c(t)}),[z,e,c]),Se=o.useCallback((function(e){k(e)}),[k]),Ee=o.useCallback((function(t){J.current||(z(null,{target:e.current,event:t}),C(t))}),[C,z,e]),Ie=o.useCallback((function(e){d(de(),{event:e,payload:ce.current},{onVelocityChange:me,onOffsetChange:ve,onClientOffsetChange:ge,onPageOffsetChange:ye,onInitialClientOffsetChange:be,onScrollOffsetChange:ke,onInitialScrollOffsetChange:we,onIsPressedChange:fe,onIsScrollingChange:he})}),[de,me,ve,ye,ge,be,we,fe,ke,he]),Ne=o.useCallback((function(e){Ie(e)}),[Ie]),Te=o.useCallback((function(e){Ie(e)}),[Ie]),De=o.useCallback((function(e){Ie(e)}),[Ie]),Me=o.useCallback((function(e){Ie(e)}),[Ie]),_e=o.useCallback((function(e){Ie(e)}),[Ie]),Pe=o.useCallback((function(e){Ie(e)}),[Ie]),Re=o.useCallback((function(e){Ie(e)}),[Ie]),je=o.useCallback((function(e){e.preventDefault(),Ie(e)}),[Ie]),Ae=o.useCallback((function(e){e.preventDefault(),Ie(e)}),[Ie]),Fe=o.useCallback((function(e){e.preventDefault(),Ie(e)}),[Ie]),Le=o.useCallback((function(e){if(0===e.touches.length&&1===e.changedTouches.length){var t=pe();G.current=!0,X.current=t.setTimeout((function(){G.current=!1}),2e3)}Ie(e)}),[Ie,pe]),Be=o.useCallback((function(e){Ie(e)}),[Ie]),ze=o.useCallback((function(){var e=ie();if(e){var t=e.style.touchAction;return e.style.touchAction="none",function(){e.style.touchAction=t}}}),[ie]),Ve=o.useCallback((function(){return W(ce),function(){$(ce)}}),[$,W]);o.useEffect((function(){var e=pe();if(j){var t=se()||u(document.elementFromPoint(Q.current.x,Q.current.y));e.clearInterval(q.current),q.current=e.setInterval((function(){f(t,{x:U.current.x,y:U.current.y})}),50)}return function(){e.clearInterval(q.current)}}),[ie,se,pe,j]),o.useEffect(ze,[ze]),o.useEffect((function(){var e=pe(),t=ie(),n=ue();if(oe){if(t)u(t).addEventListener("scroll",Be,{passive:!0}),t.addEventListener("pointerdown",Ne,{passive:!0});_&&(n.addEventListener("pointermove",Te),n.addEventListener("pointerup",Me,!0),n.addEventListener("contextmenu",je),n.addEventListener("pointercancel",De,{passive:!0}))}else e.addEventListener("touchmove",h.a,{capture:!1,passive:!1}),t&&(t.addEventListener("mousedown",_e,{passive:!0}),E||(t.addEventListener("touchstart",Ae,{passive:!0}),_&&(t.addEventListener("touchmove",Fe,{passive:!0}),t.addEventListener("touchend",Le,{passive:!0})))),_&&(n.addEventListener("mousemove",Pe,{passive:!0}),n.addEventListener("mouseup",Re,{passive:!0}));return function(){if(t){var r=u(t);r&&r.removeEventListener("scroll",Be),t.removeEventListener("pointerdown",Ne),t.removeEventListener("mousedown",_e),t.removeEventListener("touchstart",Ae),t.removeEventListener("touchmove",Fe),t.removeEventListener("touchend",Le)}n.removeEventListener("pointermove",Te),n.removeEventListener("pointerup",Me,!0),n.removeEventListener("contextmenu",je),n.removeEventListener("pointercancel",De),n.removeEventListener("mousemove",Pe),n.removeEventListener("mouseup",Re),e.removeEventListener("touchmove",h.a),e.clearTimeout(X.current)}}),[_,pe,ie,ue,E,oe,je,_e,Pe,Re,De,Ne,Te,Me,Le,Fe,Ae,Be]),o.useEffect((function(){return function(){J.current=!0}}),[]),o.useLayoutEffect(Ve,[Ve])}},,,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";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}));var r=n(0),o=r.createContext(0);o.displayName="KendoReactZIndexContext"},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 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,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),o=n(38),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 i}));var r=n(0),o=n(78),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]),p=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:p},{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";n.d(t,"a",(function(){return d}));var r,o=n(0),i=n(1),a=n(24),s=n(10),l=n(18),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)},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},d=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=p(t,["direction","children","childFactory"]),l=this.state,c=l.maxHeight,d=l.maxWidth,f={maxHeight:(e="vertical"===n?{maxHeight:c?c+"px":null}:{maxWidth:d?d+"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 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 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 d}));var r,o=n(0),i=n(1),a=n(19),s=n(3),l=n(17),c=n(30),u=n(23),p=(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(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 p(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,p=e.editorDisabled,d=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-textbox-container":!0,"k-state-focused":this.state.focused,"k-state-empty":!c&&!i&&0!==i,"k-text-disabled":p,"k-rtl":"rtl"===this.props.dir},r),b=Object(a.a)({"k-label":!0,"k-text-error":!1===u,"k-text-disabled":p});return o.createElement("span",{className:y,onFocus:this.handleFocus,onBlur:this.handleBlur,style:d,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)(d)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g;var o={};function i(e){if(o[e])return o[e];var t=function(e){var t=[];return e.replace(r,(function(e,n,r,o){t.push(void 0!==n?n:r||o)})),t}(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(){}}])}));
|