@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
2 lines • 173 kB
JavaScript
module.exports=function(e){function t(o){if(r[o])return r[o].exports;var l=r[o]={exports:{},id:o,loaded:!1};return e[o].call(l.exports,l,l.exports,t),l.loaded=!0,l.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){e.exports=r(1287)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},1057:function(e,t){e.exports=require("jquery")},1067:function(e,t){e.exports=require("./kendo.data")},1087:function(e,t){e.exports=require("./kendo.selectable")},1110:function(e,t){e.exports=require("./kendo.filtermenu")},1208:function(e,t){e.exports=require("./kendo.resizable")},1209:function(e,t){e.exports=require("./kendo.window")},1260:function(e,t){e.exports=require("./kendo.dialog")},1269:function(e,t){e.exports=require("./kendo.editable")},1272:function(e,t){e.exports=require("./kendo.switch")},1277:function(e,t){e.exports=require("./kendo.pdf")},1287:function(e,t,r){var o,l,n;(function(a){!function(a,define){l=[r(1067),r(1289),r(1269),r(1209),r(1110),r(1290),r(1291),r(1292),r(1087),r(1293),r(1288),r(1208),r(1294),r(1295),r(1296),r(1297),r(1277),r(1260),r(1296),r(1272)],o=a,n="function"==typeof o?o.apply(t,l):o,!(void 0!==n&&(e.exports=n))}(function(){return function(e,t){function r(e,t){return"["+Je.attr(e)+"="+t+"]"}function o(e){return Array(e+1).join('<td class="k-group-cell"> </td>')}function l(e){var t,r=" ";if(e){if(typeof e===Ar)return e;for(t in e)""!==e[t]&&(r+=t+'="'+e[t]+'"')}return r}function n(t,r){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",r)}function i(t,r,o,l,n){var a,i=r;for(r=e(),n=n||1,a=0;a<n;a++)r=r.add(t.eq(i+a));"number"==typeof o?r[l?"insertBefore":"insertAfter"](t.eq(o)):r.appendTo(o)}function s(t,r,o){return e(t).add(r).find(o)}function d(e,t,r){var o,l,n,a;for(r=ct(r)?r:[r],o=0,l=r.length;o<l;o++)n=r[o],at(n)&&n.click&&(a=n.name||n.text,t.on(Hr+Et,"a.k-grid-"+(a||"").replace(/\s/g,""),{commandName:a},ht(n.click,e)))}function c(e,t,r,o,l){return st(e,function(e){var n,a;return e=typeof e===Ar?{field:e}:e,e.parentIds=l,v(e)&&!r||(e.attributes=ce(e.attributes),e.footerAttributes=ce(e.footerAttributes),e.headerAttributes=ce(e.headerAttributes),n=!0),a=Je.guid(),o&&!e.locked&&(e.locked=o),e.headerAttributes=it({headers:l},e.headerAttributes),e.headerAttributes.id?a=e.headerAttributes.id:(e.headerAttributes=it({id:a},e.headerAttributes),e.uid=a),e.columns&&(e.columns=c(e.columns,t,n,e.locked,l?l+" "+a:a)),it({encoded:t,hidden:n,locked:o},e)})}function u(e,t){var r=[];return p(e,t,r),r[r.length-1]}function p(e,t,r){var o,l;for(r=r||[],o=0;o<t.length;o++){if(e===t[o])return!0;if(t[o].columns){if(l=r.length,r.push(t[o]),p(e,t[o].columns,r))return!0;r.splice(l,r.length-l)}}return!1}function h(e,t){f(e,t,t)}function f(e,t,r){var o=r?pe:ce;e.hidden=!t,e.attributes=o(e.attributes),e.footerAttributes=o(e.footerAttributes),e.headerAttributes=o(e.headerAttributes)}function g(e,t){m(e);var r=e._hideByMedia;f(e,t,r?e.matchesMedia:t)}function m(e){e.matchesMedia=k(e)}function k(e){return e&&(y(e.media)||!y(e.media)&&Je.matchesMedia(e.media))}function _(){return"none"!==this.style.display}function b(t){return"none"!==e(t)[0].style.display}function v(e){return C([e]).length>0}function C(e){return dt(e,function(e){var t=!e.hidden&&e.matchesMedia!==!1;return t&&e.columns&&(t=C(e.columns).length>0),t})}function w(e){var t,r,o=[];for(r=0;r<e.length;r++){if(t=e[r],!y(t.media)){if(!y(t.minScreenWidth))throw Error("Using 'media' and 'minScreenWidth' options at the same time is not supported.");o.push(t)}t.columns&&(o=o.concat(w(t.columns)))}return o}function y(e){return t===e}function S(t){return e(t).map(function(){return this.toArray()})}function T(e,t,r){var o=I(Q(t)),l=I(J(t)),n=e.rowSpan;e.rowSpan=r?o>l?n-(o-l)||1:n+(l-o):o>l?n+(o-l):n-(l-o)||1}function x(e,t){for(var r=0;r<e.length;r++)if(e[r].field==t)return e[r]}function H(t,r,o,l,n,a,i,s){var d,c,u=I(t),p=I([r]);u>p&&(d=Array(i+1).join('<th class="k-group-cell k-header" scope="col"> </th>'),c=a.children(":not(.k-filter-row)"),e(Array(u-p+1).join("<tr>"+d+"</tr>")).insertAfter(c.last())),O(a,u-p),E(o,l,n,a,s)}function R(t,r,o){var l,n,a,i,s,d,c,u;for(o=o||0,a=r,r=le(r),i={},s=t.find(">tr:not(.k-filter-row)"),d=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},c=0,u=r.length;c<u;c++)l=z(r[c],a),i[l.row]||(i[l.row]=s.eq(l.row).find(".k-header").filter(d)),n=i[l.row].eq(l.cell),n.attr(Je.attr("index"),o+c);return r.length}function I(e){var t,r,o=1,l=0;for(t=0;t<e.length;t++)e[t].columns&&(r=I(e[t].columns),r>l&&(l=r));return o+l}function E(t,r,o,l,n){var a,i,s=F(t[0],r),d=o.find(">tr:not(.k-filter-row)").eq(s.row).children("th.k-header"),c=e(),u=s.cell;for(a=0;a<t.length;a++)c=c.add(d.eq(u+a));for(l.find(">tr:not(.k-filter-row)").eq(s.row)[n](c),i=[],a=0;a<t.length;a++)t[a].columns&&(i=i.concat(t[a].columns));i.length&&E(i,r,o,l,n)}function z(e,t,r,o){var l,n;for(r=r||0,o=o||{},o[r]=o[r]||0,n=0;n<t.length;n++){if(t[n]==e){l={cell:o[r],row:r};break}if(t[n].columns&&(l=z(e,t[n].columns,r+1,o)))break;o[r]++}return l}function A(e,t,r,o){var l,n,a=!!r.locked;do l=e[t],t+=o?1:-1,n=!!l.locked;while(l&&t>-1&&t<e.length&&l!=r&&!l.columns&&n===a);return l}function D(e,t,r,o,l){var n,a,i,s,d;return t.columns?(t=t.columns,t[o?0:t.length-1]):(n=u(t,e),a=n?n.columns:e,i=ut(t,a),0===i&&o?i++:i==a.length-1&&!o||!r.locked&&!t.columns&&!o?i--:(i>0||0===i&&!o)&&i++,s=ut(r,a),t=A(a,i,r,s>i),d=ut(t,l),(!t.columns||d&&d!==a.length-1)&&t&&t!=r&&t.columns?D(e,t,r,o,l):null)}function F(e,t,r,o){var l,n;for(r=r||0,o=o||{},o[r]=o[r]||0,n=0;n<t.length;n++){if(t[n]==e){l={cell:o[r],row:r};break}if(t[n].columns&&(l=F(e,t[n].columns,r+1,o)))break;t[n].hidden||o[r]++}return l}function L(e){var t=M(Q(e));return t.concat(M(J(e)))}function q(e,t,r,o){var l=e[r],n=e[o],a=u(l,t);return t=a?a.columns:t,ut(n,t)}function M(e){var t,r=[],o=[];for(t=0;t<e.length;t++)r.push(e[t]),e[t].columns&&(o=o.concat(e[t].columns));return o.length&&(r=r.concat(M(o))),r}function P(e){var t,r,o=0;for(r=0;r<e.length;r++)t=e[r],t.columns?o+=P(t.columns):t.hidden&&o++;return o}function W(e){var t,r,o=0;for(t=0,r=e.length;t<r;t++)e[t].hidden||(o+=parseInt(e[t].width,10));return o}function V(e){var t,r,o,l=0;for(r=0,o=e.length;r<o;r++)t=e[r].style.width,t&&t.indexOf("%")==-1&&(l+=parseInt(t,10));return l}function B(e,t){var r,o,l=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(o=0;o<l.length;o++)r=l[o].rowSpan,r>1&&(l[o].rowSpan=r-t||1)}function O(e,t){var r,o=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(r=0;r<o.length;r++)o[r].rowSpan+=t}function G(t){var r,o=t.find("tr:not(.k-filter-row)"),l=o.filter(function(){return!e(this).children().length}).remove().length,n=o.find("th:not(.k-group-cell,.k-hierarchy-cell)");for(r=0;r<n.length;r++)n[r].rowSpan>1&&(n[r].rowSpan-=l);return o.length-l}function N(e,t,r,o,l){var n,a,i,s=[];for(n=0,i=e.length;n<i;n++)a=r[o]||[],a.push(t.eq(l+n)),r[o]=a,e[n].columns&&(s=s.concat(e[n].columns));s.length&&N(s,t,r,o+1,l+e.length)}function U(e,t,r){e.css({left:t,right:r})}function K(e,t,r){e[t]=e[t]||{},e[t][r]=e[t][r]||""}function j(e,t,r,o){K(e,t,r),""!==e[t][r]?e[t][r]+=" "+o:e[t][r]=o}function $(e,t,r,o){K(e,t,r),e[t][r]=e[t][r].replace(o,"")}function Q(e){return dt(e,function(e){return e.locked})}function J(e){return dt(e,function(e){return!e.locked})}function Y(e){return dt(e,function(e){return e.sticky&&!e.locked})}function X(e){return dt(e,function(e){return e.sticky&&!e.locked&&v(e)})}function Z(e){return dt(e,function(e){return!e.locked&&v(e)})}function ee(e){return dt(e,function(e){return e.locked&&v(e)})}function te(e){var t,r=[];for(t=0;t<e.length;t++)e[t].hidden||(e[t].columns?r=r.concat(te(e[t].columns)):r.push(e[t]));return r}function re(e){var t,r=[];for(t=0;t<e.length;t++)e[t].columns&&(r=r.concat(e[t].columns));return r}function oe(e){var t=re(e);return t=t.filter(function(e){return!e.hidden})}function le(e){var t,r=[];for(t=0;t<e.length;t++)e[t].columns?r=r.concat(le(e[t].columns)):r.push(e[t]);return r}function ne(e){var t,r=[];for(e=le(e),t=0;t<e.length;t++)"string"==typeof e[t]?r.push(e[t]):e[t].field&&r.push(e[t].field);return r}function ae(r){var o,l=r.find(">tr:not(.k-filter-row)"),n=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},a=e();return l.length>1&&(a=l.find("th").filter(n).filter(function(){return this.rowSpan>1})),a=a.add(l.last().find("th").filter(n)),o=Je.attr("index"),a.sort(function(r,l){var n,a;return r=e(r),l=e(l),n=r.attr(o),a=l.attr(o),n===t&&(n=e(r).index()),a===t&&(a=e(l).index()),n=parseInt(n,10),a=parseInt(a,10),n>a?1:n<a?-1:0}),a}function ie(t){var r,o,l,n,a,i,s,d=t.closest("table"),c=e().add(t),u=t.closest("tr"),p=d.find("tr:not(.k-filter-row)"),h=p.index(u);if(h>0){for(r=p.eq(h-1),o=r.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return!e(this).attr("rowspan")}),l=0,n=u.find("th:not(.k-group-cell,.k-hierarchy-cell)").index(t),a=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return this.colSpan>1}),i=0;i<a.length;i++)l+=a[i].colSpan||1;for(n+=Math.max(l-1,0),l=0,i=0;i<o.length;i++)if(s=o.eq(i),l+=s.attr("data-colspan")?s[0].getAttribute("data-colspan"):1,n>=i&&n<l){c=ie(s).add(c);break}}return c}function se(t){var r,o,l,n,a,i,s,d=t.closest("thead"),c=e().add(t),u=t.closest("tr"),p=d.find("tr:not(.k-filter-row)"),h=p.index(u)+t[0].rowSpan,f=Je.attr("colspan");if(h<=p.length-1){for(r=u.next(),o=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"),o=o.filter(function(){return!this.rowSpan||1===this.rowSpan}),n=0,l=0;l<o.length;l++)n+=parseInt(o.eq(l).attr(f),10)||1;for(a=r.find("th:not(.k-group-cell,.k-hierarchy-cell)"),i=parseInt(t.attr(f),10)||1,l=0;l<i;)r=a.eq(l+n),c=c.add(se(r)),s=parseInt(r.attr(f),10),s>1&&(i-=s-1),l++}return c}function de(t,r,o,l){var n,a=t;return l&&t.empty(),et?t[0].innerHTML=o:(n=document.createElement("div"),n.innerHTML="<table><tbody>"+o+"</tbody></table>",t=n.firstChild.firstChild,r[0].replaceChild(t,a[0]),t=e(t)),t}function ce(e){e=e||{};var t=e.style;return t?(t=t.replace(/display:[^;]*/i,"display:none"),t.match(/display:/i)||(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",it({},e,{style:t})}function ue(e){e=e||{};var t=e.style||"";return t.indexOf("display:none")!==-1}function pe(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function he(t,r,o,l){var n,a=t.find(">colgroup"),i=st(r,function(e){return n=e.width,n&&0!==parseInt(n,10)?Je.format('<col style="width:{0}"/>',typeof n===Ar?n:n+"px"):"<col />"});(o||a.find(".k-hierarchy-col").length)&&i.splice(0,0,'<col class="k-hierarchy-col" />'),a.length&&a.remove(),a=e(Array(l+1).join('<col class="k-group-col">')+i.join("")),a.is("colgroup")||(a=e("<colgroup/>").append(a)),t.prepend(a)}function fe(e,t){var r,o,l=0,n=e.find("th:not(.k-group-cell)");for(r=0,o=t.length;r<o;r++)t[r].locked&&(n.eq(r).insertBefore(n.eq(l)),n=e.find("th:not(.k-group-cell)"),l++)}function ge(e){var t,r,o,l={};for(r=0,o=e.length;r<o;r++)t=e[r],l[t.value]=t.text;return l}function me(e,t,r,o){var l=r&&r.length&&at(r[0])&&"value"in r[0],n=l?ge(r)[e]:e;return n=null!=n?n:"",t?Je.format(t,n):o===!1?n:Je.htmlEncode(n)}function ke(e,t,r){for(var o,l=0,n=e[l];n;){if(o=!!r||"none"!==n.style.display,o&&!lo.test(n.className)&&--t<0){n.style.display=r?"":"none";break}n=e[++l]}}function _e(t,r){for(var o,l,n=0,a=t.length;n<a;n+=1)l=t.eq(n),l.is(".k-grouping-row,.k-detail-row")?(o=l.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)-1)):(l.hasClass("k-grid-edit-row")&&(o=l.children(".k-edit-container")[0])&&(o=e(o),o.attr("colspan",parseInt(o.attr("colspan"),10)-1),o.find("col").eq(r).remove(),l=o.find("tr").first()),ke(l[0].cells,r,!1))}function be(e){var t,r,o=[];for(r=0;r<e.length&&(t=e[r],"field"in t&&"value"in t&&"items"in t);r++)o.push(t),t.hasSubgroups&&(o=o.concat(be(t.items)));return o}function ve(e){var t,r,o=[];for(r=0;r<e.length&&(t=e[r],"field"in t&&"value"in t&&"items"in t);r++)t.hasSubgroups&&(o=o.concat(ve(t.items))),o.push(t.aggregates);return o}function Ce(t,r){for(var o,l,n,a=0,i=t.length;a<i;a+=1)l=t.eq(a),l.is(".k-grouping-row,.k-detail-row")?(o=l.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)+1)):(l.hasClass("k-grid-edit-row")&&(o=l.children(".k-edit-container")[0])&&(o=e(o),o.attr("colspan",parseInt(o.attr("colspan"),10)+1),he(o.find(">form>table"),C(n),!1,0),l=o.find("tr").first()),ke(l[0].cells,r,!0))}function we(e,t,r){r=r||1;var o,l,n;for(l=0,n=e.length;l<n;l++)o=e.eq(l).children().last(),o.attr("colspan",parseInt(o.attr("colspan"),10)+r),o=t.eq(l).children().last(),o.attr("colspan",parseInt(o.attr("colspan"),10)-r)}function ye(e){var t,r,o=0,l=e.find(">colgroup>col");for(t=0,r=l.length;t<r;t+=1)o+=parseInt(l[t].style.width,10);return o}function Se(e,t){var r,o,l,n;e=e[0],t=t[0],e.rows.length!==t.rows.length&&(r=e.offsetHeight,o=t.offsetHeight,r>o?(l=t.rows[t.rows.length-1],no.test(l.className)&&(l=t.rows[t.rows.length-2]),n=r-o):(l=e.rows[e.rows.length-1],no.test(l.className)&&(l=e.rows[e.rows.length-2]),n=o-r),l.style.height=l.offsetHeight+n+"px")}function Te(e,t){var r,o=e.offsetHeight,l=t.offsetHeight;o>l?r=o+"px":o<l&&(r=l+"px"),r&&(e.style.height=t.style.height=r)}function xe(e,t){var r,o,l;if(typeof e===Ar&&e===t)return e;if(at(e)&&e.name===t)return e;if(ct(e))for(r=0,o=e.length;r<o;r++)if(l=e[r],typeof l===Ar&&l===t||l.name===t)return l;return null}function He(t,r){if(r===!0){t=e(t);var o=Je.scrollLeft(t.parent());Je.focusElement(t),Je.scrollLeft(t.parent(),o)}else e(t).one("focusin",function(e){e.preventDefault()}).trigger("focus")}function Re(e,r){return e.options.groupable&&(r.groupable||r.groupable===t)}function Ie(t,r){return!!e.grep(t,function(e){return e.field===r}).length}function Ee(e,t){return!(!e.field||e.selectable)&&(!(t.editable&&!t.editable(e.field))&&!(e.editable&&!e.editable(t)))}function ze(t){return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}function Ae(r){var o=e(r.currentTarget),l=o.is("th"),n=this.table.add(this.lockedTable),a=this.thead.parent().add(e(">table",this.lockedHeader)),i=ze(r.target),s=e(r.target).is(".k-checkbox"),d=e(r.target),c=o.closest("table")[0];return i&&o.find(Je.roleSelector("filtercell")).length?(this._setCurrent(o),t):(c!==n[0]&&c!==n[1]&&c!==a[0]&&c!==a[1]||d.is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(o,!1,s),!l&&i||setTimeout(function(){var t=e(Je._activeElement());t.hasClass("k-widget")&&!t.hasClass("k-grid-pager")||!t.is(ir)&&ze(Je._activeElement())&&e.contains(c,Je._activeElement())||He(c,!0)}),l&&!Je.support.touch&&r.preventDefault()),t)}function De(e,t){if(!t)return 0;var r=0;return Je.support.browser.webkit&&(r=e.width()),r}function Fe(e){var r;return"string"==typeof e?(r=e.toLowerCase(),"true"===r?{rows:!0}:{rows:r.indexOf("rows")>-1,columns:r.indexOf("columns")>-1}):e===!0?{rows:!0}:t}function Le(t,r){var o,l;return!!t&&(r=e(r),!!(r[0]&&mt(t[0],r[0])&&(o=r.offset().top-t.offset().top,l=r.outerHeight()/2,(o>=0||kt.abs(o)<=l)&&kt.floor(o+l)<=t.height())))}function qe(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function Me(e){return'<td colspan="#=data.colspan +'+e+'#"><p class="k-reset"><a class="k-icon k-i-collapse" href="\\#" tabindex="-1" '+Xr+'="'+Jr+'"></a>#=data.text#</p></td>'}function Pe(e){return'<td colspan="'+e+'"><p class="k-reset"> </p></td>'}function We(e,t,r,l,n,a){return'<tr role="row"'+(a?'data-group-uid="'+n+'"':"")+'class="k-grouping-row">'+o(t)+'<td colspan="'+e+'" aria-expanded="'+!!l+'"><p class="k-reset"><a class="k-icon '+(l?"k-i-collapse":"k-i-expand")+'" href="#" tabindex="-1" '+Xr+'="'+(l?Jr:Yr)+'"></a>'+r+"</p></td></tr>"}function Ve(e){return'<tr role="row" class="k-grouping-row"><td colspan="'+e+'" aria-expanded="true"><p class="k-reset"> </p></td></tr>'}function Be(t,r){t=e(t)[0],t.style.display=r?"":"none"}function Oe(e,t){var r=/&/g,o=/</g,l=/"/g,n=/'/g,a=/>/g;return(""+e).replace(r,"&").replace(o,"<").replace(a,">").replace(l,function(e){return t?"\\"+e:"""}).replace(n,"'")}function Ge(e,t){return t.filter(function(t){return t.field===e})[0].title||e}function Ne(e,t){return this.dataSource.indexOf(this.dataSource.getByUid(e.uid))-this.dataSource.indexOf(this.dataSource.getByUid(t.uid))}function Ue(e){return!(e.exportable===!1||e.exportable&&e.exportable.excel===!1)}var Ke,je,$e,Qe,Je=window.kendo,Ye=Je.ui,Xe=Je.data.DataSource,Ze=Je.data.ObservableObject,et=Je.support.tbodyInnerHtml,tt=Je._activeElement,rt=Ye.Widget,ot=Je._outerWidth,lt=Je._outerHeight,nt=Je.keys,at=e.isPlainObject,it=e.extend,st=e.map,dt=e.grep,ct=Array.isArray,ut=e.inArray,pt=Array.prototype.push,ht=e.proxy,ft=Je.isFunction,gt=e.isEmptyObject,mt=e.contains,kt=Math,_t=".",bt="progress",vt="error",Ct="k-hierarchy-cell",wt=":not(.k-group-cell):not(["+Je.attr("virtual")+"]):not(.k-hierarchy-cell:not(:has(.k-icon.k-i-collapse,.k-icon.k-i-expand))):visible",yt="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",St="tr:not(.k-footer-template):visible",Tt=":not(.k-group-cell):not(.k-detail-cell):not(.k-hierarchy-cell):visible",xt="tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",Ht="col:not(.k-group-col, .k-hierarchy-col)",Rt="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",It=".k-grid.k-widget",Et=".kendoGrid",zt="k-grid-content-locked",At="k-group-cell",Dt="edit",Ft="beforeEdit",Lt="save",qt="remove",Mt="detailInit",Pt="filterMenuInit",Wt="columnMenuInit",Vt="filterMenuOpen",Bt="columnMenuOpen",Ot="cellClose",Gt="change",Nt="columnHide",Ut="columnShow",Kt="saveChanges",jt="dataBound",$t="detailExpand",Qt="detailCollapse",Jt="itemchange",Yt="page",Xt="paging",Zt="scroll",er="sync",tr="loadStart",rr="loadEnd",or="k-state-focused",lr=":kendoFocusable",nr="k-state-selected",ar="k-checkbox",ir="input[data-role='checkbox']."+ar,sr="k-grid-norecords",dr="k-link",cr="k-icon",ur="k-sort-order",pr="k-sorted",hr="k-header-column-menu",fr="k-grid-filter",gr="k-grid-content-sticky",mr="k-grid-header-sticky",kr="k-grid-footer-sticky",_r="k-grid-no-left-border",br="resize",vr="columnResize",Cr="columnReorder",wr="columnLock",yr="columnUnlock",Sr="columnStick",Tr="columnUnstick",xr="navigate",Hr="click",Rr="mousedown",Ir="height",Er="tabIndex",zr="function",Ar="string",Dr="bottom",Fr="container-for",Lr="field",qr="input",Mr="incell",Pr="inline",Wr="uid",Vr=1,Br="colSpan",Or="overflow",Gr="hidden",Nr="sort",Ur="group-sort",Kr="Are you sure you want to delete this record?",jr="No records available.",$r="Delete",Qr="Cancel",Jr="Collapse",Yr="Expand",Xr="aria-label",Zr=/(\}|\#)/gi,eo=/#/gi,to="[\\x20\\t\\r\\n\\f]",ro=RegExp("(\\s*left\\s*:\\s*\\d*px;?)*","ig"),oo=RegExp("(\\s*right\\s*:\\s*\\d*px;?)*","ig"),lo=RegExp("(^|"+to+")(k-group-cell|k-hierarchy-cell)("+to+"|$)"),no=RegExp("(^|"+to+")(k-filter-row)("+to+"|$)"),ao='# if (iconClass) {#<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass#"></span>#=text#</a># } else { #<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#">#=text#</a># } #',io='<input class="'+ar+'" data-role="checkbox" aria-label="Select row" aria-checked="false" type="checkbox">',so='<input class="'+ar+'" data-role="checkbox" aria-label="Select all rows" aria-checked="false" type="checkbox">',co=!1,uo=Je.support.browser,po=uo.msie&&11===uo.version,ho=/Mac OS/.test(navigator.userAgent),fo={content:"k-content",widget:"k-widget",scrollContainer:"k-scroll-container"};Ye.Pager&&(Ke=Ye.Pager.extend({init:function(e,t){Ye.Pager.fn.init.call(this,e,it(!0,{},t)),this.dataSource.options.useRanges=!0,this.dataSource._omitPrefetch=!0},options:{name:"GroupsPager"},totalPages:function(){var e=this;return Math.ceil((e._collapsedTotal()||0)/(e.pageSize()||1))},_collapsedTotal:function(){var e=this.dataSource;return e?e.groupsTotal(!0)||0:0}})),je=rt.extend({init:function(e,t){var r=this;rt.fn.init.call(r,e,t),r._refreshHandler=ht(r.refresh,r),r.setDataSource(t.dataSource),r.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(Gt,t._refreshHandler),t.dataSource=e,t.dataSource.bind(Gt,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[Xt,Yt,Zt,tr,rr],destroy:function(){var e=this;rt.fn.destroy.call(e),e.dataSource.unbind(Gt,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(Et),clearTimeout(e._timeout),e._scrollingTimeout&&clearTimeout(e._scrollingTimeout),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,r=this,o=Je.support.scrollbar()+1,l=r.element;l.css({width:"auto",overflow:"hidden"}).css(co?"padding-left":"padding-right",o),r.content=l.children().first(),t=r.wrapper=r.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().on("DOMMouseScroll"+Et+" mousewheel"+Et,ht(r._wheelScroll,r)),r._wrapper(),(Je.support.kineticScrollNeeded||Je.support.touch)&&(r.wrapper.css("touch-action","none"),r.drag=new Je.UserEvents(r.wrapper,{global:!0,allowSelection:!0,start:function(e){e.sender.capture()},move:function(e){r.verticalScrollbar.scrollTop(r.verticalScrollbar.scrollTop()-e.y.delta),Je.scrollLeft(t,Je.scrollLeft(t)-e.x.delta),e.preventDefault()}})),r.verticalScrollbar=e('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:o}).appendTo(l).on("scroll"+Et,ht(r._scroll,r))},_wrapper:function(){var e=this;po&&(e.wrapper.css({"overflow-y":Zt}),e.element.css(co?"padding-left":"padding-right",0))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,r=t.scrollTop(),o=Je.wheelDeltaY(e);!o||o>0&&0===r||o<0&&r+t[0].clientHeight==t[0].scrollHeight||(e.preventDefault(),this.verticalScrollbar.scrollTop(r+-o))}},_scroll:function(e){var r=this,o=!r.options.prefetch,l=e.currentTarget.scrollTop,n=r.dataSource,a=r.itemHeight,i=n.skip()||0,s=r._rangeStart||i,d=r.element.innerHeight(),c=!!(r._scrollbarTop&&r._scrollbarTop>l),u=kt.max(kt.floor(l/a),0),p=c?kt.ceil(d/a):kt.floor(d/a),h=kt.max(u+p,0);return r._preventScroll?(r._preventScroll=!1,t):(r._prevScrollTop=r._scrollTop,r._scrollTop=l-s*a,r._scrollbarTop=l,r._scrolling=o,r._fetch(u,h,c)||(r.wrapper[0].scrollTop=r._scrollTop),r.trigger(Zt),o&&(r._scrollingTimeout&&clearTimeout(r._scrollingTimeout),r._scrollingTimeout=setTimeout(function(){r._scrolling=!1,r._page(r._rangeStart,r.dataSource.take())},100)),t)},scrollToTop:function(){this._scrollTo(0)},scrollToBottom:function(){var e=this.verticalScrollbar;this._scrollTo(e[0].scrollHeight-e.height())},_scrollWrapperToTop:function(){this.wrapper.scrollTop(0)},_scrollWrapperToBottom:function(){this.wrapper.scrollTop(this.wrapper[0].scrollHeight)},_scrollWrapperOnColumnResize:function(){var e=this,t=this.wrapper,r=t.scrollTop();t[0].scrollWidth>t[0].clientWidth?(!e._wrapperScrolled&&r||e._isScrolledToBottom())&&(t.scrollTop(r+Je.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(r-Je.support.scrollbar()),e._scrollTop=t.scrollTop()),e._wrapperScrolled=!1)},_scrollTo:function(e){var t=this,r=t.verticalScrollbar;r.scrollTop()!==e&&(t._preventScroll=!0),t.wrapper.scrollTop(e),t._scrollTop=t.wrapper.scrollTop(),r.scrollTop(e),t._scrollbarTop=r.scrollTop()},_isScrolledToTop:function(){return 0===this.verticalScrollbar.scrollTop()},_isScrolledToBottom:function(){var e=this.verticalScrollbar,t=e.scrollTop();return t>0&&t>=parseInt(e[0].scrollHeight-e.height(),10)},_isWrapperScrolledToBottom:function(){var e=this.wrapper;return e.scrollTop()>=parseInt(e[0].scrollHeight-e.height(),10)},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},position:function(e){var t,r=this._rangeStart||this.dataSource.skip()||0,o=this.dataSource.pageSize();return t=e>r?e-r:r-e-1,t>o?o:t},scrollIntoView:function(e){var t=this.wrapper[0],r=t.clientHeight,o=this._isScrolledToBottom()?t.scrollTop:this._scrollTop||t.scrollTop,l=e[0].offsetTop,n=e[0].offsetHeight;o>l?this.verticalScrollbar[0].scrollTop-=r/2:l+n>=o+r&&(this.verticalScrollbar[0].scrollTop+=r/2)},_fetch:function(t,r,o){var l=this,n=l.dataSource,a=l.itemHeight,i=n.take(),s=l._rangeStart||n.skip()||0,d=kt.floor(t/i)*i,c=!1,u=.33,p=l.verticalScrollbar,h=uo.webkit?1:0,f=n._isGroupPaged()?n.groupsTotal(!0):n.total();return t<s?(c=!0,s=kt.max(0,r-i),l._scrollTop=p.scrollTop()-s*a,l._page(s,i)):r>=s+i&&!o?(c=!0,s=kt.min(t,f-i),l._scrollTop=p.scrollTop()>=p[0].scrollHeight-p[0].offsetHeight-h?l.wrapper[0].scrollHeight-l.wrapper[0].offsetHeight:l.dataSource._isGroupPaged()&&t>=f-i?l.wrapper[0].scrollHeight-l.wrapper[0].offsetHeight-(l._scrollTop-l._prevScrollTop):a,l._page(s,i)):!l._fetching&&l.options.prefetch&&(t<d+i-i*u&&t>i&&n.prefetch(d-i,i,e.noop),r>d+i*u&&n.prefetch(d+i,i,e.noop)),c},fetching:function(){return this._fetching},_page:function(t,r,o){var l=this,n=!l.options.prefetch,a=l.dataSource,i=a._isGroupPaged();o=ft(o)?o:e.noop,l.trigger(Xt,{skip:t,take:r})||(clearTimeout(l._timeout),l._fetching=!0,l._rangeStart=t,i&&a._groupRangeExists(t,t+r)||!i&&a.inRange(t,r)?(l.trigger(tr),a.range(t,r,function(){l.trigger(rr),o(),l.trigger(Yt)},"page")):(n||l.trigger(tr),l._timeout=setTimeout(function(){l._scrolling||(n&&l.trigger(tr),a.range(t,r,function(){l.trigger(rr),o(),l.trigger(Yt)}))},100)))},repaintScrollbar:function(e){var r,o=this,l="",n=o.options.maxScrollHeight,a=o.dataSource,i=Je.support.kineticScrollNeeded?0:Je.support.scrollbar(),s=o.wrapper[0],d=o._isScrolledToBottom(),c=o.itemHeight=o.options.itemHeight()||0,u=s.scrollWidth>s.offsetWidth?i:0,p=(a._isGroupPaged()?a.groupsTotal(!0):a.total())*c+u;for(r=0;r<kt.floor(p/n);r++)l+='<div style="width:1px;height:'+n+'px"></div>';p%n&&(l+='<div style="width:1px;height:'+p%n+'px"></div>'),o.verticalScrollbar.html(l),!d||o._isScrolledToBottom()||o.dataSource._isGroupPaged()||o.scrollToBottom(),t!==o._scrollTop&&e&&(s.scrollTop=o._scrollTop,o._scrollWrapperOnColumnResize())},refresh:function(e){var r=this,o=r.dataSource,l=r._rangeStart,n=(e||{}).action,a=r._isScrolledToBottom()||!n||n!==Jt&&n!==qt&&n!==er;r.trigger(rr),clearTimeout(r._timeout),r.repaintScrollbar(a),r.drag&&r.drag.cancel(),t===l||r._fetching||((!n||n!==er&&n!==Jt&&"expandGroup"!==n)&&(r._rangeStart=o.skip()),1!==o.page()||n&&(n===er||n===Jt||"expandGroup"===n||"collapseGroup"===n)||(r.verticalScrollbar[0].scrollTop=0)),r._fetching=!1}}),$e={create:{text:"Add new record",className:"k-grid-add",iconClass:"k-icon k-i-plus"},cancel:{text:"Cancel changes",className:"k-grid-cancel-changes",iconClass:"k-icon k-i-cancel"},save:{text:"Save changes",className:"k-grid-save-changes",iconClass:"k-icon k-i-check"},destroy:{text:"Delete",className:"k-grid-delete",iconClass:"k-icon k-i-close"},edit:{text:"Edit",className:"k-grid-edit",iconClass:"k-icon k-i-edit"},update:{text:"Update",className:"k-primary k-grid-update",iconClass:"k-icon k-i-check"},canceledit:{text:"Cancel",className:"k-grid-cancel",iconClass:"k-icon k-i-cancel"},excel:{text:"Export to Excel",className:"k-grid-excel",iconClass:"k-icon k-i-file-excel"},pdf:{text:"Export to PDF",className:"k-grid-pdf",iconClass:"k-icon k-i-file-pdf"},search:{text:"Search...",className:"k-grid-search"}},Qe=Je.ui.DataBoundWidget.extend({init:function(t,r,o){var l=this;r=ct(r)?{dataSource:r}:r,rt.fn.init.call(l,t,r),o&&(l._events=o),co=Je.support.isRtl(t),l._element(),l._aria(),l._columns(e.extend(!0,[],l.options.columns)),l._foreignKeyPromises?e.when.apply(null,l._foreignKeyPromises).then(function(){l._foreignKeyPromises=null,l._continueInit()}):l._continueInit()},_continueInit:function(){var t=this;t._dataSource(),t._stickyColumns(),t._tbody(),t._thead(),t._groupable(),t._toolbar(),t._pageable(),t._setContentHeight(),t._templates(),t._navigatable(),t._selectable(),t._clipboard(),t._details(),t._editable(),t._attachCustomCommandsEvent(),t._adaptiveColumns(),t._minScreenSupport(),t.options.autoBind?t.dataSource.fetch():(t._group=t._groups()>0,t._footer()),t.lockedContent&&(t.wrapper.addClass("k-grid-lockedcolumns"),t._resizeHandler=function(){t.resize()},e(window).on("resize"+Et,t._resizeHandler)),Je.notify(t)},events:[Gt,"dataBinding","cancel",jt,$t,Qt,Mt,Pt,Vt,Wt,Bt,Dt,Ft,Lt,qt,Kt,Ot,vr,Cr,Ut,Nt,wr,yr,Sr,Tr,xr,"page","sort","filter","group","groupExpand","groupCollapse","kendoKeydown"],setDataSource:function(e){var t,r=this,o=r.options.scrollable;r.options.dataSource=e,r._dataSource(),r._pageable(),r._thead(),o&&(o.virtual?(t=r.content.find(">.k-virtual-scrollable-wrap"),Je.scrollLeft(t,De(t,co))):(t=r.tbody,Je.scrollLeft(r.content,De(t,co)))),r.options.groupable&&r._groupable(),r.virtualScrollable&&r.virtualScrollable.setDataSource(r.options.dataSource),r.options.navigatable&&r._navigatable(),r.options.selectable&&r._selectable(),r.options.autoBind?r.dataSource.fetch():r._footer()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!1,persistSelection:!1,editable:!1,encodeTitles:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",search:!1,noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",loaderType:"loadingPanel",messages:{editable:{cancelDelete:Qr,confirmation:Kr,confirmDelete:$r},commands:{create:$e.create.text,cancel:$e.cancel.text,save:$e.save.text,destroy:$e.destroy.text,edit:$e.edit.text,update:$e.update.text,canceledit:$e.canceledit.text,excel:$e.excel.text,pdf:$e.pdf.text,search:$e.search.text},noRecords:jr,expandCollapseColumnHeader:"",groupHeader:"Press ctrl + space to group",ungroupHeader:"Press ctrl + space to ungroup"},width:null},destroy:function(){var t,r=this;r._angularItems("cleanup"),r._destroyColumnAttachments(),rt.fn.destroy.call(r),this._navigatableTables&&(this._navigatableTables.off(Et),this._navigatableTables=null,this._headertables=null),r._resizeHandler&&e(window).off("resize"+Et,r._resizeHandler),r.pager&&r.pager.element&&r.pager.destroy(),r.timer&&clearTimeout(r.timer),r._progressTimeOut&&clearTimeout(r._progressTimeOut),r._collapseGroupsTimeOut&&clearTimeout(r._collapseGroupsTimeOut),r._endlessFetchTimeOut&&clearTimeout(r._endlessFetchTimeOut),r.pager=null,r._destroyGroupable(),r.options.reorderable&&r.wrapper.data("kendoReorderable").destroy(),r.selectable&&r.selectable.element&&(r.selectable.destroy(),r.clearArea(),r._selectedIds=null,r.copyHandler&&(r.wrapper.off("keydown",r.copyHandler),r.unbind(r.copyHandler)),r.updateClipBoardState&&(r.unbind(r.updateClipBoardState),r.updateClipBoardState=null),r.clearAreaHandler&&r.wrapper.off("keyup",r.clearAreaHandler)),r.selectable=null,r.resizable&&(r.resizable.destroy(),r._resizeUserEvents&&(r._resizeHandleDocumentClickHandler&&e(document).off("click",r._resizeHandleDocumentClickHandler),r._resizeUserEvents.destroy(),r._resizeUserEvents=null),r.resizable=null),r._destroyVirtualScrollable(),r.editableUserEvents&&(r.editableUserEvents.destroy(),r.editableUserEvents=null),r._lockedContentUserEvents&&(r._lockedContentUserEvents.destroy(),r._lockedContentUserEvents=null),r._destroyEditable(),r.dataSource&&(r.dataSource.unbind(Gt,r._refreshHandler).unbind(bt,r._progressHandler).unbind(vt,r._errorHandler).unbind(Nr,r._clearSortClasses),r._refreshHandler=r._progressHandler=r._errorHandler=r._clearSortClasses=null),t=r.element.add(r.wrapper).add(r.table).add(r.thead).add(r.wrapper.find(">.k-grid-toolbar")),r.content&&(t=t.add(r.content).add(r.content.find(">.k-virtual-scrollable-wrap"))),
r.lockedHeader&&r._removeLockedContainers(),r.pane&&r.pane.destroy(),r._isMobile&&(r.wrapper.off("transitionend"+Et),r.wrapper.off("contextmenu"+Et)),r.minScreenResizeHandler&&e(window).off("resize",r.minScreenResizeHandler),r._detachColumnMediaResizeHandler(),r._draggableInstance&&r._draggableInstance.element&&r._draggableInstance.destroy(),r._draggableInstance=null,t.off(Et),Je.destroy(r.wrapper),r.rowTemplate=r.altRowTemplate=r.lockedRowTemplate=r.lockedAltRowTemplate=r.detailTemplate=r.footerTemplate=r.groupFooterTemplate=r.lockedGroupFooterTemplate=r.noRecordsTemplate=null,r.scrollables=r.thead=r.tbody=r.element=r.table=r.content=r.footer=r.wrapper=r.lockedTable=r.lockedContent=r.lockedHeader=r.lockedFooter=r._groupableClickHandler=r._groupRows=r._setContentWidthHandler=null},getOptions:function(){var r,o,l,n=this.options;return n.dataSource=null,r=it(!0,{},this.options),r.columns=Je.deepExtend([],this.columns),o=this.dataSource,l=o.options.data&&o._data,o.options.data=null,r.dataSource=e.extend(!0,{},o.options),o.options.data=l,r.dataSource.data=l,r.dataSource.page=o.page(),r.dataSource.filter=e.extend(!0,{},o.filter()),r.dataSource.pageSize=o.pageSize(),r.dataSource.sort=o.sort(),r.dataSource.group=o.group(),r.dataSource.aggregate=o.aggregate(),r.dataSource.transport&&(r.dataSource.transport.dataSource=null),r.pageable&&r.pageable.pageSize&&(r.pageable.pageSize=o.pageSize()),r.$angular=t,r},setOptions:function(e){var t,r,o,l,n=this.getOptions();Je.deepExtend(n,e),e.dataSource?e.dataSource.filter&&(n.dataSource.filter=e.dataSource.filter):n.dataSource=this.dataSource,t=this.wrapper,r=this._events,o=this.element,this.destroy(),this.options=null,this._isMobile&&(l=t.closest(Je.roleSelector("pane")).parent(),l.after(t),l.remove(),t.removeClass("k-grid-mobile")),t[0]!==o[0]&&(t.before(o),t.remove()),o.empty(),this.init(o,n,r),this._setEvents(n)},items:function(){return this.lockedContent?this._items(this.tbody).add(this._items(this.lockedTable.children("tbody"))):this._items(this.tbody)},_items:function(t,r){return t.children().filter(function(){var t=e(this);return!(t.hasClass(r?"k-detail-row":"k-grouping-row")||t.hasClass("k-detail-row")||t.hasClass("k-group-footer"))})},dataItems:function(){var e,t,r,o=Je.ui.DataBoundWidget.fn.dataItems.call(this);if(this.lockedContent){for(e=o.length,t=Array(2*e),r=e;--r>=0;)t[r]=t[r+e]=o[r];o=t}return o},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead&&(this.angular("cleanup",function(){return{elements:t.thead.get()}}),t.thead.add(t.lockedHeader).find("th").each(function(){var t=e(this),r=t.data("kendoFilterMenu"),o=t.data("kendoColumnSorter"),l=t.data("kendoColumnMenu");r&&r.destroy(),o&&o.destroy(),l&&l.destroy()}))},_attachCustomCommandsEvent:function(){var e,t,r,o=this,l=le(o.columns||[]);for(t=0,r=l.length;t<r;t++)e=l[t].command,e&&d(o,o.wrapper,e)},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._cellId=e+"_active_cell")},_element:function(){var t=this,r=t.element;r.is("table")||(r=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),r.length||(r=e("<table />").appendTo(t.element))),t.table=r.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,r){var o,l,n,a,i,s,d,c,u,p,h=this,f=h.options.columnResizeHandleWidth,g=h.options.scrollable,m=h.resizeHandle,k=3*f/2,_=0;m&&h.lockedContent&&m.data("th")[0]!==r[0]&&(m.off(Et).remove(),m=null),m||(m=h.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'),t.append(m)),c=Je.scrollLeft(t),co&&(uo.mozilla||uo.webkit&&uo.version>=85)&&(c*=-1),d=parseFloat(t.css("borderLeftWidth")),u=r.offset().left+c-parseFloat(r.css("marginLeft"))-(t.offset().left+d),co?g&&(_=u<=c?k:0,o=r.closest(".k-grid-header-wrap, .k-grid-header-locked"),s=o[0].scrollWidth-o[0].offsetWidth,i=parseFloat(o.css("marginLeft")),l=uo.msie?2*Je.scrollLeft(o)+d-i-_:0,n=-_,a=uo.mozilla?d-i-_:0,u-=n+a+l):u+=r[0].offsetWidth,p=r.offset().top-parseFloat(r.css("marginTop"))-(t.offset().top+parseFloat(t.css("borderTopWidth"))),m.css({top:p,left:u-k,height:lt(r),width:3*f-_}).data("th",r).show(),m.off("dblclick"+Et).on("dblclick"+Et,function(){h._autoFitLeafColumn(parseInt(r.attr(Je.attr("index")),10))})},_positionColumnResizeHandle:function(){var r=this,o=r.lockedHeader?r.lockedHeader.find("thead").first():e();r.thead.add(o).on("mousemove"+Et,"tr:not(.k-filter-row) > th",function(o){var l=t!==o.buttons?o.buttons:o.which||o.button,n=e(this);n.hasClass("k-group-cell")||n.hasClass("k-hierarchy-cell")||t!==l&&0!==l||n[0].hasAttribute(Je.attr(Br))||r._createResizeHandle(n.closest("div"),n)})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._resetResizeHandleHeader(),this._hideResizeHandle())},_resetResizeHandleHeader:function(){var t;this.resizeHandle&&(t=e(this.resizeHandle).data("th"),t&&(t.find(_t+dr).find(_t+cr).show(),t.find(_t+ur).show(),t.find(_t+hr).show(),t.find(_t+fr).show()))},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off(Et).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,r=t.lockedHeader?t.lockedHeader.find("thead").first():e();t._resizeUserEvents=new Je.UserEvents(r.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,minHold:500,hold:function(r){var o=e(r.target);r.preventDefault(),t.resizeHandle&&(t.resizeHandle.data("th").removeClass("k-column-active"),t._resetResizeHandleHeader()),o.addClass("k-column-active"),o.find(_t+dr).find(_t+cr).hide(),o.find(_t+ur).hide(),o.find(_t+hr).hide(),o.find(_t+fr).hide(),t._createResizeHandle(o.closest("div"),o),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=ht(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},resizeColumn:function(r,o){var l,n,a,i,s=this,d=!!r.locked,c=!!r.hidden,u=this.options,p=Je.support.mobileOS?0:Je.support.scrollbar(),h=d?ut(r,ee(te(s.columns))):ut(r,Z(te(s.columns))),f=d?s.lockedTable:s.table,g=s.footer||e(),m=d?s.lockedHeader.find("table"):s.thead.closest("table"),k=r.minResizableWidth||10,_=ot(d?f.find("tbody"):s.tbody);return c?(r.width=o>k?o:k,t):(s.footer&&s.lockedContent&&(g=s.footer.children(d?".k-grid-footer-locked":".k-grid-footer-wrap")),l=u.scrollable?m.find("col:not(.k-group-col,.k-hierarchy-col)").eq(h).add(f.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(h)).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(h)):f.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(h),u.scrollable?(n=!1,a=s.wrapper.width()-p,i=o=o>k?o:k,d&&_-o+i>a&&(i=o+(a-_-2*p),i<0&&(i=o),n=!0),i>10&&i>=k&&(l.css("width",i),_&&(i=n?a-2*p:_+(o-r.width),f.add(m).add(g).css("width",i),d||(s._footerWidth=i))),s._scrollVirtualWrapperOnColumnResize()):o>10&&o>=k&&l.css("width",o),r.width=o,s._applyLockedContainersWidth(),s._syncLockedContentHeight(),s._syncLockedHeaderHeight(),s._updateStickyColumns(),t)},_resizable:function(){var t,r,o,l,a,i,s,d,c=this,u=c.options,p=this._isMobile,h=Je.support.mobileOS?0:Je.support.scrollbar();u.resizable&&(t=u.scrollable?c.wrapper.find(".k-grid-header-wrap").first():c.wrapper,p?c._positionColumnResizeHandleTouch(t):c._positionColumnResizeHandle(t),c.resizable&&c.resizable.destroy(),c.resizable=new Ye.Resizable(t.add(c.lockedHeader),{handle:(u.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('<div class="k-grid-resize-indicator" />').css({height:lt(t.data("th"))+c.tbody.attr("clientHeight")})},start:function(t){var h,f,g,m,k;d=e(t.currentTarget).data("th"),p&&c._hideResizeHandle(),h=d.closest("table"),f=e.inArray(d[0],ae(d.closest("thead")).filter(":visible")),i=h.parent().hasClass("k-grid-header-locked"),g=i?c.lockedTable:c.table,m=c.footer||e(),c.footer&&c.lockedContent&&(m=c.footer.children(i?".k-grid-footer-locked":".k-grid-footer-wrap")),n(c.wrapper,"col-resize"),s=u.scrollable?h.find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(f).add(g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(f)).add(m.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(f)):g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col)").eq(f),k=e.map(c.columns,function(e){return!e.hidden&&(i&&e.locked||!i&&!e.locked)?e:null}),r=t.x.location,o=ot(d),l=le(k)[f].minResizableWidth||10,a=ot(i?g.children("tbody"):c.tbody),uo.webkit&&c.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var n,p,f,g,m,k,_=co?-1:1,b=o+t.x.location*_-r*_;u.scrollable?(i&&c.lockedFooter?n=c.lockedFooter.children("table"):c.footer&&(n=c.footer.find(">.k-grid-footer-wrap>table")),n&&n[0]||(n=e()),p=d.closest("table"),f=i?c.lockedTable:c.table,g=!1,m=c.wrapper.width()-h,k=b,i&&a-o+k>m&&(k=o+(m-a-2*h),k<0&&(k=b),g=!0),k>10&&k>=l&&(s.css("width",k),a&&(k=g?m-2*h:a+t.x.location*_-r*_,f.add(p).add(n).css("width",k),i||(c._footerWidth=k))),c._scrollVirtualWrapperOnColumnResize()):b>10&&b>=l&&s.css("width",b)},resizeend:function(){var e,t,r,l=ot(d);n(c.wrapper,""),uo.webkit&&c.wrapper.removeClass("k-grid-column-resizing"),o!=l&&(t=c.lockedHeader?c.lockedHeader.find("thead").first().find("tr").first().add(c.thead.find("tr").first()):d.parent(),r=d.attr(Je.attr("index")),r||(r=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(d)),e=le(c.columns)[r],e.width=l,c.trigger(vr,{column:e,oldWidth:o,newWidth:l}),c._applyLockedContainersWidth(),c._syncLockedContentHeight(),c._syncLockedHeaderHeight(),c._updateStickyColumns()),c._resetResizeHandleHeader(),c._hideResizeHandle(),d=null}}))},_draggable:function(){var t,r=this;r.options.reorderable&&(r._draggableInstance&&r._draggableInstance.destroy(),t=r.wrapper.children(".k-grid-header"),r._draggableInstance=r.wrapper.kendoDraggable({group:Je.guid(),autoScroll:!0,filter:r.content?".k-grid-header:first "+Rt:"table:first>.k-grid-header "+Rt,dragstart:function(){t.children(".k-grid-header-wrap").off("scroll"+Et+"scrolling").on("scroll"+Et+"scrolling",function(e){r.virtualScrollable?Je.scrollLeft(r.content.find(">.k-virtual-scrollable-wrap"),this.scrollLeft):Je.scrollLeft(r.scrollables.not(e.currentTarget),this.scrollLeft)})},dragend:function(){r._resetResizeHandleHeader(),t.children(".k-grid-header-wrap").off("scroll"+Et+"scrolling")},drag:function(){r._hideResizeHandle()},hint:function(t){var r=t.attr(Je.attr("title"));return r&&(r=Je.htmlEncode(r)),e('<div class="k-reorder-clue k-drag-clue" />').html(r||t.attr(Je.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel"></span>')}}).data("kendoDraggable"))},_reorderable:function(){var t=this;t.options.reorderable&&(t.wrapper.data("kendoReorderable")&&t.wrapper.data("kendoReorderable").destroy(),t.wrapper.kendoReorderable({draggable:t._draggableInstance,dragOverContainers:function(e,r){var o=L(t.columns);return o[e].lockable!==!1&&q(o,t.columns,e,r)>-1},inSameContainer:function(r){return e(r.source).parent()[0]===e(r.target).parent()[0]&&q(L(t.columns),t.columns,r.sourceIndex,r.targetIndex)>-1},change:function(e){var r=L(t.columns),o=r[e.oldIndex],l=q(r,t.columns,e.oldIndex,e.newIndex);t.trigger(Cr,{newIndex:l,oldIndex:ut(o,r),column:o}),t.reorderColumn(l,o,"before"===e.position)}}))},_reorderHeader:function(e,t,r,o){var l,n,a,d,c,u=this,p=z(e[0],u.columns),h=z(t,u.columns),f=[];for(a=0;a<e.length;a++)e[a].columns&&(f=f.concat(e[a].columns));n=o?s(o,o,"tr:eq("+p.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"):s(u.lockedHeader,u.thead,"tr:eq("+p.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),d=Q(e).length,c=Q([t]).length,f.length?(d>0&&0===c?(l="prepend",H(e,t,f,u.columns,u.lockedHeader.find("thead"),u.thead,this._groups(),l)):0===d&&c>0&&(l=0!==h.cell||!e[0].columns||t.columns||u._group?"append":"prepend",H(e,t,f,J(u.columns),u.thead,u.lockedHeader.find("thead"),this._groups(),l)),(t.columns||p.cell-h.cell>1||h.cell-p.cell>1)&&(t=D(u.columns,t,e[0],r,u.columns),t&&(d>0&&0===c?u._reorderHeader(f,t,r,u.thead):0===d&&c>0?u._reorderHeader(f,t,r,u.lockedHead):u._reorderHeader(f,t,r)))):d!==c&&T(n[p.cell],u.columns,d),i(n,p.cell,h.cell,r,e.length)},_reorderContent:function(t,r,o){var l,n,a,d,c,u,p=this,h=e(),f=t[0],g=C(t),m=ut(f,le(p.columns)),k=ut(r,le(p.columns)),_=ut(g[0],te(p.columns)),b=ut(r,te(p.columns)),v=Q(p.columns).length,w=!!r.locked,y=p.footer||p.wrapper.find(".k-grid-footer"),S=l=b;for(r.hidden&&(a=w?Q(p.columns):J(p.columns),C(a).length>0?(S=l=b=this._findClosestVisibleColumnIndex(a,k),n=C(a.slice(k)).length>0):w?(b=p.lockedTable.find("colgroup"),S=p.lockedHeader.find("colgroup"),l=e(p.lockedFooter).find(">table>colgroup")):(b=p.tbody.prev(),S=p.thead.prev(),l=y.find(".k-grid-footer-wrap").find(">table>colgroup"))),p._hasFilterRow()&&i(p.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),m,k,o,t.length),_>=0&&i(s(p.lockedHeader,p.thead.prev(),Ht),_,S,n?n:o,g.length),p.options.scrollable&&_>=0&&!p._hasVirtualColumns()&&i(s(p.lockedTable,p.tbody.prev(),Ht),_,b,n?n:o,g.length),y&&y.length&&(_>=0&&i(s(p.lockedFooter,y.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),_,l,n?n:o,g.length),i(y.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),m,k,o,t.length)),d=p.tbody.children(":not(.k-grouping-row,.k-detail-row)"),p.lockedTable&&(v>k?v<=m&&we(p.lockedTable.find(">tbody>tr.k-grouping-row"),p.table.find(">tbody>tr.k-grouping-row"),t.length):v>m&&we(p.table.find(">tbody>tr.k-grouping-row"),p.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),h=p.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),c=0,u=d.length;c<u;c+=1)i(s(h[c],d[c],">td:not(.k-group-cell,.k-hierarchy-cell)"),m,k,o,t.length)},_findClosestVisibleColumnIndex:function(e,t){var r=C(e.slice(t)).length>0?e.slice(t):e.slice(0,t+1).reverse(),o=C(r)[0];return ut(o,C(this.columns))},_autoFitLeafColumn:function(e){this.autoFitColumn(le(this.columns)[e])},autoFitColumns:function(e){var t,r,o=this;for(e=e||o.columns,t=0;t<e.length;t++)r=e[t],r.columns?o.autoFitColumns(r.columns):o.autoFitColumn(r)},autoFitColumn:function(t){var r,o,l,n,a,i,s,d,c,u,p,h,f,g,m,k,b,C,w,y,S,T,x=this,H=x.options,R=x.columns,I=x.lockedHeader?ae(x.lockedHeader.find(">table>thead")).filter(_).length:0,E="col:not(.k-group-col):not(.k-hierarchy-col)",z="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?R[t]:at(t)?dt(M(R),function(e){return e===t})[0]:dt(M(R),function(e){return e.field===t})[0],t&&v(t)){for(i=t.minResizableWidth,r=ut(t,le(R)),n=t.locked,l=n?x.lockedHeader.children("table"):x.thead.parent(),o=l.find("[data-index='"+r+"']"),c=o.find("a.k-header-column-menu, a.k-grid-filter"),p=n?x.lockedTable:x.table,h=x.footer||e(),x.footer&&x.lockedContent&&(h=x.footer.children(n?".k-grid-footer-locked":".k-grid-footer-wrap")),f=h.find("table").first(),x.lockedHeader&&!n&&(r-=I),g=0;g<R.length&&R[g]!==t;g++)R[g].hidden&&r--;if(H.scrollable?(a=l.find(E).eq(r).add(p.children("colgroup").find(E).eq(r)).add(f.find("colgroup").find(E).eq(r)),n||(s=p.parent(),d=Je.scrollLeft(s))):a=p.children("colgroup").find(E).eq(r),m=l.add(p).add(f),uo.safari&&o.css("white-space","initial"),k=ot(o),a.width(""),m.css("table-layout","fixed"),a.width("auto"),m.addClass("k-autofitting"),m.css("table-layout",""),u=c.length?ot(c)+ot(o):ot(o),b=Math.ceil(Math.max(u,ot(p.find("tr:not(.k-grouping-row)").eq(0).children(z).eq(r)),ot(f.find("tr").eq(0).children(z).eq(r))))+1,i&&i>b&&(b=i),a.width(b),t.width=b,uo.safari&&o.css("white-space",""),H.scrollable){for(C=l.find("col"),y=0,S=0,T=C.length;S<T;S+=1)if(w=C[S].style.width,w&&w.indexOf("%")==-1)y+=parseInt(w,10);else{if(!C.eq(S).hasClass("k-group-col")){y=0;break}y+=parseInt(C.eq(S).width(),10)}y&&m.each(function(){this.style.width=y+"px"})}m.removeClass("k-autofitting"),d&&Je.scrollLeft(s,d),x.trigger(vr,{column:t,oldWidth:k,newWidth:b}),x._applyLockedContainersWidth(),x._syncLockedContentHeight(),x._syncLockedHeaderHeight(),x._updateStickyColumns()}},reorderColumn:function(e,r,o){var l,n,a=this,i=u(r,a.columns),s=i?i.columns:a.columns,d=ut(r,s),c=s[e],p=a.virtualScroll||{},h=!!c.locked,f=Q(a.columns).length,g=dt(le(a.columns),function(e){return e.groupHeaderColumnTemplate});d!==e&&(!r.locked&&h&&1==J(a.columns).length||r.locked&&!h&&1==f||(a._hideResizeHandle(),o===t&&(o=e<d),n=[r],a._reorderHeader(n,c,o),a.lockedHeader&&(G(a.thead),G(a.lockedHeader)),c.columns&&(c=le(c.columns),c=c[o?0:c.length-1]),r.columns&&(n=le(r.columns)),a._reorderContent(n,c,o),l=!!r.locked,l=l!=h,r.locked=h,s.splice(o?e:e+1,0,r),s.splice(d<e?d:d+1,1),a._updateLockedCols(),a._updateCols(),a._templates(),a._updateColumnCellIndex(),a._updateColumnSorters(),g.length>0&&a._renderGroupRows(),a._updateTablesWidth(),a._applyLockedContainersWidth(),a._syncLockedHeaderHeight(),a._syncLockedContentHeight(),a._updateFirstColumnClass(),a._updateStickyColumns(),p.columns&&a.refresh(),l&&(h?a.trigger(wr,{column:r}):a.trigger(yr,{column:r}))))},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=R(e,Q(this.columns))),R(this.thead,J(this.columns),t)},lockColumn:function(e){var t,r=this.columns;e="number"==typeof e?r[e]:dt(r,function(t){return t.field===e})[0],!e||e.locked||e.hidden||(e.sticky&&this.unstickColumn(r.indexOf(e)),t=Q(r).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,r=this.columns;e="number"==typeof e?r[e]:dt(r,function(t){return t.field===e})[0],e&&e.locked&&!e.hidden&&(t=Q(r).length,this.reorderColumn(t,e,!0))},stickColumn:function(e){var t=this.columns;e="number"==typeof e?t[e]:dt(t,function(t){return t.field===e})[0],!e||e.sticky||e.hidden||e.locked&&(this.unlockColumn(t.indexOf(e)),e.locked)||(e.sticky=!0,this._updateStickyColumns())},