UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

2 lines 178 kB
/* @license */ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`kendo.core.min.js`),require(`kendo.licensing.min.js`),require(`kendo.data.min.js`),require(`kendo.icons.min.js`),require(`kendo.dropdownbutton.min.js`),require(`kendo.button.min.js`),require(`kendo.toolbar.min.js`),require(`kendo.avatar.min.js`),require(`kendo.html.button.min.js`),require(`kendo.promptbox.min.js`),require(`kendo.speechtotextbutton.min.js`),require(`kendo.textarea.min.js`),require(`kendo.textbox.min.js`),require(`kendo.upload.min.js`),require(`kendo.menu.min.js`)):typeof define==`function`&&define.amd?define([`exports`,`kendo.core.min`,`kendo.licensing.min`,`kendo.data.min`,`kendo.icons.min`,`kendo.dropdownbutton.min`,`kendo.button.min`,`kendo.toolbar.min`,`kendo.avatar.min`,`kendo.html.button.min`,`kendo.promptbox.min`,`kendo.speechtotextbutton.min`,`kendo.textarea.min`,`kendo.textbox.min`,`kendo.upload.min`,`kendo.menu.min`],t):(e=typeof globalThis<`u`?globalThis:e||self,t((e.kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.Chat={}),e.kendo._globals.Core,e.kendo._globals.Licensing,e.kendo._globals.Data,e.kendo._globals.Icons,e.kendo._globals.Dropdownbutton,e.kendo._globals.Button,e.kendo._globals.Toolbar,e.kendo._globals.Avatar,e.kendo._globals.HtmlButton,e.kendo._globals.Promptbox,e.kendo._globals.Speechtotextbutton,e.kendo._globals.Textarea,e.kendo._globals.Textbox,e.kendo._globals.Upload,e.kendo._globals.Menu))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var g=Object.create,_=Object.defineProperty,v=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyNames,b=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,S=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=y(t),a=0,o=i.length,s;a<o;a++)s=i[a],!x.call(e,s)&&s!==n&&_(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=v(t,s))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:g(b(e)),S(t||!e||!e.__esModule?_(n,`default`,{value:e,enumerable:!0}):n,e)))(n);let C=`undefined`;function w(e,t,n){for(let n in t)if(t.hasOwnProperty(n)&&t[n].test(e))return n;return n===void 0?e:n}let T=new class{constructor(){this._scrollbar=void 0,this.scrollbar=this.scrollbar.bind(this),this.isRtl=this.isRtl.bind(this),this.detectOS=this.detectOS.bind(this),this.detectBrowser=this.detectBrowser.bind(this),this.detectClipboardAccess=this.detectClipboardAccess.bind(this),this.zoomLevel=this.zoomLevel.bind(this),this.delayedClick=this.delayedClick.bind(this),this.initialize()}initialize(){let e=window,t=document,n=navigator,r=t.createElement(`table`);try{r.innerHTML=`<tr><td></td></tr>`,this.tbodyInnerHtml=!0}catch{this.tbodyInnerHtml=!1}this.touch=`ontouchstart`in e;let i=t.documentElement.style,a=`HTMLElement`in e?HTMLElement.prototype:[];this.transforms=this.transitions={css:``,prefix:``,event:`transitionend`},this.hasHW3D=`WebKitCSSMatrix`in e&&`m11`in new e.WebKitCSSMatrix||`MozPerspective`in i||`msPerspective`in i,this.cssFlexbox=`flexWrap`in i||`WebkitFlexWrap`in i||`msFlexWrap`in i,this.devicePixelRatio=e.devicePixelRatio===void 0?1:e.devicePixelRatio;try{this.screenWidth=e.outerWidth||e.screen?e.screen.availWidth:e.innerWidth,this.screenHeight=e.outerHeight||e.screen?e.screen.availHeight:e.innerHeight}catch{this.screenWidth=e.screen.availWidth,this.screenHeight=e.screen.availHeight}let o=this.detectOS(n.userAgent);this.mobileOS=o,this.wpDevicePixelRatio=o&&o.wp?screen.width/320:0,this.hasNativeScrolling=!1,o&&(o.ios||o.android&&parseInt(o.majorVersion)>2||o.wp)&&(this.hasNativeScrolling=o),this.mouseAndTouchPresent=this.touch&&!(o&&(o.ios||o.android)),this.browser=this.detectBrowser(n.userAgent),!o&&this.touch&&this.browser.safari&&(o=this.mobileOS={ios:!0,tablet:`tablet`,device:`ipad`,majorVersion:`13`,minorVersion:`0`,flatVersion:`1300`,cordova:!1,appMode:!1,name:`ios`,browser:`mobilesafari`}),this.clipboard=this.detectClipboardAccess(),this.eventCapture=!!t.documentElement.addEventListener;let s=t.createElement(`input`);this.placeholder=`placeholder`in s,this.propertyChangeEvent=`onpropertychange`in s,this.input=this.detectInputTypes(s),s.style.cssText=`float:left;`,this.cssFloat=!!s.style.cssFloat,this.stableSort=this.detectStableSort(),this.matchesSelector=a.webkitMatchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.matchesSelector||a.matches||function(e){let n=t.querySelectorAll?(this.parentNode||t).querySelectorAll(e)||[]:$(e),r=n.length;for(;r--;)if(n[r]===this)return!0;return!1},this.matchMedia=`matchMedia`in e,this.pushState=!!(e.history&&e.history.pushState),this.hashChange=`onhashchange`in e,this.customElements=`registerElement`in t;let c=this.browser.chrome,l=this.browser.crios,u=this.browser.mozilla,d=this.browser.safari;this.msPointers=!c&&e.MSPointerEvent,this.pointers=!c&&!l&&!u&&!d&&e.PointerEvent,this.kineticScrollNeeded=!!(o&&(o.device!==`ipad`||parseInt(o.majorVersion)<13)&&(this.touch||this.msPointers||this.pointers)),this.touch?this.mobileOS?(this.mousedown=`touchstart`,this.mouseup=`touchend`,this.mousemove=`touchmove`,this.mousecancel=`touchcancel`,this.click=`touchend`,this.resize=`orientationchange`):(this.mousedown=`mousedown touchstart`,this.mouseup=`mouseup touchend`,this.mousemove=`mousemove touchmove`,this.mousecancel=`mouseleave touchcancel`,this.click=`click`,this.resize=`resize`):this.pointers?(this.mousemove=`pointermove`,this.mousedown=`pointerdown`,this.mouseup=`pointerup`,this.mousecancel=`pointercancel`,this.click=`pointerup`,this.resize=`orientationchange resize`):this.msPointers?(this.mousemove=`MSPointerMove`,this.mousedown=`MSPointerDown`,this.mouseup=`MSPointerUp`,this.mousecancel=`MSPointerCancel`,this.click=`MSPointerUp`,this.resize=`orientationchange resize`):(this.mousemove=`mousemove`,this.mousedown=`mousedown`,this.mouseup=`mouseup`,this.mousecancel=`mouseleave`,this.click=`click`,this.resize=`resize`),this.addBrowserCssClasses($)}scrollbar(e){if(!isNaN(this._scrollbar)&&!e)return this._scrollbar;let t=document.createElement(`div`);return t.style.cssText=`overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block`,t.innerHTML=`&nbsp;`,document.body.appendChild(t),this._scrollbar=t.offsetWidth-t.scrollWidth,document.body.removeChild(t),this._scrollbar}isRtl(e){return $(e).closest(`.k-rtl`).length>0}detectOS(e){let t=!1,n,r=null,i=!/mobile safari/i.test(e),a={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},o={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},s={tablet:/playbook|ipad|fire/i},c={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i,edge:/edge|edg|edgios|edga/i};for(let l in a)if(a.hasOwnProperty(l)&&(r=e.match(a[l]),r)){if(l===`windows`&&`plugins`in navigator)return!1;t={},t.device=l,t.tablet=w(l,s,!1),t.browser=w(e,c,`default`),t.name=w(l,o),t[t.name]=!0,t.majorVersion=r[2],t.minorVersion=(r[3]||`0`).replace(`_`,`.`),n=t.minorVersion.replace(`.`,``).substr(0,2),t.flatVersion=t.majorVersion+n+Array(3-(n.length<3?n.length:2)).join(`0`),t.cordova=typeof window.PhoneGap!==C||typeof window.cordova!==C,t.appMode=!!navigator.standalone||/file|local|wmapp/.test(window.location.protocol)||t.cordova,t.android&&(this.devicePixelRatio<1.5&&parseInt(t.flatVersion)<400||i)&&(this.screenWidth>800||this.screenHeight>800)&&(t.tablet=l);break}return t}detectBrowser(e){let t=!1,n,r,i={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(let a in i)if(i.hasOwnProperty(a)&&(n=e.match(i[a]),n)){t={},t[a]=!0,t[n[1].toLowerCase().split(` `)[0].split(`/`)[0]]=!0,t.version=parseInt(document.documentMode||n[2],10),t.chrome&&(r=e.match(/(edg)[ \/]([\w.]+)/i),r&&(t.chromiumEdge=!0));break}return t||{version:0}}detectClipboardAccess(){let e=document,t={copy:e.queryCommandSupported?e.queryCommandSupported(`copy`):!1,cut:e.queryCommandSupported?e.queryCommandSupported(`cut`):!1,paste:e.queryCommandSupported?e.queryCommandSupported(`paste`):!1};return this.browser.chrome&&(t.paste=!1,this.browser.version>=43&&(t.copy=!0,t.cut=!0)),t}zoomLevel(){try{let e=this.browser,t=0,n=document.documentElement;return e.msie&&e.version===11&&n.scrollHeight>n.clientHeight&&!this.touch&&(t=this.scrollbar()),this.touch?n.clientWidth/window.innerWidth:e.msie&&e.version>=10?((top||window).document.documentElement.offsetWidth+t)/(top||window).innerWidth:1}catch{return 1}}delayedClick(){if(this.touch){let e=this.mobileOS;if(e&&e.ios)return!0;if(e&&e.android)return this.browser.chrome?this.browser.version<32?!1:!($(`meta[name=viewport]`).attr(`content`)||``).match(/user-scalable=no/i):!0}return!1}detectInputTypes(e){let t=[`number`,`date`,`time`,`month`,`week`,`datetime`,`datetime-local`],n=`test`,r={};for(let i of t)e.setAttribute(`type`,i),e.value=n,r[i.replace(`-`,``)]=e.type!==`text`&&e.value!==n;return r}detectStableSort(){let e=[{index:0,field:`b`}];for(let t=1;t<513;t++)e.push({index:t,field:`a`});return e.sort((e,t)=>e.field>t.field?1:e.field<t.field?-1:0),e[0].index===1}addBrowserCssClasses(e){let t=this.browser,n=``,r=e(document.documentElement),i=parseInt(String(t.version),10);t.msie?n=`ie`:t.mozilla?n=`ff`:t.safari?n=`safari`:t.webkit?n=`webkit`:t.opera?n=`opera`:t.edge&&(n=`edge`),n&&=`k-`+n+` k-`+n+i,this.mobileOS&&(n+=` k-mobile`),this.cssFlexbox||(n+=` k-no-flexbox`),r.addClass(n)}bootstrapToMedia(e){return{xs:`(max-width: 576px)`,sm:`(min-width: 576px)`,md:`(min-width: 768px)`,lg:`(min-width: 992px)`,xl:`(min-width: 1200px)`}[e]}matchesMedia(e){let t=this.bootstrapToMedia(e)||e;return this.matchMedia&&window.matchMedia(t).matches}},E=new class{constructor(){this.mouseTrap=!1,this.bustClick=!1,this.captureMouse=!1,this.MOUSE_EVENTS=[`mousedown`,`mousemove`,`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`mouseup`,`click`],this.EXCLUDE_BUST_CLICK_SELECTOR=`label, input, [data-rel=external]`}setupMouseMute(){let e=0,t=this.MOUSE_EVENTS.length,n=document.documentElement;if(this.mouseTrap||!T.eventCapture)return;this.mouseTrap=!0,this.bustClick=!1,this.captureMouse=!1;let r=this,i=function(e){r.captureMouse&&(e.type===`click`?r.bustClick&&!$(e.target).is(r.EXCLUDE_BUST_CLICK_SELECTOR)&&(e.preventDefault(),e.stopPropagation()):e.stopPropagation())};for(;e<t;e++)n.addEventListener(this.MOUSE_EVENTS[e],i,!0)}muteMouse(e){this.captureMouse=!0,e.data?.bustClick&&(this.bustClick=!0),clearTimeout(this.mouseTrapTimeoutID)}unMuteMouse(){clearTimeout(this.mouseTrapTimeoutID),this.mouseTrapTimeoutID=setTimeout(()=>{this.captureMouse=!1,this.bustClick=!1},400)}},D=new class{constructor(){this.eventRegEx=/([^ ]+)/g,this.eventMap=this.buildEventMap(),this.setupMSPointerEvents()}buildEventMap(){let e={down:`touchstart mousedown`,move:`mousemove touchmove`,up:`mouseup touchend touchcancel`,cancel:`mouseleave touchcancel`};return T.touch&&T.mobileOS&&(T.mobileOS.ios||T.mobileOS.android)?e={down:`touchstart`,move:`touchmove`,up:`touchend touchcancel`,cancel:`touchcancel`}:T.pointers?e={down:`pointerdown`,move:`pointermove`,up:`pointerup`,cancel:`pointercancel pointerleave`}:T.msPointers&&(e={down:`MSPointerDown`,move:`MSPointerMove`,up:`MSPointerUp`,cancel:`MSPointerCancel MSPointerLeave`}),e}setupMSPointerEvents(){T.msPointers&&!(`onmspointerenter`in window)&&$.each({MSPointerEnter:`MSPointerOver`,MSPointerLeave:`MSPointerOut`},(e,t)=>{$.event.special[e]={delegateType:t,bindType:t,handle:function(e){let n,r=this,i=e.relatedTarget,a=e.handleObj;return(!i||i!==r&&!this.$.contains(r,i))&&(e.type=a.origType,n=a.handler.apply(this,arguments),e.type=t),n}}})}getEventMap(e){return this.eventMap[e]||e}getFullEventMap(){return{...this.eventMap}}applyEventMap(e,t){return e=e.replace(this.eventRegEx,e=>this.getEventMap(e)),t&&(e=e.replace(this.eventRegEx,`$1.`+t)),e}},O=`object`,k=new class{constructor(){this.keys={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,SHIFT:16,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},this.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6}}get kendoData(){return window.kendo?.data||{}}toHyphens(e){return e.replace(/([a-z][A-Z])/g,e=>e.charAt(0)+`-`+e.charAt(1).toLowerCase())}toCamelCase(e){return e.replace(/\-(\w)/g,(e,t)=>t.toUpperCase())}size(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&n!==`toJSON`&&t++;return t}deepExtend(e,...t){for(let n=0;n<t.length;n++)this.deepExtendOne(e,t[n]);return e}deepExtendOne(e,t){let n=this.kendoData.ObservableArray,r=this.kendoData.LazyObservableArray,i=this.kendoData.DataSource,a=this.kendoData.HierarchicalDataSource;for(let o in t){if(o===`__proto__`||o===`constructor`||o===`prototype`)continue;let s=t[o],c=typeof s,l=null;c===O&&s!==null&&(l=s.constructor);let u=l?.name===`RegExp`,d=l?.name===`ArrayBuffer`,f=l?.name===`Date`;if(l&&!Array.isArray(s)&&l!==n&&l!==r&&l!==i&&l!==a&&!u&&(!this.isFunction(window.ArrayBuffer)||!d)&&!(s instanceof HTMLElement))if(f)e[o]=new Date(s.getTime());else if(this.isCloneable(s))e[o]=s.clone();else{let t=e[o];typeof t===O?e[o]=t||{}:e[o]={},this.deepExtendOne(e[o],s)}else c!==`undefined`&&(e[o]=s)}return e}isCloneable(e){return typeof e.clone==`function`}throttle(e,t){if(!t||t<=0)return e;let n,r=0,i=function(...i){let a=this,o=+new Date-r;function s(){let t=e.apply(a,i);return r=+new Date,t}if(!r||(n&&clearTimeout(n),o>t))return s();n=setTimeout(s,t-o)};return i.cancel=function(){n&&=(clearTimeout(n),void 0)},i}guid(){let e=window.crypto;try{return e.randomUUID()}catch{return e.getRandomValues(new Uint8Array(16)).reduce((e,t,n)=>((n===4||n===6||n===8||n===10)&&(e+=`-`),e+=t.toString(16).padStart(2,`0`),e),``)}}trim(e){return e?e.toString().trim():``}isPresent(e){return e!=null}isBlank(e){return e==null}isEmpty(e){return e.length===0}isString(e){return typeof e==`string`}isInteger(e){return Number.isInteger(e)}isNumeric(e){return!isNaN(e-parseFloat(e))}isDate(e){return e&&e.getTime}isFunction(e){return typeof e==`function`}isObject(e){return e!==null&&typeof e===O}logToConsole(e,t){let n=window.console;!window.kendo.suppressLog&&n!==void 0&&n.log&&n[t||`log`](e)}whenAll(e){let t=window.jQuery,n=arguments.length===1&&Array.isArray(e)?e:Array.prototype.slice.call(arguments),r=n.length,i=r,a=t.Deferred(),o=0,s=0,c=Array(r),l=Array(r),u=Array(r),d,f=(e,t,r)=>function(){r!==n&&s++,a.notifyWith(t[e]=this,r[e]=Array.prototype.slice.call(arguments)),--i||a[(s?`reject`:`resolve`)+`With`](t,r)};for(;o<r;o++)d=n[o],d&&this.isFunction(d.promise)?d.promise().done(f(o,u,n)).fail(f(o,c,l)):(a.notifyWith(this,d),--i);return i||a.resolveWith(u,n),a.promise()}isLocalUrl(e){return e&&!/^([a-z]+:)?\/\//i.test(e)}getAllMethods(e){let t=Object.getOwnPropertyNames(e).filter(t=>typeof e[t]==`function`),n=Object.getOwnPropertyNames(Object.getPrototypeOf(new e({}))).filter(e=>e!==`constructor`);return t.concat(n)}getBaseClass(e){if(e instanceof Function){let t=e,n=Object.getPrototypeOf(t);if(n&&n!==Object&&n.name)return n}return null}createProxyMember(e,t){e.fn[t]=function(){let e=this._instance;if(e)return e[t].apply(e,arguments)}}convertPromiseToDeferred(e){let t=$.Deferred();return e.finally(t.always).then(t.resolve).catch(t.reject),t.promise()}},A=new class{constructor(){this.originalOn=$.fn.on,this.kendoJQuery=this.createKendoJQuery(),this.rootjQuery=this.kendoJQuery(document)}noDeprecateExtend(e,t,...n){let r,i,a,o,s;typeof t!=`object`&&typeof t!=`function`&&(t={});for(let c of n)if(c!=null)for(o in c)o===`filters`||o===`concat`||o===`:`||o===`cssNumber`||(r=t[o],a=c[o],t!==a&&(e&&a&&($.isPlainObject(a)||(i=Array.isArray(a)))?(i?(i=!1,s=r&&Array.isArray(r)?r:[]):s=r&&$.isPlainObject(r)?r:{},t[o]=this.noDeprecateExtend(e,s,a)):a!==void 0&&(t[o]=a)));return t}createKendoJQuery(){let e=this,t=function(e,n){return new t.fn.init(e,n)};return this.noDeprecateExtend(!0,t,$),t.fn=t.prototype=new $,t.fn.constructor=t,t.fn.init=function(n,r){return r&&r instanceof $&&!(r instanceof t)&&(r=t(r)),$.fn.init.call(this,n,r,e.rootjQuery)},t.fn.init.prototype=t.fn,$.extend(t.fn,{handler:function(e){return this.data(`handler`,e),this},autoApplyNS:function(e){return this.data(`kendoNS`,e||k.guid()),this},on:function(...t){let n=this,r=n.data(`kendoNS`),i=e.originalOn;if(t.length===1)return i.call(n,t[0]);let a=n,o=t.slice();o[o.length-1]===void 0&&o.pop();let s=o[o.length-1],c=D.applyEventMap(o[0],r);if(T.mouseAndTouchPresent&&c.search(/mouse|click/)>-1&&this[0]!==document.documentElement){E.setupMouseMute();let e=o.length===2?null:o[1],t=c.indexOf(`click`)>-1&&c.indexOf(`touchend`)>-1;i.call(this,{touchstart:e=>E.muteMouse(e),touchend:()=>E.unMuteMouse()},e,{bustClick:t})}if(o[0].indexOf(`keydown`)!==-1&&o[1]&&o[1].options){o[0]=c;let t=o[1],r=o[o.length-1];return o[o.length-1]=function(n){if(e.keyDownHandler(n,t))return r.apply(this,[n])},i.apply(n,o),n}if(typeof s==`string`){a=n.data(`handler`);let e=a[s];o[o.length-1]=function(t){e.call(a,t)}}return o[0]=c,i.apply(n,o),n},kendoDestroy:function(e){return e||=this.data(`kendoNS`),e&&this.off(`.`+e),this}}),t}getConstructor(){return this.kendoJQuery}create(e,t){return this.kendoJQuery(e,t)}keyDownHandler(e,t){let n=t._events.kendoKeydown;if(!n)return!0;let r=n.slice();e.sender=t,e.preventKendoKeydown=!1;for(let n=0,i=r.length;n<i;n++)r[n].call(t,e);return!e.preventKendoKeydown}};var j=class{static extend(e){let t=this,n=function(){};n.prototype=t.prototype;let r=e&&e.init?e.init:function(...e){t.prototype.init&&t.prototype.init.apply(this,e)},i=r.fn=r.prototype=new n;if(e)for(let t in e)e[t]!=null&&e[t].constructor===Object?i[t]=A.getConstructor().extend(!0,{},n.prototype[t],e[t]):i[t]=e[t];return i.constructor=r,r.extend=t.extend,r}};j.fn=j.prototype,j.prototype.init=function(...e){},j.prototype._initOptions=function(e){this.options=A.getConstructor().extend(!0,{},this.options,e)};let ee=`string`,te=`function`;function ne(){this._defaultPrevented=!0}function re(){return this._defaultPrevented===!0}var ie=class extends j{constructor(){super(),this._events={}}init(...e){this._events={}}bind(e,t,n){let r=this,i,a,o,s,c=typeof t===te,l;if(t===void 0){let t=e;for(i in t)r.bind(i,t[i]);return r}let u=typeof e===ee?[e]:e;for(i=0,a=u.length;i<a;i++){let e=u[i];s=c?t:t[e],s&&(n&&(o=s,s=(function(e,t){let n=function(){r.unbind(e,n),t.apply(r,arguments)};return n.original=t,n})(e,o)),l=r._events[e]=r._events[e]||[],l.push(s))}return r}one(e,t){return this.bind(e,t,!0)}first(e,t){let n=this,r,i=typeof e===ee?[e]:e,a=i.length,o,s=typeof t===te,c;for(r=0;r<a;r++){let e=i[r];o=s?t:t[e],o&&(c=n._events[e]=n._events[e]||[],c.unshift(o))}return n}trigger(e,t){let n=this,r=n._events[e],i,a=r?r.length:0;if(r){let e=t||{};for(e.sender=n,e._defaultPrevented=!1,e.preventDefault=ne,e.isDefaultPrevented=re,r=r.slice(),i=0;i<a;i++)r[i].call(n,e);return e._defaultPrevented===!0}return!1}unbind(e,t){let n=this,r=e?n._events[e]:void 0,i;if(e===void 0)n._events={};else if(r)if(t)for(i=r.length-1;i>=0;i--)(r[i]===t||r[i].original===t)&&r.splice(i,1);else n._events[e]=[];return n}};let ae=ie.prototype;[`init`,`bind`,`one`,`first`,`trigger`,`unbind`].forEach(e=>{let t=ae[e];Object.defineProperty(ae,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}),ie.fn=ie.prototype;let M=new class{constructor(){this._ns=``}get ns(){return this._ns}setNs(e){this._ns=e}},oe=/%/,se=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i;var ce=class{constructor(){this.animationQueue=[];let e=window;this.animationFrameFn=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||(e=>{setTimeout(e,1e3/60)})}isElement(e){return e instanceof Element||e instanceof HTMLDocument}outerWidth(e,t,n){let r=$(e);return n?this.getHiddenDimensions(r,t).width:r.outerWidth(t||!1)||0}outerHeight(e,t,n){let r=$(e);return n?this.getHiddenDimensions(r,t).height:r.outerHeight(t||!1)||0}getComputedStyles(e,t){let n={},r;return document.defaultView&&document.defaultView.getComputedStyle?(r=document.defaultView.getComputedStyle(e,``),t&&$.each(t,(e,t)=>{n[t]=r.getPropertyValue(t)})):(r=e.currentStyle,t&&$.each(t,(e,t)=>{n[t]=r[k.toCamelCase(t)]})),k.size(n)?n:r}isScrollable(e){if(e.dataset[M.ns+`scrollable`]===`false`)return!1;if(typeof e?.className==`string`&&e.className.indexOf(`k-auto-scrollable`)>-1)return!0;let t=this.getComputedStyles(e,[`overflow`]).overflow||``;return t.indexOf(`auto`)>-1||t.indexOf(`scroll`)>-1}scrollLeft(e,t){let n=T.browser.webkit,r=T.browser.mozilla,i=T.browser.version;if(e instanceof $&&t!==void 0){e.each((e,n)=>{this.scrollLeft(n,t)});return}let a=e instanceof $?e[0]:e;if(!a)return;let o=T.isRtl(e);if(t!==void 0)o&&n&&(i<85||T.browser.safari)?a.scrollLeft=a.scrollWidth-a.clientWidth-t:o&&(r||n)&&t>0?a.scrollLeft=-t:a.scrollLeft=t;else if(o&&n&&(i<85||T.browser.safari))return a.scrollWidth-a.clientWidth-a.scrollLeft;else return Math.abs(a.scrollLeft)}getOffset(e,t=`offset`,n){let r=e[t](),i={top:r.top,right:r.right,bottom:r.bottom,left:r.left};if(T.browser.msie&&(T.pointers||T.msPointers)&&!n){let t=T.isRtl(e)?1:-1;i.top-=window.pageYOffset-document.documentElement.scrollTop,i.left-=window.pageXOffset+t*document.documentElement.scrollLeft}return i}getHiddenDimensions(e,t){let n=e.clone();n.css(`display`,``),n.css(`visibility`,`hidden`),n.appendTo($(`body`));let r=n.outerWidth(t||!1),i=n.outerHeight(t||!1);return n.remove(),{width:r||0,height:i||0}}parseEffects(e){let t={},n=typeof e==`string`?e.split(` `):e;return $.each(n,function(e){t[e]=this}),t}stripWhitespace(e){if(document.createNodeIterator){let t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,t=>t.parentNode===e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT);for(;t.nextNode();){let e=t.referenceNode;e&&!e.textContent?.trim()&&e.parentNode?.removeChild(e)}}}animationFrame(e){this.animationFrameFn.call(window,e)}queueAnimation(e){this.animationQueue.push(e),this.animationQueue.length===1&&this.runNextAnimation()}runNextAnimation(){this.animationFrame(()=>{this.animationQueue[0]&&(this.animationQueue.shift()(),this.animationQueue[0]&&this.runNextAnimation())})}parseQueryStringParams(e){let t=e.split(`?`)[1]||``,n={},r=t.split(/&|=/),i=r.length;for(let e=0;e<i;e+=2)r[e]!==``&&(n[decodeURIComponent(r[e])]=decodeURIComponent(r[e+1]));return n}elementUnderCursor(e){return e.x.client===void 0?null:document.elementFromPoint(e.x.client,e.y.client)}wheelDeltaY(e){let t=e.originalEvent,n=t.wheelDeltaY,r;return t.wheelDelta?(n===void 0||n)&&(r=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(r=-t.detail*10),r}getShadows(e){let t=e.css(`box-shadow`),n=t&&se.exec(t)||[0,0,0,0,0],r=Math.max(+n[3],+(n[4]||0));return{left:-n[1]+r,right:+n[1]+r,bottom:+n[2]+r}}wrap(e,t,n,r=!0,i){let a=e.parent(),o=this.outerWidth(window);if(a.parent().removeClass(`k-animation-container-sm`),a.hasClass(`k-child-animation-container`))this.wrapResize(e,t,r);else{let n=e[0].style.width,r=e[0].style.height,o=oe.test(n),s=oe.test(r),c=e.hasClass(`k-tooltip`)||e.is(`.k-menu-horizontal.k-context-menu`),l=e.hasClass(`k-tooltip`),u=o||s,d=n,f=r;!o&&(!t||t&&n||c)&&(d=t?this.outerWidth(e,!1,l)+1:this.outerWidth(e,!1,l)),(!s&&(!t||t&&r)||c)&&(f=this.outerHeight(e,!1,l)),e.wrap($(`<div/>`).addClass(`k-child-animation-container`).css({width:i?`auto`:d,height:f})),a=e.parent(),a.wrap($(`<div/>`).addClass(`k-animation-container`).attr(`role`,`region`)),u&&e.css({width:`100%`,height:`100%`})}return a=a.parent(),o<this.outerWidth(a)&&(a.addClass(`k-animation-container-sm`),n=!0),n&&this.wrapResize(e,t,r),a}wrapResize(e,t,n=!0){let r=e.parent(),i=e.closest(`.k-animation-container`),a=e.hasClass(`k-tooltip`),o=e.is(`:visible`),s=r[0].style,c=e[0].style.height;i.is(`:hidden`)&&i.css({display:``,position:``}),oe.test(s.width)||oe.test(s.height)||(o||e.add(r).show(),n&&r.css(`width`,``),r.css({width:t?this.outerWidth(e,!1,a)+1:this.outerWidth(e,!1,a)}),c===`auto`?e.css({height:this.outerHeight(r)}):r.css({height:this.outerHeight(e)}),o||e.hide())}scrollByDelta(e,t){let n=T.isRtl(e),r=(n?-this.scrollLeft(e):this.scrollLeft(e))+t,i=e[0].scrollWidth-e[0].clientWidth,a={scrollLeft:r};e.finish().animate(a,`fast`,`linear`);let o=n?-i:i,s=n?Math.max(Math.min(r,0),o):Math.min(Math.max(r,0),o);return{atStart:s===0,atEnd:s===o}}scrollVerticalByDelta(e,t,n={}){let{duration:r=`fast`,easing:i=`linear`}=n,a=(e.scrollTop()||0)+t,o={scrollTop:a};e.finish().animate(o,r,i);let s=e[0].scrollHeight-e[0].clientHeight,c=Math.min(Math.max(a,0),s);return{atTop:c===0,atBottom:c>=s}}scrollToElement(e,t,n={}){if(!e.length||!t.length)return!1;let{duration:r=0,easing:i=`linear`,position:a=`center`,offset:o=0,onComplete:s}=n,c=e.height()||0,l=e.scrollTop()||0,u=e.offset(),d=t.offset(),f=t.outerHeight()||0,p=d.top-u.top+l,m;switch(a){case`top`:m=p+o;break;case`bottom`:m=p-c+f+o;break;default:m=p-c/2+f/2+o;break}let h=e[0].scrollHeight-e[0].clientHeight;return m=Math.min(Math.max(m,0),h),e.finish().animate({scrollTop:m},r,i,s),!0}addAttribute(e,t,n){let r=e.attr(t)||``;r.indexOf(n)<0&&e.attr(t,(r+` `+n).trim())}removeAttribute(e,t){e.removeAttr(t)}toggleAttribute(e,t,n){let r=(e.attr(t)||``).indexOf(n)<0,i=[`disabled`,`readonly`].indexOf(t)>-1;r&&!i||i&&n?this.addAttribute(e,t,n):this.removeAttribute(e,t)}onResize(e){let t=e;return T.mobileOS&&T.mobileOS.android&&(t=function(){setTimeout(e,600)}),$(window).on(T.resize,t),t}unbindResize(e){$(window).off(T.resize,e)}attrValue(e,t){return e.data(M.ns+t)}attr(e){return`data-`+M.ns+e}dimensions(e,t){let n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}}triggeredByInput(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)}applyStylesFromKendoAttributes(e,t){let n=t.map(e=>`[${this.attr(`style-${e}`)}]`).join(`,`);e.find(n).addBack(n).each((e,n)=>{let r=$(n);t.forEach(e=>{let t=this.attr(`style-${e}`);r.attr(t)&&(r.css(e,r.attr(t)),r.removeAttr(t))})})}progress(e,t,n){let r=e.find(`.k-loading-mask`),i=T.browser,a=$.extend({},{width:`100%`,height:`100%`,top:e.scrollTop(),opacity:!1},n),o=a.opacity?`k-loading-mask k-opaque`:`k-loading-mask`;if(t){if(!r.length){let t=T.isRtl(e),n=t?`right`:`left`,r=this.scrollLeft(e),s=0;i.webkit&&t&&(s=e[0].scrollWidth-(e.width()||0)-2*r);let c=window.kendo.ui?.progress?.messages?.loading||`Loading...`;$(`<div class='${o}'><span role='alert' aria-live='polite' class='k-loading-text'>${c}</span><div class='k-loading-image'></div><div class='k-loading-color'></div></div>`).width(a.width).height(a.height).css(`top`,a.top).css(n,Math.abs(r)+s).prependTo(e)}}else r&&r.remove()}eventTarget(e){if(!T.touch)return e.target;let t=e.originalEvent?.changedTouches||e.changedTouches;return t&&t.length>0?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target}createDragToScrollHandler(e,t){return new le(e,t)}createResizeObserver(e){return new de(e)}},le=class e{static{this.DRAG_THRESHOLD=5}constructor(e,t){this.isDragging=!1,this.hasDragged=!1,this.dragStartX=0,this.scrollStartLeft=0,this.currentDragTarget=null,this.scrollContainer=e,this.namespace=t.namespace,this.captureElement=t.captureElement,this.delegateSelector=t.delegateSelector,this.onDragStart=this.onDragStart.bind(this),this.onDragMove=this.onDragMove.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.preventClickOnce=this.preventClickOnce.bind(this)}attach(){this.captureElement&&(this.delegateSelector?this.scrollContainer.on(`mousedown`+this.namespace,this.delegateSelector,this.onDragStart).on(`touchstart`+this.namespace,this.delegateSelector,this.onDragStart):this.scrollContainer.on(`mousedown`+this.namespace,this.onDragStart).on(`touchstart`+this.namespace,this.onDragStart),this.bindCaptureEvents())}destroy(){this.scrollContainer.off(this.namespace),this.captureElement&&this.unbindCaptureEvents(),this.scrollContainer[0].removeEventListener(`click`,this.preventClickOnce,!0)}getClientX(e){if(e.type.indexOf(`touch`)!==-1){let t=e.originalEvent?.touches?.[0]||e.originalEvent?.changedTouches?.[0];return t?t.clientX:0}return e.clientX||e.originalEvent?.clientX||0}preventClickOnce(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.scrollContainer[0].removeEventListener(`click`,this.preventClickOnce,!0)}onDragStart(e){let t=$(e.currentTarget);t.length&&(this.isDragging=!0,this.hasDragged=!1,this.currentDragTarget=t[0],this.dragStartX=this.getClientX(e),this.scrollStartLeft=t[0].scrollLeft,t.css(`cursor`,`grabbing`),t.css(`user-select`,`none`))}onDragMove(t){if(!this.isDragging||!this.currentDragTarget)return;let n=this.getClientX(t),r=this.dragStartX-n;!this.hasDragged&&Math.abs(r)>=e.DRAG_THRESHOLD&&(this.hasDragged=!0),this.hasDragged&&(t.preventDefault(),this.currentDragTarget.scrollLeft=this.scrollStartLeft+r)}onDragEnd(){if(this.isDragging){if(this.currentDragTarget){let e=$(this.currentDragTarget);e.css(`cursor`,``),e.css(`user-select`,``)}this.hasDragged&&this.scrollContainer[0].addEventListener(`click`,this.preventClickOnce,!0),this.isDragging=!1,this.hasDragged=!1,this.currentDragTarget=null}}bindCaptureEvents(){this.captureElement&&$(document).on(`mousemove`+this.namespace,this.onDragMove).on(`touchmove`+this.namespace,this.onDragMove).on(`mouseup`+this.namespace,this.onDragEnd).on(`touchend`+this.namespace,this.onDragEnd)}unbindCaptureEvents(){$(document).off(this.namespace)}};let ue=typeof ResizeObserver<`u`;var de=class{static supported(){return ue}constructor(e){this.onResize=e=>{this.resizeCallback&&this.resizeCallback()};let t=e.element;this.element=t instanceof $?t[0]:t,this.resizeCallback=e.onResize,this.debounceTime=e.debounceTime??50,this.observeOptions=e.observeOptions||{},this.resizeObserver=null,this.debounceResize=null,this.initResizeObserver()}initResizeObserver(){this.debounceResize=k.throttle(this.onResize.bind(this),this.debounceTime),ue&&(this.resizeObserver=new ResizeObserver(this.debounceResize),this.resizeObserver.observe(this.element,this.observeOptions))}destroy(){this.destroyResizeObserver(),this.element=null}destroyResizeObserver(){this.resizeObserver&&this.resizeObserver.disconnect(),this.debounceResize&&this.debounceResize.cancel(),this.resizeObserver=null,this.debounceResize=null,this.resizeCallback=null}};let N=new ce,fe=`prefix`,pe=new class{constructor(){this.themeColorValues=[`base`,`primary`,`secondary`,`tertiary`,`inherit`,`info`,`success`,`warning`,`error`,`dark`,`light`,`inverse`],this.fillModeValues=[`solid`,`outline`,`flat`],this.shapeValues=[`rectangle`,`square`],this.sizeValues=[[`small`,`sm`],[`medium`,`md`],[`large`,`lg`]],this.roundedValues=[[`small`,`sm`],[`medium`,`md`],[`large`,`lg`],[`full`,`full`],[`none`,`none`]],this.positionModeValues=[`fixed`,`static`,`sticky`,`absolute`],this.resizeValues=[[`both`,`resize`],[`horizontal`,`resize-x`],[`vertical`,`resize-y`]],this.overflowValues=[`auto`,`hidden`,`visible`,`scroll`,`clip`],this.layoutFlowValues=[[`vertical`,`!k-flex-col`],[`horizontal`,`!k-flex-row`]],this.defaultValues={},this.propertyDictionary={},this.propertyToCssClassMap={},this.registerDefaultCssClasses(`themeColor`,this.themeColorValues),this.registerDefaultCssClasses(`fillMode`,this.fillModeValues),this.registerDefaultCssClasses(`shape`,this.shapeValues),this.registerDefaultCssClasses(`size`,this.sizeValues),this.registerDefaultCssClasses(`positionMode`,this.positionModeValues),this.registerDefaultCssClasses(`rounded`,this.roundedValues),this.registerDefaultCssClasses(`resize`,this.resizeValues),this.registerDefaultCssClasses(`overflow`,this.overflowValues),this.registerDefaultCssClasses(`layoutFlow`,this.layoutFlowValues),this.registerCssClasses(`themeColor`,this.themeColorValues),this.registerCssClasses(`fill`,this.fillModeValues),this.registerCssClasses(`shape`,this.shapeValues),this.registerCssClasses(`size`,this.sizeValues),this.registerCssClasses(`positionMode`,this.positionModeValues)}registerPrefix(e,t){this.propertyDictionary[e]||(this.propertyDictionary[e]={}),this.propertyDictionary[e][fe]=t}registerValues(e,t){let n,r,i,a,o,s;for(this.propertyDictionary[e]||(this.propertyDictionary[e]={}),n=0;n<t.length;n++)for(i=t[n].prop,o=t[n].values,this.propertyDictionary[e][i]||(this.propertyDictionary[e][i]={}),a=this.propertyDictionary[e][i],r=0;r<o.length;r++)s=o[r],Array.isArray(s)?a[s[0]]=s[1]:a[s]=s}getValidClass(e){let t=e.widget,n=e.propName,r=e.value,i=e.prefix,a=this.defaultValues[n],o=this.propertyDictionary[t];if(!o)return``;let s=o[n],c=s&&s[r]||a&&a[r];if(c){let e;return e=n===`themeColor`?o[fe]:n===`positionMode`?`k-pos-`:n===`rounded`?`k-rounded-`:n===`resize`?`k-`:n===`overflow`?`k-overflow-`:n===`layoutFlow`?``:o[fe],e=i||e,e+c}else return``}registerDefaultCssClass(e,t,n){this.defaultValues[e]||(this.defaultValues[e]={}),this.defaultValues[e][t]=n||t}registerDefaultCssClasses(e,t){for(let n=0;n<t.length;n++)if(Array.isArray(t[n])){let r=t[n];this.registerDefaultCssClass(e,r[0],r[1])}else this.registerDefaultCssClass(e,t[n])}registerCssClass(e,t,n){this.propertyToCssClassMap[e]||(this.propertyToCssClassMap[e]={}),this.propertyToCssClassMap[e][t]=n||t}registerCssClasses(e,t){for(let n=0;n<t.length;n++)if(Array.isArray(t[n])){let r=t[n];this.registerCssClass(e,r[0],r[1])}else this.registerCssClass(e,t[n])}getValidCssClass(e,t,n){if(n===void 0)return``;let r=this.propertyToCssClassMap[t]?.[n];if(r)return e+r}},me=[`themeColor`,`fillMode`,`shape`,`size`,`rounded`,`positionMode`],he=`aria-labelledby`,ge=`aria-label`;var P=class e extends ie{static call(t,n,r){e.fn.init.call(t,n,r)}static apply(t,n){e.fn.init.apply(t,n)}constructor(e,t){super(),e!==void 0&&this.init(e,t)}init(e,t){let r=this;n.validatePackage()||(r._showWatermarkOverlay=n.addWatermarkOverlayAndBanner);let i=A.getConstructor();r.element=i(e).handler(r),ie.fn.init.call(r);let a=t?t.dataSource:null,o;t&&(o=(r.componentTypes||{})[t.componentType]),a&&(t=i.extend({},t,{dataSource:{}})),t=r.options=i.extend(!0,{},r.options,r.defaults,o||{},t),a&&(t.dataSource=a);let s=N.attr(`role`);r.element.attr(s)||r.element.attr(s,(t.name||``).toLowerCase()),r.element.data(`kendo`+t.prefix+t.name,r),r.bind(r.events,t)}_hasBindingTarget(){return!!this.element[0].kendoBindingTarget}_tabindex(e){e||=this.wrapper;let t=this.element,n=`tabindex`,r=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(r)?0:r)}setOptions(e){this._clearCssClasses(e),this._setEvents(e),A.getConstructor().extend(this.options,e),this._applyCssClasses()}_setEvents(e){let t=this,n=0,r=t.events.length,i;for(;n<r;n++)i=t.events[n],t.options[i]&&e[i]&&(t.unbind(i,t.options[i]),t._events&&t._events[i]&&delete t._events[i]);t.bind(t.events,e)}resize(e){let t=this.getSize(),n=this._size;(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this._size=t,this._resize(t,e),this.trigger(`resize`,t))}getSize(){return N.dimensions(this.element)}size(e){if(e)this.setSize(e);else return this.getSize()}setSize(e){}_resize(e,t){}destroy(){let e=this;e.element.removeData(`kendo`+e.options.prefix+e.options.name),e.element.removeData(`handler`),e.unbind()}_destroy(){this.destroy()}_applyCssClasses(e){let t=this.__proto__.options,n=this.options,r=e||this.wrapper||this.element,i=[],a,o,s,c,l=pe;if(s=this.options._altname||t.name,c=l.propertyDictionary[s],!(!l||!c)){for(a=0;a<me.length;a++)o=me[a],s=this.options._altname||t.name,(o in t||o in n)&&i.push(l.getValidClass({widget:s,propName:o,value:n[o]}));r.addClass(i.join(` `))}}_ariaLabel(e){let t=this,n=t.element,r=n.attr(`id`),i=A.getConstructor()(`label[for="`+r+`"]`),a=n.attr(ge),o=n.attr(he),s;if(e[0]!==n[0]){if(a)e.attr(ge,a);else if(o)e.attr(he,o);else if(i.length){let n=k.guid();s=i.attr(`id`)||t._generateLabelId(i,r||n),e.attr(he,s)}}}_clearCssClasses(e,t){let n=this.__proto__.options,r=this.options,i=t||this.wrapper||this.element,a,o,s,c,l=pe;if(s=this.options._altname||n.name,c=l.propertyDictionary[s],!(!l||!c))for(a=0;a<me.length;a++)o=me[a],(o in n||o in r)&&e.hasOwnProperty(o)&&(o===`themeColor`?i.removeClass(l.getValidClass({widget:s,propName:o,value:r[o],fill:r.fillMode})):(o===`fillMode`&&i.removeClass(l.getValidClass({widget:s,propName:`themeColor`,value:r.themeColor,fill:r.fillMode})),i.removeClass(l.getValidClass({widget:s,propName:o,value:r[o]}))))}_generateLabelId(e,t){let n=t+`_label`;return e.attr(`id`,n),n}};P.fn=P.prototype,P.prototype.options={prefix:``},P.prototype.events=[];var _e=class e{static{this.DEFAULT_OPTIONS={autoSync:!0,schema:{model:{id:`id`,fields:{id:{type:`string`},text:{type:`string`},authorId:{type:`string`},authorName:{type:`string`},authorImageUrl:{type:`string`},authorImageAltText:{type:`string`},replyToId:{type:`string`,defaultValue:null},isDeleted:{type:`boolean`,defaultValue:!1},isPinned:{type:`boolean`,defaultValue:!1},isTyping:{type:`boolean`,defaultValue:!1},timestamp:{type:`date`},files:{parse:e=>e||[]},suggestedActions:{parse:e=>e||[]},status:{type:`string`,defaultValue:null},failed:{type:`boolean`,defaultValue:!1},attachments:{parse:e=>e||null},attachmentLayout:{type:`string`,defaultValue:null}}}}}}static{this.FIELD_MAP={text:`textField`,authorId:`authorIdField`,authorName:`authorNameField`,authorImageUrl:`authorImageUrlField`,authorImageAltText:`authorImageAltTextField`,id:`idField`,timestamp:`timestampField`,files:`filesField`,suggestedActions:`suggestedActionsField`,replyToId:`replyToIdField`,isDeleted:`isDeletedField`,isPinned:`isPinnedField`,isTyping:`isTypingField`,status:`statusField`,failed:`failedField`,attachments:`attachmentsField`,attachmentLayout:`attachmentLayoutField`}}constructor(e){this.context=e,this.options=this.buildOptions(e.chatOptions),this.dataSource=this.createDataSource(e.chatOptions)}buildOptions(t){let n;return n=t.dataSource instanceof kendo.data.DataSource?$.extend(!0,{},e.DEFAULT_OPTIONS,t.dataSource.options):Array.isArray(t.dataSource)?$.extend(!0,{},e.DEFAULT_OPTIONS,{data:t.dataSource}):$.extend(!0,{},e.DEFAULT_OPTIONS,t.dataSource),n.autoAssignId=t.autoAssignId,this.mapFields(n.schema.model.fields,t),n}createDataSource(e){return e.dataSource instanceof kendo.data.DataSource?e.dataSource:kendo.data.DataSource.create(this.options)}mapFields(t,n){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e.FIELD_MAP[r]){let i=e.FIELD_MAP[r];t[r].from=n[i]}}getDataSource(){return this.dataSource}getView(){return this.dataSource.view()}getLastMessage(){let e=this.getView();return e.length?e[e.length-1]:null}getMessageById(e){return e?this.dataSource.get(e):null}getMessageByUid(e){return this.dataSource.getByUid(e)}getFileByUid(e,t){return!e||!t?null:e.files.find(e=>e.uid===t)||null}getPinnedMessage(){return this.dataSource.data().find(e=>e.isPinned)||null}postMessage(e,t){let n=typeof e==`string`?{text:e}:e,r={id:this.options.autoAssignId?k.guid():void 0,timestamp:new Date,files:[],...n,authorId:n.authorId?.toString()||t};return this.dataSource.add(r)}updateMessage(e,t){if(!e)return null;let n=e;if(e instanceof kendo.data.ObservableObject||(n=this.getMessageById(e.id)),!n)return null;for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.set(e,t[e]);return n}removeMessage(e){return e?(e.set(`isDeleted`,!0),!0):!1}pinMessage(e){if(!e)return!1;let t=this.getPinnedMessage();return t&&t.set(`isPinned`,!1),e.set(`isPinned`,!0),e}clearPinnedMessage(){let e=this.getPinnedMessage();e&&e.set(`isPinned`,!1)}};let F=`.kendoChat`,ve={STANDARD:`standard`,FULL:`full`},ye={SENT:`sent`,DELIVERED:`delivered`,SEEN:`seen`,FAILED:`failed`},I={HORIZONTAL:`horizontal`,VERTICAL:`vertical`,WRAP:`wrap`},L={SCROLL:`scroll`,WRAP:`wrap`,SCROLLBUTTONS:`scrollbuttons`},R={attachment:`paperclip-outline-alt-right`,attachmentMenu:`more-vertical`,checkCircle:`check-circle`,chevronDown:`chevron-down`,chevronLeft:`chevron-left`,chevronRight:`chevron-right`,chevronUp:`chevron-up`,download:`download`,fileError:`file-error`,filePdf:`file-pdf`,microphoneOutline:`microphone-outline`,pin:`pin`,undo:`undo`,copy:`copy`,trash:`trash`,send:`paper-plane`,stop:`stop-sm`,upload:`upload`,warningTriangle:`warning-triangle`,x:`x`,arrowDown:`arrow-down`,retry:`arrow-rotate-cw-outline`},z={reply:`reply`,copy:`copy`,pin:`pin`,delete:`delete`,download:`download`},B={active:`k-active`,selected:`k-selected`,focus:`k-focus`,expanded:`k-expanded`,disabled:`k-disabled`,hidden:`k-hidden`,generating:`k-generating`,noAvatar:`k-no-avatar`,file:`k-file-box`,fileInfo:`k-file-info`,fileName:`k-file-name`,fileSize:`k-file-size`,fileWrapper:`k-file-box-wrapper`,fileWrapperScrollableStart:`k-file-box-wrapper-scrollable-start`,filesScroll:`k-files-scroll`,filesVertical:`k-files-vertical`,filesWrap:`k-files-wrap`,avatar:`k-avatar`,bubble:`k-bubble`,bubbleContent:`k-bubble-content`,bubbleExpandable:`k-bubble-expandable`,bubbleExpandableIndicator:`k-bubble-expandable-indicator`,chatBubble:`k-chat-bubble`,chatBubbleText:`k-chat-bubble-text`,button:`k-button`,buttonDefaults:`k-button-md k-rounded-md k-button-solid k-button-solid-base`,buttonIcon:`k-button-icon`,buttonPrimary:`k-button-md k-rounded-md k-button-flat k-button-flat-primary`,iconButton:`k-icon-button`,menuButton:`k-menu-button`,chatSend:`k-chat-send`,chatUpload:`k-chat-upload`,downloadButton:`k-chat-download-button`,downloadButtonWrapper:`k-chat-download-button-wrapper`,canvas:`k-chat-canvas`,card:`k-card`,cardAction:`k-card-action`,cardActions:`k-card-actions`,cardActionsVertical:`k-actions-vertical`,cardBody:`k-card-body`,cardDeck:`k-card-deck`,cardDeckScrollWrap:`k-card-deck-scrollwrap`,cardList:`k-card-list`,cardMedia:`k-card-media`,cardRich:`k-card-type-rich`,cardSubtitle:`k-card-subtitle`,cardTitle:`k-card-title`,cardWrapper:`k-card-container`,dropzoneHint:`k-dropzone-hint`,dropzoneIcon:`k-dropzone-icon`,dropzoneInner:`k-dropzone-inner`,externalDropzone:`k-external-dropzone`,header:`k-chat-header`,message:`k-message`,messageAuthor:`k-message-author`,messageGroup:`k-message-group`,messageGroupContent:`k-message-group-content`,messageGroupFullWidth:`k-message-group-full-width`,messageGroupReceiver:`k-message-group-receiver`,messageGroupSender:`k-message-group-sender`,messageListContent:`k-message-list-content`,messageListContentEmpty:`k-message-list-content-empty`,messageRemoved:`k-message-removed`,messageStatus:`k-message-status`,messageTime:`k-message-time`,messageInfo:`k-message-info`,messageFailed:`k-message-failed`,messageFailedContent:`k-message-failed-content`,messageFailedText:`k-message-failed-text`,messageToolbar:`k-chat-message-toolbar`,messageRetryButton:`k-resend-button`,messagePinned:`k-message-pinned`,messageReference:`k-message-reference`,messageReferenceContent:`k-message-reference-content`,messageReferenceReceiver:`k-message-reference-receiver`,messageReferenceSender:`k-message-reference-sender`,scrollButtonIconLeft:`chevron-left`,scrollButtonIconRight:`chevron-right`,suggestion:`k-suggestion`,suggestionGroup:`k-suggestion-group`,suggestionGroupScrollable:`k-suggestion-group-scrollable`,suggestionGroupWrap:`k-suggestion-group-wrap`,suggestionsScroll:`k-suggestions-scroll`,suggestionScrollWrap:`k-suggestion-scrollwrap`,suggestionScrollWrapGradient:`k-suggestion-scrollwrap-gradient`,timestamp:`k-timestamp`,typingIndicator:`k-typing-indicator`,viewWrapper:`k-message-list`,wrapper:`k-chat`,messageBox:`k-message-box`,messageBoxWrapper:`k-message-box-wrapper`,messageBoxSeparator:`k-separator`,spacer:`k-spacer`,scrollFab:`k-chat-scroll-fab`,fab:`k-fab`},V={fileButton:`ref-chat-file-button`,fileMenuButton:`ref-chat-file-menu-button`,fileWrapper:`ref-chat-file-wrapper`,fileCloseButton:`ref-chat-file-close-button`,attachmentActionButton:`ref-chat-attachment-action-button`,userStatusWrapper:`ref-chat-user-status-wrapper`,bubbleExpandableIndicator:`ref-chat-bubble-expandable-indicator`,messageReferencePinWrapper:`ref-chat-message-reference-pin-wrapper`,messageReferenceReplyWrapper:`ref-chat-message-reference-reply-wrapper`,pinnedMessageCloseButton:`ref-chat-pinned-message-close-button`,replyMessageCloseButton:`ref-chat-reply-message-close-button`,leftScrollButton:`ref-chat-left-scroll-button`,rightScrollButton:`ref-chat-right-scroll-button`,sendButton:`ref-chat-message-box-send-button`,speechToTextButton:`ref-chat-message-box-speech-to-text-button`,suggestionGroup:`ref-chat-suggestion-group`,fileUploadInput:`ref-chat-file-upload-input`,viewWrapper:`ref-chat-view-wrapper`,scrollToBottomButton:`ref-chat-scroll-to-bottom-button`,retryButton:`ref-chat-message-retry-button`},H={sendMessage:`sendMessage`,suggestionClick:`suggestionClick`,unpin:`unpin`,input:`input`,toolbarAction:`toolbarAction`,fileMenuAction:`fileMenuAction`,contextMenuAction:`contextMenuAction`,download:`download`,fileSelect:`fileSelect`,fileRemove:`fileRemove`,executeAction:`executeAction`,resendMessage:`resendMessage`,suggestedActionClick:`suggestedActionClick`,messageToolbarExecute:`messageToolbarExecute`,fileMenuExecute:`fileMenuExecute`,downloadAllFiles:`downloadAllFiles`,expandableToggle:`expandableToggle`,replyMessageCloseButtonClick:`replyMessageCloseButtonClick`},U=`click`,be=`keydown`,xe=`focus`,Se=`blur`,Ce=`change`,we=`${F}navigation`,Te=`.${B.messageTime}[data-timestamp-visibility='onFocus']`;function Ee(e,t){e.closest(`.${B.message}`).find(Te).toggleClass(B.hidden,!t)}let De=null,Oe=!1;var ke=class{constructor(e){this.context=e}setupAriaAttributes(){let e=this.context.getOptions().messages,t=this.context.wrapper.find(`.${B.viewWrapper}`);t.length&&t.attr(`role`,`log`).attr(`aria-live`,`polite`).attr(`aria-label`,e.messageListLabel),this.setupBubbleTabNavigation(),this.setupSuggestionAccessibility(),this.setupButtonAccessibility(e),this.setupExpandableIndicators(),this.setupScrollButtonsAria(),this.setupMessageBoxAria(e)}setupBubbleTabNavigation(){let e=this.context.wrapper.find(`.${B.bubble}`),t=e.filter(function(){return $(this).find(`.${B.typingIndicator}`).length===0}),n=e.filter(function(){return $(this).find(`.${B.typingIndicator}`).length>0});t.attr(`tabindex`,`0`),n.attr(`tabindex`,`-1`),t.off(`${xe}${we} ${Se}${we} ${U}${we}`).on(`${xe}${we}`,function(){let t=$(this);e.each(function(){Ee($(this),!1)}),De&&e.removeClass(B.selected),e.removeClass(B.focus),De&&t.addClass(B.selected),t.addClass(B.focus),Ee(t,!0),De=!1}).on(`${Se}${we}`,function(){De&&!Oe&&$(this).removeClass(B.selected),Ee($(this),!1),$(this).removeClass(B.focus)}).on(`${U}${we}`,function(e){$(e.target).closest(V.fileMenuButton)||$(this).trigger(xe)})}setupSuggestionAccessibility(){this.context.wrapper.find(`.${B.suggestionGroup}`).each((e,t)=>{let n=$(t);n.attr(`role`,`group`),n.find(`.${B.suggestion}`).each((e,t)=>{$(t).attr(`role`,`button`).attr(`tabindex`,`0`)})})}setupButtonAccessibility(e){this.context.wrapper.find(`.k-input-suffix > .k-button`).each((t,n)=>{let r=$(n);!r.attr(`role`)&&n.nodeName.toLowerCase()!==`button`&&r.attr(`role`,`button`),!r.attr(`aria-label`)&&!r.attr(`title`)&&(r.hasClass(B.chatSend)?r.attr(`aria-label`,e.actionButton||e.sendButton):r.hasClass(`k-chat-upload`)&&r.attr(`aria-label`,e.fileButton)),r.hasClass(B.chatSend)&&r.hasClass(`k-disabled`)&&r.attr(`aria-disabled`,`true`)}),this.context.wrapper.find(`.${B.downloadButton}`).each((t,n)=>{let r=$(n);!r.attr(`role`)&&n.nodeName.toLowerCase()!==`button`&&r.attr(`role`,`button`),!r.attr(`aria-label`)&&!r.attr(`title`)&&r.attr(`aria-label`,e.downloadAll)}),this.setupCloseButtonAria(V.pinnedMessageCloseButton,e.pinnedMessageCloseButton),this.setupCloseButtonAria(V.replyMessageCloseButton,e.replyMessageCloseButton),this.context.wrapper.find(`[${V.fileMenuButton}]`).each((t,n)=>{let r=$(n);r.attr(`aria-label`,e.fileMenuButton),r.attr(`title`,e.fileMenuButton)})}setupCloseButtonAria(e,t){this.context.wrapper.find(`[${e}]`).each((e,n)=>{let r=$(n);!r.attr(`role`)&&n.nodeName.toLowerCase()!==`button`&&r.attr(`role`,`button`),!r.attr(`aria-label`)&&!r.attr(`title`)&&(r.attr(`aria-label`,t),r.attr(`title`,t))})}setupExpandableIndicators(){this.context.wrapper.find(`.${B.bubbleExpandableIndicator}`).each((e,t)=>{let n=$(t);n.attr(`role`,`button`).attr(`tabindex`,`0`);let r=n.closest(`.${B.bubble}`).hasClass(B.expanded)?`Collapse message`:`Expand message`;n.attr(`aria-label`,r)})}setupScrollButtonsAria(){let e=this.context.getOptions().dir,t=this.context.wrapper.find(`[${V.leftScrollButton}]`),n=this.context.wrapper.find(`[${V.rightScrollButton}]`),r=e===`rtl`?`Scroll Right`:`Scroll Left`,i=e===`rtl`?`Scroll Left`:`Scroll Right`;t.attr(`aria-label`,r),t.attr(`title`,r),n.attr(`aria-label`,i),n.attr(`title`,i)}setupMessageBoxAria(e){this.context.wrapper.find(`.${B.messageBox}`).find(`textarea, input:not([type='hidden']):not([type='file']):not([type='button']):not([type='submit']):not([type='reset']):not([type='checkbox']):not([type='radio'])`).first().attr(`aria-label`,e.messageBoxLabel)}setFileCloseButtonAria(e){e.find(`[${V.fileCloseButton}]`).each((e,t)=>{let n=$(t);!n.attr(`role`)&&t.nodeName.toLowerCase()!==`button`&&n.attr(`role`,`button`),!n.attr(`aria-label`)&&!n.attr(`title`)&&(n.attr(`aria-label`,`Remove selected file`),n.attr(`title`,`Remove selected file`))})}updateExpandableIndicatorAria(e,t){let n=t?`Collapse message`:`Expand message`;e.attr(`aria-label`,n)}handleKeyDown(