@progress/telerik-react-report-viewer 0.0.9 → 15.22.119
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -2
- package/dist/cjs/telerik-report-viewer.js +15 -5
- package/dist/dependencies/telerikReportViewer.js +21 -21
- package/dist/dependencies/telerikReportViewerTemplate-sass.html +3 -3
- package/dist/es/telerik-report-viewer.js +15 -5
- package/package.json +7 -7
- package/progress-telerik-react-report-viewer-15.22.119.tgz +0 -0
- package/html-viewer-temp-dependencies/js/telerikReportViewer-16.0.21.1213.js +0 -8529
- package/html-viewer-temp-dependencies/js/telerikReportViewer-16.0.21.1213.js.bak +0 -8529
- package/html-viewer-temp-dependencies/js/telerikReportViewer-16.0.21.1213.min.js +0 -10
- package/html-viewer-temp-dependencies/js/telerikReportViewer.kendo.min.js +0 -37
- package/html-viewer-temp-dependencies/templates/telerikReportViewerTemplate-16.0.21.1213.html +0 -343
- package/html-viewer-temp-dependencies/templates/telerikReportViewerTemplate-FA-16.0.21.1213.html +0 -333
- package/progress-telerik-react-report-viewer-0.0.9.tgz +0 -0
@@ -1,37 +0,0 @@
|
|
1
|
-
var jQuery = require("jquery");
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
!function(e,define){define("kendo.core.min",["jquery"],e)}(function(){return function(e,t,n){function i(){}function r(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),i=e.substring(1);return"="===n?"+("+i+")+":":"===n?"+$kendoHtmlEncode("+i+")+":";"+e+";$kendoOutput+="}function o(e,t,n){return e+="",t=t||2,n=t-e.length,n?j[t].substring(0,n)+e:e}function a(e){var t=e.css(be.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Ee)||[0,0,0,0,0]:[0,0,0,0,0],i=Te.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function s(n,i){var r,o,a,s,d,c,u=Ie.browser,p=be._outerWidth,f=be._outerHeight,h=n.parent(),m=p(t);return h.removeClass("k-animation-container-sm"),h.hasClass("k-animation-container")?l(n,i):(o=n[0].style.width,a=n[0].style.height,s=De.test(o),d=De.test(a),c=n.hasClass("k-tooltip")||n.is(".k-menu-horizontal.k-context-menu"),r=s||d,!s&&(!i||i&&o||c)&&(o=i?p(n)+1:p(n)),(!d&&(!i||i&&a)||n.is(".k-menu-horizontal.k-context-menu"))&&(a=f(n)),n.wrap(e("<div/>").addClass("k-animation-container").css({width:o,height:a})),h=n.parent(),r&&n.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),m<p(h)&&(h.addClass("k-animation-container-sm"),l(n,i)),u.msie&&Te.floor(u.version)<=7&&(n.css({zoom:1}),n.children(".k-menu").width(n.width())),h}function l(e,t){var n,i=be._outerWidth,r=be._outerHeight,o=e.parent(".k-animation-container"),a=o[0].style;o.is(":hidden")&&o.css({display:"",position:""}),n=De.test(a.width)||De.test(a.height),n||o.css({width:t?i(e)+1:i(e),height:r(e),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})}function d(e){var t=1,n=arguments.length;for(t=1;t<n;t++)c(e,arguments[t]);return e}function c(e,n){var i,r,o,a,s,l=be.data.ObservableArray,d=be.data.LazyObservableArray,u=be.data.DataSource,p=be.data.HierarchicalDataSource;for(i in n)r=n[i],o=typeof r,a=o===He&&null!==r?r.constructor:null,!a||a===Array||a===l||a===d||a===u||a===p||a===RegExp||be.isFunction(t.ArrayBuffer)&&a===ArrayBuffer?o!==Me&&(e[i]=r):r instanceof Date?e[i]=new Date(r.getTime()):P(r.clone)?e[i]=r.clone():(s=e[i],e[i]=typeof s===He?s||{}:{},c(e[i],r));return e}function u(e,t,i){for(var r in t)if(t.hasOwnProperty(r)&&t[r].test(e))return r;return i!==n?i:e}function p(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function f(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function h(t,n){var i,r={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){r[t]=i.getPropertyValue(t)})):(i=t.currentStyle,n&&e.each(n,function(e,t){r[t]=i[f(t)]})),be.size(r)||(r=i),r}function m(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=h(e,["overflow"]).overflow;return"auto"==t||"scroll"==t}function g(t,i){var r,o,a=Ie.browser.webkit,s=Ie.browser.mozilla,l=Ie.browser.version;return t instanceof e&&i!==n?(t.each(function(e,t){g(t,i)}),n):(r=t instanceof e?t[0]:t)?(o=Ie.isRtl(t),i===n?o&&a&&(l<85||Ie.browser.safari)?r.scrollWidth-r.clientWidth-r.scrollLeft:Math.abs(r.scrollLeft):(r.scrollLeft=o&&a&&(l<85||Ie.browser.safari)?r.scrollWidth-r.clientWidth-i:o&&(s||a)&&i>0?-i:i,n)):n}function v(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function _(e,n,i){var r,o,a;return n||(n="offset"),r=e[n](),o={top:r.top,right:r.right,bottom:r.bottom,left:r.left},Ie.browser.msie&&(Ie.pointers||Ie.msPointers)&&!i&&(a=Ie.isRtl(e)?1:-1,o.top-=t.pageYOffset-document.documentElement.scrollTop,o.left-=t.pageXOffset+a*document.documentElement.scrollLeft),o}function b(e){var t={};return ye("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function k(e){return new be.effects.Element(e)}function y(e,t,n,i){return typeof e===Ne&&(P(t)&&(i=t,t=400,n=!1),P(n)&&(i=n,n=!1),typeof t===Oe&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),ke({effects:{},duration:400,reverse:!1,init:Ce,teardown:Ce,hide:!1},e,{completeCallback:e.complete,complete:Ce})}function w(t,n,i,r,o){for(var a,s=0,l=t.length;s<l;s++)a=e(t[s]),a.queue(function(){G.promise(a,y(n,i,r,o))});return t}function x(e,t,n,i){return t&&(t=t.split(" "),ye(t,function(t,n){e.toggleClass(n,i)})),e}function C(e){return(""+e).replace($,"&").replace(K,"<").replace(X,">").replace(Y,""").replace(Q,"'")}function T(e){var n;try{n=t.decodeURIComponent(e)}catch(i){n=e.replace(/%u([\dA-F]{4})|%([\dA-F]{2})/gi,function(e,t,n){return String.fromCharCode(parseInt("0x"+(t||n),16))})}return n}function S(e,t){var i;return 0===t.indexOf("data")&&(t=t.substring(4),t=t.charAt(0).toLowerCase()+t.substring(1)),t=t.replace(ae,"-$1"),i=e.getAttribute("data-"+be.ns+t),null===i?i=n:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:Ae.test(i)&&"mask"!=t?i=parseFloat(i):re.test(i)&&!oe.test(i)&&(i=Function("return ("+i+")")()),i}function I(t,i,r){var o,a,s={},l=t.getAttribute("data-"+be.ns+"role");for(o in i)a=S(t,o),a!==n&&(ie.test(o)&&"drawer"!=l&&("string"==typeof a?e("#"+a).length?a=be.template(e("#"+a).html()):r&&(a=be.template(r[a])):a=t.getAttribute(o)),s[o]=a);return s}function D(t,n){return e.contains(t,n)?-1:1}function F(){var t=e(this);return e.inArray(t.attr("data-"+be.ns+"role"),["slider","rangeslider","breadcrumb"])>-1||t.is(":visible")}function E(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&A(e)}function A(t){return e.expr.pseudos.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function z(e,t){return new z.fn.init(e,t)}var N,P,H,R,O,M,B,L,V,U,W,j,q,G,$,K,Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le,de,ce,ue,pe,fe,he,me,ge,ve,_e,be=t.kendo=t.kendo||{cultures:{}},ke=e.extend,ye=e.each,we=e.isArray,xe=e.proxy,Ce=e.noop,Te=Math,Se=t.JSON||{},Ie={},De=/%/,Fe=/\{(\d+)(:[^\}]+)?\}/g,Ee=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Ae=/^(\+|-?)\d+(\.?)\d*$/,ze="function",Ne="string",Pe="number",He="object",Re="null",Oe="boolean",Me="undefined",Be={},Le={},Ve=[].slice,Ue=function(){var e,t,i,r,o,a,s=arguments[0]||{},l=1,d=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"==typeof s||jQuery.isFunction(s)||(s={}),l===d&&(s=this,l--);l<d;l++)if(null!=(o=arguments[l]))for(r in o)"filters"!=r&&"concat"!=r&&":"!=r&&(e=s[r],i=o[r],s!==i&&(c&&i&&(jQuery.isPlainObject(i)||(t=jQuery.isArray(i)))?(t?(t=!1,a=e&&jQuery.isArray(e)?e:[]):a=e&&jQuery.isPlainObject(e)?e:{},s[r]=Ue(c,a,i)):i!==n&&(s[r]=i)));return s};be.version="2020.3.1118".replace(/^\s+|\s+$/g,""),i.extend=function(e){var t,n,i=function(){},r=this,o=e&&e.init?e.init:function(){r.apply(this,arguments)};i.prototype=r.prototype,n=o.fn=o.prototype=new i;for(t in e)n[t]=null!=e[t]&&e[t].constructor===Object?ke(!0,{},i.prototype[t],e[t]):e[t];return n.constructor=o,o.extend=r.extend,o},i.prototype._initOptions=function(e){this.options=d({},this.options,e)},P=be.isFunction=function(e){return"function"==typeof e},H=function(){this._defaultPrevented=!0},R=function(){return this._defaultPrevented===!0},O=i.extend({init:function(){this._events={}},bind:function(e,t,i){var r,o,a,s,l,d=this,c=typeof e===Ne?[e]:e,u=typeof t===ze;if(t===n){for(r in e)d.bind(r,e[r]);return d}for(r=0,o=c.length;r<o;r++)e=c[r],s=u?t:t[e],s&&(i&&(a=s,s=function(){d.unbind(e,s),a.apply(d,arguments)},s.original=a),l=d._events[e]=d._events[e]||[],l.push(s));return d},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,i,r,o,a=this,s=typeof e===Ne?[e]:e,l=typeof t===ze;for(n=0,i=s.length;n<i;n++)e=s[n],r=l?t:t[e],r&&(o=a._events[e]=a._events[e]||[],o.unshift(r));return a},trigger:function(e,t){var n,i,r=this,o=r._events[e];if(o){for(t=t||{},t.sender=r,t._defaultPrevented=!1,t.preventDefault=H,t.isDefaultPrevented=R,o=o.slice(),n=0,i=o.length;n<i;n++)o[n].call(r,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var i,r=this,o=r._events[e];if(e===n)r._events={};else if(o)if(t)for(i=o.length-1;i>=0;i--)o[i]!==t&&o[i].original!==t||o.splice(i,1);else r._events[e]=[];return r}}),M=/^\w+/,B=/\$\{([^}]*)\}/g,L=/\\\}/g,V=/__CURLY__/g,U=/\\#/g,W=/__SHARP__/g,j=["","0","00","000","0000"],N={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,r="";for(n=0,i=t.length;n<i;n++)r+=e(t[n]);return r},compile:function(e,t){var n,i,o,a=ke({},this,t),s=a.paramName,l=s.match(M)[0],d=a.useWithBlock,c="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(P(e))return e;for(c+=d?"with("+s+"){":"",c+="$kendoOutput=",i=e.replace(L,"__CURLY__").replace(B,"#=$kendoHtmlEncode($1)#").replace(V,"}").replace(U,"__SHARP__").split("#"),o=0;o<i.length;o++)c+=r(i[o],o%2===0);c+=d?";}":";",c+="return $kendoOutput;",c=c.replace(W,"#");try{return n=Function(l,c),n._slotCount=Math.floor(i.length/2),n}catch(u){throw Error(be.format("Invalid template:'{0}' Generated code:'{1}'",e,c))}}},function(){function e(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=s[e];return typeof t===Ne?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function t(o,a){var s,d,c,u,p,f,h=n,m=a[o];if(m&&typeof m===He&&typeof m.toJSON===ze&&(m=m.toJSON(o)),typeof r===ze&&(m=r.call(a,o,m)),f=typeof m,f===Ne)return e(m);if(f===Pe)return isFinite(m)?m+"":Re;if(f===Oe||f===Re)return m+"";if(f===He){if(!m)return Re;if(n+=i,p=[],"[object Array]"===l.apply(m)){for(u=m.length,s=0;s<u;s++)p[s]=t(s,m)||Re;return c=0===p.length?"[]":n?"[\n"+n+p.join(",\n"+n)+"\n"+h+"]":"["+p.join(",")+"]",n=h,c}if(r&&typeof r===He)for(u=r.length,s=0;s<u;s++)typeof r[s]===Ne&&(d=r[s],c=t(d,m),c&&p.push(e(d)+(n?": ":":")+c));else for(d in m)Object.hasOwnProperty.call(m,d)&&(c=t(d,m),c&&p.push(e(d)+(n?": ":":")+c));return c=0===p.length?"{}":n?"{\n"+n+p.join(",\n"+n)+"\n"+h+"}":"{"+p.join(",")+"}",n=h,c}}var n,i,r,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==ze&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?o(e.getUTCFullYear(),4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof Se.stringify!==ze&&(Se.stringify=function(e,o,a){var s;if(n="",i="",typeof a===Pe)for(s=0;s<a;s+=1)i+=" ";else typeof a===Ne&&(i=a);if(r=o,o&&typeof o!==ze&&(typeof o!==He||typeof o.length!==Pe))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function t(e){if(e){if(e.numberFormat)return e;if(typeof e===Ne){var t=be.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function i(e){return e&&(e=t(e)),e||be.cultures.current}function r(e,t,r){r=i(r);var a=r.calendars.standard,s=a.days,l=a.months;return t=a.patterns[t]||t,t.replace(c,function(t){var i,r,d;return"d"===t?r=e.getDate():"dd"===t?r=o(e.getDate()):"ddd"===t?r=s.namesAbbr[e.getDay()]:"dddd"===t?r=s.names[e.getDay()]:"M"===t?r=e.getMonth()+1:"MM"===t?r=o(e.getMonth()+1):"MMM"===t?r=l.namesAbbr[e.getMonth()]:"MMMM"===t?r=l.names[e.getMonth()]:"yy"===t?r=o(e.getFullYear()%100):"yyyy"===t?r=o(e.getFullYear(),4):"h"===t?r=e.getHours()%12||12:"hh"===t?r=o(e.getHours()%12||12):"H"===t?r=e.getHours():"HH"===t?r=o(e.getHours()):"m"===t?r=e.getMinutes():"mm"===t?r=o(e.getMinutes()):"s"===t?r=e.getSeconds():"ss"===t?r=o(e.getSeconds()):"f"===t?r=Te.floor(e.getMilliseconds()/100):"ff"===t?(r=e.getMilliseconds(),r>99&&(r=Te.floor(r/10)),r=o(r)):"fff"===t?r=o(e.getMilliseconds(),3):"tt"===t?r=e.getHours()<12?a.AM[0]:a.PM[0]:"zzz"===t?(i=e.getTimezoneOffset(),d=i<0,r=(""+Te.abs(i/60)).split(".")[0],i=Te.abs(i)-60*r,r=(d?"+":"-")+o(r),r+=":"+o(i)):"zz"!==t&&"z"!==t||(r=e.getTimezoneOffset()/60,d=r<0,r=(""+Te.abs(r)).split(".")[0],r=(d?"+":"-")+("zz"===t?o(r):r)),r!==n?r:t.slice(1,t.length-1)})}function a(e,t,r){var o,a,d,c,k,y,w,x,C,T,S,I,D,F,E,A,z,N,P,H,R,O,M,B,L,V,U,W,j,q,G,$,K,Y;if(r=i(r),o=r.numberFormat,a=o[m],d=o.decimals,c=o.pattern[0],k=[],S=e<0,A=h,z=h,G=-1,e===n)return h;if(!isFinite(e))return e;if(!t)return r.name.length?e.toLocaleString():""+e;if(T=u.exec(t)){if(t=T[1].toLowerCase(),w="c"===t,x="p"===t,(w||x)&&(o=w?o.currency:o.percent,a=o[m],d=o.decimals,y=o.symbol,c=o.pattern[S?0:1]),C=T[2],C&&(d=+C),"e"===t)return K=C?e.toExponential(d):e.toExponential(),K.replace(m,o[m]);if(x&&(e*=100),e=l(e,d),S=e<0,e=e.split(m),I=e[0],D=e[1],S&&(I=I.substring(1)),z=s(I,0,I.length,o),D&&(z+=a+D),"n"===t&&!S)return z;for(e=h,N=0,P=c.length;N<P;N++)H=c.charAt(N),e+="n"===H?z:"$"===H||"%"===H?y:H;return e}if((t.indexOf("'")>-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(p,function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return k.push(n),b})),t=t.split(";"),S&&t[1])t=t[1],O=!0;else if(0===e&&t[2]){if(t=t[2],t.indexOf(v)==-1&&t.indexOf(_)==-1)return t}else t=t[0];if(W=t.indexOf("%"),j=t.indexOf("$"),x=W!=-1,w=j!=-1,x&&(e*=100),w&&"\\"===t[j-1]&&(t=t.split("\\").join(""),w=!1),(w||x)&&(o=w?o.currency:o.percent,a=o[m],d=o.decimals,y=o.symbol),R=t.indexOf(g)>-1,R&&(t=t.replace(f,h)),M=t.indexOf(m),P=t.length,M!=-1)if(D=(""+e).split("e"),D=D[1]?l(e,Math.abs(D[1])):D[0],D=D.split(m)[1]||h,L=t.lastIndexOf(_)-M,B=t.lastIndexOf(v)-M,V=L>-1,U=B>-1,N=D.length,V||U||(t=t.substring(0,M)+t.substring(M+1),P=t.length,M=-1,N=0),V&&L>B)N=L;else if(B>L)if(U&&N>B){for(Y=l(e,B,S);Y.charAt(Y.length-1)===_&&B>0&&B>L;)B--,Y=l(e,B,S);N=B}else V&&N<L&&(N=L);if(e=l(e,N,S),B=t.indexOf(v),q=L=t.indexOf(_),G=B==-1&&L!=-1?L:B!=-1&&L==-1?B:B>L?L:B,B=t.lastIndexOf(v),L=t.lastIndexOf(_),$=B==-1&&L!=-1?L:B!=-1&&L==-1?B:B>L?B:L,G==P&&($=G),G!=-1){for(z=(""+e).split(m),I=z[0],D=z[1]||h,F=I.length,E=D.length,S&&e*-1>=0&&(S=!1),e=t.substring(0,G),S&&!O&&(e+="-"),N=G;N<P;N++){if(H=t.charAt(N),M==-1){if($-N<F){e+=I;break}}else if(L!=-1&&L<N&&(A=h),M-N<=F&&M-N>-1&&(e+=I,N=M),M===N){e+=(D?a:h)+D,N+=$-M+1;continue}H===_?(e+=H,A=H):H===v&&(e+=A)}if(R&&(e=s(e,G+(S&&!O?1:0),Math.max($,F+G),o)),$>=G&&(e+=t.substring($+1)),w||x){for(z=h,N=0,P=e.length;N<P;N++)H=e.charAt(N),z+="$"===H||"%"===H?y:H;e=z}if(P=k.length)for(N=0;N<P;N++)e=e.replace(b,k[N])}return e}var s,l,d,c=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,u=/^(n|c|p|e)(\d*)$/i,p=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,f=/\,/g,h="",m=".",g=",",v="#",_="0",b="??",k="en-US",y={}.toString;be.cultures["en-US"]={name:k,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{name:"US Dollar",abbr:"USD",pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},be.culture=function(e){var i,r=be.cultures;return e===n?r.current:(i=t(e)||r[k],i.calendar=i.calendars.standard,r.current=i,n)},be.findCulture=t,be.getCulture=i,be.culture(k),s=function(e,t,i,r){var o,a,s,l,d,c,u=e.indexOf(r[m]),p=r.groupSize.slice(),f=p.shift();if(i=u!==-1?u:i+1,o=e.substring(t,i),a=o.length,a>=f){for(s=a,l=[];s>-1;)if(d=o.substring(s-f,s),d&&l.push(d),s-=f,c=p.shift(),f=c!==n?c:f,0===f){s>0&&l.push(o.substring(0,s));break}o=l.reverse().join(r[g]),e=e.substring(0,t)+o+e.substring(i)}return e},l=function(e,t,n){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),n&&(e=-e),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(Math.min(t,20))},d=function(e,t,i){if(t){if("[object Date]"===y.call(e))return r(e,t,i);if(typeof e===Pe)return a(e,t,i)}return e!==n?e:""},be.format=function(e){var t=arguments;return e.replace(Fe,function(e,n,i){var r=t[parseInt(n,10)+1];return d(r,i?i.substring(1):"")})},be._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},be._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},be._round=l,be._outerWidth=function(t,n){return e(t).outerWidth(n||!1)||0},be._outerHeight=function(t,n){return e(t).outerHeight(n||!1)||0},be.toString=d}(),function(){function t(e,t,n){return!(e>=t&&e<=n)}function i(e){return e.charAt(0)}function r(t){return e.map(t,i)}function o(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function a(e){for(var t=0,n=e.length,i=[];t<n;t++)i[t]=(e[t]+"").toLowerCase();return i}function s(e){var t,n={};for(t in e)n[t]=a(e[t]);return n}function l(e,i,a,l){if(!e)return null;var d,c,u,p,f,g,v,_,b,y,w,x,C,T=function(e){for(var t=0;i[O]===e;)t++,O++;return t>0&&(O-=1),t},S=function(t){var n=k[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(M,t).match(n);return i?(i=i[0],M+=i.length,parseInt(i,10)):null},I=function(t,n){for(var i,r,o,a=0,s=t.length,l=0,d=0;a<s;a++)i=t[a],r=i.length,o=e.substr(M,r),n&&(o=o.toLowerCase()),o==i&&r>l&&(l=r,d=a);return l?(M+=l,d+1):null},D=function(){var t=!1;return e.charAt(M)===i[O]&&(M++,t=!0),t},F=a.calendars.standard,E=null,A=null,z=null,N=null,P=null,H=null,R=null,O=0,M=0,B=!1,L=new Date,V=F.twoDigitYearMax||2029,U=L.getFullYear();for(i||(i="d"),p=F.patterns[i],p&&(i=p),i=i.split(""),u=i.length;O<u;O++)if(d=i[O],B)"'"===d?B=!1:D();else if("d"===d){if(c=T("d"),F._lowerDays||(F._lowerDays=s(F.days)),null!==z&&c>2)continue;if(z=c<3?S(2):I(F._lowerDays[3==c?"namesAbbr":"names"],!0),null===z||t(z,1,31))return null}else if("M"===d){if(c=T("M"),F._lowerMonths||(F._lowerMonths=s(F.months)),A=c<3?S(2):I(F._lowerMonths[3==c?"namesAbbr":"names"],!0),null===A||t(A,1,12))return null;A-=1}else if("y"===d){if(c=T("y"),E=S(c),null===E)return null;2==c&&("string"==typeof V&&(V=U+parseInt(V,10)),E=U-U%100+E,E>V&&(E-=100))}else if("h"===d){if(T("h"),N=S(2),12==N&&(N=0),null===N||t(N,0,11))return null}else if("H"===d){if(T("H"),N=S(2),null===N||t(N,0,23))return null}else if("m"===d){if(T("m"),P=S(2),null===P||t(P,0,59))return null}else if("s"===d){if(T("s"),H=S(2),null===H||t(H,0,59))return null}else if("f"===d){if(c=T("f"),C=e.substr(M,c).match(k[3]),R=S(c),null!==R&&(R=parseFloat("0."+C[0],10),R=be._round(R,3),R*=1e3),null===R||t(R,0,999))return null}else if("t"===d){if(c=T("t"),_=F.AM,b=F.PM,1===c&&(_=r(_),b=r(b)),f=I(b),!f&&!I(_))return null}else if("z"===d){if(g=!0,c=T("z"),"Z"===e.substr(M,1)){D();continue}if(v=e.substr(M,6).match(c>2?m:h),!v)return null;if(v=v[0].split(":"),y=v[0],w=v[1],!w&&y.length>3&&(M=y.length-2,w=y.substring(M),y=y.substring(0,M)),y=parseInt(y,10),t(y,-12,13))return null;if(c>2&&(w=v[0][0]+w,w=parseInt(w,10),isNaN(w)||t(w,-59,59)))return null}else if("'"===d)B=!0,D();else if(!D())return null;return l&&!/^\s*$/.test(e.substr(M))?null:(x=null!==N||null!==P||H||null,null===E&&null===A&&null===z&&x?(E=U,A=L.getMonth(),z=L.getDate()):(null===E&&(E=U),null===z&&(z=1)),f&&N<12&&(N+=12),g?(y&&(N+=-y),w&&(P+=-w),e=new Date(Date.UTC(E,A,z,N,P,H,R))):(e=new Date(E,A,z,N,P,H,R),o(e,N)),E<100&&e.setFullYear(E),e.getDate()!==z&&g===n?null:e)}function d(e){var t="-"===e.substr(0,1)?-1:1;return e=e.substring(1),e=60*parseInt(e.substr(0,2),10)+parseInt(e.substring(2),10),t*e}function c(e){var t,n,i,r=Te.max(_.length,b.length),o=e.calendar||e.calendars.standard,a=o.patterns,s=[];for(i=0;i<r;i++){for(t=_[i],n=0;n<t.length;n++)s.push(a[t[n]]);s=s.concat(b[i])}return s}function u(e,t,n,i){var r,o,a,s;if("[object Date]"===y.call(e))return e;if(r=0,o=null,e&&0===e.indexOf("/D")&&(o=g.exec(e)))return o=o[1],s=v.exec(o.substring(1)),o=new Date(parseInt(o,10)),s&&(s=d(s[0]),o=be.timezone.apply(o,0),o=be.timezone.convert(o,0,-1*s)),o;for(n=be.getCulture(n),t||(t=c(n)),t=we(t)?t:[t],a=t.length;r<a;r++)if(o=l(e,t[r],n,i))return o;return o}var p=/\u00A0/g,f=/[eE][\-+]?[0-9]+/,h=/[+|\-]\d{1,2}/,m=/[+|\-]\d{1,2}:?\d{2}/,g=/^\/Date\((.*?)\)\/$/,v=/[+-]\d*/,_=[[],["G","g","F"],["D","d","y","m","T","t"]],b=[["yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffffff","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:ss.fff","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy/MM/dd HH:mm:ss"],["yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm","yyyy/MM/dd HH:mm"],["yyyy/MM/dd","yyyy-MM-dd","HH:mm:ss","HH:mm"]],k={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},y={}.toString;be.parseDate=function(e,t,n){return u(e,t,n,!1)},be.parseExactDate=function(e,t,n){return u(e,t,n,!0)},be.parseInt=function(e,t){var n=be.parseFloat(e,t);return n&&(n=0|n),n},be.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===Pe)return e;e=""+e,t=be.getCulture(t);var i,r,o=t.numberFormat,a=o.percent,s=o.currency,l=s.symbol,d=a.symbol,c=e.indexOf("-");return f.test(e)?(e=parseFloat(e.replace(o["."],".")),isNaN(e)&&(e=null),e):c>0?null:(c=c>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(o=s,i=o.pattern[0].replace("$",l).split("n"),e.indexOf(i[0])>-1&&e.indexOf(i[1])>-1&&(e=e.replace(i[0],"").replace(i[1],""),c=!0)):e.indexOf(d)>-1&&(r=!0,o=a,l=d),e=e.replace("-","").replace(l,"").replace(p," ").split(o[","].replace(p," ")).join("").replace(o["."],"."),e=parseFloat(e),isNaN(e)?e=null:c&&(e*=-1),e&&r&&(e/=100),e)}}(),function(){var i,r,o,a,s,l,d,c,p,f,h,m;Ie._scrollbar=n,Ie.scrollbar=function(e){if(isNaN(Ie._scrollbar)||e){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML=" ",document.body.appendChild(n),Ie._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return Ie._scrollbar},Ie.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="<tr><td></td></tr>",Ie.tbodyInnerHtml=!0}catch(g){Ie.tbodyInnerHtml=!1}Ie.touch="ontouchstart"in t,r=document.documentElement.style,o=Ie.transitions=!1,a=Ie.transforms=!1,s="HTMLElement"in t?HTMLElement.prototype:[],Ie.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in r||"msPerspective"in r,Ie.cssFlexbox="flexWrap"in r||"WebkitFlexWrap"in r||"msFlexWrap"in r,ye(["Moz","webkit","O","ms"],function(){var e,t=""+this,n=typeof i.style[t+"Transition"]===Ne;if(n||typeof i.style[t+"Transform"]===Ne)return e=t.toLowerCase(),a={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},n&&(o=a,o.event=o.event?o.event+"TransitionEnd":"transitionend"),!1}),i=null,Ie.transforms=a,Ie.transitions=o,Ie.devicePixelRatio=t.devicePixelRatio===n?1:t.devicePixelRatio;try{Ie.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,Ie.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(g){Ie.screenWidth=t.screen.availWidth,Ie.screenHeight=t.screen.availHeight}Ie.detectOS=function(e){var n,i,r=!1,o=[],a=!/mobile safari/i.test(e),s={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/},l={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/},d={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};for(i in s)if(s.hasOwnProperty(i)&&(o=e.match(s[i]))){if("windows"==i&&"plugins"in navigator)return!1;r={},r.device=i,r.tablet=u(i,d,!1),r.browser=u(e,c,"default"),r.name=u(i,l),r[r.name]=!0,r.majorVersion=o[2],r.minorVersion=(o[3]||"0").replace("_","."),n=r.minorVersion.replace(".","").substr(0,2),r.flatVersion=r.majorVersion+n+Array(3-(n.length<3?n.length:2)).join("0"),r.cordova=typeof t.PhoneGap!==Me||typeof t.cordova!==Me,r.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||r.cordova,r.android&&(Ie.devicePixelRatio<1.5&&r.flatVersion<400||a)&&(Ie.screenWidth>800||Ie.screenHeight>800)&&(r.tablet=i);break}return r},l=Ie.mobileOS=Ie.detectOS(navigator.userAgent),Ie.wpDevicePixelRatio=l.wp?screen.width/320:0,Ie.hasNativeScrolling=!1,(l.ios||l.android&&l.majorVersion>2||l.wp)&&(Ie.hasNativeScrolling=l),Ie.delayedClick=function(){if(Ie.touch){if(l.ios)return!0;if(l.android)return!Ie.browser.chrome||!(Ie.browser.version<32)&&!(e("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},Ie.mouseAndTouchPresent=Ie.touch&&!(Ie.mobileOS.ios||Ie.mobileOS.android),Ie.detectBrowser=function(e){var t,n=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in r)if(r.hasOwnProperty(t)&&(i=e.match(r[t]))){n={},n[t]=!0,n[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n},Ie.browser=Ie.detectBrowser(navigator.userAgent),Ie.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return Ie.browser.chrome&&(e.paste=!1,Ie.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},Ie.clipboard=Ie.detectClipboardAccess(),Ie.zoomLevel=function(){var e,n,i;try{return e=Ie.browser,n=0,i=document.documentElement,e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!Ie.touch&&(n=Ie.scrollbar()),Ie.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(r){return 1}},Ie.cssBorderSpacing=n!==r.borderSpacing&&!(Ie.browser.msie&&Ie.browser.version<8),function(t){var n="",i=e(document.documentElement),r=parseInt(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&&(n="k-"+n+" k-"+n+r),Ie.mobileOS&&(n+=" k-mobile"),Ie.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(Ie.browser),Ie.eventCapture=document.documentElement.addEventListener,d=document.createElement("input"),Ie.placeholder="placeholder"in d,Ie.propertyChangeEvent="onpropertychange"in d,Ie.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",r={},o=0;o<n;o++)e=t[o],d.setAttribute("type",e),d.value=i,r[e.replace("-","")]="text"!==d.type&&d.value!==i;return r}(),d.style.cssText="float:left;",Ie.cssFloat=!!d.style.cssFloat,d=null,Ie.stableSort=function(){var e,t=513,n=[{index:0,field:"b"}];for(e=1;e<t;e++)n.push({index:e,field:"a"});return n.sort(function(e,t){return e.field>t.field?1:e.field<t.field?-1:0}),1===n[0].index}(),Ie.matchesSelector=s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.matchesSelector||s.matches||function(t){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:e(t),i=n.length;i--;)if(n[i]==this)return!0;return!1},Ie.matchMedia="matchMedia"in t,Ie.pushState=t.history&&t.history.pushState,c=document.documentMode,Ie.hashChange="onhashchange"in t&&!(Ie.browser.msie&&(!c||c<=8)),Ie.customElements="registerElement"in t.document,p=Ie.browser.chrome,f=Ie.browser.crios,h=Ie.browser.mozilla,m=Ie.browser.safari,Ie.msPointers=!p&&t.MSPointerEvent,Ie.pointers=!p&&!f&&!h&&!m&&t.PointerEvent,Ie.kineticScrollNeeded=l&&(Ie.touch||Ie.msPointers||Ie.pointers)}(),q={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},G={},e.extend(G,{enabled:!0,Element:function(t){this.element=e(t)},promise:function(e,t){e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.hide&&e.data("olddisplay",e.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(e),e.dequeue()},disable:function(){this.enabled=!1,this.promise=this.promiseShim},enable:function(){this.enabled=!0,this.promise=this.animatedPromise}}),G.promiseShim=G.promise,"kendoAnimate"in e.fn||ke(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return w(this,e,t,n,i)},kendoAddClass:function(e,t){return be.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return be.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return be.toggleClass(this,e,t,n)}}),$=/&/g,K=/</g,Y=/"/g,Q=/'/g,X=/>/g,J=function(e){return e.target},Ie.touch&&(J=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target},ye(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),Ie.touch?Ie.mobileOS?(Ie.mousedown="touchstart",Ie.mouseup="touchend",Ie.mousemove="touchmove",Ie.mousecancel="touchcancel",Ie.click="touchend",Ie.resize="orientationchange"):(Ie.mousedown="mousedown touchstart",Ie.mouseup="mouseup touchend",Ie.mousemove="mousemove touchmove",Ie.mousecancel="mouseleave touchcancel",Ie.click="click",Ie.resize="resize"):Ie.pointers?(Ie.mousemove="pointermove",Ie.mousedown="pointerdown",Ie.mouseup="pointerup",Ie.mousecancel="pointercancel",Ie.click="pointerup",Ie.resize="orientationchange resize"):Ie.msPointers?(Ie.mousemove="MSPointerMove",Ie.mousedown="MSPointerDown",Ie.mouseup="MSPointerUp",Ie.mousecancel="MSPointerCancel",Ie.click="MSPointerUp",Ie.resize="orientationchange resize"):(Ie.mousemove="mousemove",Ie.mousedown="mousedown",Ie.mouseup="mouseup",Ie.mousecancel="mouseleave",Ie.click="click",Ie.resize="resize"),Z=function(e,t){var n,i,r,o,a=t||"d",s=1;for(i=0,r=e.length;i<r;i++)o=e[i],""!==o&&(n=o.indexOf("["),0!==n&&(n==-1?o="."+o:(s++,o="."+o.substring(0,n)+" || {})"+o.substring(n))),s++,a+=o+(i<r-1?" || {})":")"));return Array(s).join("(")+a},ee=/^([a-z]+:)?\/\//i,ke(be,{widgets:[],_widgetRegisteredCallbacks:[],ui:be.ui||{},fx:be.fx||k,effects:be.effects||G,mobile:be.mobile||{},data:be.data||{},dataviz:be.dataviz||{},drawing:be.drawing||{},spreadsheet:{messages:{}},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,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},support:be.support||Ie,animate:be.animate||w,ns:"",attr:function(e){return"data-"+be.ns+e},getShadows:a,wrap:s,deepExtend:d,getComputedStyles:h,isScrollable:m,scrollLeft:g,
|
6
|
-
size:v,toCamelCase:f,toHyphens:p,getOffset:be.getOffset||_,parseEffects:be.parseEffects||b,toggleClass:be.toggleClass||x,directions:be.directions||q,Observable:O,Class:i,Template:N,template:xe(N.compile,N),render:xe(N.render,N),stringify:xe(Se.stringify,Se),eventTarget:J,htmlEncode:C,unescape:T,isLocalUrl:function(e){return e&&!ee.test(e)},expr:function(e,t,n){return e=e||"",typeof t==Ne&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),t?(e=e.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'),e=e.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"),e=Z(e.split("."),n),e=e.replace(/_\$DOT\$_/g,".")):e=n+e,e},getter:function(e,t){var n=e+t;return Be[n]=Be[n]||Function("d","return "+be.expr(e,t))},setter:function(e){return Le[e]=Le[e]||Function("d,value",be.expr(e)+"=value")},accessor:function(e){return{get:be.getter(e),set:be.setter(e)}},guid:function(){var e,t,n="";for(e=0;e<32;e++)t=16*Te.random()|0,8!=e&&12!=e&&16!=e&&20!=e||(n+="-"),n+=(12==e?4:16==e?3&t|8:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+be.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(e){var t,n=e.split(" ");if(n)for(t=0;t<n.length;t++)"view"!=n[t]&&(n[t]=n[t].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));return n.join(" ").replace(/(\S+)/g,"kendo-mobile-$1,").slice(0,-1)},triggeredByInput:function(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)},onWidgetRegistered:function(e){for(var t=0,n=be.widgets.length;t<n;t++)e(be.widgets[t]);be._widgetRegisteredCallbacks.push(e)},logToConsole:function(e,i){var r=t.console;!be.suppressLog&&n!==r&&r.log&&r[i||"log"](e)}}),te=O.extend({init:function(e,t){var n,i,r=this;r.element=be.jQuery(e).handler(r),r.angular("init",t),O.fn.init.call(r),n=t?t.dataSource:null,t&&(i=(r.componentTypes||{})[(t||{}).componentType]),n&&(t=ke({},t,{dataSource:{}})),t=r.options=ke(!0,{},r.options,r.defaults,i||{},t),n&&(t.dataSource=n),r.element.attr(be.attr("role"))||r.element.attr(be.attr("role"),(t.name||"").toLowerCase()),r.element.data("kendo"+t.prefix+t.name,r),r.bind(r.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(e){e=e||this.wrapper;var t=this.element,n="tabindex",i=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(i)?0:i)},setOptions:function(t){this._setEvents(t),e.extend(this.options,t)},_setEvents:function(e){for(var t,n=this,i=0,r=n.events.length;i<r;i++)t=n.events[i],n.options[t]&&e[t]&&(n.unbind(t,n.options[t]),n._events&&n._events[t]&&delete n._events[t]);n.bind(n.events,e)},resize:function(e){var 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:function(){return be.dimensions(this.element)},size:function(e){return e?(this.setSize(e),n):this.getSize()},setSize:e.noop,_resize:e.noop,destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(e){this._muteRebind=!0,e.call(this),this._muteRebind=!1}}),ne=te.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(t){var n=this;n.angular(t,function(){return{elements:n.items(),data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})}}),be.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},be.notify=Ce,ie=/template$/i,re=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,oe=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,ae=/([A-Z])/g,be.initWidget=function(i,r,o){var a,s,l,d,c,u,p,f,h,m,g,v,_;if(o?o.roles&&(o=o.roles):o=be.ui.roles,i=i.nodeType?i:i[0],u=i.getAttribute("data-"+be.ns+"role")){h=u.indexOf(".")===-1,l=h?o[u]:be.getter(u)(t),g=e(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",m=h?RegExp("^kendo.*"+u+"$","i"):RegExp("^"+v+"$","i");for(_ in g)if(_.match(m)){if(_!==v)return g[_];a=g[_]}if(l){for(f=S(i,"dataSource"),r=e.extend({},I(i,e.extend({},l.fn.options,l.fn.defaults)),r),f&&(r.dataSource=typeof f===Ne?be.getter(f)(t):f),d=0,c=l.fn.events.length;d<c;d++)s=l.fn.events[d],p=S(i,s),p!==n&&(r[s]=be.getter(p)(t));return a?e.isEmptyObject(r)||a.setOptions(r):a=new l(i,r),a}}},be.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[be.ui,be.dataviz.ui]),t=0,n=e.length;t<n;t++)i[t]=e[t].roles;return ke.apply(null,[{}].concat(i.reverse()))},be.init=function(t){var n=be.rolesFromNamespaces(Ve.call(arguments,1));e(t).find("[data-"+be.ns+"role]").addBack().each(function(){be.initWidget(this,{},n)})},be.destroy=function(t){e(t).find("[data-"+be.ns+"role]").addBack().each(function(){var t,n=e(this).data();for(t in n)0===t.indexOf("kendo")&&typeof n[t].destroy===ze&&n[t].destroy()})},be.resize=function(t,n){var i,r=e(t).find("[data-"+be.ns+"role]").addBack().filter(F);r.length&&(i=e.makeArray(r),i.sort(D),e.each(i,function(){var t=be.widgetInstance(e(this));t&&t.resize(n)}))},be.parseOptions=I,ke(be.ui,{Widget:te,DataBoundWidget:ne,roles:{},progress:function(t,n,i){var r,o,a,s,l,d=t.find(".k-loading-mask"),c=be.support,u=c.browser;i=e.extend({},{width:"100%",height:"100%",top:t.scrollTop(),opacity:!1},i),l=i.opacity?"k-loading-mask k-opaque":"k-loading-mask",n?d.length||(r=c.isRtl(t),o=r?"right":"left",s=be.scrollLeft(t),a=u.webkit&&r?t[0].scrollWidth-t.width()-2*s:0,d=e(be.format("<div class='{0}'><span class='k-loading-text'>{1}</span><div class='k-loading-image'></div><div class='k-loading-color'></div></div>",l,be.ui.progress.messages.loading)).width(i.width).height(i.height).css("top",i.top).css(o,Math.abs(s)+a).prependTo(t)):d&&d.remove()},plugin:function(t,i,r){var o,a,s,l,d=t.fn.options.name;for(i=i||be.ui,r=r||"",i[d]=t,i.roles[d.toLowerCase()]=t,o="getKendo"+r+d,d="kendo"+r+d,a={name:d,widget:t,prefix:r||""},be.widgets.push(a),s=0,l=be._widgetRegisteredCallbacks.length;s<l;s++)be._widgetRegisteredCallbacks[s](a);e.fn[d]=function(i){var r,o=this;return typeof i===Ne?(r=Ve.call(arguments,1),this.each(function(){var t,a,s=e.data(this,d);if(!s)throw Error(be.format("Cannot call method '{0}' of {1} before it is initialized",i,d));if(t=s[i],typeof t!==ze)throw Error(be.format("Cannot find method '{0}' of {1}",i,d));if(a=t.apply(s,r),a!==n)return o=a,!1})):this.each(function(){return new t(this,i)}),o},e.fn[d].widget=t,e.fn[o]=function(){return this.data(d)}}}),be.ui.progress.messages={loading:"Loading..."},se={bind:function(){return this},nullObject:!0,options:{}},le=te.extend({init:function(e,t){te.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){te.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(be.roleSelector("view splitview modalview drawer"));return be.widgetInstance(e,be.mobile.ui)||se},viewHasNativeScrolling:function(){var e=this.view();return e&&e.options.useNativeScrolling},container:function(){var e=this.element.closest(be.roleSelector("view layout modalview drawer splitview"));return be.widgetInstance(e.eq(0),be.mobile.ui)||se}}),ke(be.mobile,{init:function(e){be.init(e,be.mobile.ui,be.ui,be.dataviz.ui)},appLevelNativeScrolling:function(){return be.mobile.application&&be.mobile.application.options&&be.mobile.application.options.useNativeScrolling},roles:{},ui:{Widget:le,DataBoundWidget:ne.extend(le.prototype),roles:{},plugin:function(e){be.ui.plugin(e,be.mobile.ui,"Mobile")}}}),d(be.dataviz,{init:function(e){be.init(e,be.dataviz.ui)},ui:{roles:{},themes:{},views:[],plugin:function(e){be.ui.plugin(e,be.dataviz.ui)}},roles:{}}),be.touchScroller=function(t,n){return n||(n={}),n.useNative=!0,e(t).map(function(t,i){return i=e(i),!(!Ie.kineticScrollNeeded||!be.mobile.ui.Scroller||i.data("kendoMobileScroller"))&&(i.kendoMobileScroller(n),i.data("kendoMobileScroller"))})[0]},be.preventDefault=function(e){e.preventDefault()},be.widgetInstance=function(e,n){var i,r,o,a,s,l=e.data(be.ns+"role"),d=[],c=e.data("kendoView");if(l){if("content"===l&&(l="scroller"),"editortoolbar"===l&&(o=e.data("kendoEditorToolbar")))return o;if("view"===l&&c)return c;if(n)if(n[0])for(i=0,r=n.length;i<r;i++)d.push(n[i].roles[l]);else d.push(n.roles[l]);else d=[be.ui.roles[l],be.dataviz.ui.roles[l],be.mobile.ui.roles[l]];for(l.indexOf(".")>=0&&(d=[be.getter(l)(t)]),i=0,r=d.length;i<r;i++)if(a=d[i],a&&(s=e.data("kendo"+a.fn.options.prefix+a.fn.options.name)))return s}},be.onResize=function(n){var i=n;return Ie.mobileOS.android&&(i=function(){setTimeout(n,600)}),e(t).on(Ie.resize,i),i},be.unbindResize=function(n){e(t).off(Ie.resize,n)},be.attrValue=function(e,t){return e.data(be.ns+t)},be.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr.pseudos,{kendoFocusable:function(t){var n=e.attr(t,"tabindex");return E(t,!isNaN(n)&&n>-1)}}),de=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],ce="label, input, [data-rel=external]",ue={setupMouseMute:function(){var t,n=0,i=de.length,r=document.documentElement;if(!ue.mouseTrap&&Ie.eventCapture)for(ue.mouseTrap=!0,ue.bustClick=!1,ue.captureMouse=!1,t=function(t){ue.captureMouse&&("click"===t.type?ue.bustClick&&!e(t.target).is(ce)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};n<i;n++)r.addEventListener(de[n],t,!0)},muteMouse:function(e){ue.captureMouse=!0,e.data.bustClick&&(ue.bustClick=!0),clearTimeout(ue.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(ue.mouseTrapTimeoutID),ue.mouseTrapTimeoutID=setTimeout(function(){ue.captureMouse=!1,ue.bustClick=!1},400)}},pe={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},Ie.touch&&(Ie.mobileOS.ios||Ie.mobileOS.android)?pe={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:Ie.pointers?pe={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:Ie.msPointers&&(pe={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!Ie.msPointers||"onmspointerenter"in t||e.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var i,r=this,o=t.relatedTarget,a=t.handleObj;return o&&(o===r||e.contains(r,o))||(t.type=a.origType,i=a.handler.apply(this,arguments),t.type=n),i}}}),fe=function(e){return pe[e]||e},he=/([^ ]+)/g,be.applyEventMap=function(e,t){return e=e.replace(he,fe),t&&(e=e.replace(he,"$1."+t)),e},be.keyDownHandler=function(e,t){var n,i,r=t._events.kendoKeydown;if(!r)return!0;for(r=r.slice(),e.sender=t,e.preventKendoKeydown=!1,n=0,i=r.length;n<i;n++)r[n].call(t,e);return!e.preventKendoKeydown},me=e.fn.on,Ue(!0,z,e),z.fn=z.prototype=new e,z.fn.constructor=z,z.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof z)&&(n=z(n)),e.fn.init.call(this,t,n,ge)},z.fn.init.prototype=z.fn,ge=z(document),ke(z.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||be.guid()),this},on:function(){var e,t,n,i,r,o,a,s,l=this,d=l.data("kendoNS");return 1===arguments.length?me.call(l,arguments[0]):(e=l,t=Ve.call(arguments),typeof t[t.length-1]===Me&&t.pop(),n=t[t.length-1],i=be.applyEventMap(t[0],d),Ie.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(ue.setupMouseMute(),r=2===t.length?null:t[1],o=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,me.call(this,{touchstart:ue.muteMouse,touchend:ue.unMuteMouse},r,{bustClick:o})),arguments[0].indexOf("keydown")!==-1&&t[1]&&t[1].options?(t[0]=i,a=t[1],s=t[t.length-1],t[t.length-1]=function(e){if(be.keyDownHandler(e,a))return s.apply(this,[e])},me.apply(l,t),l):(typeof n===Ne&&(e=l.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,me.apply(l,t),l))},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),be.jQuery=z,be.eventMap=pe,be.timezone=function(){function e(e,t){var n,i,r,o=t[3],a=t[4],s=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(a)?0===a.indexOf("last")?(n=new Date(Date.UTC(e,c[o]+1,1,s[0]-24,s[1],s[2],0)),i=u[a.substr(4,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r-(i>r?7:0))):a.indexOf(">=")>=0?(n=new Date(Date.UTC(e,c[o],a.substr(5),s[0],s[1],s[2],0)),i=u[a.substr(0,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r+(i<r?7:0))):a.indexOf("<=")>=0&&(n=new Date(Date.UTC(e,c[o],a.substr(5),s[0],s[1],s[2],0)),i=u[a.substr(0,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r-(i>r?7:0))):n=new Date(Date.UTC(e,c[o],a,s[0],s[1],s[2],0)),l[e]=n)}function t(t,n,i){var r,o,a,s;return(n=n[i])?(a=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return t<=a&&(n>=a||t==a&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=+e(a,t)),"number"!=typeof n&&(n=+e(a,n)),t-n}),s=n[jQuery.inArray(t,n)-1]||n[n.length-1],isNaN(s)?s:null):(r=i.split(":"),o=0,r.length>1&&(o=60*r[0]+ +r[1]),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"])}function n(e,t,n){var i,r,o,a=t[n];if("string"==typeof a&&(a=t[a]),!a)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=a.length-1;i>=0&&(r=a[i][3],!(r&&e>r));i--);if(o=a[i+1],!o)throw Error('Timezone "'+n+'" not found on '+e+".");return o}function i(e,i,r,o){typeof e!=Pe&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var a=n(e,i,o);return{zone:a,rule:t(e,r,a[1])}}function r(e,t){var n,r,o;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,be.parseFloat(o?r[0]-o[6]:r[0]))}function o(e,t){var n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,a=r[2];return a.indexOf("/")>=0?a.split("/")[o&&+o[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",o&&"-"!=o[7]?o[7]:""):a}function a(e,t,n){var i,r,o,a=n;return typeof t==Ne&&(t=this.offset(e,t)),typeof n==Ne&&(n=this.offset(e,n)),r=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),o=e.getTimezoneOffset(),typeof a==Ne&&(a=this.offset(e,a)),i=o-r+(n-a),new Date(e.getTime()+6e4*i)}function s(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function l(e,t){return this.convert(e,t,e.getTimezoneOffset())}function d(e){return this.apply(new Date(e),"Etc/UTC")}var c={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},u={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:r,convert:a,apply:s,remove:l,abbr:o,toLocalDate:d}}(),be.date=function(){function e(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function t(t,n,i){var r=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,r)}function i(e,n,i){return e=new Date(e),t(e,n,i),e}function r(e){return new Date(e.getFullYear(),e.getMonth(),1)}function o(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=r(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t}function a(e,t){return 1!==t?h(i(e,t,-1),4):h(e,4-(e.getDay()||7))}function s(e,t){var n=new Date(e.getFullYear(),0,1,(-6)),i=a(e,t),r=i.getTime()-n.getTime(),o=Math.floor(r/y);return 1+Math.floor(o/7)}function l(e,t){var i,r,o;return t===n&&(t=be.culture().calendar.firstDay),i=h(e,-7),r=h(e,7),o=s(e,t),0===o?s(i,t)+1:53===o&&s(r,t)>1?1:o}function d(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function c(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function u(e){return b(e).getTime()-d(b(e))}function p(e,t,n){var i,r=u(t),o=u(n);return!e||r==o||(t>=n&&(n+=y),i=u(e),r>i&&(i+=y),o<r&&(o+=y),i>=r&&i<=o)}function f(e,t,n){var i,r=t.getTime(),o=n.getTime();return r>=o&&(o+=y),i=e.getTime(),i>=r&&i<=o}function h(t,n){var i=t.getHours();return t=new Date(t),m(t,n*y),e(t,i),t}function m(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*k))}function g(t,n){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e(t,n.getHours()),t}function v(){return d(new Date)}function _(e){return d(e).getTime()==v().getTime()}function b(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}var k=6e4,y=864e5;return{adjustDST:e,dayOfWeek:i,setDayOfWeek:t,getDate:d,isInDateRange:f,isInTimeRange:p,isToday:_,nextDay:function(e){return h(e,1)},previousDay:function(e){return h(e,-1)},toUtcTime:c,MS_PER_DAY:y,MS_PER_HOUR:60*k,MS_PER_MINUTE:k,setTime:m,setHours:g,addDays:h,today:v,toInvariantTime:b,firstDayOfMonth:r,lastDayOfMonth:o,weekInYear:l,getMilliseconds:u}}(),be.stripWhitespace=function(e){var t,n,i;if(document.createNodeIterator)for(t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode);else for(n=0;n<e.childNodes.length;n++)i=e.childNodes[n],3!=i.nodeType||/\S/.test(i.nodeValue)||(e.removeChild(i),n--),1==i.nodeType&&be.stripWhitespace(i)},ve=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},be.animationFrame=function(e){ve.call(t,e)},_e=[],be.queueAnimation=function(e){_e[_e.length]=e,1===_e.length&&be.runNextAnimation()},be.runNextAnimation=function(){be.animationFrame(function(){_e[0]&&(_e.shift()(),_e[0]&&be.runNextAnimation())})},be.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",n={},i=t.split(/&|=/),r=i.length,o=0;o<r;o+=2)""!==i[o]&&(n[decodeURIComponent(i[o])]=decodeURIComponent(i[o+1]));return n},be.elementUnderCursor=function(e){if(n!==e.x.client)return document.elementFromPoint(e.x.client,e.y.client)},be.wheelDeltaY=function(e){var t,i=e.originalEvent,r=i.wheelDeltaY;return i.wheelDelta?(r===n||r)&&(t=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(t=10*-i.detail),t},be.throttle=function(e,t){var i,r,o=0;return!t||t<=0?e:(r=function(){function r(){e.apply(a,l),o=+new Date}var a=this,s=+new Date-o,l=arguments;return o?(i&&clearTimeout(i),s>t?r():i=setTimeout(r,t-s),n):r()},r.cancel=function(){clearTimeout(i)},r)},be.caret=function(t,i,r){var o,a,s,l,d,c=i!==n;if(r===n&&(r=i),t[0]&&(t=t[0]),!c||!t.disabled){try{t.selectionStart!==n?c?(t.focus(),a=Ie.mobileOS,a.wp||a.android?setTimeout(function(){t.setSelectionRange(i,r)},0):t.setSelectionRange(i,r)):i=[t.selectionStart,t.selectionEnd]:document.selection&&(e(t).is(":visible")&&t.focus(),o=t.createTextRange(),c?(o.collapse(!0),o.moveStart("character",i),o.moveEnd("character",r-i),o.select()):(s=o.duplicate(),o.moveToBookmark(document.selection.createRange().getBookmark()),s.setEndPoint("EndToStart",o),l=s.text.length,d=l+o.text.length,i=[l,d]))}catch(u){i=[]}return i}},be.compileMobileDirective=function(e,n){var i=t.angular;return e.attr("data-"+be.ns+"role",e[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),i.element(e).injector().invoke(["$compile",function(t){t(e)(n),/^\$(digest|apply)$/.test(n.$$phase)||n.$digest()}]),be.widgetInstance(e,be.mobile.ui)},be.antiForgeryTokens=function(){var t={},i=e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),r=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").each(function(){t[this.name]=this.value}),r!==n&&i!==n&&(t[r]=i),t},be.cycleForm=function(e){function t(e){var t=be.widgetInstance(e);t&&t.focus?t.focus():e.focus()}var n=e.find("input, .k-widget").first(),i=e.find("button, .k-button").last();i.on("keydown",function(e){e.keyCode!=be.keys.TAB||e.shiftKey||(e.preventDefault(),t(n))}),n.on("keydown",function(e){e.keyCode==be.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(i))})},be.focusElement=function(n){var i=[],r=n.parentsUntil("body").filter(function(e,t){var n=be.getComputedStyles(t,["overflow"]);return"visible"!==n.overflow}).add(t);r.each(function(t,n){i[t]=e(n).scrollTop()});try{n[0].setActive()}catch(o){n[0].focus()}r.each(function(t,n){e(n).scrollTop(i[t])})},be.focusNextElement=function(){var t,n,i;document.activeElement&&(t=e(":kendoFocusable"),n=t.index(document.activeElement),n>-1&&(i=t[n+1]||t[0],i.focus()))},be.trim=function(e){return e?(""+e).trim():""},be.getWidgetFocusableElement=function(t){var n,i=t.closest(":kendoFocusable"),r=be.widgetInstance(t);return n=i.length?i:r?"Editor"===r.options.name?e(r.body):r.wrapper.find(":kendoFocusable").first():t},be.addAttribute=function(e,t,n){var i=e.attr(t)||"";i.indexOf(n)<0&&e.attr(t,(i+" "+n).trim())},be.removeAttribute=function(e,t,n){var i=e.attr(t)||"";e.attr(t,i.replace(n,"").trim())},be.toggleAttribute=function(e,t,n){var i=e.attr(t)||"";i.indexOf(n)<0?be.addAttribute(e,t,n):be.removeAttribute(e,t,n)},be.matchesMedia=function(e){var n=be._bootstrapToMedia(e)||e;return Ie.matchMedia&&t.matchMedia(n).matches},be._bootstrapToMedia=function(e){return{xs:"(max-width: 576px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}[e]},be.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],"disc-image":[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]},be.getFileGroup=function(e,t){var i,r,o=be.fileGroupMap,a=Object.keys(o),s="file";if(e===n||!e.length)return s;for(i=0;i<a.length;i+=1)if(r=o[a[i]],r.indexOf(e.toLowerCase())>-1)return t?"file-"+a[i]:a[i];return s},be.getFileSizeMessage=function(e){var t,n=["Bytes","KB","MB","GB","TB"];return 0===e?"0 Byte":(t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10),Math.round(e/Math.pow(1024,t),2)+" "+n[t])},be.selectorFromClasses=function(e){return"."+e.split(" ").join(".")},be.whenAll=function(t){function n(e,t,n){return function(){n!=r&&d++,s.notifyWith(t[e]=this,n[e]=Array.prototype.slice.call(arguments)),--a||s[(d?"reject":"resolve")+"With"](t,n)}}for(var i,r=1==arguments.length&&e.isArray(t)?t:Array.prototype.slice.call(arguments),o=r.length,a=o,s=e.Deferred(),l=0,d=0,c=Array(o),u=Array(o),p=Array(o);l<o;l++)(i=r[l])&&e.isFunction(i.promise)?i.promise().done(n(l,p,r)).fail(n(l,c,u)):(s.notifyWith(this,i),--a);return a||s.resolveWith(p,r),s.promise()},function(){function n(t,n,i,r){var o,a,s=e("<form>").attr({action:i,method:"POST",target:r}),l=be.antiForgeryTokens();l.fileName=n,o=t.split(";base64,"),l.contentType=o[0].replace("data:",""),l.base64=o[1];for(a in l)l.hasOwnProperty(a)&&e("<input>").attr({value:l[a],name:a,type:"hidden"}).appendTo(s);s.appendTo("body").submit().remove()}function i(e,t){var n,i,r,o,a,s=e;if("string"==typeof e){for(n=e.split(";base64,"),i=n[0],r=atob(n[1]),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);s=new Blob([o.buffer],{type:i})}navigator.msSaveBlob(s,t)}function r(e,n){t.Blob&&e instanceof Blob&&(e=URL.createObjectURL(e)),o.download=n,o.href=e;var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),o.dispatchEvent(i),setTimeout(function(){URL.revokeObjectURL(e)})}var o=document.createElement("a"),a="download"in o&&!be.support.browser.edge;be.saveAs=function(e){var t=n;e.forceProxy||(a?t=r:navigator.msSaveBlob&&(t=i)),t(e.dataURI,e.fileName,e.proxyURL,e.proxyTarget)}}(),be.proxyModelSetters=function(e){var t={};return Object.keys(e||{}).forEach(function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t,e.dirty=!0}})}),t},function(){be.defaults=be.defaults||{},be.setDefaults=function(e,t){var i=e.split("."),r=be.defaults;e=i.pop(),i.forEach(function(e){r[e]===n&&(r[e]={}),r=r[e]}),r[e]=t.constructor===Object?d({},r[e],t):t}}()}(jQuery,window),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.odata.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(i,r){var o,a,s,l,d,c,u,p,f=[],h=i.logic||"and",g=i.filters;for(o=0,a=g.length;o<a;o++)i=g[o],s=i.field,u=i.value,c=i.operator,i.filters?i=n(i,r):(p=i.ignoreCase,s=s.replace(/\./g,"/"),i=k[c],r&&(i=y[c]),"isnullorempty"===c?i=m.format("{0} {1} null or {0} {1} ''",s,i):"isnotnullorempty"===c?i=m.format("{0} {1} null and {0} {1} ''",s,i):"isnull"===c||"isnotnull"===c?i=m.format("{0} {1} null",s,i):"isempty"===c||"isnotempty"===c?i=m.format("{0} {1} ''",s,i):i&&u!==t&&(l=e.type(u),"string"===l?(d="'{1}'",u=u.replace(/'/g,"''"),p===!0&&(s="tolower("+s+")")):"date"===l?r?(d="{1:yyyy-MM-ddTHH:mm:ss+00:00}",u=m.timezone.apply(u,"Etc/UTC")):d="datetime'{1:yyyy-MM-ddTHH:mm:ss}'":d="{1}",i.length>3?"substringof"!==i?d="{0}({2},"+d+")":(d="{0}("+d+",{2})","doesnotcontain"===c&&(r?(d="{0}({2},'{1}') eq -1",i="indexof"):d+=" eq false")):d="{2} {0} "+d,i=m.format(d,i,u,s))),f.push(i);return i=f.join(" "+h+" "),f.length>1&&(i="("+i+")"),i}function i(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}function r(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function o(e){return e+r()+"-"+r()+"-"+r()}function a(e,t){var n=v+"--"+e;return t&&(n+="--"),n}function s(e,t,n,i){var r=e.options[i].url,o=m.format("{0} ",n);return b(r)?o+r(t):o+r}function l(e,t){var n="";return n+=a(e,!1),n+=v+"Content-Type: application/http",n+=v+"Content-Transfer-Encoding: binary",n+=v+"Content-ID: "+t}function d(e){var t="";return t+=v+"Content-Type: application/json;odata=minimalmetadata",t+=v+"Prefer: return=representation",t+=_+m.stringify(e)}function c(e,t,n,i,r,o){var a,c="";for(a=0;a<e.length;a++)c+=l(t,n),c+=_+s(r,e[a],r.options[i].type,i)+" HTTP/1.1",o||(c+=d(e[a])),c+=v,n++;return c}function u(e,t,n,i,r,o,s){var l="";return l+=p(t,n),l+=c(e,n,i,o,r,s),l+=a(n,!0),l+=v}function p(e,t){var n="";return n+="--"+e+v,n+="Content-Type: multipart/mixed; boundary="+t+v}function f(e,t){var n=g({},e.options.batch),i=o("sf_batch_"),r="",s=0,l=e.options.batch.url,d=o("sf_changeset_");return n.type=e.options.batch.type,n.url=b(l)?l():l,n.headers=g(n.headers||{},{"Content-Type":"multipart/mixed; boundary="+i}),t.updated.length&&(r+=u(t.updated,i,d,s,e,"update",!1),s+=t.updated.length,d=o("sf_changeset_")),t.destroyed.length&&(r+=u(t.destroyed,i,d,s,e,"destroy",!0),s+=t.destroyed.length,d=o("sf_changeset_")),t.created.length&&(r+=u(t.created,i,d,s,e,"create",!1)),r+=a(i,!0),n.data=r,n}function h(e){var t,n,i,r,o,a,s=e.match(/--changesetresponse_[a-z0-9-]+$/gm),l=0,d=[];for(d.push({models:[],passed:!0}),a=0;a<s.length;a++)r=s[a],r.lastIndexOf("--",r.length-1)?a<s.length-1&&d.push({models:[],passed:!0}):(l=l?e.indexOf(r,l+r.length):e.indexOf(r),t=e.substring(l,e.indexOf("--",l+1)),n=t.match(/^HTTP\/1\.\d (\d{3}) (.*)$/gm).pop(),i=m.parseFloat(n.match(/\d{3}/g).pop()),i>=200&&i<=299?(o=t.match(/\{.*\}/gm),o&&d[d.length-1].models.push(JSON.parse(o[0]))):d[d.length-1].passed=!1);return d}var m=window.kendo,g=e.extend,v="\r\n",_="\r\n\r\n",b=m.isFunction,k={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isnullorempty:"eq",isnotnullorempty:"ne",isempty:"eq",isnotempty:"ne"},y=g({},k,{contains:"contains"}),w={pageSize:e.noop,page:e.noop,filter:function(e,t,i){t&&(t=n(t,i),t&&(e.$filter=t))},sort:function(t,n){var i=e.map(n,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");i&&(t.$orderby=i)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},x={read:{dataType:"jsonp"}};g(!0,m.data,{schemas:{odata:{type:"json",data:function(e){return e.d.results||[e.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t,n){var i,r,o,a;if(e=e||{},t=t||"read",a=(this.options||x)[t],a=a?a.dataType:"json","read"===t){i={$inlinecount:"allpages"},"json"!=a&&(i.$format="json");for(o in e)w[o]?w[o](i,e[o],n):i[o]=e[o]}else{if("json"!==a)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(o in e)r=e[o],"number"==typeof r&&(e[o]=r+"");i=m.stringify(e)}}return i}}}}),g(!0,m.data,{schemas:{"odata-v4":{type:"json",data:function(t){if(e.isArray(t)){for(var n=0;n<t.length;n++)i(t[n]);return t}return t=e.extend({},t),i(t),t.value?t.value:[t]},total:function(e){return e["@odata.count"]}}},transports:{"odata-v4":{batch:{type:"POST"},read:{cache:!0,dataType:"json"},update:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t){var n=m.data.transports.odata.parameterMap(e,t,!0);return"read"==t&&(n.$count=!0,delete n.$inlinecount),n.$filter&&(n.$filter=n.$filter.replace(/('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')/gi,function(e){return e.substring(1,e.length-1)})),n},submit:function(t){var n=this,i=f(n,t.data),r=t.data;(r.updated.length||r.destroyed.length||r.created.length)&&e.ajax(g(!0,{},{success:function(e){var n,i=h(e),o=0;r.updated.length&&(n=i[o],n.passed&&t.success(n.models.length?n.models:[],"update"),o++),r.destroyed.length&&(n=i[o],n.passed&&t.success([],"destroy"),o++),r.created.length&&(n=i[o],n.passed&&t.success(n.models,"create"))},error:function(e,n,i){t.error(e,n,i)}},i))}}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.xml.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.isArray,r=e.isPlainObject,o=e.map,a=e.each,s=e.extend,l=n.getter,d=n.Class,c=d.extend({init:function(t){var l,d,c,u,p=this,f=t.total,h=t.model,m=t.parse,g=t.errors,v=t.serialize,_=t.data;h&&(r(h)&&(l=t.modelBase||n.data.Model,h.fields&&a(h.fields,function(t,n){r(n)&&n.field?e.isFunction(n.field)||(n=s(n,{field:p.getter(n.field)})):n={field:p.getter(n)},h.fields[t]=n}),d=h.id,d&&(c={},c[p.xpathToMember(d,!0)]={field:p.getter(d)},h.fields=s(c,h.fields),h.id=p.xpathToMember(d)),h=l.define(h)),p.model=h),f&&("string"==typeof f?(f=p.getter(f),p.total=function(e){return parseInt(f(e),10)}):"function"==typeof f&&(p.total=f)),g&&("string"==typeof g?(g=p.getter(g),p.errors=function(e){return g(e)||null}):"function"==typeof g&&(p.errors=g)),_&&("string"==typeof _?(_=p.xpathToMember(_),p.data=function(e){var t,n=p.evaluate(e,_);return n=i(n)?n:[n],p.model&&h.fields?(t=new p.model,o(n,function(e){if(e){var n,i={};for(n in h.fields)i[n]=t._parse(n,h.fields[n].field(e));return i}})):n}):"function"==typeof _&&(p.data=_)),"function"==typeof m&&(u=p.parse,p.parse=function(e){
|
7
|
-
var t=m.call(p,e);return u.call(p,t)}),"function"==typeof v&&(p.serialize=v)},total:function(e){return this.data(e).length},errors:function(e){return e?e.errors:null},serialize:function(e){return e},parseDOM:function(e){var n,r,o,a,s,l,d,c={},u=e.attributes,p=u.length;for(d=0;d<p;d++)l=u[d],c["@"+l.nodeName]=l.nodeValue;for(r=e.firstChild;r;r=r.nextSibling)o=r.nodeType,3===o||4===o?c["#text"]=r.nodeValue:1===o&&(n=this.parseDOM(r),a=r.nodeName,s=c[a],i(s)?s.push(n):s=s!==t?[s,n]:n,c[a]=s);return c},evaluate:function(e,t){for(var n,r,o,a,s,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(r=[],t=l.join("."),s=0,o=e.length;s<o;s++)a=this.evaluate(e[s],t),a=i(a)?a:[a],r.push.apply(r,a);return r}return e},parse:function(t){var n,i,r={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),r[n.nodeName]=i,r},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,"."),e.indexOf("@")>=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:c,readers:{xml:c}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.min",["kendo.core.min","kendo.data.odata.min","kendo.data.xml.min"],e)}(function(){return function(e,t){function n(e,t,n,i){return function(r){var o,a={};for(o in r)a[o]=r[o];a.field=i?n+"."+r.field:n,t==Re&&e._notifyChange&&e._notifyChange(a),e.trigger(t,a)}}function i(e,t){var n=[];for(e=e||{};e;)Object.getOwnPropertyNames(e).forEach(function(e){n.indexOf(e)===-1&&(!t||rt.indexOf(e)<0)&&n.push(e)}),e=Object.getPrototypeOf(e);return n}function r(t,n){if(t===n)return!0;var i,o=e.type(t),a=e.type(n);if(o!==a)return!1;if("date"===o)return t.getTime()===n.getTime();if("object"!==o&&"array"!==o)return!1;for(i in t)if(!r(t[i],n[i]))return!1;return!0}function o(e,t){var n,i;for(i in e){if(n=e[i],_e(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function a(e){this.data=e||[]}function s(e,n){if(e){var i=typeof e===Fe?{field:e,dir:n}:e,r=ke(i)?i:i!==t?[i]:[];return ye(r,function(e){return!!e.dir})}}function l(e,n){var i,r,o,a={};if(e)for(i=typeof e===Fe?{field:e,dir:n}:e,r=ke(i)?i:i!==t?[i]:[],o=0;o<r.length;o++)a[r[o].field]={dir:r[o].dir,index:o+1};return a}function d(e){var t,n,i,r,o=e.filters;if(o)for(t=0,n=o.length;t<n;t++)i=o[t],r=i.operator,r&&typeof r===Fe&&(i.operator=re[r.toLowerCase()]||r),d(i)}function c(e){if(e&&!be(e))return!ke(e)&&e.filters||(e={logic:"and",filters:ke(e)?e:[e]}),d(e),e}function u(e,t){return!e.logic&&!t.logic&&(e.field===t.field&&e.value===t.value&&e.operator===t.operator)}function p(e){return e=e||{},be(e)?{logic:"and",filters:[]}:c(e)}function f(e,t){return t.logic||e.field>t.field?1:e.field<t.field?-1:0}function h(e,t){var n,i,r,o,a;if(e=p(e),t=p(t),e.logic!==t.logic)return!1;if(r=(e.filters||[]).slice(),o=(t.filters||[]).slice(),r.length!==o.length)return!1;for(r=r.sort(f),o=o.sort(f),a=0;a<r.length;a++)if(n=r[a],i=o[a],n.logic&&i.logic){if(!h(n,i))return!1}else if(!u(n,i))return!1;return!0}function m(e){return ke(e)?e:[e]}function g(e,n,i,r){var o=typeof e===Fe?{field:e,dir:n,compare:i,skipItemSorting:r}:e,a=ke(o)?o:o!==t?[o]:[];return Y(a,function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates,compare:e.compare,skipItemSorting:e.skipItemSorting}})}function v(e,t,n){var i,r=g(e,t,n);for(i=0;i<r.length;i++)delete r[i].compare;return r}function _(e){var t,n=ke(e)?e:[e];for(t=0;t<n.length;t++)if(n[t]&&Se(n[t].compare))return!0;return!1}function b(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function k(e,t,n,i,r,o){var a,s,l,d,c;for(t=t||[],d=t.length,a=0;a<d;a++)s=t[a],l=s.aggregate,c=s.field,e[c]=e[c]||{},o[c]=o[c]||{},o[c][l]=o[c][l]||{},e[c][l]=oe[l.toLowerCase()](e[c][l],n,Te.accessor(c),i,r,o[c][l])}function y(e){return"number"==typeof e&&!isNaN(e)}function w(e){return e&&e.getTime}function x(e){var t,n=e.length,i=Array(n);for(t=0;t<n;t++)i[t]=e[t].toJSON();return i}function C(e,t,n,i,r){var o,a,s,l,d,c={};for(l=0,d=e.length;l<d;l++){o=e[l];for(a in t)s=r[a],s&&s!==a&&(c[s]||(c[s]=Te.setter(s)),c[s](o,t[a](o)),delete o[a])}}function T(e,t,n,i,r){var o,a,s,l,d;for(l=0,d=e.length;l<d;l++){o=e[l];for(a in t)o[a]=n._parse(a,t[a](o)),s=r[a],s&&s!==a&&delete o[s]}}function S(e,t,n,i,r){var o,a,s,l;for(a=0,l=e.length;a<l;a++)o=e[a],s=i[o.field],s&&s!=o.field&&(o.field=s),o.value=n._parse(o.field,o.value),o.items&&(o.hasSubgroups?S(o.items,t,n,i,r):T(o.items,t,n,i,r))}function I(e,t,n,i,r,o){return function(a){return a=e(a),D(t,n,i,r,o)(a)}}function D(e,t,n,i,r){return function(o){return o&&!be(n)&&("[object Array]"===tt.call(o)||o instanceof ot||(o=[o]),t(o,n,new e,i,r)),o||[]}}function F(e,t){var n,i,r;if(t.items&&t.items.length)for(r=0;r<t.items.length;r++)n=e.items[r],i=t.items[r],n&&i?n.hasSubgroups?F(n,i):n.field&&n.value==i.value?n.items.push.apply(n.items,i.items):e.items.push.apply(e.items,[i]):i&&e.items.push.apply(e.items,[i])}function E(e,t,n,i){for(var r,o,a,s=0;t.length&&i&&(r=t[s],o=r.items,a=o.length,e&&e.field===r.field&&e.value===r.value?(e.hasSubgroups&&e.items.length?E(e.items[e.items.length-1],r.items,n,i):(o=o.slice(n,n+i),e.items=e.items.concat(o)),t.splice(s--,1)):r.hasSubgroups&&o.length?(E(r,o,n,i),r.items.length||t.splice(s--,1)):(o=o.slice(n,n+i),r.items=o,r.items.length||t.splice(s--,1)),0===o.length?n-=a:(n=0,i-=o.length),!(++s>=t.length)););s<t.length&&t.splice(s,t.length-s)}function A(e,t){var n,i,r,o,a=[],s=(e||[]).length,l=Se(t)?t:function(e,t){return e[t]};for(r=0;r<s;r++)if(n=l(e,r),n.hasSubgroups)a=a.concat(A(n.items));else for(i=n.items,o=0;o<i.length;o++)a.push(l(i,o));return a}function z(e){var t,n,i,r,o,a=[];for(t=0,n=e.length;t<n;t++)if(o=e.at(t),o.items)if(o.hasSubgroups)a=a.concat(z(o.items));else for(i=o.items,r=0;r<i.length;r++)a.push(i.at(r));return a}function N(e,t){var n,i,r;if(t)for(n=0,i=e.length;n<i;n++)r=e.at(n),r.items&&(r.hasSubgroups?N(r.items,t):r.items=new Q(r.items,t,r.items._events))}function P(e,t){for(var n=0;n<e.length;n++)if(e[n].hasSubgroups){if(P(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function H(e,t,n,i){for(var r=0;r<e.length&&e[r].data!==t&&!R(e[r].data,n,i);r++);}function R(e,t,n){for(var i=0,r=e.length;i<r;i++){if(e[i]&&e[i].hasSubgroups)return R(e[i].items,t,n);if(e[i]===t||e[i]===n)return e[i]=n,!0}}function O(e,n,i,r,o){var a,s,l,d;for(a=0,s=e.length;a<s;a++)if(l=e[a],l&&!(l instanceof r))if(l.hasSubgroups===t||o){for(d=0;d<n.length;d++)if(n[d]===l){e[a]=n.at(d),H(i,n,l,e[a]);break}}else O(l.items,n,i,r,o)}function M(e,t){var n,i,r;if(e)for(n=e.length,r=0;r<n;r++)if(i=e[r],i.uid&&i.uid==t.uid)return e.splice(r,1),i}function B(e,t){return t?V(e,function(e){return e.uid&&e.uid==t.uid||e[t.idField]===t.id&&t.id!==t._defaultId}):-1}function L(e,t){return t?V(e,function(e){return e.uid==t.uid}):-1}function V(e,t){var n,i;if(e){for(n=0,i=e.length;n<i;n++)if(t(e[n]))return n;return-1}}function U(e,t){var n,i;return e&&!be(e)?(n=e[t],i=_e(n)?n.from||n.field||t:e[t]||t,Se(i)?t:i):t}function W(e,t){var n,i,r,o={};for(r in e)"filters"!==r&&(o[r]=e[r]);if(e.filters)for(o.filters=[],n=0,i=e.filters.length;n<i;n++)o.filters[n]=W(e.filters[n],t);else o.field=U(t.fields,o.field);return o}function j(e,t){var n,i,r,o,a,s=[];for(n=0,i=e.length;n<i;n++){r={},o=e[n];for(a in o)r[a]=o[a];r.field=U(t.fields,r.field),r.aggregates&&ke(r.aggregates)&&(r.aggregates=j(r.aggregates,t)),s.push(r)}return s}function q(t,n){var i,r,o,a,s,l,d,c,u,p;for(t=e(t)[0],i=t.options,r=n[0],o=n[1],a=[],s=0,l=i.length;s<l;s++)u={},c=i[s],d=c.parentNode,d===t&&(d=null),c.disabled||d&&d.disabled||(d&&(u.optgroup=d.label),u[r.field]=c.text,p=c.attributes.value,p=p&&p.specified?c.value:c.text,u[o.field]=p,a.push(u));return a}function G(t,n){var i,r,o,a,s,l,d,c=e(t)[0].tBodies[0],u=c?c.rows:[],p=n.length,f=[];for(i=0,r=u.length;i<r;i++){for(s={},d=!0,a=u[i].cells,o=0;o<p;o++)l=a[o],"th"!==l.nodeName.toLowerCase()&&(d=!1,s[n[o].field]=l.innerHTML);d||f.push(s)}return f}function $(e){return function(){var t=this._data,n=ce.fn[e].apply(this,Ze.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function K(t,n){function i(e,t){return e.filter(t).add(e.find(t))}var r,o,a,s,l,d,c,u,p=e(t).children(),f=[],h=n[0].field,m=n[1]&&n[1].field,g=n[2]&&n[2].field,v=n[3]&&n[3].field;for(r=0,o=p.length;r<o;r++)a={_loaded:!0},s=p.eq(r),d=s[0].firstChild,u=s.children(),t=u.filter("ul"),u=u.filter(":not(ul)"),l=s.attr("data-id"),l&&(a.id=l),d&&(a[h]=3==d.nodeType?d.nodeValue:u.text()),m&&(a[m]=i(u,"a").attr("href")),v&&(a[v]=i(u,"img").attr("src")),g&&(c=i(u,".k-sprite").prop("className"),a[g]=c&&Te.trim(c.replace("k-sprite",""))),t.length&&(a.items=K(t.eq(0),n)),"true"==s.attr("data-hasChildren")&&(a.hasChildren=!0),f.push(a);return f}var Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le,de,ce,ue,pe,fe,he,me,ge=e.extend,ve=e.proxy,_e=e.isPlainObject,be=e.isEmptyObject,ke=e.isArray,ye=e.grep,we=e.ajax,xe=e.each,Ce=e.noop,Te=window.kendo,Se=Te.isFunction,Ie=Te.Observable,De=Te.Class,Fe="string",Ee="function",Ae="asc",ze="create",Ne="read",Pe="update",He="destroy",Re="change",Oe="sync",Me="get",Be="error",Le="requestStart",Ve="progress",Ue="requestEnd",We=[ze,Ne,Pe,He],je=function(e){return e},qe=Te.getter,Ge=Te.stringify,$e=Math,Ke=[].push,Ye=[].join,Qe=[].pop,Xe=[].splice,Je=[].shift,Ze=[].slice,et=[].unshift,tt={}.toString,nt=Te.support.stableSort,it=/^\/Date\((.*?)\)\/$/,rt=[],ot=Ie.extend({init:function(e,t){var n=this;n.type=t||X,Ie.fn.init.call(n),n.length=e.length,n.wrapAll(e,n)},at:function(e){return this[e]},toJSON:function(e){var t,n,i=this.length,r=Array(i);for(t=0;t<i;t++)n=this[t],n instanceof X&&(n=n.toJSON(e)),r[t]=n;return r},parent:Ce,wrapAll:function(e,t){var n,i,r=this,o=function(){return r};for(t=t||[],n=0,i=e.length;n<i;n++)t[n]=r.wrap(e[n],o);return t},wrap:function(e,t){var n,i=this;return null!==e&&"[object Object]"===tt.call(e)&&(n=e instanceof i.type||e instanceof ee,n||(e=e instanceof X?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(Re,function(e){i.trigger(Re,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemloaded":"itemchange"})})),e},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=Ke.apply(this,n),this.omitChangeEvent||this.trigger(Re,{action:"add",index:t,items:n}),e},slice:Ze,sort:[].sort,join:Ye,pop:function(){var e=this.length,t=Qe.apply(this);return e&&this.trigger(Re,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,r,o,a=this.wrapAll(Ze.call(arguments,2));if(i=Xe.apply(this,[e,t].concat(a)),i.length)for(this.trigger(Re,{action:"remove",index:e,items:i}),r=0,o=i.length;r<o;r++)i[r]&&i[r].children&&i[r].unbind(Re);return n&&this.trigger(Re,{action:"add",index:e,items:a}),i},shift:function(){var e=this.length,t=Je.apply(this);return e&&this.trigger(Re,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=et.apply(this,t),this.trigger(Re,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;t<n;t++)if(i[t]===e)return t;return-1},forEach:function(e,t){for(var n=0,i=this.length,r=t||window;n<i;n++)e.call(r,this[n],n,this)},map:function(e,t){for(var n=0,i=[],r=this.length,o=t||window;n<r;n++)i[n]=e.call(o,this[n],n,this);return i},reduce:function(e){var t,n=0,i=this.length;for(2==arguments.length?t=arguments[1]:n<i&&(t=this[n++]);n<i;n++)t=e(t,this[n],n,this);return t},reduceRight:function(e){var t,n=this.length-1;for(2==arguments.length?t=arguments[1]:n>0&&(t=this[n--]);n>=0;n--)t=e(t,this[n],n,this);return t},filter:function(e,t){for(var n,i=0,r=[],o=this.length,a=t||window;i<o;i++)n=this[i],e.call(a,n,i,this)&&(r[r.length]=n);return r},find:function(e,t){for(var n,i=0,r=this.length,o=t||window;i<r;i++)if(n=this[i],e.call(o,n,i,this))return n},every:function(e,t){for(var n,i=0,r=this.length,o=t||window;i<r;i++)if(n=this[i],!e.call(o,n,i,this))return!1;return!0},some:function(e,t){for(var n,i=0,r=this.length,o=t||window;i<r;i++)if(n=this[i],e.call(o,n,i,this))return!0;return!1},remove:function(e){var t=this.indexOf(e);t!==-1&&this.splice(t,1)},empty:function(){this.splice(0,this.length)}});"undefined"!=typeof Symbol&&Symbol.iterator&&!ot.prototype[Symbol.iterator]&&(ot.prototype[Symbol.iterator]=[][Symbol.iterator]),Q=ot.extend({init:function(e,t,n){Ie.fn.init.call(this),this.type=t||X,n&&(this._events=n);for(var i=0;i<e.length;i++)this[i]=e[i];this.length=i,this._parent=ve(function(){return this},this)},at:function(e){var t=this[e];return t instanceof this.type?t.parent=this._parent:t=this[e]=this.wrap(t,this._parent),t}}),rt=i({},!1),X=Ie.extend({init:function(e){var t,n=this,r=i(e,!0),o=function(){return n};Ie.fn.init.call(this),this._handlers={},r.forEach(function(i){t=e[i],"object"==typeof t&&t&&!t.getTime&&"_"!=i.charAt(0)&&(t=n.wrap(t,i,o)),n[i]=t}),n.uid=Te.guid()},shouldSerialize:function(e,t){return this.hasOwnProperty(e)&&"_handlers"!==e&&"_events"!==e&&(t&&t[e]||typeof this[e]!==Ee)&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(e){var t,n,i={};for(n in this)this.shouldSerialize(n,e)&&(t=this[n],(t instanceof X||t instanceof ot)&&(t=t.toJSON(e)),i[n]=t);return i},get:function(e){var t,n=this;return n.trigger(Me,{field:e}),t="this"===e?n:Te.getter(e,!0)(n)},_set:function(e,t){var n,i,r,o=this,a=e.indexOf(".")>=0;if(a)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),r=Te.getter(i,!0)(o),r instanceof X)return r.set(n.join("."),t),a;i+="."}return Te.setter(e)(o,t),a},set:function(e,t){var n=this,i=!1,r=e.indexOf(".")>=0,o=Te.getter(e,!0)(n);return o!==t&&(o instanceof Ie&&this._handlers[e]&&(this._handlers[e].get&&o.unbind(Me,this._handlers[e].get),o.unbind(Re,this._handlers[e].change)),i=n.trigger("set",{field:e,value:t}),i||(r||(t=n.wrap(t,e,function(){return n})),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(Re,{field:e}))),i},parent:Ce,wrap:function(e,t,i){var r,o,a,s,l=this,d=tt.call(e);return null==e||"[object Object]"!==d&&"[object Array]"!==d||(a=e instanceof ot,s=e instanceof ce,"[object Object]"!==d||s||a?("[object Array]"===d||a||s)&&(a||s||(e=new ot(e)),o=n(l,Re,t,!1),e.bind(Re,o),l._handlers[t]={change:o}):(e instanceof X||(e=new X(e)),r=n(l,Me,t,!0),e.bind(Me,r),o=n(l,Re,t,!0),e.bind(Re,o),l._handlers[t]={get:r,change:o}),e.parent=i),e}}),J={number:function(e){return typeof e===Fe&&"null"===e.toLowerCase()?null:Te.parseFloat(e)},date:function(e){return typeof e===Fe&&"null"===e.toLowerCase()?null:Te.parseDate(e)},"boolean":function(e){return typeof e===Fe?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===Fe&&"null"===e.toLowerCase()?null:null!=e?e+"":e},"default":function(e){return e}},Z={string:"",number:0,date:new Date,"boolean":!1,"default":""},ee=X.extend({init:function(n){var i,r,o=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},o.defaults,n),o._initializers))for(i=0;i<o._initializers.length;i++)r=o._initializers[i],n[r]=o.defaults[r]();X.fn.init.call(o,n),o.dirty=!1,o.dirtyFields={},o.idField&&(o.id=o.get(o.idField),o.id===t&&(o.id=o._defaultId))},shouldSerialize:function(e){return X.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"dirtyFields"!==e&&"_accessors"!==e},_parse:function(e,t){var n,i=this,r=e,a=i.fields||{};return e=a[e],e||(e=o(a,r)),e&&(n=e.parse,!n&&e.type&&(n=J[e.type.toLowerCase()])),n?n(t):t},_notifyChange:function(e){var t=e.action;"add"!=t&&"remove"!=t||(this.dirty=!0,this.dirtyFields[e.field]=!0)},editable:function(e){return e=(this.fields||{})[e],!e||e.editable!==!1},set:function(e,t){var n=this,i=n.dirty;n.editable(e)&&(t=n._parse(e,t),r(t,n.get(e))?n.trigger("equalSet",{field:e,value:t}):(n.dirty=!0,n.dirtyFields[e]=!0,X.fn.set.call(n,e,t)&&!i&&(n.dirty=i,n.dirty||(n.dirtyFields[e]=!1))))},accept:function(e){var t,n,i=this,r=function(){return i};for(t in e)n=e[t],"_"!=t.charAt(0)&&(n=i.wrap(e[t],t,r)),i._set(t,n);i.idField&&(i.id=i.get(i.idField)),i.dirty=!1,i.dirtyFields={}},isNew:function(){return this.id===this._defaultId}}),ee.define=function(e,n){n===t&&(n=e,e=ee);var i,r,o,a,s,l,d,c,u=ge({defaults:{}},n),p={},f=u.id,h=[];if(f&&(u.idField=f),u.id&&delete u.id,f&&(u.defaults[f]=u._defaultId=""),"[object Array]"===tt.call(u.fields)){for(l=0,d=u.fields.length;l<d;l++)o=u.fields[l],typeof o===Fe?p[o]={}:o.field&&(p[o.field]=o);u.fields=p}for(r in u.fields)o=u.fields[r],a=o.type||"default",s=null,c=r,r=typeof o.field===Fe?o.field:r,o.nullable||(s=u.defaults[c!==r?c:r]=o.defaultValue!==t?o.defaultValue:Z[a.toLowerCase()],"function"==typeof s&&h.push(r)),n.id===r&&(u._defaultId=s),u.defaults[c!==r?c:r]=s,o.parse=o.parse||J[a];return h.length>0&&(u._initializers=h),i=e.extend(u),i.define=function(e){return ee.define(i,e)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},te={selector:function(e){return Se(e)?e:qe(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:e<n?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,n){return t(n,e,!0)}:t},combine:function(e){return function(t,n){var i,r,o=e[0](t,n);for(i=1,r=e.length;i<r;i++)o=o||e[i](t,n);return o}}},ne=ge({},te,{asc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?-1:null==r?1:i.localeCompare?i.localeCompare(r):i>r?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?1:null==r?-1:r.localeCompare?r.localeCompare(i):i<r?1:-1}},create:function(e){return this[e.dir](e.field)}}),Y=function(e,t){var n,i=e.length,r=Array(i);for(n=0;n<i;n++)r[n]=t(e[n],n,e);return r},ie=function(){function e(e){return"string"==typeof e&&(e=e.replace(/[\r\n]+/g,"")),JSON.stringify(e)}function t(t){return function(n,i,r,o){return i+="",r&&(n="("+n+" + '').toString()"+(o?".toLocaleLowerCase('"+o+"')":".toLowerCase()"),i=o?i.toLocaleLowerCase(o):i.toLowerCase()),t(n,e(i),r)}}function n(t,n,i,r,o){if(null!=i){if(typeof i===Fe){var a=it.exec(i);a?i=new Date((+a[1])):r?(i=e(o?i.toLocaleLowerCase(o):i.toLowerCase()),n="(("+n+" || '')+'')"+(o?".toLocaleLowerCase('"+o+"')":".toLowerCase()")):i=e(i)}i.getTime&&(n="("+n+"&&"+n+".getTime?"+n+".getTime():"+n+")",i=i.getTime())}return n+" "+t+" "+i}function i(e){var t,n,i,r;for(t="/^",n=!1,i=0;i<e.length;++i){if(r=e.charAt(i),n)t+="\\"+r;else{if("~"==r){n=!0;continue}t+="*"==r?".*":"?"==r?".":".+^$()[]{}|\\/\n\r\u2028\u2029 ".indexOf(r)>=0?"\\"+r:r}n=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,i,r){return n("==",e,t,i,r)},neq:function(e,t,i,r){return n("!=",e,t,i,r)},gt:function(e,t,i){return n(">",e,t,i)},gte:function(e,t,i){return n(">=",e,t,i)},lt:function(e,t,i){return n("<",e,t,i)},lte:function(e,t,i){return n("<=",e,t,i)},startswith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == 0"}),doesnotstartwith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == -1"}),endswith:t(function(e,t){var n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") >= 0"}),doesnotendwith:t(function(e,t){var n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") < 0"}),contains:t(function(e,t){return e+".indexOf("+t+") >= 0"}),doesnotcontain:t(function(e,t){return e+".indexOf("+t+") == -1"}),matches:t(function(e,t){return t=t.substring(1,t.length-1),i(t)+".test("+e+")"}),doesnotmatch:t(function(e,t){return t=t.substring(1,t.length-1),"!"+i(t)+".test("+e+")"}),isempty:function(e){return e+" === ''"},isnotempty:function(e){return e+" !== ''"},isnull:function(e){return"("+e+" == null)"},isnotnull:function(e){return"("+e+" != null)"},isnullorempty:function(e){return"("+e+" === null) || ("+e+" === '')"},isnotnullorempty:function(e){return"("+e+" !== null) && ("+e+" !== '')"}}}(),a.filterExpr=function(e){var n,i,r,o,s,l,d=[],c={and:" && ",or:" || "},u=[],p=[],f=e.filters;for(n=0,i=f.length;n<i;n++)r=f[n],s=r.field,l=r.operator,r.filters?(o=a.filterExpr(r),r=o.expression.replace(/__o\[(\d+)\]/g,function(e,t){return t=+t,"__o["+(p.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(e,t){return t=+t,"__f["+(u.length+t)+"]"}),p.push.apply(p,o.operators),u.push.apply(u,o.fields)):(typeof s===Ee?(o="__f["+u.length+"](d)",u.push(s)):o=Te.expr(s),typeof l===Ee?(r="__o["+p.length+"]("+o+", "+ie.quote(r.value)+")",p.push(l)):r=ie[(l||"eq").toLowerCase()](o,r.value,r.ignoreCase===t||r.ignoreCase,e.accentFoldingFiltering)),d.push(r);return{expression:"("+d.join(c[e.logic])+")",fields:u,operators:p}},re={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"},a.normalizeFilter=c,a.compareFilters=h,a.prototype={toArray:function(){return this.data},range:function(e,t){return new a(this.data.slice(e,e+t))},skip:function(e){return new a(this.data.slice(e))},take:function(e){return new a(this.data.slice(0,e))},select:function(e){return new a(Y(this.data,e))},order:function(e,t,n){var i={dir:t};return e&&(e.compare?i.compare=e.compare:i.field=e),new a(n?this.data.sort(te.create(i)):this.data.slice(0).sort(te.create(i)))},orderBy:function(e,t){return this.order(e,"asc",t)},orderByDescending:function(e,t){return this.order(e,"desc",t)},sort:function(e,t,n,i){var r,o,a=s(e,t),l=[];if(n=n||te,a.length){for(r=0,o=a.length;r<o;r++)l.push(n.create(a[r]));return this.orderBy({compare:n.combine(l)},i)}return this},filter:function(e){var t,n,i,r,o,s,l,d,u=this.data,p=[];if(e=c(e),!e||0===e.filters.length)return this;for(r=a.filterExpr(e),s=r.fields,l=r.operators,o=d=Function("d, __f, __o","return "+r.expression),(s.length||l.length)&&(d=function(e){return o(e,s,l)}),t=0,i=u.length;t<i;t++)n=u[t],d(n)&&p.push(n);return new a(p)},group:function(e,t,n){e=g(e||[]),t=t||this.data;var i,r=this,o=new a(r.data);return e.length>0&&(i=e[0],o=n&&n.groupPaging?new a(t).groupAllData(i,t).select(function(r){var o=new a(t).filter([{field:r.field,operator:"eq",value:r.value,ignoreCase:!1}]),s=e.length>1?new a(r.items).group(e.slice(1),o.toArray(),n).toArray():r.items;return{field:r.field,value:r.value,hasSubgroups:e.length>1,items:s,aggregates:o.aggregate(i.aggregates),uid:Te.guid(),itemCount:s.length,subgroupCount:s.length}}):o.groupBy(i).select(function(n){var r=new a(t).filter([{field:n.field,operator:"eq",value:n.value,ignoreCase:!1}]);return{field:n.field,value:n.value,items:e.length>1?new a(n.items).group(e.slice(1),r.toArray()).toArray():n.items,hasSubgroups:e.length>1,aggregates:r.aggregate(i.aggregates)}})),o},groupBy:function(e){var t,n,i,r,o,s,l,d,c,u,p=this;if(be(e)||!this.data.length)return new a([]);for(t=e.field,n=e.skipItemSorting?this.data:this._sortForGrouping(t,e.dir||"asc"),i=Te.accessor(t),o=i.get(n[0],t),s={field:t,value:o,items:[]},u=[s],d=0,c=n.length;d<c;d++)r=n[d],l=i.get(r,t),b(o,l)||(o=l,s={field:t,value:o,items:[]},u.push(s)),s.items.push(r);return u=p._sortGroups(u,e),new a(u)},groupAllData:function(e,t){if(be(e)||this.data&&!this.data.length)return new a([]);var n,i,r,o,s=e.field,l=e.skipItemSorting?t:new a(t).sort(s,e.dir||"asc",ne).toArray(),d=Te.accessor(s),c=d.get(l[0],s),u={field:s,value:c,items:[]},p=[u];for(r=0,o=l.length;r<o;r++)n=l[r],i=d.get(n,s),b(c,i)||(c=i,u={field:s,value:c,items:[]},p.push(u)),u.items.push(n);return p=this._sortGroups(p,e),new a(p)},_sortForGrouping:function(e,t){var n,i,r=this.data;if(!nt){for(n=0,i=r.length;n<i;n++)r[n].__position=n;for(r=new a(r).sort(e,t,ne).toArray(),n=0,i=r.length;n<i;n++)delete r[n].__position;return r}return this.sort(e,t).toArray()},_sortGroups:function(e,t){var n=e;return t&&Se(t.compare)&&(n=new a(n).order({compare:t.compare},t.dir||Ae).toArray()),n},aggregate:function(e){var t,n,i={},r={};if(e&&e.length)for(t=0,n=this.data.length;t<n;t++)k(i,e,this.data[t],t,n,r);return i}},oe={sum:function(e,t,n){var i=n.get(t);return y(e)?y(i)&&(e+=i):e=i,e},count:function(e){return(e||0)+1},average:function(e,n,i,r,o,a){var s=i.get(n);return a.count===t&&(a.count=0),y(e)?y(s)&&(e+=s):e=s,y(s)&&a.count++,r==o-1&&y(e)&&(e/=a.count),e},max:function(e,t,n){var i=n.get(t);return y(e)||w(e)||(e=i),e<i&&(y(i)||w(i))&&(e=i),e},min:function(e,t,n){var i=n.get(t);return y(e)||w(e)||(e=i),e>i&&(y(i)||w(i))&&(e=i),e}},a.normalizeGroup=g,a.normalizeSort=s,a.process=function(e,n,i){var r,o,l,d,c,u,p,f,h,m,b,k;return n=n||{},r=n.group,o=_(g(r||[])),l=new a(e),d=v(r||[]),c=s(n.sort||[]),u=o?c:d.concat(c),h=n.filterCallback,m=n.filter,b=n.skip,k=n.take,u&&i&&(l=l.sort(u,t,t,i)),m&&(l=l.filter(m),h&&(l=h(l)),f=l.toArray().length),u&&(i||(l=l.sort(u)),r&&(e=l.toArray())),o?(l=l.group(r,e),b!==t&&k!==t&&(l=new a(A(l.toArray())).range(b,k),p=Y(d,function(e){return ge({},e,{skipItemSorting:!0})}),l=l.group(p,e))):(b!==t&&k!==t&&(l=l.range(b,k)),r&&(l=l.group(r,e,n))),{total:f,data:l.toArray()}},ae=De.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),se=De.extend({init:function(e){var t,n=this;e=n.options=ge({},n.options,e),xe(We,function(t,n){typeof e[n]===Fe&&(e[n]={url:e[n]})}),n.cache=e.cache?le.create(e.cache):{find:Ce,add:Ce},t=e.parameterMap,e.submit&&(n.submit=e.submit),Se(e.push)&&(n.push=e.push),n.push||(n.push=je),n.parameterMap=Se(t)?t:function(e){var n={};return xe(e,function(e,i){e in t&&(e=t[e],_e(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:je},create:function(e){return we(this.setup(e,ze))},read:function(n){var i,r,o,a=this,s=a.cache;n=a.setup(n,Ne),i=n.success||Ce,r=n.error||Ce,o=s.find(n.data),o!==t?i(o):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return we(this.setup(e,Pe))},destroy:function(e){return we(this.setup(e,He))},setup:function(e,t){e=e||{};var n,i=this,r=i.options[t],o=Se(r.data)?r.data(e.data):r.data;return e=ge(!0,{},r,e),n=ge(!0,{},o,e.data),e.data=i.parameterMap(n,t),Se(e.url)&&(e.url=e.url(n)),e}}),le=De.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[Ge(e)]=n)},find:function(e){return this._store[Ge(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Ge(e)]}}),le.create=function(e){var t={inmemory:function(){return new le}};return _e(e)&&Se(e.find)?e:e===!0?new le:t[e]()},de=De.extend({init:function(e){var t,n,i,r,o,a,s,l,d,c,u,p,f,h,m=this;e=e||{};for(t in e)n=e[t],m[t]=typeof n===Fe?qe(n):n;r=e.modelBase||ee,_e(m.model)&&(m.model=i=r.define(m.model)),o=ve(m.data,m),m._dataAccessFunction=o,m.model&&(a=ve(m.groups,m),s=ve(m.serialize,m),l={},d={},c={},u={},p=!1,i=m.model,i.fields&&(xe(i.fields,function(e,t){var n;f=e,_e(t)&&t.field?f=t.field:typeof t===Fe&&(f=t),_e(t)&&t.from&&(n=t.from),p=p||n&&n!==e||f!==e,h=n||f,d[e]=h.indexOf(".")!==-1?qe(h,!0):qe(h),c[e]=qe(e),l[n||f]=e,u[e]=n||f}),!e.serialize&&p&&(m.serialize=I(s,i,C,c,l,u))),m._dataAccessFunction=o,m._wrapDataAccessBase=D(i,T,d,l,u),m.data=I(o,i,T,d,l,u),m.groups=I(a,i,S,d,l,u))},errors:function(e){return e?e.errors:null},parse:je,data:je,total:function(e){return e.length},groups:je,aggregates:function(){return{}},serialize:function(e){return e}}),ce=Ie.extend({init:function(e){var n,i,r,o=this;e&&(i=e.data),e=o.options=ge({},o.options,e),o._map={},o._prefetch={},o._data=[],o._pristineData=[],o._ranges=[],o._view=[],o._pristineTotal=0,o._destroyed=[],o._pageSize=e.pageSize,o._page=e.page||(e.pageSize?1:t),o._sort=s(e.sort),o._sortFields=l(e.sort),o._filter=c(e.filter),o._group=g(e.group),o._aggregate=e.aggregate,o._total=e.total,o._groupPaging=e.groupPaging,o._groupPaging&&(o._groupsState={}),o._shouldDetachObservableParents=!0,Ie.fn.init.call(o),o.transport=ue.create(e,i,o),Se(o.transport.push)&&o.transport.push({pushCreate:ve(o._pushCreate,o),pushUpdate:ve(o._pushUpdate,o),pushDestroy:ve(o._pushDestroy,o)}),null!=e.offlineStorage&&("string"==typeof e.offlineStorage?(r=e.offlineStorage,o._storage={getItem:function(){return JSON.parse(localStorage.getItem(r))},setItem:function(e){localStorage.setItem(r,Ge(o.reader.serialize(e)))}}):o._storage=e.offlineStorage),o.reader=new Te.data.readers[e.schema.type||"json"](e.schema),n=o.reader.model||{},o._detachObservableParents(),o._data=o._observe(o._data),o._online=!0,o.bind(["push",Be,Re,Le,Oe,Ue,Ve],e)},options:{data:null,schema:{modelBase:ee},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1,inPlaceSort:!1},clone:function(){return this},online:function(n){return n!==t?this._online!=n&&(this._online=n,n)?this.sync():e.Deferred().resolve().promise():this._online},offlineData:function(e){return null==this.options.offlineStorage?null:e!==t?this._storage.setItem(e):this._storage.getItem()||[]},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_isServerGroupPaged:function(){return this._isServerGrouped()&&this._groupPaging},_isGroupPaged:function(){var e=this._group||[];return this._groupPaging&&e.length},_pushCreate:function(e){this._push(e,"pushCreate")},_pushUpdate:function(e){this._push(e,"pushUpdate")},_pushDestroy:function(e){this._push(e,"pushDestroy")},_push:function(e,t){var n=this._readData(e);n||(n=e),this[t](n)},_flatData:function(e,t){if(e){if(this._isServerGrouped())return z(e);if(!t)for(var n=0;n<e.length;n++)e.at(n)}return e},parent:Ce,get:function(e){var t,n,i=this._flatData(this._data,this.options.useRanges);for(t=0,n=i.length;t<n;t++)if(i[t].id==e)return i[t]},getByUid:function(e){return this._getByUid(e,this._data)},_getByUid:function(e,t){var n,i,r=this._flatData(t,this.options.useRanges);if(r)for(n=0,i=r.length;n<i;n++)if(r[n].uid==e)return r[n]},indexOf:function(e){return L(this._data,e)},at:function(e){return this._data.at(e)},data:function(e){var n,i=this;if(e===t){if(i._data)for(n=0;n<i._data.length;n++)i._data.at(n);return i._data}i._detachObservableParents(),i._data=this._observe(e),i._pristineData=e.slice(0),i._storeData(),i._ranges=[],i.trigger("reset"),i._addRange(i._data),i._total=i._data.length,i._pristineTotal=i._total,i._process(i._data)},view:function(e){return e===t?this._view:(this._view=this._observeView(e),t)},_observeView:function(e){var t,n=this;return O(e,n._data,n._ranges,n.reader.model||X,n._isServerGrouped()),t=new Q(e,n.reader.model),t.parent=function(){return n.parent()},t},flatView:function(){var e=this.group()||[];return e.length?z(this._view):this._view},add:function(e){return this.insert(this._data.length,e)},_createNewModel:function(e){return this.reader.model?new this.reader.model(e):e instanceof X?e:new X(e)},insert:function(e,t){return t||(t=e,e=0),t instanceof ee||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,this._wrapInEmptyGroup(t)):this._data.splice(e,0,t),this._insertModelInRange(e,t),t},pushInsert:function(t,n){var i,r,o,a,s,l,d=this,c=d._getCurrentRangeSpan();n||(n=t,t=0),ke(n)||(n=[n]),i=[],r=this.options.autoSync,this.options.autoSync=!1;try{for(o=0;o<n.length;o++)a=n[o],s=this.insert(t,a),i.push(s),l=s.toJSON(),this._isServerGrouped()&&(l=this._wrapInEmptyGroup(l)),this._pristineData.push(l),c&&c.length&&e(c).last()[0].pristineData.push(l),t++}finally{this.options.autoSync=r}i.length&&this.trigger("push",{type:"create",
|
8
|
-
items:i})},pushCreate:function(e){this.pushInsert(this._data.length,e)},pushUpdate:function(e){var t,n,i,r,o;for(ke(e)||(e=[e]),t=[],n=0;n<e.length;n++)i=e[n],r=this._createNewModel(i),o=this.get(r.id),o?(t.push(o),o.accept(i),o.trigger(Re),this._updatePristineForModel(o,i)):this.pushCreate(i);t.length&&this.trigger("push",{type:"update",items:t})},pushDestroy:function(e){var t=this._removeItems(e);t.length&&this.trigger("push",{type:"destroy",items:t})},_removeItems:function(e,n){var i,r,o,a,s,l,d;ke(e)||(e=[e]),i=t===n||n,r=[],o=this.options.autoSync,this.options.autoSync=!1;try{for(a=0;a<e.length;a++)s=e[a],l=this._createNewModel(s),d=!1,this._eachItem(this._data,function(e){var t,n;for(t=0;t<e.length;t++)if(n=e.at(t),n.id===l.id){r.push(n),e.splice(t,1),d=!0;break}}),d&&i&&(this._removePristineForModel(l),this._destroyed.pop())}finally{this.options.autoSync=o}return r},remove:function(e){var t,n=this,i=n._isServerGrouped();return this._eachItem(n._data,function(r){if(t=M(r,e),t&&i)return t.isNew&&t.isNew()||n._destroyed.push(t),!0}),this._removeModelFromRanges(e),e},destroyed:function(){return this._destroyed},created:function(){var e,t,n=[],i=this._flatData(this._data,this.options.useRanges);for(e=0,t=i.length;e<t;e++)i[e].isNew&&i[e].isNew()&&n.push(i[e]);return n},updated:function(){var e,t,n=[],i=this._flatData(this._data,this.options.useRanges);for(e=0,t=i.length;e<t;e++)i[e].isNew&&!i[e].isNew()&&i[e].dirty&&n.push(i[e]);return n},sync:function(){var t,n=this,i=[],r=[],o=n._destroyed,a=e.Deferred().resolve().promise();if(n.online()){if(!n.reader.model)return a;i=n.created(),r=n.updated(),t=[],n.options.batch&&n.transport.submit?t=n._sendSubmit(i,r,o):(t.push.apply(t,n._send("create",i)),t.push.apply(t,n._send("update",r)),t.push.apply(t,n._send("destroy",o))),a=e.when.apply(null,t).then(function(){var e,t;for(e=0,t=arguments.length;e<t;e++)arguments[e]&&n._accept(arguments[e]);n._storeData(!0),n._syncEnd(),n._change({action:"sync"}),n.trigger(Oe),n._isServerGroupPaged()&&n.read()})}else n._storeData(!0),n._syncEnd(),n._change({action:"sync"});return a},_syncEnd:Ce,cancelChanges:function(e){var t=this;e instanceof Te.data.Model?t._cancelModel(e):(t._destroyed=[],t._detachObservableParents(),t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t._pristineTotal),t._ranges=[],t._addRange(t._data,0),t._changesCanceled(),t._change(),t._markOfflineUpdatesAsDirty(),t._isServerGrouped()&&t.read())},_changesCanceled:Ce,_markOfflineUpdatesAsDirty:function(){var e=this;null!=e.options.offlineStorage&&e._eachItem(e._data,function(e){var t,n;for(t=0;t<e.length;t++)n=e.at(t),"update"!=n.__state__&&"create"!=n.__state__||(n.dirty=!0)})},hasChanges:function(){var e,t,n=this._flatData(this._data,this.options.useRanges);if(this._destroyed.length)return!0;for(e=0,t=n.length;e<t;e++)if(n[e].isNew&&n[e].isNew()||n[e].dirty)return!0;return!1},_accept:function(t){var n,i=this,r=t.models,o=t.response,a=0,s=i._isServerGrouped(),l=i._pristineData,d=t.type;if(i.trigger(Ue,{response:o,type:d}),o&&!be(o)){if(o=i.reader.parse(o),i._handleCustomErrors(o))return;o=i.reader.data(o),ke(o)||(o=[o])}else o=e.map(r,function(e){return e.toJSON()});for("destroy"===d&&(i._destroyed=[]),a=0,n=r.length;a<n;a++)"destroy"!==d?(r[a].accept(o[a]),"create"===d?l.push(s?i._wrapInEmptyGroup(r[a].toJSON()):o[a]):"update"===d&&i._updatePristineForModel(r[a],o[a])):i._removePristineForModel(r[a])},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,function(e,n){Te.deepExtend(n[e],t)})},_executeOnPristineForModel:function(e,t){this._eachPristineItem(function(n){var i=B(n,e);if(i>-1)return t(i,n),!0})},_removePristineForModel:function(e){this._executeOnPristineForModel(e,function(e,t){t.splice(e,1)})},_readData:function(e){var t=this._isServerGrouped()?this.reader.groups:this.reader.data;return t.call(this.reader,e)},_eachPristineItem:function(e){var t=this,n=t.options,i=t._getCurrentRangeSpan();t._eachItem(t._pristineData,e),n.serverPaging&&n.useRanges&&xe(i,function(n,i){t._eachItem(i.pristineData,e)})},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?P(e,t):t(e))},_pristineForModel:function(e){var t,n,i=function(i){if(n=B(i,e),n>-1)return t=i[n],!0};return this._eachPristineItem(i),t},_cancelModel:function(e){var t=this,n=this._pristineForModel(e);this._eachItem(this._data,function(i){var r=L(i,e);r>=0&&(!n||e.isNew()&&!n.__state__?(t._modelCanceled(e),i.splice(r,1),t._removeModelFromRanges(e)):(i[r].accept(n),"update"==n.__state__&&(i[r].dirty=!0)))})},_modelCanceled:Ce,_submit:function(t,n){var i=this;i.trigger(Le,{type:"submit"}),i.trigger(Ve),i.transport.submit(ge({success:function(n,i){var r=e.grep(t,function(e){return e.type==i})[0];r&&r.resolve({response:n,models:r.models,type:i})},error:function(e,n,r){for(var o=0;o<t.length;o++)t[o].reject(e);i.error(e,n,r)}},n))},_sendSubmit:function(t,n,i){var r=this,o=[];return r.options.batch&&(t.length&&o.push(e.Deferred(function(e){e.type="create",e.models=t})),n.length&&o.push(e.Deferred(function(e){e.type="update",e.models=n})),i.length&&o.push(e.Deferred(function(e){e.type="destroy",e.models=i})),r._submit(o,{data:{created:r.reader.serialize(x(t)),updated:r.reader.serialize(x(n)),destroyed:r.reader.serialize(x(i))}})),o},_promise:function(t,n,i){var r=this;return e.Deferred(function(e){r.trigger(Le,{type:i}),r.trigger(Ve),r.transport[i].call(r.transport,ge({success:function(t){e.resolve({response:t,models:n,type:i})},error:function(t,n,i){e.reject(t),r.error(t,n,i)}},t))}).promise()},_send:function(e,t){var n,i,r=this,o=[],a=r.reader.serialize(x(t));if(r.options.batch)t.length&&o.push(r._promise({data:{models:a}},t,e));else for(n=0,i=t.length;n<i;n++)o.push(r._promise({data:a[n]},[t[n]],e));return o},read:function(t){var n=this,i=n._params(t),r=e.Deferred();return n._queueRequest(i,function(){var e=n.trigger(Le,{type:"read"});e?(n._dequeueRequest(),r.resolve(e)):(n.trigger(Ve),n._ranges=[],n.trigger("reset"),n.online()?n.transport.read({data:i,success:function(e){n._ranges=[],n.success(e,i),r.resolve()},error:function(){var e=Ze.call(arguments);n.error.apply(n,e),r.reject.apply(r,e)}}):null!=n.options.offlineStorage&&(n.success(n.offlineData(),i),r.resolve()))}),r.promise()},_readAggregates:function(e){return this.reader.aggregates(e)},success:function(e){var n,i,r,o,a,s,l,d,c,u,p,f=this,h=f.options;if(f.trigger(Ue,{response:e,type:"read"}),f.online()){if(e=f.reader.parse(e),f._handleCustomErrors(e))return f._dequeueRequest(),t;f._total=f.reader.total(e),f._isServerGroupPaged()&&(f._serverGroupsTotal=f._total),f._pageSize>f._total&&(f._pageSize=f._total,f.options.pageSize&&f.options.pageSize>f._pageSize&&(f._pageSize=f.options.pageSize)),f._aggregate&&h.serverAggregates&&(f._aggregateResult=f._readAggregates(e)),e=f._readData(e),f._destroyed=[]}else{for(e=f._readData(e),n=[],r={},o=f.reader.model,a=o?o.idField:"id",s=0;s<this._destroyed.length;s++)l=this._destroyed[s][a],r[l]=l;for(s=0;s<e.length;s++)d=e[s],c=d.__state__,"destroy"==c?r[d[a]]||this._destroyed.push(this._createNewModel(d)):n.push(d);e=n,f._total=e.length}if(f._pristineTotal=f._total,i=f._skip&&f._data.length&&f._skip<f._data.length,f.options.endless)for(i&&f._pristineData.splice(f._skip,f._pristineData.length),n=e.slice(0),u=0;u<n.length;u++)f._pristineData.push(n[u]);else f._pristineData=e.slice(0);if(f._detachObservableParents(),f.options.endless){for(f._data.unbind(Re,f._changeHandler),f._isServerGrouped()&&f._data[f._data.length-1].value===e[0].value&&(F(f._data[f._data.length-1],e[0]),e.shift()),e=f._observe(e),i&&f._data.splice(f._skip,f._data.length),p=0;p<e.length;p++)f._data.push(e[p]);f._data.bind(Re,f._changeHandler)}else f._data=f._observe(e);f._markOfflineUpdatesAsDirty(),f._storeData(),f._addRange(f._data),f._process(f._data),f._dequeueRequest()},_detachObservableParents:function(){if(this._data&&this._shouldDetachObservableParents)for(var e=0;e<this._data.length;e++)this._data[e].parent&&(this._data[e].parent=Ce)},_storeData:function(e){function t(e){var n,i,r,o=[];for(n=0;n<e.length;n++)i=e.at(n),r=i.toJSON(),a&&i.items?r.items=t(i.items):(r.uid=i.uid,s&&(i.isNew()?r.__state__="create":i.dirty&&(r.__state__="update"))),o.push(r);return o}var n,i,r,o,a=this._isServerGrouped(),s=this.reader.model;if(null!=this.options.offlineStorage){for(n=t(this._data),i=[],r=0;r<this._destroyed.length;r++)o=this._destroyed[r].toJSON(),o.__state__="destroy",i.push(o);this.offlineData(n.concat(i)),e&&(this._pristineData=this.reader.reader?this.reader.reader._wrapDataAccessBase(n):this.reader._wrapDataAccessBase(n))}},_addRange:function(e,n){var i,r=this,o=t!==n?n:r._skip||0,a={data:e,pristineData:e.toJSON(),timestamp:r._timeStamp()};this._isGroupPaged()?(i=o+e.length,a.outerStart=o,a.outerEnd=i):i=o+r._flatData(e,!0).length,a.start=o,a.end=i,r._ranges.push(a),r._sortRanges(),r._isGroupPaged()&&(r._groupsFlat||(r._groupsFlat=[]),r._appendToGroupsFlat(a.data),r._updateOuterRangesLength())},_appendToGroupsFlat:function(e){var t,n=e.length;for(t=0;t<n;t++)this._groupsFlat.push(e[t])},_getGroupByUid:function(e){var t,n,i=this._groupsFlat.length;for(n=0;n<i;n++)if(t=this._groupsFlat[n],t.uid===e)return t},_sortRanges:function(){this._ranges.sort(function(e,t){return e.start-t.start})},error:function(e,t,n){this._dequeueRequest(),this.trigger(Ue,{}),this.trigger(Be,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=ge({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate,groupPaging:!!t._groupPaging},e);return t.options.serverPaging||(delete n.take,delete n.skip,delete n.page,delete n.pageSize),t.options.serverGrouping?t.reader.model&&n.group&&(n.group=j(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=W(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=j(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=j(n.aggregate,t.reader.model)):delete n.aggregate,t.options.groupPaging||delete n.groupPaging,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:ve(n,i),options:e}:(i._requestInProgress=!0,i._pending=t,n())},_dequeueRequest:function(){var e=this;e._requestInProgress=!1,e._pending&&e._queueRequest(e._pending.options,e._pending.callback)},_handleCustomErrors:function(e){if(this.reader.errors){var t=this.reader.errors(e);if(t)return this.trigger(Be,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_shouldWrap:function(e){var t=this.reader.model;return!(!t||!e.length)&&!(e[0]instanceof t)},_observe:function(e){var t,n=this,i=n.reader.model;return n._shouldDetachObservableParents=!0,e instanceof ot?(n._shouldDetachObservableParents=!1,n._shouldWrap(e)&&(e.type=n.reader.model,e.wrapAll(e,e))):(t=n.pageSize()&&!n.options.serverPaging?Q:ot,e=new t(e,n.reader.model),e.parent=function(){return n.parent()}),n._isServerGrouped()&&N(e,i),!(n._changeHandler&&n._data&&n._data instanceof ot)||n.options.useRanges&&n.options.serverPaging?n._changeHandler=ve(n._change,n):n._data.unbind(Re,n._changeHandler),e.bind(Re,n._changeHandler)},_updateTotalForAction:function(e,t){var n=this,i=parseInt(n._total,10);y(n._total)||(i=parseInt(n._pristineTotal,10)),"add"===e?i+=t.length:"remove"===e?i-=t.length:"itemchange"===e||"sync"===e||n.options.serverPaging?"sync"===e&&(i=n._pristineTotal=parseInt(n._total,10)):i=n._pristineTotal,n._total=i},_change:function(e){var t,n,i,r=this,o=e?e.action:"";if("remove"===o)for(t=0,n=e.items.length;t<n;t++)e.items[t].isNew&&e.items[t].isNew()||r._destroyed.push(e.items[t]);!r.options.autoSync||"add"!==o&&"remove"!==o&&"itemchange"!==o?(r._updateTotalForAction(o,e?e.items:[]),r._process(r._data,e)):(i=function(t){"sync"===t.action&&(r.unbind("change",i),r._updateTotalForAction(o,e.items))},r.first("change",i),r.sync())},_calculateAggregates:function(e,t){t=t||{};var n=new a(e),i=t.aggregate,r=t.filter;return r&&(n=n.filter(r)),n.aggregate(i)},_process:function(e,n){var i,r=this,o={};r.options.serverPaging!==!0&&(o.skip=r._skip,o.take=r._take||r._pageSize,o.skip===t&&r._page!==t&&r._pageSize!==t&&(o.skip=(r._page-1)*r._pageSize),r.options.useRanges&&(o.skip=r.currentRangeStart())),r.options.serverSorting!==!0&&(o.sort=r._sort),r.options.serverFiltering!==!0&&(o.filter=r._filter),r.options.serverGrouping!==!0&&(o.group=r._group),r.options.serverAggregates!==!0&&(o.aggregate=r._aggregate),r.options.serverGrouping&&r._clearEmptyGroups(e),o.groupPaging=r._groupPaging,i=r._isGroupPaged()&&n&&("page"===n.action||"expandGroup"===n.action||"collapseGroup"===n.action)?r._queryProcess(e,{aggregate:r._aggregate}):r._queryProcess(e,o),r.options.serverAggregates!==!0&&(r._aggregateResult=r._calculateAggregates(i.dataToAggregate||e,o)),r._setView(i,o,n),r._setFilterTotal(i.total,!1),n=n||{},n.items=n.items||r._view,r.trigger(Re,n)},_setView:function(e,t,n){var i,r=this;r._isGroupPaged()&&!r._isServerGrouped()?!n||"page"!==n.action&&"expandGroup"!==n.action&&"collapseGroup"!==n.action?(r._ranges=[],i=new a(e.data),r._addRange(r._observe(e.data)),t.skip+t.take>e.data.length&&(t.skip=e.data.length-t.take),r.view(i.range(t.skip,t.take).toArray())):(r.view(e.data),r._updateOuterRangesLength()):r.view(e.data)},_clearEmptyGroups:function(e){var t,n;for(t=e.length-1;t>=0;t--)n=e[t],n.hasSubgroups?this._clearEmptyGroups(n.items):n.items&&!n.items.length&&Xe.apply(n.parent(),[t,1])},_queryProcess:function(e,t){return this.options.inPlaceSort?a.process(e,t,this.options.inPlaceSort):a.process(e,t)},_mergeState:function(n){var i=this;return n!==t&&(i._pageSize=n.pageSize,i._page=n.page,i._sort=n.sort,i._filter=n.filter,i._group=n.group,i._aggregate=n.aggregate,i._skip=i._currentRangeStart=n.skip,i._take=n.take,i._skip===t&&(i._skip=i._currentRangeStart=i.skip(),n.skip=i.skip()),i._take===t&&i._pageSize!==t&&(i._take=i._pageSize,n.take=i._take),n.sort&&(i._sort=n.sort=s(n.sort),i._sortFields=l(n.sort)),n.filter&&(i._filter=n.filter=i.options.accentFoldingFiltering&&!e.isEmptyObject(n.filter)?e.extend({},c(n.filter),{accentFoldingFiltering:i.options.accentFoldingFiltering}):c(n.filter)),n.group&&(i._group=n.group=g(n.group)),n.aggregate&&(i._aggregate=n.aggregate=m(n.aggregate))),n},query:function(n){var i,r,o,a=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return a||(this._data===t||0===this._data.length)&&!this._destroyed.length?(this.options.endless&&(r=n.pageSize-this.pageSize(),r>0?(r=this.pageSize(),n.page=n.pageSize/r,n.pageSize=r):(n.page=1,this.options.endless=!1)),this.read(this._mergeState(n))):(o=this.trigger(Le,{type:"read"}),o||(this.trigger(Ve),n&&(n.groupPaging=this._groupPaging),i=this._queryProcess(this._data,this._mergeState(n)),this._setFilterTotal(i.total,!0),this._aggregateResult=this._calculateAggregates(i.dataToAggregate||this._data,n),this._setView(i,n),this.trigger(Ue,{type:"read"}),this.trigger(Re,{items:i.data,action:n?n.action:""})),e.Deferred().resolve(o).promise())},_hasExpandedSubGroups:function(e){var t,n=!1,i=e.items?e.items.length:0;if(!e.hasSubgroups)return!1;for(t=0;t<i;t++)if(this._groupsState[e.items[t].uid]){n=!0;break}return n},_findGroupedRange:function(e,n,i,r,o){var a,s,l,d,c,u,p,f,h=this,m=e.length;for(p=0;p<m&&(a=e[p],!(i.taken>=i.take));p++)if(h._getGroupByUid(a.uid)||h._groupsFlat.push(a),h._groupsState[a.uid]){if(h._isServerGroupPaged()){if(a.hasSubgroups&&!a.subgroupCount)return h.getGroupSubGroupCount(a,i,r,o),h._fetchingGroupItems=!0,t;if(c=(a.subgroupCount||a.itemCount)+1,u=i.skip-i.skipped,d=!a.items||a.items.length-u<i.take-i.taken,!h._hasExpandedSubGroups(a)&&u>c){i.skipped+=c;continue}if(a.hasSubgroups&&(!a.items||d&&a.items.length<a.subgroupCount)||!a.hasSubgroups&&(!a.items||d&&a.items.length<a.itemCount))return h.getGroupItems(a,i,r,o),h._fetchingGroupItems=!0,t}if(i.includeParents&&i.skipped<i.skip?(i.skipped++,a.excludeHeader=!0):i.includeParents&&i.taken++,a.hasSubgroups&&a.items&&a.items.length)a.currentItems=[],r||(r=[]),r.push(a),h._findGroupedRange(a.items,a.currentItems,i,r,o),r.pop(),a.currentItems.length||i.taken>0?n.push(a):a.excludeHeader=!1;else{for(s=[],l=a.items.length,f=0;f<l;f++)if(i.skipped<i.skip)i.skipped++;else{if(i.taken>=i.take)break;s.push(a.items[f]),i.taken++}s.length||i.taken>0?(a.currentItems=s,n.push(a)):a.excludeHeader=!1}}else{if(i.skipped<i.skip){i.skipped++;continue}n.push(a),i.taken++}},getGroupItems:function(e,t,n,i){var r,o,a,s,l,d=this;e.items||(e.items=[]),r=e.items.length,o=d.take(),a=this._composeItemsFilter(e,n),s={page:$e.floor((r||0)/(o||1))||1,pageSize:o,skip:r,take:o,filter:a,aggregate:d._aggregate,sort:d._sort},l=d.findSubgroups(e),l&&l.length&&(s.group=l,s.groupPaging=!0),clearTimeout(d._timeout),d._timeout=setTimeout(function(){d._queueRequest(s,function(){d.trigger(Le,{type:"read"})?d._dequeueRequest():d.transport.read({data:s,success:d._groupItemsSuccessHandler(e,t.skip,d.take(),i),error:function(){var e=Ze.call(arguments);d.error.apply(d,e)}})})},100)},getGroupSubGroupCount:function(e,t,n,i){var r,o,a,s=this;e.items||(e.items=[]),r=this._composeItemsFilter(e,n),o=this._group.map(function(e){return e.field}).indexOf(e.field),a={filter:r,group:[s._group[o+1]],groupPaging:!0,includeSubGroupCount:!0},clearTimeout(s._timeout),s._timeout=setTimeout(function(){s._queueRequest(a,function(){s.trigger(Le,{type:"read"})?s._dequeueRequest():s.transport.read({data:a,success:s._subGroupCountSuccessHandler(e,t.skip,s.take(),i),error:function(){var e=Ze.call(arguments);s.error.apply(s,e)}})})},100)},_subGroupCountSuccessHandler:function(e,t,n,i){var r,o=this;return i=Se(i)?i:Ce,r=o.options.schema&&o.options.schema.total?o.options.schema.total:"Total",function(a){o._dequeueRequest(),o.trigger(Ue,{response:a,type:"read"}),o._fetchingGroupItems=!1,e.subgroupCount=Se(r)?r(a):a[r],o.range(t,n,i,"expandGroup")}},_groupItemsSuccessHandler:function(e,t,n,i){var r=this,o=r._timeStamp();return i=Se(i)?i:Ce,function(a){var s,l,d=ee.define(r.options.schema.model);for(r._dequeueRequest(),r.trigger(Ue,{response:a,type:"read"}),a=r.reader.parse(a),e.hasSubgroups?s=r.reader.groups(a):(s=r.reader.data(a),s=s.map(function(e){return new d(e)})),e.items.omitChangeEvent=!0,l=0;l<s.length;l++)e.items.push(s[l]);e.items.omitChangeEvent=!1,r._updateRangePristineData(e),r._fetchingGroupItems=!1,r._serverGroupsTotal+=s.length,r.range(t,n,i,"expandGroup"),(o>=r._currentRequestTimeStamp||!r._skipRequestsInProgress)&&r.trigger(Re,{})}},findSubgroups:function(e){var t=this._group.map(function(e){return e.field}).indexOf(e.field);return this._group.slice(t+1,this._group.length)},_composeItemsFilter:function(e,t){var n,i=this.filter()||{logic:"and",filters:[]};if(i=ge(!0,{},i),i.filters.push({field:e.field,operator:"eq",value:e.value}),t)for(n=0;n<t.length;n++)i.filters.push({field:t[n].field,operator:"eq",value:t[n].value});return i},_updateRangePristineData:function(e){var t,n,i,r,o,a,s,l=this,d=l._ranges,c=d.length;for(a=0;a<c;a++){for(i=d[a],r=i.data.length,o=[],s=0;s<r&&(n=i.data[s],o.push(s),!(n.uid===e.uid||n.hasSubgroups&&n.items.length&&l._containsSubGroup(n,e,o)));s++)o.pop();if(o.length){for(t=d[a].pristineData;o.length>1;)t=t[o.splice(0,1)[0]].items;t[o[0]]=l._cloneGroup(e);break}}},_containsSubGroup:function(e,t,n){var i,r,o=this,a=e.items.length;if(e.hasSubgroups&&a)for(r=0;r<a;r++){if(i=e.items[r],n.push(r),i.uid===t.uid)return!0;if(i.hasSubgroups&&i.items.length)return o._containsSubGroup(i,t,n);n.pop()}},_cloneGroup:function(e){var t=this;return e="function"==typeof e.toJSON?e.toJSON():e,e.items&&e.items.length&&(e.items=e.items.map(function(e){return t._cloneGroup(e)})),e},_setFilterTotal:function(e,n){var i=this;i.options.serverFiltering||(e!==t?i._total=e:n&&(i._total=i._data.length))},fetch:function(e){var t=this,n=function(n){n!==!0&&Se(e)&&e.call(t)};return this._query().done(n)},_query:function(e){var t=this;return t.query(ge({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var t=this,n=t.page(),i=t.total();if(e=e||{},n&&!(i&&n+1>t.totalPages()))return t._skip=t._currentRangeStart=n*t.take(),n+=1,e.page=n,t._query(e),n},prev:function(e){var t=this,n=t.page();if(e=e||{},n&&1!==n)return t._skip=t._currentRangeStart=t._skip-t.take(),n-=1,e.page=n,t._query(e),n},page:function(e){var n,i,r=this;return e!==t?(e=$e.max($e.min($e.max(e,1),r.totalPages()),1),i=r.take(),r._isGroupPaged()?(e-=1,r.range(e*i,i,null,"page"),t):(r._query(r._pageableQueryOptions({page:e})),t)):(n=r.skip(),n!==t?$e.round((n||0)/(r.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query(n._pageableQueryOptions({pageSize:e,page:1})),t):n.take()},sort:function(e){var n=this;return e!==t?(n.trigger("sort"),n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n.trigger("reset"),n._query({filter:e,page:1}),t)},group:function(e){var n=this,i={group:e};return n._groupPaging&&(i.page=1),e!==t?(n._query(i),t):n._group},getGroupsFlat:function(e){var t,n,i,r=[];for(t=0,n=e.length;t<n;t++)i=e[t],i.hasSubgroups&&(r=r.concat(this.getGroupsFlat(i.items))),r.push(i);return r},total:function(){return parseInt(this._total||0,10)},groupsTotal:function(e){var t=this;return t._group.length?t._isServerGrouped()?t._serverGroupsTotal?t._serverGroupsTotal:t._serverGroupsTotal=t.total():t._calculateGroupsTotal(t._ranges.length?t._ranges[0].data:[],e):t.total()},_calculateGroupsTotal:function(e,t,n,i){var r,o,a,s=this;if(n=n||"items",s._group.length&&e){for(r=0,o=e.length,a=0;a<o;a++)r+=s.groupCount(e[a],t,n,i);return s._groupsTotal=r,r}return s._groupsTotal=s._data.length},groupCount:function(e,t,n,i){var r=this,o=0;return e.hasSubgroups&&r._groupsState[e.uid]?((t&&!e.excludeHeader||i)&&(o+=1),e[n].forEach(function(e){o+=r.groupCount(e,t,n,i)})):r._groupsState[e.uid]?((t&&!e.excludeHeader||i)&&o++,o+=e[n]?e[n].length:0):o++,o},countGroupRange:function(e){var t,n=0,i=e.length;for(t=0;t<i;t++)n+=this.groupCount(e[t],!0);return n},aggregate:function(e){var n=this;return e!==t?(n._query({aggregate:e}),t):n._aggregate},aggregates:function(){var e=this._aggregateResult;return be(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,n,i={};if(!be(e))for(t={},ke(e)||(e=[e]),n=0;n<e.length;n++)t[e[n].aggregate]=0,i[e[n].field]=t;return i},_pageableQueryOptions:function(e){return e},_wrapInEmptyGroup:function(e){var t,n,i,r,o=this.group();for(i=o.length-1,r=0;i>=r;i--)n=o[i],t={value:e.get?e.get(n.field):e[n.field],field:n.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(n.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total(),n=e._isGroupPaged()?e.groupsTotal(!0):e.total();return $e.ceil((n||0)/t)},inRange:function(e,t){var n=this,i=$e.min(e+t,n.total());return!n.options.serverPaging&&n._data.length>0||n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return(new Date).getTime()},range:function(e,n,i,r){var o,a,s,l,d;return this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,o=this._isGroupPaged()?this.groupsTotal(!0):this.total(),"expandGroup"!==r&&"collapseGroup"!==r||this._updateOuterRangesLength(),e=$e.min(e||0,o),i=Se(i)?i:Ce,a=this,s=$e.max($e.floor(e/n),0)*n,l=$e.min(s+n,o),d=a._findRange(e,$e.min(e+n,o),i),!d.length&&0!==o||a._fetchingGroupItems?(a._isGroupPaged()&&(a._originalPageSkip=s,a._originalSize=l,s=$e.max($e.floor(a._adjustPageSkip(e,n)/n),0)*n,l=$e.min(s+n,o)),n===t||a._fetchingGroupItems||(a._isGroupPaged()&&!a._groupRangeExists(s,n)||!a._rangeExists(s,l)?a.prefetch(s,n,function(){e>s&&l<a.total()&&!a._rangeExists(l,$e.min(l+n,a.total()))?a.prefetch(l,n,function(){a.range(e,n,i)}):a.range(e,n,i)}):s<e&&a.prefetch(l,n,function(){a.range(e,n,i)})),t):(a._processRangeData(d,e,n,a._originalPageSkip||s,a._originalSize||l,{action:r}),a._originalPageSkip=null,a._originalSize=null,i(),t)},_findRange:function(e,n,i){var r,o,a,l,d,c,u,p,f,h,m,g,_,b,k=this,y=k._ranges,w=[],x=k.options,C=x.serverSorting||x.serverPaging||x.serverFiltering||x.serverGrouping||x.serverAggregates,T={take:n-e,skip:e,skipped:0,taken:0,includeParents:!0},S=k._isGroupPaged(),I=S?"outerStart":"start",D=S?"outerEnd":"end";for(o=0,m=y.length;o<m;o++){if(r=y[o],S){if(r.outerStart>=n)return[];if(e>r.outerEnd){T.skipped+=r.outerEnd-(g||0),g=r.outerEnd;continue}if(t!==g&&g!=r.outerStart&&(T.skipped+=r.outerStart-g),T.skipped>T.skip)return[];for(t===g&&e>0&&r.start>0&&(T.skipped=r.outerStart),a=o;;){if(this._findGroupedRange(r.data,w,T,null,i),_=k._calculateGroupsTotal(w,!0,"currentItems"),_>=T.take)return w;if(k._fetchingGroupItems)return[];if(a++,!y[a]||y[a].outerStart!==r.outerEnd)break;r=y[a]}}else if(e>=r[I]&&e<=r[D]){for(h=0,a=o;a<m;a++)if(r=y[a],f=k._flatData(r.data,!0),f.length&&e+h>=r.start&&(c=r.data,u=r.end,C||(x.inPlaceSort?p=k._queryProcess(r.data,{filter:k.filter()}):(b=v(k.group()||[]).concat(s(k.sort()||[])),p=k._queryProcess(r.data,{sort:b,filter:k.filter()})),f=c=p.data,p.total!==t&&(u=p.total)),l=0,e+h>r.start&&(l=e+h-r.start),d=f.length,u>n&&(d-=u-n),h+=d-l,w=k._mergeGroups(w,c,l,d),n<=r.end&&h==n-e))return w;break}g=r.outerEnd}return[]},_getRangesMismatch:function(e){for(var t,n=this,i=n._ranges,r=0,o=0;;){if(t=i[o],!t||t.outerStart>e)break;t.outerEnd!=t.end&&(r=t.outerEnd-t.end),o++}return r},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var r,o=t.toJSON();return e.length&&(r=e[e.length-1]),E(r,o,n,i),e.concat(o)}return e.concat(t.slice(n,i))},_processRangeData:function(e,n,i,r,o,a){var s,l,d,c,u=this;u._pending=t,u._skip=n>u.skip()&&!u._omitPrefetch?$e.min(o,(u.totalPages()-1)*u.take()):r,u._currentRangeStart=n,u._take=i,s=u.options.serverPaging,l=u.options.serverSorting,d=u.options.serverFiltering,c=u.options.serverAggregates;try{u.options.serverPaging=!0,u._isServerGrouped()||u.group()&&u.group().length||(u.options.serverSorting=!0),u.options.serverFiltering=!0,u.options.serverPaging=!0,u.options.serverAggregates=!0,s&&(u._detachObservableParents(),u._data=e=u._observe(e)),u._process(e,a)}finally{u.options.serverPaging=s,u.options.serverSorting=l,u.options.serverFiltering=d,u.options.serverAggregates=c}},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n,i){var r=this,o=r._timeStamp();return function(a){var s,l,d,c=!1,u={start:e,end:t,data:[],timestamp:r._timeStamp()};if(r._dequeueRequest(),r.trigger(Ue,{response:a,type:"read"}),a=r.reader.parse(a),d=r._readData(a),d.length){for(s=0,l=r._ranges.length;s<l;s++)if(r._ranges[s].start===e){c=!0,u=r._ranges[s],r._isGroupPaged()||(u.pristineData=d,u.data=r._observe(d),u.end=u.start+r._flatData(u.data,!0).length,r._sortRanges());break}c||r._addRange(r._observe(d),e)}r._total=r.reader.total(a),(i||o>=r._currentRequestTimeStamp||!r._skipRequestsInProgress)&&(n&&d.length?n():r.trigger(Re,{}))}},prefetch:function(e,n,i){var r=this,o=$e.min(e+n,r.total()),a={take:n,skip:e,page:e/n+1,pageSize:n,sort:r._sort,filter:r._filter,group:r._group,aggregate:r._aggregate};return r._isGroupPaged()&&!r._isServerGrouped()&&r._groupRangeExists(e,o)?(i&&i(),t):(r._isServerGroupPaged()&&!r._groupRangeExists(e,o)||!r._rangeExists(e,o)?(clearTimeout(r._timeout),r._timeout=setTimeout(function(){r._queueRequest(a,function(){r.trigger(Le,{type:"read"})?r._dequeueRequest():(r._omitPrefetch&&r.trigger(Ve),r.transport.read({data:r._params(a),success:r._prefetchSuccessHandler(e,o,i),error:function(){var e=Ze.call(arguments);r.error.apply(r,e)}}))})},100)):i&&i(),t)},_multiplePrefetch:function(e,t,n){var i=this,r=$e.min(e+t,i.total()),o={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,r)?n&&n():i.trigger(Le,{type:"read"})||i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n,!0)})},_adjustPageSkip:function(e,t){var n,i,r=this,o=r._getPrevRange(e),a=r.total();if(o){if(i=r._getRangesMismatch(e),!i)return e;e-=i}if(n=$e.max($e.floor(e/t),0)*t,n>a)for(;;)if(n-=t,n<a)break;return n},_getNextRange:function(e){var t,n,i=this,r=i._ranges;for(t=0,n=r.length;t<n;t++)if(r[t].start<=e&&r[t].end>=e)return r[t]},_getPrevRange:function(e){var t,n,i=this,r=i._ranges,o=r.length;for(t=o-1;t>=0;t--)if(r[t].outerStart<=e){n=r[t];break}return n},_rangeExists:function(e,t){var n,i,r=this,o=r._ranges;for(n=0,i=o.length;n<i;n++)if(o[n].start<=e&&o[n].end>=t)return!0;return!1},_groupRangeExists:function(e,t){var n,i,r,o=this,a=o._ranges,s=0,l=o.groupsTotal(!0);for(t>l&&!o._isServerGrouped()&&(t=l),n=0,i=a.length;n<i;n++)r=a[n],r.outerStart<=e&&r.outerEnd>=e?s+=r.outerEnd-e:r.outerStart<=t&&r.outerEnd>=t&&(s+=t-r.outerStart);return s>=t-e},_getCurrentRangeSpan:function(){var e,t,n=this,i=n._ranges,r=n.currentRangeStart(),o=r+(n.take()||0),a=[],s=i.length;for(t=0;t<s;t++)e=i[t],(e.start<=r&&e.end>=r||e.start>=r&&e.start<=o)&&a.push(e);return a},_removeModelFromRanges:function(e){var t,n,i,r=this;for(n=0,i=this._ranges.length;n<i;n++)t=this._ranges[n],r._removeModelFromRange(t,e);r._updateRangesLength()},_removeModelFromRange:function(e,t){this._eachItem(e.data,function(e){var n,i;if(e)for(n=0;n<e.length;n++)if(i=e[n],i.uid&&i.uid==t.uid){[].splice.call(e,n,1);break}})},_insertModelInRange:function(e,t){var n,i,r=this,o=r._ranges||[],a=o.length;for(i=0;i<a;i++)if(n=o[i],n.start<=e&&n.end>=e){r._getByUid(t.uid,n.data)||(r._isServerGrouped()?n.data.splice(e,0,r._wrapInEmptyGroup(t)):n.data.splice(e,0,t));break}r._updateRangesLength()},_updateRangesLength:function(){var e,t,n,i=this,r=i._ranges||[],o=r.length,a=!1,s=0,l=0;for(n=0;n<o;n++)t=r[n],e=i._isGroupPaged()?t.data.length:i._flatData(t.data,!0).length,l=e-$e.abs(t.end-t.start),a||0===l?a&&(t.start+=s,t.end+=s):(a=!0,s=l,t.end+=s)},_updateOuterRangesLength:function(){var e,t,n,i,r=this,o=r._ranges||[],a=o.length,s=0;for(t=0;t<a;t++)e=o[t],i=r._isGroupPaged()?r._calculateGroupsTotal(e.data,!0,"items",!0):r._flatData(e.data,!0).length,n?(n.end!=e.start&&(s=e.start-n.end),e.outerStart=n.outerEnd+s,s=0):e.outerStart=e.start,e.outerEnd=e.outerStart+i,n=e}}),ue={},ue.create=function(t,n,i){var r,o=t.transport?e.extend({},t.transport):null;return o?(o.read=typeof o.read===Fe?{url:o.read}:o.read,"jsdo"===t.type&&(o.dataSource=i),t.type&&(Te.data.transports=Te.data.transports||{},Te.data.schemas=Te.data.schemas||{},Te.data.transports[t.type]?_e(Te.data.transports[t.type])?o=ge(!0,{},Te.data.transports[t.type],o):r=new Te.data.transports[t.type](ge(o,{data:n})):Te.logToConsole("Unknown DataSource transport type '"+t.type+"'.\nVerify that registration scripts for this type are included after Kendo UI on the page.","warn"),t.schema=ge(!0,{},Te.data.schemas[t.type],t.schema)),r||(r=Se(o.read)?o:new se(o))):r=new ae({data:t.data||[]}),r},ce.create=function(e){(ke(e)||e instanceof ot)&&(e={data:e});var n,i,r,o=e||{},a=o.data,s=o.fields,l=o.table,d=o.select,c={};if(a||!s||o.transport||(l?a=G(l,s):d&&(a=q(d,s),o.group===t&&a[0]&&a[0].optgroup!==t&&(o.group="optgroup"))),Te.data.Model&&s&&(!o.schema||!o.schema.model)){for(n=0,i=s.length;n<i;n++)r=s[n],r.type&&(c[r.field]=r);be(c)||(o.schema=ge(!0,o.schema,{model:{fields:c}}))}return o.data=a,d=null,o.select=null,l=null,o.table=null,o instanceof ce?o:new ce(o)},pe=ee.define({idField:"id",init:function(e){var t,n=this,i=n.hasChildren||e&&e.hasChildren,r="items",o={};Te.data.Model.fn.init.call(n,e),typeof n.children===Fe&&(r=n.children),
|
9
|
-
o={schema:{data:r,model:{hasChildren:i,id:n.idField,fields:n.fields}}},typeof n.children!==Fe&&ge(o,n.children),o.data=e,i||(i=o.schema.data),typeof i===Fe&&(i=Te.getter(i)),Se(i)&&(t=i.call(n,n),n.hasChildren=(!t||0!==t.length)&&!!t),n._childrenOptions=o,n.hasChildren&&n._initChildren(),n._loaded=!(!e||!e._loaded)},_initChildren:function(){var e,t,n,i=this;i.children instanceof fe||(e=i.children=new fe(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e,t){return e[i.idField||"id"]=i.id,n&&(e=n.call(i,e,t)),e},e.parent=function(){return i},e.bind(Re,function(e){e.node=e.node||i,i.trigger(Re,e)}),e.bind(Be,function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(Be,e))}),i._updateChildrenField())},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},_updateChildrenField:function(){var e=this._childrenOptions.schema.data;this[e||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var n,i,r={},o="_query";return this.hasChildren?(this._initChildren(),n=this.children,r[this.idField||"id"]=this.id,this._loaded||(n._data=t,o="read"),n.one(Re,ve(this._childrenLoaded,this)),this._matchFilter&&(r.filter={field:"_matchFilter",operator:"eq",value:!0}),i=n[o](r)):this.loaded(!0),i||e.Deferred().resolve().promise()},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return ee.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),fe=ce.extend({init:function(e){var t=pe.define({children:e});e.filter&&!e.serverFiltering&&(this._hierarchicalFilter=e.filter,e.filter=null),ce.fn.init.call(this,ge(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(Be,function(t){e.trigger(Be,t)})},read:function(e){var t=ce.fn.read.call(this,e);return this._hierarchicalFilter&&(this._data&&this._data.length>0?this.filter(this._hierarchicalFilter):(this.options.filter=this._hierarchicalFilter,this._filter=c(this.options.filter),this._hierarchicalFilter=null)),t},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=ce.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:$("success"),data:$("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),ce.fn.insert.call(this,e,t)},filter:function(e){return e===t?this._filter:(!this.options.serverFiltering&&this._markHierarchicalQuery(e)&&(e={logic:"or",filters:[e,{field:"_matchFilter",operator:"equals",value:!0}]}),this.trigger("reset"),this._query({filter:e,page:1}),t)},_markHierarchicalQuery:function(t){var n,i,r,o,s,l=this.options.accentFoldingFiltering;return t=l?e.extend({},c(t),{accentFoldingFiltering:l}):c(t),t&&0!==t.filters.length?(n=a.filterExpr(t),r=n.fields,o=n.operators,i=s=Function("d, __f, __o","return "+n.expression),(r.length||o.length)&&(s=function(e){return i(e,r,o)}),this._updateHierarchicalFilter(s),!0):(this._updateHierarchicalFilter(function(){return!0}),!1)},_updateHierarchicalFilter:function(e){var t,n,i=this._data,r=!1;for(n=0;n<i.length;n++)t=i[n],t.hasChildren?(t._matchFilter=t.children._updateHierarchicalFilter(e),t._matchFilter||(t._matchFilter=e(t))):t._matchFilter=e(t),t._matchFilter&&(r=!0);return r},_find:function(e,t){var n,i,r,o,a=this._data;if(a){if(r=ce.fn[e].call(this,t))return r;for(a=this._flatData(this._data),n=0,i=a.length;n<i;n++)if(o=a[n].children,o instanceof fe&&(r=o[e](t)))return r}},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),fe.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data,i=t.fields,r=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||r&&(n=K(r,i)),t.data=n,t instanceof fe?t:new fe(t))},he=Te.Observable.extend({init:function(e,t,n){Te.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=e,this.prefetch=!n;var i=this;e.bind("change",function(){i._change()}),e.bind("reset",function(){i._reset()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(e){this.viewSize=e,this._recalculate()},at:function(e){var n=this.pageSize,i=!0;return e>=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((e<this.dataOffset||e>=this.skip+n)&&(i=this.range(Math.floor(e/n)*n)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange,!0):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&this.range(this.offset===this.skip?this.previousMidRange:this.previousFullRange),i?this.dataSource.at(e-this.dataOffset):(this.trigger("endreached",{index:e}),null)):t:this.dataSource.view()[e]},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize+t,i=$e.max($e.floor(n/t),0)*t;this.offset=n,this.dataSource.prefetch(i,t,function(){e._goToRange(n,!0)})},range:function(e,t){if(this.offset===e)return!0;var n=this,i=this.pageSize,r=$e.max($e.floor(e/i),0)*i,o=this.dataSource;return t&&(r+=i),o.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(o.prefetch(r,i,function(){n.offset=e,n._recalculate(),n._goToRange(e,!0)}),!1)},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})}))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var e=this.dataSource;this.length=this.useRanges?e.lastRange().end:e.view().length,this._syncPending&&(this._syncWithDataSource(),this._recalculate(),this._syncPending=!1,this.trigger("reset",{offset:this.offset})),this.trigger("resize"),this._expanding&&this.trigger("expand"),delete this._expanding},_syncWithDataSource:function(){var e=this.dataSource;this._firstItemUid=e.firstItemUid(),this.dataOffset=this.offset=e.skip()||0,this.pageSize=e.pageSize(),this.useRanges=e.options.serverPaging},_recalculate:function(){var e=this.pageSize,t=this.offset,n=this.viewSize,i=Math.ceil(t/e)*e;this.skip=i,this.midPageThreshold=i+e-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(e/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),me=Te.Observable.extend({init:function(e,t){var n=this;Te.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new he(e,3*t),this.buffer.bind({endreached:function(e){n.trigger("endreached",{index:e.index})},prefetching:function(e){n.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){n.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){n._total=0,n.trigger("reset")},resize:function(){n._total=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var t,n,i=this.buffer,r=e*this.batchSize,o=this.batchSize,a=[];for(i.offset>r&&i.at(i.offset-1),n=0;n<o&&(t=i.at(r+n),null!==t);n++)a.push(t);return a},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),ge(!0,Te.data,{readers:{json:de},Query:a,DataSource:ce,HierarchicalDataSource:fe,Node:pe,Comparer:te,ObservableObject:X,ObservableArray:ot,LazyObservableArray:Q,LocalTransport:ae,RemoteTransport:se,Cache:le,DataReader:de,Model:ee,Buffer:he,BatchBuffer:me})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.popup.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t,n){return!(!t||!n)&&(t===n||e.contains(t,n))}var i,r,o,a,s=window.kendo,l=s.ui,d=l.Widget,c=s.Class,u=s.support,p=s.getOffset,f=s._outerWidth,h=s._outerHeight,m="open",g="close",v="deactivate",_="activate",b="center",k="left",y="right",w="top",x="bottom",C="absolute",T="hidden",S="body",I="location",D="position",F="visible",E="effects",A="k-state-active",z="k-state-border",N=/k-state-border-(\w+)/,P=".k-picker-wrap, .k-dropdown-wrap, .k-link",H="down",R=e(document.documentElement),O=e.proxy,M=e(window),B="scroll",L=u.transitions.css,V=L+"transform",U=e.extend,W=".kendoPopup",j=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],q=d.extend({init:function(t,n){var i,r=this;n=n||{},n.isRtl&&(n.origin=n.origin||x+" "+y,n.position=n.position||w+" "+y),d.fn.init.call(r,t,n),t=r.element,n=r.options,r.collisions=n.collision?n.collision.split(" "):[],r.downEvent=s.applyEventMap(H,s.guid()),1===r.collisions.length&&r.collisions.push(r.collisions[0]),i=e(r.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),n.appendTo=e(e(n.appendTo)[0]||i[0]||document.body),r.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!n.isRtl).css({position:C}).appendTo(n.appendTo).attr("aria-hidden",!0).on("mouseenter"+W,function(){r._hovered=!0}).on("wheel"+W,function(t){var n=e(t.target).find(".k-list"),i=n.parent();n.length&&n.is(":visible")&&(0===i.scrollTop()&&t.originalEvent.deltaY<0||i.scrollTop()===i.prop("scrollHeight")-i.prop("offsetHeight")&&t.originalEvent.deltaY>0)&&t.preventDefault()}).on("mouseleave"+W,function(){r._hovered=!1}),r.wrapper=e(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),U(n.animation.open,{complete:function(){r.wrapper.css({overflow:F}),r._activated=!0,r._trigger(_)}}),U(n.animation.close,{complete:function(){r._animationClose()}}),r._mousedownProxy=function(e){r._mousedown(e)},r._resizeProxy=u.mobileOS.android?function(e){setTimeout(function(){r._resize(e)},600)}:function(e){r._resize(e)},n.toggleTarget&&e(n.toggleTarget).on(n.toggleEvent+W,e.proxy(r.toggle,r))},events:[m,_,g,v],options:{name:"Popup",toggleEvent:"click",origin:x+" "+k,position:w+" "+k,anchor:S,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var e=this,t=e.wrapper.data(I);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=S&&e._hideDirClass(),e._closing=!1,e._trigger(v)},destroy:function(){var t,n=this,i=n.options,r=n.element.off(W);d.fn.destroy.call(n),i.toggleTarget&&e(i.toggleTarget).off(W),i.modal||(R.off(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),s.destroy(n.element.children()),r.removeData(),i.appendTo[0]===document.body&&(t=r.parent(".k-animation-container"),t[0]?t.remove():r.remove())},open:function(n,i){var r,o,a=this,l={isFixed:!isNaN(parseInt(i,10)),x:n,y:i},d=a.element,c=a.options,p=e(c.anchor),f=d[0]&&d.hasClass("km-widget");if(!a.visible()){if(c.copyAnchorStyles&&(f&&"font-size"==j[0]&&j.shift(),d.css(s.getComputedStyles(p[0],j))),d.data("animating")||a._trigger(m))return;a._activated=!1,c.modal||(R.off(a.downEvent,a._mousedownProxy).on(a.downEvent,a._mousedownProxy),a._toggleResize(!1),a._toggleResize(!0)),a.wrapper=o=s.wrap(d,c.autosize).css({overflow:T,display:"block",position:C}).attr("aria-hidden",!1),u.mobileOS.android&&o.css(V,"translatez(0)"),o.css(D),e(c.appendTo)[0]==document.body&&o.css(w,"-10000px"),a.flipped=a._position(l),r=a._openAnimation(),c.anchor!=S&&a._showDirClass(r),d.is(":visible")||d.data("olddisplay")!==t||(d.show(),d.data("olddisplay",d.css("display")),d.hide()),d.data(E,r.effects).kendoStop(!0).kendoAnimate(r).attr("aria-hidden",!1)}},_location:function(t){var n,i,r=this,o=r.element,a=r.options,l=e(a.anchor),d=o[0]&&o.hasClass("km-widget");return a.copyAnchorStyles&&(d&&"font-size"==j[0]&&j.shift(),o.css(s.getComputedStyles(l[0],j))),r.wrapper=n=s.wrap(o,a.autosize).css({overflow:T,display:"block",position:C}),u.mobileOS.android&&n.css(V,"translatez(0)"),n.css(D),e(a.appendTo)[0]==document.body&&n.css(w,"-10000px"),r._position(t||{}),i=n.offset(),{width:s._outerWidth(n),height:s._outerHeight(n),left:i.left,top:i.top}},_openAnimation:function(){var e=U(!0,{},this.options.animation.open);return e.effects=s.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),n=((t.attr("class")||"").match(N)||["","down"])[1],i=z+"-"+n;t.removeClass(i).children(P).removeClass(A).removeClass(i),this.element.removeClass(z+"-"+s.directions[n].reverse)},_showDirClass:function(t){var n=t.effects.slideIn?t.effects.slideIn.direction:"down",i=z+"-"+n;e(this.options.anchor).addClass(i).children(P).addClass(A).addClass(i),this.element.addClass(z+"-"+s.directions[n].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?g:m]()},visible:function(){return this.element.is(":"+F)},close:function(n){var i,r,o,a,l=this,d=l.options;if(l.visible()){if(i=l.wrapper[0]?l.wrapper:s.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(g))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),i=t.data("kendoPopup");i&&i.close(n)}),R.off(l.downEvent,l._mousedownProxy),n?r={hide:!0,effects:{}}:(r=U(!0,{},d.animation.close),o=l.element.data(E),a=r.effects,!a&&!s.size(a)&&o&&s.size(o)&&(r.effects=o,r.reverse=!0),l._closing=!0),l.element.kendoStop(!0).attr("aria-hidden",!0),i.css({overflow:T}).attr("aria-hidden",!0),l.element.kendoAnimate(r),n&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;u.resize.indexOf(e.type)!==-1?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position(),t._resizeTimeout=null},50)):(!t._hovered||t._activated&&t.element.hasClass("k-list-container"))&&t.close()},_toggleResize:function(e){var t=e?"on":"off",n=u.resize;u.mobileOS.ios||u.mobileOS.android||u.browser.safari||(n+=" "+B),e&&!this.scrollableParents&&(this.scrollableParents=this._scrollableParents()),this.scrollableParents&&this.scrollableParents.length&&this.scrollableParents[t](B,this._resizeProxy),M[t](n,this._resizeProxy)},_mousedown:function(t){var i=this,r=i.element[0],o=i.options,a=e(o.anchor)[0],l=o.toggleTarget,d=s.eventTarget(t),c=e(d).closest(".k-popup"),u=c.parent().parent(".km-shim").length;c=c[0],!u&&c&&c!==i.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(n(r,d)||n(a,d)||l&&n(e(l)[0],d)||i.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i,r,o,a){var s=0;return a=a||t,o!==r&&o!==b&&r!==b&&(e+a>i&&(s+=-(n+t)),e+s<0&&(s+=n+t)),s},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return s.isScrollable(t)})},_position:function(t){var n,i,r,o,a,l,d,c,m,g,v,_,b,k,y,w,x,T=this,S=T.element,F=T.wrapper,E=T.options,A=e(E.viewport),z=u.zoomLevel(),N=!!(A[0]==window&&window.innerWidth&&z<=1.02),P=e(E.anchor),H=E.origin.toLowerCase().split(" "),R=E.position.toLowerCase().split(" "),O=T.collisions,M=10002,B=0,L=document.documentElement;if(a=E.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:A.offset(),N?(l=window.innerWidth,d=window.innerHeight):(l=A.width(),d=A.height()),N&&L.scrollHeight-L.clientHeight>0&&(c=E.isRtl?-1:1,l-=c*s.support.scrollbar()),n=P.parents().filter(F.siblings()),n[0])if(r=Math.max(+n.css("zIndex"),0))M=r+10;else for(i=P.parentsUntil(n),o=i.length;B<o;B++)r=+e(i[B]).css("zIndex"),r&&M<r&&(M=r+10);return F.css("zIndex",M),F.css(t&&t.isFixed?{left:t.x,top:t.y}:T._align(H,R)),m=p(F,D,P[0]===F.offsetParent()[0]),g=p(F),v=P.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),v.length&&(m=p(F,D,!0),g=p(F)),g.top-=a.top,g.left-=a.left,T.wrapper.data(I)||F.data(I,U({},m)),_=U({},g),b=U({},m),k=E.adjustSize,"fit"===O[0]&&(b.top+=T._fit(_.top,h(F)+k.height,d/z)),"fit"===O[1]&&(b.left+=T._fit(_.left,f(F)+k.width,l/z)),y=U({},b),w=h(S),x=h(F),!F.height()&&w&&(x+=w),"flip"===O[0]&&(b.top+=T._flip(_.top,w,h(P),d/z,H[0],R[0],x)),"flip"===O[1]&&(b.left+=T._flip(_.left,f(S),f(P),l/z,H[1],R[1],f(F))),S.css(D,C),F.css(b),b.left!=y.left||b.top!=y.top},_align:function(t,n){var i,r=this,o=r.wrapper,a=e(r.options.anchor),s=t[0],l=t[1],d=n[0],c=n[1],u=p(a),m=e(r.options.appendTo),g=f(o),v=h(o)||h(o.children().first()),_=f(a),k=h(a),w=u.top,C=u.left,T=Math.round;return m[0]!=document.body&&(i=p(m),w-=i.top,C-=i.left),s===x&&(w+=k),s===b&&(w+=T(k/2)),d===x&&(w-=v),d===b&&(w-=T(v/2)),l===y&&(C+=_),l===b&&(C+=T(_/2)),c===y&&(C-=g),c===b&&(C-=T(g/2)),{top:w,left:C}}});l.plugin(q),i=s.support.stableSort,r="kendoTabKeyTrap",o="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]",a=c.extend({init:function(t){this.element=e(t),this.element.autoApplyNS(r)},trap:function(){this.element.on("keydown",O(this._keepInTrap,this))},removeTrap:function(){this.element.kendoDestroy(r)},destroy:function(){this.element.kendoDestroy(r),this.element=t},shouldTrap:function(){return!0},_keepInTrap:function(e){var t,n,i;9===e.which&&this.shouldTrap()&&!e.isDefaultPrevented()&&(t=this._focusableElements(),n=this._sortFocusableElements(t),i=this._nextFocusable(e,n),this._focus(i),e.preventDefault())},_focusableElements:function(){var t=this.element.find(o).filter(function(t,n){return n.tabIndex>=0&&e(n).is(":visible")&&!e(n).is("[disabled]")});return this.element.is("[tabindex]")&&t.push(this.element[0]),t},_sortFocusableElements:function(e){var t,n;return i?t=e.sort(function(e,t){return e.tabIndex-t.tabIndex}):(n="__k_index",e.each(function(e,t){t.setAttribute(n,e)}),t=e.sort(function(e,t){return e.tabIndex===t.tabIndex?parseInt(e.getAttribute(n),10)-parseInt(t.getAttribute(n),10):e.tabIndex-t.tabIndex}),e.removeAttr(n)),t},_nextFocusable:function(e,t){var n=t.length,i=t.index(e.target);return t.get((i+(e.shiftKey?-1:1))%n)},_focus:function(e){return"IFRAME"==e.nodeName?(e.contentWindow.document.body.focus(),t):(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length),t)},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}}),l.Popup.TabKeyTrap=a}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.list.min",["kendo.data.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e,n){return e!==t&&""!==e&&null!==e&&("boolean"===n?("boolean"!=typeof e&&(e="true"===(""+e).toLowerCase()),e=!!e):"number"===n?e=+e:"string"===n&&(e=""+e)),e}function i(e){return e[e.length-1]}function r(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function o(e,t){var n,i,r,o,a=t.length,s=e.length,l=[],d=[];if(s)for(r=0;r<s;r++){for(n=e[r],i=!1,o=0;o<a;o++)if(n===t[o]){i=!0,l.push({index:r,item:n});break}i||d.push(n)}return{changed:l,unchanged:d}}function a(t){return!(!t||e.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function s(t,n){var i,r=!1;return t.filters&&(i=e.grep(t.filters,function(e){return r=s(e,n),e.filters?e.filters.length:e.field!=n}),r||t.filters.length===i.length||(r=!0),t.filters=i),r}var l,d,c=window.kendo,u=c.ui,p=c._outerHeight,f=/^\d+(\.\d+)?%$/i,h=u.Widget,m=c.keys,g=c.support,v=c.htmlEncode,_=c._activeElement,b=c._outerWidth,k=c.data.ObservableArray,y="id",w="change",x="k-state-focused",C="k-state-hover",T="k-i-loading",S=".k-group-header",I=".k-item",D="_label",F="open",E="close",A="cascade",z="select",N="selected",P="requestStart",H="requestEnd",R="blur",O="focus",M="focusout",B=e.extend,L=e.proxy,V=e.isArray,U=g.browser,W="k-hidden",j="width",q=U.msie,G=q&&U.version<9,$=/"/g,K={ComboBox:["DropDownList","MultiColumnComboBox"],DropDownList:["ComboBox","MultiColumnComboBox"],MultiColumnComboBox:["ComboBox","DropDownList"]},Y=c.ui.DataBoundWidget.extend({init:function(t,n){var i,r=this,o=r.ns;h.fn.init.call(r,t,n),t=r.element,n=r.options,r._isSelect=t.is(z),r._isSelect&&r.element[0].length&&(n.dataSource||(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value")),r.ul=e('<ul unselectable="on" class="k-list k-reset"/>').attr({tabIndex:-1,"aria-hidden":!0}),r.list=e("<div class='k-list-container'/>").append(r.ul).on("mousedown"+o,L(r._listMousedown,r)),i=t.attr(y),i||(i=c.guid()),r.list.attr(y,i+"-list"),r.ul.attr(y,i+"_listbox"),n.columns&&n.columns.length&&(r.ul.removeClass("k-list").addClass("k-grid-list"),r._columnsHeader()),r._header(),r._noData(),r._footer(),r._accessors(),r._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:!0,messages:{noData:"No data found.",clear:"clear"}},setOptions:function(e){h.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),e.columns&&e.columns.length&&this._columnsHeader(),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData()},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_header:function(){var n,i=this,r=e(i.header),o=i.options.headerTemplate;return this._angularElement(r,"cleanup"),c.destroy(r),r.remove(),o?(n="function"!=typeof o?c.template(o):o,r=e(n({})),i.header=r[0]?r:null,i.list.prepend(r),this._angularElement(i.header,"compile"),t):(i.header=null,t)},_columnsHeader:function(){var t,n,i,r,o,a,s,l,d,u,p,h=this,m=e(h.columnsHeader);for(this._angularElement(m,"cleanup"),c.destroy(m),m.remove(),t="<div class='k-grid-header'><div class='k-grid-header-wrap'><table role='presentation'>",n="<colgroup>",i="<tr>",r=0;r<this.options.columns.length;r++)o=this.options.columns[r],a=o.title||o.field||"",s=o.headerTemplate||a,l="function"!=typeof s?c.template(s):s,d=o.width,u=parseInt(d,10),p="",d&&!isNaN(u)&&(p+="style='width:",p+=u,p+=f.test(d)?"%":"px",p+=";'"),n+="<col "+p+"/>",i+="<th class='k-header'>",i+=l(o),i+="</th>";n+="</colgroup>",i+="</tr>",t+=n,t+=i,t+="</table></div></div>",h.columnsHeader=m=e(t),h.list.prepend(m),this._angularElement(h.columnsHeader,"compile")},_noData:function(){var n=this,i=e(n.noData),r=n.options.noDataTemplate===!0?n.options.messages.noData:n.options.noDataTemplate;return n.angular("cleanup",function(){return{elements:i}}),c.destroy(i),i.remove(),r?(n.noData=e('<div class="k-nodata" style="display:none"><div></div></div>').appendTo(n.list),n.noDataTemplate="function"!=typeof r?c.template(r):r,t):(n.noData=null,t)},_footer:function(){var n=this,i=e(n.footer),r=n.options.footerTemplate;return this._angularElement(i,"cleanup"),c.destroy(i),i.remove(),r?(n.footer=e('<div class="k-footer"></div>').appendTo(n.list),n.footerTemplate="function"!=typeof r?c.template(r):r,t):(n.footer=null,t)},_listOptions:function(t){var n=this,i=n.options,r=i.virtual,o={change:L(n._listChange,n)},a=L(n._listBound,n);return r="object"==typeof r?r:{},t=e.extend({autoBind:!1,selectable:!0,dataSource:n.dataSource,click:L(n._click,n),activate:L(n._activateItem,n),columns:i.columns,deactivate:L(n._deactivateItem,n),dataBinding:function(){n.trigger("dataBinding")},dataBound:a,height:i.height,dataValueField:i.dataValueField,dataTextField:i.dataTextField,groupTemplate:i.groupTemplate,fixedGroupTemplate:i.fixedGroupTemplate,template:i.template},t,r,o),t.template||(t.template="#:"+c.expr(t.dataTextField,"data")+"#"),i.$angular&&(t.$angular=i.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:L(e._listChange,e)});e.listView=e.options.virtual?new c.ui.VirtualList(e.ul,t):new c.ui.StaticList(e.ul,t),e.listView.bind("listBound",L(e._listBound,e)),e._setListValue()},_setListValue:function(e){e=e||this.options.value,e!==t&&this.listView.value(e).done(L(this._updateSelectionState,this))},_updateSelectionState:e.noop,_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_hideClear:function(){var e=this;e._clear&&e._clear.addClass(W)},_showClear:function(){this._clear&&this._clear.removeClass(W)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isSelect&&(this._customOption=t),this._isFilterEnabled()&&!this.options.enforceMinLength&&(this._filter({word:"",open:!1}),this.options.highlightFirst&&this.listView.focus(0)),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(t,n){var i,r,o=this,l=o.options,d=l.filterFields&&t&&t.logic&&t.filters&&t.filters.length,c=o.dataSource,u=B({},c.filter()||{}),p=t||u.filters&&u.filters.length&&!t,f=s(u,l.dataTextField);return this._clearFilterExpressions(u),(t||f)&&o.trigger("filtering",{filter:t})?e.Deferred().reject().promise():(i={filters:[],logic:"and"},d?i.filters.push(t):this._pushFilterExpression(i,t),a(u)&&(i.logic===u.logic?i.filters=i.filters.concat(u.filters):i.filters.push(u)),o._cascading&&this.listView.setDSFilter(i),r=B({},{page:p?1:c.page(),pageSize:p?c.options.pageSize:c.pageSize(),sort:c.sort(),filter:c.filter(),group:c.group(),aggregate:c.aggregate()},{filter:i}),c[n?"read":"query"](c._mergeState(r)))},_pushFilterExpression:function(e,t){a(t)&&""!==t.value&&e.filters.push(t)},_clearFilterExpressions:function(e){var t,n;if(e.filters){for(n=0;n<e.filters.length;n++)"fromFilter"in e.filters[n]&&(t=n);isNaN(t)||e.filters.splice(t,1)}},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_renderNoData:function(){var e=this,t=e.noData;t&&(this._angularElement(t,"cleanup"),t.children(":first").html(e.noDataTemplate({instance:e})),this._angularElement(t,"compile"))},_toggleNoData:function(t){e(this.noData).toggle(t)},_toggleHeader:function(e){var t=this.listView.content.prev(S);t.toggle(e)},_renderFooter:function(){var e=this,t=e.footer;t&&(this._angularElement(t,"cleanup"),t.html(e.footerTemplate({instance:e})),this._angularElement(t,"compile"))},_allowOpening:function(){return this.options.noDataTemplate||this.dataSource.flatView().length},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},_focus:function(e){return this.listView.focus(e)},_filter:function(e){var t,n,i=this,r=i.options,o=e.word,a=r.filterFields,s=r.dataTextField;if(a&&a.length)for(t={logic:"or",filters:[],fromFilter:!0},n=0;n<a.length;n++)this._pushFilterExpression(t,i._buildExpression(o,a[n]));else t=i._buildExpression(o,s);i._open=e.open,i._filterSource(t)},_buildExpression:function(e,t){var n=this,i=n.options,r=i.ignoreCase,o=n.dataSource.options.accentFoldingFiltering;return{value:r?o?e.toLocaleLowerCase(o):e.toLowerCase():e,field:t,operator:i.filter,ignoreCase:r}},_clearButton:function(){var t=this,n=t.options.messages.clear;t._clear||(t._clear=e('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="'+n+'"></span>').attr({role:"button",tabIndex:-1})),t.options.clearButton||t._clear.remove(),this._hideClear()},search:function(e){var t=this.options;e="string"==typeof e?e:this._inputValue(),clearTimeout(this._typingTimeout),(!t.enforceMinLength&&!e.length||e.length>=t.minLength)&&(this._state="filter",this.listView&&(this.listView._emptySearch=!c.trim(e).length),this._isFilterEnabled()?this._filter({word:e,open:!0}):this._searchByWord(e))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;h.fn.destroy.call(e),e._unbindDataSource(),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(n){var i=this;if(n===t)return i.listView.selectedDataItems()[0];if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=e(i.items()).index(n)}return i.dataSource.flatView()[n]},_activateItem:function(){var e=this.listView.focus();e&&this._focused.add(this.filterInput).attr("aria-activedescendant",e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr("aria-activedescendant")},_accessors:function(){var e=this,t=e.element,n=e.options,i=c.getter,r=t.attr(c.attr("text-field")),o=t.attr(c.attr("value-field"));!n.dataTextField&&r&&(n.dataTextField=r),!n.dataValueField&&o&&(n.dataValueField=o),e._text=i(n.dataTextField),e._value=i(n.dataValueField)},_aria:function(e){var n=this,i=n.options,r=n._focused.add(n.filterInput);i.suggest!==t&&r.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,r.attr("aria-owns",e),n.ul.attr("aria-live",n._isFilterEnabled()?"polite":"off"),n._ariaLabel()},_ariaLabel:function(){var t,n=this,i=n._focused,r=n.element,o=r.attr("id"),a=e('label[for="'+o+'"]'),s=r.attr("aria-label"),l=r.attr("aria-labelledby");i!==r&&(s?i.attr("aria-label",s):l?i.attr("aria-labelledby",l):a.length&&(t=a.attr("id")||n._generateLabelId(a,o||c.guid()),i.attr("aria-labelledby",t)))},_generateLabelId:function(e,t){var n=t+D;return e.attr("id",n),n},_blur:function(){var e=this;e._change(),e.close(),e._userTriggered=!1},_isValueChanged:function(e){return e!==n(this._old,typeof e)},_change:function(){var e,i=this,r=i.selectedIndex,o=i.options.value,a=i.value();i._isSelect&&!i.listView.bound()&&o&&(a=o),i._isValueChanged(a)?e=!0:i._valueBeforeCascade!==t&&i._valueBeforeCascade!==n(i._old,typeof i._valueBeforeCascade)&&i._userTriggered?e=!0:r===t||r===i._oldIndex||i.listView.isFiltered()||(e=!0),e&&(i._valueBeforeCascade=i._old=null===i._old||""===i._old||""===a?a:i.dataItem()?i.options.dataValueField?i.dataItem()[i.options.dataValueField]:i.dataItem():null,i._oldIndex=r,i._typing||i.element.trigger(w),i.trigger(w)),i.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var n=this._value(e);return n===t&&(n=this._text(e)),n},_offsetHeight:function(){var t=0,n=this.listView.content.prevAll(":visible");return n.each(function(){var n=e(this);t+=p(n,!0)}),t},_height:function(n){var i,r,o,a=this,s=a.list,l=a.options.height,d=a.popup.visible();if(n||a.options.noDataTemplate){if(r=s.add(s.parent(".k-animation-container")).show(),!s.is(":visible"))return r.hide(),t;l=a.listView.content[0].scrollHeight>l?l:"auto",r.height(l),"auto"!==l&&(i=a._offsetHeight(),o=p(e(a.footer))||0,l=l-i-o),a.listView.content.height(l),d||r.hide()}return l},_openHandler:function(e){this._adjustListWidth(),this.trigger(F)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_adjustListWidth:function(){var e,t,n=this,i=n.list,r=i[0].style.width,o=n.wrapper;if(i.data(j)||!r)return e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=parseFloat(e&&e.width)||b(o),e&&U.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),r="border-box"!==i.css("box-sizing")?t-(b(i)-i.width()):t,
|
10
|
-
i.css({fontFamily:o.css("font-family"),width:n.options.autoWidth?"auto":r,minWidth:r,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(j,r),!0},_closeHandler:function(e){this.trigger(E)?e.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var e=this.listView,n=!e.focus(),r=i(e.select());r===t&&this.options.highlightFirst&&n&&(r=0),r!==t?e.focus(r):n&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first:first"),n=this.listView.content.prev(S),i=0,r="right";n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=c.support.scrollbar()),this.element.parents(".k-rtl").length&&(r="left"),i+=parseFloat(t.css("border-"+r+"-width"),10)+parseFloat(t.children(".k-group").css("padding-"+r),10),n.css("padding-"+r,i))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t),this._calculateColumnsHeaderPadding(t)},_calculateColumnsHeaderPadding:function(e){var t,n,i;this.options.columns&&this.options.columns.length&&(t=this,n=g.isRtl(t.wrapper),i=c.support.scrollbar(),t.columnsHeader.css(n?"padding-left":"padding-right","auto"!==e?i:0))},_refreshScroll:function(){var e=this.listView,t=e.element.height()>e.content.height();this.options.autoWidth&&e.content.css({overflowX:"hidden",overflowY:t?"scroll":"auto"})},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):(this.popup.one("open",function(e){return L(function(){this._calculatePopupHeight(e)},this)}.call(this,e)),this.popup.one("activate",L(this._refreshScroll,this))))},_popup:function(){var e=this;e.popup=new u.Popup(e.list,B({},e.options.popup,{anchor:e.wrapper,open:L(e._openHandler,e),close:L(e._closeHandler,e),animation:e.options.animation,isRtl:g.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_makeUnselectable:function(){G&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(C,"mouseenter"===t.type)},_toggle:function(e,n){var i=this,r=g.mobileOS&&(g.touch||g.MSPointers||g.pointers);e=e!==t?e:!i.popup.visible(),n||r||i._focused[0]===_()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[e?F:E]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===n(e._cascadedValue,typeof e.value())||(e._cascadedValue=e.value(),e._cascadeTriggered=!0,e.trigger(A,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(w)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(P,e._requestStartHandler).unbind(H,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){var n=(e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t);if(n&&e.virtual&&"function"!=typeof e.virtual.valueMapper)throw Error("ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function")}});B(Y,{inArray:function(e,t){var n,i,r=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=r.length;n<i;n++)if(e===r[n])return n;return-1},unifyType:n}),c.ui.List=Y,u.Select=Y.extend({init:function(e,t){Y.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){var t,n=this;n.options.dataSource=e,n._dataSource(),n.listView.bound()&&(n._initialIndex=null,n.listView._current=null),n.listView.setDataSource(n.dataSource),n.options.autoBind&&n.dataSource.fetch(),t=n._parentWidget(),t&&n._cascadeSelect(t)},close:function(){this.popup.close()},select:function(e){var n=this;return e===t?n.selectedIndex:n._select(e).done(function(){n._cascadeValue=n._old=n._accessor(),n._oldIndex=n.selectedIndex})},_accessor:function(e,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](e,t)},_accessorInput:function(e){var n=this.element[0];return e===t?n.value:(null===e&&(e=""),n.value=e,t)},_accessorSelect:function(e,n){var i,o=this.element[0];return e===t?r(o).value||"":(r(o).selected=!1,n===t&&(n=-1),i=null!==e&&""!==e,i&&n==-1?this._custom(e):e?o.value=e:o.selectedIndex=n,t)},_syncValueAndText:function(){return!0},_custom:function(t){var n=this,i=n.element,r=n._customOption;r||(r=e("<option/>"),n._customOption=r,i.append(r)),r.text(t),r[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(T),e._focused.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(e){var t=this;e.isDefaultPrevented()||(t._request=!0,t._busy||(t._busy=setTimeout(function(){t._arrowIcon&&(t._focused.attr("aria-busy",!0),t._arrowIcon.addClass(T),t._hideClear())},100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,n=this,i=n.element,r=n.options,o=r.dataSource||{};o=e.isArray(o)?{data:o}:o,n._isSelect&&(t=i[0].selectedIndex,t>-1&&(r.index=t),o.select=i,o.fields=[{field:r.dataTextField},{field:r.dataValueField}]),n.dataSource?n._unbindDataSource():(n._requestStartHandler=L(n._showBusy,n),n._requestEndHandler=L(n._requestEnd,n),n._errorHandler=L(n._hideBusy,n)),n.dataSource=c.data.DataSource.create(o).bind(P,n._requestStartHandler).bind(H,n._requestEndHandler).bind("error",n._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){return this.listView.focusNext()},_prevItem:function(){return this.listView.focusPrev()},_getNormalizedDataItem:function(e){var t,n=this,i=n.listView,r="number"==typeof e,o=n.optionLabel&&n.optionLabel.length;return t=r?o?--e:e:i.getElementIndex(e),i.dataItemByIndex(t)},_getNormalizedSelectCandidate:function(e){var t=this,n=t.optionLabel&&t.optionLabel.length,i="number"==typeof e,r=e;return n&&i&&r++,r},_move:function(e){var t,n,i,r,o,a,s,l,d,c=this,u=c.listView,p=e.keyCode,f=p===m.DOWN,h=c.options.virtual;if(p===m.UP||f){if(e.altKey)c.toggle(f);else{if(!u.bound()&&!c.ul[0].firstChild)return c._fetch||(c.dataSource.one(w,function(){c._fetch=!1,c._move(e)}),c._fetch=!0,c._filterSource()),e.preventDefault(),!0;i=c._focus(),c._fetch||i&&!i.hasClass("k-state-selected")||(f?(r=c._nextItem(),(h&&r<=0||!c._focus()&&!r)&&c._lastItem()):(r=c._prevItem(),(h&&r>=u.dataSource.total()-1||!c._focus()&&!r)&&c._firstItem())),o=c._getNormalizedSelectCandidate(c._get(c._focus())||r||0),c._select(o,!0).done(function(){var e=function(){c.popup.visible()||c._blur(),c._cascadedValue=null===c._cascadedValue?c.value():c.dataItem()?c.dataItem()[c.options.dataValueField]||c.dataItem():null};c.trigger(z,{dataItem:c._getNormalizedDataItem(o),item:c._focus()})?c._select(i).done(e):e()})}e.preventDefault(),n=!0}else if(p===m.ENTER||p===m.TAB){if(c.popup.visible()&&e.preventDefault(),i=c._focus(),t=c.dataItem(),c.popup.visible()||t&&c.text()===c._text(t)||(i=null),a=c.filterInput&&c.filterInput[0]===_(),i){if(t=u.dataItemByIndex(u.getElementIndex(i)),l=!0,t&&(l=c._value(t)!==Y.unifyType(c.value(),typeof c._value(t))),l&&c.trigger(z,{dataItem:t,item:i}))return;s=c._select(i)}else c.input&&((c._syncValueAndText()||c._isSelect)&&c._accessor(c.input.val()),c.listView.value(c.input.val()));c._focusElement&&c._focusElement(c.wrapper),a&&p===m.TAB?c.wrapper.focusout():s&&"function"==typeof s.done?s.done(function(){c._blur()}):c._blur(),c.close(),n=!0}else p===m.ESC?(c.popup.visible()&&e.preventDefault(),c.close(),n=!0):!c.popup.visible()||p!==m.PAGEDOWN&&p!==m.PAGEUP||(e.preventDefault(),d=p===m.PAGEDOWN?1:-1,u.scrollWith(d*u.screenHeight()),n=!0);return n},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;e._request||e.options.cascadeFrom||e.listView.bound()||e._fetch||t||(e._fetch=!0,e.dataSource.fetch().done(function(){e._fetch=!1}))},_options:function(e,n,i){var o,a,s,l,d=this,c=d.element,u=c[0],p=e.length,f="",h=0;for(n&&(f=n);h<p;h++)o="<option",a=e[h],s=d._text(a),l=d._value(a),l!==t&&(l+="",l.indexOf('"')!==-1&&(l=l.replace($,""")),o+=' value="'+l+'"'),o+=">",s!==t&&(o+=v(s)),o+="</option>",f+=o;c.html(f),i!==t&&(u.value=i,u.value&&!i&&(u.selectedIndex=-1)),u.selectedIndex!==-1&&(o=r(u),o&&o.setAttribute(N,N))},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=r.on("reset",t._resetHandler))},_parentWidget:function(){var t,n,i,r=this.options.name;if(this.options.cascadeFrom){if(t=e("#"+this.options.cascadeFrom),n=t.data("kendo"+r),!n)for(i=0;i<K[r].length&&!(n=t.data("kendo"+K[r][i]));i+=1);return n}},_cascade:function(){var e,t=this,n=t.options,i=n.cascadeFrom;if(i){if(e=t._parentWidget(),!e)return;t._cascadeHandlerProxy=L(t._cascadeHandler,t),t._cascadeFilterRequests=[],n.autoBind=!1,e.bind("set",function(){t.one("set",function(e){t._selectedValue=e.value||t._accessor()})}),e.first(A,t._cascadeHandlerProxy),e.listView.bound()?(t._toggleCascadeOnFocus(),t._cascadeSelect(e)):(e.one("dataBound",function(){t._toggleCascadeOnFocus(),e.popup.visible()&&e._focused.focus()}),e.value()||t.enable(!1))}},_toggleCascadeOnFocus:function(){var e=this,t=e._parentWidget(),n=q&&t instanceof u.DropDownList?R:M;t._focused.add(t.filterInput).bind(O,function(){t.unbind(A,e._cascadeHandlerProxy),t.first(w,e._cascadeHandlerProxy)}),t._focused.add(t.filterInput).bind(n,function(){t.unbind(w,e._cascadeHandlerProxy),t.first(A,e._cascadeHandlerProxy)})},_cascadeHandler:function(e){var t=this._parentWidget(),n=this.value();this._userTriggered=e.userTriggered||t._userTriggered,this.listView.bound()&&this._clearSelection(t,!0),this._cascadeSelect(t,n)},_cascadeChange:function(e){var t=this,i=t._accessor()||t._selectedValue;t._cascadeFilterRequests.length||(t._selectedValue=null),t._userTriggered?t._clearSelection(e,!0):i?(i!==n(t.listView.value()[0],typeof i)&&t.value(i),t.dataSource.view()[0]&&t.selectedIndex!==-1||t._clearSelection(e,!0)):t.dataSource.flatView().length&&t.select(t.options.index),t.enable(),t._triggerCascade(),t._triggerChange(),t._userTriggered=!1},_cascadeSelect:function(e,n){var i,r,o=this,a=e.dataItem(),l=a?a[o.options.cascadeFromParentField]||e._value(a):null,d=o.options.cascadeFromField||e.options.dataValueField;o._valueBeforeCascade=n!==t?n:o.value(),l||0===l?(i=o.dataSource.filter()||{},s(i,d),r=function(){var t=o._cascadeFilterRequests.shift();t&&o.unbind("dataBound",t),t=o._cascadeFilterRequests[0],t&&o.first("dataBound",t),o._cascadeChange(e)},o._cascadeFilterRequests.push(r),1===o._cascadeFilterRequests.length&&o.first("dataBound",r),o._cascading=!0,o._filterSource({field:d,operator:"eq",value:l}),o._cascading=!1):(o.enable(!1),o._clearSelection(e),o._triggerCascade(),o._triggerChange(),o._userTriggered=!1)}}),l=".StaticList",d=c.ui.DataBoundWidget.extend({init:function(t,n){h.fn.init.call(this,t,n),this.element.attr("role","listbox").on("click"+l,"li",L(this._click,this)).on("mouseenter"+l,"li",function(){e(this).addClass(C)}).on("mouseleave"+l,"li",function(){e(this).removeClass(C)}),g.touch&&this._touchHandlers(),"multiple"===this.options.selectable&&this.element.attr("aria-multiselectable",!0),this.content=this.element.wrap("<div class='k-list-scroller' unselectable='on'></div>").parent(),this.header=this.content.before('<div class="k-group-header" style="display:none"></div>').prev(),this.bound(!1),this._optionID=c.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var i=this.options.value;i&&(this._values=e.isArray(i)?i.slice(0):[i]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=L(function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout(function(){e._renderHeader()},50)},this)},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null},events:["click",w,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var n,i=this,r=t||{};r=e.isArray(r)?{data:r}:r,r=c.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(w,i._refreshHandler),n=i.value(),i.value([]),i.bound(!1),i.value(n)):i._refreshHandler=L(i.refresh,i),i.setDSFilter(r.filter()),i.dataSource=r.bind(w,i._refreshHandler),i._fixedHeader()},_touchHandlers:function(){var t,n,i=this,r=function(e){return(e.originalEvent||e).changedTouches[0].pageY};i.element.on("touchstart"+l,function(e){t=r(e)}),i.element.on("touchend"+l,function(o){o.isDefaultPrevented()||(n=r(o),Math.abs(n-t)<10&&(i._touchTriggered=!0,i._triggerClick(e(o.target).closest(I).get(0))))})},skip:function(){return this.dataSource.skip()},setOptions:function(e){h.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(l),this._refreshHandler&&this.dataSource.unbind(w,this._refreshHandler),clearTimeout(this._scrollId),h.fn.destroy.call(this)},dataItemByIndex:function(e){return this.dataSource.flatView()[e]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,o=t.clientHeight,a=n+i;r>n?r=n:a>r+o&&(r=a-o),t.scrollTop=r}},selectedDataItems:function(e){return e===t?this._dataItems.slice():(this._dataItems=e,this._values=this._getValues(e),t)},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},focusNext:function(){var e=this.focus();e=e?e.next():0,this.focus(e)},focusPrev:function(){var e=this.focus();e=e?e.prev():this.element[0].children.length-1,this.focus(e)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(i(this.element[0].children))},focus:function(n){var r,o=this,a=o._optionID;return n===t?o._current:(n=i(o._get(n)),n=e(this.element[0].children[n]),o._current&&(o._current.removeClass(x).removeAttr(y),o.trigger("deactivate")),r=!!n[0],r&&(n.addClass(x),o.scroll(n),n.attr("id",a)),o._current=r?n:null,o.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var r,o,a,s=this,l=s.options.selectable,d="multiple"!==l&&l!==!1,c=s._selectedIndices,u=[this.element.find(".k-state-selected").index()],p=[],f=[];return n===t?c.slice():(n=s._get(n),1===n.length&&n[0]===-1&&(n=[]),o=e.Deferred().resolve(),a=s.isFiltered(),a&&!d&&s._deselectFiltered(n)?o:d&&!a&&e.inArray(i(n),c)!==-1&&e.inArray(i(n),u)!==-1?(s._dataItems.length&&s._view.length&&(s._dataItems=[s._view[c[0]].item]),o):(r=s._deselect(n),f=r.removed,n=r.indices,n.length&&(d&&(n=[i(n)]),p=s._select(n)),(p.length||f.length)&&(s._valueComparer=null,s.trigger(w,{added:p,removed:f})),o))},removeAt:function(e){return this._selectedIndices.splice(e,1),this._values.splice(e,1),this._valueComparer=null,{position:e,dataItem:this._dataItems.splice(e,1)[0]}},setValue:function(t){t=e.isArray(t)||t instanceof k?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(n){var i,r=this,o=r._valueDeferred;return n===t?r._values.slice():(r.setValue(n),o&&"resolved"!==o.state()||(r._valueDeferred=o=e.Deferred()),r.bound()&&(i=r._valueIndices(r._values),"multiple"===r.options.selectable&&r.select(-1),r.select(i),o.resolve()),r._skipUpdate=!1,o)},items:function(){return this.element.children(I)},_click:function(e){return this._touchTriggered?(this._touchTriggered=!1,t):(e.isDefaultPrevented()||this._triggerClick(e.currentTarget),t)},_triggerClick:function(t){this.trigger("click",{item:e(t)})||this.select(t)},_valueExpr:function(e,t){var i,r,o=this,a=0,s=[];if(!o._valueComparer||o._valueType!==e){for(o._valueType=e;a<t.length;a++)s.push(n(t[a],e));i="for (var idx = 0; idx < "+s.length+"; idx++) { if (current === values[idx]) { return idx; }} return -1;",r=Function("current","values",i),o._valueComparer=function(e){return r(e,s)}}return o._valueComparer},_dataItemPosition:function(e,t){var n=this._valueGetter(e),i=this._valueExpr(typeof n,t);return i(n)},_getter:function(){this._valueGetter=c.getter(this.options.dataValueField)},_deselect:function(t){var n,i,r,o,a,s=this,l=s.element[0].children,d=s.options.selectable,c=s._selectedIndices,u=s._dataItems,p=s._values,f=[],h=0,m=0;if(t=t.slice(),d!==!0&&t.length){if("multiple"===d)for(;h<t.length;h++)if(i=t[h],e(l[i]).hasClass("k-state-selected"))for(n=0;n<c.length;n++)if(r=c[n],r===i){e(l[r]).removeClass("k-state-selected").attr("aria-selected",!1),o=this._view[i].item,a=this._dataItemPosition(o,this._values),f.push({position:a,dataItem:o}),u.splice(n,1),c.splice(n,1),t.splice(h,1),p.splice(n,1),m+=1,h-=1,n-=1;break}}else{for(;h<c.length;h++)e(l[c[h]]).removeClass("k-state-selected").attr("aria-selected",!1),f.push({position:h,dataItem:u[h]});s._values=[],s._dataItems=[],s._selectedIndices=[]}return{indices:t,removed:f}},_deselectFiltered:function(t){for(var n,i,r,o=this.element[0].children,a=[],s=0;s<t.length;s++)i=t[s],n=this._view[i].item,r=this._dataItemPosition(n,this._values),r>-1&&(a.push(this.removeAt(r)),e(o[i]).removeClass("k-state-selected"));return!!a.length&&(this.trigger(w,{added:[],removed:a}),!0)},_select:function(t){var n,r,o=this,a=o.element[0].children,s=o._view,l=[],d=0;for(i(t)!==-1&&o.focus(t);d<t.length;d++)r=t[d],n=s[r],r!==-1&&n&&(n=n.item,o._selectedIndices.push(r),o._dataItems.push(n),o._values.push(o._valueGetter(n)),e(a[r]).addClass("k-state-selected").attr("aria-selected",!0),l.push({dataItem:n}));return l},getElementIndex:function(t){return e(t).data("offset-index")},_get:function(e){return"number"==typeof e?e=[e]:V(e)||(e=this.getElementIndex(e),e=[e!==t?e:-1]),e},_template:function(){var e=this,t=e.options,n=t.template;return n?(n=c.template(n),n=function(e){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+n(e)+"</li>"}):n=c.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+c.expr(t.dataTextField,"data")+"}</li>",{useWithBlock:!1}),n},_templates:function(){var e,t,n,i,r,o=this.options,a={template:o.template,groupTemplate:o.groupTemplate,fixedGroupTemplate:o.fixedGroupTemplate};if(o.columns)for(t=0;t<o.columns.length;t++)n=o.columns[t],i=n.field?""+n.field:"text",a["column"+t]=n.template||"#: "+i+"#";for(r in a)e=a[r],e&&"function"!=typeof e&&(a[r]=c.template(e));this.templates=a},_normalizeIndices:function(e){for(var n=[],i=0;i<e.length;i++)e[i]!==t&&n.push(e[i]);return n},_valueIndices:function(e,t){var n,i=this._view,r=0;if(t=t?t.slice():[],!e.length)return[];for(;r<i.length;r++)n=this._dataItemPosition(i[r].item,e),n!==-1&&(t[n]=r);return this._normalizeIndices(t)},_firstVisibleItem:function(){for(var t=this.element[0],n=this.content[0],i=n.scrollTop,r=e(t.children[0]).height(),o=Math.floor(i/r)||0,a=t.children[o]||t.lastChild,s=a.offsetTop<i;a;)if(s){if(a.offsetTop+r>i||!a.nextSibling)break;a=a.nextSibling}else{if(a.offsetTop<=i||!a.previousSibling)break;a=a.previousSibling}return this._view[e(a).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e,t=this.templates.fixedGroupTemplate;t&&(e=this._firstVisibleItem(),e&&(""+e.group).length&&this.header.html(t(e.group)))},_renderItem:function(e){var t='<li tabindex="-1" role="option" unselectable="on" class="k-item',n=e.item,i=0!==e.index,r=e.selected,o=this.isGrouped(),a=this.options.columns&&this.options.columns.length;return i&&e.newGroup&&(t+=" k-first"),e.isLastGroupedItem&&a&&(t+=" k-last"),r&&(t+=" k-state-selected"),t+='" aria-selected="'+(r?"true":"false")+'" data-offset-index="'+e.index+'">',t+=a?this._renderColumns(n):this.templates.template(n),i&&e.newGroup?t+=a?'<div class="k-cell k-group-cell"><span>'+this.templates.groupTemplate(e.group)+"</span></div>":'<div class="k-group">'+this.templates.groupTemplate(e.group)+"</div>":o&&a&&(t+="<div class='k-cell k-spacer-cell'></div>"),t+"</li>"},_renderColumns:function(e){var t,n,i,r,o="";for(t=0;t<this.options.columns.length;t++)n=this.options.columns[t].width,i=parseInt(n,10),r="",n&&!isNaN(i)&&(r+="style='width:",r+=i,r+=f.test(n)?"%":"px",r+=";'"),o+="<span class='k-cell' "+r+">",o+=this.templates["column"+t](e),o+="</span>";return o},_render:function(){var e,t,n,i,r="",o=0,a=0,s=[],l=this.dataSource.view(),d=this.value(),c=this.isGrouped();if(c)for(o=0;o<l.length;o++)for(t=l[o],n=!0,i=0;i<t.items.length;i++)e={selected:this._selected(t.items[i],d),item:t.items[i],group:t.value,newGroup:n,isLastGroupedItem:i===t.items.length-1,index:a},s[a]=e,a+=1,r+=this._renderItem(e),n=!1;else for(o=0;o<l.length;o++)e={selected:this._selected(l[o],d),item:l[o],index:o},s[o]=e,r+=this._renderItem(e);this._view=s,this.element[0].innerHTML=r,c&&s.length&&this._renderHeader()},_selected:function(e,t){var n=!this.isFiltered()||"multiple"===this.options.selectable;return n&&this._dataItemPosition(e,t)!==-1},setDSFilter:function(e){this._lastDSFilter=B({},e)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!c.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},refresh:function(e){var t,n=this,i=e&&e.action,r=n.options.skipUpdateOnBind,a="itemchange"===i;n.trigger("dataBinding"),n._angularItems("cleanup"),n._fixedHeader(),n._render(),n.bound(!0),a||"remove"===i?(t=o(n._dataItems,e.items),t.changed.length&&(a?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged)))):n.isFiltered()||n._skipUpdate||n._emptySearch?(n.focus(0),n._skipUpdate&&(n._skipUpdate=!1,n._selectedIndices=n._valueIndices(n._values,n._selectedIndices))):r||i&&"add"!==i||n.value(n._values),n._valueDeferred&&n._valueDeferred.resolve(),n._angularItems("compile"),n.trigger("dataBound")},bound:function(e){return e===t?this._bound:(this._bound=e,t)},isGrouped:function(){return(this.dataSource.group()||[]).length}}),u.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.fx.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function r(e){var t,n=[];for(t in e)n.push(t);return n}function o(e){for(var t in e)U.indexOf(t)!=-1&&W.indexOf(t)==-1&&delete e[t];return e}function a(e,t){var n,i,r,o,a=[],s={};for(i in t)n=i.toLowerCase(),o=A&&U.indexOf(n)!=-1,!F.hasHW3D&&o&&W.indexOf(n)==-1?delete t[i]:(r=t[i],o?a.push(i+"("+r+")"):s[i]=r);return a.length&&(s[se]=a.join(" ")),s}function s(e,t){var i,r,o;return A?(i=e.css(se),i==Y?"scale"==t?1:0:(r=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),o=0,r?o=n(r[1]):(r=i.match(R)||[0,0,0,0,0],t=t.toLowerCase(),M.test(t)?o=parseFloat(r[3]/r[2]):"translatey"==t?o=parseFloat(r[4]/r[2]):"scale"==t?o=parseFloat(r[2]):"rotate"==t&&(o=parseFloat(Math.atan2(r[2],r[1])))),o)):parseFloat(e.css(t))}function l(e){return e.charAt(0).toUpperCase()+e.substring(1)}function d(e,t){var n=h.extend(t),i=n.prototype.directions;T[l(e)]=n,T.Element.prototype[e]=function(e,t,i,r){return new n(this.element,e,t,i,r)},S(i,function(t,i){T.Element.prototype[e+l(i)]=function(e,t,r){return new n(this.element,i,e,t,r)}})}function c(e,n,i,r){d(e,{directions:g,startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return this._shouldHide},prepare:function(e,o){var a,s,l=this,d="out"===this._direction,c=l.element.data(n),u=!(isNaN(c)||c==i);a=u?c:t!==this._startValue?this._startValue:d?i:r,s=t!==this._endValue?this._endValue:d?r:i,this._reverse?(e[n]=s,o[n]=a):(e[n]=a,o[n]=s),l._shouldHide=o[n]===r}})}function u(e,t){var n=C.directions[t].vertical,i=e[n?J:X]()/2+"px";return _[t].replace("$size",i)}var p,f,h,m,g,v,_,b,k,y,w,x,C=window.kendo,T=C.effects,S=e.each,I=e.extend,D=e.proxy,F=C.support,E=F.browser,A=F.transforms,z=F.transitions,N={scale:0,scalex:0,scaley:0,scale3d:0},P={translate:0,translatex:0,translatey:0,translate3d:0},H=t!==document.documentElement.style.zoom&&!A,R=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,O=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,M=/translatex?$/i,B=/(zoom|fade|expand)(\w+)/,L=/(zoom|fade|expand)/,V=/[xy]$/i,U=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],W=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],j={rotate:"deg",scale:"",skew:"px",translate:"px"},q=A.css,G=Math.round,$="",K="px",Y="none",Q="auto",X="width",J="height",Z="hidden",ee="origin",te="abortId",ne="overflow",ie="translate",re="position",oe="completeCallback",ae=q+"transition",se=q+"transform",le=q+"backface-visibility",de=q+"perspective",ce="1500px",ue="perspective("+ce+")",pe={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};C.directions=pe,I(e.fn,{kendoStop:function(e,t){return z?T.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),A&&!z&&(S(W,function(n,i){e.fn[i]=function(n){if(t===n)return s(this,i);var r=e(this)[0],o=i+"("+n+j[i.replace(V,"")]+")";return r.style.cssText.indexOf(se)==-1?e(this).css(se,o):r.style.cssText=r.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),o),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),p=e.fx.prototype.cur,e.fx.prototype.cur=function(){return W.indexOf(this.prop)!=-1?parseFloat(e(this.elem)[this.prop]()):p.apply(this,arguments)}),C.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),z&&(n=I({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(ae,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(ae,"").css(J)},n.duration)),S(t,function(t,n){e.toggleClass(n,i)})),e},C.parseEffects=function(e,t){var n={};return"string"==typeof e?S(e.split(" "),function(e,i){var r=!L.test(i),o=i.replace(B,function(e,t,n){return t+":"+n.toLowerCase()}),a=o.split(":"),s=a[1],l={};a.length>1&&(l.direction=t&&r?pe[s].reverse:s),n[a[0]]=l}):S(e,function(e){var i=this.direction;i&&t&&!L.test(e)&&(this.direction=pe[i].reverse),n[e]=this}),n},z&&I(T,{transition:function(t,n,i){var o,s,l,d,c=0,u=t.data("keys")||[];i=I({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,s&&(clearTimeout(s),s=null),t.removeData(te).dequeue().css(ae,"").css(ae),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,o=a(t,n),e.merge(u,r(o)),e.hasOwnProperty("uniqueSort")?t.data("keys",e.uniqueSort(u)).height():t.data("keys",e.unique(u)).height(),t.css(ae,i.exclusive+" "+i.duration+"ms "+i.ease).css(ae),t.css(o).css(se),z.event&&(t.one(z.event,d),0!==i.duration&&(c=500)),s=setTimeout(d,i.duration+c),t.data(te,s),t.data(oe,d)},stopQueue:function(e,t,n){var i,r=e.data("keys"),o=!n&&r,a=e.data(oe);return o&&(i=C.getComputedStyles(e[0],r)),a&&a(),o&&e.css(i),e.removeData("keys").stop(t)}}),f=C.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,r,s,l,d,c,u=this,p=t.length,f=u.element,h=u.options,m=e.Deferred(),g={},v={};for(u.effects=t,m.done(e.proxy(u,"complete")),f.data("animating",!0),i=0;i<p;i++)for(n=t[i],n.setReverse(h.reverse),n.setOptions(h),u.addRestoreProperties(n.restore),n.prepare(g,v),l=n.children(),r=0,d=l.length;r<d;r++)l[r].duration(h.duration).run();for(c in h.effects)I(v,h.effects[c].properties);for(f.is(":visible")||I(g,{display:f.data("olddisplay")||"block"}),A&&!h.reset&&(s=f.data("targetTransform"),s&&(g=I(s,g))),g=a(f,g),A&&!z&&(g=o(g)),f.css(g).css(se),i=0;i<p;i++)t[i].setup();return h.init&&h.init(),f.data("targetTransform",v),T.animate(f,v,I({},h,{complete:m.resolve})),m.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,r=e.length;i<r;i++)t=e[i],this.restore.push(t),n.data(t)||n.data(t,n.css(t))},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;e<t;e++)n=this.restore[e],i.css(n,i.data(n))},complete:function(){var t=this,n=0,i=t.element,r=t.options,o=t.effects,a=o.length;for(i.removeData("animating").dequeue(),r.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),H&&!A&&setTimeout(e.proxy(this,"restoreCallback"),0);n<a;n++)o[n].teardown();r.completeCallback&&r.completeCallback(i)}}),T.promise=function(e,t){var n,i,r,o=[],a=new f(e,t),s=C.parseEffects(t.effects);t.effects=s;for(r in s)n=T[l(r)],n&&(i=new n(e,s[r].direction),o.push(i));o[0]?a.run(o):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),a.complete())},I(T,{animate:function(n,r,a){var s=a.transition!==!1;delete a.transition,z&&"transition"in T&&s?T.transition(n,r,a):A?n.animate(o(r),{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete}):n.each(function(){var n=e(this),o={};S(U,function(e,a){var s,l,d,c,u,p,f,h=r?r[a]+" ":null;h&&(l=r,a in N&&r[a]!==t?(s=h.match(O),A&&I(l,{scale:+s[0]})):a in P&&r[a]!==t&&(d=n.css(re),c="absolute"==d||"fixed"==d,n.data(ie)||(c?n.data(ie,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(ie,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),u=n.data(ie),s=h.match(O),s&&(p=a==ie+"y"?0:+s[1],f=a==ie+"y"?+s[1]:+s[2],c?(isNaN(u.right)?isNaN(p)||I(l,{left:u.left+p}):isNaN(p)||I(l,{right:u.right-p}),isNaN(u.bottom)?isNaN(f)||I(l,{top:u.top+f}):isNaN(f)||I(l,{bottom:u.bottom-f})):(isNaN(p)||I(l,{marginLeft:u.left+p}),isNaN(f)||I(l,{marginTop:u.top+f})))),!A&&"scale"!=a&&a in l&&delete l[a],l&&I(o,l))}),E.msie&&delete o.scale,n.animate(o,{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete})})}}),T.animatedPromise=T.promise,h=C.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new f(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,r=i.element,s=0,l=i.restore,d=l.length,c=e.Deferred(),u={},p={},f=i.children(),h=f.length;for(c.done(e.proxy(i,"_complete")),r.data("animating",!0),s=0;s<d;s++)t=l[s],r.data(t)||r.data(t,r.css(t));for(s=0;s<h;s++)f[s].duration(i._duration).run();return i.prepare(u,p),r.is(":visible")||I(u,{display:r.data("olddisplay")||"block"}),A&&(n=r.data("targetTransform"),n&&(u=I(n,u))),u=a(r,u),A&&!z&&(u=o(u)),r.css(u).css(se),i.setup(),r.data("targetTransform",p),T.animate(r,p,{duration:i._duration,complete:c.resolve}),c.promise()},stop:function(){var t=0,n=this.children(),i=n.length;for(t=0;t<i;t++)n[t].stop();return e(this.element).kendoStop(!0,!0),this},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;e<t;e++)n=this.restore[e],i.css(n,i.data(n))},_complete:function(){var t=this,n=t.element;n.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&n.data("olddisplay",n.css("display")).hide(),
|
11
|
-
H&&!A&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){I(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),m=["left","right","up","down"],g=["in","out"],d("slideIn",{directions:m,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var n,i=this,r=i.element,o=C._outerWidth,a=C._outerHeight,s=pe[i._direction],l=-s.modifier*(s.vertical?a(r):o(r)),d=l/(i.options&&i.options.divisor||1)+K,c="0px";i._reverse&&(n=e,e=t,t=n),A?(e[s.transition]=d,t[s.transition]=c):(e[s.property]=d,t[s.property]=c)}}),d("tile",{directions:m,init:function(e,t,n){h.prototype.init.call(this,e,t),this.options={previous:n}},previousDivisor:function(e){return this.options.previousDivisor=e,this},children:function(){var e=this,t=e._reverse,n=e.options.previous,i=e.options.previousDivisor||1,r=e._direction,o=[C.fx(e.element).slideIn(r).setReverse(t)];return n&&o.push(C.fx(n).slideIn(pe[r].reverse).divisor(i).setReverse(!t)),o}}),c("fade","opacity",1,0),c("zoom","scale",1,.01),d("slideMargin",{prepare:function(e,t){var n,i=this,r=i.element,o=i.options,a=r.data(ee),s=o.offset,l=i._reverse;l||null!==a||r.data(ee,parseFloat(r.css("margin-"+o.axis))),n=r.data(ee)||0,t["margin-"+o.axis]=l?n:n+s}}),d("slideTo",{prepare:function(e,t){var n=this,i=n.element,r=n.options,o=r.offset.split(","),a=n._reverse;A?(t.translatex=a?0:o[0],t.translatey=a?0:o[1]):(t.left=a?0:o[0],t.top=a?0:o[1]),i.css("left")}}),d("expand",{directions:["horizontal","vertical"],restore:[ne],prepare:function(e,n){var i=this,r=i.element,o=i.options,a=i._reverse,s="vertical"===i._direction?J:X,l=r[0].style[s],d=r.data(s),c=parseFloat(d||l),u=G(r.css(s,Q)[s]());e.overflow=Z,c=o&&o.reset?u||c:c||u,n[s]=(a?0:c)+K,e[s]=(a?c:0)+K,d===t&&r.data(s,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?J:X,i=t.data(n);i!=Q&&i!==$||setTimeout(function(){t.css(n,Q).css(n)},0)}}),v={position:"absolute",marginLeft:0,marginTop:0,scale:1},d("transfer",{init:function(e,t){this.element=e,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(e,t){var n=this,i=n.element,r=T.box(i),o=T.box(n.options.target),a=s(i,"scale"),l=T.fillScale(o,r),d=T.transformOrigin(o,r);I(e,v),t.scale=1,i.css(se,"scale(1)").css(se),i.css(se,"scale("+a+")"),e.top=r.top,e.left=r.left,e.transformOrigin=d.x+K+" "+d.y+K,n._reverse?e.scale=l:t.scale=l}}),_={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},b={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},d("turningPage",{directions:m,init:function(e,t,n){h.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,r=i?pe[n._direction].reverse:n._direction,o=b[r];e.zIndex=1,n._clipInHalf&&(e.clip=u(n._container,C.directions[r].reverse)),e[le]=Z,t[se]=ue+(i?o.start:o.end),e[se]=ue+(i?o.end:o.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),d("staticPage",{directions:m,init:function(e,t,n){h.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?pe[n._direction].reverse:n._direction;e.clip=u(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},face:function(e){return this._face=e,this}}),d("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){h.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",r=C.directions[i].reverse,o=t._reverse,a=n.face.clone(!0).removeAttr("id"),s=n.back.clone(!0).removeAttr("id"),l=t.element;return o&&(e=i,i=r,r=e),[C.fx(n.face).staticPage(i,l).face(!0).setReverse(o),C.fx(n.back).staticPage(r,l).setReverse(o),C.fx(a).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(o),C.fx(s).turningPage(r,l).clipInHalf(!0).temporary().setReverse(o)]},prepare:function(e,t){e[de]=ce,e.transformStyle="preserve-3d",e.opacity=.999,t.opacity=1},teardown:function(){this.element.find(".temp-page").remove()}}),d("flip",{directions:["horizontal","vertical"],init:function(e,t,n,i){h.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",r=C.directions[i].reverse,o=t._reverse,a=t.element;return o&&(e=i,i=r,r=e),[C.fx(n.face).turningPage(i,a).face(!0).setReverse(o),C.fx(n.back).turningPage(r,a).setReverse(o)]},prepare:function(e){e[de]=ce,e.transformStyle="preserve-3d"}}),k=!F.mobileOS.android,y=".km-touch-scrollbar, .km-actionsheet-wrapper",d("replace",{_before:e.noop,_after:e.noop,init:function(t,n,i){h.prototype.init.call(this,t),this._previous=e(n),this._transitionClass=i},duration:function(){throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule")},beforeTransition:function(e){return this._before=e,this},afterTransition:function(e){return this._after=e,this},_both:function(){return e().add(this._element).add(this._previous)},_containerClass:function(){var e=this._direction,t="k-fx k-fx-start k-fx-"+this._transitionClass;return e&&(t+=" k-fx-"+e),this._reverse&&(t+=" k-fx-reverse"),t},complete:function(t){if(!(!this.deferred||t&&e(t.target).is(y))){var n=this.container;n.removeClass("k-fx-end").removeClass(this._containerClass()).off(z.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),k&&n.css(ne,""),this.isAbsolute||this._both().css(re,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n=this,i=n.element,r=n._previous,o=i.parents().filter(r.parents()).first(),a=n._both(),s=e.Deferred(),l=i.css(re);return o.length||(o=i.parent()),this.container=o,this.deferred=s,this.isAbsolute="absolute"==l,this.isAbsolute||a.css(re,"absolute"),k&&(t=o.css(ne),o.css(ne,"hidden")),z?(i.addClass("k-fx-hidden"),o.addClass(this._containerClass()),this.completeProxy=e.proxy(this,"complete"),o.on(z.event,this.completeProxy),C.animationFrame(function(){i.removeClass("k-fx-hidden").addClass("k-fx-next"),r.css("display","").addClass("k-fx-current"),n._before(r,i),C.animationFrame(function(){o.removeClass("k-fx-start").addClass("k-fx-end"),n._after(r,i)})})):this.complete(),s.promise()},stop:function(){this.complete()}}),w=C.Class.extend({init:function(){var e=this;e._tickProxy=D(e._tick,e),e._started=!1},tick:e.noop,done:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,C.animationFrame(this._tickProxy)))},enabled:function(){return!0},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):C.animationFrame(e._tickProxy))}}),x=w.extend({init:function(e){var t=this;I(t,e),w.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),I(x,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,r){return r=1.70158,n*((e=e/i-1)*e*((r+1)*e+r)+1)+t}}),T.Animation=w,T.Transition=x,T.createEffect=d,T.box=function(t){t=e(t);var n=t.offset();return n.width=C._outerWidth(t),n.height=C._outerHeight(t),n},T.transformOrigin=function(e,t){var n=(e.left-t.left)*t.width/(t.width-e.width),i=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},T.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},T.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.userevents.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t){var n=e.x.location,i=e.y.location,r=t.x.location,o=t.y.location,a=n-r,s=i-o;return{center:{x:(n+r)/2,y:(i+o)/2},distance:Math.sqrt(a*a+s*s)}}function i(e){var t,n,i,r=[],o=e.originalEvent,s=e.currentTarget,l=0;if(e.api)r.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e,type:"api"});else if(e.type.match(/touch/))for(n=o?o.changedTouches:[],t=n.length;l<t;l++)i=n[l],r.push({location:i,event:e,target:i.target,currentTarget:s,id:i.identifier,type:"touch"});else r.push(a.pointers||a.msPointers?{location:o,event:e,target:e.target,currentTarget:s,id:o.pointerId,type:"pointer"}:{id:1,event:e,target:e.target,currentTarget:s,location:e,type:"mouse"});return r}function r(e){for(var t=o.eventMap.up.split(" "),n=0,i=t.length;n<i;n++)e(t[n])}var o=window.kendo,a=o.support,s=o.Class,l=o.Observable,d=e.now,c=e.extend,u=a.mobileOS,p=u&&u.android,f=800,h=300,m=a.browser.msie?5:0,g="press",v="hold",_="select",b="start",k="move",y="end",w="cancel",x="tap",C="doubleTap",T="release",S="gesturestart",I="gesturechange",D="gestureend",F="gesturetap",E={api:0,touch:0,mouse:9,pointer:9},A=!a.touch||a.mouseAndTouchPresent,z=s.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=d()},move:function(e){var t=this,n=e["page"+t.axis],i=d(),r=i-t.timeStamp||1;!n&&p||(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/r,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),N=s.extend({init:function(e,t,n){c(this,{x:new z("X",n.location),y:new z("Y",n.location),type:n.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||E[n.type],userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,pressEvent:n,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(e.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(g,this.pressEvent)},_tap:function(e){var t=this;t.userEvents._clicks++,1==t.userEvents._clicks&&(t._clickTimeout=setTimeout(function(){1==t.userEvents._clicks?t._trigger(x,e):t._trigger(C,e),t.userEvents._clicks=0},h))},_hold:function(){this._trigger(v,this.pressEvent)},move:function(e){var t=this,n="api"!==e.type&&t.userEvents._shouldNotMove;if(!t._finished&&!n){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(P.current&&P.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(k,e)}},end:function(e){this.endTime=d(),this._finished||(this._finished=!0,this._trigger(T,e),this._moved?this._trigger(y,e):this.useClickAsTap||(this.supportDoubleTap?this._tap(e):this._trigger(x,e)),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var t=this.userEvents,n=t.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),n.splice(e.inArray(this,n),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=d(),this._moved=!0,this._trigger(b,e)},_trigger:function(e,t){var n=this,i=t.event,r={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,r)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.threshold}}),P=l.extend({init:function(t,n){var i,s,d,u,p=this,h=o.guid();n=n||{},i=p.filter=n.filter,p.threshold=n.threshold||m,p.minHold=n.minHold||f,p.touches=[],p._maxTouches=n.multiTouch?2:1,p.allowSelection=n.allowSelection,p.captureUpIfMoved=n.captureUpIfMoved,p.useClickAsTap=!n.fastTap&&!a.delayedClick(),p.eventNS=h,p._clicks=0,p.supportDoubleTap=n.supportDoubleTap,t=e(t).handler(p),l.fn.init.call(p),c(p,{element:t,surface:e(n.global&&A?t[0].ownerDocument.documentElement:n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),p.surface.handler(p).on(o.applyEventMap("move",h),"_move").on(o.applyEventMap("up cancel",h),"_end"),t.on(o.applyEventMap("down",h),i,"_start"),p.useClickAsTap&&t.on(o.applyEventMap("click",h),i,"_click"),(a.pointers||a.msPointers)&&(a.browser.version<11?(s="pinch-zoom double-tap-zoom",t.css("-ms-touch-action",n.touchAction&&"none"!=n.touchAction?s+" "+n.touchAction:s)):t.css("touch-action",n.touchAction||"none")),n.preventDragEvent&&t.on(o.applyEventMap("dragstart",h),o.preventDefault),t.on(o.applyEventMap("mousedown",h),i,{root:t},"_select"),p.captureUpIfMoved&&a.eventCapture&&(d=p.surface[0],u=e.proxy(p.preventIfMoving,p),r(function(e){d.addEventListener(e,u,!0)})),p.bind([g,v,x,C,b,k,y,T,w,S,I,D,F,_],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&a.eventCapture&&(e=t.surface[0],r(function(n){e.removeEventListener(n,t.preventIfMoving)})),t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t.element.removeData("handler"),t.surface.removeData("handler"),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget)},capture:function(){P.current=this},cancel:function(){this._disposeAll(),this.trigger(w)},notify:function(e,t){var i=this,r=i.touches;if(this._isMultiTouch()){switch(e){case k:e=I;break;case y:e=D;break;case x:e=F}c(t,{touches:r},n(r[0],r[1]))}return this.trigger(e,c(t,{type:e}))},press:function(e,t,n){this._apiCall("_start",e,t,n)},move:function(e,t){this._apiCall("_move",e,t)},end:function(e,t){this._apiCall("_end",e,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){this.allowSelection&&!this.trigger(_,{event:e})||e.preventDefault()},_start:function(t){var n,r,o=this,a=0,s=o.filter,l=i(t),d=l.length,c=t.which;if(!(c&&c>1||o._maxTouchesReached()))for(P.current=null,o.currentTarget=t.currentTarget,o.stopPropagation&&t.stopPropagation();a<d&&!o._maxTouchesReached();a++)r=l[a],n=s?e(r.currentTarget):o.element,n.length&&(r=new N(o,n,r),o.touches.push(r),r.press(),o._isMultiTouch()&&o.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_click:function(t){var n={touch:{initialTouch:t.target,target:e(t.currentTarget),endTime:d(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:e(t.currentTarget),event:t,type:"tap"};this.trigger("tap",n)&&t.preventDefault()},_eachTouch:function(e,t){var n,r,o,a,s=this,l={},d=i(t),c=s.touches;for(n=0;n<c.length;n++)r=c[n],l[r.id]=r;for(n=0;n<d.length;n++)o=d[n],a=l[o.id],a&&a[e](o)},_apiCall:function(t,n,i,r){this[t]({api:!0,pageX:n,pageY:i,clientX:n,clientY:i,target:e(r||this.element)[0],stopPropagation:e.noop,preventDefault:e.noop})}});P.defaultThreshold=function(e){m=e},P.minHold=function(e){f=e},o.getTouches=i,o.touchDelta=n,o.UserEvents=P}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.draganddrop.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(t,n){try{return e.contains(t,n)||t==n}catch(i){return!1}}function i(e,t){return parseInt(e.css(t),10)||0}function r(e,t){return Math.min(Math.max(e,t.min),t.max)}function o(e,t){var n=D(e),r=_._outerWidth,o=_._outerHeight,a=n.left+i(e,"borderLeftWidth")+i(e,"paddingLeft"),s=n.top+i(e,"borderTopWidth")+i(e,"paddingTop"),l=a+e.width()-r(t,!0),d=s+e.height()-o(t,!0);return{x:{min:a,max:l},y:{min:s,max:d}}}function a(n,i,r){for(var o,a,s=0,l=i&&i.length,d=r&&r.length;n&&n.parentNode;){for(s=0;s<l;s++)if(o=i[s],o.element[0]===n)return{target:o,targetElement:n};for(s=0;s<d;s++)if(a=r[s],e.contains(a.element[0],n)&&b.matchesSelector.call(n,a.options.filter))return{target:a,targetElement:n};n=n.parentNode}return t}function s(e,t){var n,i=t.options.group,r=e[i];if(x.fn.destroy.call(t),r.length>1){for(n=0;n<r.length;n++)if(r[n]==t){r.splice(n,1);break}}else r.length=0,delete e[i]}function l(e){var t,n,i,r=d()[0];return e[0]===r?(n=r.scrollTop,i=r.scrollLeft,{top:n,left:i,bottom:n+y.height(),right:i+y.width()}):(t=e.offset(),t.bottom=t.top+e.height(),t.right=t.left+e.width(),t)}function d(){return e(_.support.browser.edge||_.support.browser.safari?k.body:k.documentElement)}function c(t){var n,i=d();if(!t||t===k.body||t===k.documentElement)return i;for(n=e(t)[0];n&&!_.isScrollable(n)&&n!==k.body;)n=n.parentNode;return n===k.body?i:e(n)}function u(e,t,n){var i={x:0,y:0},r=50;return e-n.left<r?i.x=-(r-(e-n.left)):n.right-e<r&&(i.x=r-(n.right-e)),t-n.top<r?i.y=-(r-(t-n.top)):n.bottom-t<r&&(i.y=r-(n.bottom-t)),i}var p,f,h,m,g,v,_=window.kendo,b=_.support,k=window.document,y=e(window),w=_.Class,x=_.ui.Widget,C=_.Observable,T=_.UserEvents,S=e.proxy,I=e.extend,D=_.getOffset,F={},E={},A={},z=_.elementUnderCursor,N="keyup",P="change",H="dragstart",R="hold",O="drag",M="dragend",B="dragcancel",L="hintDestroyed",V="dragenter",U="dragleave",W="drop",j=C.extend({init:function(t,n){var i=this,r=t[0];i.capture=!1,r.addEventListener?(e.each(_.eventMap.down.split(" "),function(){r.addEventListener(this,S(i._press,i),!0)}),e.each(_.eventMap.up.split(" "),function(){r.addEventListener(this,S(i._release,i),!0)})):(e.each(_.eventMap.down.split(" "),function(){r.attachEvent(this,S(i._press,i))}),e.each(_.eventMap.up.split(" "),function(){r.attachEvent(this,S(i._release,i))})),C.fn.init.call(i),i.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){var t=this;t.trigger("press"),t.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),q=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.forcedEnabled=!1,e.extend(n,t),n.scale=1,n.horizontal?(n.measure="offsetWidth",n.scrollSize="scrollWidth",n.axis="x"):(n.measure="offsetHeight",n.scrollSize="scrollHeight",n.axis="y")},makeVirtual:function(){e.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(e,t){this._virtualMin===e&&this._virtualMax===t||(this._virtualMin=e,this._virtualMax=t,this.update())},outOfBounds:function(e){return e>this.max||e<this.min},forceEnabled:function(){this.forcedEnabled=!0},getSize:function(){return this.container[0][this.measure]},getTotal:function(){return this.element[0][this.scrollSize]},rescale:function(e){this.scale=e},update:function(e){var t=this,n=t.virtual?t._virtualMax:t.getTotal(),i=n*t.scale,r=t.getSize();(0!==n||t.forcedEnabled)&&(t.max=t.virtual?-t._virtualMin:0,t.size=r,t.total=i,t.min=Math.min(t.max,r-i),t.minScale=r/n,t.centerOffset=(i-r)/2,t.enabled=t.forcedEnabled||i>r,e||t.trigger(P,t))}}),G=C.extend({init:function(e){var t=this;C.fn.init.call(t),t.x=new q(I({horizontal:!0},e)),t.y=new q(I({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(P,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(P)}}),$=C.extend({init:function(e){var t=this;I(t,e),C.fn.init.call(t)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,r=t.movable,o=r[i]+e;n.enabled&&((o<n.min&&e<0||o>n.max&&e>0)&&(e*=t.resistance),r.translateAxis(i,e),t.trigger(P,t))}}),K=w.extend({init:function(t){var n,i,r,o,a=this;I(a,{elastic:!0},t),r=a.elastic?.5:0,o=a.movable,a.x=n=new $({axis:"x",dimension:a.dimensions.x,resistance:r,movable:o}),a.y=i=new $({axis:"y",dimension:a.dimensions.y,resistance:r,movable:o}),a.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e,a.offset=a.dimensions.container.offset()},press:function(t){e(t.event.target).closest("a").is("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(e){var t,r,s,l=a.gesture,d=l.center,c=e.center,u=e.distance/l.distance,p=a.dimensions.minScale,f=a.dimensions.maxScale;o.scale<=p&&u<1&&(u+=.8*(1-u)),o.scale*u>=f&&(u=f/o.scale),r=o.x+a.offset.left,s=o.y+a.offset.top,t={x:(r-d.x)*u+c.x-r,y:(s-d.y)*u+c.y-s},o.scaleWith(u),n.dragMove(t.x),i.dragMove(t.y),a.dimensions.rescale(o.scale),a.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(n.dimension.enabled||i.dimension.enabled?(n.dragMove(e.x.delta),i.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),Y=b.transitions.prefix+"Transform";f=b.hasHW3D?function(e,t,n){return"translate3d("+e+"px,"+t+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+e+"px,"+t+"px) scale("+n+")"},h=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(f(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){I(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,i=t.y;t.round&&(n=Math.round(n),i=Math.round(i)),e=f(n,i,t.scale),e!=t.coordinates&&(_.support.browser.msie&&_.support.browser.version<10?(t.element[0].style.position="absolute",t.element[0].style.left=t.x+"px",t.element[0].style.top=t.y+"px"):t.element[0].style[Y]=e,t._saveCoordinates(e),t.trigger(P))},_saveCoordinates:function(e){this.coordinates=e}}),m=x.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in E?E[n].push(i):E[n]=[i]},events:[V,U,W],options:{name:"DropTarget",group:"default"},destroy:function(){s(E,this)},_trigger:function(e,t){var n=this,i=F[n.options.group];if(i)return n.trigger(e,I({},t.event,{draggable:i,dropTarget:t.dropTarget}))},_over:function(e){this._trigger(V,e)},_out:function(e){this._trigger(U,e)},_drop:function(e){var t=this,n=F[t.options.group];n&&(n.dropped=!t._trigger(W,e))}}),m.destroyGroup=function(e){var t,n=E[e]||A[e];if(n){for(t=0;t<n.length;t++)x.fn.destroy.call(n[t]);n.length=0,delete E[e],delete A[e]}},m._cache=E,g=m.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in A?A[n].push(i):A[n]=[i]},destroy:function(){s(A,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),v=x.extend({init:function(e,t){var n=this;x.fn.init.call(n,e,t),n._activated=!1,n.userEvents=new T(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,threshold:n.options.distance,start:S(n._start,n),hold:S(n._hold,n),move:S(n._drag,n),end:S(n._end,n),cancel:S(n._cancel,n),select:S(n._select,n)}),_.support.touch&&n.element.find(n.options.filter).css("touch-action","none"),n._afterEndHandler=S(n._afterEnd,n),n._captureEscape=S(n._captureEscape,n)},events:[R,H,O,M,B,L],options:{name:"Draggable",distance:_.support.touch?0:5,group:"default",cursorOffset:null,axis:null,container:null,filter:null,ignore:null,holdToDrag:!1,autoScroll:!1,dropped:!1},cancelHold:function(){this._activated=!1},_captureEscape:function(e){var t=this;e.keyCode===_.keys.ESC&&(t._trigger(B,{event:e}),t.userEvents.cancel())},_updateHint:function(t){var n,i=this,o=i.options,a=i.boundaries,s=o.axis,l=i.options.cursorOffset;l?n={left:t.x.location+l.left,top:t.y.location+l.top}:(i.hintOffset.left+=t.x.delta,i.hintOffset.top+=t.y.delta,n=e.extend({},i.hintOffset)),a&&(n.top=r(n.top,a.y),n.left=r(n.left,a.x)),"x"===s?delete n.top:"y"===s&&delete n.left,i.hint.css(n)},_shouldIgnoreTarget:function(t){var n=this.options.ignore;return n&&e(t).is(n)},_select:function(e){this._shouldIgnoreTarget(e.event.target)||e.preventDefault()},_start:function(n){var i,r=this,a=r.options,s=a.container?e(a.container):null,l=a.hint;return this._shouldIgnoreTarget(n.touch.initialTouch)||a.holdToDrag&&!r._activated?(r.userEvents.cancel(),t):(r.currentTarget=n.target,r.currentTargetOffset=D(r.currentTarget),l&&(r.hint&&r.hint.stop(!0,!0).remove(),r.hint=_.isFunction(l)?e(l.call(r,r.currentTarget)):l,i=D(r.currentTarget),r.hintOffset=i,r.hint.css({position:"absolute",zIndex:2e4,left:i.left,top:i.top}).appendTo(k.body),r.angular("compile",function(){r.hint.removeAttr("ng-repeat");for(var t=e(n.target);!t.data("$$kendoScope")&&t.length;)t=t.parent();return{elements:r.hint.get(),scopeFrom:t.data("$$kendoScope")}})),F[a.group]=r,r.dropped=!1,s&&(r.boundaries=o(s,r.hint)),e(k).on(N,r._captureEscape),r._trigger(H,n)&&(r.userEvents.cancel(),r._afterEnd()),r.userEvents.capture(),t)},_hold:function(e){this.currentTarget=e.target,this._trigger(R,e)?this.userEvents.cancel():this._activated=!0},_drag:function(t){var n,i;t.preventDefault(),n=this._elementUnderCursor(t),this.options.autoScroll&&this._cursorElement!==n&&(this._scrollableParent=c(n),this._cursorElement=n),this._lastEvent=t,this._processMovement(t,n),this.options.autoScroll&&this._scrollableParent[0]&&(i=u(t.x.location,t.y.location,l(this._scrollableParent)),this._scrollCompenstation=e.extend({},this.hintOffset),this._scrollVelocity=i,0===i.y&&0===i.x?(clearInterval(this._scrollInterval),this._scrollInterval=null):this._scrollInterval||(this._scrollInterval=setInterval(e.proxy(this,"_autoScroll"),50))),this.hint&&this._updateHint(t)},_processMovement:function(n,i){this._withDropTarget(i,function(i,r){if(!i)return p&&(p._trigger(U,I(n,{dropTarget:e(p.targetElement)})),p=null),t;if(p){if(r===p.targetElement)return;p._trigger(U,I(n,{dropTarget:e(p.targetElement)}))}i._trigger(V,I(n,{dropTarget:e(r)})),p=I(i,{targetElement:r})}),this._trigger(O,I(n,{dropTarget:p,elementUnderCursor:i}))},_autoScroll:function(){var e,t,n,i,r,o,a,s,l=this._scrollableParent[0],c=this._scrollVelocity,u=this._scrollCompenstation;l&&(e=this._elementUnderCursor(this._lastEvent),this._processMovement(this._lastEvent,e),i=l===d()[0],i?(t=k.body.scrollHeight>y.height(),n=k.body.scrollWidth>y.width()):(t=l.offsetHeight<=l.scrollHeight,n=l.offsetWidth<=l.scrollWidth),r=l.scrollTop+c.y,o=t&&r>0&&r<l.scrollHeight,a=l.scrollLeft+c.x,s=n&&a>0&&a<l.scrollWidth,o&&(l.scrollTop+=c.y),s&&(l.scrollLeft+=c.x),this.hint&&i&&(s||o)&&(o&&(u.top+=c.y),s&&(u.left+=c.x),this.hint.css(u)))},_end:function(t){this._withDropTarget(this._elementUnderCursor(t),function(n,i){n&&(n._drop(I({},t,{dropTarget:e(i)})),p=null)}),this._cancel(this._trigger(M,t))},_cancel:function(e){var t=this;t._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),t._activated=!1,t.hint&&!t.dropped?setTimeout(function(){t.hint.stop(!0,!0),e?t._afterEndHandler():t.hint.animate(t.currentTargetOffset,"fast",t._afterEndHandler)},0):t._afterEnd()},_trigger:function(e,t){var n=this;return n.trigger(e,I({},t.event,{x:t.x,y:t.y,currentTarget:n.currentTarget,initialTarget:t.touch?t.touch.initialTouch:null,dropTarget:t.dropTarget,elementUnderCursor:t.elementUnderCursor}))},_elementUnderCursor:function(e){var t=z(e),i=this.hint;return i&&n(i[0],t)&&(i.hide(),t=z(e),t||(t=z(e)),i.show()),t},_withDropTarget:function(e,t){var n,i=this.options.group,r=E[i],o=A[i];(r&&r.length||o&&o.length)&&(n=a(e,r,o),n?t(n.target,n.targetElement):t())},destroy:function(){var e=this;x.fn.destroy.call(e),e._afterEnd(),e.userEvents.destroy(),this._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),e.currentTarget=null},_afterEnd:function(){var t=this;t.hint&&t.hint.remove(),delete F[t.options.group],t.trigger("destroy"),t.trigger(L),e(k).off(N,t._captureEscape)}}),_.ui.plugin(m),_.ui.plugin(g),_.ui.plugin(v),_.TapCapture=j,_.containerBoundaries=o,I(_.ui,{Pane:K,PaneDimensions:G,Movable:h}),_.ui.Draggable.utils={autoScrollVelocity:u,scrollableViewPort:l,findScrollableParent:c}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.scroller.min",["kendo.fx.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,r=n.effects,o=i.ui,a=e.proxy,s=e.extend,l=o.Widget,d=n.Class,c=n.ui.Movable,u=n.ui.Pane,p=n.ui.PaneDimensions,f=r.Transition,h=r.Animation,m=Math.abs,g=500,v=.7,_=.96,b=10,k=55,y=.5,w=5,x="km-scroller-release",C="km-scroller-refresh",T="pull",S="change",I="resize",D="scroll",F=2,E=h.extend({init:function(e){var t=this;h.fn.init.call(t),s(t,e),t.userEvents.bind("gestureend",a(t.start,t)),t.tapCapture.bind("press",a(t.cancel,t))},enabled:function(){return this.movable.scale<this.dimensions.minScale},done:function(){return this.dimensions.minScale-this.movable.scale<.01},tick:function(){var e=this.movable;e.scaleWith(1.1),this.dimensions.rescale(e.scale)},onEnd:function(){var e=this.movable;e.scaleTo(this.dimensions.minScale),this.dimensions.rescale(e.scale)}}),A=h.extend({init:function(e){var t=this;h.fn.init.call(t),s(t,e,{transition:new f({axis:e.axis,movable:e.movable,onEnd:function(){t._end()}})}),t.tapCapture.bind("press",function(){t.cancel()}),t.userEvents.bind("end",a(t.start,t)),t.userEvents.bind("gestureend",a(t.start,t)),t.userEvents.bind("tap",a(t.onEnd,t))},onCancel:function(){this.transition.cancel()},freeze:function(e){var t=this;t.cancel(),t._moveTo(e)},onEnd:function(){var e=this;e.paneAxis.outOfBounds()?e._snapBack():e._end()},done:function(){return m(this.velocity)<1},start:function(e){var t,n=this;n.dimension.enabled&&(n.paneAxis.outOfBounds()?n.transition._started?(n.transition.cancel(),n.velocity=Math.min(e.touch[n.axis].velocity*n.velocityMultiplier,k),h.fn.start.call(n)):n._snapBack():(t=e.touch.id===F?0:e.touch[n.axis].velocity,n.velocity=Math.max(Math.min(t*n.velocityMultiplier,k),-k),n.tapCapture.captureNext(),h.fn.start.call(n)))},tick:function(){var e=this,t=e.dimension,n=e.paneAxis.outOfBounds()?y:e.friction,i=e.velocity*=n,r=e.movable[e.axis]+i;!e.elastic&&t.outOfBounds(r)&&(r=Math.max(Math.min(r,t.max),t.min),e.velocity=0),e.movable.moveAxis(e.axis,r)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_snapBack:function(){var e=this,t=e.dimension,n=e.movable[e.axis]>t.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:g,ease:f.easeOutExpo})}}),z=h.extend({init:function(e){var t=this;n.effects.Animation.fn.init.call(this),s(t,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return m(this.offset.y)<w&&m(this.offset.x)<w},onEnd:function(){this.moveTo(this.destination),
|
12
|
-
this.callback&&this.callback.call()},setCoordinates:function(e,t){this.offset={},this.origin=e,this.destination=t},setCallback:function(e){e&&n.isFunction(e)?this.callback=e:e=t},_updateCoordinates:function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}}}),N=d.extend({init:function(t){var n=this,i="x"===t.axis,r=e('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');s(n,t,{element:r,elementSize:0,movable:new c(r),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(S,a(n.refresh,n)),n.container.append(r),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,r=e.scrollMovable,o=i/n.total,a=Math.round(-r[t]*o),s=Math.round(i*o);o>=1?this.element.css("display","none"):this.element.css("display",""),a+s>i?s=i-a:a<0&&(s+=a,a=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e.movable.moveAxis(t,a)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})}}),P=l.extend({init:function(i,r){var o,d,f,h,g,v,_,b,k,y=this;return l.fn.init.call(y,i,r),i=y.element,(y._native=y.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),s(y,{scrollElement:i,fixedContainer:i.children().first()}),t):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'),o=i.children().eq(1),d=new n.TapCapture(i),f=new c(o),h=new p({element:o,container:i,forcedEnabled:y.options.zoom}),g=this.options.avoidScrolling,v=new n.UserEvents(i,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:y.options.zoom,supportDoubleTap:y.options.supportDoubleTap,start:function(t){h.refresh();var n=m(t.x.velocity),i=m(t.y.velocity),r=2*n>=i,o=e.contains(y.fixedContainer[0],t.event.target),a=2*i>=n;!o&&!g(t)&&y.enabled&&(h.x.enabled&&r||h.y.enabled&&a)?v.capture():v.cancel()}}),_=new u({movable:f,dimensions:h,userEvents:v,elastic:y.options.elastic}),b=new E({movable:f,dimensions:h,userEvents:v,tapCapture:d}),k=new z({moveTo:function(e){y.scrollTo(e.x,e.y)}}),f.bind(S,function(){y.scrollTop=-f.y,y.scrollLeft=-f.x,y.trigger(D,{scrollTop:y.scrollTop,scrollLeft:y.scrollLeft})}),y.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",a(this,"_wheelScroll")),s(y,{movable:f,dimensions:h,zoomSnapBack:b,animatedScroller:k,userEvents:v,pane:_,tapCapture:d,pulled:!1,enabled:!0,scrollElement:o,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),y._initAxis("x"),y._initAxis("y"),y._wheelEnd=function(){y._wheel=!1,y.userEvents.end(0,y._wheelY)},h.refresh(),y.options.pullToRefresh&&y._initPullToRefresh(),t)},_wheelScroll:function(e){if(!e.ctrlKey){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var t=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()}},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:[T,D,I],_resize:function(){this._native||this.contentResized()},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},contentResized:function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zoomOut:function(){var e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(n.scrollLeft(this.scrollElement,m(e)),this.scrollElement.scrollTop(m(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,r;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},r={x:e,y:t},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(C),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){l.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.messages.pullTemplate),e.releaseTemplate=n.template(e.options.messages.releaseTemplate),e.refreshTemplate=n.template(e.options.messages.refreshTemplate),e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">'+e.pullTemplate({})+"</span></span>"),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",a(e._paneChange,e)),e.userEvents.bind("end",a(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(x).addClass(C),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/y>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(C).addClass(x),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(x),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],r=t.tapCapture,o=t.pane[e],a=new N({axis:e,movable:n,dimension:i,container:t.element,alwaysVisible:t.options.visibleScrollHints});i.bind(S,function(){a.refresh()}),o.bind(S,function(){a.show()}),t[e+"inertia"]=new A({axis:e,paneAxis:o,movable:n,tapCapture:r,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,friction:t.options.friction||_,velocityMultiplier:t.options.velocityMultiplier||b,end:function(){a.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});o.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.virtuallist.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(e){return e[e.length-1]}function i(e){return e instanceof Array?e:[e]}function r(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function o(e,t,n){return Math.ceil(e*t/n)}function a(e,t,n){var i=document.createElement(n||"div");return t&&(i.className=t),e.appendChild(i),i}function s(){var t,n=e('<div class="k-popup"><ul class="k-list"><li class="k-item"><li></ul></div>');return n.css({position:"absolute",left:"-200000px",visibility:"hidden"}),n.appendTo(document.body),t=parseFloat(b.getComputedStyles(n.find(".k-item")[0],["line-height"])["line-height"]),n.remove(),t}function l(e,t,n){return{down:e*n,up:e*(t-1-n)}}function d(e,t){var n=(e.listScreens-1-e.threshold)*t,i=e.threshold*t;return function(e,t,r){return t>r?t-e.top<n:0===e.top||t-e.top>i}}function c(e,t){return function(n){return t(e.scrollTop,n)}}function u(e){return function(t,n){return e(t.items,t.index,n),t}}function p(e,t){b.support.browser.msie&&b.support.browser.version<10?e.style.top=t+"px":(e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)")}function f(t,n){return function(i,r){for(var o=0,a=i.length;o<a;o++)t(i[o],r[o],n),r[o].item&&this.trigger(L,{item:e(i[o]),data:r[o].item,ns:b.ui})}}function h(e,t){var n;return t>0?(n=e.splice(0,t),e.push.apply(e,n)):(n=e.splice(t,-t),e.unshift.apply(e,n)),n}function m(n,i,r){var o=r.template;n=e(n),i.item||(o=r.placeholderTemplate),0===i.index&&this.header&&i.group&&this.header.html(r.fixedGroupTemplate(i.group)),this.angular("cleanup",function(){return{elements:[n]}}),n.attr("data-uid",i.item?i.item.uid:"").attr("data-offset-index",i.index),n.html(this.options.columns&&this.options.columns.length&&i.item?g(this.options,i.item,r):o(i.item||{})),n.toggleClass(H,i.current),n.toggleClass(P,i.selected),n.toggleClass("k-first",i.newGroup),n.toggleClass("k-last",i.isLastGroupedItem),n.toggleClass("k-loading-item",!i.item),0!==i.index&&i.newGroup&&e("<div class="+N+"></div>").appendTo(n).html(r.groupTemplate(i.group)),i.top!==t&&p(n[0],i.top),this.angular("compile",function(){return{elements:[n],data:[{dataItem:i.item,group:i.group,newGroup:i.newGroup}]}})}function g(e,t,n){var i,r,o,a,s="";for(i=0;i<e.columns.length;i++)r=e.columns[i].width,o=parseInt(r,10),a="",r&&(a+="style='width:",a+=o,a+=C.test(r)?"%":"px",a+=";'"),s+="<span class='k-cell' "+a+">",s+=n["column"+i](t),s+="</span>";return s}function v(e,t){var n,i,r,o,a=t.length,s=e.length,l=[],d=[];if(s)for(r=0;r<s;r++){for(n=e[r],i=!1,o=0;o<a;o++)if(n===t[o]){i=!0,l.push({index:r,item:n});break}i||d.push(n)}return{changed:l,unchanged:d}}function _(e){return e&&"resolved"!==e.state()}var b=window.kendo,k=b.ui,y=k.Widget,w=k.DataBoundWidget,x=e.proxy,C=/^\d+(\.\d+)?%$/i,T="k-virtual-wrap",S="k-virtual-list",I="k-virtual-content",D="k-list",F="k-group-header",E="k-virtual-item",A="k-item",z="k-height-container",N="k-group",P="k-state-selected",H="k-state-focused",R="k-state-hover",O="change",M="click",B="listBound",L="itemChange",V="activate",U="deactivate",W=".VirtualList",j=w.extend({init:function(t,n){var r=this;r.bound(!1),r._fetching=!1,y.fn.init.call(r,t,n),r.options.itemHeight||(r.options.itemHeight=s()),n=r.options,r.element.addClass(D+" "+S).attr("role","listbox"),r.content=r.element.wrap("<div unselectable='on' class='"+I+"'></div>").parent(),r.wrapper=r.content.wrap("<div class='"+T+"'></div>").parent(),r.header=r.content.before("<div class='"+F+"'></div>").prev(),n.columns&&n.columns.length&&r.element.removeClass(D),r.element.on("mouseenter"+W,"li:not(.k-loading-item)",function(){e(this).addClass(R)}).on("mouseleave"+W,"li",function(){e(this).removeClass(R)}),r._values=i(r.options.value),r._selectedDataItems=[],r._selectedIndexes=[],r._rangesList={},r._promisesList=[],r._optionID=b.guid(),r._templates(),r.setDataSource(n.dataSource),r.content.on("scroll"+W,b.throttle(function(){r._renderItems(),r._triggerListBound()},n.delay)),r._selectable()},options:{name:"VirtualList",autoBind:!0,delay:100,height:null,listScreens:4,threshold:.5,itemHeight:null,oppositeBuffer:1,type:"flat",selectable:!1,value:[],dataValueField:null,template:"#:data#",placeholderTemplate:"loading...",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",mapValueTo:"index",valueMapper:null},events:[O,M,B,L,V,U],setOptions:function(e){y.fn.setOptions.call(this,e),this._selectProxy&&this.options.selectable===!1?this.element.off(M,"."+E,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(W),this.dataSource.unbind(O,this._refreshHandler),y.fn.destroy.call(this)},setDataSource:function(t){var n,i=this,r=t||{};r=e.isArray(r)?{data:r}:r,r=b.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(O,i._refreshHandler),i._clean(),i.bound(!1),i._deferValueSet=!0,n=i.value(),i.value([]),i.mute(function(){i.value(n)})):i._refreshHandler=e.proxy(i.refresh,i),i.dataSource=r.bind(O,i._refreshHandler),i.setDSFilter(r.filter()),0!==r.view().length?i.refresh():i.options.autoBind&&r.fetch()},skip:function(){return this.dataSource.currentRangeStart()},_triggerListBound:function(){var e=this,t=e.skip();e.bound()&&!e._selectingValue&&e._skip!==t&&(e._skip=t,e.trigger(B))},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},_highlightSelectedItems:function(){var e,t;for(e=0;e<this._selectedDataItems.length;e++)t=this._getElementByDataItem(this._selectedDataItems[e]),t.length&&t.addClass(P)},refresh:function(e){var t,n=this,i=e&&e.action,r="itemchange"===i,o=this.isFiltered();n._mute||(n._deferValueSet=!1,n._fetching?(n._renderItems&&n._renderItems(!0),n._triggerListBound()):(o&&n.focus(0),n._createList(),i||!n._values.length||o||n.options.skipUpdateOnBind||n._emptySearch?(n.bound(!0),n._highlightSelectedItems(),n._triggerListBound()):(n._selectingValue=!0,n.bound(!0),n.value(n._values,!0).done(function(){n._selectingValue=!1,n._triggerListBound()}))),(r||"remove"===i)&&(t=v(n._selectedDataItems,e.items),t.changed.length&&(r?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged)))),n._fetching=!1)},removeAt:function(e){return this._selectedIndexes.splice(e,1),this._values.splice(e,1),{position:e,dataItem:this._selectedDataItems.splice(e,1)[0]}},setValue:function(e){this._values=i(e)},value:function(n,r){var o,a=this;return n===t?a._values.slice():(null===n&&(n=[]),n=i(n),a._valueDeferred&&"resolved"!==a._valueDeferred.state()||(a._valueDeferred=e.Deferred()),o="multiple"===a.options.selectable&&a.select().length&&n.length,!o&&n.length||a.select(-1),a._values=n,(a.bound()&&!a._mute&&!a._deferValueSet||r)&&a._prefetchByValue(n),a._valueDeferred)},_checkValuesOrder:function(e){if(this._removedAddedIndexes&&this._removedAddedIndexes.length===e.length){var t=this._removedAddedIndexes.slice();return this._removedAddedIndexes=null,t}return e},_prefetchByValue:function(e){var n,i,o,a=this,s=a._dataView,l=a._valueGetter,d=a.options.mapValueTo,c=!1,u=[];for(i=0;i<e.length;i++)for(o=0;o<s.length;o++)n=s[o].item,n&&(c=r(n)?e[i]===n:e[i]===l(n),c&&u.push(s[o].index));return u.length===e.length?(a._values=[],a.select(u),t):("function"==typeof a.options.valueMapper?a.options.valueMapper({value:"multiple"===this.options.selectable?e:e[0],success:function(e){"index"===d?a.mapValueToIndex(e):"dataItem"===d&&a.mapValueToDataItem(e)}}):a.value()[0]?(a._selectingValue=!1,a._triggerListBound()):a.select([-1]),t)},mapValueToIndex:function(e){if(e=e===t||e===-1||null===e?[]:i(e),e.length){var n=this._deselect([]).removed;n.length&&this._triggerChange(n,[])}else e=[-1];this.select(e)},mapValueToDataItem:function(n){var r,o,a,s;if(n=n===t||null===n?[]:i(n),n.length){for(r=e.map(this._selectedDataItems,function(e,t){return{index:t,dataItem:e}}),o=e.map(n,function(e,t){return{index:t,dataItem:e}}),this._selectedDataItems=n,this._selectedIndexes=[],a=0;a<this._selectedDataItems.length;a++)s=this._getElementByDataItem(this._selectedDataItems[a]),this._selectedIndexes.push(this._getIndecies(s)[0]),s.addClass(P);this._triggerChange(r,o),this._valueDeferred&&this._valueDeferred.resolve()}else this.select([-1])},deferredRange:function(t){var n=this.dataSource,i=this.itemCount,r=this._rangesList,o=e.Deferred(),a=[],s=Math.floor(t/i)*i,l=Math.ceil(t/i)*i,d=l===s?[l]:[s,l];return e.each(d,function(t,o){var s,l=o+i,d=r[o];d&&d.end===l?s=d.deferred:(s=e.Deferred(),r[o]={end:l,deferred:s},n._multiplePrefetch(o,i,function(){s.resolve()})),a.push(s)}),e.when.apply(e,a).then(function(){o.resolve()}),o},prefetch:function(t){var n=this,i=this.itemCount,r=!n._promisesList.length;return _(n._activeDeferred)||(n._activeDeferred=e.Deferred(),n._promisesList=[]),e.each(t,function(e,t){n._promisesList.push(n.deferredRange(n._getSkip(t,i)))}),r&&e.when.apply(e,n._promisesList).done(function(){n._promisesList=[],n._activeDeferred.resolve()}),n._activeDeferred},_findDataItem:function(e,t){var n,i;if("group"===this.options.type)for(i=0;i<e.length;i++){if(n=e[i].items,!(n.length<=t))return n[t];t-=n.length}return e[t]},_getRange:function(e,t){return this.dataSource._findRange(e,Math.min(e+t,this.dataSource.total()))},dataItemByIndex:function(t){var n=this,i=n.itemCount,r=n._getSkip(t,i),o=this._getRange(r,i);return n._getRange(r,i).length?("group"===n.options.type&&(b.ui.progress(e(n.wrapper),!0),n.mute(function(){n.dataSource.range(r,i,function(){b.ui.progress(e(n.wrapper),!1)}),o=n.dataSource.view()})),n._findDataItem(o,[t-r])):null},selectedDataItems:function(){return this._selectedDataItems.slice()},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scrollTo:function(e){this.content.scrollTop(e)},scrollToIndex:function(e){this.scrollTo(e*this.options.itemHeight)},focus:function(i){var r,o,a,s,l,d,c=this.options.itemHeight,u=this._optionID,p=!0;if(i===t)return s=this.element.find("."+H),s.length?s:null;if("function"==typeof i)for(a=this.dataSource.flatView(),l=0;l<a.length;l++)if(i(a[l])){i=l;break}return i instanceof Array&&(i=n(i)),isNaN(i)?(r=e(i),o=parseInt(e(r).attr("data-offset-index"),10)):(o=i,r=this._getElementByIndex(o)),o===-1?(this.element.find("."+H).removeClass(H),this._focusedIndex=t,t):(r.length?(r.hasClass(H)&&(p=!1),this._focusedIndex!==t&&(s=this._getElementByIndex(this._focusedIndex),s.removeClass(H).removeAttr("id"),p&&this.trigger(U)),this._focusedIndex=o,r.addClass(H).attr("id",u),d=this._getElementLocation(o),"top"===d?this.scrollTo(o*c):"bottom"===d?this.scrollTo(o*c+c-this._screenHeight):"outScreen"===d&&this.scrollTo(o*c),p&&this.trigger(V)):(this._focusedIndex=o,this.items().removeClass(H),this.scrollToIndex(o)),t)},focusIndex:function(){return this._focusedIndex},focusFirst:function(){this.scrollTo(0),this.focus(0)},focusLast:function(){var e=this.dataSource.total();this.scrollTo(this.heightContainer.offsetHeight),this.focus(e-1)},focusPrev:function(){var e,t=this._focusedIndex;return!isNaN(t)&&t>0?(t-=1,this.focus(t),e=this.focus(),e&&e.hasClass("k-loading-item")&&(t+=1,this.focus(t)),t):(t=this.dataSource.total()-1,this.focus(t),t)},focusNext:function(){var e,t=this._focusedIndex,n=this.dataSource.total()-1;return!isNaN(t)&&t<n?(t+=1,this.focus(t),e=this.focus(),e&&e.hasClass("k-loading-item")&&(t-=1,this.focus(t)),t):(t=0,this.focus(t),t)},_triggerChange:function(e,t){e=e||[],t=t||[],(e.length||t.length)&&this.trigger(O,{removed:e,added:t})},select:function(i){var r,o,a,s,l,d,c=this,u="multiple"!==c.options.selectable,p=_(c._activeDeferred),f=this.isFiltered(),h=[];return i===t?c._selectedIndexes.slice():(c._selectDeferred&&"resolved"!==c._selectDeferred.state()||(c._selectDeferred=e.Deferred()),r=c._getIndecies(i),a=u&&!f&&n(r)===n(this._selectedIndexes),h=c._deselectCurrentValues(r),h.length||!r.length||a?(c._triggerChange(h),c._valueDeferred&&c._valueDeferred.resolve().promise(),c._selectDeferred.resolve().promise()):(1===r.length&&r[0]===-1&&(r=[]),o=r,l=c._deselect(r),h=l.removed,r=l.indices,u&&(p=!1,r.length&&(r=[n(r)])),d=function(){var e=c._select(r);(o.length===r.length||u)&&c.focus(r),c._triggerChange(h,e),c._valueDeferred&&c._valueDeferred.resolve(),c._selectDeferred.resolve()},s=c.prefetch(r),p||(s?s.done(d):d()),c._selectDeferred.promise()))},bound:function(e){return e===t?this._listCreated:(this._listCreated=e,t)},mute:function(e){this._mute=!0,x(e(),this),this._mute=!1},setDSFilter:function(t){this._lastDSFilter=e.extend({},t)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!b.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},skipUpdate:e.noop,_getElementByIndex:function(t){return this.items().filter(function(n,i){return t===parseInt(e(i).attr("data-offset-index"),10)})},_getElementByDataItem:function(t){var n,i,o,a=this._dataView,s=this._valueGetter;for(o=0;o<a.length;o++)if(i=a[o].item&&r(a[o].item)?a[o].item===t:a[o].item&&t&&s(a[o].item)==s(t)){n=a[o];break}return n?this._getElementByIndex(n.index):e()},_clean:function(){this.result=t,this._lastScrollTop=t,this._skip=t,e(this.heightContainer).remove(),this.heightContainer=t,this.element.empty()},_height:function(){var e=!!this.dataSource.view().length,t=this.options.height,n=this.options.itemHeight,i=this.dataSource.total();return e?t/n>i&&(t=i*n):t=0,t},setScreenHeight:function(){var e=this._height();this.content.height(e),this._screenHeight=e},screenHeight:function(){return this._screenHeight},_getElementLocation:function(e){var t,n=this.content.scrollTop(),i=this._screenHeight,r=this.options.itemHeight,o=e*r,a=o+r,s=n+i;return t=o===n-r||a>n&&o<n?"top":o===s||o<s&&s<a?"bottom":o>=n&&o<=n+(i-r)?"inScreen":"outScreen"},_templates:function(){var e,t,n,i,r=this.options,o={template:r.template,placeholderTemplate:r.placeholderTemplate,groupTemplate:r.groupTemplate,fixedGroupTemplate:r.fixedGroupTemplate};if(r.columns)for(e=0;e<r.columns.length;e++)t=r.columns[e],n=t.field?""+t.field:"text",o["column"+e]=t.template||"#: "+n+"#";for(i in o)"function"!=typeof o[i]&&(o[i]=b.template(o[i]||""));this.templates=o},_generateItems:function(e,t){for(var n,i=[],r=this.options.itemHeight+"px";t-- >0;)n=document.createElement("li"),n.tabIndex=-1,n.className=E+" "+A,n.setAttribute("role","option"),n.style.height=r,n.style.minHeight=r,e.appendChild(n),i.push(n);return i},_saveInitialRanges:function(){var t,n=this.dataSource._ranges,i=e.Deferred();for(i.resolve(),this._rangesList={},t=0;t<n.length;t++)this._rangesList[n[t].start]={end:n[t].end,deferred:i}},_createList:function(){var t=this,n=t.content.get(0),i=t.options,r=t.dataSource;t.bound()&&t._clean(),t._saveInitialRanges(),t._buildValueGetter(),t.setScreenHeight(),t.itemCount=o(t._screenHeight,i.listScreens,i.itemHeight),t.itemCount>r.total()&&(t.itemCount=r.total()),t._items=t._generateItems(t.element[0],t.itemCount),t._setHeight(i.itemHeight*r.total()),t.options.type=(r.group()||[]).length?"group":"flat","flat"===t.options.type?t.header.hide():t.header.show(),t.getter=t._getter(function(){t._renderItems(!0)}),t._onScroll=function(e,n){var i=t._listItems(t.getter);return t._fixedHeader(e,i(e,n))},t._renderItems=t._whenChanged(c(n,t._onScroll),u(t._reorderList(t._items,e.proxy(m,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight),t._calculateColumnsHeaderPadding()},_setHeight:function(e){var t,n,i=this.heightContainer;if(i?t=i.offsetHeight:i=this.heightContainer=a(this.content[0],z),e!==t)for(i.innerHTML="";e>0;)n=Math.min(e,25e4),a(i).style.height=n+"px",e-=n},_getter:function(){var e=null,t=this.dataSource,n=t.skip(),i=this.options.type,r=this.itemCount,o={};return t.pageSize()<r&&this.mute(function(){t.pageSize(r)}),function(a,s){var l,d,c,u,p,f,h,m,g=this;if(t.inRange(s,r)){if(n!==s&&this.mute(function(){t.range(s,r),n=s}),"group"===i){if(!o[s])for(d=o[s]=[],c=t.view(),u=0,p=c.length;u<p;u++)for(f=c[u],h=0,m=f.items.length;h<m;h++)d.push({item:f.items[h],group:f.value});l=o[s][a-s]}else l=t.view()[a-s];return l}return e!==s&&(e=s,n=s,g._getterDeferred&&g._getterDeferred.reject(),g._getterDeferred=g.deferredRange(s),g._getterDeferred.then(function(){var e=g._indexConstraint(g.content[0].scrollTop);g._getterDeferred=null,s<=e&&e<=s+r&&(g._fetching=!0,t.range(s,r))})),null}},_fixedHeader:function(e,t){var n,i,r=this.currentVisibleGroup,o=this.options.itemHeight,a=Math.floor((e-t.top)/o),s=t.items[a];return s&&s.item&&(n=s.group,n!==r&&(i=n||"",this.header.html(this.templates.fixedGroupTemplate(i)),this.currentVisibleGroup=n)),t},_itemMapper:function(e,t,n){var i,o,a=this.options.type,s=this.options.itemHeight,l=this._focusedIndex,d=!1,c=!1,u=!1,p=null,f=!1,h=this._valueGetter;if("group"===a&&(e&&(u=0===t||this._currentGroup!==!1&&this._currentGroup!==e.group,this._currentGroup=e.group),p=e?e.group:null,e=e?e.item:null),"dataItem"===this.options.mapValueTo&&this._selectedDataItems.length&&e){for(i=0;i<this._selectedDataItems.length;i++)if(f=h(this._selectedDataItems[i])===h(e)){d=!0;break}}else if(!this.isFiltered()&&n.length&&e)for(o=0;o<n.length;o++)if(f=r(e)?n[o]===e:n[o]===h(e)){n.splice(o,1),d=!0;break}return l===t&&(c=!0),{item:e?e:null,group:p,newGroup:u,selected:d,current:c,index:t,top:t*s}},_range:function(e){var t,n,i,r=this.itemCount,o=this._values.slice(),a=[];for(this._view={},this._currentGroup=!1,n=e,i=e+r;n<i;n++)t=this._itemMapper(this.getter(n,e),n,o),a[a.length-1]&&(a[a.length-1].isLastGroupedItem=t.newGroup),a.push(t),this._view[t.index]=t;return this._dataView=a,a},_getDataItemsCollection:function(e,t){var n=this._range(this._listIndex(e,t));return{index:n.length?n[0].index:0,top:n.length?n[0].top:0,items:n}},_listItems:function(){var t=this._screenHeight,n=this.options,i=d(n,t);return e.proxy(function(e,t){var n=this.result,r=this._lastScrollTop;return!t&&n&&i(n,e,r)||(n=this._getDataItemsCollection(e,r)),this._lastScrollTop=e,this.result=n,n},this)},_whenChanged:function(e,t){var n;return function(i){var r=e(i);r!==n&&(n=r,t(r,i))}},_reorderList:function(t,n){var i=this,r=t.length,o=-(1/0);return n=e.proxy(f(n,this.templates),this),function(e,a,s){var l,d,c=a-o;s||Math.abs(c)>=r?(l=t,d=e):(l=h(t,c),d=c>0?e.slice(-c):e.slice(0,-c)),n(l,d,i.bound()),o=a}},_bufferSizes:function(){var e=this.options;return l(this._screenHeight,e.listScreens,e.oppositeBuffer)},_indexConstraint:function(e){var t=this.itemCount,n=this.options.itemHeight,i=this.dataSource.total();return Math.min(Math.max(i-t,0),Math.max(0,Math.floor(e/n)))},_listIndex:function(e,t){var n,i=this._bufferSizes();return n=e-(e>t?i.down:i.up),this._indexConstraint(n)},_selectable:function(){this.options.selectable&&(this._selectProxy=e.proxy(this,"_clickHandler"),this.element.on(M+W,"."+E,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,n,i,r=[];if("function"==typeof e)for(t=this.dataSource.flatView(),n=0;n<t.length;n++)if(e(t[n])){r.push(n);break}return"number"==typeof e&&r.push(e),i=this.getElementIndex(e),isNaN(i)||r.push(i),e instanceof Array&&(r=e),r},_deselect:function(n){var i,o,a,s,l,d,c,u=[],p=this._selectedIndexes,f=this._selectedDataItems,h=0,m=this.options.selectable,g=0,v=this._valueGetter,_=null;if(n=n.slice(),m!==!0&&n.length){if("multiple"===m)for(d=0;d<n.length;d++){if(_=null,h=e.inArray(n[d],p),o=this.dataItemByIndex(n[d]),h===-1&&o)for(c=0;c<f.length;c++)s=r(o)?f[c]===o:v(f[c])===v(o),s&&(a=this._getElementByIndex(n[d]),_=this._deselectSingleItem(a,c,n[d],g));else i=p[h],i!==t&&(a=this._getElementByIndex(i),_=this._deselectSingleItem(a,h,i,g));_&&(n.splice(d,1),u.push(_),g++,d--)}}else{for(l=0;l<p.length;l++)p[l]!==t?this._getElementByIndex(p[l]).removeClass(P):f[l]&&this._getElementByDataItem(f[l]).removeClass(P),u.push({index:p[l],position:l,dataItem:f[l]});this._values=[],this._selectedDataItems=[],this._selectedIndexes=[]}return{indices:n,removed:u}},_deselectSingleItem:function(e,t,n,i){var r;if(e.hasClass("k-state-selected"))return e.removeClass(P),this._values.splice(t,1),this._selectedIndexes.splice(t,1),r=this._selectedDataItems.splice(t,1)[0],{index:n,position:t+i,dataItem:r}},_deselectCurrentValues:function(t){var n,i,r,o,a=this.element[0].children,s=this._values,l=[],d=0;if("multiple"!==this.options.selectable||!this.isFiltered())return[];if(t[0]===-1)return e(a).removeClass("k-state-selected"),l=e.map(this._selectedDataItems.slice(0),function(e,t){return{dataItem:e,position:t}}),this._selectedIndexes=[],this._selectedDataItems=[],this._values=[],l;for(;d<t.length;d++){for(r=-1,i=t[d],this.dataItemByIndex(i)&&(n=this._valueGetter(this.dataItemByIndex(i))),o=0;o<s.length;o++)if(n==s[o]){r=o;break}r>-1&&(l.push(this.removeAt(r)),e(a[i]).removeClass("k-state-selected"))}return l},_getSkip:function(e,t){var n=e<t?1:Math.floor(e/t)+1;return(n-1)*t},_select:function(t){var n,i,o=this,a="multiple"!==this.options.selectable,s=this.dataSource,l=this.itemCount,d=this._valueGetter,c=[];return a&&(o._selectedIndexes=[],o._selectedDataItems=[],o._values=[]),i=s.skip(),e.each(t,function(e,t){var a=o._getSkip(t,l);o.mute(function(){s.range(a,l),n=o._findDataItem(s.view(),[t-a]),o._selectedIndexes.push(t),o._selectedDataItems.push(n),o._values.push(r(n)?n:d(n)),c.push({index:t,dataItem:n}),o._getElementByIndex(t).addClass(P),s.range(i,l)})}),o._values=o._checkValuesOrder(o._values),c},_clickHandler:function(t){var n=e(t.currentTarget);!t.isDefaultPrevented()&&n.attr("data-uid")&&this.trigger(M,{item:n})},_buildValueGetter:function(){this._valueGetter=b.getter(this.options.dataValueField)},_calculateGroupPadding:function(e){var t=this.items().first(),n=this.header,i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=b.support.scrollbar()),i+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("right"),10),n.css("padding-right",i))},_calculateColumnsHeaderPadding:function(){var e,t,n,i;this.options.columns&&this.options.columns.length&&(e=b.support.isRtl(this.wrapper),t=b.support.scrollbar(),n=this.content.parent().parent().find(".k-grid-header"),i=this.dataSource.total(),n.css(e?"padding-left":"padding-right",i?t:0))}});b.ui.VirtualList=j,b.ui.plugin(j)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.combobox.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.List,o=i.Select,a=n.caret,s=n.support,l=s.placeholder,d=n._activeElement,c=n.keys,u=".kendoComboBox",p=u+"FocusEvent",f="click"+u,h="mousedown"+u,m="disabled",g="readonly",v="change",_="k-i-loading",b="k-state-default",k="k-state-focused",y="k-state-disabled",w="aria-disabled",x="aria-readonly",C="off",T="filter",S="accept",I="rebind",D="mouseenter"+u+" mouseleave"+u,F=e.proxy,E=/(\r\n|\n|\r)/gm,A=o.extend({init:function(t,i){var r,a,s=this;s.ns=u,i=e.isArray(i)?{dataSource:i}:i,o.fn.init.call(s,t,i),i=s.options,t=s.element.on("focus"+u,F(s._focusHandler,s)),i.placeholder=i.placeholder||t.attr("placeholder"),s._reset(),s._wrapper(),s._input(),s._clearButton(),s._tabindex(s.input),s._popup(),s._dataSource(),s._ignoreCase(),s._enable(),s._attachFocusEvents(),s._oldIndex=s.selectedIndex=-1,s._aria(),s._initialIndex=i.index,s.requireValueMapper(s.options),s._initList(),s._cascade(),i.autoBind?s._filterSource():(r=i.text,!r&&s._isSelect&&(r=t.children(":selected").text()),r&&s._setText(r)),r||s._placeholder(),a=e(s.element).parents("fieldset").is(":disabled"),a&&s.enable(!1),n.notify(s),s._toggleCloseVisibility()},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:1,enforceMinLength:!1,height:200,highlightFirst:!0,filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",cascadeFromParentField:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,syncValueAndText:!0,autoWidth:!1,popup:null},events:["open","close",v,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){var t=this._listOptions(e);o.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._clearButton()},destroy:function(){var e=this;e.input.off(u),e.input.off(p),e.element.off(u),e.wrapper.off(u),e._inputWrapper.off(u),clearTimeout(e._pasteTimeout),e._arrow.off(f+" "+h),e._clear.off(f+" "+h),o.fn.destroy.call(e)},_isValueChanged:function(e){return e!==r.unifyType(this._old,typeof e)&&e!==r.unifyType(this._oldText,typeof e)},_change:function(){var e=this,n=e.text(),i=n&&n!==e._oldText&&n!==e.options.placeholder,r=e.selectedIndex,a=r===-1;return!e.options.syncValueAndText&&!e.value()&&a&&i?(e._old="",e._oldIndex=r,e._oldText=n,e._typing||e.element.trigger(v),
|
13
|
-
e.trigger(v),e._typing=!1,t):(o.fn._change.call(e),e._oldText=e.text&&e.text(),e._toggleCloseVisibility(),t)},_attachFocusEvents:function(){var e=this;e.input.on("focus"+p,F(e._inputFocus,e)).on("focusout"+p,F(e._inputFocusout,e))},_focusHandler:function(e){e.target===this.element[0]&&this.input.focus()},_arrowClick:function(){this._toggle()},_inputFocus:function(){this._inputWrapper.addClass(k),this._placeholder(!1)},_inputFocusout:function(){var e,n,i=this,r=i.value();return i._userTriggered=!0,i._inputWrapper.removeClass(k),clearTimeout(i._typingTimeout),i._typingTimeout=null,i.text(i.text()),e=i._focus(),n=this.listView.dataItemByIndex(this.listView.getElementIndex(e)),r!==i.value()&&i.trigger("select",{dataItem:n,item:e})?(i.value(r),t):(i._placeholder(),i._valueBeforeCascade=i._old,i._blur(),i.element.blur(),t)},_inputPaste:function(){var e=this;clearTimeout(e._pasteTimeout),e._pasteTimeout=null,e._pasteTimeout=setTimeout(function(){e.search()})},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._inputWrapper.off(u),o=t.element.add(t.input.off(u)),a=t._arrow.off(f+" "+h),s=t._clear;i||n?(r.addClass(n?y:b).removeClass(n?b:y),o.attr(m,n).attr(g,i).attr(w,n).attr(x,i)):(r.addClass(b).removeClass(y).on(D,t._toggleHover),o.removeAttr(m).removeAttr(g).attr(w,!1).attr(x,!1),a.on(f,F(t._arrowClick,t)).on(h,function(e){e.preventDefault()}),s.on(f+" touchend"+u,F(t._clearValue,t)),t.input.on("keydown"+u,F(t._keydown,t)).on("input"+u,F(t._search,t)).on("paste"+u,F(t._inputPaste,t)),t.wrapper.on(f+u,F(t._focusHandler,t))),t._toggleCloseVisibility()},open:function(){var e=this,t=e._state,n=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0,i=!e.ul.find(e.listView.focus()).length;e.popup.visible()||(!e.listView.bound()&&t!==T||t===S?(e._open=!0,e._state=I,1!==e.options.minLength&&!n||n&&e.value()&&e.selectedIndex===-1?(e.refresh(),e._openPopup(),this.options.virtual||e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual?e._focusItem():i&&e.options.highlightFirst&&e.listView.focus(0)))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",F(this._scrollToFocusedItem,this)),this.popup.open()},_updateSelectionState:function(){var e=this,n=e.options.text,i=e.options.value;e.listView.isFiltered()||(e.selectedIndex===-1?(n!==t&&null!==n||(n=i),e._accessor(i),e.input.val(n||e.input.val()),e._placeholder()):e._oldIndex===-1&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var n,i=this;i._isSelect&&(n=i._customOption,i._state===I&&(i._state=""),i._customOption=t,i._options(e,"",i.value()),n&&n[0].selected&&!i.listView._emptySearch&&i._custom(n.val()))},_updateSelection:function(){var n,i=this,r=i.listView,o=i._initialIndex,a=null!==o&&o>-1,s=i._state===T;return s?(e(r.focus()).removeClass("k-state-selected"),t):(i._fetch||(r.value().length||(a?i.select(o):i._accessor()&&r.value(i._accessor())),i._initialIndex=null,n=r.selectedDataItems()[0],n&&(i._value(n)!==i.value()?i._custom(i._value(n)):i._value(n)!==i.element[0].value&&i._accessor(i._value(n)),i.text()&&i.text()!==i._text(n)&&i._selectValue(n))),t)},_updateItemFocus:function(){var e=this.listView;this.options.highlightFirst?e.focus()||e.focusIndex()||e.focus(0):e.focus(-1)},_listBound:function(){var e=this,n=e.input[0]===d(),i=e.dataSource.flatView(),r=e.listView.skip(),o=i.length,a=e.dataSource._group?e.dataSource._group.length:0,s=r===t||0===r;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!o),e._toggleHeader(!!a&&!!o),e._resizePopup(),e.popup.position(),e._buildOptions(i),e._makeUnselectable(),e._updateSelection(),i.length&&s&&(e._updateItemFocus(),e.options.suggest&&n&&e.input.val()&&e.suggest(i[0])),e._open&&(e._open=!1,e._typingTimeout&&!n?e.popup.close():e.toggle(e._allowOpening()),e._typingTimeout=null),e._hideBusy(),e.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),this._presetValue&&(this._oldIndex=this.selectedIndex)},_get:function(e){var t,n,i;if("function"==typeof e){for(t=this.dataSource.flatView(),i=0;i<t.length;i++)if(e(t[i])){e=i,n=!0;break}n||(e=-1)}return e},_select:function(e,t){var n=this;return e=n._get(e),e===-1&&(n.input[0].value="",n._accessor("")),n.listView.select(e).done(function(){t||n._state!==T||(n._state=S),n._toggleCloseVisibility()})},_selectValue:function(e){var n=this.listView.select(),i="",r="";n=n[n.length-1],n===t&&(n=-1),this.selectedIndex=n,this.listView.isFiltered()&&n!==-1&&(this._valueBeforeCascade=this._old),n!==-1||e?((e||0===e)&&(i=this._dataValue(e),r=this._text(e)),null===i&&(i="")):(this.options.syncValueAndText?(r=this.options.dataTextField===this.options.dataValueField?this._accessor():this.input[0].value,i=r):r=this.text(),this.listView.focus(-1)),this._setDomInputValue(r),this._accessor(i!==t?i:r,n),this._placeholder(),this._triggerCascade()},_setDomInputValue:function(e){var t,n,i=this,r=a(this.input);r&&r.length&&(t=r[0]),this._prev=this.input[0].value=e,t&&this.selectedIndex===-1&&(n=s.mobileOS,n.wp||n.android?setTimeout(function(){i.input[0].setSelectionRange(t,t)},0):this.input[0].setSelectionRange(t,t))},refresh:function(){this.listView.refresh()},_toggleCloseVisibility:function(){var e=this.element.is(":disabled")||this.element.is("[readonly]");this.text()&&!e?this._showClear():this._hideClear()},suggest:function(e){var n,i=this,o=i.input[0],s=i.text(),l=a(o)[0],u=i._last,p=i.dataSource.options.accentFoldingFiltering;return u==c.BACKSPACE||u==c.DELETE?(i._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=i.dataSource.view()[r.inArray(e[0],i.ul[0])]),e=e?i._text(e):""),l<=0&&(l=(p?s.toLocaleLowerCase(p):s.toLowerCase()).indexOf(p?e.toLocaleLowerCase(p):e.toLowerCase())+1),e?(e=""+e,n=(p?e.toLocaleLowerCase(p):e.toLowerCase()).indexOf(p?s.toLocaleLowerCase(p):s.toLowerCase()),n>-1&&(s+=e.substring(n+s.length))):s=s.substring(0,l),s.length===l&&e||(o.value=s,o===d()&&a(o,l,s.length)),t)},text:function(e){var n,i,o,a,s,l;return e=null===e?"":e,n=this,i=n.input[0],o=n.options.ignoreCase,a=e,e===t?i.value:n.options.autoBind!==!1||n.listView.bound()?(s=n.dataItem(),s&&n._text(s).replace&&n._text(s).replace(E,"")===e&&(l=n._value(s),l===r.unifyType(n._old,typeof l))?(n._triggerCascade(),t):(o&&(a=a.toLowerCase()),n.dataItem()&&n._text(n.dataItem())===e||(n._select(function(e){return e=n._text(e),o&&(e=(e+"").toLowerCase()),e===a}).done(function(){n.selectedIndex<0&&(i.value=e,n.options.syncValueAndText&&n._accessor(e),n._cascadeTriggered=!0,n._triggerCascade()),n._prev=i.value}),n._toggleCloseVisibility()),t)):(n._setText(e),t)},toggle:function(e){this._toggle(e,!0)},value:function(e){var n=this,i=n.options,r=n.listView;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n.requireValueMapper(n.options,e),n.trigger("set",{value:e}),(e!==i.value||n.input.val()!==i.text||n.options.cascadeFrom)&&(n._accessor(e),n._isFilterEnabled()&&r.bound()&&r.isFiltered()?n._clearFilter():n._fetchData(),r.value(e).done(function(){n.selectedIndex!==-1||r._selectedDataItems&&r._selectedDataItems.length||(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._old=n._userTriggered?n._accessor():n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n._oldText=n.input.val(),n._state===T&&(n._state=S),n._toggleCloseVisibility()})),t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(_),e._focused.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_click:function(e){var n=this,i=e.item,o=n.listView.dataItemByIndex(n.listView.getElementIndex(i)),a=!0;return e.preventDefault(),o&&(a=n._value(o)!==r.unifyType(n.value(),typeof n._value(o)),a||n.input.val(n._text(o))),a&&n.trigger("select",{dataItem:o,item:i})?(n.close(),t):(n._userTriggered=!0,n._select(i).done(function(){n._blur()}),t)},_syncValueAndText:function(){return this.options.syncValueAndText},_inputValue:function(){return this.text()},_searchByWord:function(e){var n,i=this,r=i.options,o=i.dataSource,a=r.ignoreCase,s=function(n){var r=i._text(n);if(r!==t)return r+="",(""===r||""!==e)&&(a&&(r=r.toLowerCase()),0===r.indexOf(e))};return a&&(e=e.toLowerCase()),i.ul[0].firstChild?(this.listView.focus(this._get(s)),n=this.listView.focus(),n&&(r.suggest&&i.suggest(n),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(o.one(v,function(){o.view()[0]&&i.search(e)}).fetch(),t)},_input:function(){var t,n,i=this,r=i.element.removeClass("k-input")[0],o=r.accessKey,a=i.wrapper,s="input.k-input",d=r.name||"";d&&(d='name="'+d+'_input" '),t=a.find(s),t[0]||(a.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input '+d+'class="k-input" type="text" autocomplete="'+C+'"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(i.element),t=a.find(s)),t[0].style.cssText=r.style.cssText,t[0].title=r.title,n=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),n>-1&&(t[0].maxLength=n),t.addClass(r.className).css({width:"",height:r.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),l&&t.attr("placeholder",i.options.placeholder),o&&(r.accessKey="",t[0].accessKey=o),i._focused=i.input=t,i._inputWrapper=e(a[0].firstChild),i._arrow=a.find(".k-select").attr({role:"button",tabIndex:-1}),i._arrowIcon=i._arrow.find(".k-icon"),r.id&&i._arrow.attr("aria-controls",i.ul[0].id)},_clearButton:function(){r.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t,n,i,o=this,a=e.keyCode;if(o._last=a,clearTimeout(o._typingTimeout),o._typingTimeout=null,a===c.HOME)o._firstItem();else if(a===c.END)o._lastItem();else if(a===c.ENTER||a===c.TAB&&o.popup.visible())if(t=o.listView.focus(),n=o.dataItem(),i=!0,o.popup.visible()||n&&o.text()===o._text(n)||(t=null),t){if(o.popup.visible()&&e.preventDefault(),n=o.listView.dataItemByIndex(o.listView.getElementIndex(t)),n&&(i=o._value(n)!==r.unifyType(o.value(),typeof o._value(n))),i&&o.trigger("select",{dataItem:n,item:t}))return;o._userTriggered=!0,o._select(t).done(function(){o._blur(),o._valueBeforeCascade=o._old=o.value()})}else(o._syncValueAndText()||o._isSelect)&&o._accessor(o.input.val()),o.options.highlightFirst?(o.listView.value(o.input.val()),o._blur()):o._oldText=o.text();else a==c.TAB||o._move(e)?a===c.ESC&&!o.popup.visible()&&o.text()&&o._clearValue():o._search()},_placeholder:function(e){if(!l){var n,i=this,r=i.input,o=i.options.placeholder;if(o){if(n=i.value(),e===t&&(e=!n),r.toggleClass("k-readonly",e),!e){if(n)return;o=""}r.val(o),o||r[0]!==d()||a(r[0],0,0)}}},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout(function(){var t=e.text();""!==t&&e._prev!==t?(e._prev=t,"none"===e.options.filter&&e.options.virtual&&e.listView.select(-1),e.search(t),e._toggleCloseVisibility()):""===t&&""!==e._prev&&(e._clearValue(),e.search("")),e._typingTimeout=null},e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this,t=e.element,n=t.parent();n.is("span.k-widget")||(n=t.hide().wrap("<span />").parent(),n[0].style.cssText=t[0].style.cssText),e.wrapper=n.addClass("k-widget k-combobox").addClass(t[0].className).removeClass("input-validation-error").css("display","")},_clearSelection:function(e,t){var n=this,i=e.value(),r=i&&e.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!i||r)&&(n.options.value="",n.value(""))},_preselect:function(e,t){this.input.val(t),this._accessor(e),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._placeholder(),this._initialIndex=null,this._presetValue=!0,this._toggleCloseVisibility()},_clearText:function(){this._old=this.value(),this.text("")},_clearValue:function(){o.fn._clearValue.call(this),this.input.focus()}});i.plugin(A)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.selectable.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){if(!e.is(":visible"))return!1;var n=r.getOffset(e),i=t.left+t.width,o=t.top+t.height;return n.right=n.left+r._outerWidth(e),n.bottom=n.top+r._outerHeight(e),!(n.left>i||n.right<t.left||n.top>o||n.bottom<t.top)}var i,r=window.kendo,o=r.ui.Widget,a=e.proxy,s=Math.abs,l="aria-selected",d="k-state-selected",c="k-state-selecting",u="k-selectable",p="change",f=".kendoSelectable",h="unselect",m="k-state-unselecting",g="input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up,label.k-checkbox-label.k-no-text,.k-icon.k-i-collapse,.k-icon.k-i-expand,span.k-numeric-wrap,.k-focusable",v=r.support.browser.msie,_=!1;!function(e){!function(){e('<div class="parent"><span></span></div>').on("click",">*",function(){_=!0}).find("span").trigger("click").end().off()}()}(e),i=o.extend({init:function(t,n){var i,s=this;o.fn.init.call(s,t,n),s._marquee=e("<div class='k-marquee'><div class='k-marquee-color'></div></div>"),s._lastActive=null,s.element.addClass(u),s.relatedTarget=s.options.relatedTarget,i=s.options.multiple,this.options.aria&&i&&s.element.attr("aria-multiselectable",!0),s.userEvents=new r.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(_?"":"."+u+" ")+s.options.filter,tap:a(s._tap,s),touchAction:i?"none":"pan-x pan-y"}),i&&s.userEvents.bind("start",a(s._start,s)).bind("move",a(s._move,s)).bind("end",a(s._end,s)).bind("select",a(s._select,s))},events:[p,h],options:{name:"Selectable",filter:">*",inputSelectors:g,multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,n=this.element,i=n.length,r=!1;for(e=e[0],t=0;t<i;t++)if(n[t]===e){r=!0;break}return r},_tap:function(t){var n,i=e(t.target),r=this,o=t.event.ctrlKey||t.event.metaKey,a=r.options.multiple,s=a&&t.event.shiftKey,l=t.event.which,c=t.event.button;!r._isElement(i.closest("."+u))||l&&3==l||c&&2==c||this._allowSelection(t.event.target)&&(n=i.hasClass(d),a&&o||r.clear(),i=i.add(r.relatedTarget(i)),s?r.selectRange(r._firstSelectee(),i,t):(n&&o?(r._unselect(i),r._notify(p,t)):r.value(i,t),r._lastActive=r._downTarget=i))},_start:function(n){var i,r=this,o=e(n.target),a=o.hasClass(d),s=n.event.ctrlKey||n.event.metaKey;if(this._allowSelection(n.event.target)){if(r._downTarget=o,!r._isElement(o.closest("."+u)))return r.userEvents.cancel(),t;r.options.useAllItems?r._items=r.element.find(r.options.filter):(i=o.closest(r.element),r._items=i.find(r.options.filter)),n.sender.capture(),r._marquee.appendTo(document.body).css({left:n.x.client+1,top:n.y.client+1,width:0,height:0}),s||r.clear(),o=o.add(r.relatedTarget(o)),a&&(r._selectElement(o,!0),s&&o.addClass(m))}},_move:function(e){var t=this,n={left:e.x.startLocation>e.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:s(e.x.initialDelta),height:s(e.y.initialDelta)};t._marquee.css(n),t._invalidateSelectables(n,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(e){var t,n=this;n._marquee.remove(),n._unselect(n.element.find(n.options.filter+"."+m)).removeClass(m),t=n.element.find(n.options.filter+"."+c),t=t.add(n.relatedTarget(t)),n.value(t,e),n._lastActive=n._downTarget,n._items=null},_invalidateSelectables:function(e,t){var i,r,o,a,s=this._downTarget[0],l=this._items;for(i=0,r=l.length;i<r;i++)a=l.eq(i),o=a.add(this.relatedTarget(a)),n(a,e)?a.hasClass(d)?t&&s!==a[0]&&o.removeClass(d).addClass(m):a.hasClass(c)||a.hasClass(m)||o.addClass(c):a.hasClass(c)?o.removeClass(c):t&&a.hasClass(m)&&o.removeClass(m).addClass(d)},value:function(e,n){var i=this,r=a(i._selectElement,i);return e?(e.each(function(){r(this)}),i._notify(p,n),t):i.element.find(i.options.filter+"."+d)},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value(),e.length>0?e[0]:t.element.find(t.options.filter)[0])},_selectElement:function(t,n){var i=e(t),r=!n&&this._notify("select",{element:t});i.removeClass(c),r||(i.addClass(d),this.options.aria&&i.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){if(!this.trigger(h,{element:e}))return e.removeClass(d),this.options.aria&&e.attr(l,!1),e},_select:function(t){this._allowSelection(t.event.target)&&(!v||v&&!e(r._activeElement()).is(this.options.inputSelectors))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var e=this.element.find(this.options.filter+"."+d);this._unselect(e)},selectRange:function(t,n,i){var r,o,a,s=this;for(s.clear(),s.element.length>1&&(a=s.options.continuousItems()),a&&a.length||(a=s.element.find(s.options.filter)),t=e.inArray(e(t)[0],a),n=e.inArray(e(n)[0],a),t>n&&(o=t,t=n,n=o),s.options.useAllItems||(n+=s.element.length-1),r=t;r<=n;r++)s._selectElement(a[r]);s._notify(p,i)},destroy:function(){var e=this;o.fn.destroy.call(e),e.element.off(f),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}}),i.parseOptions=function(e){var t="string"==typeof e&&e.toLowerCase();return{multiple:t&&t.indexOf("multiple")>-1,cell:t&&t.indexOf("cell")>-1}},r.ui.plugin(i)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.calendar.min",["kendo.core.min","kendo.selectable.min"],e)}(function(){return function(e,t){function n(e,t,n,i){var r,o=e.getFullYear(),a=t.getFullYear(),s=n.getFullYear();return o-=o%i,r=o+(i-1),o<a&&(o=a),r>s&&(r=s),o+"-"+r}function i(e){var t,n=0,i=e.min,r=e.max,o=e.start,a=e.setter,l=e.build,d=e.weekNumberBuild,c=e.cells||12,u=e.isWeekColumnVisible,p=e.perRow||4,f=e.otherMonth,m=e.lastDayOfMonth,g=e.weekNumber||q,v=e.content||U,_=e.empty||W,b=e.otherMonthCellTemplate||j,k=e.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';for(u&&(k+=g(d(o)));n<c;n++)n>0&&n%p===0&&(k+='</tr><tr role="row">',u&&(k+=g(f||+o<=+m?d(o):{weekNumber:" "}))),o=h(o.getFullYear(),o.getMonth(),o.getDate()),P(o,0),t=l(o,n,e.disableDates),k+=t.cssClass.indexOf(ce)===-1||f?s(o,i,r)?v(t):_(t):b(t),a(o,1);return k+"</tr></tbody></table>"}function r(e,t,n){var i=e.getFullYear(),r=t.getFullYear(),o=r,a=0;return n&&(r-=r%n,o=r-r%n+n-1),i>o?a=1:i<r&&(a=-1),a}function o(){var e=new Ne;return new Ne(e.getFullYear(),e.getMonth(),e.getDate())}function a(e,t,n){var i=o();return e&&(i=new Ne((+e))),t>i?i=new Ne((+t)):n<i&&(i=new Ne((+n))),i}function s(e,t,n){return+e>=+t&&+e<=+n}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function d(e,t,n){t=t instanceof Ne?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function c(e,t){var n,i,r;return+t<+e&&(n=+e,I.views[0].setDate(e,t),I.views[0].setDate(t,new Date(n))),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+r-+i)/D.date.MS_PER_DAY)}function u(e,t,n,i){var r,o;for(r=0;r<=t;r++)o=new Date(n.getTime()),o=new Date(o.setDate(o.getDate()+r)),i(o)||e.push(o)}function p(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(se,ye.indexOf(t.type)>-1||t.type==be)}function f(e){e.preventDefault()}function h(e,t,n){var i=new Ne(e,t,n);return i.setFullYear(e,t,n),i}function m(e){return B(e).calendars.standard}function g(e){var n=Pe[e.start],i=Pe[e.depth],r=B(e.culture);e.format=O(e.format||r.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=ne),(i===t||i>n)&&(e.depth=ne),null===e.dates&&(e.dates=[])}function v(e){$&&e.find("*").attr("unselectable","on")}function _(e,t){e.addClass("k-"+t)}function b(e,t){for(var n=0,i=t.length;n<i;n++)if(e===+t[n])return!0;return!1}function k(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}function y(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}function w(t){return D.isFunction(t)?t:e.isArray(t)?C(t):e.noop}function x(e){var t,n=[];for(t=0;t<e.length;t++)n.push(e[t].setHours(0,0,0,0));return n}function C(t){var n,i,r,o,a,s=[],l=["su","mo","tu","we","th","fr","sa"],d="if (found) { return true } else {return false}";if(t[0]instanceof Ne)s=x(t),n="var clonedDate = new Date(date); var found = date && window.kendo.jQuery.inArray(clonedDate.setHours(0, 0, 0, 0),["+s+"]) > -1;"+d;else{for(r=0;r<t.length;r++)o=t[r].slice(0,2).toLowerCase(),a=e.inArray(o,l),a>-1&&s.push(a);n="var clonedDate = new Date(date); var found = date && window.kendo.jQuery.inArray(clonedDate.getDay(),["+s+"]) > -1;"+d}return i=Function("date",n)}function T(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}function S(t){var n=e(t).attr(D.attr(ae)).split("/");return n=h(n[0],n[1],n[2])}var I,D=window.kendo,F=D.support,E=D.ui,A=E.Widget,z=D.keys,N=D.parseDate,P=D.date.adjustDST,H=D.date.weekInYear,R=D.ui.Selectable,O=D._extractFormat,M=D.template,B=D.getCulture,L=D.support.transitions,V=L?L.css+"transform-origin":"",U=M('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),W=M('<td role="gridcell" class="k-out-of-range"><a class="k-link"></a></td>',{useWithBlock:!1}),j=M('<td role="gridcell" class="k-out-of-range"> </td>',{useWithBlock:!1}),q=M('<td class="k-alt">#= data.weekNumber #</td>',{useWithBlock:!1}),G=D.support.browser,$=G.msie&&G.version<9,K=D._outerWidth,Y=".kendoCalendar",Q="click"+Y,X="keydown"+Y,J="id",Z="min",ee="left",te="slideIn",ne="month",ie="century",re="change",oe="navigate",ae="value",se="k-state-hover",le="k-state-disabled",de="k-state-focused",ce="k-other-month",ue=' class="'+ce+'"',pe="k-out-of-range",fe="k-nav-today",he="td:has(.k-link)",me="td:has(.k-link):not(."+le+"):not(."+pe+")",ge="td:not(:has(.k-link))",ve="k-state-selected",_e="blur"+Y,be="focus",ke=be+Y,ye=F.touch?"touchstart":"mouseenter",we=F.touch?"touchstart"+Y:"mouseenter"+Y,xe=F.touch?"touchend"+Y+" touchmove"+Y:"mouseleave"+Y,Ce=6e4,Te=864e5,Se="_prevArrow",Ie="_nextArrow",De="aria-disabled",Fe="aria-selected",Ee="aria-label",Ae=e.proxy,ze=e.extend,Ne=Date,Pe={month:0,year:1,decade:2,century:3},He=".k-header, .k-calendar-header",Re='<div class="k-header"><a href="\\#" #=actionAttr#="prev" role="button" class="k-link k-nav-prev" '+Ee+'="Previous"><span class="k-icon k-i-arrow-60-left"></span></a><a href="\\#" #=actionAttr#="nav-up" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="\\#" #=actionAttr#="next" role="button" class="k-link k-nav-next" '+Ee+'="Next"><span class="k-icon k-i-arrow-60-right"></span></a></div>',Oe='<div class="k-calendar-header"><a href="\\#" #=actionAttr#="nav-up" role="button" aria-live="assertive" aria-atomic="true" class="k-button k-title"></a><span class="k-calendar-nav"><a #=actionAttr#="prev" class="k-button k-button-icon k-prev-view"><span class="k-icon k-i-arrow-60-left"></span></a><a #=actionAttr#="today" class="k-today">#=messages.today#</a><a #=actionAttr#="next" class="k-button k-button-icon k-next-view"><span class="k-icon k-i-arrow-60-right"></span></a></span></div>',Me=A.extend({init:function(t,n){var i,r,s=this;n=n||{},n.componentType=n.componentType||"classic",A.fn.init.call(s,t,n),t=s.wrapper=s.element,n=s.options,n.url=D.unescape(n.url),s.options.disableDates=w(s.options.disableDates),s._templates(),s._selectable(),s._header(),s._viewWrapper(),s.options.hasFooter&&s._footer(s.footer),r=t.addClass("k-widget k-calendar "+(n.weekNumber?" k-week-number":"")).on(we+" "+xe,he,p).on(X,"table.k-content",Ae(s._move,s)).on(Q+" touchend",he,function(t){var i=t.currentTarget.firstChild,r=S(i);i.href.indexOf("#")!=-1&&t.preventDefault(),"month"==s._view.name&&s.options.disableDates(r)||"month"==s._view.name&&"single"!=n.selectable||s._click(e(i))}).on("mouseup"+Y,"table.k-content, .k-footer",function(){s._focusView(s.options.focusOnNav!==!1)}).attr(J),r&&(s._cellID=r+"_cell_selected"),s._isMultipleSelection()&&s.options.weekNumber&&t.on(Q,ge,function(t){var n=e(t.currentTarget).closest("tr").find(me).first(),i=s.selectable._lastActive=e(t.currentTarget).closest("tr").find(me).last();s.selectable.selectRange(n,i,{event:t}),s._current=s._value=S(i.find("a")),s._class(de,s._current)}),g(n),i=N(n.value,n.format,n.culture),s._selectDates=[],s._index=Pe[n.start],s._current=new Ne((+a(i,n.min,n.max))),s._addClassProxy=function(){if(s._active=!0,s._cell.hasClass(le)){var e=s._view.toDateString(o());s._cell=s._cellByDate(e)}s._cell.addClass(de)},s._removeClassProxy=function(){s._active=!1,s._cell.removeClass(de)},s.value(i),s._isMultipleSelection()&&n.selectDates.length>0&&s.selectDates(n.selectDates),D.notify(s)},options:{name:"Calendar",value:null,min:new Ne(1900,0,1),max:new Ne(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:ne,depth:ne,animation:{horizontal:{effects:te,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:"",today:"Today"},componentType:"classic"},events:[re,oe],componentTypes:{classic:{header:{template:Re},hasFooter:!0,linksSelector:".k-link",contentClasses:"k-content"},modern:{header:{template:Oe},hasFooter:!1,linksSelector:".k-button",contentClasses:"k-content k-calendar-content"}},setOptions:function(e){var t=this;g(e),e.disableDates=w(e.disableDates),t._destroySelectable(),A.fn.setOptions.call(t,e),t._templates(),t._selectable(),t._viewWrapper(),t.options.hasFooter?t._footer(t.footer):t.element.find(".k-footer").hide(),t._index=Pe[t.options.start],t.navigate(),e.weekNumber&&t.element.addClass("k-week-number")},destroy:function(){var e=this,t=e._today;e.element.off(Y),e._title.off(Y),e[Se].off(Y),e[Ie].off(Y),e._destroySelectable(),D.destroy(e._table),t&&D.destroy(t.off(Y)),A.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.trigger("focus")},min:function(e){return this._option(Z,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(Se,-1)},navigateToFuture:function(){this._navigate(Ie,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(le)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,r=n.options.depth;if(e)return i===Pe[r]?(T(n._value,n._current)&&T(n._value,e)||(n.value(e),n.trigger(re)),t):(n.navigate(e,--i),t)},navigate:function(n,i){var r,o,s,l,d,c,u,p,f,h,m,g,b,k,y,w,x;i=isNaN(i)?Pe[i]:i,r=this,o=r.options,s=o.culture,l=o.min,d=o.max,c=r._title,u=r._table,p=r._oldTable,f=r._current,h=n&&+n>+f,m=i!==t&&i!==r._index,w=r.element.children(".k-calendar-view"),n||(n=f),r._current=n=new Ne((+a(n,l,d))),i===t?i=r._index:r._index=i,r._view=b=I.views[i],k=b.compare,y=i===Pe[ie],c.toggleClass(le,y).attr(De,y),y=k(n,l)<1,r[Se].toggleClass(le,y).attr(De,y),r[Se].hasClass(le)&&r[Se].removeClass(se),y=k(n,d)>-1,r[Ie].toggleClass(le,y).attr(De,y),r[Ie].hasClass(le)&&r[Ie].removeClass(se),u&&p&&p.data("animating")&&(p.kendoStop(!0,!0),u.kendoStop(!0,!0)),r._oldTable=u,u&&!r._changeView||(c.html(b.title(n,l,d,s)),r._table=g=e(b.content(ze({min:l,max:d,date:n,url:o.url,dates:o.dates,format:o.format,otherMonth:!0,culture:s,disableDates:o.disableDates,isWeekColumnVisible:o.weekNumber,messages:o.messages,contentClasses:r.options.contentClasses},r[b.name]))),_(g,b.name),v(g),x=u&&u.data("start")===g.data("start"),r._animate({from:u,to:g,vertical:m,future:h,replace:x}),"modern"===r.options.componentType&&(w.removeClass("k-calendar-monthview k-calendar-yearview k-calendar-decadeview k-calendar-centuryview"),w.addClass("k-calendar-"+b.name+"view")),r.trigger(oe),r._focus(n)),i===Pe[o.depth]&&r._selectDates.length>0&&r._visualizeSelectedDatesInView(),"single"===r.options.selectable&&i===Pe[o.depth]&&r._value&&!r.options.disableDates(r._value)&&r._class("k-state-selected",r._value),r._class(de,n),!u&&r._cell&&r._cell.removeClass(de),r._changeView=!0},selectDates:function(n){var i,r,o=this;return n===t?o._selectDates:(r=n.map(function(e){return e.getTime()}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return new Date(e)}),i=e.grep(r,function(e){if(e)return+o._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),o._selectDates=i.length>0?i:0===r.length?r:o._selectDates,o._visualizeSelectedDatesInView(),t)},value:function(e){var n,i=this,r=i._view,o=i._view;return e===t?i._value:(e=i._validateValue(e),e&&i._isMultipleSelection()&&(n=new Date((+e)),n.setHours(0,0,0,0),i._selectDates=[n],i.selectable._lastActive=null),r&&null===e&&i._cell?i._cell.removeClass(ve):(i._changeView=!e||o&&0!==o.compare(e,i._current),i.navigate(e)),t)},_validateValue:function(e){var n=this,i=n.options,r=i.min,o=i.max;return null===e&&(n._current=h(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),e=N(e,i.format,i.culture),null!==e&&(e=new Ne((+e)),s(e,r,o)||(e=null)),null!==e&&n.options.disableDates(new Date((+e)))?n._value===t&&(n._value=null):n._value=e,n._value},_visualizeSelectedDatesInView:function(){var t,n=this,i={};e.each(n._selectDates,function(e,t){i[D.calendar.views[0].toDateString(t)]=t}),n.selectable.clear(),t=n._table.find(he).filter(function(t,n){return i[e(n.firstChild).attr(D.attr(ae))]}),t.length>0&&n.selectable._selectElement(t,!0)},_isMultipleSelection:function(){var e=this;return"multiple"===e.options.selectable},_selectable:function(){var e,t,n=this;n._isMultipleSelection()&&(e=n.options.selectable,t=R.parseOptions(e),t.multiple&&n.element.attr("aria-multiselectable","true"),n.selectable=new R(n.wrapper,{aria:!0,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",multiple:t.multiple,filter:"table.k-month:eq(0) "+me,change:Ae(n._onSelect,n),relatedTarget:Ae(n._onRelatedTarget,n)}))},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(me)&&(t._current=S(e.find("a")),t._class(de,S(e.find("a"))))},_onSelect:function(n){var i=this,r=n,o=R.parseOptions(i.options.selectable);return o.multiple?(r.event.ctrlKey||r.event.metaKey?e(r.event.currentTarget).is(me)?i._toggleSelection(e(r.event.currentTarget)):(i._cellsBySelector(me).each(function(t,n){var r=S(e(n).find("a"));i._deselect(r)}),i._addSelectedCellsToArray()):r.event.shiftKey?i._rangeSelection(i._cell):e(r.event.currentTarget).is(he)?i.value(S(e(r.event.currentTarget).find("a"))):(i._selectDates=[],i._addSelectedCellsToArray()),i.trigger(re),t):(e(r.event.currentTarget).is("td")&&!e(r.event.currentTarget).hasClass("k-state-selected")?e(r.event.currentTarget).addClass("k-state-selected"):i._click(e(r.event.currentTarget).find("a")),t)},_destroySelectable:function(){var e=this;e.selectable&&(e.selectable.destroy(),e.selectable=null)},_toggleSelection:function(e){var t=this,n=S(e.find("a"));e.hasClass("k-state-selected")?t._selectDates.push(n):t._deselect(n)},_rangeSelection:function(e,t){var n,i=this,r=t||S(i.selectable.value().first().find("a")),o=S(e.find("a"));i.selectable._lastActive||i._value?r=i.selectable._lastActive?S(i.selectable._lastActive.find("a")):new Date((+i._value)):i.selectable._lastActive=t?i._cellByDate(i._view.toDateString(t),me):i.selectable.value().first(),i._selectDates=[],n=c(r,o),u(i._selectDates,n,r,i.options.disableDates),i._visualizeSelectedDatesInView()},_cellsBySelector:function(e){var t=this;return t._table.find(e)},_addSelectedCellsToArray:function(){var t=this;t.selectable.value().each(function(n,i){var r=S(e(i.firstChild));t.options.disableDates(r)||t._selectDates.push(r)})},_deselect:function(e){var t=this,n=t._selectDates.map(Number).indexOf(+e);
|
14
|
-
n!=-1&&t._selectDates.splice(n,1)},_dateInView:function(e){var t=this,n=S(t._cellsBySelector(me+":first").find("a")),i=S(t._cellsBySelector(me+":last").find("a"));return+e<=+i&&+e>=+n},_isNavigatable:function(e,t){var n,i,r=this,o=r.options.disableDates;return"month"==r._view.name?!o(e):(i=r.wrapper.find("."+de).index(),n=r.wrapper.find(".k-content td:eq("+(i+t)+")"),n.is(me)||!o(e))},_move:function(n){var i,r,o,l,d,c=this,u=c.options,p=n.keyCode,f=c._view,m=c._index,g=c.options.min,v=c.options.max,_=new Ne((+c._current)),b=D.support.isRtl(c.wrapper),k=c.options.disableDates;return n.target===c._table[0]&&(c._active=!0),p==z.RIGHT&&!b||p==z.LEFT&&b?(i=1,r=!0):p==z.LEFT&&!b||p==z.RIGHT&&b?(i=-1,r=!0):p==z.UP?(i=0===m?-7:-4,r=!0):p==z.DOWN?(i=0===m?7:4,r=!0):p==z.SPACEBAR?(i=0,r=!0):p!=z.HOME&&p!=z.END||(o=p==z.HOME?"first":"last",l=f[o](_),_=new Ne(l.getFullYear(),l.getMonth(),l.getDate(),_.getHours(),_.getMinutes(),_.getSeconds(),_.getMilliseconds()),_.setFullYear(l.getFullYear()),r=!0),n.ctrlKey||n.metaKey?p==z.RIGHT&&!b||p==z.LEFT&&b?(c.navigateToFuture(),r=!0):p==z.LEFT&&!b||p==z.RIGHT&&b?(c.navigateToPast(),r=!0):p==z.UP?(c.navigateUp(),r=!0):p==z.DOWN?(c._click(e(c._cell[0].firstChild)),r=!0):p!=z.ENTER&&p!=z.SPACEBAR||!c._isMultipleSelection()||(c._keyboardToggleSelection(n),d=S(e(c._cell[0]).find("a")),c._class(de,d)):n.shiftKey?(i!==t||o)&&(o||f.setDate(_,i),s(_,g,v)||(_=a(_,u.min,u.max)),k(_)&&(_=c._nextNavigatable(_,i)),g=h(g.getFullYear(),g.getMonth(),g.getDate()),c._isMultipleSelection()?c._keyboardRangeSelection(n,_):c._focus(_)):(p==z.ENTER||p==z.SPACEBAR?("month"==f.name&&c._isMultipleSelection()?(c.value(S(e(c._cell.find("a")))),c.selectable._lastActive=e(c._cell[0]),c.trigger(re)):c._click(e(c._cell[0].firstChild)),r=!0):p==z.PAGEUP?(r=!0,c.navigateToPast()):p==z.PAGEDOWN&&(r=!0,c.navigateToFuture()),(i||o)&&(o||f.setDate(_,i),g=h(g.getFullYear(),g.getMonth(),g.getDate()),s(_,g,v)||(_=a(_,u.min,u.max)),c._isNavigatable(_,i)||(_=c._nextNavigatable(_,i)),c._isMultipleSelection()?c._dateInView(_)?(c._current=_,c._class(de,_)):c.navigate(_):c._focus(_))),r&&n.preventDefault(),c._current},_keyboardRangeSelection:function(e,n){var i,r,o=this;return o._dateInView(n)?(o.selectable.options.filter=o.wrapper.find("table").length>1&&+n>+o._current?"table.k-month:eq(1) "+me:"table.k-month:eq(0) "+me,o._class(de,n),o._current=n,o._rangeSelection(o._cellByDate(o._view.toDateString(n),me),n),o.trigger(re),o.selectable.options.filter="table.k-month:eq(0) "+me,t):(o._selectDates=[],i=o.selectable._lastActive?S(o.selectable._lastActive.find("a")):n,r=c(i,new Date((+n))),u(o._selectDates,r,i,o.options.disableDates),o.navigate(n),o._current=n,o.selectable._lastActive=o.selectable._lastActive||o._cellByDate(o._view.toDateString(n),me),o.trigger(re),t)},_keyboardToggleSelection:function(t){var n=this;t.currentTarget=n._cell[0],n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(ve)?(n.selectable._unselect(e(n._cell[0])),n.selectable.trigger(re,{event:t})):n.selectable.value(e(n._cell[0]),{event:t})},_nextNavigatable:function(e,t){var n=this,i=!0,r=n._view,o=n.options.min,a=n.options.max,l=n.options.disableDates,d=new Date(e.getTime());for(r.setDate(d,-t);i;){if(r.setDate(e,t),!s(e,o,a)){e=d;break}i=l(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,r=t._active,o=t.element.children(".k-calendar-view");n?n.parent().data("animating")?(n.off(Y),n.parent().kendoStop(!0,!0).remove(),n.remove(),o.append(i),t._focusView(r)):!n.is(":visible")||t.options.animation===!1||e.replace?(i.insertAfter(n),n.off(Y).remove(),t._focusView(r)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(o.append(i),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,r=i._active,o=i.options.animation.horizontal,a=o.effects,s=K(e);a&&a.indexOf(te)!=-1&&(e.add(t).css({width:s}),e.wrap("<div/>"),i._focusView(r,e),e.parent().css({position:"relative",width:2*s,"float":ee,"margin-left":n?0:-s}),t[n?"insertAfter":"insertBefore"](e),ze(o,{effects:te+":"+(n?"right":ee),complete:function(){e.off(Y).remove(),i._oldTable=null,t.unwrap(),i._focusView(r)}}),e.parent().kendoStop(!0,!0).kendoAnimate(o))},_vertical:function(e,t){var n,i,r=this,o=r.options.animation.vertical,a=o.effects,s=r._active;a&&a.indexOf("zoom")!=-1&&(t.insertBefore(e),e.css({position:"absolute",width:t.width()}),V&&(n=r._cellByDate(r._view.toDateString(r._current)),i=n.position(),i=i.left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10)+"px"),t.css(V,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(Y).remove(),r._oldTable=null,r._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t,n){return this._table.find(n?n:"td:not(."+ce+")").filter(function(){return e(this.firstChild).attr(D.attr(ae))===t})},_class:function(e,t){var n,i=this,r=i._cellID,o=i._cell,a=i._view.toDateString(t);o&&o.length&&(o[0].removeAttribute(Fe),o[0].removeAttribute(Ee),o[0].removeAttribute(J)),t&&"month"==i._view.name&&(n=i.options.disableDates(t)),i._cellsBySelector(i._isMultipleSelection()?he:"td:not(."+ce+")").removeClass(e),o=i._cellByDate(a,"multiple"==i.options.selectable?he:"td:not(."+ce+")").attr(Fe,!0),(e===de&&!i._active&&i.options.focusOnNav!==!1||n)&&(e=""),o.addClass(e),o[0]&&(i._cell=o),r&&(o.attr(J,r),i._table[0].removeAttribute("aria-activedescendant"),i._table.attr("aria-activedescendant",r))},_bindTable:function(e){e.on(ke,this._addClassProxy).on(_e,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date((+t._current)),r=S(e);P(r,0),"month"==t._view.name&&t.options.disableDates(r)&&(r=t._value),t._view.setDate(i,r),t.navigateDown(a(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(de,e))},_focusView:function(e,t){e&&this.focus(t)},_viewWrapper:function(){var t=this,n=t.element,i=n.children(".k-calendar-view");i[0]||(i=e("<div class='k-calendar-view' />").insertAfter(n.find(He)))},_footer:function(n){var i=this,r=o(),a=i.element,s=a.find(".k-footer");return n?(s[0]||(s=e('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(a)),i._today=s.show().find(".k-link").html(n(r)).attr("title",D.toString(r,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),s.hide(),t)},_header:function(){var t=this,n=t.element,i=t.options.linksSelector;n.find(He)[0]||n.html(D.template(t.options.header.template)(e.extend(!0,{},t.options,{actionAttr:D.attr("action")}))),n.find(i).on(we+" "+xe+" "+ke+" "+_e,p).on(Q+" touchend"+Y,function(){return!1}),t._title=n.find("["+D.attr("action")+'="nav-up"]').on(Q+" touchend"+Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[Se]=n.find("["+D.attr("action")+'="prev"]').on(Q+" touchend"+Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[Ie]=n.find("["+D.attr("action")+'="next"]').on(Q+" touchend"+Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()}),n.find("["+D.attr("action")+'="today"]').on(Q+" touchend"+Y,Ae(t._todayClick,t))},_navigate:function(e,t){var n,i=this,r=i._index+1,o=new Ne((+i._current));i._isMultipleSelection()&&(n=i._table.find("td:not(.k-other-month):not(.k-out-of-range)").has(".k-link").first(),o=S(n.find("a")),i._current=new Date((+o))),e=i[e],e.hasClass(le)||(r>3?o.setFullYear(o.getFullYear()+100*t):I.views[r].setDate(o,t),i.navigate(o))},_option:function(e,n){var i,r=this,o=r.options,a=r._value||r._current;return n===t?o[e]:(n=N(n,o.format,o.culture),n&&(o[e]=new Ne((+n)),i=e===Z?n>a:a>n,(i||y(a,n))&&(i&&(r._value=null),r._changeView=!0),r._changeView||(r._changeView=!(!o.month.content&&!o.month.empty)),r.navigate(r._value),r._toggle()),t)},_toggle:function(e){var n=this,i=n.options,r=n.options.disableDates(o()),a=n._today;e===t&&(e=s(o(),i.min,i.max)),a&&(a.off(Q),e&&!r?a.addClass(fe).removeClass(le).on(Q,Ae(n._todayClick,n)):a.removeClass(fe).addClass(le).on(Q,f))},_todayClick:function(e){var t=this,n=Pe[t.options.depth],i=t.options.disableDates,r=o();e.preventDefault(),i(r)||(0===t._view.compare(t._current,r)&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[r],t.selectable._lastActive=null),t._value=r,t.navigate(r,n),t.trigger(re))},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,r=i.content,o=i.weekNumber,a=i.empty,s='#= kendo.toString(data,"D","'+t.culture+'") #';e.month={content:M('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+D.attr(ae)+'="#=data.dateString#" title="#=data.title#">'+(r||"#=data.value#")+"</a></td>",{useWithBlock:!!r}),empty:M('<td role="gridcell">'+(a||" ")+"</td>",{useWithBlock:!!a}),weekNumber:M('<td class="k-alt">'+(o||"#= data.weekNumber #")+"</td>",{useWithBlock:!!o})},n&&n!==!0&&(s=n),e.footer=n!==!1?M(s,{useWithBlock:!1}):null}});E.plugin(Me),I={firstDayOfMonth:function(e){return h(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||D.culture().calendar;var n=t.firstDay,i=new Ne(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(i.setFullYear(e.getFullYear());i.getDay()!=n;)I.setTime(i,-1*Te);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new Ne(e.getTime()+t),r=i.getTimezoneOffset()-n;e.setTime(i.getTime()+r*Ce)},views:[{name:ne,title:function(e,t,n,i){return m(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,n=0,r=e.min,a=e.max,s=e.date,d=e.dates,c=e.format,u=e.culture,p=e.url,f=e.showHeader,g=e.otherMonth,v=e.isWeekColumnVisible,_=p&&d[0],k=m(u),y=k.firstDay,w=k.days,x=l(w.names,y),C=l(w.namesShort,y),T=I.firstVisibleDay(s,k),S=t.first(s),F=t.last(s),E=t.toDateString,A=o(),z=e.contentClasses,N='<table tabindex="0" role="grid" class="'+z+'" cellspacing="0" data-start="'+E(T)+'">';for(N+=f?'<caption class="k-month-header">'+this.title(s,r,a,u)+'</caption><thead><tr role="row">':'<thead><tr role="row">',v&&(N+='<th scope="col" class="k-alt">'+e.messages.weekColumnHeader+"</th>");n<7;n++)N+='<th scope="col" title="'+x[n]+'">'+C[n]+"</th>";return P(A,0),A=+A,i({cells:42,perRow:7,html:N+='</tr></thead><tbody><tr role="row">',start:T,isWeekColumnVisible:v,weekNumber:e.weekNumber,min:h(r.getFullYear(),r.getMonth(),r.getDate()),max:h(a.getFullYear(),a.getMonth(),a.getDate()),otherMonth:g,content:e.content,lastDayOfMonth:F,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,n){var i=[],r=e.getDay(),o="",a="#";return(e<S||e>F)&&i.push(ce),n(e)&&i.push(le),+e===A&&i.push("k-today"),0!==r&&6!==r||i.push("k-weekend"),_&&b(+e,d)&&(a=p.replace("{0}",D.toString(e,c,u)),o=" k-action-link"),{date:e,dates:d,ns:D.ns,title:D.toString(e,"D",u),value:e.getDate(),dateString:E(e),cssClass:i[0]?' class="'+i.join(" ")+'"':"",linkClass:o,url:a}},weekNumberBuild:function(e){return{weekNumber:H(e,D.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return I.firstDayOfMonth(e)},last:function(e){var t=h(e.getFullYear(),e.getMonth()+1,0),n=I.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),r=e.getFullYear(),o=t.getMonth(),a=t.getFullYear();return n=r>a?1:r<a?-1:i==o?0:i>o?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof Ne?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):I.setTime(e,t*Te),P(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=m(e.culture).months.namesAbbr,n=this.toDateString,r=e.min,o=e.max,a="";return e.showHeader&&(a+='<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><caption class="k-meta-header">',a+=this.title(e.date),a+='</caption><tbody><tr role="row">'),i({min:h(r.getFullYear(),r.getMonth(),1),max:h(o.getFullYear(),o.getMonth(),1),start:h(e.date.getFullYear(),0,1),html:a,setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:D.ns,dateString:n(e),cssClass:""}}})},first:function(e){return h(e.getFullYear(),0,e.getDate())},last:function(e){return h(e.getFullYear(),11,e.getDate())},compare:function(e,t){return r(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof Ne?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),P(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString,r="";return e.showHeader&&(r+='<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><caption class="k-meta-header">',r+=this.title(e.date,e.min,e.max),r+='</caption><tbody><tr role="row">'),i({start:h(t-t%10-1,0,1),min:h(e.min.getFullYear(),0,1),max:h(e.max.getFullYear(),0,1),otherMonth:e.otherMonth,html:r,setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:D.ns,dateString:n(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return h(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return h(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,10)},setDate:function(e,t){d(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:ie,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),r=e.max.getFullYear(),o=this.toDateString,a=n,s=r,l="";return a-=a%10,s-=s%10,s-a<10&&(s=a+9),e.showHeader&&(l+='<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><caption class="k-meta-header">',l+=this.title(e.date,e.min,e.max),l+='</caption><tbody><tr role="row">'),i({start:h(t-t%100-10,0,1),min:h(a,0,1),max:h(s,0,1),otherMonth:e.otherMonth,html:l,setter:this.setDate,build:function(e,t){var i=e.getFullYear(),a=i+9;return i<n&&(i=n),a>r&&(a=r),{ns:D.ns,value:i+" - "+a,dateString:o(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return h(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return h(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,100)},setDate:function(e,t){d(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},I.isEqualDatePart=k,I.isEqualDate=T,I.makeUnselectable=v,I.restrictValue=a,I.isInRange=s,I.addClassToViewContainer=_,I.normalize=g,I.viewsEnum=Pe,I.disabled=w,I.toDateObject=S,I.getToday=o,I.createDate=h,D.calendar=I}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dateinput.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t,n,i){var r,o,a,s,l=e[i+e.length-n.length];if(e=e.substring(0,i+e.length-n.length),n=n.substring(0,i),r=[],e===n&&i>0)return r.push([t[i-1],n[i-1]]),r;if(0===e.indexOf(n)&&(0===n.length||t[n.length-1]!==t[n.length])){for(a="",o=n.length;o<e.length;o++)t[o]!==a&&k.indexOf(t[o])>=0&&(a=t[o],r.push([a,""]));return r}if(" "===n[n.length-1]||n[n.length-1]===l)return[[t[i-1]," "]];if(0===n.indexOf(e)||k.indexOf(t[i-1])===-1){for(s=t[0],o=Math.max(0,e.length-1);o<t.length;o++)if(k.indexOf(t[o])>=0){s=t[o];break}return[[s,n[i-1]]]}return[[t[i-1],n[i-1]]]}var i,r=window,o=r.kendo,a=o.caret,s=o.ui,l=s.Widget,d=o.keys,c=".kendoDateInput",u=e.proxy,p={}.toString,f=(o.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+c,h="k-state-disabled",m="k-state-default",g="k-state-invalid",v="disabled",_="readonly",b="change",k="dMyHhmftsz",y=l.extend({init:function(t,n){var i,r,a=this;l.fn.init.call(a,t,n),t=a.element,n=a.options,n.format=o._extractFormat(n.format||o.getCulture(n.culture).calendars.standard.patterns.d),n.min=o.parseDate(t.attr("min"))||o.parseDate(n.min),n.max=o.parseDate(t.attr("max"))||o.parseDate(n.max),i=(t.parent().attr("class")||"").indexOf("k-picker-wrap")>=0,i?a.wrapper=t.parent():(a.wrapper=t.wrap("<span class='k-widget k-dateinput'></span>").parent(),a.wrapper.addClass(t[0].className).removeClass("input-validation-error"),a.wrapper[0].style.cssText=t[0].style.cssText,t.css({width:"100%",height:t[0].style.height})),a._inputWrapper=e(a.wrapper[0]),e("<span class='k-icon k-i-warning'></span>").insertAfter(t),a._form(),a.element.addClass(i?" ":"k-textbox").attr("autocomplete","off").on("focusout"+c,function(){a._change()});try{t[0].setAttribute("type","text")}catch(s){t[0].type="text"}r=t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled"),r?a.enable(!1):a.readonly(t.is("[readonly]")),a.value(a.options.value||t.val()),o.notify(a)},options:{name:"DateInput",culture:"",value:"",format:"",min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:"year",month:"month",day:"day",weekday:"day of the week",hour:"hours",minute:"minutes",second:"seconds",dayperiod:"AM/PM"}},events:[b],min:function(e){return e===t?this.options.min:(this.options.min=e,t)},max:function(e){return e===t?this.options.max:(this.options.max=e,t)},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),this._unbindInput(),this._bindInput(),this._updateElementValue()},destroy:function(){var e=this;e.element.off(c),e._formElement&&e._formElement.off("reset",e._resetHandler),l.fn.destroy.call(e)},value:function(e){return e===t?this._dateTime.getDateObject():(null===e&&(e=""),"[object Date]"!==p.call(e)&&(e=o.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this._dateTime=new i(e,this.options.format,this.options.culture,this.options.messages),this._updateElementValue(),this._oldValue=e,t)},_updateElementValue:function(){var e=this._dateTime.toPair(this.options.format,this.options.culture,this.options.messages);this.element.val(e[0]),this._oldText=e[0],this._format=e[1]},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e=this;e.element.on("focusout"+c,function(){e._change()}).on("paste"+c,u(e._paste,e)).on("keydown"+c,u(e._keydown,e)).on(f,u(e._input,e)).on("mouseup"+c,u(e._mouseUp,e)).on("DOMMouseScroll"+c+" mousewheel"+c,u(e._scroll,e))},_unbindInput:function(){this.element.off("keydown"+c).off("paste"+c).off("focusout"+c).off(f).off("mouseup"+c).off("DOMMouseScroll"+c+" mousewheel"+c)},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t.wrapper;t._unbindInput(),r||i?(i&&(o.addClass(h).removeClass(m),n.attr(v,i),n&&n.length&&n[0].removeAttribute(_)),r&&n.attr(_,r)):(o.addClass(m).removeClass(h),n&&n.length&&(n[0].removeAttribute(v),n[0].removeAttribute(_)),t._bindInput())},_change:function(){var e=this,t=e._oldValue,n=e.value();n&&e.min()&&n<e.min()&&(e.value(e.min()),n=e.value()),n&&e.max()&&n>e.max()&&(e.value(e.max()),n=e.value()),(t&&n&&n.getTime()!==t.getTime()||t&&!n||!t&&n)&&(e._oldValue=n,e.trigger(b),e.element.trigger(b))},_input:function(){var e,t,i,r,s,l,d,c=this,u=c.element[0],p=!1;if(o._activeElement()===u){if(e=n(this._oldText,this._format,this.element[0].value,a(this.element[0])[0]),t=1===e.length&&" "===e[0][1],!t)for(i=0;i<e.length;i++)r=this._dateTime.parsePart(e[i][0],e[i][1]),p=p||!r;this._updateElementValue(),e.length&&" "!==e[0][0]&&(this._selectSegment(e[0][0]),t||(s=e[0][0],setTimeout(function(){c._selectSegment(s)}))),t&&(l={keyCode:39,preventDefault:function(){}},this._keydown(l)),p&&(clearTimeout(c._blinkInvalidTimeout),d=g,c.wrapper.addClass(g),c._blinkInvalidTimeout=setTimeout(function(){c.wrapper.removeClass(d)},100))}},_mouseUp:function(){var e=a(this.element[0]);e[0]===e[1]&&this._selectNearestSegment()},_scroll:function(e){if(o._activeElement()===this.element[0]&&!this.element.is("[readonly]")){e=window.event||e;var t={keyCode:37,preventDefault:function(){}};t.keyCode=e.shiftKey?(e.wheelDelta||-e.detail)>0?37:39:(e.wheelDelta||-e.detail)>0?38:40,this._keydown(t),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},_form:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form"),o=n[0].value;!o&&t.options.value&&(o=t.options.value),r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(o)})},t._formElement=r.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()},_keydown:function(e){var t,n,i,r,s,l,c,u=e.keyCode;if(37==u||39==u)for(e.preventDefault(),t=a(this.element[0]),t[0]!=t[1]&&this._selectNearestSegment(),n=37==u?-1:1,i=n==-1?a(this.element[0])[0]-1:a(this.element[0])[1]+1;i>=0&&i<this._format.length;){if(k.indexOf(this._format[i])>=0){this._selectSegment(this._format[i]);break}i+=n}38!=u&&40!=u||(e.preventDefault(),t=a(this.element[0]),r=this._format[t[0]],k.indexOf(r)>=0&&(s=1,"m"==r&&(s=this.options.interval||1),this._dateTime.modifyPart(r,38==u?1*s:s*-1),this._updateElementValue(),this._selectSegment(r),this.element.trigger(b))),o.support.browser.msie&&o.support.browser.version<10&&(l=e.keyCode?e.keyCode:e.which,8!==l&&46!==l||(c=this,setTimeout(function(){c._input()},0))),u===d.ENTER&&this._change()},_selectNearestSegment:function(){var e,n,i=a(this.element[0]),r=i[0];for(e=r,n=r-1;e<this._format.length||n>=0;e++,n--){if(e<this._format.length&&k.indexOf(this._format[e])!==-1)return this._selectSegment(this._format[e]),t;if(n>=0&&k.indexOf(this._format[n])!==-1)return this._selectSegment(this._format[n]),t}},_selectSegment:function(e){var t,n=-1,i=0;for(t=0;t<this._format.length;t++)this._format[t]===e&&(i=t+1,n===-1&&(n=t));n<0&&(n=0),a(this.element,n,i)}});s.plugin(y),i=function(e,n,i,r){function a(e,t,n){return e+="",t=t||2,n=t-e.length,n?w[t].substring(0,n)+e:e}function s(e){return I=e,D}function l(e,t){switch(e){case"y":p=t;break;case"M":f=t,t||(u.setMonth(0),b="");break;case"d":h=t;break;case"H":case"h":m=t,t||(k="");break;case"m":g=t;break;case"s":v=t;break;default:return}}var d,c,u=null,p=!0,f=!0,h=!0,m=!0,g=!0,v=!0,_=!0,b="",k="",y={},w=["","0","00","000","0000"],x=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,C=null,T=null,S=null,I=!1,D=function(e){var n,i,r,o,s;switch(e){case"d":r=h?u.getDate():y.day;break;case"dd":r=h?a(u.getDate()):y.day;break;case"ddd":r=h&&f&&p?S.namesAbbr[u.getDay()]:y.weekday;break;case"dddd":r=h&&f&&p?S.names[u.getDay()]:y.weekday;break;case"M":r=f?u.getMonth()+1:y.month;break;case"MM":r=f?a(u.getMonth()+1):y.month;break;case"MMM":r=f?C.namesAbbr[u.getMonth()]:y.month;break;case"MMMM":r=f?C.names[u.getMonth()]:y.month;break;case"yy":r=p?a(u.getFullYear()%100):y.year;break;case"yyyy":r=p?a(u.getFullYear(),4):y.year;break;case"h":r=m?u.getHours()%12||12:y.hour;break;case"hh":r=m?a(u.getHours()%12||12):y.hour;break;case"H":r=m?u.getHours():y.hour;break;case"HH":r=m?a(u.getHours()):y.hour;break;case"m":r=g?u.getMinutes():y.minute;break;case"mm":r=g?a(u.getMinutes()):y.minute;break;case"s":r=v?u.getSeconds():y.second;break;case"ss":r=v?a(u.getSeconds()):y.second;break;case"f":r=_?Math.floor(u.getMilliseconds()/100):_;break;case"ff":r=u.getMilliseconds(),r>99&&(r=Math.floor(r/10)),r=_?a(r):e;break;case"fff":r=_?a(u.getMilliseconds(),3):e;break;case"tt":r=m?u.getHours()<12?T.AM[0]:T.PM[0]:y.dayperiod;break;case"zzz":n=u.getTimezoneOffset(),i=n<0,r=(""+Math.abs(n/60)).split(".")[0],n=Math.abs(n)-60*r,r=(i?"+":"-")+a(r),r+=":"+a(n);break;case"z":case"zz":r=u.getTimezoneOffset()/60,i=r<0,r=(""+Math.abs(r)).split(".")[0],r=(i?"+":"-")+("zz"===e?a(r):r)}if(r=r!==t?r:e.slice(1,e.length-1),I){for(r=""+r,o="","ddd"==e&&(e="EEE"),"dddd"==e&&(e="EEEE"),s=0;s<r.length;s++)o+=e[0];return o}return r};if(this.setValue=function(e){h=e},this.getValue=function(){return h},this.modifyPart=function(e,t){var n,i=new Date(u&&u.getTime?u.getTime():u);switch(e){case"y":i.setFullYear(i.getFullYear()+t);break;case"M":n=i.getMonth()+t,i.setMonth(n),i.getMonth()%12!==(n+12)%12&&(i.setDate(1),i.setMonth(n));break;case"d":case"E":i.setDate(i.getDate()+t);break;case"H":case"h":i.setHours(i.getHours()+t);break;case"m":i.setMinutes(i.getMinutes()+t);break;case"s":i.setSeconds(i.getSeconds()+t);break;case"t":i.setHours((i.getHours()+12)%24)}i.getFullYear()>0&&(l(e,!0),u=i)},this.parsePart=function(e,t){var n,i,r,o,a,s,d,c,_,y;if(!t)return l(e,!1),!0;switch(n=new Date(u&&u.getTime?u.getTime():u),i=new Date(n.getFullYear(),n.getMonth()+1,0).getDate(),e){case"d":if(o=(h?10*n.getDate():0)+parseInt(t,10),isNaN(o))return;for(;o>i;)o=parseInt((""+o).slice(1),10);if(o<1)h=!1;else{if(n.setDate(o),n.getMonth()!==u.getMonth())return;h=!0}break;case"M":if(a=(f?10*(n.getMonth()+1):0)+parseInt(t,10),isNaN(a)){for(s=T.months.names,b+=t.toLowerCase();b.length>0;){for(d=0;d<s.length;d++)if(0===s[d].toLowerCase().indexOf(b))return n.setMonth(d),f=!0,u=n,!0;b=b.substring(1,b.length)}return!1}for(;a>12;)a=parseInt((""+a).slice(1),10);a<1?f=!1:(n.setMonth(a-1),n.getMonth()!==a-1&&(n.setDate(1),n.setMonth(a-1)),f=!0);break;case"y":if(c=(p?10*n.getFullYear():0)+parseInt(t,10),isNaN(c))return;for(;c>9999;)c=parseInt((""+c).slice(1),10);c<1?p=!1:(n.setFullYear(c),p=!0);break;case"h":if(r=(m?10*(n.getHours()%12||12):0)+parseInt(t,10),isNaN(r))return;for(;r>12;)r=parseInt((""+r).slice(1),10);n.setHours(12*Math.floor(n.getHours()/12)+r%12),m=!0;break;case"H":if(r=(m?10*n.getHours():0)+parseInt(t,10),isNaN(r))return;for(;r>23;)r=parseInt((""+r).slice(1),10);n.setHours(r),m=!0;break;case"m":if(_=(g?10*n.getMinutes():0)+parseInt(t,10),isNaN(_))return;for(;_>59;)_=parseInt((""+_).slice(1),10);n.setMinutes(_),g=!0;break;case"s":if(y=(v?10*n.getSeconds():0)+parseInt(t,10),isNaN(y))return;for(;y>59;)y=parseInt((""+y).slice(1),10);n.setSeconds(y),v=!0;break;case"t":if(m){for(k+=t.toLowerCase();k.length>0;){if(0===T.AM[0].toLowerCase().indexOf(k)&&n.getHours()>=12||0===T.PM[0].toLowerCase().indexOf(k)&&n.getHours()<12)return n.setHours((n.getHours()+12)%24),u=n,!0;k=k.substring(1,k.length)}return!1}}return u=n,!0},this.toPair=function(e,t,n){return e?(t=o.getCulture(t),T=t.calendars.standard,e=T.patterns[e]||e,S=T.days,C=T.months,y=n,[e.replace(x,s(!1)),e.replace(x,s(!0))]):["",""]},this.getDateObject=function(){return p&&f&&h&&m&&g&&v&&_?new Date(u.getTime()):null},e)u=new Date(e.getTime());else for(u=new Date,d=this.toPair(n,i,r)[1],c=0;c<d.length;c++)l(d[c],!1)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.datepicker.min",["kendo.calendar.min","kendo.popup.min","kendo.dateinput.min"],e)}(function(){return function(e,t){function n(t){var n=t.parseFormats,i=t.format;M.normalize(t),n=e.isArray(n)?n:[n],n.length||n.push("yyyy-MM-dd"),e.inArray(i,n)===-1&&n.splice(0,0,t.format),t.parseFormats=n}function i(e){e.preventDefault()}var r,o=window.kendo,a=o.ui,s=a.Widget,l=o.parseDate,d=o.keys,c=o.support,u=o.template,p=o._activeElement,f="<div />",h="<span />",m=".kendoDatePicker",g="click"+m,v=c.mouseAndTouchPresent?o.applyEventMap("up",m.slice(1)):g,_="open",b="close",k="change",y="disabled",w="readonly",x="k-state-default",C="k-state-focused",T="k-state-selected",S="k-state-disabled",I="k-state-hover",D="mouseenter"+m+" mouseleave"+m,F="mousedown"+m,E="id",A="min",z="max",N="month",P="aria-disabled",H="aria-readonly",R="aria-expanded",O="aria-hidden",M=o.calendar,B=M.isInRange,L=M.restrictValue,V=M.isEqualDatePart,U=e.extend,W=e.proxy,j=Date,q=function(t){var n,i=this,r=document.body,s=e(f).attr(O,"true").addClass("k-calendar-container");i.options=t=t||{},n=t.id,t.omitPopup?s=t.dateDiv:(s.appendTo(r),i.popup=new a.Popup(s,U(t.popup,t,{name:"Popup",isRtl:o.support.isRtl(t.anchor)}))),n&&(n+="_dateview",s.attr(E,n),i._dateViewID=n),i.div=s,i.value(t.value)};q.prototype={_calendar:function(){var t,n=this,r=n.calendar,s=n.options;r||(t=e(f).attr(E,o.guid()).appendTo(s.omitPopup?s.dateDiv:n.popup.element).on(F,i).on(g,"td:has(.k-link)",W(n._click,n)),n.calendar=r=new a.Calendar(t,{componentType:s.componentType}),n._setOptions(s),o.calendar.makeUnselectable(r.element),r.navigate(n._value||n._current,s.start),n.value(n._value))},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,disableDates:e.disableDates})},setOptions:function(e){var t=this.options,n=e.disableDates;n&&(e.disableDates=M.disabled(n)),this.options=U(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup&&this.popup.destroy()},open:function(){var e,t=this;t._calendar(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout(function(){t.popup._hovered=e},1)},close:function(){this.popup.close()},min:function(e){this._option(A,e)},max:function(e){this._option(z,e)},toggle:function(){var e=this;e[e.popup.visible()?b:_]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,r=e.ctrlKey&&n==d.DOWN||n==d.ENTER,o=!1;if(e.altKey)n==d.DOWN?(t.open(),e.preventDefault(),o=!0):n==d.UP&&(t.close(),e.preventDefault(),o=!0);else if(t.popup&&t.popup.visible()){if(n==d.ESC||r&&i._cell.hasClass(T))return t.close(),e.preventDefault(),!0;n!=d.SPACEBAR&&(t._current=i._move(e)),o=!0}return o},current:function(e){this._current=e,this.calendar&&this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options,r=i.disableDates;r&&r(e)&&(e=null),t._value=e,t._current=new j((+L(e,i.min,i.max))),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(T)!==-1&&(this.calendar.trigger("change"),this.close())},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},q.normalize=n,o.DateView=q,r=s.extend({init:function(t,i){var r,a,d=this;s.fn.init.call(d,t,i),t=d.element,i=d.options,i.disableDates=o.calendar.disabled(i.disableDates),i.min=l(t.attr("min"))||l(i.min),i.max=l(t.attr("max"))||l(i.max),n(i),d._initialOptions=U({},i),d._wrapper(),d.dateView=new q(U({},i,{id:t.attr(E),anchor:d.wrapper,change:function(){d._change(this.value()),d.close()},close:function(e){d.trigger(b)?e.preventDefault():(t.attr(R,!1),a.attr(O,!0))},open:function(e){var n,i=d.options;d.trigger(_)?e.preventDefault():(d.element.val()!==d._oldText&&(n=l(t.val(),i.parseFormats,i.culture),d.dateView[n?"current":"value"](n)),t.attr(R,!0),a.attr(O,!1),d._updateARIA(n))}})),a=d.dateView.div,d._icon();try{t[0].setAttribute("type","text")}catch(c){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":d.dateView._dateViewID,autocomplete:"off"}),d._reset(),d._template(),r=t.is("[disabled]")||e(d.element).parents("fieldset").is(":disabled"),r?d.enable(!1):d.readonly(t.is("[readonly]")),d._createDateInput(i),d._old=d._update(i.value||d.element.val()),d._oldText=t.val(),o.notify(d)},events:[_,b,k],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:N,depth:N,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#',dateInput:!1,weekNumber:!1,componentType:"classic"},setOptions:function(e){var t=this,i=t._value;s.fn.setOptions.call(t,e),e=t.options,e.min=l(e.min),e.max=l(e.max),n(e),t.dateView.setOptions(e),t._createDateInput(e),t._dateInput||t.element.val(o.toString(i,e.format,e.culture)),i&&t._updateARIA(i)},_editable:function(e){var t=this,n=t._dateIcon.off(m),r=t.element.off(m),o=t._inputWrapper.off(m),a=e.readonly,s=e.disable;a||s?(o.addClass(s?S:x).removeClass(s?x:S),r.attr(y,s).attr(w,a).attr(P,s).attr(H,a)):(o.addClass(x).removeClass(S).on(D,t._toggleHover),r&&r.length&&(r[0].removeAttribute(y),r[0].removeAttribute(w)),r.attr(P,!1).attr(P,!1).on("keydown"+m,W(t._keydown,t)).on("focusout"+m,W(t._blur,t)).on("focus"+m,function(){t._inputWrapper.addClass(C)}),n.on(v,W(t._click,t)).on(F,i))},readonly:function(e){this._editable({readonly:e===t||e,
|
15
|
-
disable:!1}),this._dateInput&&this._dateInput._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._dateInput&&this._dateInput._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(m),e._dateIcon.off(m),e._inputWrapper.off(m),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(A,e)},max:function(e){return this._option(z,e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null!==n._old||n._dateInput||n.element.val(""),n._oldText=n.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(I,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&(e._change(t),t||e.dateView.current(o.calendar.getToday())),e._inputWrapper.removeClass(C)},_click:function(e){var t=this;t.dateView.toggle(),t._focusElement(e.type)},_focusElement:function(e){var t=this.element;c.touch&&(!c.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===p()||t.trigger("focus")},_change:function(e){var t,n,i,r=this,a=r.element.val();e=r._update(e),t=!o.calendar.isEqualDate(r._old,e),n=t&&!r._typing,i=a!==r.element.val(),(n||i)&&r.element.trigger(k),t&&(r._old=e,r._oldText=r.element.val(),r.trigger(k)),r._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),r=!1;n.popup.visible()||e.keyCode!=d.ENTER||i===t._oldText?(r=n.move(e),t._updateARIA(n._current),r?t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation():t._typing=!0):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-calendar"></span></span>').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=l(n,r.parseFormats,r.culture),n&&(r[e]=new j((+n)),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,r=i.min,a=i.max,s=n._value,d=l(e,i.parseFormats,i.culture),c=null===d&&null===s||d instanceof Date&&s instanceof Date;return i.disableDates(d)&&(d=null,n._old||n.element.val()||(e=null)),+d===+s&&c?(t=o.toString(d,i.format,i.culture),t===e||n._dateInput&&!d||n.element.val(null===d?e:t),d):(null!==d&&V(d,r)?d=L(d,r,a):B(d,r,a)||(d=null),n._value=d,n.dateView.value(d),n._dateInput&&d?n._dateInput.value(d||e):n.element.val(o.toString(d||e,i.format,i.culture)),n._updateARIA(d),d)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(h).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(h).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker").addClass(i[0].className).removeClass("input-validation-error"),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=t.options,a=r.disableDates,s=r.parseFormats.length?r.parseFormats:null,l=t._initialOptions.value,d=i?e("#"+i):n.closest("form"),c=n[0].defaultValue;l&&a&&a(l)&&(l=null),c&&o.parseDate(c,s,r.culture)||!l||n.attr("value",o.toString(l,r.format,r.culture)),d[0]&&(t._resetHandler=function(){t.value(l||n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=d.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new a.DateInput(this.element,{culture:e.culture,format:e.format,min:e.min,max:e.max}))},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element&&n.element.length&&n.element[0].removeAttribute("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),a.plugin(r)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dropdownlist.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t,n){for(var i,r=0,o=t.length-1;r<o;++r)i=t[r],i in e||(e[i]={}),e=e[i];e[t[o]]=n}function i(e,t){return e>=t&&(e-=t),e}function r(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}var o=window.kendo,a=o.ui,s=a.List,l=a.Select,d=o.support,c=o._activeElement,u=o.data.ObservableObject,p=o.keys,f=".kendoDropDownList",h=f+"FocusEvent",m="disabled",g="readonly",v="change",_="k-state-focused",b="k-state-default",k="k-state-disabled",y="aria-disabled",w="aria-readonly",x="click"+f+" touchend"+f,C="mouseenter"+f+" mouseleave"+f,T="tabindex",S="filter",I="accept",D="The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",F=e.proxy,E=l.extend({init:function(n,i){var r,a,s,d=this,c=i&&i.index;d.ns=f,i=e.isArray(i)?{dataSource:i}:i,l.fn.init.call(d,n,i),i=d.options,n=d.element.on("focus"+f,F(d._focusHandler,d)),d._focusInputHandler=e.proxy(d._focusInput,d),d.optionLabel=e(),d._optionLabel(),d._inputTemplate(),d._reset(),d._prev="",d._word="",d._wrapper(),d._tabindex(),d.wrapper.data(T,d.wrapper.attr(T)),d._span(),d._popup(),d._mobile(),d._dataSource(),d._ignoreCase(),d._filterHeader(),d._aria(),d.wrapper.attr("aria-live","polite"),d._enable(),d._attachFocusHandlers(),d._oldIndex=d.selectedIndex=-1,c!==t&&(i.index=c),d._initialIndex=i.index,d.requireValueMapper(d.options),d._initList(),d.listView.one("dataBound",F(d._attachAriaActiveDescendant,d)),d._cascade(),d.one("set",function(e){!e.sender.listView.bound()&&d.hasOptionLabel()&&d._textAccessor(d._optionLabelText())}),i.autoBind?d.dataSource.fetch():d.selectedIndex===-1&&(a=i.text||"",a||(r=i.optionLabel,r&&0===i.index?a=r:d._isSelect&&(a=n.children(":selected").text())),d._textAccessor(a)),s=e(d.element).parents("fieldset").is(":disabled"),s&&d.enable(!1),d.listView.bind("click",function(e){e.preventDefault()}),o.notify(d)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",cascadeFromParentField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",autoWidth:!1,popup:null},events:["open","close",v,"select","filtering","dataBinding","dataBound","cascade","set","kendoKeydown"],setOptions:function(e){l.fn.setOptions.call(this,e),this.listView.setOptions(this._listOptions(e)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._filterHeader(),this._enable(),this._aria(),!this.value()&&this.hasOptionLabel()&&this.select(0)},destroy:function(){var e=this;l.fn.destroy.call(e),e.wrapper.off(f),e.wrapper.off(h),e.element.off(f),e._inputWrapper.off(f),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off(),e.filterInput&&e.filterInput.off(h)},open:function(){var e=this,t=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0,n=this.listView;e.popup.visible()||(e.listView.bound()&&e._state!==I?e._allowOpening()&&(e._focusFilter=!0,e.popup.one("activate",e._focusInputHandler),e.popup._hovered=!0,e.wrapper.attr("aria-activedescendant",n._optionID),e.popup.open(),e._resizeFilterInput(),e._focusItem()):(e._open=!0,e._state="rebind",e.filterInput&&(e.filterInput.val(""),e._prev=""),e.filterInput&&1!==e.options.minLength&&!t?(e.refresh(),e.popup.one("activate",e._focusInputHandler),e.wrapper.attr("aria-activedescendant",n._optionID),e.popup.open(),e._resizeFilterInput()):e._filterSource()))},close:function(){this._attachAriaActiveDescendant(),this.popup.close()},_attachAriaActiveDescendant:function(){var e=this.wrapper,t=e.find(".k-input").attr("id");e.attr("aria-activedescendant",t)},_focusInput:function(){this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e,t,n=this.filterInput,i=this._prevent;n&&(e=this.filterInput[0]===c(),t=o.caret(this.filterInput[0])[0],this._prevent=!0,n.css("display","none").css("width",this.popup.element.css("width")).css("display","inline-block"),e&&(n.focus(),o.caret(n[0],t)),this._prevent=i)},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||l.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;return e===t?(n=this.listView.focus(),!n&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:n):(this._focus(e),t)},dataItem:function(n){var i=this,r=null;if(null===n)return n;if(n===t)r=i.listView.selectedDataItems()[0];else{if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=n.hasClass("k-list-optionlabel")?-1:e(i.items()).index(n)}else i.hasOptionLabel()&&(n-=1);r=i.dataSource.flatView()[n]}return r||(r=i._optionLabelDataItem()),r},refresh:function(){this.listView.refresh()},text:function(e){var n,i=this,r=i.options.ignoreCase;return e=null===e?"":e,e===t?i._textAccessor():"string"!=typeof e?(i._textAccessor(e),t):(n=r?e.toLowerCase():e,i._select(function(e){return e=i._text(e),r&&(e=(e+"").toLowerCase()),e===n}).done(function(){i._textAccessor(i.dataItem()||e)}),t)},_clearFilter:function(){e(this.filterInput).val(""),l.fn._clearFilter.call(this)},value:function(e){var n=this,i=n.listView,r=n.dataSource;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n.requireValueMapper(n.options,e),!e&&n.hasOptionLabel()||(n._initialIndex=null),this.trigger("set",{value:e}),n._request&&n.options.cascadeFrom&&n.listView.bound()?(n._valueSetter&&r.unbind(v,n._valueSetter),n._valueSetter=F(function(){n.value(e)},n),r.one(v,n._valueSetter),t):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),i.value(e).done(function(){n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex}),t))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var n=this,i=n.options,r=i.optionLabel,a=i.optionLabelTemplate;return r?(a||(a="#:",a+="string"==typeof r?"data":o.expr(i.dataTextField,"data"),a+="#"),"function"!=typeof a&&(a=o.template(a)),n.optionLabelTemplate=a,n.hasOptionLabel()||(n.optionLabel=e('<div class="k-list-optionlabel"></div>').prependTo(n.list)),n.optionLabel.html(a(r)).off().on(x,F(n._click,n)).on(C,n._toggleHover),n.angular("compile",function(){return{elements:n.optionLabel,data:[{dataItem:n._optionLabelDataItem()}]}}),t):(n.optionLabel.off().remove(),n.optionLabel=e(),t)},_optionLabelText:function(){var e=this.options.optionLabel;return"string"==typeof e?e:this._text(e)},_optionLabelDataItem:function(){var n=this,i=n.options.optionLabel;return n.hasOptionLabel()?e.isPlainObject(i)?new u(i):n._assignInstance(n._optionLabelText(),""):t},_buildOptions:function(e){var n,i,r,o=this;o._isSelect&&(n=o.listView.value()[0],i=o._optionLabelDataItem(),r=i&&o._value(i),n!==t&&null!==n||(n=""),i&&(r!==t&&null!==r||(r=""),i='<option value="'+r+'">'+o._text(i)+"</option>"),o._options(e,i,n),n!==s.unifyType(o._accessor(),typeof n)&&(o._customOption=null,o._custom(n)))},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===S,r=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!r.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(r),t._makeUnselectable(),i||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(r.length?(!t.listView.value().length&&n>-1&&null!==n&&t.select(n),t._initialIndex=null,e=t.listView.selectedDataItems()[0],e&&t.text()!==t._text(e)&&t._selectValue(e)):t._textAccessor()!==t._optionLabelText()&&(t.listView.value(""),t._selectValue(null),t._oldIndex=t.selectedIndex))),t._hideBusy(),t.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&this._oldIndex===-1)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this._search()},_attachFocusHandlers:function(){var e=this,t=e.wrapper;t.on("focusin"+h,F(e._focusinHandler,e)).on("focusout"+h,F(e._focusoutHandler,e)),e.filterInput&&e.filterInput.on("focusin"+h,F(e._focusinHandler,e)).on("focusout"+h,F(e._focusoutHandler,e))},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(_),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),d.mobileOS.ios&&t?e._change():e._blur(),e._inputWrapper.removeClass(_),e._prevent=!0,e._open=!1,e.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,a=t.wrapper.add(t.filterInput).off(f),s=t._inputWrapper.off(C);r||i?i?(a.removeAttr(T),s.addClass(k).removeClass(b)):s.addClass(b).removeClass(k):(n.removeAttr(m).removeAttr(g),s.addClass(b).removeClass(k).on(C,t._toggleHover),a.attr(T,a.data(T)).attr(y,!1).attr(w,!1).on("keydown"+f,t,F(t._keydown,t)).on(o.support.mousedown+f,F(t._wrapperMousedown,t)).on("paste"+f,F(t._filterPaste,t)),t.wrapper.on("click"+f,F(t._wrapperClick,t)),t.filterInput?a.on("input"+f,F(t._search,t)):a.on("keypress"+f,F(t._keypress,t))),n.attr(m,i).attr(g,r),a.attr(y,i).attr(w,r)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=e.altKey,l=o.popup.visible();if(o.filterInput&&(n=o.filterInput[0]===c()),a===p.LEFT?(a=p.UP,i=!0):a===p.RIGHT&&(a=p.DOWN,i=!0),!i||!n){if(e.keyCode=a,(s&&a===p.UP||a===p.ESC)&&o._focusElement(o.wrapper),o._state===S&&a===p.ESC&&(o._clearFilter(),o._open=!1,o._state=I),a===p.ENTER&&o._typingTimeout&&o.filterInput&&l)return e.preventDefault(),t;if(a!==p.SPACEBAR||n||(o.toggle(!l),e.preventDefault()),i=o._move(e),!i){if((!l||!o.filterInput)&&(r=o._focus(),a===p.HOME?(i=!0,o._firstItem()):a===p.END&&(i=!0,o._lastItem()),i)){if(o.trigger("select",{dataItem:o._getElementDataItem(o._focus()),item:o._focus()}))return o._focus(r),t;o._select(o._focus(),!0).done(function(){l||o._blur()}),e.preventDefault()}s||i||!o.filterInput||o._search()}}},_matchText:function(e,n){var i=this.options.ignoreCase;return e!==t&&null!==e&&(e+="",i&&(e=e.toLowerCase()),0===e.indexOf(n))},_shuffleData:function(e,t){var n=this._optionLabelDataItem();return n&&(e=[n].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e,t,n,o=this,a=o.dataSource.flatView(),s=a.length+(o.hasOptionLabel()?1:0),l=r(o._word,o._last),d=o.selectedIndex;for(d===-1?d=0:(d+=l?1:0,d=i(d,s)),a=a.toJSON?a.toJSON():a.slice(),a=o._shuffleData(a,d),n=0;n<s&&(t=o._text(a[n]),!l||!o._matchText(t,o._last))&&!o._matchText(t,o._word);n++);n!==s&&(e=o._focus(),o._select(i(d+n,s)).done(function(){var t=function(){o.popup.visible()||o._change()};o.trigger("select",{dataItem:o._getElementDataItem(o._focus()),item:o._focus()})?o._select(e).done(t):t()}))},_keypress:function(e){var t,n=this;0!==e.which&&e.keyCode!==o.keys.ENTER&&(t=String.fromCharCode(e.charCode||e.keyCode),n.options.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n._word+=t,n._last=t,n._search())},_popupOpen:function(){var e=this.popup;e.wrapper=o.wrap(e.element),e.element.closest(".km-root")[0]&&(e.wrapper.addClass("km-popup km-widget"),this.wrapper.addClass("km-widget"))},_popup:function(){l.fn._popup.call(this),this.popup.one("open",F(this._popupOpen,this))},_getElementDataItem:function(e){return e&&e[0]?e[0]===this.optionLabel[0]?this._optionLabelDataItem():this.listView.dataItemByIndex(this.listView.getElementIndex(e)):null},_click:function(n){var i=this,r=n.item||e(n.currentTarget);return n.preventDefault(),i.trigger("select",{dataItem:i._getElementDataItem(r),item:r})?(i.close(),t):(i._userTriggered=!0,i._select(r).done(function(){i._blur(),i._focusElement(i.wrapper)}),t)},_focusElement:function(e){var t=c(),n=this.wrapper,i=this.filterInput,r=e===i?n:i,o=d.mobileOS&&(d.touch||d.MSPointers||d.pointers);i&&i[0]===e[0]&&o||i&&(r[0]===t||this._focusFilter)&&(this._focusFilter=!1,this._prevent=!0,this._focused=e.focus())},_searchByWord:function(e){var t,n;e&&(t=this,n=t.options.ignoreCase,n&&(e=e.toLowerCase()),t._select(function(n){return t._matchText(t._text(n),e)}))},_inputValue:function(){return this.text()},_search:function(){var e=this,n=e.dataSource;if(clearTimeout(e._typingTimeout),e._isFilterEnabled())e._typingTimeout=setTimeout(function(){var t=e.filterInput.val();e._prev!==t&&(e._prev=t,e.search(t),e._resizeFilterInput()),e._typingTimeout=null},e.options.delay);else{if(e._typingTimeout=setTimeout(function(){e._word=""},e.options.delay),!e.listView.bound())return n.fetch().done(function(){e._selectNext()}),t;e._selectNext()}},_get:function(t){var n,i,r,o="function"==typeof t,a=o?e():e(t);if(this.hasOptionLabel()&&("number"==typeof t?t>-1&&(t-=1):a.hasClass("k-list-optionlabel")&&(t=-1)),o){for(n=this.dataSource.flatView(),r=0;r<n.length;r++)if(t(n[r])){t=r,i=!0;break}i||(t=-1)}return t},_firstItem:function(){this.hasOptionLabel()?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this._resetOptionLabel(),this.listView.focusLast()},_nextItem:function(){var e;return this.optionLabel.hasClass("k-state-focused")?(this._resetOptionLabel(),this.listView.focusFirst(),e=1):e=this.listView.focusNext(),e},_prevItem:function(){var e;if(!this.optionLabel.hasClass("k-state-focused"))return e=this.listView.focusPrev(),this.listView.focus()||this.options.virtual||this._focus(this.optionLabel),e},_focusItem:function(){var e=this.options,n=this.listView,i=n.focus(),r=n.select();r=r[r.length-1],r===t&&e.highlightFirst&&!i&&(r=0),r!==t?n.focus(r):!e.optionLabel||e.virtual&&"dataItem"===e.virtual.mapValueTo?n.scrollToIndex(0):(this._focus(this.optionLabel),this._select(this.optionLabel),this.listView.content.scrollTop(0))},_resetOptionLabel:function(e){this.optionLabel.removeClass("k-state-focused"+(e||"")).removeAttr("id")},_focus:function(e){var n=this.listView,i=this.optionLabel;return e===t?(e=n.focus(),!e&&i.hasClass("k-state-focused")&&(e=i),e):(this._resetOptionLabel(),e=this._get(e),n.focus(e),e===-1&&(i.addClass("k-state-focused").attr("id",n._optionID),this._focused.add(this.filterInput).removeAttr("aria-activedescendant").attr("aria-activedescendant",n._optionID)),t)},_select:function(e,t){var n=this;return e=n._get(e),n.listView.select(e).done(function(){t||n._state!==S||(n._state=I),e===-1&&n._selectValue(null)})},_selectValue:function(e){var n=this,i=n.options.optionLabel,r=n.listView.select(),o="",a="";r=r[r.length-1],r===t&&(r=-1),this._resetOptionLabel(" k-state-selected"),e||0===e?(a=e,o=n._dataValue(e),i&&(r+=1)):i&&(n._focus(n.optionLabel.addClass("k-state-selected")),a=n._optionLabelText(),o="string"==typeof i?"":n._value(i),r=0),n.selectedIndex=r,null===o&&(o=""),n._textAccessor(a),n._accessor(o,r),n._triggerCascade()},_mobile:function(){var e=this,t=e.popup,n=d.mobileOS,i=t.element.parents(".km-root").eq(0);i.length&&n&&(t.options.animation.open.effects=n.android||n.meego?"fadeIn":n.ios||n.wp?"slideIn:up":t.options.animation.open.effects)},_filterHeader:function(){var t;this.filterInput&&(this.filterInput.off(f).parent().remove(),this.filterInput=null),this._isFilterEnabled()&&(t='<span class="k-icon k-i-zoom"></span>',this.filterInput=e('<input class="k-textbox"/>').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":"listbox","aria-expanded":!1}),this.list.prepend(e('<span class="k-list-filter" />').append(this.filterInput.add(t))))},_span:function(){var t,n=this,i=n.wrapper,r="span.k-input",a=o.guid();t=i.find(r),t[0]||(i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span id="'+a+'" unselectable="on" role="option" aria-selected="true" class="k-input"> </span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(n.element),t=i.find(r)),n.span=t,n._inputWrapper=e(i[0].firstChild),n._arrow=i.find(".k-select"),n._arrowIcon=n._arrow.find(".k-icon")},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("<span />").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdown").addClass(i.className).removeClass("input-validation-error").css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":"listbox","aria-expanded":!1}),n.hide().removeAttr("accesskey")},_clearSelection:function(e){this.select(e.value()?0:-1)},_inputTemplate:function(){var t=this,n=t.options.valueTemplate;if(n=n?o.template(n):e.proxy(o.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=n,t.hasOptionLabel()&&!t.options.optionLabelTemplate)try{t.valueTemplate(t._optionLabelDataItem())}catch(i){throw Error(D)}},_textAccessor:function(n){var i,r=null,o=this.valueTemplate,a=this._optionLabelText(),s=this.span;if(n===t)return s.text();e.isPlainObject(n)||n instanceof u?r=n:a&&a===n&&(r=this.options.optionLabel),r||(r=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(r!==a&&this._text(r)!==a||(o=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(r=a))),i=function(){return{elements:s.get(),data:[{dataItem:r}]}},this.angular("cleanup",i);try{s.html(o(r))}catch(l){s.html("")}this.angular("compile",i)},_preselect:function(e,t){e||t||(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var i=this.options.dataTextField,r={};return i?(n(r,i.split("."),e),n(r,this.options.dataValueField.split("."),t),r=new u(r)):r=e,r}});a.plugin(E)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.resizable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=e.proxy,a=n.isFunction,s=e.extend,l="horizontal",d="vertical",c="start",u="resize",p="resizeend",f=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=d?l:d,n._positionMouse=n.orientation==l?"x":"y",n._position=n.orientation==l?"left":"top",n._sizingDom=n.orientation==l?"outerWidth":"outerHeight",n.draggable=new i.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:o(n._resize,n),dragcancel:o(n._cancel,n),dragstart:o(n._start,n),dragend:o(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[u,p,c],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,r=n.options.max;return a(r)?r(e):r!==t?n._initialElementPosition+r-i:r},_min:function(e){var n=this,i=n.options.min;return a(i)?i(e):i!==t?n._initialElementPosition+i:i},_start:function(t){var n=this,i=n.options.hint,r=e(t.currentTarget);n._initialElementPosition=r.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=a(i)?e(i(r)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(c,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",r.css("cursor"))},_resize:function(e){var n,i=this,r=i._maxPosition,o=i._minPosition,a=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=o!==t?Math.max(o,a):a,i.position=n=r!==t?Math.min(r,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==r||n==o).css(i._position,n),i.resizing=!0,i.trigger(u,s(e,{position:n}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(p,s(t,{position:n.position})),e(document.body).css("cursor","")},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop(e))},destroy:function(){var e=this;r.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,i=n._position,r=n.targetPosition,o=n.position;o===t&&(o=r[i]),r[i]=o+e,n.userEvents.move(r.left,r.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.window.min",["kendo.draganddrop.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){return t!==e}function i(e,t){return parseInt(e.css(t),10)||0}function r(e,t,n){var i;return i=e&&isNaN(e)&&(""+e).indexOf("px")<0?e:Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),t===-(1/0)?t:parseInt(t,10))}function o(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function a(t){for(var n,i,r={top:t.offsetTop,left:t.offsetLeft},o=t.offsetParent;o;)r.top+=o.offsetTop,r.left+=o.offsetLeft,n=e(o).css("overflowX"),i=e(o).css("overflowY"),"auto"!==i&&"scroll"!==i||(r.top-=o.scrollTop),"auto"!==n&&"scroll"!==n||(r.left-=o.scrollLeft),o=o.offsetParent;return r}function s(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new p(e.wrapper,{filter:">"+F,group:e.wrapper.id+"-resizing",dragstart:v(t.dragstart,t),drag:v(t.drag,t),dragend:v(t.dragend,t)}),t._draggable.userEvents.bind("press",v(t.addOverlay,t)),t._draggable.userEvents.bind("release",v(t.removeOverlay,t))}function l(e,t){var n=this;n.owner=e,n._preventDragging=!1,n._draggable=new p(e.wrapper,{filter:t,group:e.wrapper.id+"-moving",dragstart:v(n.dragstart,n),drag:v(n.drag,n),dragend:v(n.dragend,n),dragcancel:v(n.dragcancel,n)}),n._draggable.userEvents.stopPropagation=!1}var d=window.kendo,c=d.ui.Widget,u=d.ui.Popup.TabKeyTrap,p=d.ui.Draggable,f=e.isPlainObject,h=d._activeElement,m=d._outerWidth,g=d._outerHeight,v=e.proxy,_=e.extend,b=e.each,k=d.template,y="body",w=".kendoWindow",x=".kendoWindowModal",C=".k-window",T=".k-window-title",S=T+"bar",I=".k-window-content",D=".k-dialog-content",F=".k-resize-handle",E=".k-overlay",A="k-content-frame",z="k-i-loading",N="k-state-hover",P="k-state-focused",H="k-window-maximized",R=":visible",O="hidden",M="cursor",B="open",L="activate",V="deactivate",U="close",W="refresh",j="minimize",q="maximize",G="resizeStart",$="resize",K="resizeEnd",Y="dragstart",Q="dragend",X="kendoKeydown",J="error",Z="overflow",ee="original-overflow-rule",te="zIndex",ne=".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",ie=".k-i-pin",re=".k-i-unpin",oe=ie+","+re,ae=".k-window-titlebar .k-window-action",se=".k-window-titlebar .k-i-refresh",le="WindowEventsHandled",de=/^0[a-z]*$/i,ce=d.isLocalUrl,ue={small:"k-window-sm",medium:"k-window-md",large:"k-window-lg"},pe=c.extend({init:function(i,r){var a,s,l,p,h,m,g,_,b,k=this,y={},x=!1,F=r&&r.actions&&!r.actions.length;c.fn.init.call(k,i,r),r=k.options,p=r.position,i=k.element,h=r.content,_=e(window),F&&(r.actions=[]),k.appendTo=e(r.appendTo),k.containment=r.draggable.containment?e(r.draggable.containment).first():null,h&&!f(h)&&(h=r.content={url:h}),i.find("script").filter(o).remove(),i.parent().is(k.appendTo)||k.containment||p.top!==t&&p.left!==t||(i.is(R)?(y=i.offset(),x=!0):(s=i.css("visibility"),l=i.css("display"),i.css({visibility:O,display:""}),y=i.offset(),i.css({visibility:s,display:l})),p.top===t&&(p.top=y.top),p.left===t&&(p.left=y.left)),n(r.visible)&&null!==r.visible||(r.visible=i.is(R)),a=k.wrapper=i.closest(C),i.is(".k-window-content")&&a[0]||(i.addClass("k-window-content"),k._createWindow(i,r),a=k.wrapper=i.closest(C),k.title(k.options.title),k._dimensions()),k.minTop=k.minLeft=-(1/0),k.maxTop=k.maxLeft=1/0,k._position(),h&&k.refresh(h),r.visible&&k.toFront(),m=a.children(I),r.visible&&r.modal&&k._overlay(a.is(R)).css({opacity:.5}),a.on("mouseenter"+w,ae,v(k._buttonEnter,k)).on("mouseleave"+w,ae,v(k._buttonLeave,k)).on("click"+w,"> "+ae,v(k._windowActionHandler,k)).on("keydown"+w,k,v(k._keydown,k)).on("focus"+w,v(k._focus,k)).on("blur"+w,v(k._blur,k)),m.on("keydown"+w,k,v(k._keydownContent,k)),g=m.find("."+A)[0],g&&!_.data(le)&&(_.on("blur"+w,function(){var t,n=e(document.activeElement).parent(I);n.length&&(t=d.widgetInstance(n),t._focus())}),_.on("focus"+w,function(){e(I).not(D).each(function(t,n){d.widgetInstance(e(n))._blur()})}),_.data(le,!0)),this._resizable(),this._draggable(),r.pinned&&this.wrapper.is(":visible")&&k.pin(),b=i.attr("id"),b&&(b+="_wnd_title",a.children(S).children(T).attr("id",b),m.attr({role:"dialog","aria-labelledby":b})),a.add(a.children(".k-resize-handle,"+S)).on("mousedown"+w,v(k.toFront,k)),k.touchScroller=d.touchScroller(i),k._resizeHandler=v(k._onDocumentResize,k),k._marker=d.guid().substring(0,8),e(window).on("resize"+w+k._marker,k._resizeHandler),r.visible&&(k.trigger(B),k.trigger(L)),d.notify(k),this.options.modal&&(this._tabKeyTrap=new u(a),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return a.data("isFront")})},_buttonEnter:function(t){e(t.currentTarget).addClass(N)},_buttonLeave:function(t){e(t.currentTarget).removeClass(N)},_focus:function(){this.wrapper.addClass(P)},_blur:function(){this.wrapper.removeClass(P)},_dimensions:function(){var e,t,n=this.wrapper,o=this.options,a=o.width,s=o.height,l=o.maxHeight,d=o.size,c=["minWidth","minHeight","maxWidth","maxHeight"],u="content-box"==n.css("box-sizing"),p=u?i(n,"border-left-width")+i(n,"border-right-width"):0,f=u?i(n,"border-top-width")+i(n,"border-bottom-width"):0,h=u?i(n,"padding-top"):0;for(this.containment&&!this._isPinned&&(this._updateBoundaries(),o.maxHeight=Math.min(this.containment.height-(f+h),l),o.maxWidth=Math.min(this.containment.width-p,o.maxWidth)),e=0;e<c.length;e++)t=o[c[e]]||"",t!=1/0&&n.css(c[e],t);l!=1/0&&this.element.css("maxHeight",l),n.width(a?r(a,o.minWidth,o.maxWidth):""),n.height(s?r(s,o.minHeight,o.maxHeight):""),o.visible||n.hide(),d&&ue[d]&&n.addClass(ue[d])},_position:function(){var e,t,n=this.wrapper,i=this.options.position;this._updateBoundaries(),this.containment&&(i.top=i.top||0,i.left=i.left||0,e=(""+i.top).indexOf("%")>0?parseInt(this.containment.height*(parseFloat(i.top)/100),10):i.top,t=(""+i.left).indexOf("%")>0?parseInt(this.containment.width*(parseFloat(i.left)/100),10):i.left,i.top=r(e,this.minTop,this.maxTop),i.left=r(t,this.minLeft,this.maxLeft)),0===i.top&&(i.top=""+i.top),0===i.left&&(i.left=""+i.left),n.css({top:i.top||"",left:i.left||""})},_updateBoundaries:function(){var e=this.containment;return e?(e.width=e.innerWidth(),e.height=e.innerHeight(),parseInt(e.width,10)>e[0].clientWidth&&(e.width-=d.support.scrollbar()),parseInt(e.height,10)>e[0].clientHeight&&(e.height-=d.support.scrollbar()),e.position=a(e[0]),this._isPinned?(this.minTop=this.minLeft=-(1/0),this.maxTop=this.maxLeft=1/0):(this.minTop=e.scrollTop(),this.minLeft=e.scrollLeft(),this.maxLeft=this.minLeft+e.width-m(this.wrapper,!0),this.maxTop=this.minTop+e.height-g(this.wrapper,!0)),t):null},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_resize:function(){d.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,n=this.wrapper;this.resizing&&(n.off("dblclick"+w).children(F).remove(),this.resizing.destroy(),this.resizing=null),t&&(n.on("dblclick"+w,S,v(function(t){e(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),b("n e s w se sw ne nw".split(" "),function(e,t){
|
16
|
-
n.append(fe.resizeHandle(t))}),this.resizing=new s(this)),n=null},_draggable:function(){var e=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),e&&(this.dragging=new l(this,e.dragHandle||S))},_actions:function(){var t=this.options,n=t.actions,i=t.pinned,r=this.wrapper.children(S),o=r.find(".k-window-actions"),a=["maximize","minimize"];n=e.map(n,function(e){return e=i&&"pin"===e.toLowerCase()?"unpin":e,{name:a.indexOf(e.toLowerCase())>-1?"window-"+e:e}}),o.html(d.render(fe.action,n))},setOptions:function(e){var n,i,r=this,o=r.options.size,a=JSON.parse(JSON.stringify(e));_(e.position,r.options.position),_(e.position,a.position),c.fn.setOptions.call(r,e),n=r.options.scrollable!==!1,r.restore(),t!==e.title&&r.title(e.title),r.wrapper.removeClass(ue[o]),r._dimensions(),r._position(),r._resizable(),r._draggable(),r._actions(),t!==e.modal&&(i=r.options.visible!==!1,r._enableDocumentScrolling(),r._overlay(e.modal&&i)),r.element.css(Z,n?"":"hidden")},events:[B,L,V,U,j,q,W,G,$,K,Y,Q,X,J],options:{name:"Window",animation:{open:{effects:{zoom:{direction:"in"},fade:{direction:"in"}},duration:350},close:{effects:{zoom:{direction:"out",properties:{scale:.7}},fade:{direction:"out"}},duration:350,hide:!0}},title:"",actions:["Close"],autoFocus:!0,modal:!1,size:"auto",resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,scrollable:!0,position:{},content:null,visible:null,height:null,width:null,appendTo:"body",isMaximized:!1,isMinimized:!1},_closable:function(){return e.inArray("close",e.map(this.options.actions,function(e){return e.toLowerCase()}))>-1},_keydownContent:function(e){var t=this,n=d.keys,i=e.keyCode;i==n.ESC&&t._closable()&&(e.stopPropagation(),t._close(!1))},_keydown:function(e){var t,n,o,a,s,l,c=this,u=c.options,p=d.keys,f=e.keyCode,h=c.wrapper,m=10,g=u.isMaximized,v=u.isMinimized;f==p.ESC&&c._closable()&&(e.stopPropagation(),c._close(!1)),e.target!=e.currentTarget||c._closing||(e.altKey&&82==f&&c.refresh(),e.altKey&&80==f&&(c.options.pinned?c.unpin():c.pin()),e.altKey&&f==p.UP?v?(c.restore(),c.wrapper.focus()):g||(c.maximize(),c.wrapper.focus()):e.altKey&&f==p.DOWN&&(v||g?g&&c.restore():(c.minimize(),c.wrapper.focus())),t=d.getOffset(h),c.containment&&!c._isPinned&&(t=c.options.position),!u.draggable||e.ctrlKey||e.altKey||g||(c._updateBoundaries(),f==p.UP?(t.top=r(t.top-m,c.minTop,c.maxTop),n=h.css("top",t.top)):f==p.DOWN?(t.top=r(t.top+m,c.minTop,c.maxTop),n=h.css("top",t.top)):f==p.LEFT?(t.left=r(t.left-m,c.minLeft,c.maxLeft),n=h.css("left",t.left)):f==p.RIGHT&&(t.left=r(t.left+m,c.minLeft,c.maxLeft),n=h.css("left",t.left))),u.resizable&&e.ctrlKey&&!g&&!v&&(f==p.UP?(n=!0,a=h.height()-m):f==p.DOWN&&(n=!0,a=c.containment&&!c._isPinned?Math.min(h.height()+m,c.containment.height-t.top-i(h,"padding-top")-i(h,"borderBottomWidth")-i(h,"borderTopWidth")):h.height()+m),f==p.LEFT?(n=!0,o=h.width()-m):f==p.RIGHT&&(n=!0,o=c.containment&&!c._isPinned?Math.min(h.width()+m,c.containment.width-t.left-i(h,"borderLeftWidth")-i(h,"borderRightWidth")):h.width()+m),n&&(s=r(o,u.minWidth,u.maxWidth),l=r(a,u.minHeight,u.maxHeight),isNaN(s)||(h.width(s),c.options.width=s+"px"),isNaN(l)||(h.height(l),c.options.height=l+"px"),c.resize())),n&&e.preventDefault())},_overlay:function(t){var n=this.containment?this.containment.children(E):this.appendTo.children(E),i=this.wrapper;return n.length||(n=e("<div class='k-overlay' />")),n.insertBefore(i[0]).toggle(t).css(te,parseInt(i.css(te),10)-1),this.options.modal.preventScroll&&!this.containment&&this._stopDocumentScrolling(),n},_actionForIcon:function(e){var t=/\bk-i(-\w+)+\b/.exec(e[0].className)[0];return{"k-i-close":"_close","k-i-window-maximize":"maximize","k-i-window-minimize":"minimize","k-i-window-restore":"restore","k-i-refresh":"refresh","k-i-pin":"pin","k-i-unpin":"unpin"}[t]},_windowActionHandler:function(n){var i,r;if(!this._closing)return i=e(n.target).closest(".k-window-action").find(".k-icon"),r=this._actionForIcon(i),r?(n.preventDefault(),this[r](),!1):t},_modals:function(){var t=this,n=e(C).filter(function(){var n=e(this),i=t._object(n),r=i&&i.options;return r&&r.modal&&r.visible&&r.appendTo===t.options.appendTo&&n.is(R)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,n},_object:function(e){var n=e.children(I),i=d.widgetInstance(n);return i?i:t},center:function(){var t,n,r=this,o=r.options.position,a=r.wrapper,s=e(window),l=0,d=0;return r.options.isMaximized?r:(r.options.pinned&&!r._isPinned&&r.pin(),r.options.pinned||(l=s.scrollTop(),d=s.scrollLeft()),this.containment&&!r.options.pinned?(t=this.minTop+(this.maxTop-this.minTop)/2,n=this.minLeft+(this.maxLeft-this.minLeft)/2):(r._scrollIsAppended=!0,n=d+Math.max(0,(s.width()-a.width())/2),t=l+Math.max(0,(s.height()-a.height()-i(a,"paddingTop"))/2)),a.css({left:n,top:t}),o.top=t,o.left=n,r)},title:function(n){var i,r,o,a,s=this,l=!0,c=s.wrapper,u=c.children(S),p=u.children(T);return arguments.length?(e.isPlainObject(n)?(i=t!==n.text?n.text:"",l=n.encoded!==!1):i=n,i===!1?(c.addClass("k-window-titleless"),c.css("padding-top",0),u.remove()):(u.length?p.html(l?d.htmlEncode(i):i):(c.prepend(fe.titlebar({title:l?d.htmlEncode(i):i})),s._actions(),u=c.children(S)),a=c.css("visibility"),o=c.css("display"),a===O?(c.css({display:""}),r=parseInt(g(u),10),c.css({display:o})):(c.css({visibility:O,display:""}),r=parseInt(g(u),10),c.css({visibility:a,display:o})),c.css("padding-top",r),u.css("margin-top",-r)),s.options.title=i,s):p.html()},content:function(e,t){var i=this.wrapper.children(I),r=i.children(".km-scroll-container");return i=r[0]?r:i,n(e)?(this.angular("cleanup",function(){return{elements:i.children()}}),d.destroy(this.element.children()),i.empty().html(e),this.angular("compile",function(){var e,n=[];for(e=i.length;--e>=0;)n.push({dataItem:t});return{elements:i.children(),data:n}}),this):i.html()},open:function(){var t,n,i,r=this,o=r.wrapper,a=r.options,s=this._animationOptions("open"),l=o.children(I),c=this.containment&&!r._isPinned,u=c?this.containment:e(document);return r.trigger(B)||(r._closing&&o.kendoStop(!0,!0),r._closing=!1,r.toFront(),a.autoFocus&&r.wrapper.focus(),a.visible=!0,a.modal&&(n=!!r._modals().length,t=r._overlay(n),t.kendoStop(!0,!0),s.duration&&d.effects.Fade&&!n?(i=d.fx(t).fadeIn(),i.duration(s.duration||0),i.endValue(.5),i.play()):t.css("opacity",.5),t.show(),e(window).on("focus"+x,function(){o.data("isFront")&&!e(document.activeElement).closest(o).length&&r.wrapper.focus()})),o.is(R)||(l.css(Z,O),r.wrapper.find(ae).addClass("k-flat"),o.show().kendoStop().kendoAnimate({effects:s.effects,duration:s.duration,complete:v(this._activate,this)}))),a.isMaximized&&(r._containerScrollTop=u.scrollTop(),r._containerScrollLeft=u.scrollLeft(),r._stopDocumentScrolling()),this.options.pinned&&!this._isPinned&&this.pin(),r},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.wrapper.focus(),this.element.css(Z,e?"":"hidden"),d.resize(this.element.children()),this.trigger(L)},_removeOverlay:function(n){var i,r=this._modals(),o=this.options,a=o.modal&&!r.length,s=o.modal?this._overlay(!0):e(t),l=this._animationOptions("close");a?(!n&&l.duration&&d.effects.Fade?(i=d.fx(s).fadeOut(),i.duration(l.duration||0),i.startValue(.5),i.play()):this._overlay(!1).remove(),o.modal.preventScroll&&this._enableDocumentScrolling()):r.length&&(this._object(r.last())._overlay(!0),o.modal.preventScroll&&this._stopDocumentScrolling())},_close:function(t){var n,i=this,r=i.wrapper,o=i.options,a=this._animationOptions("open"),s=this._animationOptions("close"),l=this.containment&&!i._isPinned,d=l?this.containment:e(document);i._closing||(n=i.trigger(U,{userTriggered:!t}),i._closing=!n,r.is(R)&&!n&&(o.visible=!1,e(C).each(function(t,n){var i=e(n).children(I);n!=r&&i.find("> ."+A).length>0&&i.children(E).remove()}),this._removeOverlay(),i.wrapper.find(ae).removeClass("k-flat"),r.kendoStop().kendoAnimate({effects:s.effects||a.effects,reverse:s.reverse===!0,duration:s.duration,complete:v(this._deactivate,this)}),e(window).off(x)),i.options.isMaximized&&(i._enableDocumentScrolling(),i._containerScrollTop&&i._containerScrollTop>0&&d.scrollTop(i._containerScrollTop),i._containerScrollLeft&&i._containerScrollLeft>0&&d.scrollLeft(i._containerScrollLeft)),i.options.iframe&&i.wrapper.blur())},_deactivate:function(){var e,t=this;t.wrapper.hide().css("opacity",""),t.trigger(V),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},close:function(){return this._close(!0),this},_actionable:function(t){return e(t).is(ae+","+ae+" .k-icon,:input,a")},_shouldFocus:function(t){var n=h(),i=this.wrapper;return this.options.autoFocus&&!e(n).is(i)&&!this._actionable(t)&&(!i.find(n).length||!i.find(t).length)},toFront:function(t){var n,i,r=this,o=r.wrapper,a=o[0],s=r.containment&&!r._isPinned,l=+o.css(te),d=l,c=t&&t.target||null;return e(C).each(function(t,n){var i=e(n),r=i.css(te),s=i.children(I);isNaN(r)||(l=Math.max(+r,l)),o.data("isFront",n==a),n!=a&&s.find("> ."+A).length>0&&s.append(fe.overlay)}),(!o[0].style.zIndex||d<l)&&o.css(te,l+2),r.element.find("> .k-overlay").remove(),r._shouldFocus(c)&&(setTimeout(function(){r.wrapper.focus()}),n=s?r.containment.scrollTop():e(window).scrollTop(),i=parseInt(o.position().top,10),!r.options.pinned&&i>0&&i<n&&(n>0?e(window).scrollTop(i):o.css("top",n))),o=null,r},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t,n=this,i=n.options,o=i.minHeight,a=n.restoreOptions,s=n.containment&&!n._isPinned?n.containment:e(document);return i.isMaximized||i.isMinimized?(o&&o!=1/0&&n.wrapper.css("min-height",o),a&&!i.isMaximized&&(a.height=r(a.height,n.options.minHeight,n.options.maxHeight),t=i.position.top+parseInt(a.height,10)>n.maxTop,t&&(i.position.top=r(i.position.top,n.minTop,n.maxTop-parseInt(a.height,10)),_(a,{left:i.position.left,top:i.position.top}))),n.wrapper.css({position:i.pinned?"fixed":"absolute",left:a.left,top:a.top,width:a.width,height:a.height}).removeClass(H).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-window-restore").parent().remove().end().end().find(ne).parent().show().end().end().find(oe).parent().show(),i.isMaximized?n.wrapper.find(".k-i-window-maximize").parent().focus():i.isMinimized&&n.wrapper.find(".k-i-window-minimize").parent().focus(),n.options.width=a.width,n.options.height=a.height,n.options.modal.preventScroll||n._enableDocumentScrolling(),n._containerScrollTop&&n._containerScrollTop>0&&s.scrollTop(n._containerScrollTop),n._containerScrollLeft&&n._containerScrollLeft>0&&s.scrollLeft(n._containerScrollLeft),i.isMaximized=i.isMinimized=!1,n.wrapper.removeAttr("aria-labelled-by"),n.resize(),n):n},_sizingAction:function(e,t){var n=this,i=n.wrapper,r=i[0].style,o=n.options;return o.isMaximized||o.isMinimized?n:(n.restoreOptions={width:r.width,height:r.height},i.children(F).hide().end().children(S).find(ne).parent().hide().eq(0).before(fe.action({name:"window-restore"})),t.call(n),n.wrapper.children(S).find(oe).parent().toggle("maximize"!==e),n.trigger(e),i.find(".k-i-window-restore").parent().focus(),n)},maximize:function(){return this._sizingAction("maximize",function(){var t=this,n=t.wrapper,i=this.containment&&!t._isPinned,r=n.position(),o=e(document);_(t.restoreOptions,{left:r.left+(i?this.containment.scrollLeft():0),top:r.top+(i?this.containment.scrollTop():0)}),this._containerScrollTop=i?this.containment.scrollTop():o.scrollTop(),this._containerScrollLeft=i?this.containment.scrollLeft():o.scrollLeft(),t._stopDocumentScrolling(),n.css({top:i?this.containment.scrollTop():0,left:i?this.containment.scrollLeft():0,position:i?"absolute":"fixed"}).addClass(H),t.options.isMaximized=!0,t._onDocumentResize()}),this},_stopDocumentScrolling:function(){var n,i,r=this,o=r.containment;return o&&!r._isPinned?(r._storeOverflowRule(o),o.css(Z,O),r.wrapper.css({maxWidth:o.innerWidth(),maxHeight:o.innerHeight()}),t):(n=e("body"),r._storeOverflowRule(n),n.css(Z,O),i=e("html"),r._storeOverflowRule(i),i.css(Z,O),t)},_enableDocumentScrolling:function(){var n=this,i=n.containment;return i&&!n._isPinned?(n._restoreOverflowRule(i),n.wrapper.css({maxWidth:i.width,maxHeight:i.height}),t):(n._restoreOverflowRule(e(document.body)),n._restoreOverflowRule(e("html")),t)},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;"string"==typeof t&&e.data(ee,t)}},_isOverflowStored:function(e){return"string"==typeof e.data(ee)},_restoreOverflowRule:function(e){var n=e.data(ee);null!==n&&n!==t?(e.css(Z,n),e.removeData(ee)):e.css(Z,"")},isMaximized:function(){return this.options.isMaximized},minimize:function(){return this._sizingAction("minimize",function(){var e=this;e.wrapper.css({height:"",minHeight:""}),e.element.hide(),e.options.isMinimized=!0}),this.wrapper.attr("aria-labelled-by",this.element.attr("aria-labelled-by")),this._updateBoundaries(),this},isMinimized:function(){return this.options.isMinimized},pin:function(){var t=this,n=e(window),r=t.wrapper,o=t.options,s=o.position,l=this.containment?a(r[0]).top+i(this.containment,"borderTopWidth"):i(r,"top"),d=this.containment?a(r[0]).left+i(this.containment,"borderLeftWidth"):i(r,"left");t.options.isMaximized||(s.top=l,s.left=d,!t._scrollIsAppended||this.containment&&"fixed"===this.containment.css("position")||(s.top-=n.scrollTop(),s.left-=n.scrollLeft(),t._scrollIsAppended=!1),r.css(_(s,{position:"fixed"})),r.children(S).find(ie).addClass("k-i-unpin").removeClass("k-i-pin"),t._isPinned=!0,t.options.pinned=!0,this.containment&&(o.maxWidth=o.maxHeight=1/0,r.css({maxWidth:"",maxHeight:""})))},unpin:function(){var t=this,n=e(window),o=t.wrapper,a=t.options,s=t.options.position,l=t.containment,d=parseInt(o.css("top"),10)+n.scrollTop(),c=parseInt(o.css("left"),10)+n.scrollLeft();t.options.isMaximized||(t._isPinned=!1,t._scrollIsAppended=!0,t.options.pinned=!1,l&&(t._updateBoundaries(),a.maxWidth=Math.min(l.width,a.maxWidth),a.maxHeight=Math.min(l.height-i(o,"padding-top"),a.maxHeight),o.css({maxWidth:a.maxWidth,maxHeight:a.maxHeight}),d=d<l.position.top?t.minTop:d>l.position.top+l.height?t.maxTop:d+l.scrollTop()-(l.position.top+i(l,"border-top-width")),c=c<l.position.left?t.minLeft:c>l.position.left+l.width?t.maxLeft:c+l.scrollLeft()-(l.position.left+i(l,"border-left-width"))),s.top=r(d,t.minTop,t.maxTop),s.left=r(c,t.minLeft,t.maxLeft),o.css(_(s,{position:""})),o.children(S).find(re).addClass("k-i-pin").removeClass("k-i-unpin"))},_onDocumentResize:function(){var t,n,r,o,a,s=this,l=s.wrapper,c=e(window),u=d.support.zoomLevel(),p="content-box"==l.css("box-sizing");s.options.isMaximized&&(r=p?i(l,"border-left-width")+i(l,"border-right-width"):0,o=p?i(l,"border-top-width")+i(l,"border-bottom-width"):0,a=p?i(l,"padding-top"):0,s.containment&&!s._isPinned?(t=s.containment.innerWidth()-r,n=s.containment.innerHeight()-(o+a)):(t=c.width()/u-r,n=c.height()/u-(o+a)),l.css({width:t,height:n}),s.options.width=t,s.options.height=n,s.resize())},refresh:function(t){var i,r,o,a=this,s=a.options,l=e(a.element);return f(t)||(t={url:t}),t=_({},s.content,t),r=n(s.iframe)?s.iframe:t.iframe,o=t.url,o?(n(r)||(r=!ce(o)),r?(i=l.find("."+A)[0],i?i.src=o||i.src:l.html(fe.contentFrame(_({},s,{content:t}))),l.find("."+A).unbind("load"+w).on("load"+w,v(this._triggerRefresh,this))):a._ajaxRequest(t)):(t.template&&a.content(k(t.template)({})),a.trigger(W)),l.toggleClass("k-window-iframecontent",!!r),a},_triggerRefresh:function(){this.trigger(W)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(se).removeClass(z)},_ajaxError:function(e,t){this.trigger(J,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=k(e)(t||{})),this.content(n,t),this.element.prop("scrollTop",0),this.trigger(W)}},_showLoading:function(){this.wrapper.find(se).addClass(z)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(v(this._showLoading,this),100),e.ajax(_({type:"GET",dataType:"html",cache:!1,error:v(this._ajaxError,this),complete:v(this._ajaxComplete,this),success:v(this._ajaxSuccess(t.template),this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(w).children(I).off(w).end().find(".k-resize-handle,.k-window-titlebar").off(w),e(window).off("resize"+w+this._marker),e(window).off(x),e(window).off(w),clearTimeout(this._loadingIconTimeout),c.fn.destroy.call(this),this.unbind(t),d.destroy(this.wrapper),this._removeOverlay(!0)},destroy:function(){this._destroy(),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=e()},_createWindow:function(){var t,n,i=this.element,r=this.options,o=d.support.isRtl(i);r.scrollable===!1&&i.css("overflow","hidden"),n=e(fe.wrapper(r)),t=i.find("iframe:not(.k-content-frame)").map(function(){var e=this.getAttribute("src");return this.src="",e}),n.toggleClass("k-rtl",o).attr("tabindex",0).append(i).find("iframe:not(.k-content-frame)").each(function(e){this.src=t[e]}),this.containment?this.containment.prepend(n):this.appendTo&&n.appendTo(this.appendTo),n.find(".k-window-title").css(o?"left":"right",m(n.find(".k-window-actions"))+10),i.css("visibility","").show(),i.find("[data-role=editor]").each(function(){var t=e(this).data("kendoEditor");t&&t.refresh()}),n=i=null}}),fe={wrapper:k("<div class='k-widget k-window'></div>"),action:k("<a role='button' href='\\#' class='k-button k-flat k-button-icon k-window-action' aria-label='#= name #'><span class='k-icon k-i-#= name.toLowerCase() #'></span></a>"),titlebar:k("<div class='k-window-titlebar'><span class='k-window-title'>#= title #</span><div class='k-window-actions'></div></div>"),overlay:"<div class='k-overlay'></div>",contentFrame:k("<iframe frameborder='0' title='#= title #' class='"+A+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:k("<div class='k-resize-handle k-resize-#= data #'></div>")};s.prototype={addOverlay:function(){this.owner.wrapper.append(fe.overlay)},removeOverlay:function(){this.owner.wrapper.find(E).remove()},dragstart:function(t){var n,i,r,o,s,l,c,u=this,p=u.owner,f=p.wrapper;u._preventDragging=p.trigger(G),u._preventDragging||(u.elementPadding=parseInt(f.css("padding-top"),10),u.initialPosition=d.getOffset(f,"position"),u.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),u.initialSize={width:f.outerWidth(),height:f.outerHeight()},p._updateBoundaries(),u.containerOffset=p.containment?p.containment.position:d.getOffset(p.appendTo,"position"),n=f.offsetParent(),n.is("html")?u.containerOffset.top=u.containerOffset.left=0:(i=n.css("margin-top"),r=n.css("margin-left"),o=!de.test(i)||!de.test(r),o&&(s=a(f[0]),l=s.left-u.containerOffset.left-u.initialPosition.left,c=s.top-u.containerOffset.top-u.initialPosition.top,u._relativeElMarginLeft=l>1?l:0,u._relativeElMarginTop=c>1?c:0,u.initialPosition.left+=u._relativeElMarginLeft,u.initialPosition.top+=u._relativeElMarginTop)),f.children(F).not(t.currentTarget).hide(),e(y).css(M,t.currentTarget.css(M)))},drag:function(t){var n,i,o,a,s,l,c,u,p,f,h,m,g,v,_,b,k,y,w,x;this._preventDragging||(n=this,i=n.owner,o=i.wrapper,a=i.options,s=a.position,l=n.resizeDirection,c=n.containerOffset,u=n.initialPosition,p=n.initialSize,f=i.containment&&!i._isPinned,h=d.support.isRtl(i.containment),m=f&&h&&i.containment.innerWidth()>i.containment.width?d.support.scrollbar():0,g=f?{top:i.containment.scrollTop(),left:i.containment.scrollLeft()}:{top:0,left:0},y=Math.max(t.x.location,0),w=Math.max(t.y.location,0),l.indexOf("e")>=0?(v=i.containment&&y-p.width>=i.maxLeft-g.left+c.left+m?i.maxLeft+m-u.left+p.width-g.left:y-u.left-c.left,o.width(r(v,a.minWidth,a.maxWidth))):l.indexOf("w")>=0&&(k=u.left+p.width+c.left,v=r(k-y,a.minWidth,a.maxWidth),s.left=k-v-c.left-m-(n._relativeElMarginLeft||0)+g.left,i.containment&&s.left<=i.minLeft&&(s.left=i.minLeft,v=r(k-m-s.left-c.left+g.left,a.minWidth,a.maxWidth)),o.css({left:s.left,width:v})),x=w,i.options.pinned&&(x-=e(window).scrollTop()),l.indexOf("s")>=0?(_=x-u.top-n.elementPadding-c.top,x-p.height-n.elementPadding>=i.maxTop+c.top-g.top&&(_=i.maxTop-u.top+p.height-g.top),o.height(r(_,a.minHeight,a.maxHeight))):l.indexOf("n")>=0&&(b=u.top+p.height+c.top,_=r(b-x,a.minHeight,a.maxHeight),s.top=b-_-c.top-(n._relativeElMarginTop||0)+g.top,s.top<=i.minTop&&i.containment&&(s.top=i.minTop,_=r(b-s.top-c.top+g.top,a.minHeight,a.maxHeight)),o.css({top:s.top,height:_})),v&&(i.options.width=v+"px"),_&&(i.options.height=_+"px"),i.resize())},dragend:function(t){if(!this._preventDragging){var n=this,i=n.owner,r=i.wrapper;return r.children(F).not(t.currentTarget).show(),e(y).css(M,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&r.css(n.initialPosition).css(n.initialSize),i.trigger(K),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},l.prototype={dragstart:function(t){var n=this.owner,i=n.options.draggable,r=n.element,o=r.find(".k-window-actions"),a=d.getOffset(n.appendTo);this._preventDragging=n.trigger(Y)||!i,this._preventDragging||n.isMaximized()||(n.initialWindowPosition=d.getOffset(n.wrapper,"position"),n.initialPointerPosition={left:n.options.position.left,top:n.options.position.top},n.startPosition={left:t.x.client-n.initialWindowPosition.left,top:t.y.client-n.initialWindowPosition.top},n._updateBoundaries(),n.containment||(n.minLeft=o.length>0?m(o)+parseInt(o.css("right"),10)-m(r):20-m(r),n.minLeft-=a.left,n.minTop=-a.top),n.wrapper.append(fe.overlay).children(F).hide(),e(y).css(M,t.currentTarget.css(M)))},drag:function(t){var n,i,o=this.owner,a=o.options.position,s=o.options.draggable.axis;this._preventDragging||o.isMaximized()||(s&&"x"!==s.toLowerCase()||(n=t.x.client-o.startPosition.left,o.containment&&!o._isPinned&&(n+=o.containment.scrollLeft()),a.left=r(n,o.minLeft,o.maxLeft)),s&&"y"!==s.toLowerCase()||(i=t.y.client-o.startPosition.top,o.containment&&!o._isPinned&&(i+=o.containment.scrollTop()),a.top=r(i,o.minTop,o.maxTop)),d.support.transforms?e(o.wrapper).css("transform","translate("+(a.left-o.initialPointerPosition.left)+"px, "+(a.top-o.initialPointerPosition.top)+"px)"):e(o.wrapper).css(a))},_finishDrag:function(){var t=this.owner;t.wrapper.children(F).toggle(!t.options.isMinimized).end().find(E).remove(),e(y).css(M,"")},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(C).css(this.owner.initialWindowPosition))},dragend:function(){var t=this.owner;if(!this._preventDragging&&!t.isMaximized())return e(t.wrapper).css(t.options.position).css("transform",""),this._finishDrag(),t.trigger(Q),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},d.ui.plugin(pe)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.color.min",["kendo.core.min"],e)}(function(){function e(e,t,n){void 0===n&&(n="0");for(var i=e.toString(16);t>i.length;)i=n+i;return i}function t(e,t,n){var i=n;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function n(e,t){var i,r,a;if(null==e||"none"===e)return null;if(e instanceof l)return e;if(a=e.toLowerCase(),i=s(a))return a="transparent"===i[1]?new d(1,1,1,0):n(o[i[1]],t),a.match=[i[1]],a;if((i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(a))?r=new c(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),1):(i=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(a))?r=new c(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16),1):(i=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(a))?r=new c(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),1):(i=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(a))?r=new c(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])):(i=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(a))?r=new d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,1):(i=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(a))&&(r=new d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]))),r)r.match=i;else if(!t)throw Error("Cannot parse color: "+a);return r}var i,r,o,a,s,l,d,c,u,p,f,h;window.kendo=window.kendo||{},i=kendo.Class,r=kendo.support,o={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},a=r.browser,s=function(e){var t,n=Object.keys(o);return n.push("transparent"),t=RegExp("^("+n.join("|")+")(\\W|$)","i"),s=function(e){return t.exec(e)},t.exec(e)},l=i.extend({init:function(){},toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+parseFloat((+this.a).toFixed(3))+")"},toDisplay:function(){return a.msie&&a.version<9?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()===n(e).toCssRgba()},diff:function(e){var t,n;return null===e?NaN:(t=this.toBytes(),n=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-n.r),2)+Math.pow(.59*(t.g-n.g),2)+Math.pow(.11*(t.b-n.b),2)))},clone:function(){var e=this.toBytes();return e===this&&(e=new c(e.r,e.g,e.b,e.a)),e}}),d=l.extend({init:function(e,t,n,i){l.fn.init.call(this),this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this,i=n.r,r=n.g,o=n.b,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,d=s;return 0===l?new u(0,0,d,this.a):(0!==s?(t=l/s,e=i===s?(r-o)/l:r===s?2+(o-i)/l:4+(i-r)/l,e*=60,e<0&&(e+=360)):(t=0,e=-1),new u(e,t,d,this.a))},toHSL:function(){var e,t,n,i=this,r=i.r,o=i.g,a=i.b,s=Math.max(r,o,a),l=Math.min(r,o,a),d=(s+l)/2;if(s===l)e=t=0;else switch(n=s-l,t=d>.5?n/(2-s-l):n/(s+l),s){case r:e=(o-a)/n+(o<a?6:0);break;case o:e=(a-r)/n+2;break;case a:e=(r-o)/n+4}return new p(60*e,100*t,100*d,this.a)},toBytes:function(){return new c(255*this.r,255*this.g,255*this.b,this.a)}}),c=d.extend({init:function(e,t,n,i){d.fn.init.call(this,Math.round(e),Math.round(t),Math.round(n),i)},toRGB:function(){return new d(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHSL:function(){return this.toRGB().toHSL()},toHex:function(){return e(this.r,2)+e(this.g,2)+e(this.b,2)},toBytes:function(){return this}}),u=l.extend({init:function(e,t,n,i){l.fn.init.call(this),this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i,r,o,a,s,l=this,c=l.h,u=l.s,p=l.v;if(0===u)e=t=n=p;else switch(c/=60,i=Math.floor(c),r=c-i,o=p*(1-u),a=p*(1-u*r),s=p*(1-u*(1-r)),i){case 0:e=p,t=s,n=o;break;case 1:e=a,t=p,n=o;break;case 2:e=o,t=p,n=s;break;case 3:e=o,t=a,n=p;break;case 4:e=s,t=o,n=p;break;default:e=p,t=o,n=a}return new d(e,t,n,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),p=l.extend({init:function(e,t,n,i){l.fn.init.call(this),this.h=e,this.s=t,this.l=n,this.a=i},toRGB:function(){var e,n,i,r,o,a=this.h/360,s=this.s/100,l=this.l/100;return 0===s?e=n=i=l:(r=l<.5?l*(1+s):l+s-l*s,o=2*l-r,e=t(o,r,a+1/3),n=t(o,r,a),i=t(o,r,a-1/3)),new d(e,n,i,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}}),f=180,h=i.extend({init:function(e){var t,n,i,r,o,a,s,l=this;if(1===arguments.length)for(t=h.formats,n=this.resolveColor(e),i=0;i<t.length;i++)r=t[i].re,o=t[i].process,a=r.exec(n),a&&(s=o(a),l.r=s[0],l.g=s[1],l.b=s[2]);else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)},toHex:function(){var e=this.padDigit,t=this.r.toString(16),n=this.g.toString(16),i=this.b.toString(16);return"#"+e(t)+e(n)+e(i)},resolveColor:function(e){var t=e||"black";return"#"===t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,""),t=t.toLowerCase(),t=h.namedColors[t]||t},normalizeByte:function(e){return e<0||isNaN(e)?0:e>255?255:e},padDigit:function(e){return 1===e.length?"0"+e:e},brightness:function(e){var t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this},percBrightness:function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)},isDark:function(){return this.percBrightness()<f}}),h.fromBytes=function(e,t,n,i){return new c(e,t,n,null!=i?i:1)},h.fromRGB=function(e,t,n,i){return new d(e,t,n,null!=i?i:1)},h.fromHSV=function(e,t,n,i){return new u(e,t,n,null!=i?i:1)},h.fromHSL=function(e,t,n,i){return new p(e,t,n,null!=i?i:1)},h.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],h.namedColors=o,kendo.deepExtend(kendo,{parseColor:n,namedColors:o,Color:h})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.slider.min",["kendo.draganddrop.min"],e);
|
17
|
-
}(function(){return function(e,t){function n(e,t,n){var i=n?" k-slider-horizontal":" k-slider-vertical",r=e.style?e.style:t.attr("style"),o=t.attr("class")?" "+t.attr("class"):"",a="";return"bottomRight"==e.tickPlacement?a=" k-slider-bottomright":"topLeft"==e.tickPlacement&&(a=" k-slider-topleft"),r=r?" style='"+r+"'":"","<div class='k-widget k-slider"+i+o+"'"+r+"><div class='k-slider-wrap"+(e.showButtons?" k-slider-buttons":"")+a+"'></div></div>"}function i(e,t,n,i){var r="";return r=n?!i&&"increase"==t||i&&"increase"!=t?"k-i-arrow-60-right":"k-i-arrow-60-left":"increase"==t?"k-i-arrow-60-up":"k-i-arrow-60-down","<a class='k-button k-button-"+t+"' title='"+e[t+"ButtonTitle"]+"' aria-label='"+e[t+"ButtonTitle"]+"'><span class='k-icon "+r+"'></span></a>"}function r(e,t){var n,i="<ul class='k-reset k-slider-items'>",r=T.floor(c(t/e.smallStep))+1;for(n=0;n<r;n++)i+="<li class='k-tick' role='presentation'> </li>";return i+="</ul>"}function o(e,t){var n=t.is("input")?1:2,i=2==n?e.leftDragHandleTitle:e.dragHandleTitle;return"<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='"+i+"' role='slider' aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(n>1?e.selectionStart||e.min:e.value||e.min)+"'></a>"+(n>1?"<a href='#' class='k-draghandle' title='"+e.rightDragHandleTitle+"'role='slider' aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(e.selectionEnd||e.max)+"'></a>":"")+"</div>"}function a(e){return function(t){return t+e}}function s(e){return function(){return e}}function l(e){return(e+"").replace(".",m.cultures.current.numberFormat["."])}function d(e){var t=""+e,n=0;return t=t.split("."),t[1]&&(n=t[1].length),n=n>10?10:n}function c(e){var t,n;return e=parseFloat(e,10),t=d(e),n=T.pow(10,t||0),T.round(e*n)/n}function u(e,n){var i=w(e.getAttribute(n));return null===i&&(i=t),i}function p(e){return typeof e!==Q}function f(e){return 1e4*e}var h,m=window.kendo,g=m.ui.Widget,v=m.ui.Draggable,_=m._outerWidth,b=m._outerHeight,k=e.extend,y=m.format,w=m.parseFloat,x=e.proxy,C=e.isArray,T=Math,S=m.support,I=S.pointers,D=S.msPointers,F="change",E="slide",A=".slider",z="touchstart"+A+" mousedown"+A,N=I?"pointerdown"+A:D?"MSPointerDown"+A:z,P="touchend"+A+" mouseup"+A,H=I?"pointerup":D?"MSPointerUp"+A:P,R="moveSelection",O="keydown"+A,M="click"+A,B="mouseover"+A,L="focus"+A,V="blur"+A,U=".k-draghandle",W=".k-slider-track",j=".k-tick",q="k-state-selected",G="k-state-focused",$="k-state-default",K="k-state-disabled",Y="disabled",Q="undefined",X="tabindex",J=m.getTouches,Z=g.extend({init:function(e,t){var n,i=this;if(g.fn.init.call(i,e,t),t=i.options,i._isHorizontal="horizontal"==t.orientation,i._isRtl=i._isHorizontal&&m.support.isRtl(e),i._position=i._isHorizontal?"left":"bottom",i._sizeFn=i._isHorizontal?"width":"height",i._outerSize=i._isHorizontal?_:b,t.tooltip.format=t.tooltip.enabled?t.tooltip.format||"{0}":"{0}",t.smallStep<=0)throw Error("Kendo UI Slider smallStep must be a positive number.");i._createHtml(),i.wrapper=i.element.closest(".k-slider"),i._trackDiv=i.wrapper.find(W),i._setTrackDivWidth(),i._maxSelection=i._trackDiv[i._sizeFn](),i._sliderItemsInit(),i._reset(),i._tabindex(i.wrapper.find(U)),i[t.enabled?"enable":"disable"](),n=m.support.isRtl(i.wrapper)?-1:1,i._keyMap={37:a(-1*n*t.smallStep),40:a(-t.smallStep),39:a(1*n*t.smallStep),38:a(+t.smallStep),35:s(t.max),36:s(t.min),33:a(+t.largeStep),34:a(-t.largeStep)},m.notify(i)},events:[F,E],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_distance:function(){return c(this.options.max-this.options.min)},_resize:function(){this._setTrackDivWidth(),this.wrapper.find(".k-slider-items").remove(),this._maxSelection=this._trackDiv[this._sizeFn](),this._sliderItemsInit(),this._refresh(),this.options.enabled&&this.enable(!0)},_sliderItemsInit:function(){var t=this,n=t.options,i=t._maxSelection/((n.max-n.min)/n.smallStep),o=t._calculateItemsWidth(T.floor(f(t._distance())/f(n.smallStep)));"none"!=n.tickPlacement&&i>=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(r(n,t._distance())),t._setItemsWidth(o),t._setItemsTitle()),t._calculateSteps(o),"none"!=n.tickPlacement&&i>=2&&n.largeStep>=n.smallStep&&t._setItemsLargeTick()},getSize:function(){return m.dimensions(this.wrapper)},_setTrackDivWidth:function(){var e=this,t=2*parseFloat(e._trackDiv.css(e._isRtl?"right":e._position),10);e._trackDiv[e._sizeFn](e.wrapper[e._sizeFn]()-2-t)},_setItemsWidth:function(t){var n,i=this,r=i.options,o=0,a=t.length-1,s=i.wrapper.find(j),l=0,d=2,c=s.length,u=0;for(n=0;n<c-2;n++)e(s[n+1])[i._sizeFn](t[n]);if(i._isHorizontal?(e(s[o]).addClass("k-first")[i._sizeFn](t[a-1]),e(s[a]).addClass("k-last")[i._sizeFn](t[a])):(e(s[a]).addClass("k-first")[i._sizeFn](t[a]),e(s[o]).addClass("k-last")[i._sizeFn](t[a-1])),i._distance()%r.smallStep!==0&&!i._isHorizontal){for(n=0;n<t.length;n++)u+=t[n];l=i._maxSelection-u,l+=parseFloat(i._trackDiv.css(i._position),10)+d,i.wrapper.find(".k-slider-items").css("padding-top",l)}},_setItemsTitle:function(){for(var t=this,n=t.options,i=t.wrapper.find(j),r=n.min,o=i.length,a=t._isHorizontal&&!t._isRtl?0:o-1,s=t._isHorizontal&&!t._isRtl?o:-1,l=t._isHorizontal&&!t._isRtl?1:-1;a-s!==0;a+=l)e(i[a]).attr("title",y(n.tooltip.format,c(r))),r+=n.smallStep},_setItemsLargeTick:function(){var t,n,i,r=this,o=r.options,a=r.wrapper.find(j),s=0;if(f(o.largeStep)%f(o.smallStep)===0||r._distance()/o.largeStep>=3)for(r._isHorizontal||r._isRtl||(a=e.makeArray(a).reverse()),s=0;s<a.length;s++)t=e(a[s]),n=r._values[s],i=c(f(n-this.options.min)),i%f(o.smallStep)===0&&i%f(o.largeStep)===0&&(t.addClass("k-tick-large").html("<span class='k-label'>"+t.attr("title")+"</span>"),0!==s&&s!==a.length-1&&t.css("line-height",t[r._sizeFn]()+"px"))},_calculateItemsWidth:function(e){var t,n,i,r=this,o=r.options,a=parseFloat(r._trackDiv.css(r._sizeFn))+1,s=r._distance(),l=f(s)/f(o.smallStep),d=a/f(s);for(l-e>0&&(a-=f(s)%f(o.smallStep)*d),t=a/e,n=[],i=0;i<e-1;i++)n[i]=t;return n[e-1]=n[e]=t/2,r._roundWidths(n)},_roundWidths:function(e){var t,n=0,i=e.length;for(t=0;t<i;t++)n+=e[t]-T.floor(e[t]),e[t]=T.floor(e[t]);return n=T.round(n),this._addAdditionalSize(n,e)},_addAdditionalSize:function(e,t){if(0===e)return t;var n,i=parseFloat(t.length-1)/parseFloat(1==e?e:e-1);for(n=0;n<e;n++)t[parseInt(T.round(i*n),10)]+=1;return t},_calculateSteps:function(e){var t,n=this,i=n.options,r=i.min,o=0,a=n._distance(),s=T.ceil(f(a)/f(i.smallStep)),l=1;if(s+=f(a)/f(i.smallStep)%1===0?1:0,e.splice(0,0,2*e[s-2]),e.splice(s-1,1,2*e.pop()),n._pixelSteps=[o],n._values=[r],0!==s){for(;l<s;)o+=(e[l-1]+e[l])/2,n._pixelSteps[l]=o,r+=i.smallStep,n._values[l]=c(r),l++;t=f(a)%f(i.smallStep)===0?s-1:s,n._pixelSteps[t]=n._maxSelection,n._values[t]=i.max,n._isRtl&&(n._pixelSteps.reverse(),n._values.reverse())}},_getValueFromPosition:function(e,t){var n,i=this,r=i.options,o=T.max(r.smallStep*(i._maxSelection/i._distance()),0),a=0,s=o/2;if(i._isHorizontal?(a=e-t.startPoint,i._isRtl&&(a=i._maxSelection-a)):a=t.startPoint-e,i._maxSelection-(parseInt(i._maxSelection%o,10)-3)/2<a)return r.max;for(n=0;n<i._pixelSteps.length;n++)if(T.abs(i._pixelSteps[n]-a)-1<=s)return c(i._values[n])},_getFormattedValue:function(e,t){var n,i,r,o=this,a="",s=o.options.tooltip;return C(e)?(i=e[0],r=e[1]):t&&t.type&&(i=t.selectionStart,r=t.selectionEnd),t&&(n=t.tooltipTemplate),!n&&s.template&&(n=m.template(s.template)),C(e)||t&&t.type?n?a=n({selectionStart:i,selectionEnd:r}):(i=y(s.format,i),r=y(s.format,r),a=i+" - "+r):(t&&(t.val=e),a=n?n({value:e}):y(s.format,e)),a},_getDraggableArea:function(){var e=this,t=m.getOffset(e._trackDiv);return{startPoint:e._isHorizontal?t.left:t.top+e._maxSelection,endPoint:e._isHorizontal?t.left+e._maxSelection:t.top}},_createHtml:function(){var e=this,t=e.element,r=e.options,a=t.find("input");2==a.length?(a.eq(0).prop("value",l(r.selectionStart)),a.eq(1).prop("value",l(r.selectionEnd))):t.prop("value",l(r.value)),t.wrap(n(r,t,e._isHorizontal)).hide(),r.showButtons&&t.before(i(r,"increase",e._isHorizontal,e._isRtl)).before(i(r,"decrease",e._isHorizontal,e._isRtl)),t.before(o(r,t))},_focus:function(t){var n=this,i=t.target,r=n.value(),o=n._drag;o||(i==n.wrapper.find(U).eq(0)[0]?(o=n._firstHandleDrag,n._activeHandle=0):(o=n._lastHandleDrag,n._activeHandle=1),r=r[n._activeHandle]),e(i).addClass(G+" "+q),o&&(n._activeHandleDrag=o,o.selectionStart=n.options.selectionStart,o.selectionEnd=n.options.selectionEnd,o._updateTooltip(r))},_focusWithMouse:function(t){t=e(t);var n=this,i=t.is(U)?t.index():0;window.setTimeout(function(){n.wrapper.find(U)[2==i?1:0].focus()},1),n._setTooltipTimeout()},_blur:function(t){var n=this,i=n._activeHandleDrag;e(t.target).removeClass(G+" "+q),i&&(i._removeTooltip(),delete n._activeHandleDrag,delete n._activeHandle)},_setTooltipTimeout:function(){var e=this;e._tooltipTimeout=window.setTimeout(function(){var t=e._drag||e._activeHandleDrag;t&&t._removeTooltip()},300)},_clearTooltipTimeout:function(){var e,t=this;window.clearTimeout(this._tooltipTimeout),e=t._drag||t._activeHandleDrag,e&&e.tooltipDiv&&e.tooltipDiv.stop(!0,!1).css("opacity",1)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._form=r.on("reset",x(t._formResetHandler,t)))},min:function(e){return e?(this.setOptions({min:e}),t):this.options.min},max:function(e){return e?(this.setOptions({max:e}),t):this.options.max},setOptions:function(e){g.fn.setOptions.call(this,e),this._sliderItemsInit(),this._refresh()},destroy:function(){this._form&&this._form.off("reset",this._formResetHandler),g.fn.destroy.call(this)}}),ee=Z.extend({init:function(n,i){var r,o=this;n.type="text",i=k({},{value:u(n,"value"),min:u(n,"min"),max:u(n,"max"),smallStep:u(n,"step")},i),n=e(n),i&&i.enabled===t&&(i.enabled=!n.is("[disabled]")),Z.fn.init.call(o,n,i),i=o.options,p(i.value)&&null!==i.value||(i.value=i.min,n.prop("value",l(i.min))),i.value=T.max(T.min(i.value,i.max),i.min),r=o.wrapper.find(U),this._selection=new ee.Selection(r,o,i),o._drag=new ee.Drag(r,"",o,i)},options:{name:"Slider",showButtons:!0,increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease",dragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},value:null},enable:function(n){var i,r,o,a=this,s=a.options;a.disable(),n!==!1&&(a.wrapper.removeClass(K).addClass($),a.wrapper.find("input").removeAttr(Y),i=function(n){var i,r,o,s=J(n)[0];if(s){if(i=a._isHorizontal?s.location.pageX:s.location.pageY,r=a._getDraggableArea(),o=e(n.target),o.hasClass("k-draghandle"))return o.addClass(G+" "+q),t;a._update(a._getValueFromPosition(i,r)),a._focusWithMouse(n.target),a._drag.dragstart(n),n.preventDefault()}},a.wrapper.find(j+", "+W).on(N,i).end().on(N,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(H,function(){a._drag._end()}),a.wrapper.find(U).attr(X,0).on(P,function(){a._setTooltipTimeout()}).on(M,function(e){a._focusWithMouse(e.target),e.preventDefault()}).on(L,x(a._focus,a)).on(V,x(a._blur,a)),r=x(function(e){var t=a._nextValueByIndex(a._valueIndex+1*e);a._setValueInRange(t),a._drag._updateTooltip(t)},a),s.showButtons&&(o=x(function(e,t){this._clearTooltipTimeout(),(1===e.which||S.touch&&0===e.which)&&(r(t),this.timeout=setTimeout(x(function(){this.timer=setInterval(function(){r(t)},60)},this),200))},a),a.wrapper.find(".k-button").on(P,x(function(e){this._clearTimer(),a._focusWithMouse(e.target)},a)).on(B,function(t){e(t.currentTarget).addClass("k-state-hover")}).on("mouseout"+A,x(function(t){e(t.currentTarget).removeClass("k-state-hover"),this._clearTimer()},a)).eq(0).on(z,x(function(e){o(e,1)},a)).click(!1).end().eq(1).on(z,x(function(e){o(e,-1)},a)).click(m.preventDefault)),a.wrapper.find(U).off(O,!1).on(O,x(this._keydown,a)),s.enabled=!0)},disable:function(){var t=this;t.wrapper.removeClass($).addClass(K),e(t.element).prop(Y,Y),t.wrapper.find(".k-button").off(z).on(z,function(t){t.preventDefault(),e(this).addClass("k-state-active")}).off(P).on(P,function(t){t.preventDefault(),e(this).removeClass("k-state-active")}).off("mouseleave"+A).on("mouseleave"+A,m.preventDefault).off(B).on(B,m.preventDefault),t.wrapper.find(j+", "+W).off(N).off(H),t.wrapper.find(U).attr(X,-1).off(P).off(O).off(M).off(L).off(V),t.options.enabled=!1},_update:function(e){var t=this,n=t.value()!=e;t.value(e),n&&t.trigger(F,{value:t.options.value})},value:function(e){var n=this,i=n.options;return e=c(e),isNaN(e)?i.value:(e>=i.min&&e<=i.max&&i.value!=e&&(n.element.prop("value",l(e)),i.value=e,n._refreshAriaAttr(e),n._refresh()),t)},_refresh:function(){this.trigger(R,{value:this.options.value})},_refreshAriaAttr:function(e){var t,n=this,i=n._drag;t=i&&i._tooltipDiv?i._tooltipDiv.text():n._getFormattedValue(e,null),this.wrapper.find(U).attr("aria-valuenow",e).attr("aria-valuetext",t)},_clearTimer:function(){clearTimeout(this.timeout),clearInterval(this.timer)},_keydown:function(e){var t=this;e.keyCode in t._keyMap&&(t._clearTooltipTimeout(),t._setValueInRange(t._keyMap[e.keyCode](t.options.value)),t._drag._updateTooltip(t.value()),e.preventDefault())},_setValueInRange:function(e){var n=this,i=n.options;return e=c(e),isNaN(e)?(n._update(i.min),t):(e=T.max(T.min(e,i.max),i.min),n._update(e),t)},_nextValueByIndex:function(e){var t=this._values.length;return this._isRtl&&(e=t-1-e),this._values[T.max(0,T.min(e,t-1))]},_formResetHandler:function(){var e=this,t=e.options.min;setTimeout(function(){var n=e.element[0].value;e.value(""===n||isNaN(n)?t:n)})},destroy:function(){var e=this;Z.fn.destroy.call(e),e.wrapper.off(A).find(".k-button").off(A).end().find(U).off(A).end().find(j+", "+W).off(A).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});ee.Selection=function(e,t,n){function i(i){var r=i-n.min,o=t._valueIndex=T.ceil(c(r/n.smallStep)),a=parseInt(t._pixelSteps[o],10),s=t._trackDiv.find(".k-slider-selection"),l=parseInt(t._outerSize(e)/2,10),d=t._isRtl?2:0;s[t._sizeFn](t._isRtl?t._maxSelection-a:a),e.css(t._position,a-l-d)}i(n.value),t.bind([E,R],function(e){i(parseFloat(e.value,10))}),t.bind(F,function(e){i(parseFloat(e.sender.value(),10))})},ee.Drag=function(e,t,n,i){var r=this;r.owner=n,r.options=i,r.element=e,r.type=t,r.draggable=new v(e,{distance:0,dragstart:x(r._dragstart,r),drag:x(r.drag,r),dragend:x(r.dragend,r),dragcancel:x(r.dragcancel,r)}),e.click(!1),e.on("dragstart",function(e){e.preventDefault()})},ee.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(n){var i=this,r=i.owner,o=i.options;return o.enabled?(this.owner._activeDragHandle=this,r.element.off(B),r.wrapper.find("."+G).removeClass(G+" "+q),i.element.addClass(G+" "+q),e(document.documentElement).css("cursor","pointer"),i.dragableArea=r._getDraggableArea(),i.step=T.max(o.smallStep*(r._maxSelection/r._distance()),0),i.type?(i.selectionStart=o.selectionStart,i.selectionEnd=o.selectionEnd,r._setZIndex(i.type)):i.oldVal=i.val=o.value,i._removeTooltip(!0),i._createTooltip(),t):(n.preventDefault(),t)},_createTooltip:function(){var t,n,i=this,r=i.owner,o=i.options.tooltip,a="",s=e(window);o.enabled&&(o.template&&(t=i.tooltipTemplate=m.template(o.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("<div class='k-tooltip k-slider-tooltip'><!-- --></div>").appendTo(document.body),a=r._getFormattedValue(i.val||r.value(),i),i.type||(n="k-callout-"+(r._isHorizontal?"s":"e"),i.tooltipInnerDiv="<div class='k-callout "+n+"'><!-- --></div>",a+=i.tooltipInnerDiv),i.tooltipDiv.html(a),i._scrollOffset={top:s.scrollTop(),left:m.scrollLeft(s)},i.moveTooltip())},drag:function(e){var t,n=this,i=n.owner,r=e.x.location,o=e.y.location,a=n.dragableArea.startPoint,s=n.dragableArea.endPoint;e.preventDefault(),n.val=i._isHorizontal?i._isRtl?n.constrainValue(r,a,s,r<s):n.constrainValue(r,a,s,r>=s):n.constrainValue(o,s,a,o<=s),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.selectionStart=n.val<n.selectionEnd?n.val:n.selectionEnd=n.val:n.val>n.selectionStart?n.selectionEnd=n.val:n.selectionStart=n.selectionEnd=n.val,t={values:[n.selectionStart,n.selectionEnd],value:[n.selectionStart,n.selectionEnd]}):t={value:n.val},i.trigger(E,t)),n._updateTooltip(n.val)},_updateTooltip:function(e){var t=this,n=t.options,i=n.tooltip,r="";i.enabled&&(t.tooltipDiv||t._createTooltip(),r=t.owner._getFormattedValue(c(e),t),t.type||(r+=t.tooltipInnerDiv),t.tooltipDiv.html(r),t.moveTooltip())},dragcancel:function(){return this.owner._refresh(),e(document.documentElement).css("cursor",""),this._end()},dragend:function(){var t=this,n=t.owner;return e(document.documentElement).css("cursor",""),t.type?n._update(t.selectionStart,t.selectionEnd):(n._update(t.val),t.draggable.userEvents._disposeAll()),t.draggable.userEvents.cancel(),t._end()},_end:function(){var e=this,t=e.owner;return t._focusWithMouse(e.element),t.element.on(B),!1},_removeTooltip:function(t){var n=this,i=n.owner;n.tooltipDiv&&i.options.tooltip.enabled&&i.options.enabled&&(t?(n.tooltipDiv.remove(),n.tooltipDiv=null):n.tooltipDiv.fadeOut("slow",function(){e(this).remove(),n.tooltipDiv=null}))},moveTooltip:function(){var t,n,i,r,o=this,a=o.owner,s=0,l=0,d=o.element,c=m.getOffset(d),u=8,p=e(window),f=o.tooltipDiv.find(".k-callout"),h=_(o.tooltipDiv),g=b(o.tooltipDiv);o.type?(t=a.wrapper.find(U),c=m.getOffset(t.eq(0)),n=m.getOffset(t.eq(1)),a._isHorizontal?(s=n.top,l=c.left+(n.left-c.left)/2):(s=c.top+(n.top-c.top)/2,l=n.left),r=_(t.eq(0))+2*u):(s=c.top,l=c.left,r=_(d)+2*u),a._isHorizontal?(l-=parseInt((h-a._outerSize(d))/2,10),s-=g+u+(f.length?f.height():0)):(s-=parseInt((g-a._outerSize(d))/2,10),l-=h+u+(f.length?f.width():0)),a._isHorizontal?(i=o._flip(s,g,r,b(p)+o._scrollOffset.top),s+=i,l+=o._fit(l,h,_(p)+o._scrollOffset.left)):(i=o._flip(l,h,r,_(p)+o._scrollOffset.left),s+=o._fit(s,g,b(p)+o._scrollOffset.top),l+=i),i>0&&f&&(f.removeClass(),f.addClass("k-callout k-callout-"+(a._isHorizontal?"n":"w"))),o.tooltipDiv.css({top:s,left:l})},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i){var r=0;return e+t>i&&(r+=-(n+t)),e+r<0&&(r+=n+t),r},constrainValue:function(e,t,n,i){var r=this,o=0;return o=t<e&&e<n?r.owner._getValueFromPosition(e,r.dragableArea):i?r.options.max:r.options.min}},m.ui.plugin(ee),h=Z.extend({init:function(n,i){var r,o=this,a=e(n).find("input"),s=a.eq(0)[0],d=a.eq(1)[0];s.type="text",d.type="text",i&&i.showButtons&&(window.console&&window.console.warn("showbuttons option is not supported for the range slider, ignoring"),i.showButtons=!1),i=k({},{selectionStart:u(s,"value"),min:u(s,"min"),max:u(s,"max"),smallStep:u(s,"step")},{selectionEnd:u(d,"value"),min:u(d,"min"),max:u(d,"max"),smallStep:u(d,"step")},i),i&&i.enabled===t&&(i.enabled=!a.is("[disabled]")),Z.fn.init.call(o,n,i),i=o.options,p(i.selectionStart)&&null!==i.selectionStart||(i.selectionStart=i.min,a.eq(0).prop("value",l(i.min))),p(i.selectionEnd)&&null!==i.selectionEnd||(i.selectionEnd=i.max,a.eq(1).prop("value",l(i.max))),r=o.wrapper.find(U),this._selection=new h.Selection(r,o,i),o._firstHandleDrag=new ee.Drag(r.eq(0),"firstHandle",o,i),o._lastHandleDrag=new ee.Drag(r.eq(1),"lastHandle",o,i)},options:{name:"RangeSlider",leftDragHandleTitle:"drag",rightDragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},selectionStart:null,selectionEnd:null},enable:function(n){var i,r=this,o=r.options;r.disable(),n!==!1&&(r.wrapper.removeClass(K).addClass($),r.wrapper.find("input").removeAttr(Y),i=function(n){var i,a,s,l,d,c,u,p=J(n)[0];if(p){if(i=r._isHorizontal?p.location.pageX:p.location.pageY,a=r._getDraggableArea(),s=r._getValueFromPosition(i,a),l=e(n.target),l.hasClass("k-draghandle"))return r.wrapper.find("."+G).removeClass(G+" "+q),l.addClass(G+" "+q),t;s<o.selectionStart?(d=s,c=o.selectionEnd,u=r._firstHandleDrag):s>r.selectionEnd?(d=o.selectionStart,c=s,u=r._lastHandleDrag):s-o.selectionStart<=o.selectionEnd-s?(d=s,c=o.selectionEnd,u=r._firstHandleDrag):(d=o.selectionStart,c=s,u=r._lastHandleDrag),u.dragstart(n),r._setValueInRange(d,c),r._focusWithMouse(u.element)}},r.wrapper.find(j+", "+W).on(N,i).end().on(N,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(H,function(){r._activeDragHandle&&r._activeDragHandle._end()}),r.wrapper.find(U).attr(X,0).on(P,function(){r._setTooltipTimeout()}).on(M,function(e){r._focusWithMouse(e.target),e.preventDefault()}).on(L,x(r._focus,r)).on(V,x(r._blur,r)),r.wrapper.find(U).off(O,m.preventDefault).eq(0).on(O,x(function(e){this._keydown(e,"firstHandle")},r)).end().eq(1).on(O,x(function(e){this._keydown(e,"lastHandle")},r)),r.options.enabled=!0)},disable:function(){var e=this;e.wrapper.removeClass($).addClass(K),e.wrapper.find("input").prop(Y,Y),e.wrapper.find(j+", "+W).off(N).off(H),e.wrapper.find(U).attr(X,-1).off(P).off(O).off(M).off(L).off(V),e.options.enabled=!1},_keydown:function(e,t){var n,i,r,o=this,a=o.options.selectionStart,s=o.options.selectionEnd;e.keyCode in o._keyMap&&(o._clearTooltipTimeout(),"firstHandle"==t?(r=o._activeHandleDrag=o._firstHandleDrag,a=o._keyMap[e.keyCode](a),a>s&&(s=a)):(r=o._activeHandleDrag=o._lastHandleDrag,s=o._keyMap[e.keyCode](s),a>s&&(a=s)),o._setValueInRange(c(a),c(s)),n=Math.max(a,o.options.selectionStart),i=Math.min(s,o.options.selectionEnd),r.selectionEnd=Math.max(i,o.options.selectionStart),r.selectionStart=Math.min(n,o.options.selectionEnd),r._updateTooltip(o.value()[o._activeHandle]),e.preventDefault())},_update:function(e,t){var n=this,i=n.value(),r=i[0]!=e||i[1]!=t;n.value([e,t]),r&&n.trigger(F,{values:[e,t],value:[e,t]})},value:function(e){return e&&e.length?this._value(e[0],e[1]):this._value()},_value:function(e,n){var i=this,r=i.options,o=r.selectionStart,a=r.selectionEnd;return isNaN(e)&&isNaN(n)?[o,a]:(e=c(e),n=c(n),e>=r.min&&e<=r.max&&n>=r.min&&n<=r.max&&e<=n&&(o==e&&a==n||(i.element.find("input").eq(0).prop("value",l(e)).end().eq(1).prop("value",l(n)),r.selectionStart=e,r.selectionEnd=n,i._refresh(),i._refreshAriaAttr(e,n))),t)},values:function(e,t){return C(e)?this._value(e[0],e[1]):this._value(e,t)},_refresh:function(){var e=this,t=e.options;e.trigger(R,{values:[t.selectionStart,t.selectionEnd],value:[t.selectionStart,t.selectionEnd]}),t.selectionStart==t.max&&t.selectionEnd==t.max&&e._setZIndex("firstHandle")},_refreshAriaAttr:function(e,t){var n,i=this,r=i.wrapper.find(U),o=i._activeHandleDrag;n=i._getFormattedValue([e,t],o),r.eq(0).attr("aria-valuenow",e),r.eq(1).attr("aria-valuenow",t),r.attr("aria-valuetext",n)},_setValueInRange:function(e,t){var n=this.options;e=T.max(T.min(e,n.max),n.min),t=T.max(T.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(T.min(e,t),T.max(e,t))},_setZIndex:function(t){this.wrapper.find(U).each(function(n){e(this).css("z-index","firstHandle"==t?1-n:n)})},_formResetHandler:function(){var e=this,t=e.options;setTimeout(function(){var n=e.element.find("input"),i=n[0].value,r=n[1].value;e.values(""===i||isNaN(i)?t.min:i,""===r||isNaN(r)?t.max:r)})},destroy:function(){var e=this;Z.fn.destroy.call(e),e.wrapper.off(A).find(j+", "+W).off(A).end().find(U).off(A),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),h.Selection=function(e,t,n){function i(i){i=i||[];var o=i[0]-n.min,a=i[1]-n.min,s=T.ceil(c(o/n.smallStep)),l=T.ceil(c(a/n.smallStep)),d=t._pixelSteps[s],u=t._pixelSteps[l],p=parseInt(t._outerSize(e.eq(0))/2,10),f=t._isRtl?2:0;e.eq(0).css(t._position,d-p-f).end().eq(1).css(t._position,u-p-f),r(d,u)}function r(e,n){var i,r,o=t._trackDiv.find(".k-slider-selection");i=T.abs(e-n),o[t._sizeFn](i),t._isRtl?(r=T.max(e,n),o.css("right",t._maxSelection-r-1)):(r=T.min(e,n),o.css(t._position,r-1))}i(t.value()),t.bind([F,E,R],function(e){i(e.values)})},m.ui.plugin(h)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.badge.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.ui,o="k-hidden",a="<span class='k-badge-icon k-icon k-i-#= icon #'></span>",s="<span class='k-badge-icon k-svg-icon'>#= icon #</span>",l=i.extend({init:function(e,t){var r=this;i.fn.init.call(r,e,t),r._content(),r._appearance(),n.notify(r)},destroy:function(){var e=this;i.fn.destroy.call(e)},options:{name:"Badge",cutoutBorder:!1,data:{},fill:"solid",icon:"",max:1/0,position:"inline",align:"",sizes:{small:"sm",medium:"md",large:"lg"},size:"medium",shape:"rounded",template:null,text:"",themeColor:"secondary",visible:!0,_classNames:[]},_content:function(){var e=this,i=e.options.text,r=e.options.template,o=e.options.data,a=e.options.icon;return null!==r?(e._text=i,e._template=n.template(r).bind(e),e.element.html(e._template(o)),t):""!==a?(e.icon(a),t):""!==i?(e.text(i),t):(e.text(e.element.html()),t)},_appearance:function(){var e=this;e._themeColor=e.options.themeColor,e._shape=e.options.shape,e._sizes=e.options.sizes,e._size=e.options.size,e._fill=e.options.fill,e._cutoutBorder=e.options.cutoutBorder,e._align=e.options.align,e._position=e.options.position,e._visible=e.options.visible,e._updateClassNames()},_updateClassNames:function(){var e=this,n=["k-badge"],i=e.options._classNames,r=e._themeColor,a=e._shape,s=e._sizes,l=e._size,d=s[l]===t?l:s[l],c=e._fill,u=e._cutoutBorder,p=e._align,f=e._position,h=e._visible;e.element.removeClass(function(t,n){0===n.indexOf("k-")&&i.indexOf(n)===-1&&e.element.removeClass(n)}),"string"==typeof c&&""!==c&&n.push("k-badge-"+c),"string"==typeof r&&""!==r&&n.push("k-badge-"+r),"string"==typeof l&&""!==l&&n.push("k-badge-"+d),"string"==typeof a&&""!==a&&n.push("k-badge-"+a),"boolean"==typeof u&&u===!0&&n.push("k-badge-border-cutout"),"string"==typeof f&&""!==f&&n.push("k-badge-"+f),"string"==typeof f&&""!==f&&"inline"!==f&&"string"==typeof p&&2==p.split(" ").length&&n.push("k-"+p.replace(" ","-")),h===!1&&n.push(o),e.element.addClass(n.join(" "))},setOptions:function(e){var t=this;t.element.removeClass(function(e,n){n.indexOf("k-")>=0&&t.element.removeClass(n)}),i.fn.setOptions.call(t,e),t._content(),t._appearance()},text:function(e){var n=this,i=n.options.max;return 0===arguments.length||e===t?n._text:(n._text=e,e===!0||e===!1||null===e?(n.element.html(""),t):"string"==typeof e?(n.element.html(e),t):"number"==typeof e?(n.element.html(e>i?i+"+":e),t):"object"==typeof e&&"toString"in e?(n.element.html(""+e),t):t)},icon:function(e){var i,r=this;return 0===arguments.length||e===t?r._icon:(r._icon=e,0===e.indexOf("<svg")?(i=n.template(s),r.element.html(i({icon:e})),t):(i=n.template(a),r.element.html(i({icon:e})),t))},themeColor:function(e){var n=this;return 0===arguments.length||e===t?n._themeColor:(n._themeColor=e,n._updateClassNames(),t)},shape:function(e){var n=this;return 0===arguments.length||e===t?n._shape:(n._shape=e,n._updateClassNames(),t)},hide:function(){var e=this;e._visible=!1,e._updateClassNames()},show:function(){var e=this;e._visible=!0,e._updateClassNames()}});r.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.button.min",["kendo.core.min","kendo.badge.min"],e)}(function(){return function(e,t){var n,i=window.kendo,r=i.ui.Widget,o=i.ui,a=e.proxy,s=i.keys,l="click",d=i.support.mousedown,c=i.support.mouseup,u="mouseout",p="k-button",f="k-button-icon",h="k-button-icontext",m=".kendoButton",g="disabled",v="k-state-disabled",_="k-state-focused",b="k-state-active",k={icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",badge:null};i.setDefaults("button",k),n=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),e=n.wrapper=n.element,t=n.options,e.addClass(p).attr("role","button"),t.enable=t.enable&&t.enabled&&!e.attr(g),n.enable(t.enable),t.enable&&n._tabindex(),n._badge(),n.iconElement(),e.on(l+m,a(n._click,n)).on("focus"+m,a(n._focus,n)).on("blur"+m,a(n._blur,n)).on("keydown"+m,a(n._keydown,n)).on("keyup"+m,a(n._removeActive,n)).on(d+m,a(n._addActive,n)).on(c+m+" "+u+m,a(n._removeActive,n)),i.notify(n)},destroy:function(){var e=this;e.wrapper.off(m),e.badge&&e.badge.destroy(),r.fn.destroy.call(e)},events:[l],options:{name:"Button",enable:!0,enabled:!0,icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",badge:null},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(l,{event:e})&&e.preventDefault()},_focus:function(){this.options.enable&&this.element.addClass(_)},_blur:function(){var e=this;e.element.removeClass(_),setTimeout(function(){e.element.removeClass(b)})},_keydown:function(e){var t=this;e.keyCode!=s.ENTER&&e.keyCode!=s.SPACEBAR||(t._addActive(),t._isNativeButton()||(e.keyCode==s.SPACEBAR&&e.preventDefault(),t._click(e)))},_removeActive:function(){this.element.removeClass(b)},_addActive:function(){this.options.enable&&this.element.addClass(b)},iconElement:function(){var t,n,r,o=this,a=o.element,s=o.options,l=s.icon,d=s.iconClass,c=s.spriteCssClass,u=s.imageUrl;(c||u||l||d)&&(r=!0,a.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(e,t){(1==t.nodeType||3==t.nodeType&&i.trim(t.nodeValue).length>0)&&(r=!1)}),a.addClass(r?f:h)),u?(n=a.children("img.k-image").first(),n[0]||(n=e('<img alt="icon" class="k-image" />').prependTo(a)),n.attr("src",u)):l||d?(t=a.children("span.k-icon").first(),t[0]||(t=e("<span></span>").prependTo(a)),t.attr("class",l?"k-icon k-i-"+l:d)):c&&(t=a.children("span.k-sprite").first(),t[0]||(t=e('<span class="k-sprite"></span>').prependTo(a)),t.addClass(c))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(v,!e).attr("aria-disabled",!e).attr(g,!e),e&&n._tabindex();try{i.blur()}catch(r){}},_badge:function(){var n,i=this,r=i.options.badge;null!==r&&r!==t&&(r.constructor!==Object&&(r={text:r}),r.position!==t&&""!==r.position||(r.position="edge",r.align!==t&&""!==r.align||(r.align="top end")),r._classNames=["k-button-badge"],i.element.addClass("k-badge-container"),n=e("<span />").appendTo(i.element),i.badge=new o.Badge(n,r))}}),n.fn.hasOwnProperty("defaults")===!1&&Object.defineProperty(n.fn,"defaults",{get:function(){return i.defaults.button}}),i.ui.plugin(n)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.colorpicker.min",["kendo.core.min","kendo.color.min","kendo.popup.min","kendo.slider.min","kendo.userevents.min","kendo.button.min"],e)}(function(){return function(e,t,n){function i(e,t,n){n=c(n),n&&!n.equals(e.color())&&("change"==t&&(e._value=n),n=1!=n.a?n.toCssRgba():n.toCss(),e.trigger(t,{value:n}))}function r(e,t,n){var i,r;return e=Array.prototype.slice.call(e),i=e.length,r=e.indexOf(t),r<0?n<0?e[i-1]:e[0]:(r+=n,r<0?r+=i:r%=i,e[r])}function o(e){e.preventDefault()}function a(e,t){return function(){return e.apply(t,arguments)}}var s=window.kendo,l=s.ui,d=l.Widget,c=s.parseColor,u=s.Color,p=s.keys,f="background-color",h="k-state-selected",m="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",g="FFFFFF,FFCCFF,FF99FF,FF66FF,FF33FF,FF00FF,CCFFFF,CCCCFF,CC99FF,CC66FF,CC33FF,CC00FF,99FFFF,99CCFF,9999FF,9966FF,9933FF,9900FF,FFFFCC,FFCCCC,FF99CC,FF66CC,FF33CC,FF00CC,CCFFCC,CCCCCC,CC99CC,CC66CC,CC33CC,CC00CC,99FFCC,99CCCC,9999CC,9966CC,9933CC,9900CC,FFFF99,FFCC99,FF9999,FF6699,FF3399,FF0099,CCFF99,CCCC99,CC9999,CC6699,CC3399,CC0099,99FF99,99CC99,999999,996699,993399,990099,FFFF66,FFCC66,FF9966,FF6666,FF3366,FF0066,CCFF66,CCCC66,CC9966,CC6666,CC3366,CC0066,99FF66,99CC66,999966,996666,993366,990066,FFFF33,FFCC33,FF9933,FF6633,FF3333,FF0033,CCFF33,CCCC33,CC9933,CC6633,CC3333,CC0033,99FF33,99CC33,999933,996633,993333,990033,FFFF00,FFCC00,FF9900,FF6600,FF3300,FF0000,CCFF00,CCCC00,CC9900,CC6600,CC3300,CC0000,99FF00,99CC00,999900,996600,993300,990000,66FFFF,66CCFF,6699FF,6666FF,6633FF,6600FF,33FFFF,33CCFF,3399FF,3366FF,3333FF,3300FF,00FFFF,00CCFF,0099FF,0066FF,0033FF,0000FF,66FFCC,66CCCC,6699CC,6666CC,6633CC,6600CC,33FFCC,33CCCC,3399CC,3366CC,3333CC,3300CC,00FFCC,00CCCC,0099CC,0066CC,0033CC,0000CC,66FF99,66CC99,669999,666699,663399,660099,33FF99,33CC99,339999,336699,333399,330099,00FF99,00CC99,009999,006699,003399,000099,66FF66,66CC66,669966,666666,663366,660066,33FF66,33CC66,339966,336666,333366,330066,00FF66,00CC66,009966,006666,003366,000066,66FF33,66CC33,669933,666633,663333,660033,33FF33,33CC33,339933,336633,333333,330033,00FF33,00CC33,009933,006633,003333,000033,66FF00,66CC00,669900,666600,663300,660000,33FF00,33CC00,339900,336600,333300,330000,00FF00,00CC00,009900,006600,003300,000000",v="#ffffff",_={
|
18
|
-
apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:"Color Hexadecimal Code"},b=".kendoColorTools",k="click"+b,y="keydown"+b,w="k-state-disabled",x=s.support.browser,C=x.msie&&x.version<9,T=d.extend({init:function(e,t){var n,i=this;d.fn.init.call(i,e,t),e=i.element,t=i.options,i._value=t.value=c(t.value),i._tabIndex=e.attr("tabIndex")||0,n=i._ariaId=t.ariaId,n&&e.attr("aria-labelledby",n),t._standalone&&(i._triggerSelect=i._triggerChange)},options:{name:"ColorSelector",value:null,_standalone:!0},events:["change","select","cancel"],color:function(e){return e!==n&&(this._value=c(e),this._updateUI(this._value)),this._value},value:function(e){return e=this.color(e),e&&(e=this.options.opacity?e.toCssRgba():e.toCss()),e||null},enable:function(e){0===arguments.length&&(e=!0),this.wrapper.toggleClass(w,!e),this._onEnable(e)},_select:function(e,t){var n=this._value;e=this.color(e),t||(this.element.trigger("change"),e.equals(n)?this._standalone||this.trigger("cancel"):this.trigger("change",{value:this.value()}))},_triggerSelect:function(e){i(this,"select",e)},_triggerChange:function(e){i(this,"change",e)},destroy:function(){this.element&&this.element.off(b),this.wrapper&&this.wrapper.off(b).find("*").off(b),this.wrapper=null,d.fn.destroy.call(this)},_updateUI:e.noop,_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}}),S=T.extend({init:function(t,n){var i,r,o,l,d=this;if(T.fn.init.call(d,t,n),t=d.wrapper=d.element,n=d.options,i=n.palette,"websafe"==i?(i=g,n.columns=18):"basic"==i&&(i=m),"string"==typeof i&&(i=i.split(",")),e.isArray(i)&&(i=e.map(i,function(e){return c(e)})),d._selectedID=(n.ariaId||s.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(e(d._template({colors:i,columns:n.columns,tileSize:n.tileSize,value:d._value,id:n.ariaId}))).on(k,".k-item",function(t){d._select(e(t.currentTarget).css(f))}).attr("tabIndex",d._tabIndex).on(y,a(d._keydown,d)),r=n.tileSize){if(/number|string/.test(typeof r))o=l=parseFloat(r);else{if("object"!=typeof r)throw Error("Unsupported value for the 'tileSize' argument");o=parseFloat(r.width),l=parseFloat(r.height)}t.find(".k-item").css({width:o,height:l})}},focus:function(){this.wrapper&&!this.wrapper.is("[unselectable='on']")&&this.wrapper.focus()},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_onEnable:function(e){e?this.wrapper.attr("tabIndex",this._tabIndex):this.wrapper.removeAttr("tabIndex")},_keydown:function(t){var n,i,a=this.wrapper,s=a.find(".k-item"),l=s.filter("."+h).get(0),d=t.keyCode;if(d==p.LEFT?n=r(s,l,-1):d==p.RIGHT?n=r(s,l,1):d==p.DOWN?n=r(s,l,this.options.columns):d==p.UP?n=r(s,l,-this.options.columns):d==p.ENTER?(o(t),l&&this._select(e(l).css(f))):d==p.ESC&&this._cancel(),n){o(t),this._current(n);try{i=c(n.css(f)),this._triggerSelect(i)}catch(u){}}},_current:function(t){this.wrapper.find("."+h).removeClass(h).attr("aria-selected",!1).removeAttr("id"),e(t).addClass(h).attr("aria-selected",!0).attr("id",this._selectedID),this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_updateUI:function(t){var n=null;this.wrapper.find(".k-item").each(function(){var i=c(e(this).css(f));if(i&&i.equals(t))return n=this,!1}),this._current(n)},_template:s.template('<table class="k-palette k-reset" role="presentation"><tr role="row"># for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # </tr><tr role="row"> # } #<td role="gridcell" unselectable="on" style="background-color:#= colors[i].toCss() #"#= selected ? " aria-selected=true" : "" # #=(id && i === 0) ? "id=\\""+id+"\\" " : "" # class="k-item#= selected ? " '+h+'" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table>')}),I=T.extend({init:function(t,n){var i=this;T.fn.init.call(i,t,n),n=i.options,n.messages=n.options?e.extend(i.options.messages,n.options.messages):i.options.messages,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-alpha-slider .k-slider-track",t),i._selectedColor=e(".k-selected-color-display",t),i._colorAsText=e("input.k-color-value",t),i._sliders(),i._hsvArea(),i._updateUI(i._value||c("#f00")),t.find("input.k-color-value").on(y,function(t){var n,r,o=this;if(t.keyCode==p.ENTER)try{n=c(o.value),r=i.color(),i._select(n,n.equals(r))}catch(a){e(o).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=c(o.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(k,".k-controls button.apply",function(){i.options._clearedColor?i.trigger("change"):i._select(i._getHSV())}).on(k,".k-controls button.cancel",function(){i._updateUI(i.color()),i._cancel()}),C&&i._applyIEFilter()},destroy:function(){this._hsvEvents.destroy(),this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=null,T.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,clearButton:!1,autoupdate:!0,messages:_},_applyIEFilter:function(){var e=this.element.find(".k-hue-slider .k-slider-track")[0],t=e.currentStyle.backgroundImage;t=t.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')"},_sliders:function(){function e(e){n._updateUI(n._getHSV(e.value,null,null,null))}function t(e){n._updateUI(n._getHSV(null,null,null,e.value/100))}var n=this,i=n.element,r=i.find(".k-hue-slider"),o=i.find(".k-alpha-slider");r.attr("aria-label","hue saturation"),n._hueSlider=r.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),o.attr("aria-label","opacity"),n._opacitySlider=o.kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,n){var i=this.offset,r=e-i.left,o=n-i.top,a=this.width,s=this.height;r=r<0?0:r>a?a:r,o=o<0?0:o>s?s:o,t._svChange(r/a,1-o/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),r=i.find(".k-draghandle").attr("tabIndex",0).on(y,a(t._keydown,t));t._hsvEvents=new s.UserEvents(i,{global:!0,press:function(t){this.offset=s.getOffset(i),this.width=i.width(),this.height=i.height(),r.focus(),e.call(this,t.x.location,t.y.location)},start:function(){i.addClass("k-dragging"),r.focus()},move:function(t){t.preventDefault(),e.call(this,t.x.location,t.y.location)},end:function(){i.removeClass("k-dragging")}}),t._hsvRect=i,t._hsvHandle=r},_onEnable:function(e){this._hueSlider.enable(e),this._opacitySlider&&this._opacitySlider.enable(e),this.wrapper.find("input").attr("disabled",!e);var t=this._hsvRect.find(".k-draghandle");e?t.attr("tabIndex",this._tabIndex):t.removeAttr("tabIndex")},_keydown:function(e){function t(t,n){var r=i._getHSV();r[t]+=n*(e.shiftKey?.01:.05),r[t]<0&&(r[t]=0),r[t]>1&&(r[t]=1),i._updateUI(r),o(e)}function n(t){var n=i._getHSV();n.h+=t*(e.shiftKey?1:5),n.h<0&&(n.h=0),n.h>359&&(n.h=359),i._updateUI(n),o(e)}var i=this;switch(e.keyCode){case p.LEFT:e.ctrlKey?n(-1):t("s",-1);break;case p.RIGHT:e.ctrlKey?n(1):t("s",1);break;case p.UP:t(e.ctrlKey&&i._opacitySlider?"a":"v",1);break;case p.DOWN:t(e.ctrlKey&&i._opacitySlider?"a":"v",-1);break;case p.ENTER:i._select(i._getHSV());break;case p.F2:i.wrapper.find("input.k-color-value").focus().select();break;case p.ESC:i._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(e,t,n,i){var r=this._hsvRect,o=r.width(),a=r.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/o),null==n&&(n=1-s.top/a),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),u.fromHSV(e,t,n,i)},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateUI:function(e,t){var n=this,i=n._hsvRect;e&&(this._colorAsText.attr("title",n.options.messages.previewInput),this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(f,e.toDisplay()),t||n._colorAsText.val(n._opacitySlider?e.toCssRgba():e.toCss()),n._triggerSelect(e),e=e.toHSV(),n._hsvHandle.css({left:e.s*i.width()+"px",top:(1-e.v)*i.height()+"px"}),n._hueElements.css(f,u.fromHSV(e.h,1,1,1).toCss()),n._hueSlider.value(e.h),n._opacitySlider&&n._opacitySlider.value(100*e.a))},_selectOnHide:function(){return this.options.buttons?null:this._getHSV()},_template:s.template('# if (preview) { #<div class="k-selected-color"><div class="k-selected-color-display"><div class="k-color-input"><input class="k-color-value" # if (clearButton && !_standalone) { #placeholder="#: messages.noColor #" # } ##= !data.input ? \'style="visibility: hidden;"\' : "" #># if (clearButton && !_standalone) { #<span class="k-clear-color k-button k-flat" title="#: messages.clearColor #"></span># } #</div></div></div># } ## if (clearButton && !_standalone && !preview) { #<div class="k-clear-color-container"><span class="k-clear-color k-button k-flat">#: messages.clearColor #</span></div># } #<div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div class="k-draghandle"></div></div><div class="k-sliders-wrap k-vbox"><input class="k-hue-slider" /># if (opacity) { #<input class="k-alpha-slider k-transparency-slider" /># } #</div># if (buttons) { #<div unselectable="on" class="k-controls"><button class="k-button k-primary apply">#: messages.apply #</button> <button class="k-button cancel">#: messages.cancel #</button></div># } #')}),D=d.extend({init:function(t,n){var i,r,o,a,s,l=this;d.fn.init.call(l,t,n),n=l.options,t=l.element,i=t.attr("value")||t.val(),i=i?c(i,!0):c(n.value,!0),l._value=n.value=i,r=l.wrapper=e(l._template(n)),t.hide().after(r),l._inputWrapper=e(l.wrapper[0].firstChild),t.is("input")&&(t.appendTo(r),o=t.closest("label"),a=t.attr("id"),a&&(o=o.add('label[for="'+a+'"]')),o.click(function(e){l.open(),e.preventDefault()})),l._tabIndex=t.attr("tabIndex")||0,l.enable(!t.attr("disabled")),s=t.attr("accesskey"),s&&(t.attr("accesskey",null),r.attr("accesskey",s)),l.bind("activate",function(e){e.isDefaultPrevented()||l.toggle()}),l._updateUI(i)},destroy:function(){this.wrapper.off(b).find("*").off(b),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,d.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.children(".k-picker-wrap"),r=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),r.off(b).on("mousedown"+b,o),n.addClass("k-state-disabled").removeAttr("tabIndex").add("*",n).off(b),e?n.removeClass("k-state-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+b,function(){i.addClass("k-state-hover")}).on("mouseleave"+b,function(){i.removeClass("k-state-hover")}).on("focus"+b,function(){i.addClass("k-state-focused")}).on("blur"+b,function(){i.removeClass("k-state-focused")}).on(y,a(t._keydown,t)).on(k,".k-select",a(t.toggle,t)).on(k,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")}):t.close()},_template:s.template('<span role="textbox" aria-haspopup="true" class="k-widget k-colorpicker"><span class="k-picker-wrap k-state-default"># if (toolIcon) { #<span class="k-icon k-tool-icon #= toolIcon #"><span class="k-selected-color"></span></span># } else { #<span class="k-selected-color"><span class="k-icon k-i-line" style="display: none;"></span></span># } #<span class="k-select" unselectable="on" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span></span>'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:_,opacity:!1,buttons:!0,preview:!0,clearButton:!1,ARIATemplate:'Current selected color is #=data || ""#'},events:["activate","change","select","open","close"],open:function(){this.element.prop("disabled")||this._getPopup().open()},close:function(){var e=this._selector&&this._selector.options||{};e._closing=!0,this._getPopup().close(),delete e._closing},toggle:function(){this.element.prop("disabled")||this._getPopup().toggle()},_noColorIcon:function(){return this.wrapper.find(".k-picker-wrap > .k-selected-color > .k-icon.k-i-line")},color:T.fn.color,value:T.fn.value,_select:T.fn._select,_triggerSelect:T.fn._triggerSelect,_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_updateUI:function(e){var t="";e&&(t=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=s.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t)),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(f,e?e.toDisplay():v),this._noColorIcon()[t?"hide":"show"]()},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==p.ESC?this._selector._cancel():this._selector._keydown(e),o(e)):t!=p.ENTER&&t!=p.DOWN||(this.open(),o(e))},_getPopup:function(){var t,i,r,o,a=this,l=a._popup;return l||(t=a.options,i=t.palette?S:I,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,r=s.guid(),o=a._selector=new i(e('<div id="'+r+'"></div>').appendTo(document.body),t),a.wrapper.attr("aria-owns",r),a._popup=l=o.wrapper.kendoPopup({anchor:a.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),o.element.find(".k-clear-color").kendoButton({icon:"reset-color",click:function(e){o.options._clearedColor=!0,a.value(null),a.element.val(null),a._updateUI(null),o._colorAsText.val(""),o._hsvHandle.css({top:"0px",left:"0px"}),o._selectedColor.css(f,v),a.trigger("change",{value:a.value()}),e.preventDefault()}}),o.bind({select:function(e){a._updateUI(c(e.value)),delete o.options._clearedColor},change:function(){o.options._clearedColor||a._select(o.color()),a.close()},cancel:function(){o.options._clearedColor&&!a.value()&&o.value()&&a._select(o.color(),!0),a.close()}}),l.bind({close:function(e){var t,i,r,s;return a.trigger("close")?(e.preventDefault(),n):(a.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),t=o._selectOnHide(),i=o.value(),r=a.value(),s=o.options,t?s._clearedColor&&!r||a._select(t):(setTimeout(function(){a.wrapper&&!a.wrapper.is("[unselectable='on']")&&a.wrapper.focus()}),!s._closing&&s._clearedColor&&!r&&i?a._select(i,!0):a._updateUI(a.color())),n)},open:function(e){a.trigger("open")?e.preventDefault():a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){o._select(a.color(),!0),o.focus(),a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),l}});l.plugin(S),l.plugin(I),l.plugin(D)}(jQuery,parseInt),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.floatinglabel.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=n.ui,o=".kendoFloatingLabel",a="k-floating-label-container",s="k-state-empty",l="k-state-focused",d="k-state-disabled",c="k-no-click",u=e.proxy,p=i.extend({init:function(r,o){var s=this;i.fn.init.call(s,r,o),o=e.extend(!0,{},o),s.refresh(),s._editable({readonly:s.options.widget.options.readonly!==t&&s.options.widget.options.readonly,disable:s.options.widget.options.enable!==t&&!s.options.widget.options.enable}),s.element.addClass(a),n.notify(s)},options:{name:"FloatingLabel",widget:null},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},refresh:function(){var e=this,t=e.element;t.removeClass(s).removeClass(l),e.options.widget.element.val()||t.addClass(s),document.activeElement===e.options.widget.element[0]&&t.addClass(l)},destroy:function(){var e=this;e.element.off(o),i.fn.destroy.call(e)},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly;n.off(o),r||i?n.toggleClass(d,i).toggleClass(c,r):(n.removeClass(d).removeClass(c),n.on("focusin"+o,u(t.refresh,t)),n.on("focusout"+o,u(t.refresh,t)))}});r.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.numerictextbox.min",["kendo.core.min","kendo.userevents.min","kendo.floatinglabel.min"],e)}(function(){return function(e,t){function n(e,t){var n="k-i-arrow-"+("increase"===e?"60-up":"60-down");return'<span unselectable="on" class="k-link k-link-'+e+'" aria-label="'+t+'" title="'+t+'"><span unselectable="on" class="'+D+" "+n+'"></span></span>'}function i(e,t){var n=(""+parseFloat(e,10)).split(I);return n[1]&&(n[1]=n[1].substring(0,t)),n.join(I)}var r=window.kendo,o=r.caret,a=r.keys,s=r.ui,l=s.Widget,d=r._activeElement,c=r._extractFormat,u=r.parseFloat,p=r.support.placeholder,f=r.getCulture,h="change",m="disabled",g="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",k="touchend",y="mouseleave"+b,w="mouseenter"+b+" "+y,x="k-state-default",C="k-state-focused",T="k-state-hover",S="focus",I=".",D="k-icon",F="k-label k-input-label",E="k-state-selected",A="k-state-disabled",z="k-state-invalid",N="aria-disabled",P=/^(-)?(\d*)$/,H=null,R=e.proxy,O=e.isPlainObject,M=e.extend,B=l.extend({init:function(n,i){var o,a,s,d,u,p,f=this,h=i&&i.step!==t;l.fn.init.call(f,n,i),i=f.options,n=f.element.on("focusout"+b,R(f._focusout,f)).attr("role","spinbutton"),i.placeholder=i.placeholder||n.attr("placeholder"),o=f.min(n.attr("min")),a=f.max(n.attr("max")),s=f._parse(n.attr("step")),i.min===H&&o!==H&&(i.min=o),i.max===H&&a!==H&&(i.max=a),h||s===H||(i.step=s),f._initialOptions=M({},i),p=n.attr("type"),f._reset(),f._wrapper(),f._arrows(),f._validation(),f._input(),r.support.mobileOS?f._text.on(k+b+" "+S+b,function(){r.support.browser.edge?f._text.one(S+b,function(){f._toggleText(!1),n.focus()}):(f._toggleText(!1),n.focus()),f.selectValue()}):f._text.on(S+b,R(f._click,f)),n.attr("aria-valuemin",i.min!==H?i.min*i.factor:i.min).attr("aria-valuemax",i.max!==H?i.max*i.factor:i.max),i.format=c(i.format),d=i.value,d==H&&(d="number"==p?parseFloat(n.val()):n.val()),f.value(d),u=!i.enable||n.is("[disabled]")||e(f.element).parents("fieldset").is(":disabled"),u?f.enable(!1):f.readonly(n.is("[readonly]")),f.angular("compile",function(){return{elements:f._text.get()}}),f._label(),r.notify(f)},options:{name:"NumericTextBox",decimals:H,enable:!0,restrictDecimals:!1,min:H,max:H,value:H,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",factor:1,upArrowText:"Increase value",downArrowText:"Decrease value",label:null},events:[h,_],_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t._text.add(n),a=t._inputWrapper.off(w);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+b).off("keyup"+b).off("input"+b).off("paste"+b),t._inputLabel&&t._inputLabel.off(b),r||i?(a.addClass(i?A:x).removeClass(i?x:A),o.attr(m,i).attr(g,r).attr(N,i)):(a.addClass(x).removeClass(A).on(w,t._toggleHover),o.removeAttr(m).removeAttr(g).attr(N,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(E)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(E)}),t.element.on("keydown"+b,R(t._keydown,t)).on("keyup"+b,R(t._keyup,t)).on("paste"+b,R(t._paste,t)).on("input"+b,R(t._inputHandler,t)),t._inputLabel&&t._inputLabel.on("click"+b,R(t.focus,t)))},readonly:function(e){var n=this;this._editable({readonly:e===t||e,disable:!1}),n.floatingLabel&&n.floatingLabel.readonly(e===t||e)},enable:function(e){var n=this;this._editable({readonly:!1,disable:!(e=e===t||e)}),n.floatingLabel&&n.floatingLabel.enable(e=e===t||e)},setOptions:function(e){var n=this;l.fn.setOptions.call(n,e),n._arrowsWrap.toggle(n.options.spinners),n._inputWrapper.toggleClass("k-expand-padding",!n.options.spinners),n._text.prop("placeholder",n.options.placeholder),n._placeholder(n.options.placeholder),n.element.attr({"aria-valuemin":n.options.min!==H?n.options.min*n.options.factor:n.options.min,"aria-valuemax":n.options.max!==H?n.options.max*n.options.factor:n.options.max}),n.options.format=c(n.options.format),e.value!==t&&n.value(e.value)},destroy:function(){var e=this;e._inputLabel&&(e._inputLabel.off(b),e.floatingLabel&&e.floatingLabel.destroy()),e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),l.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var n,i=this;return e===t?i._value:(e=i._parse(e),n=i._adjust(e),e===n&&(i._update(e),i._old=i._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,n=t.options,i=n.min,r=n.max;return e===H?e:(i!==H&&e<i?e=i:r!==H&&e>r&&(e=r),e)},_arrows:function(){var t,i=this,o=function(){clearTimeout(i._spinning),t.removeClass(E)},a=i.options,s=a.spinners,l=i.element;t=l.siblings("."+D),t[0]||(t=e(n("increase",a.upArrowText)+n("decrease",a.downArrowText)).insertAfter(l),i._arrowsWrap=t.wrapAll('<span class="k-select"/>').parent()),s||(t.parent().toggle(s),i._inputWrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0),i._upArrowEventHandler=new r.UserEvents(i._upArrow,{release:o}),i._downArrow=t.eq(1),i._downArrowEventHandler=new r.UserEvents(i._downArrow,{release:o})},_validation:function(){var t=this,n=t.element;t._validationIcon=e("<span class='"+D+" k-i-warning'></span>").hide().insertAfter(n)},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,i,r,a=e.target,s=o(a)[0],l=a.value.substring(0,s),d=t._format(t.options.format),c=d[","],u=0;c&&(i=RegExp("\\"+c,"g"),r=RegExp("(^(-)$)|(^(-)?([\\d\\"+c+"]+)(\\"+d[I]+")?(\\d+)?)")),r&&(n=r.exec(l)),n&&(u=n[0].replace(i,"").length,l.indexOf("(")!=-1&&t._value<0&&u++),t._focusin(),o(t.element[0],u),t.selectValue()})},selectValue:function(){this.options.selectOnFocus&&this.element[0].select()},_change:function(e){var t=this,n=t.options.factor;n&&1!==n&&(e=r.parseFloat(e),null!==e&&(e/=n)),t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(h),t.trigger(h)),t._typing=!1},_culture:function(e){return e||f(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(C),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(C).removeClass(T),e._blur(),e._removeInvalidState()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n=this,i=n.options,r="k-formatted-value",o=n.element.addClass(v).show()[0],a=o.accessKey,s=n.wrapper;t=s.find(I+r),t[0]||(t=e('<input type="text"/>').insertBefore(o).addClass(r).attr("aria-hidden","true"));try{o.setAttribute("type","text")}catch(l){o.type="text"}t[0].title=o.title,t[0].tabIndex=o.tabIndex,t[0].style.cssText=o.style.cssText,t.prop("placeholder",i.placeholder),a&&(t.attr("accesskey",a),o.accessKey=""),n._text=t.addClass(o.className).attr({role:"spinbutton","aria-valuemin":i.min!==H?i.min*i.factor:i.min,"aria-valuemax":i.max!==H?i.max*i.factor:i.max,autocomplete:"off"})},_keydown:function(e){var n=this,i=e.keyCode;return i===a.NUMPAD_DOT&&(n._numPadDot=!0),i==a.DOWN?(n._step(-1),t):i==a.UP?(n._step(1),t):i==a.ENTER?(n._change(n.element.val()),t):(i!=a.TAB&&(n._typing=!0),n._cachedCaret=o(n.element),t)},_keyup:function(){this._removeInvalidState()},_inputHandler:function(){var e=this.element,t=e.val(),n=this.options.min,i=this._format(this.options.format),r=i[I],a=null!==n&&n>=0&&"-"===t.charAt(0);this._numPadDot&&r!==I&&(t=t.replace(I,r),this.element.val(t),this._numPadDot=!1),this._numericRegex(i).test(t)&&!a?this._oldText=t:(this._blinkInvalidState(),this.element.val(this._oldText),this._cachedCaret&&(o(e,this._cachedCaret[0]),this._cachedCaret=null))},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=setTimeout(R(e._removeInvalidState,e),100)},_addInvalidState:function(){var e=this;e._inputWrapper.addClass(z),e._validationIcon.show()},_removeInvalidState:function(){var e=this;e._inputWrapper.removeClass(z),e._validationIcon.hide(),e._invalidStateTimeout=null},_numericRegex:function(e){var t=this,n=e[I],i=t.options.decimals,r="*";return n===I&&(n="\\"+n),i===H&&(i=e.decimals),0===i&&t.options.restrictDecimals?P:(t.options.restrictDecimals&&(r="{0,"+i+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d"+r+")?)|("+n+"\\d"+r+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value,r=t._format(t.options.format);setTimeout(function(){var e=t._parse(n.value);e===H?t._update(i):(n.value=(""+e).replace(I,r[I]),t._adjust(e)===e&&t._numericRegex(r).test(n.value)||t._update(i))})},_option:function(e,n){var i=this,r=i.element,o=i.options;return n===t?o[e]:(n=i._parse(n),(n||"step"!==e)&&(o[e]=n,r.add(i._text).attr("aria-value"+e,n),r.attr(e,n)),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._value,r=t._parse(n.val())||0,o=t.options.decimals||2;d()!=n[0]&&t._focusin(),t.options.factor&&r&&(r/=t.options.factor),r=+(r+t.options.step*e).toFixed(o),r=t._adjust(r),t._update(r),t._typing=!1,i!==r&&t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return u(e,this._culture(t),this.options.format)},_round:function(e,t){var n=this.options.round?r._round:i;return n(e,t)},_update:function(e){var t,n=this,i=n.options,o=i.factor,a=i.format,s=i.decimals,l=n._culture(),d=n._format(a,l);s===H&&(s=d.decimals),e=n._parse(e,l),t=e!==H,t&&(e=parseFloat(n._round(e,s),10)),n._value=e=n._adjust(e),n._placeholder(r.toString(e,a,l)),t?(o&&(e=parseFloat(n._round(e*o,s),10)),e=""+e,e.indexOf("e")!==-1&&(e=n._round(+e,s)),e=e.replace(I,d[I])):e=null,n.element.val(e),n._oldText=e,n.element.add(n._text).attr("aria-valuenow",e)},_placeholder:function(e){var t=this._text;t.val(e),p||e||t.val(this.options.placeholder),t.attr("title",this.element.attr("title")||t.val())},_label:function(){var n,i,o=this,a=o.element,s=o.options,l=a.attr("id");null!==s.label&&(n=!!O(s.label)&&s.label.floating,i=O(s.label)?s.label.content:s.label,n&&(o._floatingLabelContainer=o.wrapper.wrap("<span></span>").parent(),o.floatingLabel=new r.ui.FloatingLabel(o._floatingLabelContainer,{widget:o})),r.isFunction(i)&&(i=i.call(o)),i||(i=""),l||(l=s.name+"_"+r.guid(),a.attr("id",l)),o._inputLabel=e("<label class='"+F+"' for='"+l+"'>"+i+"</label>'").insertBefore(o.wrapper),o.element.attr("disabled")===t&&o.element.attr("readonly")===t&&o._inputLabel.on("click"+b,R(o.focus,o)))},_wrapper:function(){var t,n=this,i=n.element,r=i[0];t=i.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=i.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),t=t.wrap("<span/>").parent()),t[0].style.cssText=r.style.cssText,r.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(r.className).removeClass("input-validation-error").css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=r.on("reset",t._resetHandler))}});s.plugin(B)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.validator.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){var n,i=c.ui.validator.ruleResolvers||{},r={};for(n in i)e.extend(!0,r,i[n].resolve(t));return r}function i(e){return e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function r(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function o(t){return e(e.parseHTML?e.parseHTML(t):t)}function a(t,n){var i,r,o,a,s=e();for(o=0,a=t.length;o<a;o++)i=t[o],h.test(i.className)&&(r=i.getAttribute(c.attr("for")),r===n&&(s=s.add(i)));return s}function s(e,t){return!!e&&("string"==typeof e.nodeName&&"LABEL"===e.nodeName&&("string"==typeof e.getAttribute("for")&&"string"==typeof t.getAttribute("id")&&e.getAttribute("for")===t.getAttribute("id")))}var l,d,c=window.kendo,u=c.ui.Widget,p=".kendoValidator",f="k-invalid-msg",h=RegExp(f,"i"),m="k-invalid",g="k-valid",v="k-validation-summary",_="k-text-error",b="k-messagebox k-messagebox-error",k="aria-invalid",y="aria-describedby",w=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i,x=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,C=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",T=":checkbox:not([disabled],[readonly])",S="[type=number],[type=range]",I="blur",D="name",F="form",E="novalidate",A="validate",z="change",N="validateInput",P=e.proxy,H=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e)},R=function(e,t,n){var i=e.val();return!e.filter(t).length||""===i||H(i,n)},O=function(e,t){return!!e.length&&null!=e[0].attributes[t]};c.ui.validator||(c.ui.validator={rules:{},messages:{},allowSubmit:e.noop,validateOnInit:e.noop}),l='<ul>#for(var i = 0; i < errors.length; i += 1){#<li><a data-field="#=errors[i].field#" href="\\#">#= errors[i].message #</a></li># } #</ul>',d=u.extend({init:function(t,i){var r=this,o=n(t),a="["+c.attr("validate")+"!=false]";i=i||{},i.rules=e.extend({},c.ui.validator.rules,o.rules,i.rules),i.messages=e.extend({},c.ui.validator.messages,o.messages,i.messages),u.fn.init.call(r,t,i),r._errorTemplate=c.template(r.options.errorTemplate),r._summaryTemplate=c.template(r.options.validationSummary.template||l),r.element.is(F)&&r.element.attr(E,E),r._inputSelector=C+a,r._checkboxSelector=T+a,r._errors={},r._attachEvents(),r._isValidated=!1,r._validateOnInit()&&r.validate()},events:[A,z,N],options:{name:"Validator",errorTemplate:'<span class="k-form-error">#= message #</span>',messages:{required:"{0} is required",pattern:"{0} is not valid",min:"{0} should be greater than or equal to {1}",max:"{0} should be smaller than or equal to {1}",step:"{0} is not valid",email:"{0} is not valid email",url:"{0} is not valid URL",date:"{0} is not valid date",dateCompare:"End date should be greater than or equal to the start date"},rules:{required:function(e){var t=e.filter("[type=checkbox]").length&&!e.is(":checked"),n=e.val();
|
19
|
-
return!(O(e,"required")&&(!n||""===n||0===n.length||t))},pattern:function(e){return!e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length||""===e.val()||H(e.val(),e.attr("pattern"))},min:function(e){if(e.filter(S+",["+c.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,n=c.parseFloat(e.val());return t<=n}return!0},max:function(e){if(e.filter(S+",["+c.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,n=c.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(S+",["+c.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,i=parseFloat(e.attr("step"))||1,o=parseFloat(e.val()),a=r(i);return a?(t=Math.pow(10,a),Math.floor((o-n)*t)%(i*t)/Math.pow(100,a)===0):(o-n)%i===0}return!0},email:function(e){return R(e,"[type=email],["+c.attr("type")+"=email]",w)},url:function(e){return R(e,"[type=url],["+c.attr("type")+"=url]",x)},date:function(e){return!e.filter("[type^=date],["+c.attr("type")+"=date]").length||""===e.val()||null!==c.parseDate(e.val(),e.attr(c.attr("format")))}},validateOnBlur:!0,validationSummary:!1},_allowSubmit:function(){return c.ui.validator.allowSubmit(this.element,this.errors())},_validateOnInit:function(){return c.ui.validator.validateOnInit(this.element)},destroy:function(){u.fn.destroy.call(this),this.element.off(p),this.validationSummary&&(this.validationSummary.off(p),this.validationSummary=null)},value:function(){return!!this._isValidated&&0===this.errors().length},_submit:function(e){return!(!this.validate()&&!this._allowSubmit())||(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_checkElement:function(e){var t=this.value();this.validateInput(e),this.value()!==t&&this.trigger(z)},_attachEvents:function(){var t=this;t.element.is(F)&&t.element.on("submit"+p,P(t._submit,t)),t.options.validateOnBlur&&(t.element.is(C)?(t.element.on(I+p,function(){t._checkElement(t.element)}),t.element.is(T)&&t.element.on("click"+p,function(){t._checkElement(t.element)})):(t.element.on(I+p,t._inputSelector,function(){t._checkElement(e(this))}),t.element.on("click"+p,t._checkboxSelector,function(){t._checkElement(e(this))})))},validate:function(){var e,t,n,i,r=!1,o=this.value();if(this._errors={},this.element.is(C))r=this.validateInput(this.element);else{for(i=!1,e=this.element.find(this._inputSelector),t=0,n=e.length;t<n;t++)this.validateInput(e.eq(t))||(i=!0);r=!i}return this.options.validationSummary&&!o&&this.showValidationSummary(),this.trigger(A,{valid:r,errors:this.errors()}),o!==r&&this.trigger(z),r},validateInput:function(t){var n,r,a,l,d,u,p,h,v,b,y,w,x,C,T,S,I,F;return t=e(t),this._isValidated=!0,n=this,r=n._errorTemplate,a=n._checkValidity(t),l=a.valid,d="."+f,u=t.attr(D)||"",p=n._findMessageContainer(u).add(t.next(d).filter(function(){var t=e(this);return!t.filter("["+c.attr("for")+"]").length||t.attr(c.attr("for"))===u})).addClass("k-hidden"),h=l?"":n._extractMessage(t,a.key),v=l?"":o(r({message:i(h),field:u})),b=!t.attr(k),t.removeAttr(k),l?delete n._errors[u]:(n._errors[u]=h,y=p.attr("id"),n._decorateMessageContainer(v,u),y&&v.attr("id",y),0!==p.length?p.replaceWith(v):(w=c.widgetInstance(t),x=t.parent().get(0),C=t.next().get(0),T=t.prev().get(0),v.insertAfter(w&&w.wrapper?w.wrapper:x&&"LABEL"===x.nodeName?x:C&&s(C,t[0])?C:T&&s(T,t[0])?t:t)),v.removeClass("k-hidden"),t.attr(k,!0)),b!==l&&this.trigger(N,{valid:l,input:t,error:h,field:u}),t.toggleClass(m,!l),t.toggleClass(g,l),c.widgetInstance(t)&&(S=c.widgetInstance(t)._inputWrapper,I=c.widgetInstance(t)._inputLabel,S&&(S.toggleClass(m,!l),S.toggleClass(g,l)),I&&I.toggleClass(_,!l)),b!==l&&(F=v?v.attr("id"):p.attr("id"),n._associateMessageContainer(t,F),this.options.validationSummary&&this.options.validateOnBlur&&this.showValidationSummary()),l},hideMessages:function(){var e=this,t="."+f,n=e.element;e._disassociateMessageContainers(),n.is(C)?n.next(t).addClass("k-hidden"):n.find(t).addClass("k-hidden")},reset:function(){var e=this,t=e.element.find("."+m),n=e.element.find("."+_);e._errors=[],e.hideMessages(),e.hideValidationSummary(),t.removeAttr(k),t.removeClass(m),n.removeClass(_)},_findMessageContainer:function(t){var n,i,r,o=c.ui.validator.messageLocators,s=e();for(i=0,r=this.element.length;i<r;i++)s=s.add(a(this.element[i].getElementsByTagName("*"),t));for(n in o)s=s.add(o[n].locate(this.element,t));return s},_decorateMessageContainer:function(e,t){var n,i=c.ui.validator.messageLocators;e.addClass(f).attr(c.attr("for"),t||""),e.attr("id")||e.attr("id",t+"-error");for(n in i)i[n].decorate(e,t)},_extractMessage:function(e,t){var n,i=this,r=i.options.messages[t],o=e.attr(D);return c.ui.Validator.prototype.options.messages[t]||(n=c.isFunction(r)?r(e):r),r=c.isFunction(r)?r(e):r,c.format(e.attr(c.attr(t+"-msg"))||e.attr("validationMessage")||n||r||e.attr("title")||"",o,e.attr(t)||e.attr(c.attr(t)))},_checkValidity:function(e){var t,n=this.options.rules;for(t in n)if(!n[t].call(this,e))return{valid:!1,key:t};return{valid:!0}},errors:function(){var e,t=[],n=this._errors;for(e in n)t.push(n[e]);return t},setOptions:function(e){e.validationSummary&&this.hideValidationSummary(),c.deepExtend(this.options,e),this.destroy(),this.init(this.element,this.options),this._setEvents(this.options)},_getInputNames:function(){var t,n,i,r=this,o=r.element.find(r._inputSelector),a=[];for(t=0,n=o.length;t<n;t++)i=e(o[t]),O(i,D)&&a.push(i.attr(D));return a},_associateMessageContainer:function(e,t){var n=c.getWidgetFocusableElement(e);n&&t&&c.toggleAttribute(n,y,t)},_disassociateMessageContainers:function(){var t,n,i,r=this,o=r.element.find("."+m).addBack();for(i=0;i<o.length;i+=1)t=e(o[i]),t.is("input")&&(n=r._findMessageContainer(t.attr(D)).add(t.next("."+f)).attr("id"),r._associateMessageContainer(t,n))},_errorsByName:function(){var e,t,n=this,i=n._getInputNames(),r=[];for(e=0;e<i.length;e+=1)t=i[e],n._errors[t]&&r.push({field:t,message:n._errors[t]});return r},_renderSummary:function(){var t,n=this,i=this.options.validationSummary,r=this.element,o=r.prev();return t=i.container?e(i.container):o&&o.hasClass(v)?o:e("<div />").insertBefore(n.element),t.addClass([v,b].join(" ")),t.attr("role","alert"),t.on("click"+p,P(n._summaryClick,n)),t},_summaryClick:function(t){t.preventDefault();var n,i=this,r=e(t.target),o=i.element.find("[name='"+r.data("field")+"']");o.length&&(n=c.getWidgetFocusableElement(o),n&&n.focus())},showValidationSummary:function(){var e,t=this,n=t.validationSummary,i=t._errorsByName();n||(n=t.validationSummary=t._renderSummary()),e=o(t._summaryTemplate({errors:i})),n.html(e),n.toggleClass("k-hidden",!i.length)},hideValidationSummary:function(){var e=this,t=e.validationSummary;t&&t.addClass("k-hidden")}}),c.ui.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.binder.min",["kendo.core.min","kendo.data.min"],e)}(function(){return function(e,t){function n(t,n,i){return v.extend({init:function(e,t,n){var i=this;v.fn.init.call(i,e.element[0],t,n),i.widget=e,i._dataBinding=A(i.dataBinding,i),i._dataBound=A(i.dataBound,i),i._itemChange=A(i.itemChange,i)},itemChange:function(e){a(e.item[0],e.data,this._ns(e.ns),[e.data].concat(this.bindings[t]._parents()))},dataBinding:function(e){var t,n,i=this.widget,r=e.removedItems||i.items();for(t=0,n=r.length;t<n;t++)d(r[t],!1)},_ns:function(t){t=t||C.ui;var n=[C.ui,C.dataviz.ui,C.mobile.ui];return n.splice(e.inArray(t,n),1),n.unshift(t),C.rolesFromNamespaces(n)},dataBound:function(e){var i,r,o,s,l=this.widget,d=e.addedItems||l.items(),c=l[n],u=C.data.HierarchicalDataSource;if(!(u&&c instanceof u)&&d.length)for(o=e.addedDataItems||c.flatView(),s=this.bindings[t]._parents(),i=0,r=o.length;i<r;i++)d[i]&&a(d[i],o[i],this._ns(e.ns),[o[i]].concat(s))},refresh:function(e){var r,o,a,s,l=this,d=l.widget;e=e||{},e.action||(l.destroy(),d.bind("dataBinding",l._dataBinding),d.bind("dataBound",l._dataBound),d.bind("itemChange",l._itemChange),r=l.bindings[t].get(),d[n]instanceof C.data.DataSource&&d[n]!=r&&(r instanceof C.data.DataSource?d[i](r):r&&r._dataSource?d[i](r._dataSource):(o=C.ui.Select&&d instanceof C.ui.Select,a=C.ui.MultiSelect&&d instanceof C.ui.MultiSelect,s=C.ui.DropDownTree&&d instanceof C.ui.DropDownTree,s?d.treeview[n].data(r):d[n].data(r),l.bindings.value&&(o||a)&&d.value(f(l.bindings.value.get(),d.options.dataValueField)))))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}})}function i(e,t){var n=C.initWidget(e,{},t);if(n)return new y(n)}function r(e){var t,n,i,o,a,s,l,d={};for(l=e.match(w),t=0,n=l.length;t<n;t++)i=l[t],o=i.indexOf(":"),a=i.substring(0,o),s=i.substring(o+1),"{"==s.charAt(0)&&(s=r(s)),d[a]=s;return d}function o(e,t,n){var i,r={};for(i in e)r[i]=new n(t,e[i]);return r}function a(e,t,n,s){var d,c,u,p,f,v,_,b,y;if(e&&!e.getAttribute("data-"+C.ns+"stop")&&(d=e.getAttribute("data-"+C.ns+"role"),u=e.getAttribute("data-"+C.ns+"bind"),p=[],f=!0,_={},s=s||[t],(d||u)&&l(e,!1),d&&(b=i(e,n)),u&&(u=r(u.replace(x,"")),b||(_=C.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:B,valuePrimitive:!1,autoBind:!0},t),_.roles=n,b=new k(e,_)),b.source=t,v=o(u,s,h),_.template&&(v.template=new g(s,"",_.template)),v.click&&(u.events=u.events||{},u.events.click=u.click,v.click.destroy(),delete v.click),v.source&&(f=!1),u.attr&&(v.attr=o(u.attr,s,h)),u.style&&(v.style=o(u.style,s,h)),u.events&&(v.events=o(u.events,s,m)),u.css&&(v.css=o(u.css,s,h)),b.bind(v)),b&&(e.kendoBindingTarget=b),y=e.children,f&&y&&!e.getAttribute("data-"+C.ns+"stop"))){for(c=0;c<y.length;c++)p[c]=y[c];for(c=0;c<p.length;c++)a(p[c],t,n,s)}}function s(t,n){var i,r,o,s=C.rolesFromNamespaces([].slice.call(arguments,2));for(n=C.observable(n),t=e(t),i=0,r=t.length;i<r;i++)o=t[i],1===o.nodeType&&a(o,n,s)}function l(t,n){var i,r=t.kendoBindingTarget;r&&(r.destroy(),O?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null),n&&(i=C.widgetInstance(e(t)),i&&typeof i.destroy===M&&i.destroy())}function d(e,t){l(e,t),c(e,t)}function c(e,t){var n,i,r=e.children;if(r)for(n=0,i=r.length;n<i;n++)d(r[n],t)}function u(t){var n,i;for(t=e(t),n=0,i=t.length;n<i;n++)d(t[n],!1)}function p(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&s(n,i.source,t)}function f(e,t){var n,i,r=[],o=0;if(!t)return e;if(e instanceof I){for(n=e.length;o<n;o++)i=e[o],r[o]=i.get?i.get(t):i[t];e=r}else e instanceof S&&(e=e.get(t));return e}var h,m,g,v,_,b,k,y,w,x,C=window.kendo,T=C.Observable,S=C.data.ObservableObject,I=C.data.ObservableArray,D={}.toString,F={},E=C.Class,A=e.proxy,z="value",N="source",P="events",H="checked",R="css",O=!0,M="function",B="change";!function(){var e=document.createElement("a");try{delete e.test}catch(t){O=!1}}(),h=T.extend({init:function(e,t){var n=this;T.fn.init.call(n),n.source=e[0],n.parents=e,n.path=t,n.dependencies={},n.dependencies[t]=!0,n.observable=n.source instanceof T,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(B,n._change))},_parents:function(){var t,n=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(t=i.parent(),e.inArray(t,n)<0&&(n=[t].concat(n))),n},change:function(e){var t,n,i=e.field,r=this;if("this"===r.path)r.trigger(B,e);else for(t in r.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){r.trigger(B,e);break}},start:function(e){e.bind("get",this._access)},stop:function(e){e.unbind("get",this._access)},get:function(){var e=this,n=e.source,i=0,r=e.path,o=n;if(!e.observable)return o;for(e.start(e.source),o=n.get(r);o===t&&n;)n=e.parents[++i],n instanceof S&&(o=n.get(r));if(o===t)for(n=e.source;o===t&&n;)n=n.parent(),n instanceof S&&(o=n.get(r));return"function"==typeof o&&(i=r.lastIndexOf("."),i>0&&(n=n.get(r.substring(0,i))),e.start(n),o=n!==e.source?o.call(n,e.source):o.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(B,e._change).bind(B,e._change)),e.stop(e.source),o},set:function(e){var t=this.currentSource||this.source,n=C.getter(this.path)(t);"function"==typeof n?t!==this.source?n.call(t,this.source,e):n.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(B,this._change),this.currentSource&&this.currentSource.unbind(B,this._change)),this.unbind()}}),m=h.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)t=this.parents[++i],t instanceof S&&(e=t.get(n));return A(e,t)}}),g=h.extend({init:function(e,t,n){var i=this;h.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=C.render(this.template,e),this.stop(this.source),t}}),v=E.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(B,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),_=v.extend({dataType:function(){var e=this.element.getAttribute("data-"+C.ns+"type")||this.element.type||"text";return e.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=C.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=C.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=C.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==C.parseFloat(e)?!!C.parseFloat(e):"true"===e.toLowerCase()),e}}),F.attr=v.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),F.css=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.classes={}},refresh:function(t){var n=e(this.element),i=this.bindings.css[t],r=this.classes[t]=i.get();r?n.addClass(t):n.removeClass(t)}}),F.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),F.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),F.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),F.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),F.events=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],r=this.handlers[t];r&&n.off(t,r),r=this.handlers[t]=i.get(),n.on(t,i.source,r)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),F.text=v.extend({refresh:function(){var t=this.bindings.text.get(),n=this.element.getAttribute("data-"+C.ns+"format")||"";null==t&&(t=""),e(this.element).text(C.toString(t,n))}}),F.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),F.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),F.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),F.value=_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=A(this.change,this),this.eventName=i.valueUpdate||B,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=B,this.bindings[z].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[z].get(),null==e&&(e=""),t=this.dataType(),"date"==t?e=C.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=C.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),F.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof C.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof I||n instanceof C.data.DataSource?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?C.format('<option value="#:{0}#">#:{1}#</option>',e.valueField||e.textField,e.textField||e.valueField):"<option>#:data#</option>":"tbody"==n?"<tr><td>#:data#</td></tr>":"ul"==n||"ol"==n?"<li>#:data#</li>":"#:data#",t=C.template(t)),t},add:function(t,n){var i,r,o,s,l=this.container(),d=l.cloneNode(!1),c=l.children[t];if(e(d).html(C.render(this.template(),n)),d.children.length)for(i=this.bindings.source._parents(),r=0,o=n.length;r<o;r++)s=d.children[0],l.insertBefore(s,c||null),a(s,n[r],this.options.roles,[n[r]].concat(i))},remove:function(e,t){var n,i,r=this.container();for(n=0;n<t.length;n++)i=r.children[e],d(i,!0),i.parentNode==r&&r.removeChild(i)},render:function(){var t,n,i,r=this.bindings.source.get(),o=this.container(),s=this.template();if(null!=r)if(r instanceof C.data.DataSource&&(r=r.view()),r instanceof I||"[object Array]"===D.call(r)||(r=[r]),this.bindings.template){if(c(o,!0),e(o).html(this.bindings.template.render(r)),o.children.length)for(t=this.bindings.source._parents(),n=0,i=r.length;n<i;n++)a(o.children[n],r[n],this.options.roles,[r[n]].concat(t))}else e(o).html(C.render(s,r))}}),F.input={checked:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=A(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i=this.element,r=this.value();if("radio"==i.type)r=this.parsedValue(),this.bindings[H].set(r);else if("checkbox"==i.type)if(e=this.bindings[H].get(),e instanceof I){if(r=this.parsedValue(),r instanceof Date){for(n=0;n<e.length;n++)if(e[n]instanceof Date&&+e[n]===+r){t=n;break}}else t=e.indexOf(r);t>-1?e.splice(t,1):e.push(r)}else this.bindings[H].set(r)},refresh:function(){var e,n,i=this.bindings[H].get(),r=i,o=this.dataType(),a=this.element;if("checkbox"==a.type)if(r instanceof I){if(e=-1,i=this.parsedValue(),i instanceof Date){for(n=0;n<r.length;n++)if(r[n]instanceof Date&&+r[n]===+i){e=n;break}}else e=r.indexOf(i);a.checked=e>=0}else a.checked=r;else"radio"==a.type&&("date"==o?i=C.toString(i,"yyyy-MM-dd"):"datetime-local"==o&&(i=C.toString(i,"yyyy-MM-ddTHH:mm:ss")),a.checked=null!==i&&t!==i&&a.value===""+i)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(B,this._change)}})},F.select={source:F.source.extend({refresh:function(n){var i,r=this,o=r.bindings.source.get();o instanceof I||o instanceof C.data.DataSource?(n=n||{},"add"==n.action?r.add(n.index,n.items):"remove"==n.action?r.remove(n.index,n.items):"itemchange"!=n.action&&n.action!==t||(r.render(),r.bindings.value&&r.bindings.value&&(i=f(r.bindings.value.get(),e(r.element).data("valueField")),null===i?r.element.selectedIndex=-1:r.element.value=i))):r.render()}}),value:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=A(this.change,this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,r=this.dataType(),o=[];for(n=0,i=this.element.options.length;n<i;n++)t=this.element.options[n],t.selected&&(e=t.attributes.value,e=e&&e.specified?t.value:t.text,o.push(this._parseValue(e,r)));return o},change:function(){var e,n,i,r,o,a,s,l,d=[],c=this.element,u=this.options.valueField||this.options.textField,p=this.options.valuePrimitive;for(o=0,a=c.options.length;o<a;o++)n=c.options[o],n.selected&&(r=n.attributes.value,r=r&&r.specified?n.value:n.text,d.push(u?r:this._parseValue(r,this.dataType())));if(u)for(e=this.bindings.source.get(),e instanceof C.data.DataSource&&(e=e.view()),i=0;i<d.length;i++)for(o=0,a=e.length;o<a;o++)if(s=e[o].get(u),l=s+""===d[i]){d[i]=e[o];break}r=this.bindings[z].get(),r instanceof I?r.splice.apply(r,[0,r.length].concat(d)):this.bindings[z].set(p||!(r instanceof S||null===r||r===t)&&u?d[0].get(u):d[0])},refresh:function(){var e,t,n,i=this.element,r=i.options,o=this.bindings[z].get(),a=o,s=this.options.valueField||this.options.textField,l=!1,d=this.dataType();for(a instanceof I||(a=new I([o])),i.selectedIndex=-1,n=0;n<a.length;n++)for(o=a[n],s&&o instanceof S&&(o=o.get(s)),"date"==d?o=C.toString(a[n],"yyyy-MM-dd"):"datetime-local"==d&&(o=C.toString(a[n],"yyyy-MM-ddTHH:mm:ss")),e=0;e<r.length;e++)t=r[e].value,""===t&&""!==o&&(t=r[e].text),null!=o&&t==""+o&&(r[e].selected=!0,l=!0)},destroy:function(){e(this.element).off(B,this._change)}})},F.widget={events:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this.handlers={}},refresh:function(e){var t=this.bindings.events[e],n=this.handlers[e];n&&this.widget.unbind(e,n),n=t.get(),this.handlers[e]=function(e){e.data=t.source,n(e),e.data===t.source&&delete e.data},this.widget.bind(e,this.handlers[e])},destroy:function(){var e;for(e in this.handlers)this.widget.unbind(e,this.handlers[e])}}),checked:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=A(this.change,this),this.widget.bind(B,this._change)},change:function(){this.bindings[H].set(this.value())},refresh:function(){this.widget.check(this.bindings[H].get()===!0)},value:function(){var e=this.element,t=e.value;return"on"!=t&&"off"!=t&&"checkbox"!=this.element.type||(t=e.checked),t},destroy:function(){this.widget.unbind(B,this._change)}}),start:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this._change=A(this.change,this),this.widget=e,this.widget.bind(B,this._change)},change:function(){this.bindings.start.set(this.widget.range().start)},refresh:function(){var e=this,t=this.bindings.start.get(),n=e.widget._range?e.widget._range.end:null;this.widget.range({start:t,end:n})},destroy:function(){this.widget.unbind(B,this._change)}}),end:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this._change=A(this.change,this),this.widget=e,this.widget.bind(B,this._change)},change:function(){this.bindings.end.set(this.widget.range().end)},refresh:function(){var e=this,t=this.bindings.end.get(),n=e.widget._range?e.widget._range.start:null;this.widget.range({start:n,end:t})},destroy:function(){this.widget.unbind(B,this._change)}}),visible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.visible.get();this.widget.wrapper[0].style.display=e?"":"none"}}),invisible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.invisible.get();this.widget.wrapper[0].style.display=e?"none":""}}),enabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:n("source","dataSource","setDataSource"),value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(B,this._change);var r=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==r||r instanceof S),this._valueIsObservableArray=r instanceof I,this._initChange=!1},_source:function(){var e;return this.widget.dataItem&&(e=this.widget.dataItem(),e&&e instanceof S)?[e]:(this.bindings.source&&(e=this.bindings.source.get()),(!e||e instanceof C.data.DataSource)&&(e=this.widget.dataSource.flatView()),e)},change:function(){var e,t,n,i,r,o,a,s=this.widget.value(),l=this.options.dataValueField||this.options.dataTextField,d="[object Array]"===D.call(s),c=this._valueIsObservableObject,u=[];if(this._initChange=!0,l)if(""===s&&(c||this.options.valuePrimitive))s=null;else{for(a=this._source(),d&&(t=s.length,u=s.slice(0)),r=0,o=a.length;r<o;r++)if(n=a[r],i=n.get(l),d){for(e=0;e<t;e++)if(i==u[e]){u[e]=n;break}}else if(i==s){s=c?n:i;break}u[0]&&(s=this._valueIsObservableArray?u:c||!l?u[0]:u[0].get(l))}this.bindings.value.set(s),this._initChange=!1},refresh:function(){var e,n,i,r,o,a,s,l,d;if(!this._initChange){if(e=this.widget,n=e.options,i=n.dataTextField,r=n.dataValueField||i,o=this.bindings.value.get(),a=n.text||"",s=0,d=[],o===t&&(o=null),r)if(o instanceof I){for(l=o.length;s<l;s++)d[s]=o[s].get(r);o=d}else o instanceof S&&(a=o.get(i),o=o.get(r));n.autoBind!==!1||n.cascadeFrom||!e.listView||e.listView.bound()?e.value(o):(i!==r||a||(a=o),a||!o&&0!==o||!n.valuePrimitive?e._preselect(o,a):e.value(o))}this._initChange=!1},destroy:function(){this.widget.unbind(B,this._change)}}),dropdowntree:{value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(B,this._change),this._initChange=!1},change:function(){var e,n,i,r,o,a,s,l,d,c=this,u=c.bindings[z].get(),p=c.options.valuePrimitive,f=c.widget.treeview.select(),h=c.widget._isMultipleSelection()?c.widget._getAllChecked():c.widget.treeview.dataItem(f)||c.widget.value(),m=p||c.widget.options.autoBind===!1?c.widget.value():h,g=this.options.dataValueField||this.options.dataTextField;if(m=m.slice?m.slice(0):m,c._initChange=!0,u instanceof I){for(e=[],n=m.length,i=0,r=0,o=u[i],a=!1;o!==t;){for(d=!1,r=0;r<n;r++)if(p?a=m[r]==o:(l=m[r],l=l.get?l.get(g):l,a=l==(o.get?o.get(g):o)),a){m.splice(r,1),n-=1,d=!0;break}d?i+=1:(e.push(o),b(u,i,1),s=i),o=u[i]}b(u,u.length,0,m),e.length&&u.trigger("change",{action:"remove",items:e,index:s}),m.length&&u.trigger("change",{action:"add",items:m,index:u.length-1})}else c.bindings[z].set(m);c._initChange=!1},refresh:function(){if(!this._initChange){var e,t,n=this.options,i=this.widget,r=n.dataValueField||n.dataTextField,o=this.bindings.value.get(),a=o,s=0,l=[];if(r)if(o instanceof I){for(e=o.length;s<e;s++)t=o[s],l[s]=t.get?t.get(r):t;o=l}else o instanceof S&&(o=o.get(r));n.autoBind===!1&&n.valuePrimitive!==!0?i._preselect(a,o):i.value(o)}},destroy:function(){this.widget.unbind(B,this._change)}})},gantt:{dependencies:n("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(B,this._change),this._initChange=!1},change:function(){var e,n,i,r,o,a,s,l,d,c=this,u=c.bindings[z].get(),p=c.options.valuePrimitive,f=p?c.widget.value():c.widget.dataItems(),h=this.options.dataValueField||this.options.dataTextField;if(f=f.slice(0),c._initChange=!0,u instanceof I){for(e=[],n=f.length,i=0,r=0,o=u[i],a=!1;o!==t;){for(d=!1,r=0;r<n;r++)if(p?a=f[r]==o:(l=f[r],l=l.get?l.get(h):l,a=l==(o.get?o.get(h):o)),a){f.splice(r,1),n-=1,d=!0;break}d?i+=1:(e.push(o),b(u,i,1),s=i),o=u[i]}b(u,u.length,0,f),e.length&&u.trigger("change",{action:"remove",items:e,index:s}),f.length&&u.trigger("change",{action:"add",items:f,index:u.length-1})}else c.bindings[z].set(f);c._initChange=!1},refresh:function(){if(!this._initChange){var e,n,i=this.options,r=this.widget,o=i.dataValueField||i.dataTextField,a=this.bindings.value.get(),s=a,l=0,d=[];if(a===t&&(a=null),o)if(a instanceof I){for(e=a.length;l<e;l++)n=a[l],d[l]=n.get?n.get(o):n;a=d}else a instanceof S&&(a=a.get(o));i.autoBind!==!1||i.valuePrimitive===!0||r._isBound()?r.value(a):r._preselect(s,a)}},destroy:function(){this.widget.unbind(B,this._change)}})},scheduler:{source:n("source","dataSource","setDataSource").extend({dataBound:function(e){var t,n,i,r,o=this.widget,s=e.addedItems||o.items();if(s.length)for(i=e.addedDataItems||o.dataItems(),r=this.bindings.source._parents(),t=0,n=i.length;t<n;t++)a(s[t],i[t],this._ns(e.ns),[i[t]].concat(r))}})},grid:{source:n("source","dataSource","setDataSource").extend({dataBound:function(e){var t,n,i,r,o=this.widget,s=e.addedItems||o.items();if(s.length)for(r=e.addedDataItems||o.dataItems(),i=this.bindings.source._parents(),t=0,n=r.length;t<n;t++)a(s[t],r[t],this._ns(e.ns),[r[t]].concat(i))}})},badge:{text:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.text.get();null==e&&(e=""),this.widget.text(e)}})}},b=function(e,t,n,i){var r,o,a,s,l;if(i=i||[],n=n||0,r=i.length,o=e.length,a=[].slice.call(e,t+n),s=a.length,r){for(r=t+r,l=0;t<r;t++)e[t]=i[l],l++;e.length=r}else if(n)for(e.length=t,n+=t;t<n;)delete e[--n];if(s){for(s=t+s,l=0;t<s;t++)e[t]=a[l],l++;e.length=s}for(t=e.length;t<o;)delete e[t],t++},k=E.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,r,o,a,s=this instanceof y,l=this.binders();for(t in e)t==z?n=!0:t==N?i=!0:t!=P||s?t==H?o=!0:t==R?a=!0:this.applyBinding(t,e,l):r=!0;i&&this.applyBinding(N,e,l),n&&this.applyBinding(z,e,l),o&&this.applyBinding(H,e,l),r&&!s&&this.applyBinding(P,e,l),a&&!s&&this.applyBinding(R,e,l)},binders:function(){return F[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,r=n[e]||F[e],o=this.toDestroy,a=t[e];if(r)if(r=new r(this.target,t,this.options),o.push(r),a instanceof h)r.bind(a),o.push(a);else for(i in a)r.bind(a,i),o.push(a[i]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,n=this.toDestroy;for(e=0,t=n.length;e<t;e++)n[e].destroy()}}),y=k.extend({binders:function(){return F.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,r=n[e]||F.widget[e],o=this.toDestroy,a=t[e];if(!r)throw Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(r=new r(this.target,t,this.target.options),o.push(r),a instanceof h)r.bind(a),o.push(a);else for(i in a)r.bind(a,i),o.push(a[i])}}),w=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,x=/\s/g,C.unbind=u,C.bind=s,C.data.binders=F,C.data.Binder=v,C.notify=p,C.observable=function(e){return e instanceof S||(e=new S(e)),e},C.observableHierarchy=function(e){function t(e){var n,i;for(n=0;n<e.length;n++)e[n]._initChildren(),i=e[n].children,i.fetch(),e[n].items=i.data(),t(e[n].items)}var n=C.data.HierarchicalDataSource.create(e);return n.fetch(),t(n.data()),n._data._dataSource=n,n._data}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.editable.min",["kendo.dropdownlist.min","kendo.datepicker.min","kendo.numerictextbox.min","kendo.validator.min","kendo.binder.min"],e)}(function(){return function(e,t){function n(t){return t=null!=t?t:"",t.type||e.type(t)||"string"}function i(t){t.find(":input:not(:button, .k-combobox .k-input, ["+c.attr("role")+"=listbox], ["+c.attr("role")+"=upload], ["+c.attr("skip")+"], [type=file])").each(function(){var t=c.attr("bind"),n=this.getAttribute(t)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",r=this.name;n.indexOf(i)===-1&&r&&(n+=(n.length?",":"")+i+r,e(this).attr(t,n))})}function r(e){var t,i,r,o,a,s,l=(e.model.fields||e.model)[e.field],d=n(l),u=l?l.validation:{},p=l?l.attributes:{},f=c.attr("type"),h=c.attr("bind"),k={id:e.id||e.field,name:e.field,title:e.title?e.title:e.field};for(t in u)i=u[t],v(t,C)>=0?k[f]=t:m(i)||(r=c.getCulture(),"number"==typeof i&&r.name.length?(o=r.numberFormat,a=(""+i).replace(_,o[_]),k[t]=a):k[t]=g(i)?i.value||t:i),k[c.attr(t+"-msg")]=i.message,k.autocomplete=b;for(s in p)k[s]=p[s];return v(d,C)>=0&&(k[f]=d),k[h]=("boolean"===d?"checked:":"value:")+e.field,k}function o(e,t){var n=e.attr("id");return n&&(t.id=n,e.removeAttr("id")),t}function a(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;t<n;t++)i=e[t],
|
20
|
-
o=i.text||i.value||i,r=null==i.value?i.text||i:i.value,a[t]={text:o,value:r};return a}function s(e,t){var n;if(e.length)return n="DropDownTree"===e&&t&&t.checkboxes||"MultiSelect"===e?"<select />":"Editor"===e?"<textarea />":"<input />"}function l(e,t){var n,i,r=e?e.validation||{}:{};for(n in r)i=r[n],g(i)&&i.value&&(i=i.value),m(i)&&(t[n]=i)}function d(t,n,i){var r=!!i&&(i.shouldRenderHidden||!1);r&&(t.val(!0),n.append(e("<input type='hidden' name='"+i.field+"' value='false' data-skip='true' data-validate='false'/>")))}var c=window.kendo,u=c.ui,p=u.Widget,f=e.extend,h=c.support.browser.msie&&c.support.browser.version<9,m=c.isFunction,g=e.isPlainObject,v=e.inArray,_=".",b="off",k=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,y='<div class="k-tooltip k-tooltip-error k-validator-tooltip"><span class="k-tooltip-icon k-icon k-i-warning"></span><span class="k-tooltip-content">#= message #</span><span class="k-callout k-callout-n"></span></div>',w="change",x="equalSet",C=["url","email","number","date","boolean"],T=["AutoComplete","ColorPicker","ComboBox","DateInput","DatePicker","DateTimePicker","DropDownTree","Editor","MaskedTextBox","MultiColumnComboBox","MultiSelect","NumericTextBox","Rating","Slider","Switch","TimePicker","DropDownList"],S={number:function(t,n){var i=r(n);e('<input type="text"/>').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("<span "+c.attr("for")+'="'+n.field+'" class="k-invalid-msg k-hidden"/>').appendTo(t)},date:function(t,n){var i=r(n),o=n.format;o&&(o=c._extractFormat(o)),i[c.attr("format")]=o,e('<input type="text"/>').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("<span "+c.attr("for")+'="'+n.field+'" class="k-invalid-msg k-hidden"/>').appendTo(t)},string:function(t,n){var i=r(n);e('<input type="text" />').attr(i).addClass("k-textbox").appendTo(t)},"boolean":function(t,n){var i=r(n),o=e('<input type="checkbox" />').attr(i).addClass("k-checkbox").appendTo(t);d(o,t,n)},values:function(t,n){var i=r(n),o=c.stringify(a(n.values));e("<select "+c.attr("text-field")+'="text"'+c.attr("value-field")+'="value"'+c.attr("source")+"='"+(o?o.replace(/\'/g,"'"):o)+"'"+c.attr("role")+'="dropdownlist"/>').attr(i).appendTo(t),e("<span "+c.attr("for")+'="'+n.field+'" class="k-invalid-msg k-hidden"/>').appendTo(t)},kendoEditor:function(t,n){var i=r(n),o=n.editor,a="kendo"+o,l=n.editorOptions,c=s(o,l),u=e(c).attr(i).appendTo(t)[a](l);d(u,t,n)}},I={number:function(t,n){var i=r(n);i=o(t,i),e('<input type="number"/>').attr(i).appendTo(t)},date:function(t,n){var i=r(n);i=o(t,i),e('<input type="date"/>').attr(i).appendTo(t)},string:function(t,n){var i=r(n);i=o(t,i),e('<input type="text" />').attr(i).appendTo(t)},"boolean":function(t,n){var i=r(n);i=o(t,i),e('<input type="checkbox" />').attr(i).appendTo(t)},values:function(t,n){var i,a=r(n),s=n.values,l=e("<select />");a=o(t,a);for(i in s)e('<option value="'+s[i].value+'">'+s[i].text+"</option>").appendTo(l);l.attr(a).appendTo(t)}},D=p.extend({init:function(t,n){var i=this;n.target&&(n.$angular=n.target.options.$angular,n.target.pane&&(i._isMobile=!0)),p.fn.init.call(i,t,n),i._validateProxy=e.proxy(i._validate,i),i.refresh()},events:[w],options:{name:"Editable",editors:S,mobileEditors:I,clearContainer:!0,validateOnBlur:!0,validationSummary:!1,errorTemplate:y,skipFocus:!1},editor:function(t,i){var r=this,o=r._isMobile?I:r.options.editors,a=g(t),s=a?t.field:t,l=r.options.model||{},d=a&&t.values,u=d?"values":n(i),p=a&&t.editor,h=a&&e.inArray(t.editor,T)!==-1,m=p?t.editor:o[u],v=r.element.find("["+c.attr("container-for")+"="+s.replace(k,"\\$1")+"]");m=m?m:o.string,h?m=o.kendoEditor:p&&"string"==typeof t.editor&&(m=function(e){e.append(t.editor)}),v=v.length?v:r.element,m(v,f(!0,{},a?t:{field:s},{model:l}))},_validate:function(t){var n,i=this,r=t.value,o=i._validationEventInProgress,a={},s=c.attr("bind"),l=t.field.replace(k,"\\$1"),d=RegExp("(value|checked)\\s*:\\s*"+l+"\\s*(,|$)");a[t.field]=t.value,n=e(":input["+s+'*="'+l+'"]',i.element).filter("["+c.attr("validate")+"!='false']").filter(function(){return d.test(e(this).attr(s))}),n.length>1&&(n=n.filter(function(){var t=e(this);return!t.is(":radio")||t.val()==r}));try{i._validationEventInProgress=!0,(!i.validatable.validateInput(n)||!o&&i.trigger(w,{values:a}))&&t.preventDefault()}finally{i._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var e=this;e.angular("cleanup",function(){return{elements:e.element}}),p.fn.destroy.call(e),e.options.model.unbind("set",e._validateProxy),e.options.model.unbind(x,e._validateProxy),c.unbind(e.element),e.validatable&&e.validatable.destroy(),c.destroy(e.element),e.element.removeData("kendoValidator"),e.element.is("["+c.attr("role")+"=editable]")&&e.element.removeAttr(c.attr("role"))},refresh:function(){var n,r,o,a,s,d,u,p,f=this,m=f.options.fields||[],v=f.options.clearContainer?f.element.empty():f.element,_=f.options.model||{},b={};for(e.isArray(m)||(m=[m]),n=0,r=m.length;n<r;n++)o=m[n],a=g(o),s=a?o.field:o,d=(_.fields||_)[s],l(d,b),f.editor(o,d);if(f.options.target&&f.angular("compile",function(){return{elements:v,data:v.map(function(){return{dataItem:_}})}}),!r){u=_.fields||_;for(s in u)l(u[s],b)}i(v),f.validatable&&f.validatable.destroy(),c.bind(v,f.options.model),f.options.validateOnBlur&&(f.options.model.unbind("set",f._validateProxy).bind("set",f._validateProxy),f.options.model.unbind(x,f._validateProxy).bind(x,f._validateProxy)),f.validatable=new c.ui.Validator(v,{validateOnBlur:f.options.validateOnBlur,validationSummary:f.options.validationSummary,errorTemplate:f.options.errorTemplate||t,rules:b}),f.options.skipFocus||(p=v.find(":kendoFocusable").eq(0).focus(),h&&p.focus())}});u.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.listview.min",["kendo.data.min","kendo.editable.min","kendo.selectable.min"],e)}(function(){return function(e,t){var n=window.kendo,i="change",r="kendoKeydown",o="cancel",a="dataBound",s="dataBinding",l=n.ui.Widget,d=n.keys,c="",u="> *:not(.k-loading-mask)",p="progress",f="error",h="k-state-focused",m="k-state-selected",g="k-edit-item",v="edit",_="remove",b="save",k="mousedown",y="click",w="touchstart",x=".kendoListView",C=e.proxy,T=n._activeElement,S=n.ui.progress,I=n.data.DataSource,D=n.ui.DataBoundWidget.extend({init:function(t,i){var r=this;i=e.isArray(i)?{dataSource:i}:i,l.fn.init.call(r,t,i),i=r.options,r.wrapper=t=r.element,t[0].id&&(r._itemId=t[0].id+"_lv_active"),r._element(),r._layout(),r._dataSource(),r._templates(),r._navigatable(),r._selectable(),r._pageable(),r._crudHandlers(),r._scrollable(),r.options.autoBind&&r.dataSource.fetch(),n.notify(r)},events:[i,o,s,a,v,_,b,r],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,height:null,template:c,altTemplate:c,editTemplate:c,contentTemplate:"<div data-content='true' />",contentElement:"div",bordered:!0,borders:"",layout:"",flex:{direction:"row",wrap:"nowrap"},grid:{},scrollable:!1},setOptions:function(e){l.fn.setOptions.call(this,e),this._layout(),this._templates(),this.selectable&&(this.selectable.destroy(),this.selectable=null),this._selectable()},_templates:function(){var e=this.options;this.template=n.template(e.template||c),this.altTemplate=n.template(e.altTemplate||e.template),this.editTemplate=n.template(e.editTemplate||c)},_item:function(e){return this.content.children()[e]()},items:function(){return this.content.children(":not(.k-loading-mask)")},dataItem:function(t){var i=n.attr("uid"),r=e(t).closest("["+i+"]").attr(i);return this.dataSource.getByUid(r)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch(),"endless"===this.options.scrollable&&this._bindScrollable()},_unbindDataSource:function(){var e=this;e.dataSource.unbind(i,e._refreshHandler).unbind(p,e._progressHandler).unbind(f,e._errorHandler)},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=C(e.refresh,e),e._progressHandler=C(e._progress,e),e._errorHandler=C(e._error,e)),e.dataSource=I.create(e.options.dataSource).bind(i,e._refreshHandler).bind(p,e._progressHandler).bind(f,e._errorHandler)},_progress:function(e){var t=this.content;S(t,e,{opacity:!0})},_error:function(){S(this.content,!1)},_element:function(){var t=this.options,n=t.height;this.element.addClass("k-widget k-listview"),t.navigatable||t.selectable?this.element.attr("role","listbox"):this.element.attr("role","list"),this.content=t.contentElement?e(document.createElement(t.contentElement)).appendTo(this.element):this.element,n&&this.element.css("height",n)},_layout:function(){var e=this,n=e.options,i=n.flex,r=n.grid,o=e.element,a=["k-widget","k-listview"],s=e.content,l=["k-listview-content"];o.add(s).removeClass(function(e,t){if(t.indexOf("k-")>=0)return!0}),n.bordered===!0&&a.push("k-listview-bordered"),"string"==typeof n.borders&&n.borders!==c&&a.push("k-listview-borders-"+n.borders),"string"==typeof n.contentPadding&&n.contentPadding!==c&&l.push("k-listview-content-padding-"+n.contentPadding),"string"==typeof n.layout&&n.layout!==c&&l.push("k-d-"+n.layout),"flex"===n.layout&&"object"==typeof i&&("string"==typeof i.direction&&""!==i.direction&&l.push("k-flex-"+i.direction),"string"==typeof i.wrap&&""!==i.wrap&&l.push("k-flex-"+i.wrap)),"grid"===n.layout&&"object"==typeof r&&("number"==typeof r.cols?s.css("grid-template-columns","repeat("+r.cols+", 1fr)"):"string"==typeof r.cols&&s.css("grid-template-columns",r.cols),"number"==typeof r.rows?s.css("grid-template-rows","repeat("+r.rows+", "+(r.rowHeight!==t?r.rowHeight:"1fr")+")"):"string"==typeof r.rows&&s.css("grid-template-rows",r.rows),"number"==typeof r.gutter?s.css("grid-gap",r.gutter):"string"==typeof r.gutter&&s.css("grid-gap",r.gutter)),e.element.addClass(a.join(" ")),e.content.addClass(l.join(" "))},refresh:function(e){var i,r,o,l,d,c=this,u=c.dataSource.view(),p="",f=c.template,h=c.altTemplate,m=c.options,g=m.selectable||m.navigatable?"option":"listitem",v=T(),_=c._endlessFetchInProgress,b=_?c._skipRerenderItemsCount:0,k=c.options.scrollable;if(e=e||{},"itemchange"===e.action)return c._hasBindingTarget()||c.editable||(i=e.items[0],o=c.items().filter("["+n.attr("uid")+"="+i.uid+"]"),o.length>0&&(l=o.index(),c.angular("cleanup",function(){return{elements:[o]}}),o.replaceWith(f(i)),o=c.items().eq(l),o.attr(n.attr("uid"),i.uid),c.angular("compile",function(){return{elements:[o],data:[{dataItem:i}]}}),c.trigger("itemChange",{item:o,data:i}))),t;if(!c.trigger(s,{action:e.action||"rebind",items:e.items,index:e.index})){for(c._angularItems("cleanup"),_||c._destroyEditable(),l=b,d=u.length;l<d;l++)p+=l%2?h(u[l]):f(u[l]);for(_?c.content.append(p):c.content.html(p),r=c.items().not(".k-loading-mask"),l=b,d=u.length;l<d;l++)o=r.eq(l),o.attr(n.attr("uid"),u[l].uid).attr("role",g),c.options.selectable&&o.attr("aria-selected","false");c.content[0]===v&&c.options.navigatable&&(c._focusNext?c.current(c.current().next()):k||c.current(r.eq(0))),c._angularItems("compile"),c._progress(!1),c._endlessFetchInProgress=null,c.trigger(a,{action:e.action||"rebind",items:e.items,index:e.index})}},_pageable:function(){var t,i,r=this,o=r.options.pageable;e.isPlainObject(o)&&(i=o.pagerId,t=e.extend({},o,{dataSource:r.dataSource,pagerId:null}),r.pager=new n.ui.Pager(e("#"+i),t))},_selectable:function(){var e,r,o=this,a=o.options.selectable,s=o.options.navigatable;a&&(e=n.ui.Selectable.parseOptions(a).multiple,o.selectable=new n.ui.Selectable(o.element,{aria:!0,multiple:e,filter:o.options.contentElement?".k-listview-content "+u:u,change:function(){o.trigger(i)}}),s&&o.element.on("keydown"+x,function(n){if(n.keyCode===d.SPACEBAR){if(r=o.current(),n.target==n.currentTarget&&n.preventDefault(),e)if(n.ctrlKey){if(r&&r.hasClass(m))return r.removeClass(m),t}else o.selectable.clear();else o.selectable.clear();o.selectable.value(r)}}))},_scrollable:function(){var e=this,t=e.options.scrollable;t&&(e.content.css({"overflow-y":"scroll",position:"relative","-webkit-overflow-scrolling":"touch"}),"endless"===t&&e._bindScrollable())},_bindScrollable:function(){var e=this,t=e._endlessPageSize=e.dataSource.options.pageSize;e.content.off("scroll"+x).on("scroll"+x,function(){this.scrollTop+this.clientHeight-this.scrollHeight>=-15&&!e._endlessFetchInProgress&&e._endlessPageSize<e.dataSource.total()&&(e._skipRerenderItemsCount=e._endlessPageSize,e._endlessPageSize=e._skipRerenderItemsCount+t,e.dataSource.options.endless=!0,e._endlessFetchInProgress=!0,e.dataSource.pageSize(e._endlessPageSize))})},current:function(e){var n=this,i=n.element,r=n._current,o=n._itemId;return e===t?r:(r&&r[0]&&(r[0].id===o&&r.removeAttr("id"),r.removeClass(h),i.removeAttr("aria-activedescendant")),e&&e[0]&&(o=e[0].id||o,n._scrollTo(e[0]),i.attr("aria-activedescendant",o),e.addClass(h).attr("id",o)),n._current=e,t)},_scrollTo:function(t){var n,i,r=this,o=r.content,a=!1,s="scroll";"auto"===o.css("overflow")||o.css("overflow")===s||o.css("overflow-y")===s?n=o[0]:(n=window,a=!0),i=function(i,r){var o=a?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+r],d=e(n)[s+i](),c=e(n)[r.toLowerCase()]();o+l>d+c?e(n)[s+i](o+l-c):o<d&&e(n)[s+i](o)},i("Top","Height"),i("Left","Width")},_navigatable:function(){var t=this,i=t.options.navigatable,r=t.element,o=t.content,a=function(i){t.current(e(i.currentTarget)),e(i.target).is(":button, a, :input, a > .k-icon, textarea")||n.focusElement(r)};i&&(t._tabindex(),r.on("focus"+x,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+x,function(){t._current&&t._current.removeClass(h)}).on("keydown"+x,t,function(i){var r,a,s=i.keyCode,l=t.current(),c=e(i.target),u=!c.is(":button, textarea, a, a > .t-icon, input"),p=c.is(":text, :password"),f=n.preventDefault,h=o.find("."+g),m=T(),v=t.options.scrollable;if(!(!u&&!p&&s!==d.ESC||p&&s!==d.ESC&&s!==d.ENTER)&&(s!==d.UP&&s!==d.LEFT||(l&&l[0]&&(l=l.prev()),l&&l[0]?t.current(l):v||t.current(t._item("last")),f(i)),s!==d.DOWN&&s!==d.RIGHT||(v?"endless"!==t.options.scrollable||l.next().length?(l=l.next(),l&&l[0]&&t.current(l)):(t.content[0].scrollTop=t.content[0].scrollHeight,t._focusNext=!0):(l=l.next(),t.current(l&&l[0]?l:t._item("first"))),f(i)),s===d.PAGEUP&&(t.current(null),t.dataSource.page(t.dataSource.page()-1),f(i)),s===d.PAGEDOWN&&(t.current(null),t.dataSource.page(t.dataSource.page()+1),f(i)),s===d.HOME&&(t.current(t._item("first")),f(i)),s===d.END&&(t.current(t._item("last")),f(i)),s===d.ENTER&&(0!==h.length&&(u||p)?(r=t.items().index(h),m&&m.blur(),t.save(),a=function(){t.element.trigger("focus"),t.current(t.items().eq(r))},t.one("dataBound",a)):""!==t.options.editTemplate&&t.edit(l)),s===d.ESC)){if(h=o.find("."+g),0===h.length)return;r=t.items().index(h),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(r))}}),r.on(k+x+" "+w+x,t.options.contentElement?".k-listview-content "+u:u,C(a,t)))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(i)},select:function(n){var i=this,r=i.selectable;return n=e(n),n.length?(r.options.multiple||(r.clear(),n=n.first()),r.value(n),t):r.value()},_destroyEditable:function(){var e=this;e.editable&&(e.editable.destroy(),delete e.editable)},_modelFromElement:function(e){var t=e.attr(n.attr("uid"));return this.dataSource.getByUid(t)},_closeEditable:function(){var e,t,i,r=this,o=r.editable,a=r.options,s=a.selectable||a.navigatable?"option":"listitem",l=r.template;return o&&(o.element.index()%2&&(l=r.altTemplate),r.angular("cleanup",function(){return{elements:[o.element]}}),e=r._modelFromElement(o.element),r._destroyEditable(),i=o.element.index(),o.element.replaceWith(l(e)),t=r.items().eq(i),t.attr(n.attr("uid"),e.uid),t.attr("role",s),r._hasBindingTarget()&&n.bind(t,e),r.angular("compile",function(){return{elements:[t],data:[{dataItem:e}]}})),!0},edit:function(e){var t,i,r=this,o=r._modelFromElement(e),a=o.uid;r.cancel(),e=r.items().filter("["+n.attr("uid")+"="+a+"]"),i=e.index(),e.replaceWith(r.editTemplate(o)),t=r.items().eq(i).addClass(g).attr(n.attr("uid"),o.uid),r.editable=t.kendoEditable({model:o,clearContainer:!1,errorTemplate:!1,target:r}).data("kendoEditable"),r.trigger(v,{model:o,item:t})},save:function(){var e,t,n=this,i=n.editable;i&&(t=i.element,e=n._modelFromElement(t),i.end()&&!n.trigger(b,{model:e,item:t})&&(n._closeEditable(),n.dataSource.sync()))},remove:function(e){var t=this,n=t.dataSource,i=t._modelFromElement(e);t.editable&&(n.cancelChanges(t._modelFromElement(t.editable.element)),t._closeEditable()),t.trigger(_,{model:i,item:e})||(e.hide(),n.remove(i),n.sync())},add:function(){var e,t=this,n=t.dataSource,i=n.indexOf((n.view()||[])[0]);i<0&&(i=0),t.cancel(),e=n.insert(i,{}),t.edit(t.element.find("[data-uid='"+e.uid+"']"))},cancel:function(){var e,t,n=this,i=n.dataSource;n.editable&&(e=n.editable.element,t=n._modelFromElement(e),n.trigger(o,{model:t,container:e})||(i.cancelChanges(t),n._closeEditable()))},_crudHandlers:function(){var t=this,i=k+x,r=w+x,o=y+x;t.content.on(i+" "+r,".k-edit-button",function(i){i.preventDefault();var r=e(this).closest("["+n.attr("uid")+"]");setTimeout(function(){t.edit(r)})}),t.content.on(i+" "+r,".k-delete-button",function(i){i.preventDefault();var r=e(this).closest("["+n.attr("uid")+"]");setTimeout(function(){t.remove(r)})}),t.content.on(o,".k-update-button",function(e){t.save(),e.preventDefault()}),t.content.on(o,".k-cancel-button",function(e){t.cancel(),e.preventDefault()})},destroy:function(){var e=this;l.fn.destroy.call(e),e._unbindDataSource(),e._destroyEditable(),e.element.off(x),e.content.off(x),e._endlessFetchInProgress=e._endlessPageSize=e._skipRerenderItemsCount=e._focusNext=null,e.pager&&e.pager.destroy(),n.destroy(e.element)}});n.ui.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.upload.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){return e.map(i(t),function(e){return e.name}).join(", ")}function i(e){var t=e[0];return t.files?r(t.files):[{name:s(t.value),extension:a(t.value),size:null}]}function r(t){return e.map(t,function(e){return o(e)})}function o(e){var t=e.name||e.fileName;return{name:C.htmlEncode(t),extension:a(t),size:"number"==typeof e.size?e.size:e.fileSize,rawFile:e}}function a(e){var t=e.match(D);return t?t[0]:""}function s(e){var t=e.lastIndexOf("\\");return t!=-1?e.substr(t+1):e}function l(t,n){var i=C.guid();return e.map(t,function(e){return e.uid=n?C.guid():i,e})}function d(e,t){var n,i=c(t.allowedExtensions),r=t.maxFileSize,o=t.minFileSize;for(n=0;n<e.length;n++)u(e[n],i),p(e[n],o,r)}function c(t){var n=e.map(t,function(e){var t="."===e.substring(0,1)?e:"."+e;return t.toLowerCase()});return n}function u(t,n){n.length>0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],e.inArray(j,t.validationErrors)===-1&&t.validationErrors.push(j))}function p(t,n,i){0!==n&&t.size<n&&(t.validationErrors=t.validationErrors||[],e.inArray(W,t.validationErrors)===-1&&t.validationErrors.push(W)),0!==i&&t.size>i&&(t.validationErrors=t.validationErrors||[],e.inArray(U,t.validationErrors)===-1&&t.validationErrors.push(U))}function f(e){var t,n=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(n+=e[t].size);return n/=1024,n<1024?n.toFixed(2)+" KB":(n/1024).toFixed(2)+" MB"}function h(t){return!t.multiple&&e(".k-file",t.wrapper).length>1}function m(n,i,r,o){var a,s;return i._supportsRemove()?(a=n.data("fileNames"),s=e.map(a,function(e){return e.name}),o===!1?(i._removeFileEntry(n),t):(i._submitRemove(s,r,function(e,t,r){var o=i.trigger(z,{operation:"remove",files:a,response:e,XMLHttpRequest:r});o||i._removeFileEntry(n)},function(e){h(i)&&i._removeFileEntry(n),i.trigger(N,{operation:"remove",files:a,XMLHttpRequest:e}),I("Server response: "+e.responseText)}),t)):(!h(i)&&o||i._removeFileEntry(n),t)}function g(t,n,i){var r=!1,o="";try{o=e.parseJSON(v(t)),r=!0}catch(a){i()}r&&n(o)}function v(e){return t!==e&&""!==e||(e="{}"),e}function _(e){e.originalEvent&&(e.originalEvent.dataTransfer.dropEffect="copy"),e.stopPropagation(),e.preventDefault()}function b(e,t,n,i){var r,o;e.on("dragenter"+t,function(e){n(e),o=new Date,r||(r=setInterval(function(){var e=new Date-o;e>100&&(i(),clearInterval(r),r=null)},100))}).on("dragover"+t,function(){o=new Date})}function k(e){return e.is(".k-file-progress, .k-file-success, .k-file-error")}function y(t){return e(t.target).closest(".k-file")}var w,x,C=window.kendo,T=C.ui.Widget,S=C.antiForgeryTokens,I=C.logToConsole,D=/\.([^\.]+)$/,F=".kendoUpload",E="select",A="upload",z="success",N="error",P="complete",H="cancel",R="clear",O="pause",M="resume",B="progress",L="remove",V="validationErrors",U="invalidMaxFileSize",W="invalidMinFileSize",j="invalidFileExtension",q=1e3,G=2e3,$={loading:"k-i-upload",warning:"k-i-warning",success:"k-i-check"},K=T.extend({init:function(t,n){var i,r,o=this;T.fn.init.call(o,t,n),o.name=t.name,o.multiple=o.options.multiple,o.directory=o.options.directory,o.localization=o.options.localization,i=o.element,o.wrapper=i.closest(".k-upload"),0===o.wrapper.length&&(o.wrapper=o._wrapInput(i)),o._activeInput(i),o.toggle(o.options.enabled),r=o._ns=F+"-"+C.guid(),i.closest("form").on("submit"+r,e.proxy(o._onParentFormSubmit,o)).on("reset"+r,e.proxy(o._onParentFormReset,o)),o._initUploadModule(),o._toggleDropZone(),o.wrapper.on("click",".k-upload-action",e.proxy(o._onFileAction,o)).on("click",".k-clear-selected",e.proxy(o._onClearSelected,o)).on("click",".k-upload-selected",e.proxy(o._onUploadSelected,o)),o.element.val()&&o._onInputChange({target:o.element})},events:[E,A,z,N,P,H,R,B,L,O,M],options:{name:"Upload",enabled:!0,multiple:!0,directory:!1,showFileList:!0,template:"",files:[],async:{autoRetryAfter:0,bufferChunkSize:1e7,maxAutoRetries:1,removeVerb:"POST",autoUpload:!0,withCredentials:!0,accept:"*/*; q=0.5, application/json",useArrayBuffer:!1},localization:{select:"Select files...",cancel:"Cancel",retry:"Retry",remove:"Remove",pause:"Pause",resume:"Resume",clearSelectedFiles:"Clear",uploadSelectedFiles:"Upload",dropFilesHere:"Drop files here to upload",invalidFiles:"Invalid file(s). Please check file upload requirements.",statusUploading:"uploading",statusUploaded:"uploaded",statusWarning:"warning",statusFailed:"failed",headerStatusUploading:"Uploading...",headerStatusPaused:"Paused",headerStatusUploaded:"Done",uploadSuccess:"File(s) uploaded successfully.",uploadFail:"File(s) failed to upload.",invalidMaxFileSize:"File size too large.",invalidMinFileSize:"File size too small.",invalidFileExtension:"File type not allowed."},validation:{allowedExtensions:[],maxFileSize:0,minFileSize:0},dropZone:""},_initUploadModule:function(){var e,t=this,n=t.options;n.async.saveUrl?(t._module=t._supportsFormData()?new x(t):new w(t),t._async=!0,e=n.files,e.length>0&&t._renderInitialFiles(e)):t._module=new Y(t)},setOptions:function(t){var n=this,i=n.element;e(n.options.dropZone).off(n._ns),T.fn.setOptions.call(n,t),n.multiple=n.options.multiple,n.directory=n.options.directory,i.attr("multiple",!!n._supportsMultiple()&&n.multiple),n.directory&&(i.attr("webkitdirectory",n.directory),i.attr("directory",n.directory)),n.toggle(n.options.enabled),n._initUploadModule(),n._toggleDropZone()},enable:function(e){e=t===e||e,this.toggle(e)},disable:function(){this.toggle(!1)},toggle:function(e){e=t===e?e:!e,this.wrapper.toggleClass("k-state-disabled",e),this.element.prop("disabled",e)},focus:function(){this.element.focus()},destroy:function(){var t=this,n=e(t.options.dropZone);e(document).add(e(".k-dropzone",t.wrapper)).add(t.wrapper.closest("form")).off(t._ns),n.length>0&&n.off(t._ns),e(t.element).off(F),T.fn.destroy.call(t)},pause:function(t){this._module.onPause({target:e(t,this.wrapper)});var n=t.find(".k-i-pause-sm");n.removeClass("k-i-pause-sm").addClass("k-i-play-sm").attr("title",this.localization.resume),e(n).parent().attr("aria-label",this.localization.resume)},resume:function(t){this._module.onResume({target:e(t,this.wrapper)});var n=t.find(".k-i-play-sm");n.removeClass("k-i-play-sm").addClass("k-i-pause-sm").attr("title",this.localization.pause),e(n).parent().attr("aria-label",this.localization.pause)},upload:function(){var e=this;e._module.onSaveSelected()},getFiles:function(){var t,n,i,r=this,o=[],a=r.wrapper.find(".k-file");for(n=0;n<a.length;n++)if(t=e(a[n]).data("fileNames"))for(i=0;i<t.length;i++)o.push(t[i]);return o},clearAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,n){e._removeFileByDomElement(n,!1)})},removeAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,n){e._removeFileByDomElement(n,!0)})},removeFileByUid:function(e){this._removeFileByUid(e,!0)},clearFileByUid:function(e){this._removeFileByUid(e,!1)},_removeFileByUid:function(t,n){var i,r=this;"string"==typeof t&&(i=e(".k-file["+C.attr("uid")+'="'+t+'"]',r.wrapper),i.length>0&&r._removeFileByDomElement(i,n))},clearFile:function(e){this._removeFile(e,!1)},removeFile:function(e){this._removeFile(e,!0)},_removeFile:function(t,n){var i,r=this,o=r.wrapper.find(".k-file");"function"==typeof t&&o.each(function(o,a){i=e(a).data("fileNames"),t(i)&&r._removeFileByDomElement(a,n)})},_removeFileByDomElement:function(t,n){var i,r=this,o={target:e(t,r.wrapper)};r.options.async.saveUrl?(e(t).hasClass("k-file-progress")?r._module.onCancel(o):r._module.onRemove(o,{},n),i=e(".k-file",r.wrapper),0===i.length?r._hideHeaderUploadstatus():r._updateHeaderUploadStatus()):r._module.onRemove(o,{},n)},_addInput:function(t){if(t[0].nodeType){var n=this,i=t.clone().val("");i.insertAfter(n.element).data("kendo"+n.options.prefix+n.options.name,n),e(n.element).hide().attr("tabindex","-1").removeAttr("id").off(F),n._activeInput(i),n.element.focus()}},_activeInput:function(t){var n=this,i=n.wrapper;n.element=t,n.directory&&(t.attr("webkitdirectory",n.directory),t.attr("directory",n.directory)),t.attr("multiple",!!n._supportsMultiple()&&n.multiple).attr("autocomplete","off").on("click"+F,function(e){i.hasClass("k-state-disabled")&&e.preventDefault()}).on("focus"+F,function(){e(this).parent().addClass("k-state-focused")}).on("blur"+F,function(){e(this).parent().removeClass("k-state-focused")}).on("change"+F,e.proxy(n._onInputChange,n)).on("keydown"+F,e.proxy(n._onInputKeyDown,n))},_onInputKeyDown:function(e){var t=this,n=t.wrapper.find(".k-upload-action:visible:first");e.keyCode===C.keys.TAB&&n.length>0&&!e.shiftKey&&(e.preventDefault(),n.focus())},_onInputChange:function(t){var n,i=this,r=e(t.target),o=l(i._inputFiles(r),i._isAsyncNonBatch());d(o,i.options.validation),n=i.trigger(E,{files:o}),n?(i._addInput(r),r.remove()):i._module.onSelect({target:r},o)},_readDirectory:function(t){var n=new e.Deferred,i=t.createReader(),r=[],o=function(){i.readEntries(function(e){e.length?(r=r.concat(e),o()):n.resolve(r)},n.reject)};return o(),n.promise()},_readFile:function(e){var t=this,n=e.fullPath;e.file(function(e){e.relativePath=n.slice(1),t.droppedFolderFiles.push(e),t.droppedFolderCounter--,0===t.droppedFolderCounter&&setTimeout(function(){0===t.droppedFolderCounter&&t.droppedFolderFiles.length&&(t._proceedDroppedItems(t.droppedFolderFiles),t.droppedFolderFiles=[])},0)},function(){I("File error.")})},_traverseFileTree:function(e,t){var n=this;t||n.droppedFolderCounter--,this._readDirectory(e).then(function(e){n.droppedFolderCounter+=e.length;for(var t=0;t<e.length;t++)e[t].isFile?n._readFile(e[t]):e[t].isDirectory&&n._traverseFileTree(e[t])})},_onDrop:function(e){var t,n,i,r=e.originalEvent.dataTransfer,o=this,a=r.files;if(_(e),o.options.directoryDrop&&r.items)for(t=r.items.length,o.droppedFolderCounter=0,o.droppedFolderFiles=[],n=0;n<t;n++)r.items[n].webkitGetAsEntry?(i=r.items[n].webkitGetAsEntry(),i.isDirectory?o._traverseFileTree(i,!0):i.isFile&&o.droppedFolderFiles.push(r.files[n])):o._proceedDroppedItems(a);else o._proceedDroppedItems(a)},_proceedDroppedItems:function(t){var n,i=this,o=l(r(t),i._isAsyncNonBatch());t.length>0&&!i.wrapper.hasClass("k-state-disabled")&&(!i.multiple&&o.length>1&&o.splice(1,o.length-1),d(o,i.options.validation),n=i.trigger(E,{files:o}),n||i._module.onSelect({target:e(".k-dropzone",i.wrapper)},o))},_filesContainValidationErrors:function(t){var n=!1;return e(t).each(function(e,t){if(t[V]&&t[V].length>0)return n=!0,!1}),n},_isAsyncNonBatch:function(){return this._async&&!this.options.async.batch||!1},_renderInitialFiles:function(e){var t,n,i=this,r=0;for(e=l(e,!0),r=0;r<e.length;r++)t=e[r],n=i._enqueueFile(t.name,{fileNames:[t]}),n.addClass("k-file-success").data("files",[e[r]]),i._supportsRemove()&&i._fileAction(n,L)},_prepareTemplateData:function(e,t){var n=t.fileNames,i={},r=0,o=0;for(o=0;o<n.length;o++)r+=n[o].size;return i.name=e,i.size=r,i.files=t.fileNames,i},_prepareDefaultSingleFileEntryTemplate:function(t){var n=this,i=t.fileNames[0],r=f(t.fileNames),o=C.getFileGroup(i.extension,!0),a=i[V],s="";return s+=a&&a.length>0?"<li class='k-file k-file-invalid'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-file-invalid-group-wrapper'><span class='k-file-group k-icon k-i-"+o+"'></span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name k-file-name-invalid' title='"+i.name+"'>"+i.name+"</span><span class='k-file-validation-message k-text-error'>"+n.localization[a[0]]+"</span></span>":"<li class='k-file'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-file-group-wrapper'><span class='k-file-group k-icon k-i-"+o+"'></span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name' title='"+i.name+"'>"+i.name+"</span><span class='k-file-size'>"+r+"</span></span>",s+="<strong class='k-upload-status'></strong>",e(s)},_prepareDefaultMultipleFileEntriesTemplate:function(t){var n,i,r,o=this,a=t.fileNames,s=o._filesContainValidationErrors(a),l=f(a),d="";for(d+=s?"<li class='k-file k-file-invalid'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-multiple-files-invalid-group-wrapper'><span class='k-file-group k-icon k-i-files'></span>":"<li class='k-file'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-multiple-files-group-wrapper'><span class='k-file-group k-icon k-i-files'></span>",d+="<span class='k-file-state'></span></span>",a.sort(function(e,t){return e[V]?-1:t[V]?1:0}),d+="<span class='k-multiple-files-wrapper'>",n=0;n<a.length;n++)i=a[n],r=f([i]),d+="<span class='k-file-name-size-wrapper'>",d+=i[V]&&i[V].length>0?"<span class='k-file-name k-file-name-invalid' title='"+i.name+"'>"+i.name+"</span>":"<span class='k-file-name' title='"+i.name+"'>"+i.name+"</span>",d+="<span class='k-file-size'>"+r+"</span></span>";return d+=s?"<span class='k-file-validation-message k-text-error'>"+o.localization.invalidFiles+"</span>":"<span class='k-file-information'>Total: "+a.length+" files, "+l+"</span>",d+="</span><strong class='k-upload-status'></strong>",e(d)},_enqueueFile:function(t,n){var i,r,o,a,s=this,l=n.fileNames[0].uid,d=e(".k-upload-files",s.wrapper),c=s.options,u=c.template;return 0===d.length&&(d=e("<ul class='k-upload-files k-reset'></ul>").appendTo(s.wrapper),s.options.showFileList||d.hide(),s.wrapper.removeClass("k-upload-empty")),i=e(".k-file",d),u?(o=s._prepareTemplateData(t,n),u=C.template(u),r=e("<li class='k-file'>"+u(o)+"</li>"),r.find(".k-upload-action").addClass("k-button k-button-icon k-flat"),s.angular("compile",function(){return{elements:r,data:[o]}})):r=1===n.fileNames.length?s._prepareDefaultSingleFileEntryTemplate(n):s._prepareDefaultMultipleFileEntriesTemplate(n),r.attr(C.attr("uid"),l).appendTo(d).data(n),s._async||e(".k-progress",r).width("100%"),!s.multiple&&i.length>0&&(a={files:i.data("fileNames"),headers:{}},s.trigger(L,a)||s._module.onRemove({target:e(i,s.wrapper)},a)),r},_removeFileEntry:function(t){
|
21
|
-
var n,i,r,o=this,a=t.closest(".k-upload-files");t.remove(),n=e(".k-file",a),i=e(".k-file-success, .k-file-error",a),r=e(".k-file-invalid",a),i.length!==n.length&&r.length!==n.length||this._hideActionButtons(),0===n.length?(a.remove(),o.wrapper.addClass("k-upload-empty"),o._hideHeaderUploadstatus()):o._updateHeaderUploadStatus()},_fileAction:function(e,t,n){var i,r={remove:"k-i-x",cancel:"k-i-cancel",retry:"k-i-retry",pause:"k-i-pause-sm"},o={remove:"k-i-close",cancel:"k-i-cancel",retry:"k-i-reload-sm",pause:"k-i-pause-sm"};r.hasOwnProperty(t)&&(n||this._clearFileAction(e),this.options.template?(i=e.find(".k-upload-action").first(),i.find(".k-icon").length?i.next(".k-upload-action").length&&i.next(".k-upload-action").addClass("k-button").append("<span class='k-icon "+o[t]+" "+r[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show():i.addClass("k-button").append("<span class='k-icon "+o[t]+" "+r[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show()):(n||e.find(".k-upload-status .k-upload-action").remove(),e.find(".k-upload-status").append(this._renderAction(r[t],this.localization[t],o[t]))))},_fileState:function(t,n){var i=this.localization,r={uploading:{text:i.statusUploading},uploaded:{text:i.statusUploaded},failed:{text:i.statusFailed}},o=r[n];o&&e("span.k-file-state",t).text(o.text)},_renderAction:function(t,n,i){return""!==t?e("<button type='button' class='k-button k-button-icon k-flat k-upload-action' aria-label='"+n+"'><span class='k-icon "+i+" "+t+"' title='"+n+"'></span></button>").on("focus",function(){e(this).addClass("k-state-focused")}).on("blur",function(){e(this).removeClass("k-state-focused")}):e("<button type='button' class='k-button'>"+n+"</button>")},_clearFileAction:function(t){e(".k-upload-action",t).empty().hide()},_onFileAction:function(t){var n,i,r,o,a,s,l=this;return l.wrapper.hasClass("k-state-disabled")||(n=e(t.target).closest(".k-upload-action"),i=n.find(".k-icon"),r=n.closest(".k-file"),o=r.data("fileNames"),a=l._filesContainValidationErrors(o),s={files:o,headers:{}},l._retryClicked=!1,i.hasClass("k-i-x")?l.trigger(L,s)||l._module.onRemove({target:e(r,l.wrapper)},s,!a):i.hasClass("k-i-cancel")?(l.trigger(H,s),l._module.onCancel({target:e(r,l.wrapper)}),l._checkAllComplete(),l._updateHeaderUploadStatus()):i.hasClass("k-i-pause-sm")?(l.trigger(O,s),l.pause(r),l._updateHeaderUploadStatus()):i.hasClass("k-i-play-sm")?(l.trigger(M,s),l.resume(r)):i.hasClass("k-i-retry")&&(e(".k-i-warning",r).remove(),e(".k-progressbar",r).finish().show(),l._module.onRetry({target:e(r,l.wrapper)}),l._retryClicked=!0)),!1},_onUploadSelected:function(){var e=this,t=e.wrapper;return t.hasClass("k-state-disabled")||this._module.onSaveSelected(),!1},_onClearSelected:function(){var e=this,t=e.wrapper,n={};return t.hasClass("k-state-disabled")||e.trigger(R,n)||e.clearAllFiles(),!1},_onFileProgress:function(t,n){var i;n>100&&(n=100),e(".k-progressbar",t.target).removeClass("k-hidden"),this.options.template?e(".k-progress",t.target).width(n+"%"):(i=e(".k-upload-pct",t.target),0===i.length&&e(".k-upload-status",t.target).prepend("<span class='k-upload-pct'></span>"),100!==n?e(".k-upload-pct",t.target).text(n+"%"):e(".k-upload-pct",t.target).remove(),e(".k-progress",t.target).width(n+"%")),this.trigger(B,{files:y(t).data("fileNames"),percentComplete:n})},_onUploadSuccess:function(e,t,n){var i=this,r=y(e),o=r.data("fileNames"),a=r.find(".k-file-information"),s=r.find(".k-file-size"),l=i.trigger(z,{files:r.data("fileNames"),response:t,operation:"upload",XMLHttpRequest:n});l?i._setUploadErrorState(r):(i._fileState(r,"uploaded"),r.removeClass("k-file-progress").addClass("k-file-success"),a.length>0?a.addClass("k-hidden").after('<span class="k-file-validation-message k-text-success">'+o.length+" "+i.localization.uploadSuccess+"</span>"):s.length>0&&s.addClass("k-hidden").after('<span class="k-file-validation-message k-text-success">'+i.localization.uploadSuccess+"</span>"),i._updateHeaderUploadStatus(),i._supportsRemove()?i._fileAction(r,L):i._clearFileAction(r)),i._hideUploadProgress(r),i._checkAllComplete()},_onUploadError:function(e,t){var n=this,i=n._module,r=y(e),o=r.data("uid");n._setUploadErrorState(r),n.trigger(N,{operation:"upload",files:r.data("fileNames"),XMLHttpRequest:t}),I("Server response: "+t.responseText),n.options.async.chunkSize?i._decreasePosition&&i._decreasePosition(o):n._hideUploadProgress(r),n._checkAllComplete(),this.options.async.autoRetryAfter&&this._autoRetryAfter(r)},_autoRetryAfter:function(e){var t=this,n=this._module.retries;n&&(n[e.data("uid")]||(n[e.data("uid")]=1),n[e.data("uid")]<=this.options.async.maxAutoRetries&&(n[e.data("uid")]++,setTimeout(function(){t._module.performUpload(e)},this.options.async.autoRetryAfter)))},_setUploadErrorState:function(t){var n,i=this,r=t.data("fileNames"),o=t.find(".k-file-information"),a=t.find(".k-file-size");i._fileState(t,"failed"),t.removeClass("k-file-progress").addClass("k-file-error"),o.length>0?o.addClass("k-hidden").after('<span class="k-file-validation-message k-text-error">'+r.length+" "+i.localization.uploadFail+"</span>"):a.length>0&&a.addClass("k-hidden").after('<span class="k-file-validation-message k-text-error">'+i.localization.uploadFail+"</span>"),i._updateUploadProgress(t),n=e(".k-upload-pct",t),n.length>0&&n.remove(),this._updateHeaderUploadStatus(),this._fileAction(t,"retry"),this._fileAction(t,L,!0),i._retryClicked&&t.find(".k-i-retry").parent().focus()},_updateUploadProgress:function(t){var n,i,r,o=this;o.options.async.chunkSize?(n=t.data("uid"),o._module.metaData&&(i=o._module.metaData[n],i&&(r=i.totalChunks?Math.round(i.chunkIndex/i.totalChunks*100):100,o._onFileProgress({target:e(t,o.wrapper)},r)))):e(".k-progress",t).width("100%")},_hideUploadProgress:function(t){e(".k-progressbar",t).delay(q).fadeOut(G,function(){e(this).find(".k-progress").css("width","0%")})},_showActionButtons:function(){var t=this,n=e(".k-action-buttons",t.wrapper),i=e(".k-upload-selected",t.wrapper),r=e(".k-clear-selected",t.wrapper);0===i.length&&(i=t._renderAction("",this.localization.uploadSelectedFiles).addClass("k-upload-selected").addClass("k-primary"),r=t._renderAction("",this.localization.clearSelectedFiles).addClass("k-clear-selected")),n.length||(n=e("<div />").addClass("k-action-buttons").append(r,i)),this.wrapper.append(n)},_hideActionButtons:function(){e(".k-action-buttons",this.wrapper).remove()},_showHeaderUploadStatus:function(t){var n=this,i=n.localization,r=e(".k-dropzone",n.wrapper),o=e(".k-upload-status-total",n.wrapper);0!==o.length&&o.remove(),e(".k-dropzone-hint",n.wrapper).addClass("k-hidden"),o='<strong class="k-upload-status k-upload-status-total"><span class="k-icon"></span></strong>',t?(o=e(o).append(i.headerStatusUploading),o.find(".k-icon").addClass($.loading)):(o=e(o).append(i.headerStatusUploaded),o.find(".k-icon").addClass($.warning)),r.length>0?r.append(o):e(".k-upload-button",n.wrapper).after(o)},_updateHeaderUploadStatus:function(){var t,n,i=this,r=e(".k-upload-status-total",this.wrapper),o=e(".k-file",i.wrapper).not(".k-file-success, .k-file-error, .k-file-invalid"),a=e(".k-file-invalid",i.wrapper),s=e(".k-file-error",i.wrapper),l=e(".k-file",i.wrapper).find(".k-i-play-sm");!l.length||l.length!==o.length&&i.options.async.concurrent?(0===o.length||a.length>0||s.length>0)&&(t=e(".k-file.k-file-error, .k-file.k-file-invalid",i.wrapper),r=e(".k-upload-status-total",i.wrapper),n=e(".k-icon",r).removeClass().addClass("k-icon").addClass(0!==t.length?$.warning:$.success),r.html(n).append(i.localization.headerStatusUploaded)):(n=e(".k-icon",r).removeClass().addClass("k-icon").addClass("k-i-pause-sm"),r.html(n).append(i.localization.headerStatusPaused))},_hideHeaderUploadstatus:function(){var t=this,n=t.options.dropZone;e(".k-upload-status-total",this.wrapper).remove(),""===n&&e(".k-dropzone-hint",t.wrapper).removeClass("k-hidden")},_onParentFormSubmit:function(){var n,i=this,r=i.element;t!==this._module.onAbort&&this._module.onAbort(),r.value||(n=e(r),n.attr("disabled","disabled"),window.setTimeout(function(){n.removeAttr("disabled")},0))},_onParentFormReset:function(){e(".k-upload-files",this.wrapper).remove()},_supportsFormData:function(){return"undefined"!=typeof FormData},_supportsMultiple:function(){var e=this._userAgent().indexOf("Windows")>-1;return!(C.support.browser.opera||C.support.browser.safari&&e)},_supportsDrop:function(){var e=this._userAgent().toLowerCase(),t=/chrome/.test(e),n=!t&&/safari/.test(e),i=n&&/windows/.test(e);return!i&&this._supportsFormData()&&this.options.async.saveUrl},_userAgent:function(){return navigator.userAgent},_setupDropZone:function(){var t=this,n=t._ns,i=e(".k-dropzone",t.wrapper).on("dragenter"+n,_).on("dragover"+n,function(e){e.originalEvent&&(e.originalEvent.dataTransfer.dropEffect="copy"),e.preventDefault()}).on("drop"+n,e.proxy(t._onDrop,t));i.find(".k-dropzone-hint").length||i.append(e("<em class='k-dropzone-hint'>"+t.localization.dropFilesHere+"</em>")),b(i,n,function(){i.closest(".k-upload").hasClass("k-state-disabled")||i.addClass("k-dropzone-hovered")},function(){i.removeClass("k-dropzone-hovered")}),t._bindDocumentDragEventWrappers(i)},_setupCustomDropZone:function(){var t,n=this,i=e(n.options.dropZone);n.wrapper.find(".k-dropzone-hint").length?e(".k-dropzone-hint",n.wrapper).addClass("k-hidden"):e(".k-dropzone",n.wrapper).append(e("<em class='k-dropzone-hint k-hidden'>"+n.localization.dropFilesHere+"</em>")),t=n._ns,i.on("dragenter"+t,_).on("dragover"+t,function(e){e.originalEvent&&(e.originalEvent.dataTransfer.dropEffect="copy"),e.preventDefault()}).on("drop"+t,e.proxy(n._onDrop,n)),b(i,t,function(t){n.wrapper.hasClass("k-state-disabled")||(i.removeClass("k-dropzone-hovered"),i.addClass("k-dropzone-hovered"),e(t.target).addClass("k-dropzone-hovered"))},function(){i.removeClass("k-dropzone-hovered"),i.find(".k-dropzone-hovered").removeClass("k-dropzone-hovered")}),n._bindDocumentDragEventWrappers(i)},_bindDocumentDragEventWrappers:function(t){var n=this,i=n._ns;b(e(document),i,function(){n.wrapper.hasClass("k-state-disabled")||(t.addClass("k-dropzone-active"),t.closest(".k-upload").removeClass("k-upload-empty"),t.find(".k-dropzone-hint").removeClass("k-hidden"))},function(){t.removeClass("k-dropzone-active"),t.find(".k-dropzone-hint").addClass("k-hidden"),0===e("li.k-file",t.closest(".k-upload")).length&&t.closest(".k-upload").addClass("k-upload-empty")})},_toggleDropZone:function(){var t=this,n=t.options.dropZone;t._supportsDrop()&&(e(n).off(t._ns),e(".k-dropzone",t.wrapper).off(t._ns),""!==n?t._setupCustomDropZone():t._setupDropZone())},_supportsRemove:function(){return!!this.options.async.removeUrl},_submitRemove:function(t,n,i,r){var o=this,a=o.options.async.removeField||"fileNames",s=e.extend(n.data,S());s[a]=t,jQuery.ajax({type:this.options.async.removeVerb,dataType:"json",dataFilter:v,url:this.options.async.removeUrl,traditional:!0,data:s,headers:n.headers,success:i,error:r,xhrFields:{withCredentials:this.options.async.withCredentials}})},_wrapInput:function(e){var t=this,n=t.options;return e.wrap("<div class='k-widget k-upload'><div class='k-dropzone'><div class='k-button k-upload-button' aria-label='"+this.localization.select+"'></div></div></div>"),n.async.saveUrl?e.closest(".k-upload").addClass("k-upload-async"):e.closest(".k-upload").addClass("k-upload-sync"),e.closest(".k-upload").addClass("k-upload-empty"),e.closest(".k-button").append("<span>"+this.localization.select+"</span>"),e.closest(".k-upload")},_checkAllComplete:function(){0===e(".k-file.k-file-progress",this.wrapper).length&&this.trigger(P)},_inputFiles:function(e){return i(e)}}),Y=function(e){this.name="syncUploadModule",this.element=e.wrapper,this.upload=e,this.element.closest("form").attr("enctype","multipart/form-data").attr("encoding","multipart/form-data")};Y.prototype={onSelect:function(t,i){var r,o,a=this.upload,s=e(t.target),l=a._filesContainValidationErrors(i);a._addInput(s),r={fileNames:i},l?s.remove():r.relatedInput=s,o=a._enqueueFile(n(s),r),l&&a._hideUploadProgress(o),a._fileAction(o,L)},onRemove:function(e){var t=y(e),n=t.data("relatedInput");n&&n.remove(),this.upload._removeFileEntry(t)}},w=function(e){this.name="iframeUploadModule",this.element=e.wrapper,this.upload=e,this.iframes=[]},K._frameId=0,w.prototype={onSelect:function(t,n){var i=this.upload,r=e(t.target),o=i._filesContainValidationErrors(n),a=this.prepareUpload(r,n,o);i.options.async.autoUpload?o?(i._fileAction(a,L),i._showHeaderUploadStatus(!1)):this.performUpload(a):(i._fileAction(a,L),o?i._updateHeaderUploadStatus():i._showActionButtons()),o&&i._hideUploadProgress(a)},prepareUpload:function(t,i,r){var o,a,s,l,d=this.upload,c=e(d.element),u=d.options.async.saveField||t.attr("name");return d._addInput(t),t.attr("name",u),r?(t.remove(),a={fileNames:i}):(s=this.createFrame(d.name+"_"+K._frameId++),this.registerFrame(s),l=this.createForm(d.options.async.saveUrl,s.attr("name")).append(c),a={frame:s,relatedInput:c,fileNames:i}),o=d._enqueueFile(n(t),a),s&&s.data({form:l,file:o}),o},performUpload:function(t){var n,i,r,o={files:t.data("fileNames")},a=t.data("frame"),s=this.upload,l=t.find(".k-file-validation-message"),d=t.find(".k-file-information"),c=t.find(".k-file-size");if(s.trigger(A,o))s._removeFileEntry(a.data("file")),this.cleanupFrame(a),this.unregisterFrame(a);else{s._hideActionButtons(),s._showHeaderUploadStatus(!0),a.appendTo(document.body),n=a.data("form").attr("action",s.options.async.saveUrl).appendTo(document.body),o.data=e.extend({},o.data,S());for(i in o.data)r=n.find("input[name='"+i+"']"),0===r.length&&(r=e("<input>",{type:"hidden",name:i}).prependTo(n)),r.val(o.data[i]);s._fileAction(t,H),s._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),l.length>0&&l.remove(),d.length>0?d.removeClass("k-hidden"):c.length>0&&c.removeClass("k-hidden"),a.one("load",e.proxy(this.onIframeLoad,this)),n[0].submit()}},onSaveSelected:function(){var t=this,n=t.upload;e(".k-file",this.element).each(function(){var i=e(this),r=k(i),o=n._filesContainValidationErrors(i.data("fileNames"));r||o||t.performUpload(i)})},onIframeLoad:function(t){var n,i=e(t.target);try{n=i.contents().text()}catch(r){n="Error trying to get server response: "+r}this.processResponse(i,n)},processResponse:function(t,n){var i=t.data("file"),r=this,o={responseText:n};g(n,function(n){e.extend(o,{statusText:"OK",status:"200"}),r.upload._onFileProgress({target:e(i,r.upload.wrapper)},100),r.upload._onUploadSuccess({target:e(i,r.upload.wrapper)},n,o),r.cleanupFrame(t),r.unregisterFrame(t)},function(){e.extend(o,{statusText:"error",status:"500"}),r.upload._onUploadError({target:e(i,r.upload.wrapper)},o)})},onCancel:function(t){var n=e(t.target).data("frame");this.stopFrameSubmit(n),this.cleanupFrame(n),this.unregisterFrame(n),this.upload._removeFileEntry(n.data("file"))},onRetry:function(e){var t=y(e);this.performUpload(t)},onRemove:function(e,t,n){var i=this,r=i.upload,o=y(e),a=o.data("frame");a?(i.unregisterFrame(a),r._removeFileEntry(o),i.cleanupFrame(a)):o.hasClass("k-file-success")?m(o,r,t,n):r._removeFileEntry(o)},onAbort:function(){var t=this.element,n=this;e.each(this.iframes,function(){e("input",this.data("form")).appendTo(t),n.stopFrameSubmit(this[0]),this.data("form").remove(),this.remove()}),this.iframes=[]},createFrame:function(t){return e("<iframe name='"+t+"' id='"+t+"' style='display:none;' />")},createForm:function(t,n){return e("<form enctype='multipart/form-data' method='POST' action='"+t+"' target='"+n+"'/>")},stopFrameSubmit:function(e){t!==e.stop?e.stop():e.document&&e.document.execCommand("Stop")},registerFrame:function(e){this.iframes.push(e)},unregisterFrame:function(t){this.iframes=e.grep(this.iframes,function(e){return e.attr("name")!=t.attr("name")})},cleanupFrame:function(e){var t=e.data("form");e.data("file").data("frame",null),setTimeout(function(){t.remove(),e.remove()},1)}},x=function(e){this.name="formDataUploadModule",this.element=e.wrapper,this.upload=e,this.position={},this.metaData={},this.cancelled={},this.resume={},this.paused={},this.retries={}},x.prototype={onSelect:function(t,n){var i,r,o=this.upload,a=this,s=e(t.target),l=this.prepareUpload(s,n);e.each(l,function(t){i=o._filesContainValidationErrors(e(this.data("fileNames"))),o.options.async.autoUpload?i?(o._fileAction(this,L),o._showHeaderUploadStatus(!1)):o.options.async.chunkSize?(a.prepareChunk(this),r=this.prev(),(o.options.async.concurrent||0===t&&!r.length||0===t&&r.hasClass("k-file-success"))&&a.performUpload(this)):a.performUpload(this):(o._fileAction(this,L),i?o._updateHeaderUploadStatus():(o._showActionButtons(),this.addClass("k-toupload"))),i&&o._hideUploadProgress(this)})},prepareUpload:function(t,n){var i=this.enqueueFiles(n);return t.is("input")&&(e.each(i,function(){e(this).data("relatedInput",t)}),t.data("relatedFileEntries",i),this.upload._addInput(t)),i},enqueueFiles:function(t){var n,i,r,o,a=this.upload,s=t.length,l=[];if(a.options.async.batch===!0)n=e.map(t,function(e){return e.name}).join(", "),(a.directory||a.options.directoryDrop)&&e(t).each(function(){(this.rawFile.webkitRelativePath||this.rawFile.relativePath)&&(this.name=this.rawFile.webkitRelativePath||this.rawFile.relativePath)}),o=a._enqueueFile(n,{fileNames:t}),o.data("files",t),l.push(o);else for(i=0;i<s;i++)r=t[i],n=r.name,(a.directory||a.options.directoryDrop)&&(r.rawFile.webkitRelativePath||r.rawFile.relativePath)&&(r.name=r.rawFile.webkitRelativePath||r.rawFile.relativePath),o=a._enqueueFile(n,{fileNames:[r]}),o.data("files",[r]),l.push(o);return l},performUpload:function(t){var n,i,r=this.upload,o=this.createFormData(),a=this.createXHR(),s={files:t.data("fileNames"),XMLHttpRequest:a},l=t.find(".k-file-validation-message"),d=t.find(".k-file-information"),c=t.find(".k-file-size");if(r.trigger(A,s))this.removeFileEntry(t);else{if(0===t.find(".k-i-cancel").length&&(r.options.async.chunkSize&&r._fileAction(t,O),r._fileAction(t,H,r.options.async.chunkSize)),r.wrapper.find(".k-toupload").length||r._hideActionButtons(),r._showHeaderUploadStatus(!0),s.formData)o=s.formData;else{s.data=e.extend({},s.data,S());for(i in s.data)o.append(i,s.data[i]);n=t.data("files"),n&&this.populateFormData(o,n)}r._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),l.length>0&&l.remove(),d.length>0?d.removeClass("k-hidden"):c.length>0&&c.removeClass("k-hidden"),r.options.async.useArrayBuffer&&window.FileReader?this._readFile(r.options.async.saveUrl,o,t,a):this.postFormData(r.options.async.saveUrl,o,t,a)}},_readFile:function(n,i,r,o){var a=this,s=a.upload,l=r.data("files")[0],d=new FileReader;d.onload=function(d){try{a.fileArrayBuffer=a.fileArrayBuffer?a._appendBuffer(a.fileArrayBuffer,d.target.result):d.target.result}catch(c){return s._onUploadError({target:e(r,s.wrapper)},o),t}a.position[l.uid]>l.size?(a.postFormData(s.options.async.saveUrl,a.fileArrayBuffer,r,o),a.fileArrayBuffer=null):a._readFile(n,i,r,o)},d.onerror=function(){s._onUploadError({target:e(r,s.wrapper)},o)},d.readAsArrayBuffer(a._getCurrentChunk(l.rawFile,l.uid))},_appendBuffer:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer},onSaveSelected:function(){var t=this,n=t.upload;e(".k-toupload",this.element).filter(function(){var t=e(this),i=k(t),r=n._filesContainValidationErrors(t.data("fileNames"));return!i&&!r}).each(function(i){var r=e(this),o=r.prev();r.removeClass("k-toupload"),n.options.async.chunkSize?(t.prepareChunk(r),(n.options.async.concurrent||0===i&&!o.length||0===i&&o.hasClass("k-file-success")||o.hasClass("k-file-error"))&&t.performUpload(r)):t.performUpload(r)})},onCancel:function(e){var t=y(e);this.upload.options.async.chunkSize&&(this.cancelled[t.data("uid")]=!0),this.stopUploadRequest(t),this.removeFileEntry(t)},onPause:function(e){var t=y(e),n=t.data("uid"),i=this.upload.options.async;i.chunkSize&&(this.retries[n]=i.maxAutoRetries+1,this.paused[n]=!0,this.resume[n]=!1)},onResume:function(e){var t=y(e),n=t.data("uid");this.upload.options.async.chunkSize&&(delete this.paused[n],this.resume[n]=!0,this.retries[t.data("uid")]=1,this._increaseChunkIndex(n),this.performUpload(t))},onRetry:function(e){var t=y(e),n=this.upload.options.async;n.chunkSize&&(this.retries[t.data("uid")]=n.maxAutoRetries+1,delete this.paused[t.data("uid")]),this.performUpload(t)},onRemove:function(e,t,n){var i=this,r=i.upload,o=y(e),a=this.upload.options.async;a.chunkSize&&(this.retries[o.data("uid")]=a.maxAutoRetries+1),o.hasClass("k-file-success")?m(o,r,t,n):i.removeFileEntry(o)},createXHR:function(){return new XMLHttpRequest},postFormData:function(e,t,n,i){var r,o=this;n.data("request",i),i.addEventListener("load",function(e){o.onRequestSuccess.call(o,e,n)},!1),i.addEventListener(N,function(e){o.onRequestError.call(o,e,n)},!1),i.upload.addEventListener("progress",function(e){o.onRequestProgress.call(o,e,n)},!1),i.open("POST",e,!0),i.withCredentials=this.upload.options.async.withCredentials,r=this.upload.options.async.accept,r&&i.setRequestHeader("Accept",r),i.send(t)},createFormData:function(){return new FormData},populateFormData:function(e,t){var n,i,r,o,a=t.length,s=this.upload;if(s.options.async.chunkSize)r=t[0].uid,n=this._getCurrentChunk(t[0].rawFile,r),e.append(s.options.async.saveField||s.name,n),o=JSON.stringify(this.metaData[r]),e.append("metadata",o);else for(i=0;i<a;i++)e.append(s.options.async.saveField||s.name,t[i].rawFile);return e},onRequestSuccess:function(t,n){function i(){a.upload._onUploadError({target:e(n,a.upload.wrapper)},o)}function r(t){var i=a.upload.options.async.batch,r=a.upload.options.async.chunkSize,s=a.upload.options.async.concurrent,l=t.fileUid;a.paused[l]||a.cancelled[l]||(delete a.retries[l],!r||i||t.uploaded?!r||i||s||!n.next().length||n.next().hasClass("k-toupload")?(a.upload._onFileProgress({target:e(n,a.upload.wrapper)},100),a.upload._onUploadSuccess({target:e(n,a.upload.wrapper)},t,o),a.cleanupFileEntry(n)):(a.upload._onFileProgress({target:e(n,a.upload.wrapper)},100),a._resetChunkIndex(l),a.upload._onUploadSuccess({target:e(n,a.upload.wrapper)},t,o),a.performUpload(n.next())):(a._increaseChunkIndex(l),a.performUpload(n)))}var o=t.target,a=this;o.status>=200&&o.status<=299?g(o.responseText,r,i):i()},onRequestError:function(t,n){var i=t.target;this.upload._onUploadError({target:e(n,this.upload.wrapper)},i)},cleanupFileEntry:function(t){var n=t.data("relatedInput"),i=!0;n&&(e.each(n.data("relatedFileEntries")||[],function(){this.parent().length>0&&this[0]!=t[0]&&(i=i&&this.hasClass("k-file-success"))}),i&&n.remove())},removeFileEntry:function(e){var t=this.upload.options.async.chunkSize,n=this.upload.options.async.concurrent,i=this.upload.wrapper.find(".k-upload-selected").length>0;this.cleanupFileEntry(e),!t||n||i||e.next().length&&this.performUpload(e.next()),this.upload._removeFileEntry(e)},onRequestProgress:function(t,n){var i,r=Math.round(100*t.loaded/t.total),o=n.data("uid");this.upload.options.async.chunkSize&&(i=this.metaData[o],r=i&&i.totalChunks?Math.round(i.chunkIndex/i.totalChunks*100):100),this.upload._onFileProgress({target:e(n,this.upload.wrapper)},r)},stopUploadRequest:function(e){e.data("request").abort()},prepareChunk:function(e){var t=e.data("files")[0],n=t.rawFile,i=t.uid,r=this.upload.options.async.chunkSize;this.position[i]=0,this.metaData[i]={chunkIndex:0,contentType:n.type,fileName:n.name,relativePath:t.name,totalFileSize:n.size,totalChunks:Math.ceil(n.size/r),uploadUid:i}},_decreaseChunkIndex:function(e){this.metaData[e].chunkIndex--},_increaseChunkIndex:function(e){this.metaData[e].chunkIndex++},_resetChunkIndex:function(e){this.metaData[e].chunkIndex=0},_decreasePosition:function(e){this.position[e]-=this.upload.options.async.chunkSize},_getCurrentChunk:function(e,t){var n,i=this.position[t],r=this.upload.options.async,o=r.chunkSize||r.bufferChunkSize;return this.position[t]||(this.position[t]=0),this.position[t]+=o,(n=this._getChunker(e))?e[n](i,this.position[t]):e},_getChunker:function(e){return e.slice?"slice":e.mozSlice?"mozSlice":e.webkitSlice?"webkitSlice":null}},C.ui.plugin(K)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.breadcrumb.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.extend,o=e.isPlainObject,a=e.proxy,s=".kendoBreadcrumb",l="aria-hidden",d="aria-label",c="click",u="focus",p="blur",f="keydown",h="change",m=".",g={widget:"k-widget k-breadcrumb",overlay:"k-breadcrumb-container",textbox:"k-textbox",link:"k-breadcrumb-link",item:"k-breadcrumb-item",delimiter:"k-breadcrumb-delimiter-icon",rootItem:"k-breadcrumb-root-item",rootLink:"k-breadcrumb-root-link",overflowIcon:"k-breadcrumb-overflow-icon",focused:"k-state-focused",hidden:"k-hidden",inputWrapper:"k-breadcrumb-input-container"},v=i.extend({init:function(e,t){var r=this;t=t||{},i.fn.init.call(r,e,t),r._wrapper(),t.editable&&(r._editable(),r._tabindex()),r.wrapper.on(c+s,"a:not(.k-state-disabled)",a(r._click,r)),t.value||t.bindToLocation||!t.items?r._value():t.items&&r.items(t.items),r._resizeHandler=n.onResize(function(){r.resize(!0)})},options:{editable:!1,navigational:!1,bindToLocation:!1,items:null,name:"Breadcrumb",gap:0,rootIcon:"home",delimiterIcon:"arrow-chevron-right",messages:{rootTitle:"Go to root"}},events:[h,c],destroy:function(){var e=this;i.fn.destroy.call(e),n.unbindResize(e._resizeHandler),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(s)},items:function(e){var n=this;return e===t?n.options.items:(n.options.items=e,n._segments=e,n.refresh(),t)},_update:function(e){var t=this;e!==t.value()&&(t._generateSegments(e),t.refresh(),t.trigger(h,{sender:this,value:e}))},_generateSegments:function(e){var n,i,r=this,o=r.options,a=o.items,s=r._split(e);if(!a)return r.options.items=r._segments=s,t;for(r._segments=[],i=0;i<s.length;i++)n=r._path(a.slice(0,i+1)),r._segments.push(""!==n&&e.indexOf(n)>-1&&a[i]&&a[i].text===s[i]?a[i]:s[i])},_click:function(t){var n=this,i=n.options,r=e(t.target).closest(m+g.item),o=r.prevAll().addBack(),a=n._getItems(o),s=n._path(a),l=n._segments[r.index()];i.navigational||t.preventDefault(),n.trigger(c,{sender:n,originalEvent:t,isRoot:"rootitem"===l.type,item:l})||n._update(s)},_getItems:function(t){var n=this;return e.map(t,function(t){return n._segments[e(t).index()]||t.innerText})},_edit:function(){var e=this,t=e.input;e.oldValue=e.value(),e.inputWrapper.css("height",e.wrapper.height()),e.overlay.hide(),e.input.val(e.value()),e.input.attr(l,!1),e.inputWrapper.show(),setTimeout(function(){t.select()})},_blur:function(e){var t=this,n=t.input,i=t.inputWrapper,r=t.wrapper,o=t.overlay,a=n.val().replace(/\/{2,}/g,"/");o.is(":visible")||(e&&(a=t.oldValue),n.attr(l,!0),i.hide(),o.show(),n.val(""),t._update(a),r.removeClass(g.focused))},_keydown:function(e){var t=this,i=e.keyCode,r=i===n.keys.ENTER,o=i===n.keys.ESC;(r||o)&&(t._blur(o),setTimeout(function(){t.overlay.find("a:first").focus()}))},isNavigational:function(e){var t=e.hasClass(g.textbox)||e.closest(m+g.item);return e[0]!==this.wrapper[0]&&(t&&!e.hasClass("k-breadcrumb-last-item"))},_wrapperKeydown:function(t){var i=this,r=e(t.target),o=i.isNavigational(r);t.keyCode!==n.keys.ENTER||o||i._edit()},_wrapperClick:function(t){var n=this,i=e(t.target),r=n.isNavigational(i);r||this._edit()},_wrapperFocus:function(t){e(t.target).addClass(g.focused)},_wrapperBlur:function(t){e(t.target).removeClass(g.focused)},_wrapper:function(){var t=this,n=this.element,i=n.is("input");t.wrapper=i?n.wrap(e("<nav />")).parent():n,i?(t.element.wrap(e("<div />").addClass(g.inputWrapper)).addClass(g.textbox).parent().hide(),t.inputWrapper=t.wrapper.find(m+g.inputWrapper)):t.inputWrapper=t.wrapper.append(e("<div />").addClass(g.inputWrapper)).find(m+g.inputWrapper).hide(),t.wrapper.addClass(g.widget),t.wrapper.attr(d,"Breadcrumb"),t.overlay=t.wrapper.append(e("<ol />").addClass(g.overlay)).find(m+g.overlay)},_editable:function(){var t=this,n=t.element,i=n.is("input");t.input=i?t.element:e("<input />"),t.inputWrapper.append(t.input),t.input.addClass(g.textbox).attr(l,!0),t.input.on(p+s,a(t._blur,t,!1)).on(f+s,a(t._keydown,t)),t.wrapper.on(u+s,a(t._wrapperFocus,t)).on(p+s,a(t._wrapperBlur,t)).on(f+s,a(t._wrapperKeydown,t)).on(c+s,a(t._wrapperClick,t))},_value:function(){var e=this,t=e.options;e.value(t.value?t.value:t.bindToLocation?window.location.href.replace(/http(s?):\/\//,"").replace(/\/$/,""):"")},_split:function(e){return e.split("/").filter(function(e,t){return!(t>0&&""===e)})},isRtl:function(){return n.support.isRtl(this.wrapper)},refresh:function(){var i,a,s,l,d=this,c=d.options,u=c.messages,p=d.options.delimiterIcon,f="",h="",m=""===d.value(),v=d._segments;for("arrow-chevron-right"==p&&d.isRtl()&&(p="arrow-chevron-left"),a=0,s=v.length;a<s;a++)i=v[a],l=a===v.length-1,i!==t&&(f?h+=i.text||i||"":h="/","string"==typeof i?(i={type:f?"item":"rootitem",href:c.navigational?h:"#",text:i,showIcon:!f,showText:!!f,icon:f?"":c.rootIcon,itemClass:f?"":"k-breadcrumb-root-item",linkClass:f?"":g.rootLink,delimiterIcon:p,renderDelimiter:!l&&!m,lastSegment:l,iconClass:""},d._segments.splice(a,1,i)):o(i)&&(i=r({},i,{type:i.type?i.type.toLowerCase():"item"}),i=r({},i,{text:i.text||"",title:i.text||"",icon:i.icon||("rootitem"===i.type?c.rootIcon:""),iconClass:i.iconClass||"",lastSegment:l,renderDelimiter:!l&&v.length>1,href:c.navigational?i.href:"#",delimiterIcon:p,itemClass:i.itemClass||"",linkClass:i.linkClass||"",showIcon:i.showIcon===t?"rootitem"===i.type&&"item"!==i.type:i.showIcon,showText:i.showText===t?"item"===i.type&&"rootitem"!==i.type:i.showText}),"rootitem"===i.type&&(i.itemClass+=" k-breadcrumb-root-item",i.linkClass+=" "+g.rootLink)),"rootitem"===i.type&&""===i.text&&(i.title=u.rootTitle),h+=h.match(/\/$/)?"":"/",f+=n.template(this.itemTemplate)(i));this.overlay.empty().append(e(f)),this.resize(!0)},itemTemplate:'<li class="k-breadcrumb-item #:itemClass# #if(lastSegment){#k-breadcrumb-last-item#}#"><a href="#:href#" class="#:linkClass# #if(type !== "rootitem"){# k-breadcrumb-link#}##if(showText && showIcon){# k-breadcrumb-icontext-link#}##if(showIcon && !showText){# k-breadcrumb-icon-link#}##if(lastSegment && type !== "rootitem"){# k-state-disabled#}#"#if(lastSegment){# aria-current="page"#}# title="#:text || title#">#if(showIcon) {#<span class="#if(icon){#k-icon k-i-#:icon##}# #:iconClass#"></span>#}##if(showText) {##:text##}#</a>#if(renderDelimiter) {#<span class="k-breadcrumb-delimiter-icon k-icon k-i-#:delimiterIcon#" aria-hidden="true"></span>#}##if(type === "rootitem" && renderDelimiter) {#<span class="k-breadcrumb-delimiter-icon k-hidden k-icon k-i-#:delimiterIcon#" aria-hidden="true"></span>#}#</li>',_displayOverflowIcons:function(e){var t=this,n=t.wrapper.find(m+g.rootItem);e?n.find(m+g.delimiter).addClass(g.overflowIcon).removeClass(g.hidden):n.find(m+g.overflowIcon).removeClass(g.overflowIcon).last().addClass(g.hidden)},_shrinkItems:function(){var t,i,r=this,o=r.wrapper,a=r.overlay,s=r.overlay.find(m+g.item+":visible:not(.k-breadcrumb-root-item)"),l=o.width()-r.options.gap;if(1!=s.length)for(i=0;i<s.length;i+=1)if(t=e(s[i]),n._outerWidth(a)>=l){if(i==s.length-1)break;t.hide(),r._displayOverflowIcons(!0)}},_showItem:function(e,t,i){return!!(e.length&&i>t+n._outerWidth(e,!0))&&(e.show(),!0)},_stretchItems:function(){var t,i,r,o=this,a=o.wrapper,s=o.overlay,l=o.overlay.find(m+g.item+":hidden:not(.k-breadcrumb-root-item)"),d=a.width()-o.options.gap;for(l.length||o._displayOverflowIcons(!1),r=l.length-1;r>=0&&(t=e(l[r]),i=n._outerWidth(s),!(i>d)&&this._showItem(t,i,d));r--);},_resize:function(){this._shrinkItems(),this._stretchItems()},getSize:function(){return n.dimensions(this.wrapper)},value:function(e){var n=this;return e!==t?(n._generateSegments(e),n.refresh(),t):n._path(n._segments)},_path:function(t){return e.map(t,function(e){var t=o(e)?e.text:e;
|
22
|
-
return"/"===t?"":t}).join("/")}});n.ui.plugin(v)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.filebrowser.min",["kendo.listview.min","kendo.dropdownlist.min","kendo.upload.min","kendo.breadcrumb.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,r;e.on("dragenter"+w,function(){t(),r=new Date,i||(i=setInterval(function(){var e=new Date-r;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+w,function(){r=new Date})}function i(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function r(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}function o(e,t){var n=e[t];return u(n)?n.from||n.field||t:n}var a,s,l,d=window.kendo,c=d.ui.Widget,u=e.isPlainObject,p=e.proxy,f=e.extend,h=d.support.placeholder,m=d.support.browser,g=d.isFunction,v=/(^\/|\/$)/g,_="change",b="apply",k="error",y="click",w=".kendoFileBrowser",x=".kendoSearchBox",C="name",T="size",S="type",I={field:S,dir:"asc"},D=d.template('<div class="k-listview-item k-listview-item-empty"><span class="k-file-preview"><span class="k-file-icon k-icon k-i-none"></span></span><span class="k-file-name">${text}</span></div>'),F='<div class="k-widget k-filebrowser-toolbar k-toolbar k-floatwrap"># if (showCreate) { #<button type="button" class="k-button k-icon-button"><span class="k-icon k-i-folder-add"></span></button># } ## if (showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-upload-button"><span class="k-icon k-i-plus"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div># } ## if (showDelete) { #<button type="button" class="k-button k-button-icon k-state-disabled"><span class="k-icon k-i-close"></span></button># } #<div class="k-tiles-arrange"><label>#=messages.orderBy#: <select></select></label></div><span class="k-toolbar-spacer" /><input data-role="searchbox" /></div>';f(!0,d.data,{schemas:{filebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),f(!0,d.data,{transports:{filebrowser:d.data.RemoteTransport.extend({init:function(t){d.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,n){n.data=e.extend({},n.data,{path:this.options.path()}),g(this.options[t])?this.options[t].call(this,n):d.data.RemoteTransport.fn[t].call(this,n)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),a=m.msie&&m.version<8?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()},s=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),n.element.addClass("k-filebrowser"),n.element.on(y+w,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-close)",p(n._deleteClick,n)).on(y+w,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-folder-add)",p(n._addClick,n)).on("keydown"+w,".k-listview-item.k-state-selected input",p(n._directoryKeyDown,n)).on("blur"+w,".k-listview-item.k-state-selected input",p(n._directoryBlur,n)),n._dataSource(),n.refresh(),n.path(n.options.path)},options:{name:"FileBrowser",messages:{uploadFile:"Upload",orderBy:"Arrange by",orderByName:"Name",orderBySize:"Size",directoryNotFound:"A directory with this name was not found.",emptyFolder:"Empty Folder",deleteFile:'Are you sure you want to delete "{0}"?',invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',dropFilesHere:"drop file here to upload",search:"Search"},transport:{},path:"/",fileTypes:"*.*"},events:[k,_,b],destroy:function(){var e=this;c.fn.destroy.call(e),e.dataSource.unbind(k,e._errorHandler),e.element.add(e.list).add(e.toolbar).off(w),d.destroy(e.element)},value:function(){var e,t=this,n=t._selectedItem(),r=t.options.transport.fileUrl;if(n&&"f"===n.get(S))return e=i(t.path(),n.get(C)).replace(v,""),r&&(e=g(r)?r(e):d.format(r,encodeURIComponent(e))),e},_selectedItem:function(){var e=this.listView,t=e.select();if(t.length)return this.dataSource.getByUid(t.attr(d.attr("uid")))},_toolbar:function(){var t=this,n=d.template(F),i=t.options.messages,r=[{text:i.orderByName,value:"name"},{text:i.orderBySize,value:"size"}];t.toolbar=e(n({messages:i,showUpload:t.options.transport.uploadUrl,showCreate:t.options.transport.create,showDelete:t.options.transport.destroy})).appendTo(t.element).find(".k-upload input").kendoUpload({multiple:!1,localization:{dropFilesHere:i.dropFilesHere},async:{saveUrl:t.options.transport.uploadUrl,autoUpload:!0},upload:p(t._fileUpload,t),error:function(e){t._error({xhr:e.XMLHttpRequest,status:"error"})}}).end(),t.upload=t.toolbar.find(".k-upload input").data("kendoUpload"),t.arrangeBy=t.toolbar.find(".k-tiles-arrange select").kendoDropDownList({dataSource:r,dataTextField:"text",dataValueField:"value",change:function(){t.orderBy(this.value())}}).data("kendoDropDownList"),t.searchBox=t.toolbar.find("input[data-role='searchbox']").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox"),t._attachDropzoneEvents()},_attachDropzoneEvents:function(){var t=this;t.options.transport.uploadUrl&&(n(e(document.documentElement),e.proxy(t._dropEnter,t),e.proxy(t._dropLeave,t)),t._scrollHandler=p(t._positionDropzone,t))},_dropEnter:function(){this._positionDropzone(),e(document).on("scroll"+w,this._scrollHandler)},_dropLeave:function(){this._removeDropzone(),e(document).off("scroll"+w,this._scrollHandler)},_positionDropzone:function(){var e=this,t=e.element,n=t.offset();e.toolbar.find(".k-dropzone").addClass("k-filebrowser-dropzone").offset(n).css({width:t[0].clientWidth,height:t[0].clientHeight,lineHeight:t[0].clientHeight+"px"})},_removeDropzone:function(){this.toolbar.find(".k-dropzone").removeClass("k-filebrowser-dropzone").css({width:"",height:"",lineHeight:"",top:"",left:""})},_deleteClick:function(){var e=this,t=e.listView.select(),n=d.format(e.options.messages.deleteFile,t.find(".k-file-name").text());t.length&&e._showMessage(n,"confirm")&&e.listView.remove(t)},_addClick:function(){this.createDirectory()},_getFieldName:function(e){return o(this.dataSource.reader.model.fields,e)},_fileUpload:function(e){var t,n=this,i=n.options,r=i.fileTypes,o=RegExp(("("+r.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),a=e.files[0].name,s=e.files[0].size,l=C,c=T;o.test(a)?(e.data={path:n.path()},t=n._createFile(a,s),t?n.upload.one("success",function(e){var i=n._insertFileToList(t);i._override&&(i.set(l,e.response[n._getFieldName(l)]),i.set(c,e.response[n._getFieldName(c)]),n.listView.dataSource.pushUpdate(i)),n._tiles=n.listView.items().filter("["+d.attr("type")+"=f]")}):e.preventDefault()):(e.preventDefault(),n._showMessage(d.format(i.messages.invalidFileType,a,r)))},_findFile:function(e){var t,n,i,r=this.dataSource.data(),o=S,a=C;for(e=e.toLowerCase(),t=0,i=r.length;t<i;t++)if("f"===r[t].get(o)&&r[t].get(a).toLowerCase()===e){n=r[t];break}return n},_createFile:function(e,t){var n=this,i={},r=S,o=n._findFile(e);return o?n._showMessage(d.format(n.options.messages.overwriteFile,e),"confirm")?(o._override=!0,o):null:(i[r]="f",i[C]=e,i[T]=t,i)},_insertFileToList:function(e){var t,n,i,r,o;if(e._override)return e;for(n=this.dataSource,i=n.view(),r=0,o=i.length;r<o;r++)if("f"===i[r].get(S)){t=r;break}return n.insert(++t,e)},createDirectory:function(){var e,t,n=this,i=0,r=S,o=C,a=n.dataSource.data(),s=n._nameDirectory(),l=new n.dataSource.reader.model;for(e=0,t=a.length;e<t;e++)"d"===a[e].get(r)&&(i=e);l.set(r,"d"),l.set(o,s),n.listView.one("dataBound",function(){var e=n.listView.items().filter("["+d.attr("uid")+"="+l.uid+"]");e.length&&this.edit(e),this.element.scrollTop(e.attr("offsetTop")-this.element[0].offsetHeight),setTimeout(function(){n.listView.element.find(".k-edit-item input").select()})}).one("save",function(e){var t=e.model.get(o);t?e.model.set(o,n._nameExists(t,l.uid)?n._nameDirectory():t):e.model.set(o,s)}),n.dataSource.insert(++i,l)},_directoryKeyDown:function(e){13==e.keyCode&&e.currentTarget.blur()},_directoryBlur:function(){this.listView.save()},_nameExists:function(e,t){var n,i,r=this.dataSource.data(),o=S,a=C;for(n=0,i=r.length;n<i;n++)if("d"===r[n].get(o)&&r[n].get(a).toLowerCase()===e.toLowerCase()&&r[n].uid!==t)return!0;return!1},_nameDirectory:function(){var t,n,i,r="New folder",o=this.dataSource.data(),a=[],s=S,l=C;for(n=0,i=o.length;n<i;n++)"d"===o[n].get(s)&&o[n].get(l).toLowerCase().indexOf(r.toLowerCase())>-1&&a.push(o[n].get(l));if(e.inArray(r,a)>-1){n=2;do t=r+" ("+n+")",n++;while(e.inArray(t,a)>-1);r=t}return r},orderBy:function(e){this.dataSource.sort([{field:S,dir:"asc"},{field:e,dir:"asc"}])},search:function(e){this.dataSource.filter({field:C,operator:"contains",value:e})},_content:function(){var t=this;t.list=e('<div class="k-filemanager-listview" />').appendTo(t.element).on("dblclick"+w,".k-listview-item",p(t._dblClick,t)),t.listView=new d.ui.ListView(t.list,{layout:"flex",flex:{direction:"row",wrap:"wrap"},dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),d.ui.progress(t.listView.content,!1))},dataBound:function(){t.dataSource.view().length?t._tiles=this.items().filter("["+d.attr("type")+"=f]"):this.content.append(D({text:t.options.messages.emptyFolder}))},change:p(t._listViewChange,t)})},_dblClick:function(t){var n,r=this,o=e(t.currentTarget);o.hasClass("k-edit-item")&&r._directoryBlur(),o.filter("["+d.attr("type")+"=d]").length?(n=r.dataSource.getByUid(o.attr(d.attr("uid"))),n&&(r.path(i(r.path(),n.get(C))),r.breadcrumbs.value("/"+r.path()))):o.filter("["+d.attr("type")+"=f]").length&&r.trigger(b)},_listViewChange:function(){var e=this._selectedItem();e&&(this.toolbar.find(".k-i-close").parent().removeClass("k-state-disabled"),this.trigger(_,{selected:e}))},_dataSource:function(){var e,t=this,n=t.options,i=n.transport,r=f({},I),o={field:C,dir:"asc"},a={type:i.type||"filebrowser",sort:[r,o]};u(i)&&(i.path=p(t.path,t),a.transport=i),u(n.schema)?a.schema=n.schema:i.type&&u(d.data.schemas[i.type])&&(e=d.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(k,t._errorHandler):t._errorHandler=p(t._error,t),t.dataSource=d.data.DataSource.create(a).bind(k,t._errorHandler)},_navigation:function(){var t=this,n=e('<div class="k-floatwrap"><nav></nav></div>').appendTo(this.element);t.breadcrumbs=n.find("nav:first").kendoBreadcrumb({editable:!0,gap:50,value:t.options.path||"/",change:function(){t.path(this.value())}}).data("kendoBreadcrumb")},_error:function(e){var t,n,i=this;i.trigger(k,e)||(t=e.xhr.status,"error"==e.status?"404"==t?i._showMessage(i.options.messages.directoryNotFound):"0"!=t&&i._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&i._showMessage("Error! Server timeout."),n=i.dataSource,n.hasChanges()&&n.cancelChanges())},_showMessage:function(e,t){return window[t||"alert"](e)},refresh:function(){var e=this;e._navigation(),e._toolbar(),e._content()},_editTmpl:function(){var e='<div class="k-listview-item k-state-selected" '+d.attr("uid")+'="#=uid#" ';return e+=d.attr("type")+'="${'+S+'}">',e+="#if("+S+' == "d") { #',e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-loading"></span></div>',e+="#}#",e+="#if("+S+' == "d") { #',e+='<span class="k-file-name"><input class="k-textbox" '+d.attr("bind")+'="value:'+C+'"/></span>',e+="#}#",e+="</div>",p(d.template(e),{sizeFormatter:r})},_itemTmpl:function(){var e='<div class="k-listview-item" '+d.attr("uid")+'="#=uid#" ';return e+=d.attr("type")+'="${'+S+'}">',e+="#if("+S+' == "d") { #',e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-file"></span></div>',e+="#}#",e+='<span class="k-file-name">${'+C+"}</span>",e+="#if("+S+' == "f") { # <span class="k-file-size">${this.sizeFormatter('+T+")}</span> #}#",e+="</div>",p(d.template(e),{sizeFormatter:r})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(v,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(v,"")),"/"===i||""===i?"":i+"/")}}),l=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),h&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+x,p(n._keydown,n)).on("change"+x,p(n._updateValue,n)),n.wrapper.on(y+x,"a",p(n._click,n)),h||n.element.on("focus"+x,p(n._focus,n)).on("blur"+x,p(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[_],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(x),c.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(_))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){h||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,n=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),n.length||(n=t.wrap(e('<div class="k-widget k-search-wrap k-textbox"/>')).parent(),h||e('<label style="display:block">'+this.options.label+"</label>").insertBefore(t),e('<a href="#" class="k-icon k-i-zoom k-search"/>').appendTo(n)),this.wrapper=n,this.label=n.find(">label")},value:function(e){var n=this;return e!==t?(n.options.value=e,n.element.val(e),n._toggleLabel(),t):n.options.value}}),d.ui.plugin(s),d.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.imagebrowser.min",["kendo.filebrowser.min"],e)}(function(){return function(e,t){function n(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function i(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}var r,o,a=window.kendo,s=a.ui.FileBrowser,l=e.isPlainObject,d=e.proxy,c=e.extend,u=a.support.browser,p=a.isFunction,f=/(^\/|\/$)/g,h="error",m=".kendoImageBrowser",g="name",v="size",_="type",b={field:_,dir:"asc"},k=a.template('<div class="k-listview-item k-listview-item-empty"><span class="k-file-preview"><span class="k-file-icon k-icon k-i-none"></span></span><span class="k-file-name">${text}</span></div>');c(!0,a.data,{schemas:{imagebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),c(!0,a.data,{transports:{imagebrowser:a.data.RemoteTransport.extend({init:function(t){a.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,n){n.data=e.extend({},n.data,{path:this.options.path()}),p(this.options[t])?this.options[t].call(this,n):a.data.RemoteTransport.fn[t].call(this,n)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),r=u.msie&&u.version<8?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()},o=s.extend({init:function(e,t){var n=this;t=t||{},s.fn.init.call(n,e,t),n.element.addClass("k-imagebrowser")},options:{name:"ImageBrowser",fileTypes:"*.png,*.gif,*.jpg,*.jpeg"},value:function(){var e,t=this,i=t._selectedItem(),r=t.options.transport.imageUrl;if(i&&"f"===i.get(_))return e=n(t.path(),i.get(g)).replace(f,""),r&&(e=p(r)?r(e):a.format(r,encodeURIComponent(e))),e},_fileUpload:function(e){var n,i=this,r=i.options,o=r.fileTypes,s=RegExp(("("+o.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),l=e.files[0].name,d=e.files[0].size,c=g,u=v;s.test(l)?(e.data={path:i.path()},n=i._createFile(l,d),n?(n._uploading=!0,i.upload.one("error",function(){n=t}),i.upload.one("success",function(e){if(n){delete n._uploading;var t=i._insertFileToList(n);t.set(c,e.response[i._getFieldName(c)]),t.set(u,e.response[i._getFieldName(u)]),i._tiles=i.listView.items().filter("["+a.attr("type")+"=f]"),i._scroll()}})):e.preventDefault()):(e.preventDefault(),i._showMessage(a.format(r.messages.invalidFileType,l,o)))},_content:function(){var t=this;t.list=e('<div class="k-filemanager-listview" />').appendTo(t.element).on("dblclick"+m,".k-listview-item",d(t._dblClick,t)),t.listView=new a.ui.ListView(t.list,{layout:"flex",flex:{direction:"row",wrap:"wrap"},dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),a.ui.progress(t.listView.content,!1))},dataBound:function(){t.dataSource.view().length?(t._tiles=this.items().filter("["+a.attr("type")+"=f]"),t._scroll()):this.content.append(k({text:t.options.messages.emptyFolder}))},change:d(t._listViewChange,t)}),t.listView.content.on("scroll"+m,d(t._scroll,t))},_dataSource:function(){var e,t=this,n=t.options,i=n.transport,r=c({},b),o={field:g,dir:"asc"},s={type:i.type||"imagebrowser",sort:[r,o]};l(i)&&(i.path=d(t.path,t),s.transport=i),l(n.schema)?s.schema=n.schema:i.type&&l(a.data.schemas[i.type])&&(e=a.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(h,t._errorHandler):t._errorHandler=d(t._error,t),t.dataSource=a.data.DataSource.create(s).bind(h,t._errorHandler)},_loadImage:function(t){var n=this,i=e(t),r=n.dataSource.getByUid(i.attr(a.attr("uid"))),o=r.get(g),s=n.options.transport.thumbnailUrl,l=e("<img />",{alt:o}),d="?";r._uploading||(l.hide().on("load"+m,function(){e(this).prev().remove().end().addClass("k-image k-file-image").fadeIn()}),i.find(".k-i-loading").after(l),p(s)?s=s(n.path(),encodeURIComponent(o)):(s.indexOf("?")>=0&&(d="&"),s=s+d+"path="+encodeURIComponent(n.path()+o),r._override&&(s+="&_="+(new Date).getTime(),delete r._override)),l.attr("src",s),t.loaded=!0)},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var t=a._outerHeight(e.listView.content),n=e.listView.content.scrollTop(),i=n+t;e._tiles.each(function(){var t=r(this),o=t+this.offsetHeight;if((t>=n&&t<i||o>=n&&o<i)&&e._loadImage(this),t>i)return!1}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_itemTmpl:function(){var e=this,t='<div class="k-listview-item" '+a.attr("uid")+'="#=uid#" ';return t+=a.attr("type")+'="${'+_+'}">',t+="#if("+_+' == "d") { #',t+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-folder"></span></div>',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'<div class="k-file-preview"><span class="k-file-icon k-icon k-i-loading"></span></div>':'<div class="k-file-preview"><span class="k-file-icon k-icon k-i-file"></span></div>',t+="#}#",t+='<span class="k-file-name">${'+g+"}</span>",t+="#if("+_+' == "f") { # <span class="k-file-size">${this.sizeFormatter('+v+")}</span> #}#",t+="</div>",d(a.template(t),{sizeFormatter:i})}}),a.ui.plugin(o)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.tabstrip.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(t){t.children(b).addClass(F),t.children("a").addClass(C).children(b).addClass(F),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(B),t.filter("li[disabled]").addClass(M).attr("aria-disabled","true").removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(L+" "+W),t.attr("role","tab"),t.filter("."+L).attr("aria-selected",!0),t.each(function(){var t=e(this);t.children("."+C).length||t.contents().filter(function(){return!(this.nodeName.match(v)||3==this.nodeType&&!c(this.nodeValue))}).wrapAll("<span UNSELECTABLE='on' class='"+C+"'/>")})}function i(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(E),t.filter(".k-last:not(:last-child)").removeClass(T),t.filter(":first-child").addClass(E),t.filter(":last-child").addClass(T)}function r(e,t){return"<span class='k-button k-button-icon k-flat k-tabstrip-"+e+"' unselectable='on'><span class='k-icon "+t+"'></span></span>"}var o=window.kendo,a=o.ui,s=o.keys,l=e.map,d=e.each,c=o.trim,u=e.extend,p=o.isFunction,f=o.template,h=o._outerWidth,m=o._outerHeight,g=a.Widget,v=/^(a|div)$/i,_=".kendoTabStrip",b="img",k="href",y="prev",w="next",x="show",C="k-link",T="k-last",S="click",I="error",D=":empty",F="k-image",E="k-first",A="select",z="activate",N="k-content",P="contentUrl",H="mouseenter",R="mouseleave",O="contentLoad",M="k-state-disabled",B="k-state-default",L="k-state-active",V="k-state-focused",U="k-state-hover",W="k-tab-on-top",j=".k-item:not(."+M+")",q=".k-item",G=".k-tabstrip-items > "+j+":not(."+L+")",$=200,K={content:f("<div class='k-content'#= contentAttributes(data) # role='tabpanel' tabindex='0'>#= content(item) #</div>"),itemWrapper:f("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"),item:f("<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"),image:f("<img class='k-image' alt='' src='#= imageUrl #' />"),sprite:f("<span class='k-sprite #= spriteCssClass #'></span>"),empty:f("")},Y={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},text:function(e){return e.encoded===!1?e.text:o.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},contentAttributes:function(e){return e.active!==!0?" style='display:none' aria-hidden='true' aria-expanded='false'":""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?o.attr("content-url")+'="'+e.contentUrl+'"':""}},Q=g.extend({init:function(t,n){var i,r,a,s=this;g.fn.init.call(s,t,n),s._animations(s.options),n=s.options,s._contentUrls=n.contentUrls||[],s._wrapper(),s._isRtl=o.support.isRtl(s.wrapper),s._tabindex(),s._updateClasses(),s._dataSource(),n.dataSource&&s.dataSource.fetch(),s._tabPosition(),s._scrollable(),s._contentUrls.length?s.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,n){var i=s._contentUrls[t];"string"==typeof i&&e(n).find(">."+C).data(P,i)}):s._contentUrls.length=s.tabGroup.find("li.k-item").length,s.wrapper.on(H+_+" "+R+_,G,s._toggleHover).on("focus"+_,e.proxy(s._active,s)).on("blur"+_,function(){s._current(null)}),s._keyDownProxy=e.proxy(s._keydown,s),n.navigatable&&s.wrapper.on("keydown"+_,s._keyDownProxy),s.options.value&&(i=s.options.value),s.wrapper.children(".k-tabstrip-items").on(S+_,".k-state-disabled .k-link",!1).on(S+_," > "+j,function(t){var n,i=s.wrapper[0];if(i!==document.activeElement)if(n=o.support.browser.msie)try{i.setActive()}catch(r){i.focus()}else i.focus();s._click(e(t.currentTarget))&&t.preventDefault()}),r=s.tabGroup.children("li."+L),a=s.contentHolder(r.index()),r[0]&&a.length>0&&0===a[0].childNodes.length&&s.activateTab(r.eq(0)),s.element.attr("role","tablist"),s.value(i),o.notify(s)},_active:function(){var e=this.tabGroup.children().filter("."+L);e=e[0]?e:this._endItem("first"),e[0]&&this._current(e)},_endItem:function(e){return this.tabGroup.children(j)[e]()},_getItem:function(e){return this.tabGroup.children(q)[e]()},_item:function(e,t){var n;return n=t===y?"last":"first",e?(e=e[t](),e[0]||(e=this.tabGroup.children(q)[n]()),e.hasClass(M)&&e.addClass(V),(e.hasClass(M)||e.hasClass(L))&&(this._focused=e),e):this._endItem(n)},_current:function(e){var n=this,i=n._focused;return e===t?i:(i&&i.removeClass(V),e&&(e.hasClass(L)||e.addClass(V),e[0].id&&n.element.attr("aria-activedescendant",e[0].id)),n._focused=e,t)},_keydown:function(e){var n,i=this,r=e.keyCode,o=i._current(),a=i._isRtl,l=/top|bottom/.test(i.options.tabPosition);if(e.target==e.currentTarget&&o){if(r!==s.DOWN||l)if(r!==s.UP||l)if(r===s.RIGHT&&l)n=a?y:w;else if(r===s.LEFT&&l)n=a?w:y;else if(r==s.ENTER||r==s.SPACEBAR)i._click(o),e.preventDefault();else{if(r==s.HOME)return i._click(i._getItem("first")),e.preventDefault(),t;if(r==s.END)return i._click(i._getItem("last")),e.preventDefault(),t}else n=y;else n=w;n&&(i._click(i._item(o,n)),e.preventDefault())}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler):t._refreshHandler=e.proxy(t.refresh,t),t.dataSource=o.data.DataSource.create(t.options.dataSource).bind("change",t._refreshHandler)},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t.dataSource.fetch()},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{effects:{}}})},refresh:function(e){var t,n,i,r,a=this,s=a.options,l=o.getter(s.dataEncodedField),d=o.getter(s.dataTextField),c=o.getter(s.dataContentField),u=o.getter(s.dataContentUrlField),p=o.getter(s.dataImageUrlField),f=o.getter(s.dataUrlField),h=o.getter(s.dataSpriteCssClass),m=[],g=a.dataSource.view();for(e=e||{},i=e.action,i&&(g=e.items),t=0,r=g.length;t<r;t++)n={text:d(g[t])},s.dataEncodedField&&(n.encoded=l(g[t])),s.dataContentField&&(n.content=c(g[t])),s.dataContentUrlField&&(n.contentUrl=u(g[t])),s.dataUrlField&&(n.url=f(g[t])),s.dataImageUrlField&&(n.imageUrl=p(g[t])),s.dataSpriteCssClass&&(n.spriteCssClass=h(g[t])),m[t]=n;if("add"==e.action)e.index<a.tabGroup.children().length?a.insertBefore(m,a.tabGroup.children().eq(e.index)):a.append(m);else if("remove"==e.action)for(t=0;t<g.length;t++)a.remove(e.index);else"itemchange"==e.action?(t=a.dataSource.view().indexOf(g[0]),e.field===s.dataTextField&&a.tabGroup.children().eq(t).find(".k-link").text(g[0].get(e.field)),e.field===s.dataUrlField&&(a._contentUrls[t]=g[0].get(e.field))):(a.trigger("dataBinding"),a.remove("li"),a._contentUrls=[],a.append(m),a.trigger("dataBound"))},value:function(n){var i=this;return n===t?i.select().text():(n!=i.value()&&i.tabGroup.children().each(function(){o.trim(e(this).text())==n&&i.select(this)}),t)},items:function(){return this.tabGroup[0].children},setOptions:function(e){var t=this,n=t.options.animation;t._animations(e),e.contentUrls&&(t._contentUrls=e.contentUrls),e.animation=u(!0,n,e.animation),e.navigatable?t.wrapper.on("keydown"+_,t._keyDownProxy):t.wrapper.off("keydown"+_,t._keyDownProxy),g.fn.setOptions.call(t,e)},events:[A,z,x,I,O,"change","dataBinding","dataBound"],options:{name:"TabStrip",dataEncodedField:"",dataTextField:"",dataContentField:"",dataImageUrlField:"",dataUrlField:"",dataSpriteCssClass:"",dataContentUrlField:"",tabPosition:"top",animation:{open:{effects:"expand:vertical fadeIn",duration:200},close:{duration:200}},collapsible:!1,navigatable:!0,contentUrls:!1,scrollable:{distance:$}},destroy:function(){var e=this,t=e.scrollWrap;g.fn.destroy.call(e),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler),e.wrapper.off(_),e.wrapper.children(".k-tabstrip-items").off(_),e._scrollableModeActive&&(e._scrollPrevButton.off().remove(),e._scrollNextButton.off().remove()),o.destroy(e.wrapper),t.children(".k-tabstrip").unwrap()},select:function(t){var n=this;return 0===arguments.length?n.tabGroup.children("li."+L):(isNaN(t)||(t=n.tabGroup.children().get(t)),t=n.tabGroup.find(t),e(t).each(function(t,i){i=e(i),i.hasClass(L)||n.trigger(A,{item:i[0],contentElement:n.contentHolder(i.index())[0]})||n.activateTab(i)}),n)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},reload:function(t){var n,i;return t=this.tabGroup.find(t),n=this,i=n._contentUrls,t.each(function(){var t=e(this),r=t.find("."+C).data(P)||i[t.index()],o=n.contentHolder(t.index());r&&n.ajaxRequest(t,o,null,r)}),n},append:function(e){var t=this,n=t._create(e);return d(n.tabs,function(e){var i=n.contents[e];t.tabGroup.append(this),"bottom"==t.options.tabPosition?t.tabGroup.before(i):t._scrollableModeActive?t._scrollPrevButton.before(i):t.wrapper.append(i),t.angular("compile",function(){return{elements:[i]}})}),i(t.tabGroup),t._updateContentElements(),t.resize(!0),t},_appendUrlItem:function(e){this._contentUrls.push(e)},_moveUrlItem:function(e,t){this._contentUrls.splice(t,0,this._contentUrls.splice(e,1)[0])},_removeUrlItem:function(e){this._contentUrls.splice(e,1)},insertBefore:function(t,n){n=e(t).is(e(n))?this.tabGroup.find(n).next():this.tabGroup.find(n);var r=this,o=r._create(t),a=r.element.find("[id='"+n.attr("aria-controls")+"']");return d(o.tabs,function(t){var i=o.contents[t],s=o.newTabsCreated?r._contentUrls.length-(o.tabs.length-t):e(i).index()-1;n.before(this),a.before(i),r._moveUrlItem(s,e(this).index()),r.angular("compile",function(){return{elements:[i]}})}),i(r.tabGroup),r._updateContentElements(o.newTabsCreated),r.resize(!0),r},insertAfter:function(t,n){n=e(t).is(e(n))?this.tabGroup.find(n).prev():this.tabGroup.find(n);var r=this,o=r._create(t),a=r.element.find("[id='"+n.attr("aria-controls")+"']");return d(o.tabs,function(t){var i=o.contents[t],s=o.newTabsCreated?r._contentUrls.length-(o.tabs.length-t):e(i).index()-1;n.after(this),a.after(i),r._moveUrlItem(s,e(this).index()),r.angular("compile",function(){return{elements:[i]}})}),i(r.tabGroup),r._updateContentElements(o.newTabsCreated),r.resize(!0),r},remove:function(t){var n,i=this,r=typeof t;return"string"===r?t=i.tabGroup.find(t):"number"===r&&(t=i.tabGroup.children().eq(t)),n=t.map(function(){var t=e(this).index(),n=i.contentElement(t);return o.destroy(n),i._removeUrlItem(t),n}),t.remove(),n.empty(),n.remove(),i._updateContentElements(),i.resize(!0),i},_create:function(t){var i,r,a,s=this,d=!1;return t=t instanceof o.data.ObservableArray?t.toJSON():t,e.isPlainObject(t)||e.isArray(t)?(t=e.isArray(t)?t:[t],d=!0,i=l(t,function(n,i){return s._appendUrlItem(t[i].contentUrl||null),e(Q.renderItem({group:s.tabGroup,item:u(n,{index:i})}))}),r=l(t,function(t,n){if("string"==typeof t.content||t.contentUrl)return e(Q.renderContent({item:u(t,{index:n})}))})):(i="string"==typeof t&&"<"!=t[0]?s.element.find(t):e(t),r=e(),i.each(function(){if(/k-tabstrip-items/.test(this.parentNode.className)){var t=s.element.find("[id='"+this.getAttribute("aria-controls")+"']");a=t}else a=e("<div class='"+N+"'/>");r=r.add(a)}),n(i)),{tabs:i,contents:r,newTabsCreated:d}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(B,n).toggleClass(M,!n).attr("aria-disabled",!n)})},_updateClasses:function(){var r,o,a,s=this;s.wrapper.addClass("k-widget k-header k-tabstrip"),s.tabGroup=s.wrapper.children("ul").addClass("k-tabstrip-items k-reset"),s.tabGroup[0]||(s.tabGroup=e("<ul class='k-tabstrip-items k-reset'/>").appendTo(s.wrapper)),r=s.tabGroup.find("li").addClass("k-item"),r.length&&(o=r.filter("."+L).index(),a=o>=0?o:t,s.tabGroup.contents().filter(function(){return 3==this.nodeType&&!c(this.nodeValue)}).remove()),o>=0&&r.eq(o).addClass(W),s.contentElements=s.wrapper.children("div"),s.contentElements.addClass(N).eq(a).addClass(L).css({display:"block"}),r.length&&(n(r),i(s.tabGroup),s._updateContentElements(!0))},_elementId:function(e,t,n){var i,r=e.attr("id"),a=this.element.attr("id")||o.guid();return r?r:(i=a+"-",n&&(i+="tab-"),i+(t+1))},_updateContentElements:function(t){
|
23
|
-
var n=this,i=n._contentUrls,r=n.tabGroup.children(".k-item"),a=n.wrapper.children("div"),s=n._elementId.bind(n);a.length&&r.length>a.length?a.each(function(n){var i,o=s(e(this),n),a=r.filter("[aria-controls="+(o||0)+"]")[0];!a&&t&&(a=r[n]),a&&(a.setAttribute("aria-controls",o),i=a.id=s(e(a),n,!0),this.setAttribute("aria-labelledby",i)),this.setAttribute("id",o)}):r.each(function(t){var r,o=a.eq(t),l=s(o,t);this.setAttribute("aria-controls",l),r=this.id=s(e(this),t,!0),!o.length&&i[t]?e("<div class='"+N+"'/>").appendTo(n.wrapper).attr("id",l):(o.attr("id",l),e(this).children(".k-loading")[0]||i[t]||e("<span class='k-loading k-complete'/>").prependTo(this)),o.attr("role","tabpanel"),o.attr("tabindex","0"),o.attr("aria-labelledby",r),o.filter(":not(."+L+")").attr("aria-hidden",!0).attr("aria-expanded",!1),o.filter("."+L).attr("aria-expanded",!0)}),n.contentElements=n.contentAnimators=n.wrapper.children("div"),n.tabsHeight=m(n.tabGroup)+parseInt(n.wrapper.css("border-top-width"),10)+parseInt(n.wrapper.css("border-bottom-width"),10),o.kineticScrollNeeded&&o.mobile.ui.Scroller&&(o.touchScroller(n.contentElements),n.contentElements=n.contentElements.children(".km-scroll-container"))},_wrapper:function(){var e=this;e.wrapper=e.element.is("ul")?e.element.wrapAll("<div />").parent():e.element,e.scrollWrap=e.wrapper.parent(".k-tabstrip-wrapper"),e.scrollWrap[0]||(e.scrollWrap=e.wrapper.wrapAll("<div class='k-tabstrip-wrapper' />").parent())},_tabPosition:function(){var e=this,t=e.options.tabPosition;e.wrapper.addClass("k-floatwrap k-tabstrip-"+t),"bottom"==t&&e.tabGroup.appendTo(e.wrapper),e.resize(!0)},_setContentElementsDimensions:function(){var e,t,n,i,r,o,a=this,s=a.options.tabPosition;"left"!=s&&"right"!=s||(e=a.wrapper.children(".k-content"),t=e.filter(":visible"),n="margin-"+s,i=a.tabGroup,r=h(i),o=Math.ceil(i.height())-parseInt(t.css("padding-top"),10)-parseInt(t.css("padding-bottom"),10)-parseInt(t.css("border-top-width"),10)-parseInt(t.css("border-bottom-width"),10),setTimeout(function(){e.css(n,r).css("min-height",o)}))},_resize:function(){this._setContentElementsDimensions(),this._scrollable()},_sizeScrollWrap:function(e){var t,n;e.is(":visible")&&(t=this.options.tabPosition,n=Math.floor(m(e,!0))+("left"===t||"right"===t?2:this.tabsHeight),this.scrollWrap.css("height",n).css("height"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(U,t.type==H)},_click:function(e){var t,n,i=this,r=e.find("."+C),o=r.attr(k),a=i.options.collapsible,s=e.index(),l=i.contentHolder(s),d=e.parent().children(),c=d.filter("."+V);if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is("."+M+(a?"":",."+L)))return c.removeClass(V),i._focused=e,e.addClass(V),i._current(e),i._scrollableModeActive&&i._scrollTabsToItem(e),!0;if(n=r.data(P)||i._contentUrls[s]||o&&("#"==o.charAt(o.length-1)||o.indexOf("#"+i.element[0].id+"-")!=-1),t=!o||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(A,{item:e[0],contentElement:l[0]}))return!0;if(t!==!1)return a&&e.is("."+L)?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},_scrollable:function(){var e,t,n,i,a,s,l,d,c=this,u=c.options;c._scrollableAllowed()&&(c.wrapper.addClass("k-tabstrip-scrollable"),e=c.wrapper[0].offsetWidth,t=c.tabGroup[0].scrollWidth,t>e&&!c._scrollableModeActive?(c._nowScrollingTabs=!1,c._isRtl=o.support.isRtl(c.element),a=o.support.touch?"touchstart":"mousedown",s=o.support.touch?"touchend":"mouseup",l=o.support.browser,d=c._isRtl&&!l.msie&&!l.edge,c.wrapper.append(r("prev","k-i-arrow-60-left")+r("next","k-i-arrow-60-right")),n=c._scrollPrevButton=c.wrapper.children(".k-tabstrip-prev"),i=c._scrollNextButton=c.wrapper.children(".k-tabstrip-next"),c.tabGroup.css({marginLeft:h(n)+9,marginRight:h(i)+12}),n.on(a+_,function(){c._nowScrollingTabs=!0,c._scrollTabsByDelta(u.scrollable.distance*(d?1:-1))}),i.on(a+_,function(){c._nowScrollingTabs=!0,c._scrollTabsByDelta(u.scrollable.distance*(d?-1:1))}),n.add(i).on(s+_,function(){c._nowScrollingTabs=!1}),c._scrollableModeActive=!0,c._toggleScrollButtons()):c._scrollableModeActive&&t<=e?(c._scrollableModeActive=!1,c.wrapper.removeClass("k-tabstrip-scrollable"),c._scrollPrevButton.off().remove(),c._scrollNextButton.off().remove(),c.tabGroup.css({marginLeft:"",marginRight:""})):c._scrollableModeActive?c._toggleScrollButtons():c.wrapper.removeClass("k-tabstrip-scrollable"))},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!e.scrollable.distance&&(e.scrollable={distance:$}),e.scrollable&&!isNaN(e.scrollable.distance)&&("top"==e.tabPosition||"bottom"==e.tabPosition)},_scrollTabsToItem:function(e){var t,n=this,i=n.tabGroup,r=o.scrollLeft(i),a=h(e),s=n._isRtl?e.position().left:e.position().left-i.children().first().position().left,l=i[0].offsetWidth,d=Math.ceil(parseFloat(i.css("padding-left"))),c=o.support.browser;n._isRtl&&(c.mozilla||c.webkit&&c.version>=85)&&(r*=-1),n._isRtl?s<0?t=r+s-(l-r)-d:s+a>l&&(t=r+s-a+2*d):r+l<s+a?t=s+a-l+2*d:r>s&&(t=s-d),i.finish().animate({scrollLeft:t},"fast","linear",function(){n._toggleScrollButtons()})},_scrollTabsByDelta:function(e){var t=this,n=t.tabGroup,i=o.scrollLeft(n),r=o.support.browser;t._isRtl&&(r.mozilla||r.webkit&&r.version>=85)&&(i*=-1),n.finish().animate({scrollLeft:i+e},"fast","linear",function(){t._nowScrollingTabs&&!jQuery.fx.off?t._scrollTabsByDelta(e):t._toggleScrollButtons()})},_toggleScrollButtons:function(){var e=this,t=e.tabGroup,n=o.scrollLeft(t);e._scrollPrevButton.toggle(0!==n),e._scrollNextButton.toggle(n<t[0].scrollWidth-t[0].offsetWidth-1)},deactivateTab:function(e){var t=this,n=t.options.animation,i=n.open,r=u({},n.close),a=r&&"effects"in r;e=t.tabGroup.find(e),r=u(a?r:u({reverse:!0},i),{hide:!0}),o.size(i.effects)?(e.kendoAddClass(B,{duration:i.duration}),e.kendoRemoveClass(L,{duration:i.duration})):(e.addClass(B),e.removeClass(L)),e.removeAttr("aria-selected"),t.contentAnimators.filter("."+L).kendoStop(!0,!0).kendoAnimate(r).removeClass(L).attr("aria-hidden",!0)},activateTab:function(e){var t,n,i,r,a,s,l,d,c,p,f,h,g,v,_,b;if(!this.tabGroup.children("[data-animating]").length)return e=this.tabGroup.find(e),t=this,n=t.options.animation,i=n.open,r=u({},n.close),a=r&&"effects"in r,s=e.parent().children(),l=s.filter("."+L),d=s.index(e),c=i&&"duration"in i&&"effects"in i,r=u(a?r:u({reverse:!0},i),{hide:!0}),o.size(i.effects)?(l.kendoRemoveClass(L,{duration:r.duration}),e.kendoRemoveClass(U,{duration:r.duration})):(l.removeClass(L),e.removeClass(U)),p=t.contentAnimators,t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===p.length?(t.tabGroup.find("."+W).removeClass(W),e.addClass(W).css("z-index"),e.addClass(L),t._current(e),t.trigger("change"),t._scrollableModeActive&&t._scrollTabsToItem(e),!1):(f=p.filter("."+L),h=t.contentHolder(d),g=h.closest(".k-content"),t.tabsHeight=m(t.tabGroup)+parseInt(t.wrapper.css("border-top-width"),10)+parseInt(t.wrapper.css("border-bottom-width"),10),t._sizeScrollWrap(f),0===h.length?(f.removeClass(L).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(r),!1):(e.attr("data-animating",!0),v=(e.children("."+C).data(P)||t._contentUrls[d]||!1)&&h.is(D),_=function(){l.removeAttr("aria-selected"),e.attr("aria-selected",!0),t._current(e),t._sizeScrollWrap(g),g.addClass(L).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(u({init:function(){t.trigger(x,{item:e[0],contentElement:h[0]}),o.resize(h)}},i,{complete:function(){e.removeAttr("data-animating"),t.trigger(z,{item:e[0],contentElement:h[0]}),o.resize(h),t.scrollWrap.css("height","").css("height"),c&&(o.support.browser.msie||o.support.browser.edge)&&h.finish().animate({opacity:.9},"fast","linear",function(){h.finish().animate({opacity:1},"fast","linear")})}}))},b=function(){v?(e.removeAttr("data-animating"),t.ajaxRequest(e,h,function(){e.attr("data-animating",!0),_(),t.trigger("change")})):(_(),t.trigger("change")),t._scrollableModeActive&&t._scrollTabsToItem(e)},f.removeClass(L),t.tabGroup.find("."+W).removeClass(W),e.addClass(W).css("z-index"),o.size(i.effects)?(l.kendoAddClass(B,{duration:i.duration}),e.kendoAddClass(L,{duration:i.duration})):(l.addClass(B),e.addClass(L)),f.attr("aria-hidden",!0),f.attr("aria-expanded",!1),f.length?f.kendoStop(!0,!0).kendoAnimate(u({complete:b},r)):b(),!0))},contentElement:function(n){var i,r,a,s;if(isNaN(n-0))return t;if(i=this.contentElements&&this.contentElements[0]&&!o.kineticScrollNeeded?this.contentElements:this.contentAnimators,r=e(this.tabGroup.children()[n]).attr("aria-controls"),i)for(a=0,s=i.length;a<s;a++)if(i.eq(a).closest(".k-content")[0].id==r)return i[a];return t},contentHolder:function(t){var n=e(this.contentElement(t)),i=n.children(".km-scroll-container");return o.support.touch&&i[0]?i:n},ajaxRequest:function(t,n,i,r){var a,s,l,d,c,u,f,h,m,g;t=this.tabGroup.find(t),a=this,s=e.ajaxSettings.xhr,l=t.find("."+C),d={},c=t.width()/2,u=!1,f=t.find(".k-loading").removeClass("k-complete"),f[0]||(f=e("<span class='k-loading'/>").prependTo(t)),h=2*c-f.width(),m=function(){f.animate({marginLeft:(parseInt(f.css("marginLeft"),10)||0)<c?h:0},500,m)},o.support.browser.msie&&o.support.browser.version<10&&setTimeout(m,40),r=r||l.data(P)||a._contentUrls[t.index()]||l.attr(k),a.inRequest=!0,g={type:"GET",cache:!1,url:r,dataType:"html",data:d,xhr:function(){var t=this,n=s(),i=t.progressUpload?"progressUpload":!!t.progress&&"progress";return n&&e.each([n,n.upload],function(){this.addEventListener&&this.addEventListener("progress",function(e){i&&t[i](e)},!1)}),t.noProgress=!(window.XMLHttpRequest&&"upload"in new XMLHttpRequest),n},progress:function(e){if(e.lengthComputable){var t=parseInt(e.loaded/e.total*100,10)+"%";f.stop(!0).addClass("k-progress").css({width:t,marginLeft:0})}},error:function(e,t){a.trigger("error",{xhr:e,status:t})&&this.complete()},stopProgress:function(){clearInterval(u),f.stop(!0).addClass("k-progress")[0].style.cssText=""},complete:function(e){a.inRequest=!1,this.noProgress?setTimeout(this.stopProgress,500):this.stopProgress(),"abort"==e.statusText&&f.remove()},success:function(e){var s,l,d;f.addClass("k-complete");try{s=this,l=10,s.noProgress&&(f.width(l+"%"),u=setInterval(function(){s.progress({lengthComputable:!0,loaded:Math.min(l,100),total:100}),l+=10},40)),a.angular("cleanup",function(){return{elements:n.get()}}),o.destroy(n),n.html(e)}catch(c){d=window.console,d&&d.error&&d.error(c.name+": "+c.message+" in "+r),this.error(this.xhr,"error")}i&&i.call(a,n),a.angular("compile",function(){return{elements:n.get()}}),a.trigger(O,{item:t[0],contentElement:n[0]})}},"object"==typeof r&&(g=e.extend(!0,{},g,r),p(g.url)&&(g.url=g.url())),a.xhr=e.ajax(g)}});u(Q,{renderItem:function(e){e=u({tabStrip:{},group:{}},e);var t=K.empty,n=e.item;return K.item(u(e,{image:n.imageUrl?K.image:t,sprite:n.spriteCssClass?K.sprite:t,itemWrapper:K.itemWrapper},Y))},renderContent:function(e){return K.content(u(e,Y))}}),o.ui.plugin(Q)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/undoredostack.min",["kendo.core.min"],e)}(function(){!function(e){var t=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this,t),this.clear()},events:["undo","redo"],push:function(e){this.stack=this.stack.slice(0,this.currentCommandIndex+1),this.currentCommandIndex=this.stack.push(e)-1},undo:function(){if(this.canUndo()){var e=this.stack[this.currentCommandIndex--];e.undo(),this.trigger("undo",{command:e})}},redo:function(){if(this.canRedo()){var e=this.stack[++this.currentCommandIndex];e.redo(),this.trigger("redo",{command:e})}},clear:function(){this.stack=[],this.currentCommandIndex=-1},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}});e.deepExtend(e,{util:{UndoRedoStack:t}})}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/main.min",["util/undoredostack.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.window.min","kendo.colorpicker.min"],e)}(function(){!function(e,t){var n,i,r,o,a=window.kendo,s=a.Class,l=a.ui.Widget,d=a.support.mobileOS,c=a.support.browser,u=e.extend,p=e.proxy,f=a.deepExtend,h=a.keys,m="select",g="select.k-select-overlay",v="k-placeholder",_="placeholder",b=200,k="en",y=s.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.template(e.template,{useWithBlock:!1})(e)}}),w={editorWrapperTemplate:'<table cellspacing="0" cellpadding="0" class="k-widget k-editor" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-toolbar k-editor-toolbar" role="toolbar"></ul></td></tr><tr><td class="k-editable-area"></td></tr></tbody></table>',buttonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button tabindex="0" role="button" class="k-button k-tool" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="#= iconCssClass #"></span><span class="k-tool-text k-button-text">#= data.title #</span></button>',tableWizardButtonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button tabindex="0" role="button" class="k-tool k-button" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="#= iconCssClass #"></span><span class="k-tool-text">#= data.title #</span></button>',colorPickerTemplate:'<input class="k-colorpicker k-icon k-i-#= data.cssClass.replace("k-", "") #" />',comboBoxTemplate:'<select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #"></select>',dropDownListTemplate:'<span class="k-editor-dropdown"><select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #"></select></span>',separatorTemplate:'<span class="k-separator"></span>',overflowAnchorTemplate:'<button tabindex="0" role="button" class="k-button k-tool k-overflow-anchor" data-popup title="#= data.title #" aria-label="#= data.title #" aria-haspopup="true" aria-expanded="false"><span class="k-icon k-i-more-vertical"></span></button>',formatByName:function(t,n){for(var i=0;i<n.length;i++)if(e.inArray(t,n[i].tags)>=0)return n[i]},getToolCssClass:function(e){var t={superscript:"sup-script",subscript:"sub-script",justifyLeft:"align-left",justifyCenter:"align-center",justifyRight:"align-right",justifyFull:"align-justify",insertUnorderedList:"list-unordered",insertOrderedList:"list-ordered","import":"login",indent:"indent-increase",outdent:"indent-decrease",createLink:"link-horizontal",unlink:"unlink-horizontal",insertImage:"image",insertFile:"file-add",viewHtml:"html",foreColor:"foreground-color",backColor:"paint",createTable:"table-insert",addColumnLeft:"table-column-insert-left",addColumnRight:"table-column-insert-right",addRowAbove:"table-row-insert-above",addRowBelow:"table-row-insert-below",deleteRow:"table-row-delete",deleteColumn:"table-column-delete",mergeCellsHorizontally:"cells-merge-horizontally",mergeCellsVertically:"cells-merge-vertically",splitCellHorizontally:"cell-split-horizontally",splitCellVertically:"cell-split-vertically",tableWizard:"table-properties",tableWizardInsert:"table-wizard",cleanFormatting:"clear-css",copyFormat:"copy-format",applyFormat:"apply-format"},n=t[e];return n?n:e},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+w.getToolCssClass(e)),t.name||(t.options.name=e,t.name=e.toLowerCase()),S.defaultTools[e]=t},registerFormat:function(e,t){S.fn.options.formats[e]=t},cacheComments:function(e,t){for(var n in t)e=e.replace(t[n],"{"+n+"}");return e},retrieveComments:function(e,t){for(var n in t)e=e.replace("{"+n+"}",t[n]);return e}},x={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",overflowAnchor:"More tools",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",fileText:"Text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogOk:"Ok",dialogCancel:"Cancel",cleanFormatting:"Clean formatting",createTable:"Create a table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column",mergeCellsHorizontally:"Merge cells horizontally",mergeCellsVertically:"Merge cells vertically",splitCellHorizontally:"Split cells horizontally",splitCellVertically:"Split cells vertically",tableWizard:"Table Wizard",tableTab:"Table",cellTab:"Cell",accessibilityTab:"Accessibility",caption:"Caption",summary:"Summary",width:"Width",height:"Height",units:"Units",cellSpacing:"Cell Spacing",cellPadding:"Cell Padding",cellMargin:"Cell Margin",alignment:"Alignment",background:"Background",cssClass:"CSS Class",id:"ID",border:"Border",borderStyle:"Border Style",collapseBorders:"Collapse borders",wrapText:"Wrap text",associateCellsWithHeaders:"Associate headers",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignLeftTop:"Align Left Top",alignCenterTop:"Align Center Top",alignRightTop:"Align Right Top",alignLeftMiddle:"Align Left Middle",alignCenterMiddle:"Align Center Middle",alignRightMiddle:"Align Right Middle",alignLeftBottom:"Align Left Bottom",alignCenterBottom:"Align Center Bottom",alignRightBottom:"Align Right Bottom",alignRemove:"Remove Alignment",columns:"Columns",rows:"Rows",selectAllCells:"Select All Cells",exportAs:"Export As","import":"Import",print:"Print",headerRows:"Header Rows",headerColumns:"Header Cols",tableSummaryPlaceholder:"Summary attribute is not HTML5 compatible.",associateNone:"None",associateScope:"Associate using 'scope' attribute",associateIds:"Associate using Ids",copyFormat:"Copy format",applyFormat:"Apply format"},C=!d||d.ios&&d.flatVersion>=500||!d.ios&&t!==document.documentElement.contentEditable,T={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],formatPainter:["copyFormat","applyFormat"],links:["createLink","unlink"],tables:["tableWizard","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn","mergeCellsHorizontally","mergeCellsVertically","splitCellHorizontally","splitCellVertically"]},S=l.extend({init:function(n,i){var r,o,s,d,c,h,m,g=this,v=a.ui.editor,_=v.Dom;C&&(l.fn.init.call(g,n,i),g.options=f({},g.options,i),g.options.tools=g.options.tools.slice(),n=g.element,h=n[0],d=_.name(h),this._registerHandler(n.closest("form"),"submit",p(g.update,g,t)),s=u({},g.options),s.editor=g,"textarea"==d?(g._wrapTextarea(),o=g.wrapper.find(".k-editor-toolbar"),h.id&&o.attr("aria-controls",h.id)):(g.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),s.popup=!0,o=e('<ul class="k-toolbar k-editor-toolbar" role="toolbar" />').insertBefore(n)),g.toolbar=new v.Toolbar(o[0],s),g.toolbar.bindTo(g),"textarea"==d&&setTimeout(function(){var e=g.wrapper[0].style.height,t=parseInt(e,10),n=g.wrapper.height();e.indexOf("px")>0&&!isNaN(t)&&n>t&&g.wrapper.height(t-(n-t))}),g._resizable(),g._initializeContentElement(g),g.keyboard=new v.Keyboard([new v.BackspaceHandler(g),new v.TypingHandler(g),new v.SystemHandler(g),new v.SelectAllHandler(g)]),g.clipboard=new v.Clipboard(this),g.undoRedoStack=new a.util.UndoRedoStack,i&&i.value?r=i.value:g.textarea?(r=h.value,g.options.encoded&&h.defaultValue&&h.defaultValue.trim().length&&(r=h.defaultValue),m=v.Serializer.htmlToDom(r,e("<div></div>")[0],g.options.deserialization),c=_.getAllComments(m),r=w.cacheComments(r,c),r=r.replace(/[\r\n\v\f\t ]+/gi," "),r=w.retrieveComments(r,c)):r=h.innerHTML,g.value(r||"\ufeff"),this._registerHandler(document,{mousedown:function(){g._endTyping()},mouseup:function(e){g._mouseup(e)}}),g._initializeImmutables(),g.toolbar.resize(),a.notify(g))},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.tools&&t.toolbar.bindTo(t),this._initializePlaceholder()},_togglePlaceholder:function(t){var n=this,i=n.body,r=e(i),o=n.options.placeholder;n.textarea&&o&&(r.attr("aria-label",function(){return t?o:""}),r.toggleClass(v,t))},_endTyping:function(){var e=this.keyboard;try{e.isTypingInProgress()&&(e.endTyping(!0),this.saveSelection())}catch(t){}},_selectionChange:function(){this._selectionStarted=!1,this.saveSelection(),this.trigger("select",{})},_resizable:function(){var n,i,r=this.options.resizable,o=e.isPlainObject(r)?r.content===t||r.content===!0:r;o&&this.textarea&&(n=e("<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right'></span></div>").insertAfter(this.textarea),this.wrapper.addClass("k-resizable"),this.wrapper.kendoResizable(u({},this.options.resizable,{draggableElement:n,start:function(t){var n=this.editor=e(t.currentTarget).closest(".k-editor");this.initialSize=n.height(),n.find("td:last").append("<div class='k-overlay' />")},resize:function(e){var t=e.y.initialDelta,n=this.initialSize+t,i=this.options.min||0,r=this.options.max||1/0;n=Math.min(r,Math.max(i,n)),this.editor.height(n)},resizeend:function(){this.editor.find(".k-overlay").remove(),this.editor=null}})),a.support.mobileOS.ios&&(i=this.wrapper.getKendoResizable(),i.draggable.options.ignore=g))},_initializeTableResizing:function(){var e=this;a.ui.editor.TableResizing.create(e),e._showTableResizeHandlesProxy=p(e._showTableResizeHandles,e),e.bind(m,e._showTableResizeHandlesProxy)},_destroyTableResizing:function(){var e=this,t=e.tableResizing;t&&(t.destroy(),e.tableResizing=null),e._showTableResizeHandlesProxy&&e.unbind(m,e._showTableResizeHandlesProxy)},_showTableResizeHandles:function(){var e=this,t=e.tableResizing;t&&t.showResizeHandles()},_initializeColumnResizing:function(){a.ui.editor.ColumnResizing.create(this)},_destroyColumnResizing:function(){var e=this;e.columnResizing&&(e.columnResizing.destroy(),e.columnResizing=null)},_initializeRowResizing:function(){a.ui.editor.RowResizing.create(this)},_destroyRowResizing:function(){var e=this;e.rowResizing&&(e.rowResizing.destroy(),e.rowResizing=null)},_wrapTextarea:function(){var t=this,n=t.element,i=n[0].style.width,r=n[0].style.height,o=w.editorWrapperTemplate,a=e(o).insertBefore(n).width(i).height(r),s=a.find(".k-editable-area");n.attr("autocomplete","off").appendTo(s).addClass("k-content k-raw-content").css("display","none"),t.textarea=n,t.wrapper=a},_createContentElement:function(t){var n,i,r,o=this,s=o.textarea,l=o.options.domain,c=l||document.domain,u="",p='javascript:""',f="";return s.hide(),n=e("<iframe />",{title:o.options.messages.editAreaTitle,frameBorder:"0"})[0],e(n).css("display","").addClass("k-content").attr("tabindex",s[0].tabIndex).insertBefore(s),(l||c!=location.hostname)&&(u='<script>document.domain="'+c+'"</script>',p="javascript:document.write('"+u+"')",n.src=p),n.src||(n.src=""),i=n.contentWindow||n,r=i.document||n.contentDocument,e(n).one("load",function(){o.toolbar.decorateFrom(r.body)}),f=document.getElementsByTagName("html")[0].getAttribute("lang")||k,r.open(),r.write("<!DOCTYPE html><html lang='"+f+"'><head><meta charset='utf-8' /><title>Kendo UI Editor content</title><style>html{padding:0;margin:0;height:100%;min-height:100%;cursor:text;}body{padding:0;margin:0;}body{box-sizing:border-box;font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:5px .4em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;"+(a.support.isRtl(s)?"direction:rtl;":"")+(d.ios?"word-break:keep-all;":"")+"}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table th{outline:0;border: 1px dotted #999;}.k-table p{margin:0;padding:0;}.k-column-resize-handle-wrapper {position: absolute; height: 10px; width:10px; cursor: col-resize; z-index: 2;}.k-column-resize-handle {width: 100%; height: 100%;}.k-column-resize-handle > .k-column-resize-marker {width:2px; height:100%; margin:0 auto; background-color:#00b0ff; display:none; opacity:0.8;}.k-row-resize-handle-wrapper {position: absolute; cursor: row-resize; z-index:2; width: 10px; height: 10px;}.k-row-resize-handle {display: table; width: 100%; height: 100%;}.k-row-resize-marker-wrapper{display: table-cell; height:100%; width:100%; margin:0; padding:0; vertical-align: middle;}.k-row-resize-marker{margin: 0; padding:0; width:100%; height:2px; background-color: #00b0ff; opacity:0.8; display:none;}.k-table-resize-handle-wrapper {position: absolute; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px;}.k-table-resize-handle {width: 100%; height: 100%;}.k-table-resize-handle.k-resize-east{cursor:e-resize;}.k-table-resize-handle.k-resize-north{cursor:n-resize;}.k-table-resize-handle.k-resize-northeast{cursor:ne-resize;}.k-table-resize-handle.k-resize-northwest{cursor:nw-resize;}.k-table-resize-handle.k-resize-south{cursor:s-resize;}.k-table-resize-handle.k-resize-southeast{cursor:se-resize;}.k-table-resize-handle.k-resize-southwest{cursor:sw-resize;}.k-table-resize-handle.k-resize-west{cursor:w-resize;}.k-table.k-table-resizing{opacity:0.6;}.k-placeholder{color:grey}k\\:script{display:none;}</style>"+u+e.map(t,function(e){return"<link rel='stylesheet' href='"+e+"'>"}).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>"),r.close(),i},_blur:function(){var e=this.textarea,t=e?e.val():this._oldValue,n=this.options.encoded?this.encodedValue():this.value();this.update(),e&&e.trigger("blur"),n!=t&&(this.trigger("change"),e&&e.trigger("change"))},_spellCorrect:function(e){var n,i=!1;this._registerHandler(e.body,{contextmenu:function(){e.one("select",function(){n=null}),e._spellCorrectTimeout=setTimeout(function(){n=new a.ui.editor.RestorePoint(e.getRange(),e.body),i=!1},10)},input:function(){if(n)return a.support.browser.mozilla&&!i?(i=!0,t):(a.ui.editor._finishUpdate(e,n),t)}})},_registerHandler:function(t,n,i){var r,o,s,l=this,d=".kendoEditor";if(t=e(t),this._handlers||(this._handlers=[]),t.length)if(e.isPlainObject(n))for(s in n)n.hasOwnProperty(s)&&this._registerHandler(t,s,n[s]);else for(r=a.applyEventMap(n).split(" "),o=0;o<r.length;o++)l._handlers.push({element:t,type:r[o]+d,handler:i}),t.on(r[o]+d,i)},_deregisterHandlers:function(){var e,t,n=this._handlers;for(e=0;e<n.length;e++)t=n[e],t.element.off(t.type,t.handler);this._handlers=[]},_initializeContentElement:function(){var n,i,r,o,s,l=this;l.textarea?(l.window=l._createContentElement(l.options.stylesheets),n=l.document=l.window.contentDocument||l.window.document,n.body||(o=n.createElement("body"),o.setAttribute("contenteditable","true"),o.setAttribute("autocorrect","off"),n.getElementsByTagName("html")[0].appendChild(o),s=setInterval(function(){e(l.document).find("body").length>1&&(e(l.document).find("body:last").remove(),window.clearInterval(s))},10)),l.body=n.body,i=l.window,r=n,this._registerHandler(n,"mouseup",p(this._mouseup,this))):(l.window=window,n=l.document=document,l.body=l.element[0],i=l.body,r=l.body,l.toolbar.decorateFrom(l.body)),this._registerHandler(i,"blur",p(this._blur,this)),l._registerHandler(r,"down",p(l._mousedown,l));try{n.execCommand("enableInlineTableEditing",null,!1)}catch(d){}a.support.touch&&this._registerHandler(n,{keydown:function(){a._activeElement()!=n.body&&l.window.focus()}}),this._initializePlaceholder(),this._spellCorrect(l),this._registerHandler(l.document,{"mouseover dragenter":function(t){var n=e(l.body).height(),i=e(l.body.parentElement).height();i>n&&"html"===t.target.nodeName.toLowerCase()&&(l._cachedHeight=""+l.body.style.height,l.body.style.height="100%")},"mouseout dragleave drop contextmenu":function(e){var n=function(){l._cachedHeight!==t&&e.target===l.body&&(l.body.style.height=l._cachedHeight,delete l._cachedHeight)};"contextmenu"===e.type?setTimeout(function(){n()},10):n()}}),this._registerHandler(l.body,{keydown:function(e){var n,i,r,o,a,s,d,c,u,f;return(e.keyCode!==h.BACKSPACE&&e.keyCode!==h.DELETE||"true"===l.body.getAttribute("contenteditable"))&&(e.keyCode===h.F10?(setTimeout(p(l.toolbar.focus,l.toolbar),100),l.toolbar.preventPopupHide=!0,e.preventDefault(),t):(e.keyCode!=h.LEFT&&e.keyCode!=h.RIGHT||(n=l.getRange(),i=e.keyCode==h.LEFT,r=n[i?"startContainer":"endContainer"],o=n[i?"startOffset":"endOffset"],a=i?-1:1,s=o+a,d=i?s:o,3==r.nodeType&&"\ufeff"==r.nodeValue[d]&&(n.setStart(r,s),n.collapse(!0),l.selectRange(n))),c=l.toolbar.tools,u=l.keyboard.toolFromShortcut(c,e),f=u?c[u].options:{},u&&!f.keyPressCommand?(e.preventDefault(),/^(undo|redo)$/.test(u)||l.keyboard.endTyping(!0),l.trigger("keydown",e),l.exec(u),l._runPostContentKeyCommands(e),!1):(l.keyboard.clearTimeout(),l.keyboard.keydown(e),t)))},keypress:function(e){setTimeout(function(){l._runPostContentKeyCommands(e),l._showTableResizeHandles()},0)},keyup:function(t){var n=[h.BACKSPACE,h.TAB,h.PAGEUP,h.PAGEDOWN,h.END,h.HOME,h.LEFT,h.UP,h.RIGHT,h.DOWN,h.INSERT,h.DELETE];(e.inArray(t.keyCode,n)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&(window.clearTimeout(this._refreshInterval),this._refreshInterval=window.setTimeout(function(){l._selectionChange()},b)),l.keyboard.keyup(t)},click:function(e){var t,n=a.ui.editor.Dom;"img"===n.name(e.target)&&(t=l.createRange(),t.selectNode(e.target),l.selectRange(t))},"cut copy paste drop dragover":function(e){l.clipboard["on"+e.type](e)},focusin:function(){l.body.hasAttribute("contenteditable")&&(e(this).addClass("k-state-active"),l.toolbar.show(),l._togglePlaceholder(!1))},focusout:function(){setTimeout(function(){var t,n=a._activeElement(),i=l.body,r=l.toolbar;r.options.popup&&(t=r.window.element.get(0),t&&!e.contains(t,n)&&t!=n&&(r.preventPopupHide=!1)),n==i||e.contains(i,n)||e(n).is(".k-editortoolbar-dragHandle")||r.focused()||(e(i).removeClass("k-state-active"),r.hide()),l._togglePlaceholder(!l.value().trim())},10)}}),l._initializeColumnResizing(),l._initializeRowResizing(),l._initializeTableResizing()},_initializePlaceholder:function(){var t,n,i=this,r=i.options.placeholder;i.textarea&&r&&(t="<style id='"+_+"'>."+v+":before { content: '"+r+"'; }</style>",n=e(i.document.head),n.find("#"+_).remove(),n.append(t),i._togglePlaceholder(!i.value().trim()))},_initializeImmutables:function(){
|
24
|
-
var e=this,t=a.ui.editor;e.options.immutables&&(e.immutables=new t.Immutables(e))},_mousedown:function(t){var n,i=this;i._selectionStarted=!0,e(i.body).parents(".k-window").length&&t.stopPropagation(),c.gecko||(n=e(t.target).closest("a[href]"),(2==t.which||1==t.which&&t.ctrlKey)&&n&&n.is("a[href]")&&window.open(n.attr("href"),"_new"),t.target.tagName&&"html"===t.target.tagName.toLowerCase()&&setTimeout(function(){i.body.focus()},0))},_mouseup:function(t){var n=this;a.support.mobileOS.ios&&t&&e(t.target).is(g)||n._selectionStarted&&setTimeout(function(){n._selectionChange()},1)},_runPostContentKeyCommands:function(e){var t,n,i,r,o=this.getRange(),a=this.keyboard.toolsFromShortcut(this.toolbar.tools,e);for(t=0;t<a.length;t++)n=a[t],i=n.options,i.keyPressCommand&&(r=new i.command({range:o}),r.changesContent()&&(this.keyboard.endTyping(!0),this.exec(n.name)))},refresh:function(){var e,t=this;t.textarea&&(t._destroyResizings(),e=t.value(),t.textarea.val(e),t.wrapper.find("iframe").remove(),t._initializeContentElement(t),t.value(e))},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:x,placeholder:"",formats:{},encoded:!0,domain:null,resizable:!1,deserialization:{custom:null},serialization:{entities:!0,semantic:!0,scripts:!1},pasteCleanup:{all:!1,css:!1,custom:null,keepNewLines:!1,msAllFormatting:!1,msConvertLists:!0,msTags:!0,none:!1,span:!1},stylesheets:[],dialogOptions:{modal:!0,resizable:!1,draggable:!0,animation:!1},imageBrowser:null,fileBrowser:null,fontName:[{text:"Arial",value:"Arial, Helvetica, sans-serif"},{text:"Courier New",value:'"Courier New", Courier, monospace'},{text:"Georgia",value:"Georgia, serif"},{text:"Impact",value:"Impact, Charcoal, sans-serif"},{text:"Lucida Console",value:'"Lucida Console", Monaco, monospace'},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif"},{text:"Times New Roman",value:'"Times New Roman", Times, serif'},{text:"Trebuchet MS",value:'"Trebuchet MS", Helvetica, sans-serif'},{text:"Verdana",value:"Verdana, Geneva, sans-serif"}],fontSize:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],formatBlock:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],tools:[].concat.call(["formatting"],T.basic,T.alignment,T.formatPainter,T.lists,T.indenting,T.links,["insertImage"],T.tables)},destroy:function(){var e=this;l.fn.destroy.call(this),this._endTyping(!0),this._deregisterHandlers(),clearTimeout(this._spellCorrectTimeout),this._focusOutside(),this.toolbar.destroy(),e._destroyUploadWidget(),e._destroyResizings(),a.destroy(this.wrapper)},_destroyResizings:function(){var e=this;e._destroyTableResizing(),a.ui.editor.TableResizing.dispose(e),e._destroyRowResizing(),a.ui.editor.RowResizing.dispose(e),e._destroyColumnResizing(),a.ui.editor.ColumnResizing.dispose(e)},_focusOutside:function(){if(a.support.browser.msie&&this.textarea){var t=e("<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />").appendTo(document.body).focus();t.blur().remove()}},_destroyUploadWidget:function(){var e=this;e._uploadWidget&&(e._uploadWidget.destroy(),e._uploadWidget=null)},state:function(e){var t,n,i=S.defaultTools[e],r=i&&(i.options.finder||i.finder),o=a.ui.editor.RangeUtils;return!!r&&(t=this.getRange(),n=o.textNodes(t),!n.length&&t.collapsed&&(n=[t.startContainer]),r.getFormat?r.getFormat(n):r.isFormatted(n))},value:function(e){var n=this.body,i=a.ui.editor,r=this.options,o=i.Serializer.domToXhtml(n,r.serialization);return e===t?o:(e!=o&&(i.Serializer.htmlToDom(e,n,r.deserialization),this.selectionRestorePoint=null,this.update(),this.toolbar.refreshTools()),t)},saveSelection:function(t){t=t||this.getRange();var n=t.commonAncestorContainer,i=this.body;(n==i||e.contains(i,n))&&(this.selectionRestorePoint=new a.ui.editor.RestorePoint(t,i))},_focusBody:function(){var e,t=this.body,n=this.wrapper&&this.wrapper.find("iframe")[0],i=this.document.documentElement,r=a._activeElement();!n&&t.scrollHeight>t.clientHeight?(e=t.scrollTop,t.focus(),t.scrollTop=e):r!=t&&r!=n&&(e=i.scrollTop,t.focus(),i.scrollTop=e)},restoreSelection:function(){this._focusBody(),this.selectionRestorePoint&&this.selectRange(this.selectionRestorePoint.toRange())},focus:function(){this.restoreSelection()},update:function(e){e=e||this.options.encoded?this.encodedValue():this.value(),this.textarea?(this.textarea.val(e),this._togglePlaceholder(!e.trim())):this._oldValue=e},encodedValue:function(){return a.ui.editor.Dom.encode(this.value())},createRange:function(e){return a.ui.editor.RangeUtils.createRange(e||this.document)},getSelection:function(){return a.ui.editor.SelectionUtils.selectionFromDocument(this.document)},selectRange:function(e){this._focusBody();var t=this.getSelection();t.removeAllRanges(),t.addRange(e),this.saveSelection(e)},getRange:function(){var e=this.getSelection(),t=e&&e.rangeCount>0?e.getRangeAt(0):this.createRange(),n=this.document;return t.startContainer!=n||t.endContainer!=n||t.startOffset||t.endOffset||(t.setStart(this.body,0),t.collapse(!0)),t},_containsRange:function(e){var t=a.ui.editor.Dom,n=this.body;return e&&t.isAncestorOrSelf(n,e.startContainer)&&t.isAncestorOrSelf(n,e.endContainer)},_deleteSavedRange:function(){"_range"in this&&delete this._range},selectedHtml:function(){return a.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(t,n){this.focus();var i=new a.ui.editor.InsertHtmlCommand(e.extend({range:this.getRange(),html:t},n));i.editor=this,i.exec()},exec:function(e,n){var i,r,o,a,s=this,l=null;if(!e)throw Error("kendoEditor.exec(): `name` parameter cannot be empty");if("true"!==s.body.getAttribute("contenteditable")&&"print"!==e&&"pdf"!==e&&"exportAs"!==e)return!1;if(e=e.toLowerCase(),s.keyboard.isTypingInProgress()||(s._focusBody(),s.selectRange(s._range||s.getRange())),r=s.toolbar.toolById(e),!r)for(a in S.defaultTools)if(a.toLowerCase()==e){r=S.defaultTools[a];break}if(r){if(i=s.getRange(),r.command&&(l=r.command(u({range:i,body:s.body,immutables:!!s.immutables},n))),o=s.trigger("execute",{name:e,command:l}))return;if(/^(undo|redo)$/i.test(e))s.undoRedoStack[e]();else if(l&&(s.execCommand(l),l.async))return l.change=p(s._selectionChange,s),t;s._selectionChange()}},execCommand:function(e){e.managesUndoRedo||this.undoRedoStack.push(e),e.editor=this,e.exec()}});S.defaultTools={undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},a.ui.plugin(S),n=s.extend({init:function(e){this.options=e},initialize:function(e,t){e.attr({unselectable:"on",title:t.title,"aria-label":t.title})},command:function(e){return new this.options.command(e)},update:e.noop}),n.exec=function(e,t,n){e.exec(t,{value:n})},w.registerTool("separator",new n({template:new y({template:w.separatorTemplate})})),i=c.msie&&c.version<9?"\ufeff":"",r="\ufeff",o=r,(c.msie||c.edge)&&(o=r=" "),u(a.ui,{editor:{ToolTemplate:y,EditorUtils:w,Tool:n,_bomFill:i,emptyElementContent:r,emptyTableCellContent:o}}),a.PDFMixin&&(a.PDFMixin.extend(S.prototype),S.prototype._drawPDF=function(){return a.drawing.drawDOM(this.body,this.options.pdf)},S.prototype.saveAsPDF=function(){var t,n=new e.Deferred,i=n.promise(),r={promise:i};if(!this.trigger("pdfExport",r))return t=this.options.pdf,this._drawPDF(n).then(function(e){return a.drawing.exportPDF(e,t)}).done(function(e){a.saveAs({dataURI:e,fileName:t.fileName,proxyURL:t.proxyURL,proxyTarget:t.proxyTarget,forceProxy:t.forceProxy}),n.resolve()}).fail(function(e){n.reject(e)}),i})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/dom.min",["editor/main.min"],e)}(function(){!function(e){function t(e){var t,n,i={};for(t=0,n=e.length;t<n;t++)i[e[t]]=!0;return i}var n,i,r,o,a,s,l,d,c,u,p,f=window.kendo,h=e.map,m=e.extend,g=f.support.browser,v="style",_="float",b="cssFloat",k="styleFloat",y="class",w="k-marker",x=t("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),C="p,div,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,map,menu,noframes,noscript,object,pre,script,table,tbody,td,tfoot,th,thead,tr,header,article,nav,footer,section,aside,main,figure,figcaption".split(","),T=C.concat(["ul","ol","li"]),S=t(T),I=t("area,base,br,col,command,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr".split(",")),D="span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var,data,time,mark,ruby".split(","),F=t(D),E=t("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),A=function(e){1==e.nodeType&&e.normalize()};g.msie&&g.version>=8&&(A=function(e){if(1==e.nodeType&&e.firstChild){var t=e.firstChild,n=t;for(A(n);;){if(n=n.nextSibling,!n)break;A(n),3==n.nodeType&&3==t.nodeType&&(n.nodeValue=t.nodeValue+n.nodeValue,p.remove(t)),t=n}}}),n=/^\s+$/,i=/^[\n\r\t]+$/,r=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,o=/\ufeff/g,a=/^(\s+|\ufeff)$/,l="color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(","),d=/[<>\&]/g,c=/[\u00A0-\u2666<>\&]/g,u={34:"quot",38:"amp",39:"apos",60:"lt",62:"gt",160:"nbsp",161:"iexcl",162:"cent",163:"pound",164:"curren",165:"yen",166:"brvbar",167:"sect",168:"uml",169:"copy",170:"ordf",171:"laquo",172:"not",173:"shy",174:"reg",175:"macr",176:"deg",177:"plusmn",178:"sup2",179:"sup3",180:"acute",181:"micro",182:"para",183:"middot",184:"cedil",185:"sup1",186:"ordm",187:"raquo",188:"frac14",189:"frac12",190:"frac34",191:"iquest",192:"Agrave",193:"Aacute",194:"Acirc",195:"Atilde",196:"Auml",197:"Aring",198:"AElig",199:"Ccedil",200:"Egrave",201:"Eacute",202:"Ecirc",203:"Euml",204:"Igrave",205:"Iacute",206:"Icirc",207:"Iuml",208:"ETH",209:"Ntilde",210:"Ograve",211:"Oacute",212:"Ocirc",213:"Otilde",214:"Ouml",215:"times",216:"Oslash",217:"Ugrave",218:"Uacute",219:"Ucirc",220:"Uuml",221:"Yacute",222:"THORN",223:"szlig",224:"agrave",225:"aacute",226:"acirc",227:"atilde",228:"auml",229:"aring",230:"aelig",231:"ccedil",232:"egrave",233:"eacute",234:"ecirc",235:"euml",236:"igrave",237:"iacute",238:"icirc",239:"iuml",240:"eth",241:"ntilde",242:"ograve",243:"oacute",244:"ocirc",245:"otilde",246:"ouml",247:"divide",248:"oslash",249:"ugrave",250:"uacute",251:"ucirc",252:"uuml",253:"yacute",254:"thorn",255:"yuml",402:"fnof",913:"Alpha",914:"Beta",915:"Gamma",916:"Delta",917:"Epsilon",918:"Zeta",919:"Eta",920:"Theta",921:"Iota",922:"Kappa",923:"Lambda",924:"Mu",925:"Nu",926:"Xi",927:"Omicron",928:"Pi",929:"Rho",931:"Sigma",932:"Tau",933:"Upsilon",934:"Phi",935:"Chi",936:"Psi",937:"Omega",945:"alpha",946:"beta",947:"gamma",948:"delta",949:"epsilon",950:"zeta",951:"eta",952:"theta",953:"iota",954:"kappa",955:"lambda",956:"mu",957:"nu",958:"xi",959:"omicron",960:"pi",961:"rho",962:"sigmaf",963:"sigma",964:"tau",965:"upsilon",966:"phi",967:"chi",968:"psi",969:"omega",977:"thetasym",978:"upsih",982:"piv",8226:"bull",8230:"hellip",8242:"prime",8243:"Prime",8254:"oline",8260:"frasl",8472:"weierp",8465:"image",8476:"real",8482:"trade",8501:"alefsym",8592:"larr",8593:"uarr",8594:"rarr",8595:"darr",8596:"harr",8629:"crarr",8656:"lArr",8657:"uArr",8658:"rArr",8659:"dArr",8660:"hArr",8704:"forall",8706:"part",8707:"exist",8709:"empty",8711:"nabla",8712:"isin",8713:"notin",8715:"ni",8719:"prod",8721:"sum",8722:"minus",8727:"lowast",8730:"radic",8733:"prop",8734:"infin",8736:"ang",8743:"and",8744:"or",8745:"cap",8746:"cup",8747:"int",8756:"there4",8764:"sim",8773:"cong",8776:"asymp",8800:"ne",8801:"equiv",8804:"le",8805:"ge",8834:"sub",8835:"sup",8836:"nsub",8838:"sube",8839:"supe",8853:"oplus",8855:"otimes",8869:"perp",8901:"sdot",8968:"lceil",8969:"rceil",8970:"lfloor",8971:"rfloor",9001:"lang",9002:"rang",9674:"loz",9824:"spades",9827:"clubs",9829:"hearts",9830:"diams",338:"OElig",339:"oelig",352:"Scaron",353:"scaron",376:"Yuml",710:"circ",732:"tilde",8194:"ensp",8195:"emsp",8201:"thinsp",8204:"zwnj",8205:"zwj",8206:"lrm",8207:"rlm",8211:"ndash",8212:"mdash",8216:"lsquo",8217:"rsquo",8218:"sbquo",8220:"ldquo",8221:"rdquo",8222:"bdquo",8224:"dagger",8225:"Dagger",8240:"permil",8249:"lsaquo",8250:"rsaquo",8364:"euro"},p={block:S,inline:F,findNodeIndex:function(e,t){var n=0;if(!e)return-1;for(;;){if(e=e.previousSibling,!e)break;t&&3==e.nodeType||n++}return n},isDataNode:function(e){return e&&null!==e.nodeValue&&null!==e.data},isAncestorOf:function(t,n){try{return!p.isDataNode(t)&&(e.contains(t,p.isDataNode(n)?n.parentNode:n)||n.parentNode==t)}catch(i){return!1}},isAncestorOrSelf:function(e,t){return p.isAncestorOf(e,t)||e==t},findClosestAncestor:function(e,t){if(p.isAncestorOf(e,t))for(;t&&t.parentNode!=e;)t=t.parentNode;return t},getAllComments:function(e){for(var t=[],n=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,function(){return NodeFilter.FILTER_ACCEPT},!1),i=n.nextNode();i;)t.push(i.nodeValue),i=n.nextNode();return t},getNodeLength:function(e){return p.isDataNode(e)?e.length:e.childNodes.length},splitDataNode:function(e,t){for(var n,i=e.cloneNode(!1),r="",o=e.nextSibling;o&&3==o.nodeType&&o.nodeValue;)r+=o.nodeValue,n=o,o=o.nextSibling,p.remove(n);e.deleteData(t,e.length),i.deleteData(0,t),i.nodeValue+=r,p.insertAfter(i,e)},attrEquals:function(e,t){var n,i;for(n in t)if(i=e[n],n==_&&(i=e[f.support.cssFloat?b:k]),"object"==typeof i){if(!p.attrEquals(i,t[n]))return!1}else if(i!=t[n])return!1;return!0},blockParentOrBody:function(e){return p.parentOfType(e,T)||e.ownerDocument.body},blockParents:function(t){var n,i,r,o=[];for(n=0,i=t.length;n<i;n++)r=p.parentOfType(t[n],p.blockElements),r&&e.inArray(r,o)<0&&o.push(r);return o},windowFromDocument:function(e){return e.defaultView||e.parentWindow},normalize:A,blockElements:T,nonListBlockElements:C,inlineElements:D,empty:x,fillAttrs:E,nodeTypes:{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},toHex:function(e){var t=r.exec(e);return t?"#"+h(t.slice(1),function(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}).join(""):e},encode:function(e,t){var n=!t||t.entities?c:d;return e.replace(n,function(e){var t=e.charCodeAt(0),n=u[t];return n?"&"+n+";":e})},isBom:function(e){return e&&3===e.nodeType&&/^[\ufeff]+$/.test(e.nodeValue)},stripBom:function(e){return(e||"").replace(o,"")},stripBomNode:function(e){p.isBom(e)&&e.parentNode.removeChild(e)},insignificant:function(e){var t=e.attributes;return"k-marker"==e.className||p.is(e,"br")&&("k-br"==e.className||t._moz_dirty||t._moz_editor_bogus_node)||p.is(e,"span")&&"k-br"==e.className},tableCell:function(e){return p.is(e,"td")||p.is(e,"th")},significantNodes:function(t){return e.grep(t,function(e){var t=p.name(e);return"br"!=t&&(!p.insignificant(e)&&(!p.emptyTextNode(e)&&!(1==e.nodeType&&!x[t]&&p.emptyNode(e))))})},emptyTextNode:function(e){return e&&3==e.nodeType&&a.test(e.nodeValue)},emptyNode:function(e){return 1==e.nodeType&&!p.significantNodes(e.childNodes).length},name:function(e){return e.nodeName.toLowerCase()},significantChildNodes:function(t){return e.grep(t.childNodes,function(e){return 3!=e.nodeType||!p.isWhitespace(e)})},lastTextNode:function(e){var t,n=null;if(3==e.nodeType)return e;for(t=e.lastChild;t;t=t.previousSibling)if(n=p.lastTextNode(t))return n;return n},is:function(e,t){return e&&p.name(e)==t},isMarker:function(e){return e.className==w},isWhitespace:function(e){return n.test(e.nodeValue)},allWhitespaceContent:function(e){for(var t=e.firstChild;t&&p.isWhitespace(t);)t=t.nextSibling;return!t},isEmptyspace:function(e){return i.test(e.nodeValue)},htmlIndentSpace:function(t){var n,r,a,s,l,d;return!(!p.isDataNode(t)||!p.isWhitespace(t))&&(!!i.test(t.nodeValue)||(n=function(e,t){for(;e[t];)if(e=e[t],p.significantNodes([e]).length>0)return e},r=t.parentNode,a=n(t,"previousSibling"),s=n(t,"nextSibling"),o.test(t.nodeValue)?!(!a&&!s):!!e(r).is("tr,tbody,thead,tfoot,table,ol,ul")||!!((p.isBlock(r)||p.is(r,"body"))&&(l=a&&p.isBlock(a),d=s&&p.isBlock(s),!s&&l||!a&&d||l&&d))))},isBlock:function(e){return S[p.name(e)]},isSelfClosing:function(e){return I[p.name(e)]},isEmpty:function(e){return x[p.name(e)]},isInline:function(e){return F[p.name(e)]},isBr:function(e){return"br"==p.name(e)},list:function(e){var t=e?p.name(e):"";return"ul"==t||"ol"==t||"dl"==t},scrollContainer:function(e){var t=p.windowFromDocument(e),n=(t.contentWindow||t).document||t.ownerDocument||t;return n="BackCompat"==n.compatMode?n.body:n.scrollingElement||n.documentElement},scrollTo:function(t,n){var i,r,o,a,s=t.ownerDocument,l=p.windowFromDocument(s),d=l.innerHeight,c=p.scrollContainer(s);p.isDataNode(t)?n?(a=p.create(s,"span",{innerHTML:""}),p.insertBefore(a,t),i=e(a)):i=e(t.parentNode):i=e(t),r=i.offset().top,o=i[0].offsetHeight,!n&&o||(o=parseInt(i.css("line-height"),10)||Math.ceil(1.2*parseInt(i.css("font-size"),10))||15),a&&p.remove(a),o+r>c.scrollTop+d&&(c.scrollTop=o+r-d)},persistScrollTop:function(e){s=p.scrollContainer(e).scrollTop},offset:function(e,t){for(var n={top:e.offsetTop,left:e.offsetLeft},i=e.offsetParent;i&&(!t||p.isAncestorOf(t,i));)n.top+=i.offsetTop,n.left+=i.offsetLeft,i=i.offsetParent;return n},restoreScrollTop:function(e){"number"==typeof s&&(p.scrollContainer(e).scrollTop=s,s=void 0)},insertAt:function(e,t,n){e.insertBefore(t,e.childNodes[n]||null)},insertBefore:function(e,t){return t.parentNode?t.parentNode.insertBefore(e,t):t},insertAfter:function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},remove:function(e){e.parentNode&&e.parentNode.removeChild(e)},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},removeTextSiblings:function(e){for(var t=e.parentNode;e.nextSibling&&3==e.nextSibling.nodeType;)t.removeChild(e.nextSibling);for(;e.previousSibling&&3==e.previousSibling.nodeType;)t.removeChild(e.previousSibling)},trim:function(e){var t,n;for(t=e.childNodes.length-1;t>=0;t--)n=e.childNodes[t],p.isDataNode(n)?p.stripBom(n.nodeValue).length||p.remove(n):n.className!=w&&(p.trim(n),(!p.isEmpty(n)&&0===n.childNodes.length||p.isBlock(n)&&p.allWhitespaceContent(n))&&p.remove(n));return e},closest:function(e,t){for("string"==typeof t&&(t=[t]);e&&t.indexOf(p.name(e))<0;)e=e.parentNode;return e},closestBy:function(e,t,n){for(;e&&!t(e);){if(n&&n(e))return null;e=e.parentNode}return e},sibling:function(e,t){do e=e[t];while(e&&1!=e.nodeType);return e},next:function(e){return p.sibling(e,"nextSibling")},prev:function(e){return p.sibling(e,"previousSibling")},parentOfType:function(e,t){do e=e.parentNode;while(e&&!p.ofType(e,t));return e},ofType:function(t,n){return e.inArray(p.name(t),n)>=0},changeTag:function(e,t,n){var i,r,o,a,s,l=p.create(e.ownerDocument,t),d=e.attributes;if(!n)for(i=0,r=d.length;i<r;i++)s=d[i],s.specified&&(o=s.nodeName,a=s.nodeValue,o==y?l.className=a:o==v?l.style.cssText=e.style.cssText:l.setAttribute(o,a));for(;e.firstChild;)l.appendChild(e.firstChild);return p.insertBefore(l,e),p.remove(e),l},editableParent:function(e){for(;e&&(3==e.nodeType||"true"!==e.contentEditable);)e=e.parentNode;return e},wrap:function(e,t){return p.insertBefore(t,e),t.appendChild(e),t},unwrap:function(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)},wrapper:function(t){var n=p.closestBy(t,function(e){return e.parentNode&&p.significantNodes(e.parentNode.childNodes).length>1});return e(n).is("body,.k-editor")?void 0:n},create:function(e,t,n){return p.attr(e.createElement(t),n)},createEmptyNode:function(e,t,n){var i=p.attr(e.createElement(t),n);return i.innerHTML="\ufeff",i},attr:function(e,t){t=m({},t),t&&v in t&&(p.style(e,t.style),delete t.style);for(var n in t)null===t[n]?(e.removeAttribute(n),delete t[n]):"className"==n&&(e[n]=t[n]);return m(e,t)},mergeAttributes:function(t,n){t.attributes.length&&e.each(t.attributes,function(){"contenteditable"!==this.name&&e(n).attr(this.name,this.value)})},style:function(t,n){e(t).css(n||{})},unstyle:function(e,t){for(var n in t)n==_&&(n=f.support.cssFloat?b:k),e.style[n]="";""===e.style.cssText&&e.removeAttribute(v)},inlineStyle:function(t,n,i){var r,o=e(p.create(t.ownerDocument,n,i));return t.appendChild(o[0]),r=h(l,function(e){return g.msie&&"line-height"==e&&"1px"==o.css(e)?"line-height:1.5":e+":"+o.css(e)}).join(";"),o.remove(),r},getEffectiveBackground:function(e){var t=e.css("background-color")||"";return t.indexOf("rgba(0, 0, 0, 0")<0&&"transparent"!==t?t:"html"===e[0].tagName.toLowerCase()?"Window":p.getEffectiveBackground(e.parent())},innerText:function(e){var t=e.innerHTML;return t=t.replace(/<!--(.|\s)*?-->/gi,""),t=t.replace(/<\/?[^>]+?\/?>/gm,"")},removeClass:function(e,t){var n,i,r=" "+e.className+" ",o=t.split(" ");for(n=0,i=o.length;n<i;n++)r=r.replace(" "+o[n]+" "," ");r=f.trim(r),r.length?e.className=r:e.removeAttribute(y)},commonAncestor:function(){var e,t,n,i,r,o=arguments.length,a=[],s=1/0,l=null;if(!o)return null;if(1==o)return arguments[0];for(e=0;e<o;e++){for(t=[],n=arguments[e];n;)t.push(n),n=n.parentNode;a.push(t.reverse()),s=Math.min(s,t.length)}if(1==o)return a[0][0];for(e=0;e<s;e++){for(i=a[0][e],r=1;r<o;r++)if(i!=a[r][e])return l;l=i}return l},closestSplittableParent:function(t){var n,i,r;return n=1==t.length?p.parentOfType(t[0],["ul","ol"]):p.commonAncestor.apply(null,t),n||(n=p.parentOfType(t[0],["p","td"])||t[0].ownerDocument.body),p.isInline(n)&&(n=p.blockParentOrBody(n)),i=h(t,p.editableParent),r=p.commonAncestor(i)[0],e.contains(n,r)&&(n=r),n},closestEditable:function(t,n){var i,r=p.editableParent(t);return i=p.ofType(t,n)?t:p.parentOfType(t,n),i&&r&&e.contains(i,r)?i=r:!i&&r&&(i=r),i},closestEditableOfType:function(t,n){var i=p.closestEditable(t,n);if(i&&p.ofType(i,n)&&!e(i).is(".k-editor"))return i},filter:function(e,t,n){var i=function(t){return p.name(t)==e};return p.filterBy(t,i,n)},filterBy:function(e,t,n){for(var i,r=0,o=e.length,a=[];r<o;r++)i=t(e[r]),(i&&!n||!i&&n)&&a.push(e[r]);return a},ensureTrailingBreaks:function(t){var n=e(t).find("p,td,th"),i=n.length,r=0;if(i)for(;r<i;r++)p.ensureTrailingBreak(n[r]);else p.ensureTrailingBreak(t)},removeTrailingBreak:function(t){e(t).find("br[type=_moz],.k-br").remove()},ensureTrailingBreak:function(e){var t,n,i;p.removeTrailingBreak(e),t=e.lastChild,n=t&&p.name(t),(!n||"br"!=n&&"img"!=n||"br"==n&&"k-br"!=t.className)&&(i=e.ownerDocument.createElement("br"),i.className="k-br",e.appendChild(i))},reMapTableColumns:function(e,t){p._mapColIndices(e,t)},clearTableMappings:function(t,n){e(t).find("["+n+"]").removeAttr(n)},_mapColIndices:function(e,t){var n,i,r,o,a,s={};for(n=0;n<e.rows.length;n++)for(i=e.rows[n].cells,r=0,o=0;o<i.length;o++,r++){if(a=i[o],a.rowSpan>1&&this._mapColspan(a,n,r,s),s[n])for(;s[n][r];)r++;a.setAttribute(t,r),a.colSpan>1&&(r=r+a.colSpan-1)}},_mapColspan:function(e,t,n,i){var r,o,a,s=e.rowSpan,l=e.colSpan;for(o=0;o<l;o++)for(r=n+o,a=t+1;a<t+s;a++){if(i[a]||(i[a]={},i[a].length=0),i[t])for(;i[t][r];)r++;i[a][r]=!0,i[a].length++}},associateWithIds:function(e){var t,n,i=this,r=0,o=e.rows,a=o.length,s=[],l=[];if(e.tHead)t=e.tHead.rows,r=t.length;else for(r=i._getNumberOfHeaderRows(e),t=[],n=0;n<r;n++)t.push(o[n]);for(n=0;n<r;n++)s.push([]);for(n=0;n<a;n++)l.push([]);i._generateIdsForColumns(s,t),i._generateIdsForRows(s,l,r,o),i._assignIds(s,l,r,o)},_generateIdsForColumns:function(e,t){var n,i,r,o,a,s,l,d,c,u,p,f=(new Date).getTime(),h=t?t.length:0;for(d=0;d<h;d++)for(n=t[d],i=n.cells,o=0,c=0;c<i.length;c++){for(r=i[c],a="table"+d+c+ ++f,r.setAttribute("id",a),s=r.getAttribute("colspan")||1,l=r.getAttribute("rowspan")||1;e[d][c+o];)o+=1;for(u=0;u<l;u++)for(p=0;p<s;p++)e[d+u][c+o+p]=a}},_generateIdsForRows:function(t,n,i,r){var o,a,s,l,d,c,u,p,f,h,m,g,v,_=this,b=(new Date).getTime(),k=r.length,y=function(e){v.push(e[g])};for(p=i;p<k;p++)for(o=r[p],a=e(o.cells).filter("th"),l=0,f=0;f<a.length;f++){for(s=a[f],d="table"+p+f+ ++b,s.setAttribute("id",d),c=s.getAttribute("colspan")||1,u=s.getAttribute("rowspan")||1;n[p][f+l];)l+=1;for(h=0;h<u;h++)for(m=0;m<c;m++)n[p+h][f+l+m]=d;g=s.getAttribute("col-index"),v=[],t.forEach(y),v=v.filter(_._onlyUnique),s.setAttribute("headers",v.join(" ").trim())}},_assignIds:function(t,n,i,r){var o,a,s,l,d,c,u,p=this,f=r.length,h=function(e){u.push(e[c])};for(l=i;l<f;l++)for(o=r[l],a=e(o.cells).filter("td"),d=0;d<a.length;d++)s=a[d],c=s.getAttribute("col-index"),u=n[l].slice(),t.forEach(h),u=u.filter(p._onlyUnique),s.setAttribute("headers",u.join(" ").trim())},_getNumberOfColumns:function(t){var n,i,r,o=e(t).find("th, td"),a=0;for(i=0;i<o.length;i++)n=o[i],r=+n.getAttribute("col-index")+1,r>a&&(a=r);return a},_getNumberOfHeaderColumns:function(e,t){var n,i,r,o,a,s=e.rows,l=0;for(r=t;r<s.length;r++)for(i=s[r],o=0;o<i.cells.length;o++)a=i.cells[o],this.is(a,"th")&&(n=+a.getAttribute("col-index")+1,n>l&&(l=n));return l},_getNumberOfHeaderRows:function(e){var t,n,i,r,o=e.rows,a=e.tHead,s=a&&e.tHead.rows?e.tHead.rows.length:0;if(0===s)for(n=o[0],r=n.cells&&n.cells.length;n&&r&&this.is(n.cells[0],"th");){for(t=0;t<r;t++)i=n?n.cells[t]:null,this.is(i,"th")||(n=null);n&&(s+=1,n=this.next(n),r=n&&n.cells&&n.cells.length)}return s},_onlyUnique:function(e,t,n){return n.indexOf(e)===t}},f.ui.editor.Dom=p}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/serializer.min",["editor/dom.min"],e)}(function(){!function(e,t){var n,i,r,o,a=window.kendo,s=a.ui.editor,l=s.Dom,d=e.extend,c="xx-small,x-small,small,medium,large,x-large,xx-large".split(","),u=/"/g,p=/<br[^>]*>/i,f=/^\d+(\.\d*)?(px)?$/i,h=/<p>(?: )?<\/p>/i,m=/(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,g=/^sizzle-\d+/i,v=/^k-script-/i,_=/\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,b='<br class="k-br">',k="<span class='k-br'>\ufeff</span>",y=document.createElement("div");y.innerHTML=" <hr>",n=3===y.firstChild.nodeType,y=null,i=e.isFunction,r="td",o={toEditableHtml:function(e){return(e||"").replace(/<!\[CDATA\[(.*)?\]\]>/g,"<!--[CDATA[$1]]-->").replace(/<(\/?)script([^>]*)>/gi,"<$1k:script$2>").replace(/<img([^>]*)>/gi,function(e){return e.replace(_,"")}).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi,"$1").replace(/^<(table|blockquote)/i,b+"<$1").replace(/^[\s]*( |\u00a0)/i,"$1").replace(/<\/(table|blockquote)>$/i,"</$1>"+b)},_toEditableImmutables:function(t){for(var n=s.Immutables.immutable,i=l.emptyTextNode,r=t.firstChild,o=t.lastChild;i(r);)r=r.nextSibling;for(;i(o);)o=o.previousSibling;r&&n(r)&&e(k).prependTo(t),o&&n(o)&&e(k).appendTo(t)},_fillEmptyElements:function(t){e(t).find("p,td").each(function(){var t,n=e(this);if(/^\s*$/g.test(n.text())&&!n.find("img,input").length){for(t=this;t.firstChild&&3!=t.firstChild.nodeType;)t=t.firstChild;1!=t.nodeType||l.empty[l.name(t)]||(t.innerHTML=l.is(t,"td")?a.ui.editor.emptyTableCellContent:a.ui.editor.emptyElementContent)}})},_removeSystemElements:function(t){e(".k-paste-container",t).remove()},_resetOrderedLists:function(e){var t,n,i,r=e.getElementsByTagName("ol");for(t=0;t<r.length;t++)n=r[t],i=n.getAttribute("start"),n.setAttribute("start",1),i?n.setAttribute("start",i):n.removeAttribute(i)},_preventScriptExecution:function(t){e(t).find("*").each(function(){var e,t,n,i,r=this.attributes,o=[];for(t=0,n=r.length;t<n;t++)e=r[t],i=e.nodeName,e.specified&&/^on/i.test(i)&&(this.setAttribute("k-script-"+i,e.value),o.push(i));for(t=0,n=o.length;t<n;t++)this.removeAttribute(o[t])})},htmlToDom:function(t,n,r){var s=a.support.browser,d=s.msie,c=d&&s.version<9,u="originalsrc",p="originalhref",f=r||{},h=f.immutables;return t=o.toEditableHtml(t),c&&(t="<br/>"+t,t=t.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,p+'="$1"'),t=t.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,u+'="$1"')),i(f.custom)&&(t=f.custom(t)||t),n.innerHTML=t,h&&h.deserialize(n),c?(l.remove(n.firstChild),e(n).find("k\\:script,script,link,img,a").each(function(){var e=this;e[p]&&(e.setAttribute("href",e[p]),e.removeAttribute(p)),e[u]&&(e.setAttribute("src",e[u]),e.removeAttribute(u))})):d&&(l.normalize(n),o._resetOrderedLists(n)),o._preventScriptExecution(n),o._fillEmptyElements(n),o._removeSystemElements(n),o._toEditableImmutables(n),e("table",n).addClass("k-table"),n},domToXhtml:function(i,o){function d(t){return e.grep(t,function(e){return"style"!=e.name})}function _(e,t){F.push("<"+t),w(e),F.push(">")}function b(e){var t,n,i,r=a.trim,o=r(e),s=[];for(m.lastIndex=0;;){if(t=m.exec(o),!t)break;n=r(t[1].toLowerCase()),i=r(t[2]),"font-size-adjust"!=n&&"font-stretch"!=n&&(n.indexOf("color")>=0?i=l.toHex(i):n.indexOf("font")>=0?i=i.replace(u,"'"):/\burl\(/g.test(i)&&(i=i.replace(u,"")),s.push({property:n,value:i}))}return s}function k(e){var t,n=b(e);for(t=0;t<n.length;t++)F.push(n[t].property),F.push(":"),F.push(n[t].value),F.push(";")}function y(e){var t,n,i,r,a,s,d=[],c=e.attributes;for(n=0,i=c.length;n<i;n++)t=c[n],r=t.nodeName,a=t.value,s=t.specified,"value"==r&&"value"in e&&e.value?s=!0:"type"==r&&"text"==a?s=!0:"class"!=r||a?g.test(r)?s=!1:"complete"==r?s=!1:"altHtml"==r?s=!1:"start"==r&&l.is(e,"ul")?s=!1:"start"==r&&l.is(e,"ol")&&"1"==a?s=!1:r.indexOf("_moz")>=0?s=!1:v.test(r)?s=!!o.scripts:"data-role"==r&&"resizable"==a&&(l.is(e,"tr")||l.is(e,"td"))&&(s=!1):s=!1,s&&d.push(t);return d}function w(n,i){var r,o,s,d,c,u,p,h;if(i=i||y(n),l.is(n,"img")&&(u=n.style.width,p=n.style.height,h=e(n),u&&f.test(u)&&(h.attr("width",parseInt(u,10)),l.unstyle(n,{width:t})),p&&f.test(p)&&(h.attr("height",parseInt(p,10)),l.unstyle(n,{height:t}))),i.length)for(r=0,o=i.length;r<o;r++)s=i[r],d=s.nodeName,c=s.value,"class"==d&&"k-table"==c||(d=d.replace(v,""),F.push(" "),F.push(d),F.push('="'),"style"==d?k(c||n.style.cssText):F.push("src"==d||"href"==d?a.htmlEncode(n.getAttribute(d,2)):l.fillAttrs[d]?d:c),F.push('"'))}function x(e,t,n){for(var i=e.firstChild;i;i=i.nextSibling)S(i,t,n)}function C(e){return e.nodeValue.replace(/\ufeff/g,"")}function T(e){if(l.isBom(e)){do{if(e=e.parentNode,l.is(e,r)&&1===e.childNodes.length)return!0;if(1!==e.childNodes.length)return!1}while(!l.isBlock(e));return!0}return!1}function S(i,r,a){var d,c,u,p,f,h,m=i.nodeType;if(E&&s.Immutables.immutable(i))F.push(E.serialize(i));else if(1==m){if(d=l.name(i),h=e(i),h.hasClass("k-table-resize-handle-wrapper")||h.hasClass("k-column-resize-handle-wrapper")||h.hasClass("k-row-resize-handle-wrapper"))return;if(!d||l.insignificant(i))return;if(!o.scripts&&("script"==d||"k:script"==d))return;if(c=A[d],c&&(t===c.semantic||o.semantic^c.semantic))return c.start(i),x(i,!1,c.skipEncoding),c.end(i),t;F.push("<"),F.push(d),w(i),l.empty[d]?F.push(" />"):(F.push(">"),x(i,r||l.is(i,"pre")),F.push("</"),F.push(d),F.push(">"))}else if(3==m){if(T(i))return F.push(" "),t;p=C(i),!r&&n&&(u=i.parentNode,f=i.previousSibling,f||(f=(l.isInline(u)?u:i).previousSibling),f&&""!==f.innerHTML&&!l.isBlock(f)||(p=p.replace(/^[\r\n\v\f\t ]+/,"")),p=p.replace(/ +/," ")),F.push(a?p:l.encode(p,o))}else 4==m?(F.push("<![CDATA["),F.push(i.data),F.push("]]>")):8==m&&(i.data.indexOf("[CDATA[")<0?(F.push("<!--"),F.push(i.data),F.push("-->")):(F.push("<!"),F.push(i.data),F.push(">")))}function I(e){var t=e.childNodes.length,n=t&&3==e.firstChild.nodeType;
|
25
|
-
return n&&(1==t||2==t&&l.insignificant(e.lastChild))}function D(){e.isFunction(o.custom)&&(F=o.custom(F)||F)}var F=[],E=o&&o.immutables,A={iframe:{start:function(e){_(e,"iframe")},end:function(){F.push("</iframe>")}},"k:script":{start:function(e){_(e,"script")},end:function(){F.push("</script>")},skipEncoding:!0},span:{semantic:!0,start:function(t){var n,i,r=t.style,o=y(t),a=d(o);a.length&&(F.push("<span"),w(t,a),F.push(">")),"underline"==r.textDecoration&&F.push("<u>"),n=[],r.color&&n.push('color="'+l.toHex(r.color)+'"'),r.fontFamily&&n.push('face="'+r.fontFamily+'"'),r.fontSize&&(i=e.inArray(r.fontSize,c),n.push('size="'+i+'"')),n.length&&F.push("<font "+n.join(" ")+">")},end:function(e){var t=e.style;(t.color||t.fontFamily||t.fontSize)&&F.push("</font>"),"underline"==t.textDecoration&&F.push("</u>"),d(y(e)).length&&F.push("</span>")}},strong:{semantic:!0,start:function(e){_(e,"b")},end:function(){F.push("</b>")}},em:{semantic:!0,start:function(e){_(e,"i")},end:function(){F.push("</i>")}},b:{semantic:!1,start:function(e){_(e,"strong")},end:function(){F.push("</strong>")}},i:{semantic:!1,start:function(e){_(e,"em")},end:function(){F.push("</em>")}},u:{semantic:!1,start:function(t){var n,i,r;F.push("<span"),n=y(t),i=e(n).filter(function(e,t){return"style"==t.name})[0],r={nodeName:"style",value:"text-decoration:underline;"},i&&(r.value=i.value,/text-decoration/i.test(r.value)||(r.value="text-decoration:underline;"+r.value),n.splice(e.inArray(i,n),1)),n.push(r),w(t,n),F.push(">")},end:function(){F.push("</span>")}},font:{semantic:!1,start:function(e){var t,n,i;F.push('<span style="'),t=e.getAttribute("color"),n=c[e.getAttribute("size")],i=e.getAttribute("face"),t&&(F.push("color:"),F.push(l.toHex(t)),F.push(";")),i&&(F.push("font-family:"),F.push(i),F.push(";")),n&&(F.push("font-size:"),F.push(n),F.push(";")),F.push('">')},end:function(){F.push("</span>")}}};return A.script=A["k:script"],o=o||{},t===o.semantic&&(o.semantic=!0),I(i)?(F=l.encode(C(i.firstChild).replace(/[\r\n\v\f\t ]+/," "),o),D(),F):(x(i),F=F.join(""),D(),""===F.replace(p,"").replace(h,"")?"":F)}},d(s,{Serializer:o})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/components.min",["editor/serializer.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.DropDownList,r=n.ui.editor.Dom,o=i.extend({init:function(t,r){var o=this;i.fn.init.call(o,t,r),n.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",e.proxy(this._initSelectOverlay,this))),o.text(o.options.title),o.element.attr("title",o.options.title),o.wrapper.attr("title",o.options.title),o.bind("open",function(){if(o.options.autoSize){var e,t=o.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e>0?e+=20:e=o._listWidth,t.css("width",e+n.support.scrollbar()),o._listWidth=e}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){var t,i,r,o,a=this,s=a.value(),l=this.dataSource.view(),d="",c=n.htmlEncode;for(i=0;i<l.length;i++)t=l[i],d+="<option value='"+c(t.value)+"'",t.value==s&&(d+=" selected"),d+=">"+c(t.text)+"</option>";r=e("<select class='k-select-overlay'>"+d+"</select>"),o=e(this.element).closest(".k-widget"),o.next(".k-select-overlay").remove(),r.insertAfter(o),r.on("change",function(){a.value(this.value),a.trigger("change")})},value:function(e){var n=this,r=i.fn.value.call(n,e);return e===t?r:(i.fn.value.call(n)||n.text(n.options.title),t)},decorate:function(t){var n,i,o,a,s=this,l=s.dataSource,d=l.data();for(t&&s.list.css("background-color",r.getEffectiveBackground(e(t))),n=0;n<d.length;n++)i=d[n].tag||"span",o=d[n].className,a=r.inlineStyle(t,i,{className:o}),a=a.replace(/"/g,"'"),d[n].style=a+";display:inline-block";l.trigger("change")}});n.ui.plugin(o),n.ui.editor.SelectBox=o}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/range.min",["editor/components.min"],e)}(function(){!function(e){function t(e,t,n,i){var r,o,a,s;if(e==t)return i-n;for(r=t;r&&r.parentNode!=e;)r=r.parentNode;if(r)return w(r)-n;for(r=e;r&&r.parentNode!=t;)r=r.parentNode;if(r)return i-w(r)-1;for(o=y.commonAncestor(e,t),a=e;a&&a.parentNode!=o;)a=a.parentNode;for(a||(a=o),s=t;s&&s.parentNode!=o;)s=s.parentNode;return s||(s=o),a==s?0:w(s)-w(a)}function n(e,n){function i(e){try{return t(e.startContainer,e.endContainer,e.startOffset,e.endOffset)<0}catch(n){return!0}}i(e)&&(n?(e.commonAncestorContainer=e.endContainer=e.startContainer,e.endOffset=e.startOffset):(e.commonAncestorContainer=e.startContainer=e.endContainer,e.startOffset=e.endOffset),e.collapsed=!0)}function i(e){e.collapsed=e.startContainer==e.endContainer&&e.startOffset==e.endOffset;for(var t=e.startContainer;t&&t!=e.endContainer&&!y.isAncestorOf(t,e.endContainer);)t=t.parentNode;e.commonAncestorContainer=t}function r(e){var t=e.duplicate(),n=e.duplicate();return t.collapse(!0),n.collapse(!1),y.commonAncestor(e.parentElement(),t.parentElement(),n.parentElement())}function o(e,t,n){var i,r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],a=0,s=x(r),l=s?r:r.childNodes[o]||null,d=s?r.parentNode:r,c=t.ownerDocument,u=c.body.createTextRange();3!=r.nodeType&&4!=r.nodeType||(a=o),d||(d=c.body),"img"==d.nodeName.toLowerCase()?(u.moveToElementText(d),u.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",u)):(i=d.insertBefore(y.create(c,"a"),l),u.moveToElementText(i),y.remove(i),u[n?"moveStart":"moveEnd"]("character",a),u.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",u))}function a(e,t,n,i){var r,o,a,s,l,d,c,u=y.create(t.ownerDocument,"a"),p=e.duplicate(),f=i?"StartToStart":"StartToEnd",h=!1;u.innerHTML="\ufeff",p.collapse(i),o=p.parentElement(),y.isAncestorOrSelf(n,o)||(o=n);do h?o.insertBefore(u,u.previousSibling):(o.appendChild(u),h=!0),p.moveToElementText(u);while((r=p.compareEndPoints(f,e))>0&&u.previousSibling);a=u.nextSibling,r==-1&&x(a)?(p.setEndPoint(i?"EndToStart":"EndToEnd",e),y.remove(u),d=[a,p.text.length]):(s=!i&&u.previousSibling,l=i&&u.nextSibling,x(l)?d=[l,0]:x(s)?d=[s,s.length]:(c=w(u),d=o.nextSibling&&c==o.childNodes.length-1?[o.nextSibling,0]:[o,c]),y.remove(u)),t[i?"setStart":"setEnd"].apply(t,d)}var s,l,d,c,u,p,f,h,m,g=window.kendo,v=g.Class,_=e.extend,b=g.ui.editor,k=g.support.browser,y=b.Dom,w=y.findNodeIndex,x=y.isDataNode,C=y.findClosestAncestor,T=y.getNodeLength,S=y.normalize,I={selectionFromWindow:function(e){if(e)return"getSelection"in e?e.getSelection():new l(e.document)},selectionFromRange:function(e){var t=m.documentFromRange(e);return I.selectionFromDocument(t)},selectionFromDocument:function(e){return I.selectionFromWindow(y.windowFromDocument(e))}},D=v.extend({init:function(t){e.extend(this,{ownerDocument:t,startContainer:t,endContainer:t,commonAncestorContainer:t,startOffset:0,endOffset:0,collapsed:!0})},setStart:function(e,t){this.startContainer=e,this.startOffset=t,i(this),n(this,!0)},setEnd:function(e,t){this.endContainer=e,this.endOffset=t,i(this),n(this,!1)},setStartBefore:function(e){this.setStart(e.parentNode,w(e))},setStartAfter:function(e){this.setStart(e.parentNode,w(e)+1)},setEndBefore:function(e){this.setEnd(e.parentNode,w(e))},setEndAfter:function(e){this.setEnd(e.parentNode,w(e)+1)},selectNode:function(e){this.setStartBefore(e),this.setEndAfter(e)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e[1===e.nodeType?"childNodes":"nodeValue"].length)},collapse:function(e){var t=this;e?t.setEnd(t.startContainer,t.startOffset):t.setStart(t.endContainer,t.endOffset)},deleteContents:function(){var e=this,t=e.cloneRange();e.startContainer!=e.commonAncestorContainer&&e.setStartAfter(C(e.commonAncestorContainer,e.startContainer)),e.collapse(!0),function n(e){for(;e.next();)e.hasPartialSubtree()?n(e.getSubtreeIterator()):e.remove()}(new s(t))},cloneContents:function(){var e=m.documentFromRange(this);return function t(n){for(var i,r=e.createDocumentFragment();i=n.next();)i=i.cloneNode(!n.hasPartialSubtree()),n.hasPartialSubtree()&&i.appendChild(t(n.getSubtreeIterator())),r.appendChild(i);return r}(new s(this))},extractContents:function(){var e,t=this,n=t.cloneRange();return t.startContainer!=t.commonAncestorContainer&&t.setStartAfter(C(t.commonAncestorContainer,t.startContainer)),t.collapse(!0),e=m.documentFromRange(t),function i(n){for(var r,o=e.createDocumentFragment();r=n.next();)n.hasPartialSubtree()?(r=r.cloneNode(!1),r.appendChild(i(n.getSubtreeIterator()))):n.remove(t.originalRange),o.appendChild(r);return o}(new s(n))},insertNode:function(e){var t=this;x(t.startContainer)?(t.startOffset!=t.startContainer.nodeValue.length&&y.splitDataNode(t.startContainer,t.startOffset),y.insertAfter(e,t.startContainer)):y.insertAt(t.startContainer,e,t.startOffset),t.setStart(t.startContainer,t.startOffset)},cloneRange:function(){return e.extend(new D(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var e=this.startContainer.nodeName,t=this.endContainer.nodeName;return("#text"==e?this.startContainer.nodeValue:e)+"("+this.startOffset+") : "+("#text"==t?this.endContainer.nodeValue:t)+"("+this.endOffset+")"}});D.fromNode=function(e){return new D(e.ownerDocument)},s=v.extend({init:function(t){if(e.extend(this,{range:t,_current:null,_next:null,_end:null}),!t.collapsed){var n=t.commonAncestorContainer;this._next=t.startContainer!=n||x(t.startContainer)?C(n,t.startContainer):t.startContainer.childNodes[t.startOffset],this._end=t.endContainer!=n||x(t.endContainer)?C(n,t.endContainer).nextSibling:t.endContainer.childNodes[t.endOffset]}},hasNext:function(){return!!this._next},next:function(){var e=this,t=e._current=e._next;return e._next=e._current&&e._current.nextSibling!=e._end?e._current.nextSibling:null,x(e._current)&&(e.range.endContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(e.range.endOffset,t.length-e.range.endOffset)),e.range.startContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(0,e.range.startOffset))),t},traverse:function(e){function t(){return i._current=i._next,i._next=i._current&&i._current.nextSibling!=i._end?i._current.nextSibling:null,i._current}for(var n,i=this;n=t();)i.hasPartialSubtree()?i.getSubtreeIterator().traverse(e):e(n);return n},remove:function(e){var t,n,i,r,o,a=this,s=a.range.startContainer==a._current,l=a.range.endContainer==a._current;x(a._current)&&(s||l)?(t=s?a.range.startOffset:0,n=l?a.range.endOffset:a._current.length,i=n-t,e&&(s||l)&&(a._current==e.startContainer&&t<=e.startOffset&&(e.startOffset-=i),a._current==e.endContainer&&n<=e.endOffset&&(e.endOffset-=i)),a._current.deleteData(t,i)):(r=a._current.parentNode,!e||a.range.startContainer!=r&&a.range.endContainer!=r||(o=w(a._current),r==e.startContainer&&o<=e.startOffset&&(e.startOffset-=1),r==e.endContainer&&o<e.endOffset&&(e.endOffset-=1)),y.remove(a._current))},hasPartialSubtree:function(){return!x(this._current)&&(y.isAncestorOrSelf(this._current,this.range.startContainer)||y.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){return new s(this.getSubRange())},getSubRange:function(){var e=this,t=e.range.cloneRange();return t.selectNodeContents(e._current),y.isAncestorOrSelf(e._current,e.range.startContainer)&&t.setStart(e.range.startContainer,e.range.startOffset),y.isAncestorOrSelf(e._current,e.range.endContainer)&&t.setEnd(e.range.endContainer,e.range.endOffset),t}}),l=v.extend({init:function(e){this.ownerDocument=e,this.rangeCount=1},addRange:function(e){var t=this.ownerDocument.body.createTextRange();o(t,e,!1),o(t,e,!0),t.select()},removeAllRanges:function(){var e=this.ownerDocument.selection;"None"!=e.type&&e.empty()},getRangeAt:function(){var e,t,n,i,o,s,l,d,c=new D(this.ownerDocument),u=this.ownerDocument.selection;try{if(e=u.createRange(),t=e.item?e.item(0):e.parentElement(),t.ownerDocument!=this.ownerDocument)return c}catch(p){return c}if("Control"==u.type)c.selectNode(e.item(0));else if(n=r(e),a(e,c,n,!0),a(e,c,n,!1),9==c.startContainer.nodeType&&c.setStart(c.endContainer,c.startOffset),9==c.endContainer.nodeType&&c.setEnd(c.startContainer,c.endOffset),0===e.compareEndPoints("StartToEnd",e)&&c.collapse(!1),i=c.startContainer,o=c.endContainer,s=this.ownerDocument.body,!(c.collapsed||0!==c.startOffset||c.endOffset!=T(c.endContainer)||i==o&&x(i)&&i.parentNode==s)){for(l=!1,d=!1;0===w(i)&&i==i.parentNode.firstChild&&i!=s;)i=i.parentNode,l=!0;for(;w(o)==T(o.parentNode)-1&&o==o.parentNode.lastChild&&o!=s;)o=o.parentNode,d=!0;i==s&&o==s&&l&&d&&(c.setStart(i,0),c.setEnd(o,T(s)))}return c}}),d=v.extend({init:function(e){this.enumerate=function(){function t(e){if(y.is(e,"img")||3==e.nodeType&&(!y.isEmptyspace(e)||"\ufeff"==e.nodeValue))n.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var n=[];return new s(e).traverse(t),n}}}),c=s.extend({hasPartialSubtree:function(){var e=b.Immutables&&b.Immutables.immutable;return e&&!e(this._current)&&s.fn.hasPartialSubtree.call(this)},getSubtreeIterator:function(){return new c(this.getSubRange())}}),u=v.extend({init:function(e){this.enumerate=function(){function t(e){if(i&&!i(e))if(y.is(e,"img")||3==e.nodeType&&(!y.isEmptyspace(e)||"\ufeff"==e.nodeValue))n.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var n=[],i=b.Immutables&&b.Immutables.immutable;return new c(e).traverse(t),n}}}),p=v.extend({init:function(e,t,n){var i=this;i.range=e,i.rootNode=m.documentFromRange(e),i.body=t||i.getEditable(e),"body"!=y.name(i.body)&&(i.rootNode=i.body),i.startContainer=i.nodeToPath(e.startContainer),i.endContainer=i.nodeToPath(e.endContainer),i.startOffset=i.offset(e.startContainer,e.startOffset),i.endOffset=i.offset(e.endContainer,e.endOffset),i.immutables=n&&n.immutables,i.immutables&&(i.serializedImmutables=b.Immutables.removeImmutables(i.body)),i.html=i.body.innerHTML,i.immutables&&!i.serializedImmutables.empty&&b.Immutables.restoreImmutables(i.body,i.serializedImmutables)},index:function(e){for(var t,n=0,i=e.nodeType;e=e.previousSibling;)t=e.nodeType,3==t&&i==t||n++,i=t;return n},getEditable:function(e){for(var t=e.commonAncestorContainer;t&&(3==t.nodeType||t.attributes&&(!t.attributes.contentEditable||"false"==t.attributes.contentEditable.nodeValue.toLowerCase()));)t=t.parentNode;return t},restoreHtml:function(){var e=this;y.removeChildren(e.body),e.body.innerHTML=e.html,e.immutables&&!e.serializedImmutables.empty&&b.Immutables.restoreImmutables(e.body,e.serializedImmutables)},offset:function(e,t){if(3==e.nodeType)for(;(e=e.previousSibling)&&3==e.nodeType;)t+=e.nodeValue.length;return t},nodeToPath:function(e){for(var t=[];e!=this.rootNode;)t.push(this.index(e)),e=e.parentNode;return t},toRangePoint:function(e,t,n,i){for(var r=this.rootNode,o=n.length,a=i;o--&&r;)r=r.childNodes[n[o]];for(;r&&3==r.nodeType&&r.nodeValue.length<a;)a-=r.nodeValue.length,r=r.nextSibling;r&&a>=0&&e[t?"setStart":"setEnd"](r,a)},toRange:function(){var e=this,t=e.range.cloneRange();return e.toRangePoint(t,!0,e.startContainer,e.startOffset),e.toRangePoint(t,!1,e.endContainer,e.endOffset),t}}),f=v.extend({init:function(){this.caret=null},addCaret:function(e){var t=this,n=t.caret=y.create(m.documentFromRange(e),"span",{className:"k-marker"});return e.insertNode(n),y.stripBomNode(n.previousSibling),y.stripBomNode(n.nextSibling),e.selectNode(n),n},removeCaret:function(e){var t,n,i,r,o=this,a=o.caret.previousSibling,s=0;a&&(s=x(a)?a.nodeValue.length:w(a)),t=o.caret.parentNode,n=a?w(a):0,y.remove(o.caret),S(t),i=t.childNodes[n],x(i)?e.setStart(i,s):i?(r=y.lastTextNode(i),r?e.setStart(r,r.nodeValue.length):e[a?"setStartAfter":"setStartBefore"](i)):(k.msie||t.innerHTML||(t.innerHTML='<br _moz_dirty="" />'),e.selectNodeContents(t)),e.collapse(!0)},add:function(e,t){var n,i,r=this,o=e.collapsed&&!m.isExpandable(e),a=m.documentFromRange(e);return t&&e.collapsed&&(r.addCaret(e),e=m.expand(e)),n=e.cloneRange(),n.collapse(!1),r.end=y.create(a,"span",{className:"k-marker"}),n.insertNode(r.end),n=e.cloneRange(),n.collapse(!0),r.start=r.end.cloneNode(!0),n.insertNode(r.start),r._removeDeadMarkers(r.start,r.end),o&&(i=a.createTextNode("\ufeff"),y.insertAfter(i.cloneNode(),r.start),y.insertBefore(i,r.end)),S(e.commonAncestorContainer),e.setStartBefore(r.start),e.setEndAfter(r.end),e},_removeDeadMarkers:function(e,t){e.previousSibling&&"\ufeff"==e.previousSibling.nodeValue&&y.remove(e.previousSibling),t.nextSibling&&"\ufeff"==t.nextSibling.nodeValue&&y.remove(t.nextSibling)},_normalizedIndex:function(e){for(var t=w(e),n=e;n.previousSibling;)3==n.nodeType&&3==n.previousSibling.nodeType&&t--,n=n.previousSibling;return t},remove:function(e){var t,n,i,r,o,a,s,l,d,c,u,p,f=this,h=f.start,m=f.end;for(S(e.commonAncestorContainer);!h.nextSibling&&h.parentNode;)h=h.parentNode;for(;!m.previousSibling&&m.parentNode;)m=m.parentNode;if(t=h.previousSibling&&3==h.previousSibling.nodeType&&h.nextSibling&&3==h.nextSibling.nodeType,n=m.previousSibling&&3==m.previousSibling.nodeType&&m.nextSibling&&3==m.nextSibling.nodeType,i=t&&n,h=h.nextSibling,m=m.previousSibling,r=h===m&&y.isBom(h),r&&h.length>1&&(h.nodeValue=h.nodeValue.charAt(0)),o=r,a=!1,h==f.end&&(a=!!f.start.previousSibling,h=m=f.start.previousSibling||f.end.nextSibling,o=!0),y.remove(f.start),y.remove(f.end),!h||!m)return e.selectNodeContents(e.commonAncestorContainer),void e.collapse(!0);if(s=o?x(h)?h.nodeValue.length:h.childNodes.length:0,l=x(m)?m.nodeValue.length:m.childNodes.length,3==h.nodeType)for(;h.previousSibling&&3==h.previousSibling.nodeType;)h=h.previousSibling,s+=h.nodeValue.length;if(3==m.nodeType)for(;m.previousSibling&&3==m.previousSibling.nodeType;)m=m.previousSibling,l+=m.nodeValue.length;d=h.parentNode,c=m.parentNode,u=this._normalizedIndex(h),p=this._normalizedIndex(m),S(d),3==h.nodeType&&(h=d.childNodes[u]),S(c),3==m.nodeType&&(m=c.childNodes[p]),o?(3==h.nodeType?e.setStart(h,s):e[a?"setStartAfter":"setStartBefore"](h),e.collapse(!0)):(3==h.nodeType?e.setStart(h,s):e.setStartBefore(h),3==m.nodeType?e.setEnd(m,l):e.setEndAfter(m)),f.caret&&f.removeCaret(e)}}),h=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,m={nodes:function(e){var t=m.textNodes(e);return t.length||(e.selectNodeContents(e.commonAncestorContainer),t=m.textNodes(e),t.length||(t=y.significantChildNodes(e.commonAncestorContainer))),t},textNodes:function(e){return new d(e).enumerate()},editableTextNodes:function(e){var t=[],n=b.Immutables&&b.Immutables.immutableParent;return n&&!n(e.commonAncestorContainer)&&(t=new u(e).enumerate()),t},documentFromRange:function(e){var t=e.startContainer;return 9==t.nodeType?t:t.ownerDocument},createRange:function(e){return k.msie&&k.version<9?new D(e):e.createRange()},selectRange:function(e){var t,n=m.image(e);n&&(e.setStartAfter(n),e.setEndAfter(n)),t=I.selectionFromRange(e),t.removeAllRanges(),t.addRange(e)},stringify:function(e){return g.format("{0}:{1} - {2}:{3}",y.name(e.startContainer),e.startOffset,y.name(e.endContainer),e.endOffset)},split:function(e,t,n){function i(i){var r,o=e.cloneRange();o.collapse(i),o[i?"setStartBefore":"setEndAfter"](t),r=o.extractContents(),n&&(r=y.trim(r)),y[i?"insertBefore":"insertAfter"](r,t)}i(!0),i(!1)},mapAll:function(t,n){var i=[];return new s(t).traverse(function(t){var r=n(t);r&&e.inArray(r,i)<0&&i.push(r)}),i},getAll:function(e,t){var n=t;return"string"==typeof t&&(t=function(e){return y.is(e,n)}),m.mapAll(e,function(e){if(t(e))return e})},getMarkers:function(e){return m.getAll(e,function(e){return"k-marker"==e.className})},image:function(e){var t=m.getAll(e,"img");if(1==t.length)return t[0]},isStartOf:function(e,t){var n,i,r;if(0!==e.startOffset)return!1;for(n=e.cloneRange();0===n.startOffset&&n.startContainer!=t;){for(i=y.findNodeIndex(n.startContainer),r=n.startContainer.parentNode;i>0&&r[i-1]&&y.insignificant(r[i-1]);)i--;n.setStart(r,i)}return 0===n.startOffset&&n.startContainer==t},isEndOf:function(e,t){function n(e){y.insignificant(e)||y.isDataNode(e)&&/^[\ufeff]*$/.test(e.nodeValue)||r.push(e)}var i,r,o=e.cloneRange();return o.collapse(!1),i=o.startContainer,y.isDataNode(i)&&o.startOffset==y.getNodeLength(i)&&(o.setStart(i.parentNode,y.findNodeIndex(i)+1),o.collapse(!0)),o.setEnd(t,y.getNodeLength(t)),r=[],new s(o).traverse(n),!r.length},wrapSelectedElements:function(e){function t(e,t){var n,i=y.getNodeLength(t);if(e==i)return!0;for(n=e;n<i;n++)if(!y.insignificant(t.childNodes[n]))return!1;return!0}for(var n=y.editableParent(e.startContainer),i=y.editableParent(e.endContainer);0===e.startOffset&&e.startContainer!=n;)e.setStart(e.startContainer.parentNode,y.findNodeIndex(e.startContainer));for(;t(e.endOffset,e.endContainer)&&e.endContainer!=i;)e.setEnd(e.endContainer.parentNode,y.findNodeIndex(e.endContainer)+1);return e},expand:function(e){var t,n,i,r,o=e.cloneRange(),a=o.startContainer.childNodes[0===o.startOffset?0:o.startOffset-1],s=o.endContainer.childNodes[o.endOffset];return x(a)&&x(s)?(t=a.nodeValue,n=s.nodeValue,t&&n?(i=t.split("").reverse().join("").search(h),r=n.search(h),i&&r?(r=r==-1?n.length:r,i=i==-1?0:t.length-i,o.setStart(a,i),o.setEnd(s,r),o):o):o):o},isExpandable:function(e){var t,n,i,r,o,a,s=e.startContainer,l=m.documentFromRange(e);return s!=l&&s!=l.body&&(t=e.cloneRange(),!!(n=s.nodeValue)&&(i=n.substring(0,t.startOffset),r=n.substring(t.startOffset),o=0,a=0,i&&(o=i.split("").reverse().join("").search(h)),r&&(a=r.search(h)),o&&a))}},_(b,{SelectionUtils:I,W3CRange:D,RangeIterator:s,W3CSelection:l,RangeEnumerator:d,RestorePoint:p,Marker:f,RangeUtils:m})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/immutables.min",["editor/range.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.Class,r=n.ui.editor,o=r.Dom,a=n.template,s=r.RangeUtils,l=["ul","ol","tbody","thead","table"],d=["bold","italic","underline","strikethrough","superscript","subscript","forecolor","backcolor","fontname","fontsize","createlink","unlink","autolink","addcolumnleft","addcolumnright","addrowabove","addrowbelow","deleterow","deletecolumn","mergecells","formatting","cleanformatting"],c="k-immutable",u="["+c+"]",p="[contenteditable='false']",f=function(t){return e(t).is("body,.k-editor")},h=function(e){return e.getAttribute&&"false"==e.getAttribute("contenteditable")},m=function(e){return o.closestBy(e,h,f)},g=function(e){var t=m(e.startContainer),n=m(e.endContainer);(t||n)&&(t&&e.setStartBefore(t),n&&e.setEndAfter(n))},v=function(e){if(m(e.commonAncestorContainer))return!0;if(m(e.startContainer)||m(e.endContainer)){var t=s.editableTextNodes(e);if(0===t.length)return!0}return!1},_=function(e){var t,n="",i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(t=e||10;t>0;--t)n+=i.charAt(Math.round(Math.random()*(i.length-1)));return n},b=function(t){var n,i,r,a={empty:!0};return e(t).find(p).each(function(t,s){n=o.name(s),i=_(),r="<"+n+" "+c+"='"+i+"'></"+n+">",a[i]={node:s,style:e(s).attr("style")},a.empty=!1,e(s).replaceWith(r)}),a},k=function(t,n){var i,r;e(t).find(u).each(function(t,o){i=o.getAttribute(c),r=n[i],e(o).replaceWith(r.node),r.style!=e(r.node).attr("style")&&e(r.node).removeAttr("style").attr("style",r.style)})},y=function(e){var t=n.keys;return e===t.BACKSPACE||e==t.DELETE},w=function(e){var n=e?e.options:t;n&&n.finder&&n.finder._initOptions({immutables:!0})},x=i.extend({init:function(t){this.editor=t,this.serializedImmutables={},this.options=e.extend({},t&&t.options&&t.options.immutables);var n=t.toolbar.tools;w(n.justifyLeft),w(n.justifyCenter),w(n.justifyRight),w(n.justifyFull)},serialize:function(e){var t,n=this._toHtml(e);return n.indexOf(c)===-1?(t=this.randomId(),n=n.replace(/>/," "+c+'="'+t+'">')):t=n.match(/k-immutable\s*=\s*['"](.*)['"]/)[1],this.serializedImmutables[t]=e,n},_toHtml:function(e){var t,n=this.options.serialization,i=typeof n;switch(i){case"string":return a(n)(e);case"function":return n(e);default:return t=o.name(e),"<"+t+"></"+t+">"}},deserialize:function(t){var i=this,r=this.options.deserialization;e(u,t).each(function(){var t=this.getAttribute(c),o=i.serializedImmutables[t];n.isFunction(r)&&r(this,o),e(this).replaceWith(o)}),i.serializedImmutables={}},randomId:function(e){return _(e)},keydown:function(e,t){var n=y(e.keyCode),i=n&&this._cancelDeleting(e,t)||!n&&this._cancelTyping(e,t);if(i)return e.preventDefault(),!0},_cancelTyping:function(e,t){var n=this.editor,i=n.keyboard;return t.collapsed&&!i.typingInProgress&&i.isTypingKey(e)&&v(t)},_cancelDeleting:function(e,t){var i,r,a,s,d=n.keys,c=e.keyCode===d.BACKSPACE,u=e.keyCode==d.DELETE;if(!c&&!u)return!1;if(i=!1,t.collapsed){if(v(t))return!0;if(r=this.nextImmutable(t,u),r&&c&&(a=o.closest(t.commonAncestorContainer,"li"),a&&(s=o.closest(r,"li"),s&&s!==a)))return i;if(r&&!o.tableCell(r)){if(o.parentOfType(r,l)===o.parentOfType(t.commonAncestorContainer,l)){for(;r&&1==r.parentNode.childNodes.length;)r=r.parentNode;if(o.tableCell(r))return i;this._removeImmutable(r,t)}i=!0}}return i},nextImmutable:function(e,t){var n,i=e.commonAncestorContainer;if(o.isBom(i)||t&&s.isEndOf(e,i)||!t&&s.isStartOf(e,i)){if(n=this._nextNode(i,t),n&&o.isBlock(n)&&!m(n))for(;n&&n.children&&n.children[t?0:n.children.length-1];)n=n.children[t?0:n.children.length-1];return m(n)}},_removeImmutable:function(e,t){var n=this.editor,i=new r.RestorePoint(t,n.body);o.remove(e),r._finishUpdate(n,i)},_nextNode:function(e,t){for(var n,i=t?"nextSibling":"previousSibling",r=e;r&&!n;)n=r[i],n&&o.isDataNode(n)&&/^\s|[\ufeff]$/.test(n.nodeValue)&&(r=n,n=r[i]),n||(r=r.parentNode);return n}});x.immutable=h,x.immutableParent=m,x.expandImmutablesIn=g,x.immutablesContext=v,x.toolsToBeUpdated=d,x.removeImmutables=b,x.restoreImmutables=k,r.Immutables=x}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/command.min",["editor/immutables.min"],e)}(function(){!function(e){function t(e,t){var n=e.selectionRestorePoint=new a(e.getRange(),e.body),i=new c(t,n);return i.editor=e,e.undoRedoStack.push(i),n}var n=window.kendo,i=n.Class,r=n.ui.editor,o=r.Dom,a=r.RestorePoint,s=r.Marker,l=e.extend,d=i.extend({init:function(e){this.options=e,this.restorePoint=new a(e.range,e.body,{immutables:e.immutables}),this.marker=new s,this.formatter=e.formatter},getRange:function(){return this.restorePoint.toRange()},lockRange:function(e){return this.marker.add(this.getRange(),e)},releaseRange:function(e){this.marker.remove(e),this.editor.selectRange(e)},undo:function(){var e=this.restorePoint;e.restoreHtml(),this.editor.selectRange(e.toRange())},redo:function(){this.exec()},createDialog:function(t,i){var r=this.editor;return e(t).appendTo(document.body).kendoWindow(l({},r.options.dialogOptions,i)).closest(".k-window").toggleClass("k-rtl",n.support.isRtl(r.wrapper)).end()},exec:function(){var e=this.lockRange(!0);this.formatter.editor=this.editor,this.formatter.toggle(e),this.releaseRange(e)},immutables:function(){return this.editor&&this.editor.options.immutables},expandImmutablesIn:function(e){this.immutables()&&(n.ui.editor.Immutables.expandImmutablesIn(e),this.restorePoint=new a(e,this.editor.body))}}),c=i.extend({init:function(e,t){this.body=e.body,this.startRestorePoint=e,this.endRestorePoint=t},redo:function(){o.removeChildren(this.body),this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){o.removeChildren(this.body),this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}});l(r,{_finishUpdate:t,Command:d,GenericCommand:c})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/toolbar.min",["editor/range.min"],e)}(function(){!function(e,t){var n,i=window.kendo,r=i.ui,o=r.editor,a=r.Widget,s=e.extend,l=e.proxy,d=i.keys,c=".kendoEditor",u=o.EditorUtils,p=o.ToolTemplate,f=o.Tool,h=i._outerWidth,m=i._outerHeight,g="overflowAnchor",v=".k-tool-group:visible .k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor:visible,.k-tool-group:visible .k-colorpicker:not(input),.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",_={"k-i-sup-script":"superscript","k-i-sub-script":"subscript","k-i-align-left":"justifyLeft","k-i-align-center":"justifyCenter","k-i-align-right":"justifyRight","k-i-align-justify":"justifyFull","k-i-list-unordered":"insertUnorderedList","k-i-list-ordered":"insertOrderedList","k-i-login":"import","k-i-indent-increase":"indent","k-i-indent-decrease":"outdent","k-i-link-horizontal":"createLink","k-i-unlink-horizontal":"unlink","k-i-image":"insertImage","k-i-file-add":"insertFile","k-i-html":"viewHtml","k-i-foreground-color":"foreColor","k-i-paint":"backColor","k-i-table-insert":"createTable","k-i-table-column-insert-left":"addColumnLeft","k-i-table-column-insert-right":"addColumnRight","k-i-table-row-insert-above":"addRowAbove","k-i-table-row-insert-below":"addRowBelow","k-i-table-row-delete":"deleteRow","k-i-table-column-delete":"deleteColumn","k-i-table-properties":"tableWizard","k-i-table-wizard":"tableWizardInsert","k-i-clear-css":"cleanFormatting","k-i-cells-merge-horizontally":"mergeCellsHorizontally","k-i-cells-merge-vertically":"mergeCellsVertically","k-i-cell-split-horizontally":"splitCellHorizontally","k-i-cell-split-vertically":"splitCellVertically","k-i-copy-format":"copyFormat","k-i-apply-format":"applyFormat"},b=f.extend({initialize:function(t,n){var i=n.editor.toolbar;t.attr("aria-controls",n.editor.element.attr("id")).on("click",e.proxy(function(){this.overflowPopup.toggle()},i))},options:{name:g},command:e.noop,update:e.noop,destroy:e.noop});u.registerTool(g,new b({key:"",ctrl:!0,template:new p({template:u.overflowAnchorTemplate})})),n=a.extend({init:function(e,t){var n=this;t=s({},t,{name:"EditorToolbar"}),a.fn.init.call(n,e,t),t.popup&&n._initPopup(),t.resizable&&t.resizable.toolbar&&(n._resizeHandler=i.onResize(function(){n.resize(!0)}),n.element.addClass("k-toolbar-resizable"))},events:["execute"],groups:{basic:["bold","italic","underline","strikethrough"],scripts:["subscript","superscript"],alignment:["justifyLeft","justifyCenter","justifyRight","justifyFull"],links:["insertImage","insertFile","createLink","unlink"],lists:["insertUnorderedList","insertOrderedList","indent","outdent"],tablesInsert:["createTable"],tablesAddDelete:["addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"],tablesMerge:["mergeCellsHorizontally","mergeCellsVertically","splitCellHorizontally","splitCellVertically"],advanced:["viewHtml","cleanFormatting","print","pdf","exportAs","import"],fonts:["fontName","fontSize"],colors:["foreColor","backColor"],formatPainter:["copyFormat","applyFormat"]},overflowFlaseTools:["formatting","fontName","fontSize","foreColor","backColor","insertHtml"],_initPopup:function(){var t=this;this.window=e(this.element).wrap("<div class='editorToolbarWindow' />").parent().prepend("<span class='k-editortoolbar-dragHandle'><span class='k-icon k-i-handler-drag'></span></span>").kendoWindow({title:!1,resizable:!1,draggable:{dragHandle:".k-editortoolbar-dragHandle"},animation:{open:{effects:"fade:in"},close:{effects:"fade:out"}},minHeight:42,visible:!1,autoFocus:!1,actions:[],dragend:function(){this._moved=!0}}).on("mousedown",function(n){e(n.target).is(".k-icon")||(t.preventPopupHide=!0)}).on("focusout",function(){t.options.editor.element.focusout()}).data("kendoWindow")},_toggleOverflowStyles:function(e,t){e.find("> li").toggleClass("k-item",t).find(".k-tool:not(.k-state-disabled), .k-overflow-button").toggleClass("k-overflow-button",t)},_initOverflowPopup:function(t){var n=this,r="<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>";n.overflowPopup=e(r).appendTo("body").kendoPopup({anchor:t,origin:i.support.isRtl(n.element)?"bottom left":"bottom right",position:i.support.isRtl(n.element)?"top left":"top right",copyAnchorStyles:!1,
|
26
|
-
open:function(e){this.element.is(":empty")&&e.preventDefault(),n._toggleOverflowStyles(this.element,!0),t.attr("aria-expanded",!0)},close:function(){t.attr("aria-expanded",!1)},activate:l(n.focusOverflowPopup,n)}).data("kendoPopup")},items:function(){var e,t,n=this.options.resizable&&this.options.resizable.toolbar;return t=this.element.children().find("> *, select"),n&&(e=this.overflowPopup,t=t.add(e.element.children().find("> *"))),t},focused:function(){return this.element.find(".k-state-focused").length>0||this.preventPopupHide||this.overflowPopup&&this.overflowPopup.visible()},toolById:function(e){var t,n=this.tools;for(t in n)if(t.toLowerCase()==e)return n[t]},toolGroupFor:function(t){var n,i=this.groups;if(this.isCustomTool(t))return"custom";for(n in i)if(e.inArray(t,i[n])>=0)return n},bindTo:function(t){var n=this,i=n.window;n._editor&&n._editor.unbind("select",l(n.resize,n)),n._editor=t,n.options.resizable&&n.options.resizable.toolbar&&t.options.tools.push(g),n.tools=n.expandTools(t.options.tools),n.render(),n.element.find(".k-combobox .k-input").keydown(function(t){var n=e(this).closest(".k-combobox").data("kendoComboBox"),i=t.keyCode;i==d.RIGHT||i==d.LEFT?n.close():i==d.DOWN&&(n.dropDown.isOpened()||(t.stopImmediatePropagation(),n.open()))}),n._attachEvents(),n.items().each(function(){var i,r=n._toolName(this),o="moreVertical"!==r?n.tools[r]:n.tools.overflowAnchor,a=o&&o.options,s=t.options.messages,l=a&&a.tooltip||s[r],d=e(this);o&&o.initialize&&("fontSize"!=r&&"fontName"!=r||(i=s[r+"Inherit"],d.find("input").val(i).end().find("span.k-input").text(i).end()),o.initialize(d,{title:n._appendShortcutSequence(l,o),editor:n._editor}),d.closest(".k-widget",n.element).addClass("k-editor-widget"),d.closest(".k-colorpicker",n.element).next(".k-colorpicker").addClass("k-editor-widget"))}),t.bind("select",l(n.resize,n)),n.update(),i&&i.wrapper.css({top:"",left:"",width:""})},show:function(){var e,t,n,r=this,o=r.window,a=r.options.editor,s=i.support.browser;o&&(e=o.wrapper,t=a.element,e.is(":visible")&&r.window.options.visible||(e[0].style.width||e.width(this._getWindowWidth()),o._moved||(n=t.offset(),e.css({top:Math.max(0,parseInt(n.top,10)-m(e)-parseInt(r.window.element.css("padding-bottom"),10)),left:Math.max(0,parseInt(n.left,10))})),(s.msie||s.edge)&&r._overlaps(t)?setTimeout(function(){o.open()},0):o.open()))},_getWindowWidth:function(){var e=this,t=e.window.wrapper,n=e.options.editor.element;return h(n)-parseInt(t.css("border-left-width"),10)-parseInt(t.css("border-right-width"),10)},_overlaps:function(e){var t=this.window.wrapper,n=t.offset(),i=n.left,r=n.top,o=e.offset(),a=o.left,s=o.top;return!(a+e.width()<i||a>i+t.width()||s+e.height()<r||s>r+t.height())},hide:function(){this.window&&this.window.close()},focus:function(){var e="tabIndex",t=this.element,n=this._editor.element.attr(e);t.attr(e,n||0).focus().find(v).first().focus(),n||0===n||t.removeAttr(e)},focusOverflowPopup:function(){var e="tabIndex",t=this.overflowPopup.element,n=this._editor.element.attr(e);t.closest(".k-animation-container").addClass("k-overflow-wrapper"),t.attr(e,n||0).find(v).first().focus(),n||0===n||t.removeAttr(e)},_appendShortcutSequence:function(e,t){if(!t.key)return e;var n=e+" (";return t.ctrl&&(n+="Ctrl + "),t.shift&&(n+="Shift + "),t.alt&&(n+="Alt + "),n+=t.key+")"},_nativeTools:["insertLineBreak","insertParagraph","redo","undo","autoLink"],tools:{},isCustomTool:function(e){return!(e in i.ui.Editor.defaultTools)},expandTools:function(t){var n,r,a,l,d=this._nativeTools,c=i.deepExtend({},i.ui.Editor.defaultTools),u={};for(r=0;r<t.length;r++)n=t[r],l=n.name,e.isPlainObject(n)?l&&c[l]?(u[l]=s({},c[l]),s(u[l].options,n)):(a=s({cssClass:"k-i-gear",type:"button",title:""},n),a.name||(a.name="custom"),a.cssClass="k-"+a.name,a.template||"button"!=a.type||(a.template=o.EditorUtils.buttonTemplate,a.title=a.title||a.tooltip),u[l]={options:a}):c[n]&&(u[n]=c[n]);for(r=0;r<d.length;r++)u[d[r]]||(u[d[r]]=c[d[r]]);return u},render:function(){function t(t){var n="";return t.getHtml?n=t.getHtml():(e.isFunction(t)||(t=i.template(t)),n=t(o)),i.trim(n)}function n(){p.children().length&&(w&&(p.data("position",y),y++),p.appendTo(_))}function r(t){t!==g?(p=e("<li class='k-tool-group' role='presentation' />"),p.data("overflow",e.inArray(t,x)===-1)):p=e("<li class='k-overflow-tools' />")}var o,a,s,d,c,u,p,f,h=this,m=h.tools,v=h._editor.element,_=h.element.empty(),b=h._editor.options.tools,k=i.support.browser,y=0,w=h.options.resizable&&h.options.resizable.toolbar,x=this.overflowFlaseTools;for(_.empty(),b.length&&(d=b[0].name||b[0]),r(d,x),f=0;f<b.length;f++)d=b[f].name||b[f],o=m[d]&&m[d].options,!o&&e.isPlainObject(d)&&(o=d),a=o&&o.template,"break"==d&&(n(),e("<li class='k-row-break' />").appendTo(h.element),r(d,x)),a&&(u=h.toolGroupFor(d),c==u&&d!=g||(n(),r(d,x),c=u),d==g&&(a.options.title=h.options.messages.overflowAnchor),a=t(a),s=e(a).appendTo(p),"custom"==u&&(n(),r(d,x)),o.exec&&s.hasClass("k-tool")&&s.click(l(o.exec,v[0])));n(),e(h.element).children(":has(> .k-tool)").not(".k-overflow-tools").addClass("k-button-group"),h.options.popup&&k.msie&&k.version<9&&h.window.wrapper.find("*").attr("unselectable","on"),h.updateGroups(),w&&h._initOverflowPopup(h.element.find(".k-overflow-anchor")),h.angular("compile",function(){return{elements:h.element}})},updateGroups:function(){e(this.element).children().not(".k-overflow-tools").each(function(){e(this).children().removeClass("k-group-start k-group-end").first().addClass("k-group-start").end().last().addClass("k-group-end").end()})},decorateFrom:function(t){this.items().filter(".k-decorated").each(function(){var n=e(this).data("kendoSelectBox");n&&n.decorate(t)})},destroy:function(){a.fn.destroy.call(this);var e,t=this.tools;for(e in t)t[e].destroy&&t[e].destroy();this.window&&this.window.destroy(),this._resizeHandler&&i.unbindResize(this._resizeHandler),this.overflowPopup&&this.overflowPopup.destroy()},_attachEvents:function(){var t=this,n=t.overflowPopup?t.overflowPopup.element:e([]);t.attachToolsEvents(t.element.add(n))},attachToolsEvents:function(t){var n=this,r="[role=button].k-tool",o=r+":not(.k-state-disabled)",a=r+".k-state-disabled",s=".k-dropdown",l=".k-colorpicker",u=[r,s,l].join(",");t.off(c).on("mouseenter"+c,o,function(){e(this).addClass("k-state-hover")}).on("mouseleave"+c,o,function(){e(this).removeClass("k-state-hover")}).on("mousedown"+c,u,function(e){e.preventDefault()}).on("keydown"+c,v,function(t){function r(e,t,n){var i=t.find(v),r=i.index(l)+e;return n&&(r=Math.max(0,Math.min(i.length-1,r))),i[r]}var o,a,s,l=this,c=n.options.resizable&&n.options.resizable.toolbar,u=i.support.isRtl(n.element)?-1:1,p=t.keyCode;p==d.RIGHT||p==d.LEFT?a=e(l).is(".k-dropdown")?e(l):r(p==d.RIGHT?1*u:-1*u,n.element,!0):!c||p!=d.UP&&p!=d.DOWN?p==d.HOME?(a=n.element.find(v)[0],t.preventDefault()):p==d.END?(o=n.element.find(v).filter(function(){return"hidden"!==e(this).css("visibility")}),a=o[o.length-1],t.preventDefault()):p==d.ESC?(n.overflowPopup&&n.overflowPopup.visible()&&n.overflowPopup.close(),a=n._editor):p!=d.TAB||t.ctrlKey||t.altKey||(s=c&&e(l.parentElement).hasClass("k-overflow-tool-group")?n.overflowPopup.element:n.element,t.shiftKey?a=r(-1,s):(a=r(1,s),a&&"hidden"!==e(a).closest(".k-overflow-tools").css("visibility")||(a=n._editor))):a=r(p==d.DOWN?1:-1,n.overflowPopup.element,!0),a&&(t.preventDefault(),a.focus()),p!==d.ENTER&&p!==d.SPACEBAR||!e(l).is("button")&&!e(l).is("a")||e(l).attr("href")||n._executeToolCommand(l,t)}).on("click"+c,o,function(e){n._executeToolCommand(this,e)}).on("click"+c,a,function(e){e.preventDefault()})},_executeToolCommand:function(t,n){var i=this,r=e(t);n.preventDefault(),n.stopPropagation(),r.removeClass("k-state-hover"),r.is("[data-popup]")||i._editor.exec(i._toolName(t))},_toolName:function(t){var n,r,o;if(t)return n=t.className,/k-tool\b/i.test(n)&&(n=t.firstChild.className),r=e.grep(n.split(" "),function(e){return!/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)}),r[0]?(o=r[0],_[o]&&(o=_[o]),o.indexOf("k-i-")>=0?i.toCamelCase(o.substring(o.indexOf("k-i-")+4)):o.substring(o.lastIndexOf("-")+1)):"custom"},refreshTools:function(){var t=this,n=t._editor,i=n.getRange(),r=o.RangeUtils.textNodes(i),a=n.options.immutables,s=t._immutablesContext(i);r=o.Dom.filterBy(r,o.Dom.htmlIndentSpace,!0),r.length||(r=[i.startContainer]),t.items().each(function(){var n,i=t.tools[t._toolName(this)];i&&(n=e(this),i.update&&i.update(n,r),a&&t._updateImmutablesState(i,n,s))}),this.update()},_immutablesContext:function(e){if(this._editor.options.immutables)return e.collapsed?o.Immutables.immutablesContext(e):0===o.RangeUtils.editableTextNodes(e).length},_updateImmutablesState:function(n,i,r){var a,s,l,d,c,u=n.name,p=i,f=n.options.trackImmutables;if(f===t&&(f=e.inArray(u,o.Immutables.toolsToBeUpdated)>-1),f){if(a=r?"none":"",!i.is(".k-tool")){s=i.data();for(l in s)if(l.match(/^kendo[A-Z][a-zA-Z]*/)){d=s[l],p=d.wrapper;break}}p.css("display",a),c=p.closest("li"),0===c.children(":visible").length&&c.css("display",a)}},update:function(){this.updateGroups()},_resize:function(e){var t=e.width,n=this.options.resizable&&this.options.resizable.toolbar,i=this.overflowPopup,r=this.options.editor.element,o=this.window;this.refreshTools(),n&&(o&&(o.wrapper.width(this._getWindowWidth()),o._moved||o.wrapper.css({left:Math.max(0,parseInt(r.offset().left,10))})),i.visible()&&i.close(!0),this._refreshWidths(),this._shrink(t),this._stretch(t),this._toggleOverflowStyles(this.element,!1),this._toggleOverflowStyles(this.overflowPopup.element,!0),this.element.children("li.k-overflow-tools").css("visibility",i.element.is(":empty")?"hidden":"visible"))},_refreshWidths:function(){this.element.children("li").each(function(t,n){var i=e(n);i.data("outerWidth",h(i,!0))})},_shrink:function(e){var t,n,i;if(e<this._groupsWidth())for(n=this._visibleGroups().filter(":not(.k-overflow-tools)"),i=n.length-1;i>=0&&(t=n.eq(i),!(e>this._groupsWidth()));i--)this._hideGroup(t)},_stretch:function(e){var t,n,i;if(e>this._groupsWidth())for(n=this._hiddenGroups(),i=0;i<n.length&&(t=n.eq(i),!(e<this._groupsWidth())&&this._showGroup(t,e));i++);},_hiddenGroups:function(){var t=this.overflowPopup,n=this.element.children("li.k-tool-group").filter(":hidden");return n=n.add(t.element.children("li")),n.sort(function(t,n){return e(t).data("position")>e(n).data("position")?1:-1}),n},_visibleGroups:function(){return this.element.children("li.k-tool-group, li.k-overflow-tools").filter(":visible")},_groupsWidth:function(){var t=0;return this._visibleGroups().each(function(){t+=e(this).data("outerWidth")}),Math.ceil(t)},_hideGroup:function(e){if(e.data("overflow")){var t=this.overflowPopup;e.detach().prependTo(t.element).addClass("k-overflow-tool-group")}else e.addClass("k-hidden")},_showGroup:function(t,n){var i,r,o;return!!t.hasClass("k-state-disabled")||(t.hasClass("k-overflow-tool-group")?o=t.data("outerWidth"):(t.removeClass("k-hidden"),o=h(t,!0),t.addClass("k-hidden")),!!(t.length&&n>this._groupsWidth()+o)&&(t.hasClass("k-overflow-tool-group")?(i=t.data("position"),0===i?t.detach().prependTo(this.element):(r=this.element.children().filter(function(t,n){return e(n).data("position")===i-1}),t.detach().insertAfter(r)),t.removeClass("k-overflow-tool-group")):t.removeClass("k-hidden"),!0))}}),e.extend(o,{Toolbar:n})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/viewhtml.min",["editor/command.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Command,s=r.Tool,l=r.ToolTemplate,d=r.Dom,c=a.extend({init:function(e){var t=this;t.options=e,a.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){function i(e){p.deserialization.immutables=u.immutables,u.value(h.find(m).val()),p.deserialization.immutables=t,r(e),l.change&&l.change(),u.trigger("change")}function r(e){e.preventDefault(),h.data("kendoWindow").destroy(),u.immutables&&(u.immutables.serializedImmutables={}),u.focus()}var a,s,l=this,u=l.editor,p=u.options,f=u.options.messages,h=e(n.template(c.template)(f)).appendTo(document.body),m=".k-editor-textarea";p.serialization.immutables=u.immutables,s=d.getAllComments(u.body),a=o.cacheComments(u.value(),s),a=c.indent(a),a=o.retrieveComments(a,s),p.serialization.immutables=t,this.createDialog(h,{title:f.viewHtml,width:600,height:400,resizable:!0,close:r,visible:!1}).find(m).val(a).end().find(".k-dialog-update").click(i).end().find(".k-dialog-close").click(r).end().data("kendoWindow").center().open(),h.find(m).focus()}});i(c,{template:"<div class='k-editor-dialog k-popup-edit-form k-viewhtml-dialog'><textarea class='k-textarea k-editor-textarea'></textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #</button><button class='k-dialog-close k-button'>#: dialogCancel #</button></div></div>",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")}}),n.ui.editor.ViewHtmlCommand=c,r.EditorUtils.registerTool("viewHtml",new s({command:c,template:new l({template:o.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/format.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Tool,o=i.Command,a=i.EditorUtils,s=o.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&a.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),o.fn.init.call(this,e)}}),l=r.extend({init:function(e){r.fn.init.call(this,e)},command:function(e){var t=this;return new s(n(e,{formatter:t.options.formatter}))},update:function(e,t){var n=this.options.finder.isFormatted(t);e.toggleClass("k-state-selected",n),e.attr("aria-pressed",n)}});e.extend(i,{FormatCommand:s,FormatTool:l})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/inlineformat.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=t.ui.Editor.fn.options.formats,o=i.EditorUtils,a=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,c=i.RangeUtils,u=e.extend,p=i.EditorUtils.registerTool,f=i.EditorUtils.registerFormat,h="mousedown.kendoEditor",m="keydown.kendoEditor",g="k-marker",v=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,r=0,o=e.parentNode;for(t=o.firstChild;t;t=t.nextSibling)t!=e&&(t.className==g?r++:3==t.nodeType?n++:i++);return r>1&&o.firstChild.className==g&&o.lastChild.className==g?0:i+n},findSuitable:function(e,t){var n,i;if(!t&&this.numberOfSiblings(e)>0)return null;for(n=e.parentNode,i=this.format[0].tags;!d.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,r,o,a=this.format,s=d.attrEquals;for(t=0,n=a.length;t<n;t++){if(i=e,r=a[t].tags,o=a[t].attr,i&&d.ofType(i,r)&&s(i,o))return i;for(;i;)if(i=d.parentOfType(i,r),i&&s(i,o))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;t<n;t++)if(this.findFormat(e[t]))return!0;return!1}}),_=n.extend({init:function(e,t){this.finder=new v(e),this.attributes=u({},e[0].attr,t),this.tag=e[0].tags[0]},wrap:function(e){return d.wrap(e,d.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){this.finder.isFormatted(t)?(this.split(e),this.remove(t)):this.apply(t)},toggle:function(e){var t=this.immutables()?c.editableTextNodes:c.textNodes,n=t(e);n.length>0&&this.activate(e,n)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,n,i,r,o=[];if(e.length>1)for(t=0,n=e.length;t<n;t++)i=e[t],r=this.format(i,!0),o.push(r);else i=e[0],r=this.format(i,!1);this.consolidate(o)},format:function(e,t){var n=this.finder.findSuitable(e),i=this.attributes,r=i?i.style||{}:{};if(n)d.is(n,"font")&&(r.color&&n.removeAttribute("color"),r.fontName&&n.removeAttribute("face"),r.fontSize&&n.removeAttribute("size")),d.attr(n,i);else{for(;!d.isBlock(e.parentNode)&&1==e.parentNode.childNodes.length&&"true"!==e.parentNode.contentEditable&&t;)e=e.parentNode;n=this.wrap(e)}return n},remove:function(e){var t,n,i;for(t=0,n=e.length;t<n;t++)i=this.finder.findFormat(e[t]),i&&(this.attributes&&this.attributes.style?(d.unstyle(i,this.attributes.style),i.style.cssText||i.attributes["class"]||d.unwrap(i)):d.unwrap(i))},split:function(e){var t,n,i=c.textNodes(e),r=i.length;if(r>0)for(t=0;t<r;t++)n=this.finder.findFormat(i[t]),n&&c.split(e,n,!0)},consolidate:function(e){for(var t,n;e.length>1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==g&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText&&t.className===n.className){for(;t.firstChild;)n.appendChild(t.firstChild);d.remove(t)}}}),b=v.extend({init:function(e,t){this.format=e,this.greedyProperty=t,v.fn.init.call(this,e)},getInlineCssValue:function(e){var n,i,r,o,a,s,l,c,u,p,f,h,m=e.attributes,g=t.trim;if(m)for(n=0,i=m.length;n<i;n++)if(r=m[n],o=r.nodeName,a=r.nodeValue,r.specified&&"style"==o)for(s=g(a||e.style.cssText).split(";"),c=0,u=s.length;c<u;c++)if(l=s[c],l.length){if(p=l.split(":"),f=g(p[0].toLowerCase()),h=g(p[1]),f!=this.greedyProperty)continue;return f.indexOf("color")>=0?d.toHex(h):h}},getFormatInner:function(t){var n,i,r,o=e(d.isDataNode(t)?t.parentNode:t),a=o.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=a.length;n<i;n++)if(r="className"==this.greedyProperty?a[n].className:this.getInlineCssValue(a[n]))return r;return"inherit"},getFormat:function(e){var t,n,i=this.getFormatInner(e[0]);for(t=1,n=e.length;t<n;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),k=_.extend({init:function(e,n,i){_.fn.init.call(this,e,n),this.values=n,this.finder=new b(e,i),i&&(this.greedyProperty=t.toCamelCase(i))},activate:function(e,t){var n=this.greedyProperty,i="apply";this.split(e),n&&"inherit"==this.values.style[n]&&(i="remove"),this[i](t)}}),y=l.extend({init:function(e){l.fn.init.call(this,u(e,{finder:new v(e.format),formatter:function(){return new _(e.format)}}))}}),w=a.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),x=w.extend({init:function(e){a.fn.init.call(this,e),this.type=t.support.browser.msie||t.support.touch?"kendoDropDownList":"kendoComboBox",this.format=[{tags:["span","font"]}],this.finder=new b(this.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,r={};return new i.FormatCommand(u(e,{formatter:function(){return r[t.domAttr]=e.value,new k(n,{style:r},t.cssAttr)}}))},initialize:function(e,n){var i,r,o,s=n.editor,l=this.options,d=l.name,c=[];l.defaultValue&&(c=[{text:s.options.messages[l.defaultValue[0].text],value:l.defaultValue[0].value}]),i=c.concat(l.items?l.items:s.options[d]||[]),e.attr({title:n.title}),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:i,change:function(){s._range=r,a.exec(s,d,this.value())},close:function(){setTimeout(function(){s._deleteSavedRange()},0)},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+d).find("*").addBack().attr("unselectable","on"),o=e.data(this.type),o.value("inherit"),o.wrapper.on(h,".k-select,.k-input",function(){var e=s.getRange();r=s._containsRange(e)?e:r}).on(m,function(e){e.keyCode===t.keys.ENTER&&(s._deleteSavedRange(),e.preventDefault())})}}),C=a.extend({init:function(e){a.fn.init.call(this,e),this.format=[{tags:["span","font"]}],this.finder=new b(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,r={};return new i.FormatCommand(u(e,{formatter:function(){return r[t.domAttr]=e.value,new k(n,{style:r},t.cssAttr)}}))},initialize:function(n,i){var r=this,s=i.editor,l=this.name,d=u({},C.fn.options,this.options),c=d.palette,p=d.columns;n=this._widget=new t.ui.ColorPicker(n,{toolIcon:"k-icon k-i-"+o.getToolCssClass(d.name),palette:c,columns:p,change:function(){var e=n.value();t.support.browser.msie&&r.storedRange&&r._inputFocused&&s.selectRange(r.storedRange),e&&a.exec(s,l,e),delete r.storedRange,delete r._inputFocused,s.focus()},open:function(t){var n=t.sender;r.storedRange=s.getRange(),n._popup.element.on(h,function(t){e(t.target).is("input.k-color-value")||t.preventDefault()}),n._popup.element.is("[unselectable='on']")||n._popup.element.attr({unselectable:"on"}).find("*:not(input)").attr("unselectable","on").end().find("input").on("focus",function(){r._inputFocused=!0})},close:function(e){e.sender._popup.element.off(h),t.support.browser.msie&&r.storedRange&&r._inputFocused&&s.selectRange(r.storedRange)},activate:function(e){e.preventDefault(),"rgba(255, 255, 255, 0)"!==e.sender._value.toCssRgba()&&n.trigger("change")}}),n.wrapper.attr({title:i.title,unselectable:"on"}).find("*:not(input)").attr("unselectable","on"),n.value("transparent")}});u(i,{InlineFormatFinder:v,InlineFormatter:_,DelayedExecutionTool:w,GreedyInlineFormatFinder:b,GreedyInlineFormatter:k,InlineFormatTool:y,FontTool:x,ColorTool:C}),f("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),p("bold",new y({key:"B",ctrl:!0,format:r.bold,template:new s({template:o.buttonTemplate,title:"Bold"})})),f("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),p("italic",new y({key:"I",ctrl:!0,format:r.italic,template:new s({template:o.buttonTemplate,title:"Italic"})})),f("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),p("underline",new y({key:"U",ctrl:!0,format:r.underline,template:new s({template:o.buttonTemplate,title:"Underline"})})),f("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),p("strikethrough",new y({format:r.strikethrough,template:new s({template:o.buttonTemplate,title:"Strikethrough"})})),f("superscript",[{tags:["sup"]}]),p("superscript",new y({format:r.superscript,template:new s({template:o.buttonTemplate,title:"Superscript"})})),f("subscript",[{tags:["sub"]}]),p("subscript",new y({format:r.subscript,template:new s({template:o.buttonTemplate,title:"Subscript"})})),p("foreColor",new C({cssAttr:"color",domAttr:"color",name:"foreColor",template:new s({template:o.colorPickerTemplate,title:"Color"})})),p("backColor",new C({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new s({template:o.colorPickerTemplate,title:"Background Color"})})),p("fontName",new x({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new s({template:o.comboBoxTemplate,title:"Font Name"})})),p("fontSize",new x({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new s({template:o.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/link.min",["editor/plugins/inlineformat.min"],e)}(function(){!function(e,t){function n(e,t){for(var n=e.length;n--&&!t.test(e[n]););return n}function i(e,t){var n=t.exec(e);return n?n.index:-1}var r=window.kendo,o=r.Class,a=e.extend,s=e.proxy,l=r.ui.editor,d=l.Dom,c=l.RangeUtils,u=l.EditorUtils,p=l.Command,f=l.Tool,h=l.ToolTemplate,m=l.InlineFormatter,g=l.InlineFormatFinder,v=c.textNodes,_=c.editableTextNodes,b=l.EditorUtils.registerTool,k=r.keys,y="http://",w=/^\w*:\/\//,x=/[\w\/\$\-_\*\?]/i,C=o.extend({findSuitable:function(e){return d.parentOfType(e,["a"])}}),T=o.extend({init:function(){this.finder=new C},apply:function(e,t){var n,i,r,o,a,s,l,u=this.immutables?_(e):v(e);if(t.innerText){for(i=c.documentFromRange(e),n=c.getMarkers(e),e.deleteContents(),o=d.create(i,"a",t),e.insertNode(o),a=o.parentNode,"a"==d.name(a)&&d.insertAfter(o,a),d.emptyNode(a)&&d.remove(a),s=o,l=0;l<n.length;l++)d.insertAfter(n[l],s),s=n[l];n.length&&(d.insertBefore(i.createTextNode("\ufeff"),n[1]||n[0]),d.insertAfter(i.createTextNode("\ufeff"),n[1]||n[0]),e.setStartBefore(n[0]),e.setEndAfter(n[n.length-1]))}else r=new m([{tags:["a"]}],t),r.finder=this.finder,r.apply(u)}}),S=p.extend({init:function(e){var t=this;e.formatter={toggle:function(e){var n=t.immutables()?_(e):v(e);new m([{tags:["a"]}]).remove(n)}},this.options=e,p.fn.init.call(this,e)}}),I=p.extend({init:function(e){var t;this.options=e,p.fn.init.call(this,e),this.formatter=new T,e.url?this.exec=function(){this.formatter.immutables=t&&t.immutables(),this.formatter.apply(e.range,{href:e.url,innerText:e.text||e.url,target:e.target})}:(this.attributes=null,this.async=!0)},_dialogTemplate:function(){return r.template("<div class=\"k-editor-dialog k-popup-edit-form\"><div class=\"k-edit-form-container\"><div class='k-edit-label'><label for='k-editor-link-url'>#: messages.linkWebAddress #</label></div><div class='k-edit-field'><input type='text' class='k-textbox' id='k-editor-link-url'></div><div class='k-edit-label k-editor-link-text-row'><label for='k-editor-link-text'>#: messages.linkText #</label></div><div class='k-edit-field k-editor-link-text-row'><input type='text' class='k-textbox' id='k-editor-link-text'></div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #</label></div><div class='k-edit-field'><input type='text' class='k-textbox' id='k-editor-link-title'></div><div class='k-edit-label'></div><div class='k-edit-field'><input type='checkbox' class='k-checkbox' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #</label></div><div class='k-edit-buttons k-state-default'><button class=\"k-dialog-insert k-button k-primary\">#: messages.dialogInsert #</button><button class=\"k-dialog-close k-button\">#: messages.dialogCancel #</button></div></div></div>")({messages:this.editor.options.messages})},exec:function(){var t,n,i,r,o=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),this.formatter.immutables=this.immutables(),t=v(this._range),n=t.length?this.formatter.finder.findSuitable(t[0]):null,i=t.length&&"img"==d.name(t[0]),r=this.createDialog(this._dialogTemplate(),{title:o.createLink,close:s(this._close,this),visible:!1}),n&&(this._range.selectNodeContents(n),t=v(this._range)),this._initialText=this.linkText(t),r.find(".k-dialog-insert").click(s(this._apply,this)).end().find(".k-dialog-close").click(s(this._close,this)).end().find(".k-edit-field input").keydown(s(this._keydown,this)).end().find("#k-editor-link-url").val(this.linkUrl(n)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(n?n.title:"").end().find("#k-editor-link-target").attr("checked",!!n&&"_blank"==n.target).end().find(".k-editor-link-text-row").toggle(!i),this._dialog=r.data("kendoWindow").center().open(),e("#k-editor-link-url",r).focus().select()},_keydown:function(e){var t=r.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var n,i,o,a=this._dialog.element,s=e("#k-editor-link-url",a).val(),l=e("#k-editor-link-text",a);s&&s!=y&&(s.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(s)&&(s="mailto:"+s),this.attributes={href:s},n=e("#k-editor-link-title",a).val(),n&&(this.attributes.title=n),l.is(":visible")&&(i=r.trim(l.val()),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerText=d.stripBom(i)):this.attributes.innerText=s),o=e("#k-editor-link-target",a).is(":checked"),this.attributes.target=o?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._dialog.destroy(),d.windowFromDocument(c.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):y},linkText:function(e){var t,n="";for(t=0;t<e.length;t++)n+=e[t].nodeValue;return d.stripBom(n||"")},redo:function(){var e=this.lockRange(!0);this.formatter.apply(e,this.attributes),this.releaseRange(e)}}),D=p.extend({init:function(e){p.fn.init.call(this,e),this.formatter=new T},exec:function(){var e,t,n,i=this.detectLink();i&&(e=this.getRange(),t=new r.ui.editor.Marker,n=e.cloneRange(),n.setStart(i.start.node,i.start.offset),n.setEnd(i.end.node,i.end.offset),e=this.lockRange(),t.add(n),this.formatter.apply(n,{href:this._ensureWebProtocol(i.text)}),t.remove(n),this.releaseRange(e))},detectLink:function(){var e,t,n=this.getRange(),i=n.startContainer,r=n.startOffset,o=i.previousSibling;return!o&&(d.isBom(i)&&!i.nextSibling||!r&&d.isDataNode(i))&&(i=i.parentNode,r=0),e=new N({node:i,offset:r,cancelAtNode:function(e){return e&&"a"===d.name(e)}}),t=new E(e),t.detectLink()},changesContent:function(){return!!this.detectLink()},_ensureWebProtocol:function(e){var t=this._hasProtocolPrefix(e);return t?e:this._prefixWithWebProtocol(e)},_hasProtocolPrefix:function(e){return w.test(e)},_prefixWithWebProtocol:function(e){return y+e}}),F=f.extend({init:function(t){this.options=t,this.finder=new g([{tags:["a"]}]),f.fn.init.call(this,e.extend(t,{command:S}))},initialize:function(e,t){f.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){e.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}}),E=o.extend({init:function(e){this.traverser=e,this.start=A(),this.end=A(),this.text=""},detectLink:function(){var t,n,i,r,o=this.traverser.node,a=this.traverser.offset;if(d.isDataNode(o)){if(t=o.data.substring(0,a),/\s{2}$/.test(d.stripBom(t)))return}else 0===a&&(n=d.closestEditableOfType(o,d.blockElements),n&&n.previousSibling&&this.traverser.init({node:n.previousSibling}));return this.traverser.traverse(e.proxy(this._detectEnd,this)),this.end.blank()||(this.traverser=this.traverser.clone(this.end),this.traverser.traverse(e.proxy(this._detectStart,this)),this._isLinkDetected()||(i=this.traverser.extendOptions(this.start),r=new P(i),r.traverse(e.proxy(this._skipStartPuntuation,this)),this._isLinkDetected()||(this.start=A()))),this.start.blank()?null:{start:this.start,end:this.end,text:this.text}},_isLinkDetected:function(){return w.test(this.text)||/^w{3}\./i.test(this.text)},_detectEnd:function(e,t){var i=n(e,x);if(i>-1)return this.end.node=t,this.end.offset=i+1,!1},_detectStart:function(e,t){var i=n(e,/\s/),r=i+1;if(this.text=e.substring(r)+this.text,this.start.node=t,this.start.offset=r,i>-1)return!1},_skipStartPuntuation:function(e,t,n){var r=i(e,/\w/),o=r;if(r===-1&&(o=e.length),this.text=this.text.substring(o),this.start.node=t,this.start.offset=o+(0|n),r>-1)return!1}}),A=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},z=o.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?d.isDataNode(this.node)&&this.node.length||0:n.offset,this.cancelAtNode=n.cancelAtNode||this.cancelAtNode||e.noop},traverse:function(e){e&&(this.cancel=!1,this._traverse(e,this.node,this.offset))},_traverse:function(e,n,i){var r,o,a,s;if(n&&!this.cancel){if(3!==n.nodeType)return o=this.edgeNode(n),this.cancel=this.cancel||this.cancelAtNode(o),this._traverse(e,o);if(r=n.data,i!==t&&(r=this.subText(r,i)),this.cancel=e(r,n,i)===!1,a=this.next(n),!a)for(s=n.parentNode;!a&&d.isInline(s);)a=this.next(s),s=s.parentNode;this.cancel=this.cancel||this.cancelAtNode(a),this._traverse(e,a)}},extendOptions:function(t){return e.extend({node:this.node,offset:this.offset,cancelAtNode:this.cancelAtNode},t||{})},edgeNode:function(e){},next:function(e){},subText:function(e,t){}}),N=z.extend({subText:function(e,t){return e.substring(0,t)},next:function(e){return e.previousSibling},edgeNode:function(e){return e.lastChild},clone:function(e){var t=this.extendOptions(e);
|
27
|
-
return new N(t)}}),P=z.extend({subText:function(e,t){return e.substring(t)},next:function(e){return e.nextSibling},edgeNode:function(e){return e.firstChild},clone:function(e){var t=this.extendOptions(e);return new P(t)}});a(r.ui.editor,{LinkFormatFinder:C,LinkFormatter:T,UnlinkCommand:S,LinkCommand:I,AutoLinkCommand:D,UnlinkTool:F,DomTextLinkDetection:E,LeftDomTextTraverser:N,RightDomTextTraverser:P}),b("createLink",new f({key:"K",ctrl:!0,command:I,template:new h({template:u.buttonTemplate,title:"Create Link"})})),b("unlink",new F({key:"K",ctrl:!0,shift:!0,template:new h({template:u.buttonTemplate,title:"Remove Link"})})),b("autoLink",new f({key:[k.ENTER,k.SPACEBAR],keyPressCommand:!0,command:D}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/formatblock.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t,n=window.kendo,i=n.Class,r=e.extend,o=n.ui.editor,a=n.ui.Editor.fn.options.formats,s=o.Dom,l=o.ToolTemplate,d=o.FormatTool,c=o.EditorUtils,u=c.registerTool,p=c.registerFormat,f=o.RangeUtils,h=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,r;for(n=0,i=t.length;n<i;n++)if(r=t[n],!r||!s.isAncestorOrSelf(e,r))return!1;return!0},findSuitable:function(t){var n,i,r,o,a=this.format,l=[];for(n=0,i=t.length;n<i;n++){for(o=a.length-1;o>=0&&!(r=s.ofType(t[n],a[o].tags)?t[n]:s.closestEditableOfType(t[n],a[o].tags));o--);if(!r||"true"===r.contentEditable)return[];e.inArray(r,l)<0&&l.push(r)}for(this._resolveListsItems(l),n=0,i=l.length;n<i;n++)if(this.contains(l[n],l))return[l[n]];return l},_resolveListsItems:function(e){var t,n,i;for(t=0;t<e.length;t++)n=e[t],i=s.is(n,"li")?n:s.wrapper(n),i=i&&s.list(i)?i.children[0]:i,s.is(i,"li")&&(n=e[t]=i)},findFormat:function(e){var t,n,i,r,a,l,d=this.format,c=s.editableParent(e),u=this.options&&this.options.immutables,p=o.Immutables;for(t=0,n=d.length;t<n;t++){if(i=e,r=d[t].tags,a=d[t].attr,u&&r&&"immutable"==r[0]&&(l=p.immutableParent(i),l&&s.attrEquals(l,a)))return i;for(;i&&s.isAncestorOf(c,i);){if(s.ofType(i,r)&&s.attrEquals(i,a))return i;i=i.parentNode}}return null},getFormat:function(e){var t,n,i=this,r=function(e){return i.findFormat(s.isDataNode(e)?e.parentNode:e)},o=r(e[0]);if(!o)return"";for(t=1,n=e.length;t<n;t++)if(o!=r(e[t]))return"";return o.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;t<n;t++)if(!this.findFormat(e[t]))return!1;return!0}}),m=i.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new h(e)},wrap:function(e,t,n){var i,r,o,a,l,d=1==n.length?s.blockParentOrBody(n[0]):s.commonAncestor.apply(null,n);for(s.isInline(d)&&(d=s.blockParentOrBody(d)),i=s.significantChildNodes(d),r=s.findNodeIndex(i[0]),o=s.create(d.ownerDocument,e,t),a=0;a<i.length;a++)l=i[a],s.isBlock(l)?(s.attr(l,t),o.childNodes.length&&(s.insertBefore(o,l),o=o.cloneNode(!1)),r=s.findNodeIndex(l)+1):o.appendChild(l);o.firstChild&&s.insertAt(d,o,r)},apply:function(t){function n(e){return r({},e&&e.attr,h)}var i,o,a,l,d,u,p,f,h=this.values;if(this._handleImmutables(t,!0),o=s.filter("img",t),a=c.formatByName("img",this.format),l=n(a),e.each(o,function(){s.attr(this,l)}),o.length!=t.length)if(d=s.filter("img",t,!0),u=this.finder.findSuitable(d),u.length)for(p=0,f=u.length;p<f;p++)i=c.formatByName(s.name(u[p]),this.format),s.attr(u[p],n(i));else i=this.format[0],this.wrap(i.tags[0],n(i),d)},_handleImmutables:function(e,t){var n,i,r,a,l;if(this.immutables()&&(n=c.formatByName("immutable",this.format)))for(i=o.Immutables,r=e.length-1,a=r;a>=0;a--)l=i.immutableParent(e[a]),l&&(l!==e[a+1]&&(t?s.attr(l,n.attr):s.unstyle(l,n.attr.style)),e.splice(a,1))},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(e){var t,n,i,r,o;for(this._handleImmutables(e,!1),t=0,n=e.length;t<n;t++)i=this.finder.findFormat(e[t]),i&&(o=s.name(i),r=c.formatByName(o,this.format),r.attr.style&&s.unstyle(i,r.attr.style),r.attr.className&&s.removeClass(i,r.attr.className))},toggle:function(e){var t=this,n=s.filterBy(f.nodes(e),s.htmlIndentSpace,!0);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),g=i.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new h(e)},apply:function(e){var t,n,i,r,a,l,d,c,u,p,f=this.format,h=s.blockParents(e),g=f[0].tags[0];if(h.length)for(t=0,n=h.length;t<n;t++)c=h[t],u=this.immutables()&&o.Immutables.immutableParent(c),u||(d=s.name(c),"li"==d?(i=c.parentNode,r=new o.ListFormatter(i.nodeName.toLowerCase(),g),a=this.editor.createRange(),a.selectNode(h[t]),r.toggle(a)):g&&("td"==d||c.attributes.contentEditable)?new m(f,this.values).apply(c.childNodes):(l=s.changeTag(c,g),s.attr(l,f[0].attr)));else p=new m(f,this.values),p.editor=this.editor,p.apply(e)},toggle:function(e){var t=f.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=f.textNodes(e),t.length||(t=s.significantChildNodes(e.commonAncestorContainer))),this.apply(t)},immutables:function(){return this.editor&&this.editor.options.immutables}}),v=d.extend({init:function(e){d.fn.init.call(this,r(e,{finder:new h(e.format),formatter:function(){return new m(e.format)}}))}});r(o,{BlockFormatFinder:h,BlockFormatter:m,GreedyBlockFormatter:g,BlockFormatTool:v}),t=["ul","ol","li"],p("justifyLeft",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"left",listStylePosition:""}}}]),u("justifyLeft",new v({format:a.justifyLeft,template:new l({template:c.buttonTemplate,title:"Justify Left"})})),p("justifyCenter",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"center",listStylePosition:"inside"}}}]),u("justifyCenter",new v({format:a.justifyCenter,template:new l({template:c.buttonTemplate,title:"Justify Center"})})),p("justifyRight",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"right",listStylePosition:"inside"}}}]),u("justifyRight",new v({format:a.justifyRight,template:new l({template:c.buttonTemplate,title:"Justify Right"})})),p("justifyFull",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"justify"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"justify",listStylePosition:""}}}]),u("justifyFull",new v({format:a.justifyFull,template:new l({template:c.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/lists.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,o=r.Dom,a=r.RangeUtils,s=r.EditorUtils,l=r.Command,d=r.ToolTemplate,c=r.FormatTool,u=r.BlockFormatFinder,p=a.textNodes,f=r.EditorUtils.registerTool,h=u.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];u.fn.init.call(this,[{tags:t}])},isFormatted:function(e){var t,n,i=[];for(n=0;n<e.length;n++)t=this.findFormat(e[n]),t&&o.name(t)==this.tag&&i.push(t);if(i.length<1)return!1;if(i.length!=e.length)return!1;for(n=0;n<i.length&&i[n].parentNode==t.parentNode;n++)if(i[n]!=t)return!1;return!0},findSuitable:function(e){var t=this.findFormat(e[0]);return t&&o.name(t)==this.tag?t:null}}),m=n.extend({init:function(e,t){var n=this;n.finder=new h(e),n.tag=e,n.unwrapTag=t},isList:function(e){return o.list(e)},immutables:function(){return this.editor&&!!this.editor.options.immutables},wrap:function(t,n){var i,a,s=o.create(t.ownerDocument,"li"),l=this.immutables()?r.Immutables.immutable:e.noop;for(i=0;i<n.length;i++)if(a=n[i],o.is(a,"li"))t.appendChild(a);else if(this.isList(a))for(;a.firstChild;)t.appendChild(a.firstChild);else if(o.is(a,"td")){for(;a.firstChild;)s.appendChild(a.firstChild);t.appendChild(s),a.appendChild(t),t=t.cloneNode(!1),s=s.cloneNode(!1)}else s.appendChild(a),o.isBlock(a)&&(t.appendChild(s),l(a)||o.unwrap(a),s=s.cloneNode(!1));s.firstChild&&t.appendChild(s)},containsAny:function(e,t){for(var n=0;n<t.length;n++)if(o.isAncestorOrSelf(e,t[n]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var n=e.nextSibling;if(n&&o.isBlock(n))return!1;if(n=e.previousSibling,n&&o.isBlock(n))return!1}return this.containsAny(e,t)||o.isInline(e)||3==e.nodeType},_parentLists:function(t){var n=o.closestEditable(t);return e(t).parentsUntil(n,"ul,ol")},split:function(e){var t,n,i,r,s,l,d=p(e);if(d.length)for(t=o.parentOfType(d[0],["li"]),n=o.parentOfType(d[d.length-1],["li"]),e.setStartBefore(t),e.setEndAfter(n),r=0,s=d.length;r<s;r++)l=this.finder.findFormat(d[r]),l&&(i=this._parentLists(l),i.length?a.split(e,i.last()[0],!0):a.split(e,l,!0))},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&o.isWhitespace(i));)i=i.previousSibling;if(i&&o.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);o.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&o.isWhitespace(n));)n=n.nextSibling;if(n&&o.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);o.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|thead|tr|td/.test(o.name(e))&&!e.attributes.contentEditable},applyOnSection:function(t,n){function i(){u.push(this)}var r,a,s,l,d=this.tag,c=o.closestSplittableParent(n),u=[],p=this.finder.findSuitable(n);for(p||(p=new h("ul"==d?"ol":"ul").findSuitable(n)),/table|tbody|thead/.test(o.name(c))?r=e.map(n,function(e){return o.parentOfType(e,["td"])}):(r=o.significantChildNodes(c),e.grep(r,o.isBlock).length&&(r=e.grep(r,e.proxy(function(e){return this.containsAny(e,n)},this))),r.length||(r=n)),a=0;a<r.length;a++)s=r[a],l=(!p||!o.isAncestorOrSelf(p,s))&&this.suitable(s,n),l&&(p&&this.isList(s)?(e.each(s.children,i),o.remove(s)):u.push(s));for(u.length==r.length&&this.breakable(c)&&(u=[c]),p||(p=o.create(c.ownerDocument,d),o.isBlock(u[0])&&o.mergeAttributes(u[0],p),o.insertBefore(p,u[0])),this.wrap(p,u);o.isBom(p.nextSibling);)o.remove(p.nextSibling);o.is(p,d)||o.changeTag(p,d),this.merge(d,p)},apply:function(t){function n(){i&&c.push({section:i,nodes:a})}var i,a,s,l,d=0,c=[],u=t.length,p=this.immutables()?r.Immutables.immutableParent:e.noop;for(d=0;d<u;d++)l=p(t[d])||t[d],s=o.closestEditable(l,["td","th","body"]),i&&s==i?a.push(l):(n(),a=[l],i=s);for(n(),d=0;d<c.length;d++)this.applyOnSection(c[d].section,c[d].nodes)},unwrap:function(e){var t,n,i,r,a=e.ownerDocument.createDocumentFragment(),s=this.unwrapTag;for(n=e.firstChild;n;n=n.nextSibling){for(i=o.create(e.ownerDocument,s||"p");n.firstChild;)r=n.firstChild,o.isBlock(r)?(i.firstChild&&(a.appendChild(i),i=o.create(e.ownerDocument,s||"p")),a.appendChild(r)):i.appendChild(r);i.firstChild&&a.appendChild(i)}t=this._parentLists(e),t[0]?(o.insertAfter(a,t.last()[0]),t.last().remove()):o.insertAfter(a,e),o.remove(e)},remove:function(e){var t,n,i;for(n=0,i=e.length;n<i;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t,n=this,i=p(e),r=e.commonAncestorContainer;i.length||(e.selectNodeContents(r),i=p(e),i.length||(t=r.ownerDocument.createTextNode(""),e.startContainer.appendChild(t),i=[t],e.selectNode(t.parentNode))),i=o.filterBy(i,o.htmlIndentSpace,!0),n.finder.isFormatted(i)?(n.split(e),n.remove(i)):n.apply(i)}}),g=l.extend({init:function(e){e.formatter=new m(e.tag),l.fn.init.call(this,e)}}),v=c.extend({init:function(e){this.options=e,c.fn.init.call(this,i(e,{finder:new h(e.tag)}))},command:function(e){return new g(i(e,{tag:this.options.tag}))}});i(r,{ListFormatFinder:h,ListFormatter:m,ListCommand:g,ListTool:v}),f("insertUnorderedList",new v({tag:"ul",template:new d({template:s.buttonTemplate,title:"Insert unordered list"})})),f("insertOrderedList",new v({tag:"ol",template:new d({template:s.buttonTemplate,title:"Insert ordered list"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/formatting.min",["editor/plugins/inlineformat.min"],e)}(function(){!function(e){function t(e){var t,r,o=l.closestEditableOfType(e,["li"]);o&&(t=new i.ListFormatter(l.name(o.parentNode)),r=n.ui.editor.W3CRange.fromNode(e),r.selectNode(o),t.toggle(r))}var n=window.kendo,i=n.ui.editor,r=i.Tool,o=i.ToolTemplate,a=i.DelayedExecutionTool,s=i.Command,l=i.Dom,d=i.EditorUtils,c=i.RangeUtils,u=d.registerTool,p=a.extend({init:function(e){var t=this;r.fn.init.call(t,n.deepExtend({},t.options,e)),t.type="kendoSelectBox",t.finder={getFormat:function(){return""}}},options:{items:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],width:110},toFormattingItem:function(e){var t,n=e.value;return n?e.tag||e.className?e:(t=n.indexOf("."),0===t?e.className=n.substring(1):t==-1?e.tag=n:(e.tag=n.substring(0,t),e.className=n.substring(t+1)),e):e},command:function(t){var n=this,r=t.value;return r=this.toFormattingItem(r),new i.FormatCommand({range:t.range,formatter:function(){var t,o=(r.tag||r.context||"span").split(","),a=[{tags:o,attr:{className:r.className||""}}];return t=e.inArray(o[0],l.inlineElements)>=0?new i.GreedyInlineFormatter(a):new i.GreedyBlockFormatter(a),t.editor=n.editor,t}})},initialize:function(e,t){var i,o=t.editor,a=this.options,s=a.name,l=this;l.editor=o,e.width(a.width),i=e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:a.items||o.options[s],title:o.options.messages[s],autoSize:!0,change:function(){var e=this.dataItem();e&&r.exec(o,s,e.toJSON())},dataBound:function(){var e,t=this.dataSource.data();for(e=0;e<t.length;e++)t[e]=l.toFormattingItem(t[e])},highlightFirst:!1,template:n.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}).data("kendoSelectBox"),e.attr("title",t.title),i.wrapper.attr("title",t.title),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+s).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,n){var i,r,o,a,s,l,d;for(i=0;i<t.length;i++)if(r=t[i],o=r.tag||r.context||"",a=r.className?"."+r.className:"",s=o+a,l=e(n[0]).closest(s)[0]){if(1==n.length)return r.value;for(d=1;d<n.length&&e(n[d]).closest(s)[0];d++)if(d==n.length-1)return r.value}return""},update:function(t,n){var i,r,o,s,d,c=e(t).data(this.type);if(c&&(i=c.dataSource,r=i.data(),d=l.commonAncestor.apply(null,n),d==l.closestEditable(d)||this._ancestor!=d)){for(this._ancestor=d,o=0;o<r.length;o++)s=r[o].context,r[o].visible=!s||!!e(d).closest(s).length;i.filter([{field:"visible",operator:"eq",value:!0}]),a.fn.update.call(this,t,n),c.value(this.getFormattingValue(i.view(),n)),c.wrapper.toggleClass("k-state-disabled",!i.view().length)}},destroy:function(){this._ancestor=null}}),f=s.extend({exec:function(){var e,t,n,i=this.lockRange(!0);for(this.tagsToClean=this.options.remove||"strong,em,span,sup,sub,del,b,i,u,font".split(","),c.wrapSelectedElements(i),e=c.mapAll(i,function(e){return e}),t=e.length-1;t>=0;t--)n=e[t],this.immutableParent(n)||this.clean(n);this.releaseRange(i)},clean:function(n){var r,o,a,s,d;if(n&&!l.isMarker(n)){if(r=l.name(n),"ul"==r||"ol"==r)for(o=new i.ListFormatter(r),a=n.previousSibling,s=n.nextSibling,o.unwrap(n);a&&a!=s;a=a.nextSibling)this.clean(a);else if("blockquote"==r)l.changeTag(n,"p");else if(1!=n.nodeType||l.insignificant(n))t(n);else{for(d=n.childNodes.length-1;d>=0;d--)this.clean(n.childNodes[d]);n.removeAttribute("style"),n.removeAttribute("class")}e.inArray(r,this.tagsToClean)>-1&&l.unwrap(n)}},immutableParent:function(e){return this.immutables()&&i.Immutables.immutableParent(e)}});e.extend(i,{FormattingTool:p,CleanFormatCommand:f}),u("formatting",new p({template:new o({template:d.dropDownListTemplate,title:"Format"})})),u("cleanFormatting",new r({command:f,template:new o({template:d.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/image.min",["kendo.imagebrowser.min","editor/command.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Dom,s=o.registerTool,l=r.ToolTemplate,d=r.RangeUtils,c=r.Command,u=n.keys,p="#k-editor-image-url",f="#k-editor-image-title",h="#k-editor-image-width",m="#k-editor-image-height",g=c.extend({init:function(e){var t=this;c.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n,i=this.attributes,r=d.documentFromRange(t);if(i.src&&"http://"!=i.src){if(n=function(){setTimeout(function(){i.width||e.removeAttribute("width"),i.height||e.removeAttribute("height"),e.removeAttribute("complete")})},!e)return e=a.create(r,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(r.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;e.onload=e.onerror=n,a.attr(e,i),n()}return!1},_dialogTemplate:function(e){return n.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser k-imagebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-image-url">#: messages.imageWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-url"></div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-title"></div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-width"></div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-image-height"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(d.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=parseInt(t.find(h).val(),10),i=parseInt(t.find(m).val(),10);g.attributes={src:t.find(p).val().replace(/ /g,"%20"),alt:t.find(f).val()},g.attributes.width=null,g.attributes.height=null,!isNaN(n)&&n>0&&(g.attributes.width=n),!isNaN(i)&&i>0&&(g.attributes.height=i),_=g.insertImage(b,v),r(e),g.change&&g.change()}function r(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),_||g.releaseRange(v)}function o(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&r(t)}var s,l,c,g=this,v=g.lockRange(),_=!1,b=d.image(v),k=b&&b.getAttribute("width")||"",y=b&&b.getAttribute("height")||"",w=n.support.browser.msie,x=g.editor.options,C=x.messages,T=x.imageBrowser,S=!!(n.ui.ImageBrowser&&T&&T.transport&&T.transport.read!==t),I={title:C.insertImage,visible:!1,resizable:S};this.expandImmutablesIn(v),I.close=r,S&&(I.width=750),s=this.createDialog(g._dialogTemplate(S),I).toggleClass("k-filebrowser-dialog",S).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(p).val(b?b.getAttribute("src",2):"http://").end().find(f).val(b?b.alt:"").end().find(h).val(k).end().find(m).val(y).end().data("kendoWindow"),l=s.element,S&&(this._imageBrowser=new n.ui.ImageBrowser(l.find(".k-imagebrowser"),i({},T)),this._imageBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(p).val(this.value())}),this._imageBrowser.bind("apply",e)),w&&(c=l.closest(".k-window").height(),l.css("max-height",c)),s.center().open(),l.find(p).focus().select()}});n.ui.editor.ImageCommand=g,s("insertImage",new r.Tool({command:g,template:new l({template:o.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/import.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.EditorUtils,s=o.Command,l=o.Tool,d=a.registerTool,c=o.ToolTemplate,u='<div contenteditable="false" class="k-loading-mask" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;"><div class="k-loading-image"></div><div class="k-loading-color"></div></div>',p=s.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,n=t.editor,i=n.options["import"],o=e('<input id="editorImport" name="files" type="file" />').kendoUpload({success:r(t._onUploadSuccess,t),progress:r(t._onUploadProgress,t),select:r(t._onUploadSelect,t),error:r(t._onUploadError,t),complete:r(t._onUploadComplete,t),showFileList:!1,multiple:!1,async:{saveUrl:i.proxyUrl,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:i.allowedExtensions,maxFileSize:i.maxFileSize}}).getKendoUpload();return n._uploadWidget=o,o},_onUploadComplete:function(e){this._trigger("complete",e),e.sender.clearAllFiles(),this._removeLoadingOverlay()},_onUploadSuccess:function(e){this.editor.value(e.response.html.replace(/<\/?body>/gi,"")),this._trigger("success",e)},_onUploadProgress:function(e){this._trigger("progress",e)},_onUploadSelect:function(e){this._trigger("select",e),e.files[0].validationErrors||this._initLoadingOverlay()},_onUploadError:function(e){this._trigger("error",e)},_trigger:function(e,t){var n=this.editor,i=n.options["import"];"function"==typeof i[e]&&i[e].call(n,t)},_initLoadingOverlay:function(){var t=this.editor.body;o.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(u):this._container=e(t).append(u),n.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){n.ui.progress(this._container,!1),e(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});i(o,{ImportCommand:p}),d("import",new l({command:p,template:new c({template:a.buttonTemplate,title:"Import"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/insert.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,r=n.GenericCommand,o=n.EditorUtils,a=o.registerTool,s=n.Tool,l=n.ToolTemplate,d=n.RestorePoint,c=e.extend,u=i.extend({init:function(e){i.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e,t=this.editor,n=this.options,i=n.range,o=t.body,a=new d(i,o),s=n.html||n.value||"";t.selectRange(i),t.clipboard.paste(s,n),n.postProcess&&n.postProcess(t,t.getRange()),e=new r(a,new d(t.getRange(),o)),e.editor=t,t.undoRedoStack.push(e),t.focus()}}),p=s.extend({initialize:function(e,t){var i=t.editor,r=this.options,o=r.items?r.items:i.options.insertHtml;this._selectBox=new n.SelectBox(e,{dataSource:o,dataTextField:"text",dataValueField:"value",change:function(){s.exec(i,"insertHtml",this.value())},title:i.options.messages.insertHtml,highlightFirst:!1}),e.attr("title",t.title),this._selectBox.wrapper.attr("title",t.title)},command:function(e){return new u(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}});c(n,{InsertHtmlCommand:u,InsertHtmlTool:p}),a("insertHtml",new p({template:new l({template:o.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/export.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.EditorUtils,s=o.Command,l=o.Tool,d=a.registerTool,c=o.ToolTemplate,u=[{text:"Docx",value:"docx"},{text:"Rtf",value:"rtf"},{text:"Pdf",value:"pdf"},{text:"Html",value:"html"},{text:"Plain Text",value:"txt"}],p=s.extend({init:function(e){var t=this;t.options=e,s.fn.init.call(t,e),t.attributes=null,t.exportType=e.exportType},exec:function(){var e=this,t=this.lockRange(!0);e.postToProxy(),e.releaseRange(t)},postToProxy:function(){this.generateForm().appendTo("body").submit().remove()},generateForm:function(){var t=this,n=t.editor.options.exportAs,i=e("<form>").attr({action:n&&n.proxyURL||"",method:"POST"});return i.append([t.valueInput(),t.exportTypeInput(),t.fileNameInput()]),i},valueInput:function(){var t=this.editor;return e("<input>").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){var t=this;return e("<input>").attr({value:t.exportType,name:"exportType",type:"hidden"})},fileNameInput:function(){var t=this.editor,n=t.options.exportAs,i=n&&n.fileName||t.element.attr("id")||"editor";return e("<input>").attr({value:i,name:"fileName",type:"hidden"})}}),f=l.extend({init:function(e){var t=this;l.fn.init.call(t,n.deepExtend({},t.options,e)),t.type="kendoSelectBox"},options:{items:u,width:115},command:function(e){var t=e.value;return new o.ExportAsCommand({range:e.range,exportType:t.exportType})},initialize:function(e,t){var i,o=this,a=t.editor,s=o.options,l=s.name,d=r(o.changeHandler,o),c=s.items||a.options[l];c.unshift({text:a.options.messages[l],value:""}),o.editor=a,e.width(s.width),i=e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:c,autoSize:!0,change:d,open:function(e){var t=e.sender;t.items()[0].style.display="none",t.unbind("open")},highlightFirst:!1,template:n.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}).data("kendoSelectBox"),e.attr("title",t.title),i.wrapper.attr("title",t.title),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+l).find("*").addBack().attr("unselectable","on")},changeHandler:function(e){var t=e.sender,n=t.dataItem(),i=n&&n.value;this._exec(i),t.value("")},_exec:function(e){e&&l.exec(this.editor,this.options.name,{exportType:e})},destroy:function(){this._ancestor=null}});i(o,{ExportAsTool:f,ExportAsCommand:p}),d("exportAs",new f({template:new c({template:a.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/indent.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){function n(n,i){var r="rtl"==e(n).css("direction"),o=r?"Right":"Left",a="td"!=s.name(n)?"margin"+o:"padding"+o;return i===t?n.style[a]||0:(i>0?n.style[a]=i+"px":(n.style[a]="",n.style.cssText||n.removeAttribute("style")),t)}var i=window.kendo,r=i.Class,o=e.extend,a=i.ui.editor,s=a.Dom,l=a.EditorUtils,d=l.registerTool,c=a.Command,u=a.Tool,p=a.ToolTemplate,f=a.RangeUtils,h=s.blockElements,m=a.BlockFormatFinder,g=a.BlockFormatter,v=r.extend({init:function(){this.finder=new m([{tags:s.blockElements}])},apply:function(t){var i,r,o,a,l,d,c,u,p,f,h,m;if(t=s.filterBy(t,s.htmlIndentSpace,!0),i=this.finder.findSuitable(t),r=[],i=this.mapImmutables(i),i.length){for(o=0,a=i.length;o<a;o++)s.is(i[o],"li")?e(i[o]).index()?e.inArray(i[o].parentNode,r)<0&&r.push(i[o]):r.push(i[o].parentNode):r.push(i[o]);for(;r.length;)if(l=r.shift(),s.is(l,"li"))if(d=l.parentNode,c=e(l).prev("li"),u=c.find("ul,ol").last(),p=e(l).children("ul,ol")[0],p&&c[0])u[0]?(u.append(l),u.append(e(p).children()),s.remove(p)):(c.append(p),p.insertBefore(l,p.firstChild));else for(p=c.children("ul,ol")[0],p||(p=s.create(l.ownerDocument,s.name(d)),c.append(p));l&&l.parentNode==d;)p.appendChild(l),l=r.shift();else for(f=parseInt(n(l),10)+30,n(l,f),h=0;h<r.length;h++)e.contains(l,r[h])&&r.splice(h,1)}else m=new g([{tags:["p"]}],{style:{marginLeft:30}}),m.apply(t)},mapImmutables:function(t){if(this.immutables){var n=[];return e.map(t,function(t){var i=a.Immutables.immutableParent(t);if(i){if(e.inArray(i,n)!==-1)return null;n.push(i)}return i||t})}return t},remove:function(t){t=s.filterBy(t,s.htmlIndentSpace,!0);var i,r,o,a,l,d,c,u,p=this.finder.findSuitable(t);for(p=this.mapImmutables(p),r=0,o=p.length;r<o;r++){if(c=e(p[r]),c.is("li")){if(a=c.parent(),l=a.parent(),l.is("li,ul,ol")&&!n(a[0])){if(i&&e.contains(i,l[0]))continue;d=c.nextAll("li"),d.length&&e(a[0].cloneNode(!1)).appendTo(c).append(d),l.is("li")?c.insertAfter(l):c.appendTo(l),a.children("li").length||a.remove();continue}if(i==a[0])continue;i=a[0]}else i=p[r];u=parseInt(n(i),10)-30,n(i,u)}}}),_=c.extend({init:function(t){var n=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.apply(f.nodes(e))},n)},c.fn.init.call(this,t)}}),b=c.extend({init:function(t){var n=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.remove(f.nodes(e))},n)},c.fn.init.call(this,t)}}),k=u.extend({init:function(e){u.fn.init.call(this,e),this.finder=new m([{tags:h}])},initialize:function(t,n){u.fn.initialize.call(this,t,n),e.extend(this.options,{immutables:n.editor&&n.editor.options.immutables}),t.addClass("k-state-disabled")},update:function(i,r){var o,l,d,c,u,p,f=this.finder.findSuitable(r);for(d=0,c=f.length;d<c;d++)if(u=f[d],this.options.immutables&&(p=a.Immutables.immutableParent(u),p&&(u=p)),o=n(u),o||(l=e(u).parents("ul,ol").length,o=s.is(u,"li")&&(l>1||n(u.parentNode))||s.ofType(u,["ul","ol"])&&l>0),o)return i.removeClass("k-state-disabled"),t;i.addClass("k-state-disabled").removeClass("k-state-hover")}});o(a,{IndentFormatter:v,IndentCommand:_,OutdentCommand:b,OutdentTool:k}),d("indent",new u({command:_,template:new p({template:l.buttonTemplate,title:"Indent"})})),d("outdent",new k({command:b,template:new p({template:l.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/linebreak.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Dom,o=i.Command,a=i.Tool,s=i.BlockFormatter,l=r.normalize,d=i.RangeUtils,c=i.EditorUtils.registerTool,u=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=r.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){var n,i;if(r.isEmpty(t))e.setStartBefore(t);else{if(e.selectNodeContents(t),n=d.textNodes(e)[0],!n){for(;t.childNodes.length&&!r.is(t.firstChild,"br");)t=t.firstChild;n=t}r.isEmpty(n)?e.setStartBefore(n):(r.emptyNode(n)&&(n.innerHTML="\ufeff"),i=n.firstChild||n,r.isDataNode(i)?e.setStart(i,0):e.setStartBefore(i))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=r.parentOfType(e.startContainer,t),i=r.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(r.isMarker(e)||""===r.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,n,o,a,c,u,p,f,h,m,g,v,_,b,k=this.getRange(),y=d.documentFromRange(k),w=i.emptyElementContent;this.expandImmutablesIn(k),m=this.shouldTrim(k),k.deleteContents(),c=this._insertMarker(y,k),
|
28
|
-
r.stripBomNode(c.previousSibling),r.stripBomNode(c.nextSibling),u=r.closestEditableOfType(c,["li"]),p=r.closestEditableOfType(c,"h1,h2,h3,h4,h5,h6".split(",")),f=r.is(c.parentNode,"table")&&c.parentNode,u?r.emptyNode(u)&&(a=r.create(y,"p"),r.next(u)&&(h=k.cloneRange(),h.selectNode(u),d.split(h,u.parentNode)),g=e("br",u),1==g.length&&g.remove(),v=u.parentNode,_=u.parentNode.children.length,b=_>1&&1==u.childNodes.length&&u.children[0],r.insertAfter(a,v),r.remove(1==_?u.parentNode:u),b&&b!==c?(a.appendChild(b),a.appendChild(c)):a.innerHTML=w,o=a):p&&this._blankAfter(c)?(a=this._insertParagraphAfter(p),r.remove(c),o=a):f&&(a=this._insertParagraphAfter(f),r.remove(c),o=a),o||(u||p||new s([{tags:["p"]}]).apply([c]),k.selectNode(c),t=r.parentOfType(c,[u?"li":p?r.name(p):"p"]),d.split(k,t,m),n=t.previousSibling,r.is(n,"li")&&n.firstChild&&!r.is(n.firstChild,"br")&&(n=n.firstChild),o=t.nextSibling,this.clean(n,{links:!0}),this.clean(o,{links:!0}),r.is(o,"li")&&o.firstChild&&!r.is(o.firstChild,"br")&&(o=o.firstChild),r.remove(t),l(n)),l(o),this._moveFocus(k,o),k.collapse(!0),r.scrollTo(o,!0),d.selectRange(k)},_insertParagraphAfter:function(e){var t=this.getRange(),n=d.documentFromRange(t),o=i.emptyElementContent,a=r.create(n,"p");return r.insertAfter(a,e),a.innerHTML=o,a},clean:function(t,n){var o,a=t;if(t.firstChild&&r.is(t.firstChild,"br")&&r.remove(t.firstChild),r.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(o=!1;t.firstChild&&1==t.firstChild.nodeType;)o=o||r.significantNodes(t.childNodes).length>1,t=t.firstChild;if(r.isEmpty(t)||!/^\s*$/.test(t.innerHTML)||o||(e(a).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=a;){if(r.is(t,"a")&&r.emptyNode(t)){r.unwrap(t);break}t=t.parentNode}}}}),p=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},exec:function(){var e,n,i,o,a,s,c=this.getRange();this.expandImmutablesIn(c),e=r.create(d.documentFromRange(c),"br"),n=c.startContainer,o=t.support.browser,a=o.msie&&o.version<11,s=r.is(n,"table")&&n,c.deleteContents(),s?r.insertAfter(e,s):c.insertNode(e),l(e.parentNode),a||e.nextSibling&&!r.isWhitespace(e.nextSibling)||(i=e.cloneNode(!0),i.className="k-br",r.insertAfter(i,e)),c.setStartAfter(e),c.collapse(!0),r.scrollTo(e.nextSibling||e,!0),d.selectRange(c)}});n(i,{ParagraphCommand:u,NewLineCommand:p}),c("insertLineBreak",new a({key:13,shift:!0,command:p})),c("insertParagraph",new a({key:13,command:u}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/file.min",["kendo.filebrowser.min","editor/plugins/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Dom,s=o.registerTool,l=r.ToolTemplate,d=r.RangeUtils,c=r.Command,u=r.LinkFormatter,p=d.textNodes,f=n.keys,h="#k-editor-file-url",m="#k-editor-file-text",g="#k-editor-file-title",v=c.extend({init:function(e){var t=this;c.fn.init.call(t,e),t.formatter=new u,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=d.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return e=a.create(i,"a",{href:n.href}),e.innerHTML=n.innerHTML,e.title=n.title,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-file-url">#: messages.fileWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-file-url"></div><div class=\'k-edit-label\'><label for="k-editor-file-text">#: messages.fileText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-file-text"></div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #</label></div><div class=\'k-edit-field\'><input type="text" class="k-textbox" id="k-editor-file-title"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();this.formatter.apply(t,this.attributes),e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=t.find(h).val().replace(/ /g,"%20"),i=t.find(m).val(),o=t.find(g).val();u.attributes={href:n,innerHTML:""!==i?i:n,title:o},b=u.insertFile(k,v),r(e),u.change&&u.change()}function r(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),b||u.releaseRange(v)}function o(t){t.keyCode==f.ENTER?e(t):t.keyCode==f.ESC&&r(t)}var s,l,c,u=this,v=u.lockRange(),_=p(v),b=!1,k=_.length?this.formatter.finder.findSuitable(_[0]):null,y=n.support.browser.msie,w=u.editor.options,x=w.messages,C=w.fileBrowser,T=!!(n.ui.FileBrowser&&C&&C.transport&&C.transport.read!==t),S={title:x.insertFile,visible:!1,resizable:T};this.expandImmutablesIn(v),S.close=r,T&&(S.width=750),s=this.createDialog(u._dialogTemplate(T),S).toggleClass("k-filebrowser-dialog",T).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(h).val(k?k.getAttribute("href",2):"http://").end().find(m).val(k?k.innerText:"").end().find(g).val(k?k.title:"").end().data("kendoWindow"),l=s.element,T&&(u._fileBrowser=new n.ui.FileBrowser(l.find(".k-filebrowser"),i({},C)),u._fileBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(h).val(this.value())}),u._fileBrowser.bind("apply",e)),y&&(c=l.closest(".k-window").height(),l.css("max-height",c)),s.center().open(),l.find(h).focus().select()}});n.ui.editor.FileCommand=v,s("insertFile",new r.Tool({command:v,template:new l({template:o.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/tables.min",["editor/plugins/formatblock.min","editor/plugins/insert.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.Dom,s=o.EditorUtils,l=o.RangeUtils,d=o.Command,c="kendoEditor",u="k-state-active",p="k-state-selected",f="scope",h="row",m="col",g="rowgroup",v="colgroup",_="colspan",b="rowspan",k="table",y="thead",w="tbody",x="tr",C="td",T="th",S=o.Tool,I=o.ToolTemplate,D=o.InsertHtmlCommand,F=o.BlockFormatFinder,E=o.EditorUtils.registerTool,A=n.getTouches,z=n.template,N="<td style='width:#=width#%;'>#=content#</td>",P=new F([{tags:[k]}]),H=D.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});D.fn.init.call(this,n)},_tableHtml:function(e,t){var n,i;return e=e||1,t=t||1,n=z(N)({width:100/t,content:o.emptyTableCellContent}),i=100/e,"<table class='k-table' data-last>"+Array(e+1).join("<tr style='height:"+i+"%;'>"+Array(t+1).join(n)+"</tr>")+"</table>"},postProcess:function(t,n){var i=e("table[data-last]",t.document).removeAttr("data-last");n.setStart(i.find(C)[0],0),n.collapse(!0),t.selectRange(n)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),D.fn.exec.call(this)}}),R=S.extend({initialize:function(t,n){var i,a,l,d;S.fn.initialize.call(this,t,n),i=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:r(this._open,this),activate:r(this._activate,this),close:r(this._close,this)}).data("kendoPopup"),t.click(r(this._toggle,this)).keydown(r(this._keydown,this)),a=this._editor=n.editor,this._popup=i,l=new o.TableWizardTool({template:new I({template:s.tableWizardButtonTemplate,title:a.options.messages.tableWizard}),command:o.TableWizardCommand,insertNewTable:!0}),E("tableWizardInsert",l),d=e("<div>"+l.options.template.getHtml()+"</div>"),d.appendTo(i.element),a.toolbar&&a.toolbar.attachToolsEvents(d)},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(u)},_close:function(){this._popup.options.anchor.removeClass(u)},_keydown:function(e){var t=n.keys,i=e.keyCode;i==t.DOWN&&e.altKey?this._popup.open():i==t.ESC&&this._popup.close()},_toggle:function(t){var n=e(t.target).closest(".k-tool");n.hasClass("k-state-disabled")||this.popup().toggle()},update:function(e){var t=this.popup();t.wrapper&&"block"==t.wrapper.css("display")&&t.close(),e.removeClass("k-state-hover")},destroy:function(){this._popup.destroy()}}),O=R.extend({init:function(t){this.cols=8,this.rows=6,R.fn.init.call(this,e.extend(t,{command:H,popupTemplate:"<div class='k-ct-popup'><div>"+Array(this.cols*this.rows+1).join("<span class='k-ct-cell k-state-disabled'></span>")+"</div><div class='k-status'></div></div>"}))},_activate:function(){function t(t){var n=e(window);return{row:Math.floor((t.clientY+n.scrollTop()-u.top)/r)+1,col:Math.floor((t.clientX+n.scrollLeft()-u.left)/i)+1}}var i,r,o=this,a=o._popup.element,s=a.find(".k-ct-cell"),l=s.eq(0),d=s.eq(s.length-1),u=n.getOffset(l),p=n.getOffset(d),f=o.cols,h=o.rows;a.find("*").addBack().attr("unselectable","on"),p.left+=d[0].offsetWidth,p.top+=d[0].offsetHeight,i=(p.left-u.left)/f,r=(p.top-u.top)/h,a.autoApplyNS(c).on("mousemove",".k-ct-cell",function(e){o._setTableSize(t(e))}).on("mouseleave",".k-ct-cell",function(){o._setTableSize()}).on("down",".k-ct-cell",function(e){e.preventDefault();var n=A(e)[0];o._exec(t(n.location))})},_valid:function(e){return e&&e.row>0&&e.col>0&&e.row<=this.rows&&e.col<=this.cols},_exec:function(e){this._valid(e)&&(this._editor.exec("createTable",{rows:e.row,columns:e.col}),this._popup.close())},_setTableSize:function(t){var i=this._popup.element,r=i.find(".k-status"),o=i.find(".k-ct-cell"),a=this.cols,s=this._editor.options.messages;this._valid(t)?(r.text(n.format(s.createTableHint,t.row,t.col)),o.each(function(n){e(this).toggleClass(p,n%a<t.col&&n/a<t.row)})):(r.text(s.createTable),o.removeClass(p))},_keydown:function(e){var t,i,r,o,a,s,l,d;R.fn._keydown.call(this,e),this._popup.visible()&&(t=n.keys,i=e.keyCode,r=this._popup.element.find(".k-ct-cell"),o=Math.max(r.filter(".k-state-selected").last().index(),0),a=Math.floor(o/this.cols),s=o%this.cols,l=!1,i!=t.DOWN||e.altKey?i==t.UP?(l=!0,a--):i==t.RIGHT?(l=!0,s++):i==t.LEFT&&(l=!0,s--):(l=!0,a++),d={row:Math.max(1,Math.min(this.rows,a+1)),col:Math.max(1,Math.min(this.cols,s+1))},i==t.ENTER?this._exec(d):this._setTableSize(d),l&&(e.preventDefault(),e.stopImmediatePropagation()))},_open:function(){var e=this._editor.options.messages;R.fn._open.call(this),this.popup().element.find(".k-status").text(e.createTable).end().find(".k-ct-cell").removeClass(p)},_close:function(){R.fn._close.call(this),this.popup().element.off("."+c)}}),M=d.extend({undo:function(){var t=this.restorePoint;t.restoreHtml(),e(this.editor.body).find(".k-table-resize-handle-wrapper").each(function(e,t){t.remove()}),this.editor.selectRange(t.toRange())},_clearColIndexAttr:function(e){a.clearTableMappings(e,"col-index")},_mapColIndices:function(e){a.reMapTableColumns(e,"col-index")},_findRowSpanCell:function(t,n,i){var r,o,a;for(a=n;a>=0;a--)if(r=t.rows[a],o=e(r).find("[col-index="+i+"]"),o.length)return o},_resetTableResizing:function(e){e._destroyResizings(),e._initializeColumnResizing(),e._initializeRowResizing(),e._initializeTableResizing()},_findNextTdInRow:function(e,t){var n,i,r=e.find("td:last-child"),o=parseInt(r.attr("col-index"),10)+r.prop("colSpan")-1;for(i=t;i<=o;i++)if(n=e.find("[col-index="+i+"]"),n.length)return n},_adjustColgroups:function(e,t){for(var n,i,r,o=t.getElementsByTagName(m),s=t.getElementsByTagName(v),l=e.cells,d=l.length;o.length>0;)o[0].remove();for(;s.length>0;)s[0].remove();for(n=d-1;n>=0;n--)r=l[n],r.getAttribute(f)===v?(i=a.createEmptyNode(this.editor.document,v),i.setAttribute("span",r.getAttribute(_)),t.prepend(i)):t.prepend(a.createEmptyNode(this.editor.document,m))},_associateHeaderIds:function(t){a.clearTableMappings(t,"col-index"),a.reMapTableColumns(t,"col-index"),e(t).find("th, td").removeAttr("id headers"),a.associateWithIds(t)},_getNumberOfColumns:function(e){return a._getNumberOfColumns(e,"td, th")}}),B=M.extend({exec:function(){var n,i,r,s,l,d,c,u,p=this.lockRange(!0),m=a.closest(p.endContainer,[C,T]),v=a.closest(m,k),_=this.options.position||"after";if(!v||this.immutables()&&o.Immutables.immutableParent(m))return this.releaseRange(p),t;for(this._mapColIndices(v),i=m.parentNode,l=a.findNodeIndex(i,!0),m.rowSpan>1&&"after"===_&&(i=v.rows[l+m.rowSpan-1]),n=this._getNumberOfColumns(v),s=i.cloneNode(!0),e(s).empty(),u=0;u<n;u+=r.prop("colSpan"))r=e(i).find("[col-index="+u+"]"),r.length?r.prop("rowSpan")>1&&"after"===_&&r?r.attr(b,r.prop("rowSpan")+1):this._appendCell(s,r):(l=a.findNodeIndex(i,!0),r=this._findRowSpanCell(i.parentElement,l,u),d=r.closest(x).index(),d+r.prop("rowSpan")-1===l&&"after"===_?this._appendCell(s,r):r.attr(b,r.prop("rowSpan")+1)),c=e(s).find("[col-index="+u+"]"),c.attr(f)!==g||c.attr(b)||c.attr(f,h);"before"==_?a.insertBefore(s,i):a.insertAfter(s,i),e(v).find("[headers]").length>0&&this._associateHeaderIds(v),this._clearColIndexAttr(v),this.releaseRange(p),this._resetTableResizing(this.editor)},_appendCell:function(e,t){var n;n=t.clone(),n.html(o.emptyTableCellContent),n.removeAttr(b),n.appendTo(e)}}),L=M.extend({exec:function(){var n,i,r,s,l=this.lockRange(!0),d=a.closest(l.endContainer,[C,T]),c=a.closest(d,k),u=c.getElementsByTagName(m),p=c.getElementsByTagName(v),h=c&&c.rows,g=this.options.position||"after";if(!d||this.immutables()&&o.Immutables.immutableParent(d))return this.releaseRange(l),t;for(this._mapColIndices(c),n=parseInt(d.getAttribute("col-index"),10),d.colSpan>1&&"after"===g&&(d.setAttribute("col-index",n+d.colSpan-1),n=n+d.colSpan-1),i=0;i<h.length;i++)r=this._processForColSpan(h[i],n,g,d),r&&(s=r.cloneNode(),s.innerHTML=o.emptyTableCellContent,s.removeAttribute(_),s.getAttribute(f)&&s.getAttribute(f)===v&&s.setAttribute(f,m),"before"==g?a.insertBefore(s,r):a.insertAfter(s,r),this._resizeCells(s,r));(u.length>0||p.length>0)&&this._adjustColgroups(h[0],c),e(c).find("[headers]").length>0&&this._associateHeaderIds(c),this._clearColIndexAttr(c),this.releaseRange(l),this._resetTableResizing(this.editor)},_processForColSpan:function(n,i,r,o){var a,s,l=i-1;if(a=e(n).find("[col-index="+i+"]")[0],a&&a.colSpan>1&&"after"===r&&a!==o)return a.colSpan+=1,t;if(a)return a;for(l;l>=0&&(a=e(n).find("[col-index="+l+"]")[0],!(a&&a.colSpan>1));l--);return a?(s=parseInt(a.getAttribute("col-index"),10)+a.colSpan-1,s===i&&"after"===r?a:(i<=s&&a.setAttribute(_,a.colSpan+1),t)):t},_resizeCells:function(e,t){var n,i,r,o=e.style.width;o&&(n=parseFloat(o),i=o.slice((""+n).length),r=n/2+i,e.style.width=r,t.style.width=r)}}),V=M.extend({exec:function(){var n,i,r,s=this.lockRange(),d=l.mapAll(s,function(t){return e(t).closest(x)[0]}),c=a.closest(s.endContainer,[C,T]),u=d[0],p=c?c.rowSpan:1,f=e(d[0]).index(),h=a.closest(u,k),m=u.parentElement;if(!h||this.immutables()&&o.Immutables.immutableParent(u))return this.releaseRange(s),t;for(i=0;i<p;i++)d.indexOf(m.rows[f+i])<0&&d.push(m.rows[f+i]);if(h.rows.length<=d.length)n=a.next(h),n&&!a.insignificant(n)||(n=a.prev(h)),a.remove(h),this._resetTableResizing(this.editor);else if(m.rows.length<=d.length)n=m.nextSibling,n||(n=m.previousSibling),a.remove(m);else{for(this._mapColIndices(h),r=0;r<d.length;r++)u=d[r],a.removeTextSiblings(u),n=a.next(u)||a.prev(u),n=n.cells[0],this._focusElement(s,n),n=null,this._handleRowSpanCells(h,u),a.remove(u);this._clearColIndexAttr(h)}e(h).find("[headers]").length>0?this._associateHeaderIds(h):a.is(m,y)&&e(h).find("[scope]").length>0&&this._adjustColgroups(m.rows[0],h),n&&this._focusElement(s,n),this._resetTableResizing(this.editor)},_focusElement:function(e,t){e.setStart(t,0),e.collapse(!0),this.editor.selectRange(e)},_handleRowSpanCells:function(t,n){var i,r,o,s,l=a.findNodeIndex(n,!0),d=t.rows[0],c=d.cells[d.cells.length-1],u=parseInt(c.getAttribute("col-index"),10)+c.colSpan-1;for(i=0;i<=u;i+=r.prop("colSpan"))r=e(n).find("[col-index="+i+"]"),r.length&&r.prop("rowSpan")>1&&(s=t.rows[l+1],o=e(s).find("[col-index="+(i+1)+"]"),o.length?o.before(r):e(s).append(r),this._reduceRowSpan(r)),r.length||(r=this._findRowSpanCell(n.parentElement,l,i),this._reduceRowSpan(r))},_reduceRowSpan:function(e){var t=e.prop("rowSpan")-1;t<=1?(e.removeAttr(b),e.attr(f)===g&&e.attr(f,h)):e.attr(b,t)}}),U=M.extend({exec:function(){var n,i,r,s,l=this.lockRange(),d=a.closest(l.endContainer,[C,T]),c=a.closest(d,k),u=c&&c.rows,p=a.findNodeIndex(d,!0),f=u&&u[0].cells.length,h=c.getElementsByTagName(m),g=c.getElementsByTagName(v);if(!d||this.immutables()&&o.Immutables.immutableParent(d))return this.releaseRange(l),t;if(1==f||d.colSpan==f)n=a.next(c),n&&!a.insignificant(n)||(n=a.prev(c)),a.remove(c),this._resetTableResizing(this.editor);else{for(a.removeTextSiblings(d),n=a.next(d)||a.prev(d),this._mapColIndices(c),p=parseInt(d.getAttribute("col-index"),10),s=0;s<d.colSpan;s++)for(i=0;i<u.length;i+=r.prop("rowSpan")||1)r=e(u[i]).find("[col-index="+(p+s)+"]"),r.length&&r.prop("colSpan")<=1?r.remove():this._handleColSpanCells(u[i],p+s);this._clearColIndexAttr(c)}(h.length>0||g.length>0)&&this._adjustColgroups(u[0],c),e(c).find("[headers]").length>0&&this._associateHeaderIds(c),n&&(l.setStart(n,0),l.collapse(!0),this.editor.selectRange(l)),this._resetTableResizing(this.editor)},_handleColSpanCells:function(n,i){var r,o,a=e(n).find("[col-index="+i+"]");if(a.length&&a.prop("colSpan")>1)return r=a.clone(!0),a.after(r),this._reduceColSpan(r),r.attr("col-index",parseInt(a.attr("col-index"),10)+1),a.remove(),t;for(o=i;o>=0;o--)if(a=e(n).find("[col-index="+o+"]"),a.length)return this._reduceColSpan(a),a.attr("col-index",parseInt(a.attr("col-index"),10)+1),t},_reduceColSpan:function(e){var t=e.prop("colSpan")-1;t<=1?(e.removeAttr(_),e.attr(f)===v&&e.attr(f,m)):e.attr(_,t)}}),W=M.extend({exec:function(){var n,i,r,s,l,d=this.lockRange(),c=a.closest(d.endContainer,[C,T]);return c?(n=a.closest(c,k),i=c.parentNode,r=a.findNodeIndex(c,!0),s=i.children[r+1],this.immutables()&&o.Immutables.immutableParent(c)?(this.releaseRange(d),t):(this._mapColIndices(n),r=parseInt(e(c).attr("col-index"),10),s=e(i).find("[col-index="+(r+1+this._getColspan(c)-1)+"]").get(0),s&&s.rowSpan===c.rowSpan&&c.tagName===s.tagName?(l=this._getColspan(c)+this._getColspan(s),e(c).prop(_,l).append(a.emptyNode(s)?"":"<br/>"+s.innerHTML),e(c).width(c.offsetWidth),e(s).remove(),c.getAttribute(f)===m&&c.setAttribute(f,v),c.getAttribute(f)===v&&this._adjustColgroups(i,n),e(n).find("[headers]").length>0&&this._associateHeaderIds(n),this._clearColIndexAttr(n),this.releaseRange(d),this._resetTableResizing(this.editor),t):(this._clearColIndexAttr(n),this.releaseRange(d),t))):(this.releaseRange(d),t)},_getColspan:function(e){return parseInt(e.getAttribute(_),10)||1}}),j=M.extend({exec:function(){var n,i,r,s,l,d,c,u=this.lockRange(),p=a.closest(u.endContainer,[C,T]);return p?(n=a.closest(p,x),i=a.closest(p,[y,w]),r=a.closest(p,k),s=a.findNodeIndex(p,!0),l=a.findNodeIndex(n,!0),l+1===i.rows.length?(this.releaseRange(u),t):(d=i.rows[l+this._getRowspan(p)],c=d&&d.children[s],this.immutables()&&o.Immutables.immutableParent(p)?(this.releaseRange(u),t):(this._mapColIndices(r),s=e(p).attr("col-index"),c=e(d).find("[col-index="+s+"]").get(0),c&&c.colSpan===p.colSpan&&p.tagName===c.tagName?(e(p).prop(b,this._getRowspan(p)+this._getRowspan(c)).append(a.emptyNode(c)?"":"<br/>"+c.innerHTML),p.getAttribute(f)===h&&p.setAttribute(f,g),e(c).remove(),e(r).find("[headers]").length>0&&this._associateHeaderIds(r),this._clearColIndexAttr(r),this.releaseRange(u),t):(this._clearColIndexAttr(r),this.releaseRange(u),t)))):(this.releaseRange(u),t)},_getRowspan:function(e){return parseInt(e.getAttribute(b),10)||1}}),q=M.extend({exec:function(){var n=this.lockRange(),i=this.options.type,r="row"===i?_:b,s=a.closest(n.endContainer,[C,T]),l=a.closest(s,[y,w]),d=a.closest(s,k),c=a.createEmptyNode(this.editor.document,s.nodeName.toLowerCase());return!s||this.immutables()&&o.Immutables.immutableParent(s)?(this.releaseRange(n),t):(this._mapColIndices(d),"row"===i&&e(s).is("["+r+"]")?this._splitCellHorizontally(s,l,r,c):"column"===i&&e(s).is("["+r+"]")&&this._splitCellVertically(s,l,r,c),e(s).prop(r.toLowerCase())<=1&&e(s).removeAttr(r),e(d).find("[headers]").length>0&&this._associateHeaderIds(d),this._clearColIndexAttr(d),this.releaseRange(n),t)},_getRowspanValue:function(e){return parseInt(e.getAttribute(b),10)},_getColspanValue:function(e){return parseInt(e.getAttribute(_),10)},_splitCellHorizontally:function(t,n,i,r){var o=t.rowSpan,a=t.colSpan,s=e(r),l=Math.floor(a/2);l>1&&s.attr(_,l),o>1&&s.attr(b,o),e(t).prop(i,a-l).after(s),e(t).width(t.offsetWidth),s.width(s[0].offsetWidth),t.hasAttribute(f)&&(t.getAttribute(f)===v?(s.attr(f,m),t.getAttribute(_)&&"1"!==t.getAttribute(_)||t.setAttribute(f,m),this._adjustColgroups(t.parentNode,n.parentNode)):s.attr(f,t.getAttribute(f)))},_splitCellVertically:function(t,n,i,r){var o=a.closest(t,x),s=parseInt(e(t).attr("col-index"),10),l=a.findNodeIndex(o,!0),d=t.rowSpan,c=t.colSpan,u=Math.floor(d/2),p=e(n).find(x).eq(l+d-u),m=this._findNextTdInRow(p,s+c),v=e(r);u>1&&v.attr(b,u),c>1&&v.attr(_,c),m&&m.length?m.before(v):p.append(v),e(t).prop(i,d-u),t.hasAttribute(f)&&(t.getAttribute(f)===g?(v.attr(f,h),t.getAttribute(b)&&"1"!==t.getAttribute(b)||t.setAttribute(f,h)):v.attr(f,t.getAttribute(f)))}}),G=S.extend({command:function(e){var t={row:{insert:B,"delete":V,merge:W,split:q},column:{insert:L,"delete":U,merge:j,split:q}};return e=i(e,this.options),e.action=e.action||"insert",new t[e.type][e.action](e)},initialize:function(e,t){S.fn.initialize.call(this,e,t),e.addClass("k-state-disabled"),e.attr("disabled","disabled")},update:function(e,t){var n=!P.isFormatted(t);n===!0?(e.parent().addClass("k-hidden k-state-disabled"),e.attr("disabled","disabled"),e.addClass("k-state-disabled")):(e.parent().removeClass("k-hidden k-state-disabled"),e.removeAttr("disabled"),e.removeClass("k-state-disabled"))}});i(n.ui.editor,{PopupTool:R,TableCommand:H,InsertTableTool:O,TableModificationTool:G,InsertRowCommand:B,InsertColumnCommand:L,DeleteRowCommand:V,DeleteColumnCommand:U,MergeCellsHorizontallyCommand:W,MergeCellsVerticallyCommand:j,SplitCellCommand:q}),E("createTable",new O({template:new I({template:s.buttonTemplate,popup:!0,title:"Create table"})})),E("addColumnLeft",new G({type:"column",position:"before",template:new I({template:s.buttonTemplate,title:"Add column on the left"})})),E("addColumnRight",new G({type:"column",template:new I({template:s.buttonTemplate,title:"Add column on the right"})})),E("addRowAbove",new G({type:"row",position:"before",template:new I({template:s.buttonTemplate,title:"Add row above"})})),E("addRowBelow",new G({type:"row",template:new I({template:s.buttonTemplate,title:"Add row below"})})),E("deleteRow",new G({type:"row",action:"delete",template:new I({template:s.buttonTemplate,title:"Delete row"})})),E("deleteColumn",new G({type:"column",action:"delete",template:new I({template:s.buttonTemplate,title:"Delete column"})})),E("mergeCellsHorizontally",new G({type:"row",action:"merge",template:new I({template:s.buttonTemplate,title:"Merge Cell Right"})})),E("mergeCellsVertically",new G({type:"column",action:"merge",template:new I({template:s.buttonTemplate,title:"Merge Cell Down"})})),E("splitCellHorizontally",new G({type:"row",action:"split",template:new I({template:s.buttonTemplate,title:"Split Cell"})})),E("splitCellVertically",new G({type:"column",action:"split",template:new I({template:s.buttonTemplate,title:"Split Cell"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/clipboard.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=i.RangeUtils,o=i.Dom,a=i.RestorePoint,s=i.Marker,l=t.support.browser,d=e.extend,c=n.extend({init:function(e){this.editor=e;var t=e.options.pasteCleanup;this.cleaners=[new p(t),new f(t),new h(t),new m(t),new v(t),new _(t),new w(t),new x(t)]},htmlToFragment:function(e){var t=this.editor,n=t.document,i=o.create(n,"div"),r=n.createDocumentFragment();for(i.innerHTML=e;i.firstChild;)r.appendChild(i.firstChild);return r},isBlock:function(e){return/<(div|p|ul|ol|table|h[1-6])/i.test(e)},_startModification:function(){var e,t,n=this.editor;if(!this._inProgress)return this._inProgress=!0,e=n.getRange(),t=new a(e,n.body),o.persistScrollTop(n.document),{range:e,restorePoint:t}},_endModification:function(e){i._finishUpdate(this.editor,e.restorePoint),this.editor._selectionChange(),this._inProgress=!1},_contentModification:function(e,t){var n=this,i=n.editor,r=n._startModification();r&&(e.call(n,i,r.range),setTimeout(function(){t.call(n,i,r.range),n._endModification(r)}))},_removeBomNodes:function(e){var t,n=r.textNodes(e);for(t=0;t<n.length;t++)n[t].nodeValue=o.stripBom(n[t].nodeValue)||n[t].nodeValue},_onBeforeCopy:function(e){var t=new s;t.add(e),this._removeBomNodes(e),t.remove(e),this.editor.selectRange(e)},oncopy:function(){this._onBeforeCopy(this.editor.getRange())},oncut:function(){this._onBeforeCopy(this.editor.getRange()),this._contentModification(e.noop,e.noop)},_fileToDataURL:function(t){var n=e.Deferred(),i=new FileReader;return t instanceof window.File||!t.getAsFile||(t=t.getAsFile()),i.onload=e.proxy(n.resolve,n),i.readAsDataURL(t),n.promise()},_triggerPaste:function(e,t){var n={html:e||""};n.html=n.html.replace(/\ufeff/g,""),this.editor.trigger("paste",n),this.paste(n.html,t||{})},_handleImagePaste:function(e){var t,n;if("FileReader"in window&&!(l.msie&&l.version>10))return t=e.clipboardData||e.originalEvent.clipboardData||window.clipboardData||{},n=t.items||t.files,this._insertImages(n)},_insertImages:function(t){var n,i,r;if(t&&(n=e.grep(t,function(e){return/^image\//i.test(e.type)}),i=e.grep(t,function(e){return/^text\/html/i.test(e.type)}),!i.length&&n.length&&(r=this._startModification())))return e.when.apply(e,e.map(n,this._fileToDataURL)).done(e.proxy(function(){var t=Array.prototype.slice.call(arguments),n=e.map(t,function(e){return'<img src="'+e.target.result+'" />'}).join("");this._triggerPaste(n),this._endModification(r)},this)),!0},onpaste:function(n){if("false"!==this.editor.body.contentEditable){if(this._handleImagePaste(n))return void n.preventDefault();this.expandImmutablesIn(),this._contentModification(function(i,r){var a,s,l,d=o.create(i.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),c=t.support.browser,u=i.body;this._decoreateClipboardNode(d,u),u.appendChild(d),c.webkit&&this._moveToCaretPosition(d,r),c.msie&&c.version<11?(n.preventDefault(),a=i.createRange(),a.selectNodeContents(d),i.selectRange(a),s=i.document.body.createTextRange(),s.moveToElementText(d),e(u).unbind("paste"),s.execCommand("Paste"),e(u).bind("paste",e.proxy(this.onpaste,this))):(l=i.createRange(),l.selectNodeContents(d),i.selectRange(l)),r.deleteContents()},function(t,n){var i,r="";t.selectRange(n),i=e(t.body).children(".k-paste-container"),i.each(function(){var e=this.lastChild;e&&o.is(e,"br")&&o.remove(e),r+=this.innerHTML}),i.remove(),this._triggerPaste(r,{clean:!0})})}},ondragover:function(e){(l.msie||l.edge)&&(e.stopPropagation(),e.preventDefault())},ondrop:function(e){var t,n;"FileReader"in window&&(t=(e.originalEvent||e).dataTransfer||{},n=t.items||t.files,this._insertImages(n)&&e.preventDefault())},_decoreateClipboardNode:function(t,n){var i,r,o,a;(l.msie||l.webkit)&&(t=e(t),t.css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),l.msie&&(i=e(n.ownerDocument.documentElement),t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"}),r=i.css("color"),r&&t.css("color",r),o=i.css("fontFamily"),o&&t.css("fontFamily",o),a=i.css("fontSize"),a&&t.css("fontSize",a)))},_moveToCaretPosition:function(t,n){var i=this,r=i.editor.body,a=o.offset(t,r),s=i._caretOffset(n,r),l=s.left-a.left,d=s.top-a.top,c="translate("+l+"px,"+d+"px)";e(t).css({"-webkit-transform":c,transform:c})},_caretOffset:function(e,t){var n,i,r,a,s,l,d=this.editor,c=o.create(d.document,"span",{innerHTML:"\ufeff"}),u=e.startContainer;return e.collapsed?(i=o.isDataNode(u),i&&(o.isBom(u)||0===e.startOffset)?o.insertBefore(c,u):i&&e.startOffset===u.length?o.insertAfter(c,u):(e.insertNode(c),n=!0)):(u=u===t?u.childNodes[e.startOffset]:u,o.insertBefore(c,u)),r=o.offset(c,t),a=c.previousSibling,s=c.nextSibling,o.remove(c),n&&o.isDataNode(a)&&o.isDataNode(s)&&!o.isBom(a)&&!o.isBom(s)&&(l=a.length,s.data=a.data+s.data,e.setStart(s,l),o.remove(a),e.collapse(!0),d.selectRange(e)),r},expandImmutablesIn:function(e){var n,i,r,o=this.editor;o&&o.options.immutables&&(n=o.body,e=e||o.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===n&&0===e.startOffset&&(i=n.ownerDocument,r=i.createTextNode("\ufeff"),n.insertBefore(r,n.childNodes[0]),e.setStartBefore(r)),o.selectRange(e))},splittableParent:function(e,t){var n,i;if(e)return o.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,o.isInline(n))for(;n.parentNode!=i&&!o.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,a,l,c,u,p,f,h,m,g,v,_,b,k,y,w,x,C=this.editor;if(this.expandImmutablesIn(),n=d({clean:!1,split:!0},n),!n.skipCleaners)for(i=0,a=this.cleaners.length;i<a;i++)this.cleaners[i].applicable(t)&&(t=this.cleaners[i].clean(t));if(n.clean&&(t=t.replace(/(<br>(\s| )*)+(<\/?(div|p|li|col|t))/gi,"$3"),t=t.replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=t.replace(/<(a|span|font)([^>]*)> <\/\1>/gi,"<$1$2> </$1>"),t=t.replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>"),c=this.isBlock(t),C.focus(),u=C.getRange(),u.deleteContents(),u.startContainer==C.document&&u.selectNodeContents(C.body),p=new s,f=p.addCaret(u),h=this.splittableParent(c,f),m=!1,g=h!=C.body&&!o.is(h,"td"),n.split&&g&&(c||o.isInline(h))&&(u.selectNode(f),r.split(u,h,!0),m=!0),v=this.htmlToFragment(t),v.firstChild&&"k-paste-container"===v.firstChild.className){for(_=[],i=0,a=v.childNodes.length;i<a;i++)_.push(v.childNodes[i].innerHTML);v=this.htmlToFragment(_.join("<br />"))}if(l=v.childNodes,e(l).filter("table").addClass("k-table").end().find("table").addClass("k-table"),e(l).each(function(e,t){o.isBlock(t)&&!o.isSelfClosing(t)&&""===t.innerHTML&&t.appendChild(C.document.createTextNode("\ufeff"))}),u.insertNode(v),h=this.splittableParent(c,f),m){for(;f.parentNode!=h;)o.unwrap(f.parentNode);o.unwrap(f.parentNode)}if(o.normalize(u.commonAncestorContainer),f.style.display="inline",o.restoreScrollTop(C.document),o.scrollTo(f),p.removeCaret(u),b=u.commonAncestorContainer.parentNode,(u.collapsed&&"tbody"==o.name(b)||u.collapsed&&"thead"==o.name(b))&&(u.setStartAfter(e(b).closest("table")[0]),u.collapse(!0)),k=e(u.commonAncestorContainer.parentNode).closest("table"),k.get(0)){for(y=k.parent().contents(),w=y.length-1,x=y.get(w);null!==x.nodeValue&&(" "===x.nodeValue||""===x.nodeValue);)w-=1,x=y.get(w);x!==k.get(0)||k.parents("table").length||o.insertAfter(o.createEmptyNode(C.document,"p"),k[0])}C.selectRange(u)}}),u=n.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var n,i,r=this,o=t||r.replacements;for(n=0,i=o.length;n<i;n+=2)e=e.replace(o[n],o[n+1]);return e}}),p=u.extend({init:function(e){u.fn.init.call(this,e),this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/<script[^>]*>/i.test(e)}}),f=u.extend({init:function(e){u.fn.init.call(this,e);var t=" ";this.replacements=[/<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi,t,/\t/gi,t,/ /gi,t]},applicable:function(e){return/ |class="?Apple-tab-span/i.test(e)}}),h=u.extend({init:function(e){u.fn.init.call(this,e),
|
29
|
-
this.junkReplacements=[/<\?xml[^>]*>/gi,"",/<!--(.|\n)*?-->/g,"",/"/g,"'",/<o:p> <\/o:p>/gi," ",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,""],this.replacements=this.junkReplacements.concat([/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1",/<br><br>/g,"<BR><BR>",/<br>(?!\n)/g," ",/<table([^>]*)>(\s| )+<t/gi,"<table$1><t",/<tr[^>]*>(\s| )*<\/tr>/gi,"",/<tbody[^>]*>(\s| )*<\/tbody>/gi,"",/<table[^>]*>(\s| )*<\/table>/gi,"",/<BR><BR>/g,"<br>",/^\s*( )+/gi,"",/( |<br[^>]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/style=(["|'])\s*\1/g,"",/(<br[^>]*>)?\n/g,function(e,t){return t?e:" "}])},convertFontMatch:function(e,t,n){var i=/face=['"]([^'"]+)['"]/i,r=i.exec(n),o=n&&r&&r[1];return t?"</span>":o?'<span style="font-family:'+o+'">':"<span>"},applicable:function(e){return/class="?Mso/i.test(e)||/style="[^"]*mso-/i.test(e)||/urn:schemas-microsoft-com:office/.test(e)},stripEmptyAnchors:function(e){return e.replace(/<a([^>]*)>\s*<\/a>/gi,function(e,t){return!t||t.indexOf("href")<0?"":e})},listType:function(e,t){var n,i=e.innerHTML,r=o.innerText(e),a=i.match(/^(?:<span [^>]*texhtml[^>]*>)?<span [^>]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),s=a&&a[1],l=/^[a-z\d]/i.test(s),d=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return a&&(n=!0),i=i.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),!n&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(i)||n&&/^.\u00a0+/.test(i)||s&&!l&&t?{tag:"ul",style:this._guessUnorderedListStyle(d(r))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(i)?{tag:"ol",style:this._guessOrderedListStyle(d(r))}:void 0},_convertToLi:function(e){var t;return 1==e.childNodes.length?(t=e.firstChild.nodeType===o.nodeTypes.TEXT_NODE?o.innerText(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""),t=this._checkForBullet(t)):t=this._getHtmlNoBullet(e),o.remove(e),o.create(document,"li",{innerHTML:t})},_checkForBullet:function(e){var t=o.create(document,"p",{innerHTML:e}),n=/^\s*\w+[\.\)]\s+/;return n.test(t.innerText)?this._getHtmlNoBullet(t):e},_getHtmlNoBullet:function(e){var t,n=o.name(e);return o.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&o.remove(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&o.remove(e.firstChild),t="p"!=n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML},_guessUnorderedListStyle:function(e){return/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(e)?null:/^o/.test(e)?"circle":"square"},_guessOrderedListStyle:function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},extractListLevels:function(e){var n=/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;return e=e.replace(n,function(e,n,i){return t.format('data-list="{0}" data-level="{1}" {2}',n,i,e)})},_createList:function(e,t){return o.create(document,e,{style:{listStyleType:t}})},lists:function(t){var n,i,r,a,s,d,c,u,p,f,h,m,g,v,_,b,k=e(t).find(o.blockElements.join(",")),y=-1,w={},x=["p","h1","h2","h3","h4","h5","h6"],C=!1;for(u=0;u<k.length;u++)p=k[u],g=e(p).data(),v=g.list,n=o.name(p),C=!!e(p).parents("table").length,C||(_=this.listType(p,g),f=_&&_.tag,!f||x.indexOf(n)<0?p.innerHTML?i&&!d&&i.appendChild(p):o.remove(p):l.msie||(h=g.level||parseFloat(p.style.marginLeft||0),b=f+v,w[h]||(w[h]={}),(!r||r<0)&&(r=h,a=v,s=e(t).find("[data-list='"+a+"']:last")[0],c=this._createList(f,_.style),o.insertBefore(c,p),y=h,w[h][b]=c),d=s===p,m=w[h][b],(h>y||!m)&&(m=this._createList(f,_.style),w[h][b]=m,i.appendChild(m)),i=this._convertToLi(p),m.appendChild(i),d?r=y=-1:y=h))},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)"colspan"!=o.name(t[n])&&e.removeAttributeNode(t[n])},createColGroup:function(n){var i=n.cells,r=e(n).closest("table"),o=r.children("colgroup");i.length<2||(o.length&&(i=o.children(),o[0].parentNode.removeChild(o[0])),o=e(e.map(i,function(e){var n=e.width;return n&&0!==parseInt(n,10)?t.format('<col style="width:{0}px;"/>',n):"<col />"}).join("")),o.is("colgroup")||(o=e("<colgroup/>").append(o)),o.prependTo(r))},convertHeaders:function(t){var n,i=t.cells,r=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];if(n&&"strong"==o.name(n))return n});if(r.length==i.length){for(n=0;n<r.length;n++)o.unwrap(r[n]);for(e(t).closest("table").find("colgroup").after("<thead></thead>").end().find("thead").append(t),n=0;n<i.length;n++)o.changeTag(i[n],"th")}},removeParagraphs:function(t){var n,i,r,a,s;for(n=0;n<t.length;n++)for(this.removeAttributes(t[n]),a=e(t[n]),s=a.children("p"),i=0,r=s.length;i<r;i++)i<r-1&&o.insertAfter(o.create(document,"br"),s[i]),o.unwrap(s[i])},removeDefaultColors:function(e){for(var t=0;t<e.length;t++)/^\s*color:\s*[^;]*;?$/i.test(e[t].style.cssText)&&o.unwrap(e[t])},tables:function(t){var n,i,r,o,a,s=e(t).find("table"),l=this;for(o=0;o<s.length;o++){for(n=s[o].rows,r=i=n[0],a=1;a<n.length;a++)n[a].cells.length>r.cells.length&&(r=n[a]);l.createColGroup(r),l.convertHeaders(i),l.removeAttributes(s[o]),l.removeParagraphs(s.eq(o).find("td,th")),l.removeDefaultColors(s.eq(o).find("span"))}},headers:function(t){var n,i=e(t).find("p.MsoTitle");for(n=0;n<i.length;n++)o.changeTag(i[n],"h1")},removeFormatting:function(t){e(t).find("*").each(function(){e(this).css({fontSize:"",fontFamily:""}),this.getAttribute("style")||this.style.cssText||this.removeAttribute("style")})},clean:function(e){var t,n=this,i=this.options;return i.none?(e=u.fn.clean.call(n,e,this.junkReplacements),e=n.stripEmptyAnchors(e)):(e=i.msConvertLists?this.extractListLevels(e):e,e=u.fn.clean.call(n,e),e=n.stripEmptyAnchors(e),t=o.create(document,"div",{innerHTML:e}),n.headers(t),i.msConvertLists&&n.lists(t),n.tables(t),i.msAllFormatting&&n.removeFormatting(t),e=t.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi,"$1")),e}}),m=u.extend({init:function(e){u.fn.init.call(this,e),this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^<div>(.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}}),g=u.extend({clean:function(e){var t=o.create(document,"div",{innerHTML:e});return t=this.cleanDom(t),t.innerHTML},cleanDom:function(e){return e}}),v=g.extend({cleanDom:function(t){var n=this.collectTags();return e(t).find(n).each(function(){o.unwrap(this)}),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),_=g.extend({cleanDom:function(t){var n=this.collectAttr(),i=e(t).find("["+n.join("],[")+"]");return i.removeAttr(n.join(" ")),t},collectAttr:function(){return this.options.css?["class","style"]:[]},applicable:function(){return this.options.css}}),b=function(){this.text="",this.add=function(e){this.text+=e}},k=n.extend({init:function(e){this.separators=e||{text:" ",line:"<br/>"},this.lines=[],this.inlineBlockText=[],this.resetLine()},appendText:function(e){3===e.nodeType&&(e=e.nodeValue),this.textContainer.add(e)},appendInlineBlockText:function(e){this.inlineBlockText.push(e)},flashInlineBlockText:function(){this.inlineBlockText.length&&(this.appendText(this.inlineBlockText.join(" ")),this.inlineBlockText=[])},endLine:function(){this.flashInlineBlockText(),this.resetLine()},html:function(){var e,t,n,i,r,o,a,s,l=this.separators,d="",c=this.lines;for(this.flashInlineBlockText(),e=0,t=c.length,n=t-1;e<t;e++){for(i=c[e],r=0,o=i.length,a=o-1;r<o;r++)s=i[r].text,d+=s,r!==a&&(d+=l.text);e!==n&&(d+=l.line)}return d},resetLine:function(){this.textContainer=new b,this.line=[],this.line.push(this.textContainer),this.lines.push(this.line)}}),y=n.extend({init:function(e){this.callback=e},enumerate:function(e){var t,n;e&&(t=this.callback(e),n=e.firstChild,!t&&n&&this.enumerate(n),this.enumerate(e.nextSibling))}}),w=u.extend({init:function(t){u.fn.init.call(this,t),this.hasText=!1,this.enumerator=new y(e.proxy(this.buildText,this))},clean:function(e){var t=o.create(document,"div",{innerHTML:e});return this.cleanDom(t)},cleanDom:function(e){return this.separators=this.getDefaultSeparators(),this.htmlLines=new k(this.separators),this.enumerator.enumerate(e.firstChild),this.hasText=!1,this.htmlLines.html()},buildText:function(e){if(o.isDataNode(e)){if(o.isEmptyspace(e))return;this.htmlLines.appendText(e.nodeValue.replace("\n",this.separators.line)),this.hasText=!0}else{if(o.isBlock(e)&&this.hasText){var t=this.actions[o.name(e)]||this.actions.block;return t(this,e)}o.isBr(e)&&this.htmlLines.appendText(this.separators.line)}},applicable:function(){var e=this.options;return e.all||e.keepNewLines},getDefaultSeparators:function(){return this.options.all?{text:" ",line:" "}:{text:" ",line:"<br/>"}},actions:{ul:e.noop,ol:e.noop,table:e.noop,thead:e.noop,tbody:e.noop,td:function(e,t){var n=new w({all:!0}),i=n.cleanDom(t);return e.htmlLines.appendInlineBlockText(i),!0},block:function(e){e.htmlLines.endLine()}}}),x=u.extend({clean:function(e){return this.options.custom(e)},applicable:function(){return"function"==typeof this.options.custom}});d(i,{Clipboard:c,Cleaner:u,ScriptCleaner:p,TabCleaner:f,MSWordFormatCleaner:h,WebkitFormatCleaner:m,HtmlTagsCleaner:v,HtmlAttrCleaner:_,HtmlContentCleaner:w,HtmlTextLines:k,CustomCleaner:x})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/keyboard.min",["editor/command.min"],e)}(function(){!function(e){function t(e,t){return t.startContainer===e&&t.endContainer===e&&0===t.startOffset&&t.endOffset==e.childNodes.length}function n(e,t,n){for(var i=e?e[t]:null;i&&!n(i);)i=i[t];return i}var i=window.kendo,r=i.Class,o=i.ui.editor,a=o.RangeUtils,s=o.Dom,l=o.RestorePoint,d=o.Marker,c=i.support.browser,u="<span class='k-br'>\ufeff</span>",p=e.extend,f=s.nodeTypes,h="previousSibling",m="td,th,caption",g="table,tbody,thead,tfoot,tr",v=g+","+m,_=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(g)},b=r.extend({remove:function(t){var n,i,r,o,l,c,u,p=this,f=new d;f.add(t,!1),n=a.getAll(t,function(t){return e(t).is(v)}),i=a.documentFromRange(t),r=f.start,o=f.end,l=m.split(","),c=s.parentOfType(r,l),u=s.parentOfType(o,l),p._removeContent(r,c,!0),p._removeContent(o,u,!1),e(n).each(function(t,n){n=e(n),(n.is(m)?n:n.find(m)).each(function(e,t){t.innerHTML=""})}),c&&!r.previousSibling&&s.insertBefore(i.createTextNode("\ufeff"),r),u&&!o.nextSibling&&s.insertAfter(i.createTextNode("\ufeff"),o),c?t.setStartBefore(r):n[0]&&(c=e(n[0]),c=c.is(m)?c:c.find(m).first(),c.length&&t.setStart(c.get(0),0)),t.collapse(!0),s.remove(r),s.remove(o)},_removeContent:function(t,n,i){if(n){var r,o=i?"nextSibling":"previousSibling",a=function(t){for(;t&&!t[o];)t=t.parentNode;return t&&e.contains(n,t)?t[o]:null};for(t=a(t);t;)r=a(t),s.remove(t),t=r}}}),k=r.extend({init:function(e){this.editor=e},keydown:function(n){var i,r,a,s,d=this,u=d.editor,f=u.keyboard,h=f.isTypingKey(n),m=p(e.Event(),n);return d.editor.trigger("keydown",m),m.isDefaultPrevented()?(n.preventDefault(),!0):!(m.isDefaultPrevented()||!h||f.isTypingInProgress())&&(i=u.getRange(),r=u.body,d.startRestorePoint=new l(i,r),_(i)&&(a=new b(u),a.remove(i),u.selectRange(i)),c.webkit&&!i.collapsed&&t(r,i)&&(r.innerHTML=""),u.immutables&&o.Immutables.immutablesContext(i)&&(s=new o.BackspaceHandler(u),s.deleteSelection(i)),f.startTyping(function(){d.endRestorePoint=o._finishUpdate(u,d.startRestorePoint)}),!0)},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)}}),y=r.extend({init:function(e){this.editor=e},_addCaret:function(e){var t=s.create(this.editor.document,"a");return!i.support.browser.chrome&&e.firstChild&&e.firstChild.nodeType===f.ELEMENT_NODE&&(e=e.firstChild),s.insertAt(e,t,0),s.stripBomNode(t.previousSibling),s.stripBomNode(t.nextSibling),t},_restoreCaret:function(e){var t=this.editor.createRange();!e.nextSibling&&s.isDataNode(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.length):t.setStartAfter(e),t.collapse(!0),this.editor.selectRange(t),s.remove(e)},_handleDelete:function(e){var t,n,i=e.endContainer,r=s.closestEditableOfType(i,s.blockElements);return!(!r||!o.RangeUtils.isEndOf(e,r))&&(t=s.next(r),!(!t||"p"!=s.name(t))&&(n=this._addCaret(t),this._merge(r,t),this._restoreCaret(n),!0))},_cleanBomBefore:function(e){for(var t=e.startOffset,n=e.startContainer,i=n.nodeValue,r=0;t-r>=0&&"\ufeff"==i[t-r-1];)r++;r>0&&(n.deleteData(t-r,r),e.setStart(n,Math.max(0,t-r)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(t){var i,r,a,l,d,c,u,p,f,m,g,v,_,b=t.startContainer,k=s.closestEditableOfType(b,["li"]),y=s.closestEditableOfType(b,"p,h1,h2,h3,h4,h5,h6".split(",")),w=this.editor;if(s.isDataNode(b)){if(t.collapsed&&/^\s[\ufeff]+$/.test(b.nodeValue))return t.setStart(b,0),t.setEnd(b,b.length),w.selectRange(t),!1;this._cleanBomBefore(t)}return i=n(y,h,function(e){return!s.htmlIndentSpace(e)}),t.collapsed&&t.startOffset!==t.endOffset&&t.startOffset<0&&(t.startOffset=0,t.endOffset=0,w.selectRange(t)),r=k&&o.RangeUtils.isStartOf(t,k),a=k&&e(k).index(),l=r&&a>0,l&&(y=k,i=s.prev(k)),y&&i&&s.is(i,"table")&&o.RangeUtils.isStartOf(t,y)?(""===y.innerText&&(y.innerHTML="\ufeff"),!0):o.RangeUtils.isStartOf(t,y)&&parseInt(y.style.marginLeft,10)>0?(w.exec("outdent"),!0):y&&i&&o.RangeUtils.isStartOf(t,y)||l?(d=this._addCaret(y),this._merge(i,y),this._restoreCaret(d),!0):r&&0===a?(c=k.firstChild,c||(k.innerHTML=o.emptyElementContent,c=k.firstChild),u=new o.ListFormatter(s.name(k.parentNode),"p"),t.selectNodeContents(k),u.toggle(t),s.insignificant(c)?t.setStartBefore(c):t.setStart(c,0),w.selectRange(t),!0):(p=b.childNodes[t.startOffset-1],f=t,m=p&&s.closestEditableOfType(p,["a"]),g=n(p||b,h,function(e){return!s.isDataNode(e)||!s.isBom(e)&&e.length>0}),(m||(0===t.startOffset||p)&&s.is(g,"a"))&&(m=m||g,f=w.createRange(),f.setStart(m,m.childNodes.length),f.collapse(!0)),m=m||s.closestEditableOfType(p||f.startContainer,["a"]),v=m&&o.RangeUtils.isEndOf(f,m),v&&(_=new o.UnlinkCommand({range:f,body:w.body,immutables:!!w.immutables}),w.execCommand(_),w._selectionChange()),!1)},_handleSelection:function(t){var n,i,r,a,l,c=t.commonAncestorContainer,u=s.closest(c,"table"),p=o.emptyElementContent,f=this.editor;return _(t)?(i=new b(f),i.remove(t),f.selectRange(t),!0):(r=new d,r.add(t,!1),t.commonAncestorContainer===f.body&&this._surroundFullyContent(r,t),f.immutables&&this._handleImmutables(r),this._surroundFullySelectedAnchor(r,t),t.setStartAfter(r.start),t.setEndBefore(r.end),a=t.startContainer,l=t.endContainer,t.deleteContents(),"li"===l.tagName.toLocaleLowerCase()&&s.emptyNode(l)&&(t.selectNode(l),t.deleteContents()),u&&""===e(u).text()&&(t.selectNode(u),t.deleteContents()),c=t.commonAncestorContainer,"p"===s.name(c)&&""===c.innerHTML&&(c.innerHTML=p,t.setStart(c,0)),this._join(a,l),s.insertAfter(f.document.createTextNode("\ufeff"),r.start),r.remove(t),a=t.startContainer,"tr"==s.name(a)&&(a=a.childNodes[Math.max(0,t.startOffset-1)],t.setStart(a,s.getNodeLength(a))),t.collapse(!0),f.selectRange(t),n=a.parentElement||a.parentNode,s.isDataNode(a)&&!s.emptyNode(n)&&this._cleanBomBefore(t),!0)},_handleImmutables:function(e){var t=o.Immutables.immutableParent,n=t(e.start),i=t(e.start);n&&s.insertBefore(e.start,n),i&&s.insertAfter(e.end,i),n&&s.remove(n),i&&i.parentNode&&s.remove(i)},_surroundFullyContent:function(e,t){var n=t.commonAncestorContainer.children,i=n[0],r=n[n.length-1];this._moveMarker(e,t,i,r)},_surroundFullySelectedAnchor:function(t,n){var i=t.start,r=e(i).closest("a").get(0),o=t.end,a=e(o).closest("a").get(0);this._moveMarker(t,n,r,a)},_moveMarker:function(e,t,n,i){var r=e.start,o=e.end;n&&a.isStartOf(t,n)&&s.insertBefore(r,n),i&&a.isEndOf(t,i)&&s.insertAfter(o,i)},_root:function(e){for(;e&&"body"!=s.name(e)&&e.parentNode&&"body"!=s.name(e.parentNode);)e=e.parentNode;return e},_join:function(e,t){e=this._root(e),t=this._root(t),e!=t&&s.is(t,"p")&&this._merge(e,t)},_merge:function(e,t){for(s.removeTrailingBreak(e);e&&t.firstChild;)1==e.nodeType?(e=s.list(e)?e.children[e.children.length-1]:e,e&&e.appendChild(t.firstChild)):e.nodeType===f.TEXT_NODE?this._mergeWithTextNode(e,t.firstChild):e.parentNode.appendChild(t.firstChild);s.remove(t)},_mergeWithTextNode:function(e,t){e&&e.nodeType===f.TEXT_NODE&&(e.nextSibling&&this._isCaret(e.nextSibling)?s.insertAfter(t,e.nextSibling):s.insertAfter(t,e))},_isCaret:function(t){return e(t).is("a")},keydown:function(e){var t,n,r=this.editor,a=r.getRange(),s=e.keyCode,d=i.keys,c=s===d.BACKSPACE,u=s==d.DELETE;r.immutables&&r.immutables.keydown(e,a)||(!c&&!u||a.collapsed?c?t="_handleBackspace":u&&(t="_handleDelete"):t="_handleSelection",t&&(n=new l(a,r.body),this[t](a)&&(e.preventDefault(),o._finishUpdate(r,n))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),w=r.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=o._finishUpdate(this.editor,this.startRestorePoint)},changed:function(){return!!this.startRestorePoint&&this.startRestorePoint.html!=this.editor.body.innerHTML},keydown:function(e){var t=this,n=t.editor,i=n.keyboard;return i.isModifierKey(e)?(i.isTypingInProgress()&&i.endTyping(!0),t.startRestorePoint=new l(n.getRange(),n.body),!0):!!i.isSystem(e)&&(t.systemCommandIsInProgress=!0,t.changed()&&(t.systemCommandIsInProgress=!1,t.createUndoCommand()),!0)},keyup:function(){var e=this;return!(!e.systemCommandIsInProgress||!e.changed())&&(e.systemCommandIsInProgress=!1,e.createUndoCommand(),!0)}}),x=r.extend({init:function(e){this.editor=e},keydown:function(e){!c.webkit||e.isDefaultPrevented()||!e.ctrlKey||65!=e.keyCode||e.altKey||e.shiftKey||(this.editor.options.immutables&&this._toSelectableImmutables(),this._selectEditorBody())},_selectEditorBody:function(){var e=this.editor,t=e.getRange();t.selectNodeContents(e.body),setTimeout(function(){e.selectRange(t)})},_toSelectableImmutables:function(){for(var t=this.editor,n=t.body,i=o.Immutables.immutable,r=s.emptyTextNode,a=n.firstChild,l=n.lastChild;r(a);)a=a.nextSibling;for(;r(l);)l=l.previousSibling;a&&i(a)&&e(u).prependTo(n),l&&i(l)&&e(u).appendTo(n)},keyup:e.noop}),C=r.extend({init:function(e){this.handlers=e,this.typingInProgress=!1},isCharacter:function(e){return e>=48&&e<=90||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||229==e},toolFromShortcut:function(t,n){var i,r,o=String.fromCharCode(n.keyCode),a=this._getShortcutModifier(n,navigator.platform);for(i in t)if(r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(r.key==o||r.key==n.keyCode)&&r.ctrl==a&&r.alt==n.altKey&&r.shift==n.shiftKey)return i},_getShortcutModifier:function(e,t){var n=t.toUpperCase().indexOf("MAC")>=0;return n?e.metaKey:e.ctrlKey},toolsFromShortcut:function(t,n){var i,r,o,a=String.fromCharCode(n.keyCode),s=[],l=function(e){return e==a||e==n.keyCode||e==n.charCode};for(i in t)r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),o=e.isArray(r.key)?e.grep(r.key,l).length>0:l(r.key),o&&r.ctrl==n.ctrlKey&&r.alt==n.altKey&&r.shift==n.shiftKey&&s.push(t[i]);return s},isTypingKey:function(e){var t=e.keyCode;return this.isCharacter(t)&&!e.ctrlKey&&!e.altKey||32==t||13==t||8==t||46==t&&!e.shiftKey&&!e.ctrlKey&&!e.altKey},isModifierKey:function(e){var t=e.keyCode;return 17==t&&!e.shiftKey&&!e.altKey||16==t&&!e.ctrlKey&&!e.altKey||18==t&&!e.ctrlKey&&!e.shiftKey},isSystem:function(e){return 46==e.keyCode&&e.ctrlKey&&!e.altKey&&!e.shiftKey},startTyping:function(e){this.onEndTyping=e,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress&&this.onEndTyping&&this.onEndTyping(),this.typingInProgress=!1},endTyping:function(t){var n=this;n.clearTimeout(),t?n.stopTyping():n.timeout=window.setTimeout(e.proxy(n.stopTyping,n),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(e,t){var n,i=this.handlers;for(n=0;n<i.length&&!i[n][t](e);n++);},keydown:function(e){this.notify(e,"keydown")},keyup:function(e){this.notify(e,"keyup")}});p(o,{TypingHandler:k,SystemHandler:w,BackspaceHandler:y,SelectAllHandler:x,Keyboard:C})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/exportpdf.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,r=n.EditorUtils,o=r.registerTool,a=n.Tool,s=n.ToolTemplate,l=e.extend,d=i.extend({init:function(e){this.async=!0,i.fn.init.call(this,e)},exec:function(){var e=this,t=e.lockRange(!0),n=e.editor;n._destroyResizings(),n.saveAsPDF().then(function(){e.releaseRange(t),n._initializeColumnResizing(),n._initializeRowResizing(),n._initializeTableResizing()})}});l(n,{ExportPdfCommand:d}),o("pdf",new a({command:d,template:new s({template:r.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/print.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,r=n.EditorUtils,o=r.registerTool,a=n.Tool,s=n.ToolTemplate,l=e.extend,d=i.extend({init:function(e){i.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor;t.support.browser.msie?e.document.execCommand("print",!1,null):e.window.print&&e.window.print()}});l(n,{PrintCommand:d}),o("print",new a({command:d,template:new s({template:r.buttonTemplate,title:"Print"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/formatpainter.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Tool,r=n.Command,o=n.ToolTemplate,a=n.EditorUtils,s=n.Dom,l=n.RangeUtils,d=a.registerTool,c=r.extend({init:function(e){r.fn.init.call(this,e)},exec:function(){var e=this.lockRange(!0);this.inlineStyles=[],this.blockStyles=[],this.collectStyles(e),this.editor.inlineStyles=this.inlineStyles,this.editor.blockStyles=this.blockStyles,this.releaseRange(e)},collectStyles:function(e){var t,n=l.nodes(e);for(t=1===n.length?n[0].parentNode:e.startContainer;t&&!s.is(t,"body")&&"editor"!==t.getAttribute("data-role");)s.isBlock(t)?(this.populateStyles(t,"blockStyles"),t=s.is(t,"li")?t.parentNode:null):(this.populateStyles(t,"inlineStyles"),t=t.parentNode)},populateStyles:function(e,t){var n,i,r,o,a,s=e.style,l=e.attributes,d={tags:[e.tagName],attr:{style:{}}};for(a=0;s&&a<s.length;a++)i=s[a],n=s[i],d.attr.style[i]=n;for(a=0;l&&a<l.length;a++)r=l[a].nodeName,o=l[a].nodeValue,"style"!==r&&("class"===r?d.attr.className=o:d.attr[r]=o);this[t].push(d)}}),u=r.extend({init:function(e){r.fn.init.call(this,e)},exec:function(){var e,t=this.lockRange(!0),n=l.getMarkers(t),i=this.editor,r=i.inlineStyles,o=i.blockStyles;(r&&0!==r.length||o&&0!==o.length)&&(3===n.length&&(this.marker.removeCaret(t),this.marker.caret=null),this.removeEmptyElementsFromRange(t),e=l.nodes(t),this.cleanInlineParents(e),s.normalize(t.commonAncestorContainer),2===n.length?(t.setStartAfter(n[0]),t.setEndBefore(n[1])):(t.setStartBefore(e[0]),t.setEndAfter(e[0])),e=l.nodes(t),e&&o&&o.length&&this.applyBlockStyles(e,o),e&&r&&r.length&&this.applyInlineStyles(e,r),this.releaseRange(t))},removeEmptyElementsFromRange:function(e){var t,n=function(e){return s.isInline(e)&&!e.firstChild&&!s.isMarker(e)},i=l.getAll(e,n);if(i&&i.length>0)for(t=0;t<i.length;t++)i[t].parentNode.removeChild(i[t])},cleanInlineParents:function(e){var t,n,i,r,o,a,l;for(t=0;t<e.length;t++)if(n=e[t],i=n.parentNode,!this.immutableParent(n))for(;i&&s.isInline(i);){for(r=i.childNodes,o=0;o<r.length;o++)a=r[o],s.isMarker(a)||a===n||(l=i.cloneNode(!0),l.innerHTML="",s.wrap(a,l));s.unwrap(i),i=n.parentNode}},applyBlockStyles:function(e,t){var n,i,r,o,a,l,d,c,u,p,f,h,m,g,v,_=t[0].tags[0],b=t[0].attr,k=this.editor.document;for(n=0,i=e.length;n<i;n++)if(r=e[n],!s.isWhitespace(r)&&!this.immutableParent(r))if(a=s.blockParentOrBody(r),"BODY"!==a.tagName&&a.tagName!==_){if("LI"!==a.tagName&&"TD"!==a.tagName&&"TH"!==a.tagName){for(d=[],c=[],u=r.previousSibling,p=r.nextSibling;u;)s.isMarker(u)||d.push(u),u=u.previousSibling;if(d.length)for(f=a.cloneNode(!0),f.innerHTML="",s.insertBefore(f,d[0]),g=0;g<d.length;g++)m=d[g],s.insertAt(f,m,0);for(;p;)s.isMarker(p)||c.push(p),p=p.nextSibling;if(c.length)for(h=a.cloneNode(!0),h.innerHTML="",s.insertBefore(h,c[0]),g=0;g<c.length;g++)m=c[g],h.appendChild(m);s.unwrap(a)}o=s.create(k,_,b),s.wrap(r,o)}else a.tagName===_&&s.attr(a,b);if(a&&2===t.length&&"LI"!==a.tagName&&"LI"===_){for(v=[];s.is(o,"li");)v.push(o),o=s.prev(o);for(l=s.create(k,t[1].tags[0],t[1].attr),s.insertBefore(l,v[v.length-1]),l.appendChild(v[0]),n=1,i=v.length;n<i;n++)s.insertBefore(v[n],l.firstChild)}else a&&2===t.length&&"LI"!==a.tagName&&(l=s.create(k,t[1].tags[0],t[1].attr),s.wrap(o,l))},applyInlineStyles:function(e,t){var n,i,r,o,a,l,d=this.editor.document;for(o=0;o<t.length;o++)n=t[o],i=s.create(d,n.tags[0],n.attr),r&&i.appendChild(r),r=i;if(r)for(o=0;o<e.length;o++)if(l=e[o],!s.isWhitespace(l)&&!this.immutableParent(l)){for(a=r.cloneNode(!0),s.insertBefore(a,l);a.children&&a.children.length;)a=a.children[0];a.appendChild(l)}},immutables:function(){return this.editor&&this.editor.options.immutables},immutableParent:function(e){return this.immutables()&&n.Immutables.immutableParent(e)}}),p=i.extend({init:function(e){i.fn.init.call(this,e)},command:function(e){return new c(e)}}),f=i.extend({init:function(e){i.fn.init.call(this,e)},command:function(e){return new u(e)}});e.extend(n,{CopyFormatCommand:c,ApplyFormatCommand:u,CopyFormatTool:p,ApplyFormatTool:f}),d("copyFormat",new p({template:new o({template:a.buttonTemplate,title:"Copy format"})})),d("applyFormat",new f({template:new o({template:a.buttonTemplate,title:"Apply format"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/resizing-utils.min",["editor/main.min"],e)}(function(){!function(e,t){function n(e){var t=e.value,n=e.min,i=e.max;return p(u(f(t),f(i)),f(n))}function i(t){return t&&!h(t).is("body")&&t.scrollHeight>t.clientHeight?e.support.scrollbar():0}function r(e,t){return o(e)?f(e):f(e)/t*100}function o(e){return typeof e===y&&b.test(e)}function a(e){return typeof e===y&&k.test(e)}function s(e){return f(e)+v}function l(e){return f(e)+_}var d=window,c=d.Math,u=c.min,p=c.max,f=d.parseFloat,h=e.jQuery,m=h.extend,g=e.ui.editor,v="%",_="px",b=/(\d+)(\.?)(\d*)%/,k=/(\d+)(\.?)(\d*)px/,y="string",w={constrain:n,getScrollBarWidth:i,calculatePercentageRatio:r,inPercentages:o,inPixels:a,toPercentages:s,toPixels:l};m(g,{ResizingUtils:w})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/table-element-resizing.min",["editor/main.min","kendo.resizable.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){var n=e.jQuery,i=n.extend,r=n.noop,o=n.proxy,a=e.ui.editor,s=e.Class,l="keydown",d="mousedown",c="mouseenter",u="mouseleave",p="mousemove",f="mouseup",h=",",m=".",g=":last-child",v="table",_=s.extend({init:function(e,t){var r=this;r.options=i({},r.options,t),r.options.tags=n.isArray(r.options.tags)?r.options.tags:[r.options.tags],n(e).is(v)&&(r.element=e,r._attachEventHandlers())},destroy:function(){var e=this,t=e.options.eventNamespace;e.element&&(n(e.element).off(t),e.element=null),n(e.options.rootElement).off(l+t),e._destroyResizeHandle()},options:{tags:[],min:0,rootElement:null,eventNamespace:"",rtl:!1,handle:{dataAttribute:"",height:0,width:0,classNames:{},template:""}},_attachEventHandlers:function(){var e=this,t=e.options;n(e.element).on(p+t.eventNamespace,t.tags.join(h),o(e.detectElementBorderHovering,e))},resizingInProgress:function(){var e=this,t=e._resizable;return!!t&&!!t.resizing},resize:r,detectElementBorderHovering:function(e){var t=this,i=t.options,r=i.handle,o=n(e.currentTarget),a=t.resizeHandle,s=r.dataAttribute;t.resizingInProgress()||(!o.is(g)&&t.elementBorderHovered(o,e)?a?a.data(s)&&a.data(s)!==o[0]&&t.showResizeHandle(o,e):t.showResizeHandle(o,e):a&&t._destroyResizeHandle())},elementBorderHovered:r,showResizeHandle:function(e,t){var n=this;0===t.buttons&&(n._initResizeHandle(),n.setResizeHandlePosition(e),n.setResizeHandleDimensions(),n.setResizeHandleDataAttributes(e[0]),n._attachResizeHandleEventHandlers(),n._initResizable(e),n._hideResizeMarker(),n.resizeHandle.show())},_initResizeHandle:function(){var e=this,t=e.options;e._destroyResizeHandle(),e.resizeHandle=n(t.handle.template).appendTo(t.rootElement)},setResizeHandlePosition:r,setResizeHandleDimensions:r,setResizeHandleDataAttributes:function(e){var t=this;t.resizeHandle.data(t.options.handle.dataAttribute,e)},_attachResizeHandleEventHandlers:function(){var e=this,t=e.options,n=t.eventNamespace,i=t.handle.classNames.marker,r=e.resizeHandle;e.resizeHandle.on(d+n,function(){r.find(m+i).show()}).on(f+n,function(){r.find(m+i).hide()})},_hideResizeMarker:function(){var e=this;e.resizeHandle.find(m+e.options.handle.classNames.marker).hide()},_destroyResizeHandle:function(){var e=this;e.resizeHandle&&(e._destroyResizable(),e.resizeHandle.off(e.options.eventNamespace).remove(),e.resizeHandle=null)},_initResizable:function(t){var n=this;n.resizeHandle&&(n._destroyResizable(),n._resizable=new e.ui.Resizable(t,{draggableElement:n.resizeHandle[0],start:o(n.onResizeStart,n),resize:o(n.onResize,n),resizeend:o(n.onResizeEnd,n)}))},_destroyResizable:function(){var e=this;e._resizable&&(e._resizable.destroy(),e._resizable=null)},onResizeStart:function(){this._disableKeyboard()},onResize:function(e){this.setResizeHandleDragPosition(e)},setResizeHandleDragPosition:r,onResizeEnd:function(e){var t=this;t.resize(e),t._destroyResizeHandle(),t._enableKeyboard()},_enableKeyboard:function(){var e=this.options;n(e.rootElement).off(l+e.eventNamespace)},_disableKeyboard:function(){var e=this.options;n(e.rootElement).on(l+e.eventNamespace,function(e){e.preventDefault()})},_forceResizing:function(e){var t=this._resizable;t&&t.userEvents&&t.userEvents._end(e)}}),b=s.extend({create:function(e,t){var i=this,r=t.name,o=t.eventNamespace;n(e.body).on(c+o,v,function(n){var o=n.currentTarget,a=e[r];n.stopPropagation(),a?a.element===o||a.resizingInProgress()||(i._destroyResizing(e,t),i._initResizing(e,o,t)):i._initResizing(e,o,t)}).on(u+o,v,function(o){var a,s=e[r];o.stopPropagation(),!s||s.resizingInProgress()||s.resizeHandle||(a=n(s.element).parents(v)[0],a&&(i._destroyResizing(e,t),i._initResizing(e,a,t)))}).on(u+o,function(){var n=e[r];n&&!n.resizingInProgress()&&i._destroyResizing(e,t)}).on(f+o,function(o){var a,s=e[r];s&&s.resizingInProgress()&&(a=n(o.target).parents(v)[0],a&&(s._forceResizing(o),i._destroyResizing(e,t),i._initResizing(e,a,t)))})},dispose:function(e,t){n(e.body).off(t.eventNamespace)},_initResizing:function(t,n,i){var r=i.name,o=i.type;t[r]=new o(n,{rtl:e.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(e,t){var n=t.name;e[n]&&(e[n].destroy(),e[n]=null)}});b.current=new b,_.create=function(e,t){b.current.create(e,t)},_.dispose=function(e,t){b.current.dispose(e,t)},i(a,{TableElementResizing:_})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/column-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min","editor/dom.min"],e)}(function(){!function(e,t){var n=window,i=n.Math,r=i.abs,o=e.jQuery,a=o.extend,s=e.ui.editor,l=s.Dom,d=s.TableElementResizing,c=s.ResizingUtils,u=c.constrain,p=c.calculatePercentageRatio,f=c.getScrollBarWidth,h=c.inPercentages,m=c.toPercentages,g=c.toPixels,v=e._outerWidth,_=".kendoEditorColumnResizing",b="k-column-resize-handle",k="k-column-resize-marker",y="body",w="tbody",x="thead",C="td",T="th",S="tr",I="col-index",D=",",F="width",E=d.extend({
|
30
|
-
options:{tags:[C,T],min:20,rootElement:null,eventNamespace:_,rtl:!1,handle:{dataAttribute:"column",width:10,height:0,classNames:{handle:b,marker:k},template:'<div class="k-column-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+b+'"><div class="'+k+'"></div></div></div>'}},elementBorderHovered:function(e,t){var n=this,i=n.options,r=i.handle.width,a=e.offset().left+(i.rtl?0:v(e)),s=t.clientX+o(e[0].ownerDocument).scrollLeft();return s>a-r&&s<a+r},setResizeHandlePosition:function(t){var n=this,i=o(n.element.tHead||n.element.tBodies[0]),r=n.options,a=r.rtl,s=r.handle.width,l=o(r.rootElement),d=l.is(y)?0:l.scrollTop(),c=l.is(y)?0:e.scrollLeft(l),u=a?0:v(t),p=a?f(l[0]):0,h=t.offset().left-(l.offset().left+parseFloat(l.css("borderLeftWidth")))-parseFloat(t.css("marginLeft")),m=i.offset().top-(l.offset().top+parseFloat(l.css("borderTopWidth")))-parseFloat(i.css("marginTop")),g=e.support.browser;a&&(g.mozilla||g.webkit&&g.version>=85)&&(c*=-1),n.resizeHandle.css({top:m+d,left:h+u+(c-p)-s/2,position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=o(e.element).children(x),n=o(e.element).children(w),i=t.length>0?t.height()+n.height():n.height();e.resizeHandle.css({width:e.options.handle.width,height:i})},setResizeHandleDragPosition:function(t){var n,i=this,r=o(o(t.currentTarget).data(i.options.handle.dataAttribute)),a=i.options,s=o(a.rootElement),l=a.handle?a.handle.width:0,d=a.min,c=a.rtl,p=v(r),h=r.offset().left-(s.offset().left+parseFloat(s.css("borderLeftWidth")))-parseFloat(r.css("marginLeft")),m=v(r.next()),g=o(i.resizeHandle),_=s.is(y)?0:e.scrollLeft(s),b=c?f(s[0]):0,k=g.offset().left-(s.offset().left+parseFloat(s.css("borderLeftWidth")))-parseFloat(g.css("marginLeft")),w=e.support.browser;c&&(w.mozilla||w.webkit&&w.version>=85)&&(_*=-1),n=u({value:k+(_-b)+t.x.delta,min:h+(_-b)-(c?m:0)+d,max:h+p+(_-b)+(c?0:m)-l-d}),g.css({left:n})},resize:function(e){var t,n,i,r,a,s=this,d=o(o(e.currentTarget).data(s.options.handle.dataAttribute)),c=s.options,p=c.rtl?-1:1,f=c.min,h=p*e.x.initialDelta;l.reMapTableColumns(s.element,I),r=parseInt(d.attr(I),10),d.prop("colSpan")>1&&(d=o(s.element).find("["+I+"="+(r+d.prop("colSpan")-1)+"]").eq(0),r=parseInt(d.attr(I),10)),a=o(s.element).find("["+I+"="+(r+1)+"]:not([colspan])"),s._setTableComputedWidth(),s._setColumnsComputedWidth(),i=v(d),n=v(a),t=u({value:i+h,min:f,max:i+n-f}),s._resizeColumn(d[0],t),s._resizeTopAndBottomColumns(d[0],t),s._resizeAdjacentColumns(parseInt(d.attr(I),10),n,i,i-t),l.clearTableMappings(s.element,I)},_setTableComputedWidth:function(){var e=this.element;""===e.style[F]&&(e.style[F]=g(v(o(e))))},_setColumnsComputedWidth:function(){var e,t=this,n=o(t.element.tHead||t.element.tBodies[0]),i=v(n),r=n.children(S).children(C),a=r.length,s=r.map(function(){return v(o(this))});for(e=0;e<a;e++)r[e].style[F]=h(r[e].style[F])?m(p(s[e],i)):g(s[e])},_resizeTopAndBottomColumns:function(e,t){var n,i=this,r=o(e).attr(I),a=o(i.element).children(w+D+x).children(S).children(i.options.tags.join(D)).filter(function(){var t=this;return o(t).attr(I)===r&&t!==e}),s=a.length;for(n=0;n<s;n++)i._resizeColumn(a[n],t)},_resizeColumn:function(e,t){var n=o(this.element.tHead||this.element.tBodies[0]);e.style[F]=h(e.style[F])?m(p(t,v(n))):g(t)},_resizeAdjacentColumns:function(e,t,n,i){var r,a=this,s=o(a.element).children(w+D+x).children(S).children(a.options.tags.join(D)).filter(function(){return parseInt(o(this).attr(I),10)===e+1}),l=s.length;for(r=0;r<l;r++)a._resizeAdjacentColumn(s[r],t,n,i)},_resizeAdjacentColumn:function(e,t,n,i){var o=this,a=o.options.min,s=u({value:t+i,min:a,max:r(n+t-a)});o._resizeColumn(e,s)}});E.create=function(e){d.create(e,{name:"columnResizing",type:E,eventNamespace:_})},E.dispose=function(e){d.dispose(e,{eventNamespace:_})},a(s,{ColumnResizing:E})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/row-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],e)}(function(){!function(e,t){var n=window.Math,i=n.abs,r=e.jQuery,o=r.extend,a=e.ui.editor,s=a.TableElementResizing,l=a.ResizingUtils,d=l.getScrollBarWidth,c=l.constrain,u=l.calculatePercentageRatio,p=l.inPercentages,f=l.toPercentages,h=l.toPixels,m=e._outerHeight,g=".kendoEditorRowResizing",v="k-row-resize-handle",_="k-row-resize-marker-wrapper",b="k-row-resize-marker",k="body",y="tr",w="tbody",x="thead",C=",",T="height",S=s.extend({options:{tags:[y],min:20,rootElement:null,eventNamespace:g,rtl:!1,handle:{dataAttribute:"row",width:0,height:10,classNames:{handle:v,marker:b},template:'<div class="k-row-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+v+'"><div class="'+_+'"><div class="'+b+'"></div></div></div></div>'}},elementBorderHovered:function(e,t){var n=this,i=n.options.handle[T],o=e.offset().top+m(e),a=t.clientY+r(e[0].ownerDocument).scrollTop();return a>o-i&&a<o+i},setResizeHandlePosition:function(t){var n=this,i=n.options,o=i.handle[T],a=r(i.rootElement),s=a.is(k)?0:a.scrollTop(),l=a.is(k)?0:e.scrollLeft(a),c=i.rtl?d(a[0]):0,u=t.offset().left-(a.offset().left+parseFloat(a.css("borderLeftWidth")))-parseFloat(t.css("marginLeft")),p=t.offset().top-(a.offset().top+parseFloat(a.css("borderTopWidth")))-parseFloat(t.css("marginTop")),f=e.support.browser;i.rtl&&(f.mozilla||f.webkit&&f.version>=85)&&(l*=-1),n.resizeHandle.css({top:p+m(t)+s-o/2,left:u+(l-c),position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=r(e.element.tHead||e.element.tBodies[0]);e.resizeHandle.css({width:t.width(),height:e.options.handle[T]})},setResizeHandleDragPosition:function(e){var t=this,n=t.options,i=n.min,o=r(t.element).children(x),a=r(t.element).children(w),s=o.length>0?o:a,l=r(t.resizeHandle),d=r(e.currentTarget).data(n.handle.dataAttribute),u=r(d),p=r(n.rootElement),f=p.is(k)?0:p.scrollTop(),h=s.offset().top-(p.offset().top+parseFloat(p.css("borderTopWidth")))-parseFloat(s.css("marginTop")),g=u.offset().top-(p.offset().top+parseFloat(p.css("borderTopWidth")))-parseFloat(u.css("marginTop")),v=l.offset().top-(Math.max(0,p.offset().top)+parseFloat(p.css("borderTopWidth")))-parseFloat(l.css("marginTop")),_=c({value:v+f+e.y.delta,min:g+f+i,max:h+m(o)+m(a)+f-n.handle[T]-i});l.css({top:_})},resize:function(e){var t=this,n=t.options,o=r(e.currentTarget).data(n.handle.dataAttribute),a=m(r(o)),s=r(t.element),l=m(s),d=s.children(x),u=d.length>0?d.height():0,f=s.children(w),g=f.height(),v=o.style[T],_=c({value:a+e.y.initialDelta,min:n.min,max:i(u+g-n.min)});t._setRowsHeightInPixels(),o.style[T]=h(_),t._setTableHeight(l+(_-a)),p(v)&&t._setRowsHeightInPercentages()},_setRowsHeightInPixels:function(){var e,t=this,n=r(t.element).children(w+C+x).children(y),i=n.length,o=n.map(function(){return m(r(this))});for(e=0;e<i;e++)n[e].style[T]=h(o[e])},_setRowsHeightInPercentages:function(){var e,t=this,n=r(t.element).children(x),i=n.length>0?n.height():0,o=r(t.element).children(w),a=o.height(),s=r(t.element).children(x+C+w).children(y),l=s.length,d=s.map(function(){return m(r(this))});for(e=0;e<l;e++)s[e].style[T]=f(u(d[e],i+a))},_setTableHeight:function(e){var t=this.element;t.style[T]=p(t.style[T])?f(u(e,r(t).parent().height())):h(e)}});S.create=function(e){s.create(e,{name:"rowResizing",type:S,eventNamespace:g})},S.dispose=function(e){s.dispose(e,{eventNamespace:g})},o(a,{RowResizing:S})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/table-resize-handle.min",["editor/main.min","kendo.draganddrop.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){var n,i,r,o,a,s,l,d,c,u,p,f,h,m,g,v,_,b,k,y,w,x,C=e.jQuery,T=C.extend,S=C.noop,I=C.proxy,D=e.ui.editor,F=e.Class,E=e.ui.Draggable,A=e.Observable,z=D.ResizingUtils.getScrollBarWidth,N=e._outerWidth,P=e._outerHeight,H=".kendoEditorTableResizeHandle",R="k-table-resize-handle",O="dragStart",M="drag",B="dragEnd",L="halfInside",V="mouseover",U="mouseout",W="body",j="table",q="east",G="north",$="northeast",K="northwest",Y="south",Q="southeast",X="southwest",J="west",Z=".",ee=A.extend({init:function(e){var t=this;A.fn.init.call(t),t.options=T({},t.options,e),t.element=C(t.options.template).appendTo(t.options.appendTo)[0],t._attachEventHandlers(),t._addStyles(),t._initDraggable(),t._initPositioningStrategy(),t._initDraggingStrategy(),C(t.element).data(j,t.options.resizableElement)},destroy:function(){var e=this;C(e.element).off(H).remove(),e.element=null,e._destroyDraggable(),e.unbind()},options:{appendTo:null,direction:Q,resizableElement:null,rtl:!1,template:"<div class='k-table-resize-handle-wrapper' unselectable='on' contenteditable='false'><div class='"+R+"'></div></div>"},events:[O,M,B,V,U],show:function(){this._setPosition()},_setPosition:function(){var e=this,t=e._positioningStrategy.getPosition();C(e.element).css({top:t.top,left:t.left,position:"absolute"})},_attachEventHandlers:function(){var e=this;C(e.element).on(V+H,I(e._onMouseOver,e)).on(U+H,I(e._onMouseOut,e))},_onMouseOver:function(){this.trigger(V)},_onMouseOut:function(){this.trigger(U)},_addStyles:function(){var e=this;C(e.element).children(Z+R).addClass("k-resize-"+e.options.direction)},_initPositioningStrategy:function(){var e=this,t=e.options;e._positioningStrategy=n.create({name:t.direction,handle:e.element,resizableElement:t.resizableElement,rootElement:t.rootElement,rtl:t.rtl})},_initDraggable:function(){var e=this,t=e.element;!e._draggable&&t&&(e._draggable=new E(t,{dragstart:I(e._onDragStart,e),drag:I(e._onDrag,e),dragend:I(e._onDragEnd,e)}))},_onDragStart:function(){this.trigger(O)},_onDrag:function(e){var t=this;t.trigger(M,t._draggingStrategy.adjustDragDelta({deltaX:e.x.delta,deltaY:e.y.delta,initialDeltaX:e.x.initialDelta,initialDeltaY:e.y.initialDelta}))},_onDragEnd:function(){this.trigger(B)},_destroyDraggable:function(){var e=this;e._draggable&&(e._draggable.destroy(),e._draggable=null)},_initDraggingStrategy:function(){var e=this;e._draggingStrategy=p.create({name:e.options.direction})}}),te=F.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e){var t,n,i,r=this._items,o=r.length,a=e.name?e.name.toLowerCase():"";for(i=0;i<o;i++)if(n=r[i],n.name.toLowerCase()===a){t=n;break}if(t)return new t.type(e)}}),ne=te.extend({});ne.current=new ne,n=F.extend({init:function(e){var t=this;t.options=T({},t.options,e)},options:{handle:null,offset:L,resizableElement:null,rootElement:null,rtl:!1},getPosition:function(){var e=this,t=e.calculatePosition(),n=e.applyHandleOffset(t),i=e.applyScrollOffset(n);return i},calculatePosition:S,applyHandleOffset:function(e){var t=this.options,n=C(t.handle);return t.offset===L?{top:e.top-P(n)/2,left:e.left-N(n)/2}:e},applyScrollOffset:function(t){var n,i=this.options,r=C(i.rootElement),o=i.rtl?z(r[0]):0,a=e.support.browser;return r.is(W)?t:(n=e.scrollLeft(r)||0,i.rtl&&(a.mozilla||a.webkit&&a.version>=85)&&(n*=-1),{top:t.top+(r.scrollTop()||0),left:t.left+n-o})}}),n.create=function(e){return ne.current.create(e)},i=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e)/2,left:t.left+N(e)}}}),ne.current.register(q,i),r=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+N(e)/2}}}),ne.current.register(G,r),o=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+N(e)}}}),ne.current.register($,o),a=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left}}}),ne.current.register(K,a),s=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e),left:t.left+N(e)/2}}}),ne.current.register(Y,s),l=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e),left:t.left+N(e)}}}),ne.current.register(Q,l),d=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e),left:t.left}}}),ne.current.register(X,d),c=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+P(e)/2,left:t.left}}}),ne.current.register(J,c),u=te.extend({}),u.current=new u,p=F.extend({init:function(e){var t=this;t.options=T({},t.options,e)},options:{deltaX:{adjustment:null,modifier:null},deltaY:{adjustment:null,modifier:null}},adjustDragDelta:function(e){var t=this.options,n=t.deltaX.adjustment*t.deltaX.modifier,i=t.deltaY.adjustment*t.deltaY.modifier;return{deltaX:e.deltaX*n,deltaY:e.deltaY*i,initialDeltaX:e.initialDeltaX*n,initialDeltaY:e.initialDeltaY*i}}}),p.create=function(e){return u.current.create(e)},f=p.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:0,modifier:0}}}),h=f.extend({options:{deltaX:{modifier:1}}}),u.current.register(q,h),m=f.extend({options:{deltaX:{modifier:-1}}}),u.current.register(J,m),g=p.extend({options:{deltaX:{adjustment:0,modifier:0},deltaY:{adjustment:1,modifier:1}}}),v=g.extend({options:{deltaY:{modifier:-1}}}),u.current.register(G,v),_=g.extend({options:{deltaY:{modifier:1}}}),u.current.register(Y,_),b=p.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:1,modifier:1}}}),k=b.extend({options:{deltaX:{modifier:1},deltaY:{modifier:-1}}}),u.current.register($,k),y=b.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:-1}}}),u.current.register(K,y),w=b.extend({options:{deltaX:{modifier:1},deltaY:{modifier:1}}}),u.current.register(Q,w),x=b.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:1}}}),u.current.register(X,x),T(D,{TableResizeHandle:ee})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/table-resizing.min",["editor/main.min","editor/resizing/table-resize-handle.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){function n(e){return t===e}var i=window,r=i.Math,o=r.min,a=r.max,s=e.jQuery,l=s.contains,d=s.extend,c=s.proxy,u=e.support.browser,p=e.ui.editor,f=e.Class,h=p.TableResizeHandle,m=p.ResizingUtils,g=m.calculatePercentageRatio,v=m.constrain,_=m.inPercentages,b=m.inPixels,k=m.toPercentages,y=m.toPixels,w=e._outerWidth,x=e._outerHeight,C=".kendoEditorTableResizing",T="k-table-resize-handle-wrapper",S="k-table",I="k-table-resizing",D="dragStart",F="drag",E="dragEnd",A="keydown",z="mousedown",N="mouseover",P="mouseout",H="td",R="tr",O="tbody",M="thead",B="table",L=",",V="width",U="height",W="east",j="north",q="northeast",G="northwest",$="south",K="southeast",Y="southwest",Q="west",X=".",J=f.extend({init:function(e,t){var n=this;n.options=d({},n.options,t),n.handles=[],s(e).is(B)&&(n.element=e)},destroy:function(){var e=this;s(e.element).off(C),e.element=null,s(e.options.rootElement).off(A+C),e._destroyResizeHandles()},options:{appendHandlesTo:null,rtl:!1,rootElement:null,minWidth:10,minHeight:10,handles:[{direction:G},{direction:j},{direction:q},{direction:W},{direction:K},{direction:$},{direction:Y},{direction:Q}]},resize:function(e){var t=this,n=d({},{deltaX:0,deltaY:0,initialDeltaX:0,initialDeltaY:0},e);t._resizeWidth(n.deltaX,n.initialDeltaX),t._resizeHeight(n.deltaY,n.initialDeltaY),t.showResizeHandles()},_resizeWidth:function(e,t){var i,r,l,d,c=this,u=s(c.element),p=u[0].style[V],f=w(u),h=u.parent().width(),m=c._getMaxDimensionValue(V);0!==e&&(n(c._initialElementWidth)&&(c._initialElementWidth=f),d=v({value:c._initialElementWidth+t,min:c.options.minWidth,max:m}),_(p)?(f+e>h?(r=a(d,h),l=o(d,h)):(r=o(d,h),l=a(d,h)),i=k(g(r,l))):i=y(d),c._setColumnsWidth(),u[0].style[V]=i)},_resizeHeight:function(e,t){var i,r,l,d,c=this,u=s(c.element),p=u[0].style[U],f=x(u),h=u.parent(),m=h.height(),b=c._getMaxDimensionValue(U),w=c.options.minHeight,C=c._hasRowsInPixels();0!==e&&(n(c._initialElementHeight)&&(c._initialElementHeight=f),d=v({value:c._initialElementHeight+t,min:w,max:b}),C&&e<0&&c._setRowsHeightInPercentages(),_(p)?(f+e>m?(r=a(d,m),l=o(d,m)):(r=o(d,m),l=a(d,m)),i=k(g(r,l))):i=y(d),u[0].style[U]=i,C&&e<0&&c._setRowsHeightInPixels())},_getMaxDimensionValue:function(t){var n=this,i=s(n.element),r=t.toLowerCase(),o=n.options.rtl?-1:1,a=s(n.element).parent(),l=a[0],d=a[r](),c=o*(t===V?e.scrollLeft(a):a.scrollTop());return l===i.closest(H)[0]?""!==l.style[r]||_(n.element.style[r])?d+c:1/0:d+c},_setColumnsWidth:function(){function e(e){var t=e.style.width;return""!==t?!!_(t):!!s(e).hasClass(S)}var t,n=this,i=s(n.element),r=i.parent()[0],o=i.closest(H),a=o.closest(R).children(),l=a.length;if(e(i[0])&&r===o[0]&&""===r.style[V])for(t=0;t<l;t++)a[t].style[V]=y(s(a[t]).width())},_hasRowsInPixels:function(){var e,t=this,n=s(t.element).children(M+L+O).children(R);for(e=0;e<n.length;e++)if(""===n[e].style.height||b(n[e].style.height))return!0;return!1},_setRowsHeightInPercentages:function(){var e,t=this,n=s(t.element).children(M),i=n.length>0?n.height():0,r=s(t.element).children(O),o=r.height(),a=s(t.element).children(M+L+O).children(R),l=a.length,d=a.map(function(){return x(s(this))});for(e=0;e<l;e++)a[e].style[U]=k(g(d[e],i+o))},_setRowsHeightInPixels:function(){var e,t=this,n=s(t.element).children(M+L+O).children(R),i=n.length,r=n.map(function(){return x(s(this))});for(e=0;e<i;e++)n[e].style[U]=y(r[e])},showResizeHandles:function(){var e=this;e._initResizeHandles(),e._showResizeHandles()},_initResizeHandles:function(){var e,t=this,n=t.handles,i=t.options,r=t.options.handles,o=r.length;if(!(n&&n.length>0)){for(e=0;e<o;e++)t.handles.push(new h(d({appendTo:i.appendHandlesTo,resizableElement:t.element,rootElement:i.rootElement,rtl:i.rtl},r[e])));t._bindToResizeHandlesEvents()}},_destroyResizeHandles:function(){var e,t=this,n=t.handles?t.handles.length:0;for(e=0;e<n;e++)t.handles[e].destroy()},_showResizeHandles:function(){var e,t=this,n=t.handles||[],i=n.length;for(e=0;e<i;e++)t.handles[e].show()},_bindToResizeHandlesEvents:function(){var e,t,n=this,i=n.handles||[],r=i.length;for(e=0;e<r;e++)t=i[e],t.bind(D,c(n._onResizeHandleDragStart,n)),t.bind(F,c(n._onResizeHandleDrag,n)),t.bind(E,c(n._onResizeHandleDragEnd,n)),t.bind(N,c(n._onResizeHandleMouseOver,n)),t.bind(P,c(n._onResizeHandleMouseOut,n))},_onResizeHandleDragStart:function(){var e=this,t=s(e.element);t.addClass(I),e._initialElementHeight=x(t),e._initialElementWidth=w(t),e._disableKeyboard()},_onResizeHandleDrag:function(e){this.resize(e)},_onResizeHandleDragEnd:function(){var e=this;s(e.element).removeClass(I),e._enableKeyboard()},_enableKeyboard:function(){s(this.options.rootElement).off(A+C)},_disableKeyboard:function(){s(this.options.rootElement).on(A+C,function(e){e.preventDefault()})}}),Z=f.extend({create:function(e){var t=this;s(e.body).on(z+C,B,function(n){var i=n.target,r=n.currentTarget,o=e.tableResizing,a=o?o.element:null;if(o){if(a&&r!==a){if(l(r,a)&&a!==i&&l(a,i))return;a!==i&&(e._destroyTableResizing(),t._initResizing(e,r))}}else t._initResizing(e,r);e._showTableResizeHandles()}).on(z+C,function(t){var n=e.tableResizing,i=n?n.element:null,r=t.target,o=s(r).hasClass(T)||s(r).parents(X+T).length>0;!n||i===r||l(i,r)||o||e._destroyTableResizing()})},dispose:function(e){s(e.body).off(C)},_initResizing:function(t,n){u.msie||u.mozilla||(t.tableResizing=new J(n,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body}))}});Z.current=new Z,J.create=function(e){Z.current.create(e)},J.dispose=function(e){Z.current.dispose(e)},d(p,{TableResizing:J})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/table-wizard/table-wizard-command.min",["editor/plugins/tables.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.editor,r=i.EditorUtils,o=i.RangeUtils,a=i.Dom,s=r.registerTool,l=i.ToolTemplate,d=i.Command,c=new i.BlockFormatFinder([{tags:["table"]}]),u=new i.BlockFormatFinder([{tags:["td","th"]}]),p=/([a-z]+|%)$/i,f="col",h="row",m="colgroup",g="scope",v="col-index",_="th",b="td",k="thead",y="headers",w="table",x=d.extend({exec:function(){var r=this,o=r.editor,a=r.range=r.lockRange(),s=r._sourceTable=r.options.insertNewTable?t:r._selectedTable(a),l=r._selectedTableCells=s?r._selectedCells(a):t,d={visible:!1,messages:o.options.messages,closeCallback:e.proxy(r.onDialogClose,r),table:r.parseTable(s,l),dialogOptions:o.options.dialogOptions,isRtl:n.support.isRtl(o.wrapper)},c=new i.TableWizardDialog(d);c.open()},onDialogClose:function(e){var t=this;t.releaseRange(t.range),e&&(t.options.insertNewTable?t.insertTable(t.createNewTable(e)):t.updateTable(e,t._sourceTable,t._selectedTableCells))},releaseRange:function(e){var t=this,n=t.editor.document;a.windowFromDocument(n).focus(),d.fn.releaseRange.call(t,e)},insertTable:function(e){var t=this.range;t.insertNode(e),t.collapse(!0),this.editor.selectRange(t),this._ensureFocusableAfterTable(e)},_ensureFocusableAfterTable:function(t){for(var n=e(t).parent().contents(),i=n.length-1,r=n.get(i);null!==r.nodeValue&&(" "===r.nodeValue||""===r.nodeValue);)i-=1,r=n.get(i);r===t&&a.insertAfter(a.createEmptyNode(this.editor.document,"p"),t)},updateTable:function(t,n,i){for(var r,o,s=this,l=e(n.rows).toArray(),d=t.tableProperties,c=d.rows,u=n.tHead,p=s._lastInCollection;i.length>1;)i.pop();r=i.length?p(i).parentNode:p(l),s._deleteTableRows(l,l.length-c),l.length<c&&s._addRows(r,c,l),a.reMapTableColumns(n,v),s._updateColumns(l,d.columns,i,r),s._updateTableProperties(n,d),o=t.cellProperties,i[0]&&a.attr(i[0],{id:o.id||null}),(o.selectAllCells?e(l).children():e(i)).each(function(e,t){s._updateCellProperties(t,o)}),s._updateCaption(n,d),u?s._updateHeadersWithThead(n,t):s._updateHeadersNoThead(n,t),s._updateHeaderAssociates(n,d),a.clearTableMappings(n,v)},_isHeadingRow:function(e){return a.is(e.cells[0],_)&&a.is(e.parentNode,k)},_isHeadingCell:function(e){return a.is(e,_)},cellsWithHeadersAssociated:function(t){var n,i=e(t.rows).children(),r=[],o=function(e){return r.indexOf(e)>-1};return i.each(function(e,t){t.id&&a.is(t,_)&&r.push(t.id)}),n=i.filter(function(e,t){var n,i=t.getAttribute(y);return!!(i&&!a.is(t,_)&&(n=i.split(" "),n&&n.length>0))&&n.some(o)}),!!n.length},_insertCells:function(e,t,n){n=isNaN(n)?-1:n;for(var i,r=0;r<e;r++)i=t.insertCell(n),i.innerHTML=" "},_deleteTableRows:function(e,t){for(var n,i,r=0;r<t;r++)n=e.pop(),i=n.parentNode,i.removeChild(n),i.rows.length||a.remove(i)},createNewTable:function(e){var t,n,i=this,r=i.editor.document,o=e.tableProperties,s=a.create(r,w),l=0;return i._updateTableProperties(s,o),i._updateCaption(s,o),o.headerRows&&o.headerRows>0&&(t=s.createTHead(),i._createTableRows(e,t,l,!0),l+=o.headerRows),n=s.createTBody(),i._createTableRows(e,n,l,!1),a.reMapTableColumns(s,v),"ids"===o.cellsWithHeaders?a.associateWithIds(s):"scope"===o.cellsWithHeaders&&i._addScopes(s,o.headerRows,o.headerColumns),a.clearTableMappings(s,v),s},_createTableRows:function(e,t,n,i){var r,o,a,s,l=this,d=e.tableProperties,c=e.cellProperties,u=d.columns,p=i?d.headerRows:d.rows,f=c.selectAllCells,h=d.headerColumns;for(r=n;r<p;r++)for(o=t.insertRow(),a=0;a<u;a++)s=i||h>a?document.createElement(_):document.createElement(b),o.appendChild(s),s.innerHTML=" ",0===r&&0===a&&c.id&&(s.id=c.id),l._updateCellProperties(s,f||0===r&&0===a?c:{})},_addRows:function(t,n,i){for(var r,o=this,a=e(t).index(),s=t.cells.length,l=n-i.length,d=t.parentNode;l;)r=d.insertRow(a+1),o._insertCells(s-r.cells.length,r),l--},_updateColumns:function(t,n,i,r){var o,a=this,s=a._lastInCollection,l=s(t[0].cells),d=+l.getAttribute(v)+l.colSpan;d>n&&e(t).each(function(e,t){for(var i=s(t.cells),r=+i.getAttribute(v)+i.colSpan;r>n;)i.colSpan&&i.colSpan>1?i.colSpan-=1:t.deleteCell(-1),i=s(t.cells),r=+i.getAttribute(v)+i.colSpan}),d<n&&(o=e(s(i)||s(r.cells)).index(),e(t).each(function(e,t){var i=s(t.cells);a._insertCells(n-+i.getAttribute(v)-i.colSpan,t,o+1)}))},_updateTableProperties:function(t,n){var i=this._getStylesData(n);a.attr(t,{cellSpacing:n.cellSpacing||null,cellPadding:n.cellPadding||null,className:n.className||null,id:n.id||null,summary:n.summary||null,style:i||null}),e(t).addClass("k-table")},_updateCellProperties:function(e,t){var n=this._getStylesData(t);n.padding=t.cellPadding||null,n.margin=t.cellMargin||null,a.attr(e,{style:n||null,className:t.className||null})},_updateCaption:function(e,t){var n,i;e.caption&&!t.captionContent?e.deleteCaption():t.captionContent&&(n=e.createCaption(),n.innerHTML=t.captionContent,i=this._getAlignmentData(t.captionAlignment),a.attr(n,{style:{textAlign:i.textAlign,verticalAlign:i.verticalAlign}}))},_updateHeadersNoThead:function(e,t){var n,i,r,o,s,l=this,d=t.tableProperties,c=e.rows;for(o=0;o<c.length;o++)for(n=c[o],i=n.cells,s=0;s<i.length;s++)r=i[s],!l._isHeadingCell(r)&&(o<d.headerRows||d.headerColumns>r.getAttribute(v))?a.changeTag(r,_,!1):l._isHeadingCell(r)&&o>=d.headerRows&&d.headerColumns<=r.getAttribute(v)&&a.changeTag(r,b,!1)},_updateHeadersWithThead:function(e,t){var n,i,r,o=this,s=t.tableProperties,l=e.tHead,d=0,c=e.tBodies[0];if(c||(c=e.createTBody()),s.headerRows&&s.headerRows>0){for(l||(l=e.createTHead());l.rows.length<s.headerRows;)l.appendChild(c.rows[0]);for(;l.rows.length>s.headerRows;)c.appendChild(l.rows[0]);o._swapToHeaderCells(l)}else if(l){for(;l.rows.length>0;)c.appendChild(l.rows[l.rows.length-1]);e.deleteTHead()}for(;c.rows.length>d;){for(n=c.rows[d],r=0;r<n.cells.length;r++)i=n.cells[r],o._isHeadingCell(i)&&s.headerColumns<=i.getAttribute(v)?a.changeTag(i,b,!1):!o._isHeadingCell(i)&&s.headerColumns>i.getAttribute(v)&&a.changeTag(i,_,!1);d+=1}},_updateHeaderAssociates:function(e,t){var n=this;"ids"===t.cellsWithHeaders?(n.cellsWithHeadersAssociated(e)||n._removeScopes(e),a.associateWithIds(e)):"scope"===t.cellsWithHeaders?(n.cellsWithHeadersAssociated(e)&&n._removeAssociates(e),n._addScopes(e,t.headerRows,t.headerColumns)):n.cellsWithHeadersAssociated(e)?n._removeAssociates(e):n._removeScopes(e)},_addScopes:function(e,t,n){var i,r,o,a,s=e.rows;for(i=0;i<s.length;i++)for(o=s[i],r=0;r<o.cells.length;r++)a=o.cells[r],i<t?a.setAttribute(g,f):a.getAttribute(v)<n&&a.setAttribute(g,h)},_removeScopes:function(t){e(t).find(_).removeAttr(g),e(t).find(f).remove(),e(t).find(m).remove()},_removeAssociates:function(t){e(t).find("th, td").removeAttr("id headers")},_swapToHeaderCells:function(t){var n=e(t).find("td"),i=function(e,t){a.changeTag(t,_,!1)};n.each(i)},_getStylesData:function(e){var t=this._getAlignmentData(e.alignment),n="wrapText"in e?e.wrapText?"":"nowrap":null;return{width:e.width?e.width+e.widthUnit:null,height:e.height?e.height+e.heightUnit:null,textAlign:t.textAlign,verticalAlign:t.verticalAlign,backgroundColor:e.bgColor||"",borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderColor:e.borderColor||"",borderCollapse:e.collapseBorders?"collapse":null,whiteSpace:n}},_getAlignmentData:function(e){var t,n="",i=n;return e&&(e.indexOf(" ")!=-1?(t=e.split(" "),n=t[0],i=t[1]):n=e),{textAlign:n,verticalAlign:i}},parseTable:function(n,i){var r,o,s,l,d,c,u,p,f,h,m,g,_;return n?(r=this,o=n.style,s=n.rows,l=n.caption,d=e(l?l.cloneNode(!0):t),d.find(".k-marker").remove(),c=n.className,c=c.replace(/^k-table\s|\sk-table$/,""),c=c.replace(/\sk-table\s/," "),c=c.replace(/^k-table$/,""),u=r._getAlignment(n,!0),p=l?r._getAlignment(l):t,f=a._getNumberOfHeaderRows(n),h=r.cellsWithHeadersAssociated(n)?"ids":e(n).find("th[scope]").length>0?"scope":"none",a.reMapTableColumns(n,v),m=a._getNumberOfColumns(n),g=a._getNumberOfHeaderColumns(n,f),a.clearTableMappings(n,v),_={tableProperties:{width:o.width||n.width?parseFloat(o.width||n.width):null,height:o.height||n.height?parseFloat(o.height||n.height):null,columns:m,rows:s.length,widthUnit:r._getUnit(o.width),heightUnit:r._getUnit(o.height),cellSpacing:n.cellSpacing,cellPadding:n.cellPadding,alignment:u.textAlign,bgColor:o.backgroundColor||n.bgColor,className:c,id:n.id,borderWidth:o.borderWidth||n.border,borderColor:o.borderColor,borderStyle:o.borderStyle||"",collapseBorders:!!o.borderCollapse,summary:n.summary,captionContent:l?d.html():"",captionAlignment:l&&p.textAlign?p.textAlign+" "+p.verticalAlign:"",headerRows:f,headerColumns:g,cellsWithHeaders:h},selectedCells:[]},_.rows=r.parseTableRows(s,i,_),_):{tableProperties:{},selectedCells:[]}},parseTableRows:function(t,n,i){var r,o,a,s,l,d,c,u=this,p=[];for(d=0;d<t.length;d++)for(r=t[d],o={cells:[]},a=r.cells,p.push(o),c=0;c<a.length;c++)s=a[c],l=u.parseCell(s),e.inArray(s,n)!=-1&&i.selectedCells.push(l),o.cells.push(l);return p},parseCell:function(e){var t,n=this,i=e.style,r=n._getAlignment(e);return r=r.textAlign?r.textAlign+" "+r.verticalAlign:"",t={width:i.width||e.width?parseFloat(i.width||e.width):null,height:i.height||e.height?parseFloat(i.height||e.height):null,widthUnit:n._getUnit(i.width),heightUnit:n._getUnit(i.height),cellMargin:i.margin,cellPadding:i.padding,alignment:r,bgColor:i.backgroundColor||e.bgColor,className:e.className,id:e.id,borderWidth:i.borderWidth||e.border,borderColor:i.borderColor,borderStyle:i.borderStyle,wrapText:"nowrap"!=i.whiteSpace}},_getAlignment:function(e,t){var n,i=e.style,r=i.textAlign||e.align||"";return t?{textAlign:r}:(n=i.verticalAlign||e.vAlign||"",r&&n?{textAlign:r,verticalAlign:n}:!r&&n?{textAlign:"left",verticalAlign:n}:r&&!n?{textAlign:r,verticalAlign:"top"}:{textAlign:"",verticalAlign:""})},_getUnit:function(e){var t=(e||"").match(p);return t?t[0]:"px"},_selectedTable:function(e){var t=a.filterBy(o.nodes(e),a.htmlIndentSpace,!0);return c.findSuitable(t)[0]},_selectedCells:function(e){var t=a.filterBy(o.nodes(e),a.htmlIndentSpace,!0);return u.findSuitable(t)},_lastInCollection:function(e){return e[e.length-1]}}),C=i.Tool.extend({command:function(e){return e.insertNewTable=this.options.insertNewTable,new x(e)}}),T=C.extend({update:function(e,t){var n=!c.isFormatted(t);n===!0?(e.parent().addClass("k-hidden k-state-disabled"),e.attr("disabled","disabled"),e.addClass("k-state-disabled")):(e.parent().removeClass("k-hidden k-state-disabled"),e.removeAttr("disabled"),e.removeClass("k-state-disabled"))}});n.ui.editor.TableWizardTool=C,n.ui.editor.TableWizardCommand=x,s("tableWizard",new T({command:x,insertNewTable:!1,template:new l({template:r.buttonTemplate,title:"Table Wizard"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/table-wizard/table-wizard-dialog.min",["editor/table-wizard/table-wizard-command.min","kendo.tabstrip.min"],e)}(function(){!function(e,t){var n=window.kendo,i={format:"0",min:0},r=["px","em"],o=["solid","dotted","dashed","double","groove","ridge","inset","outset","initial","inherit","none","hidden"],a=4,s={dataSource:[{className:"k-icon k-i-table-align-middle-left",value:"left"},{className:"k-icon k-i-table-align-middle-center",value:"center"},{className:"k-icon k-i-table-align-middle-right",value:"right"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},l={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-middle-left",value:"left middle"},{className:"k-icon k-i-table-align-middle-center",value:"center middle"},{className:"k-icon k-i-table-align-middle-right",value:"right middle"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"
|
31
|
-
},d={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},c='<div class="k-editor-dialog k-editor-table-wizard-dialog k-action-window k-popup-edit-form"><div class="k-edit-form-container"><div id="k-table-wizard-tabs" class="k-root-tabs"><ul><li class="k-state-active">#= messages.tableTab #</li><li>#= messages.cellTab #</li><li>#= messages.accessibilityTab #</li></ul><div id="k-table-properties"><div class="k-edit-label"><label for="k-editor-table-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-width" /><input id="k-editor-table-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-height" /><input id="k-editor-table-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-columns">#= messages.columns #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-columns" /></div><div class="k-edit-label"><label for="k-editor-table-rows">#= messages.rows #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-rows" /></div><div class="k-edit-label"><label for="k-editor-table-cell-spacing">#= messages.cellSpacing #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-spacing" /></div><div class="k-edit-label"><label for="k-editor-table-cell-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-padding" /></div><div class="k-edit-label"><label for="k-editor-table-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-table-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-table-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-table-bg" /></div><div class="k-edit-label"><label for="k-editor-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-css-class" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-id" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-border-width" /><input id="k-editor-border-color" /></div><div class="k-edit-label"><label for="k-editor-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-border-style" /></div><div class="k-edit-label"> </div><div class="k-edit-field"><input id="k-editor-collapse-borders" type="checkbox" class="k-checkbox" /><label for="k-editor-collapse-borders" class="k-checkbox-label">#= messages.collapseBorders #</label></div></div><div id="k-cell-properties"><div class="k-edit-field"><input id="k-editor-selectAllCells" type="checkbox" class="k-checkbox" /><label for="k-editor-selectAllCells" class="k-checkbox-label">#= messages.selectAllCells #</label></div><div class="k-edit-label"><label for="k-editor-cell-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-width" /><input id="k-editor-cell-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-cell-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-height" /><input id="k-editor-cell-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-cell-margin">#= messages.cellMargin #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-margin" /></div><div class="k-edit-label"><label for="k-editor-table-cells-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cells-padding" /></div><div class="k-edit-label"><label for="k-editor-cell-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-cell-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-cell-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-cell-bg" /></div><div class="k-edit-label"><label for="k-editor-cell-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-cell-css-class" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-cell-id" class="k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-border-width" /><input id="k-editor-cell-border-color" /></div><div class="k-edit-label"><label for="k-editor-cell-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-cell-border-style" /></div><div class="k-edit-label"> </div><div class="k-edit-field"><input id="k-editor-wrap-text" type="checkbox" class="k-checkbox" /><label for="k-editor-wrap-text" class="k-checkbox-label">#= messages.wrapText #</label></div></div><div id="k-accessibility-properties"><div class="k-edit-label"><label for="k-editor-table-header-rows">#= messages.headerRows #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-header-rows" /></div><div class="k-edit-label"><label for="k-editor-table-header-columns">#= messages.headerColumns #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-header-columns" /></div><div class="k-edit-label"><label for="k-editor-table-caption">#= messages.caption #</label></div><div class="k-edit-field"><input id="k-editor-table-caption" class="k-textbox" type="text"/></div><div class="k-edit-label"><label for="k-editor-accessibility-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-accessibility-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-accessibility-summary">#= messages.summary #</label></div><div class="k-edit-field"><textarea id="k-editor-accessibility-summary" rows="5" class="k-textbox k-editor-accessibility-summary" placeholder="#= messages.tableSummaryPlaceholder #"></textarea></div><div class="k-edit-label"><label for="k-editor-cells-headers">#= messages.associateCellsWithHeaders #</label></div><div class="k-edit-field"><select id="k-editor-cells-headers"><option value="none">#= messages.associateNone #</option><option value="scope">#= messages.associateScope #</option><option value="ids">#= messages.associateIds #</option></select></div></div></div><div class="k-edit-buttons k-state-default"><button class="k-button k-primary k-dialog-ok">#= messages.dialogOk #</button><button class="k-button k-dialog-close">#= messages.dialogCancel #</button></div></div></div>',u=n.Class.extend({init:function(e){this.options=e},open:function(){function t(e){e.preventDefault(),l.destroy(),o.destroy()}function i(e){l.collectDialogValues(u),t(e),l.change&&l.change(),d.closeCallback(u)}function r(e){t(e),d.closeCallback()}var o,a,s,l=this,d=l.options,c=d.dialogOptions,u=d.table,p=d.messages,f=n.support.browser.msie;c.close=r,c.title=p.tableWizard,c.visible=d.visible,o=e(l._dialogTemplate(p)).appendTo(document.body).kendoWindow(c).closest(".k-window").toggleClass("k-rtl",d.isRtl).end().find(".k-dialog-ok").click(i).end().find(".k-dialog-close").click(r).end().data("kendoWindow"),a=o.element,l._initTabStripComponent(a),l._initTableViewComponents(a,u),l._initCellViewComponents(a,u),l._initAccessibilityViewComponents(a,u),o.center(),o.open(),f&&(s=a.closest(".k-window").height(),a.css("max-height",s))},_initTabStripComponent:function(e){var t=this.components={};t.tabStrip=e.find("#k-table-wizard-tabs").kendoTabStrip({animation:!1}).data("kendoTabStrip")},collectDialogValues:function(){var e=this,t=e.options.table;e._collectTableViewValues(t),e._collectCellViewValues(t),e._collectAccessibilityViewValues(t)},_collectTableViewValues:function(e){var t=this.components.tableView,n=e.tableProperties;n.width=t.width.value(),n.widthUnit=t.widthUnit.value(),n.height=t.height.value(),n.columns=t.columns.value(),n.rows=t.rows.value(),n.heightUnit=t.heightUnit.value(),n.cellSpacing=t.cellSpacing.value(),n.cellPadding=t.cellPadding.value(),n.alignment=t.alignment.value(),n.bgColor=t.bgColor.value(),n.className=t.className.value,n.id=t.id.value,n.borderWidth=t.borderWidth.value(),n.borderColor=t.borderColor.value(),n.borderStyle=t.borderStyle.value(),n.collapseBorders=t.collapseBorders.checked},_collectCellViewValues:function(e){var t=e.cellProperties={},n=this.components.cellView;t.selectAllCells=n.selectAllCells.checked,t.width=n.width.value(),t.widthUnit=n.widthUnit.value(),t.height=n.height.value(),t.heightUnit=n.heightUnit.value(),t.cellMargin=n.cellMargin.value(),t.cellPadding=n.cellPadding.value(),t.alignment=n.alignment.value(),t.bgColor=n.bgColor.value(),t.className=n.className.value,t.id=n.id.value,t.borderWidth=n.borderWidth.value(),t.borderColor=n.borderColor.value(),t.borderStyle=n.borderStyle.value(),t.wrapText=n.wrapText.checked,t.width||(t.selectAllCells=!0,t.width=100/e.tableProperties.columns,t.widthUnit="%")},_collectAccessibilityViewValues:function(e){var t=e.tableProperties,n=this.components.accessibilityView;t.captionContent=n.captionContent.value,t.captionAlignment=n.captionAlignment.value(),t.summary=n.summary.value,t.cellsWithHeaders=n.cellsWithHeaders.value(),t.headerRows=n.headerRows.value(),t.headerColumns=n.headerColumns.value()},_addUnit:function(t,n){n&&e.inArray(n,t)==-1&&t.push(n)},_initTableViewComponents:function(e,t){var n,i,s=this,l=s.components,d=l.tableView={},c=t.tableProperties=t.tableProperties||{};c.borderStyle=c.borderStyle||"",n=function(e){var t=s.components.accessibilityView,n=t.headerColumns,i=n.value(),r=e.sender.value();r<i&&n.value(r),n.max(r)},i=function(e){var t=s.components.accessibilityView,n=t.headerRows,i=n.value(),r=e.sender.value();r<i&&n.value(r),n.max(r)},s._addUnit(r,c.widthUnit),s._addUnit(r,c.heightUnit),s._initNumericTextbox(e.find("#k-editor-table-width"),"width",c,d),s._initNumericTextbox(e.find("#k-editor-table-height"),"height",c,d),s._initNumericTextbox(e.find("#k-editor-table-columns"),"columns",c,d,{min:1,value:a,change:n}),s._initNumericTextbox(e.find("#k-editor-table-rows"),"rows",c,d,{min:1,value:a,change:i}),s._initDropDownList(e.find("#k-editor-table-width-type"),"widthUnit",c,d,r),s._initDropDownList(e.find("#k-editor-table-height-type"),"heightUnit",c,d,r),s._initNumericTextbox(e.find("#k-editor-table-cell-spacing"),"cellSpacing",c,d),s._initNumericTextbox(e.find("#k-editor-table-cell-padding"),"cellPadding",c,d),s._initTableAlignmentDropDown(e.find("#k-editor-table-alignment"),c),s._initColorPicker(e.find("#k-editor-table-bg"),"bgColor",c,d),s._initInput(e.find("#k-editor-css-class"),"className",c,d),s._initInput(e.find("#k-editor-id"),"id",c,d),s._initNumericTextbox(e.find("#k-editor-border-width"),"borderWidth",c,d),s._initColorPicker(e.find("#k-editor-border-color"),"borderColor",c,d),s._initDropDownList(e.find("#k-editor-border-style"),"borderStyle",c,d,o),s._initCheckbox(e.find("#k-editor-collapse-borders"),"collapseBorders",c,d)},_initCellViewComponents:function(e,t){var n,i=this.components,a=i.cellView={};t.selectedCells=t.selectedCells=t.selectedCells||[],n=t.selectedCells[0]||{borderStyle:"",wrapText:!0},this._addUnit(r,n.widthUnit),this._addUnit(r,n.heightUnit),this._initCheckbox(e.find("#k-editor-selectAllCells"),"selectAllCells",t.tableProperties,a),this._initNumericTextbox(e.find("#k-editor-cell-width"),"width",n,a),this._initNumericTextbox(e.find("#k-editor-cell-height"),"height",n,a),this._initDropDownList(e.find("#k-editor-cell-width-type"),"widthUnit",n,a,r),this._initDropDownList(e.find("#k-editor-cell-height-type"),"heightUnit",n,a,r),this._initNumericTextbox(e.find("#k-editor-table-cell-margin"),"cellMargin",n,a),this._initNumericTextbox(e.find("#k-editor-table-cells-padding"),"cellPadding",n,a),this._initCellAlignmentDropDown(e.find("#k-editor-cell-alignment"),n),this._initColorPicker(e.find("#k-editor-cell-bg"),"bgColor",n,a),this._initInput(e.find("#k-editor-cell-css-class"),"className",n,a),this._initInput(e.find("#k-editor-cell-id"),"id",n,a),this._initNumericTextbox(e.find("#k-editor-cell-border-width"),"borderWidth",n,a),this._initColorPicker(e.find("#k-editor-cell-border-color"),"borderColor",n,a),this._initDropDownList(e.find("#k-editor-cell-border-style"),"borderStyle",n,a,o),this._initCheckbox(e.find("#k-editor-wrap-text"),"wrapText",n,a)},_initAccessibilityViewComponents:function(e,t){var n=this.components,i=n.accessibilityView={},r=t.tableProperties;this._initInput(e.find("#k-editor-table-caption"),"captionContent",r,i),this._initAccessibilityAlignmentDropDown(e.find("#k-editor-accessibility-alignment"),r),this._initInput(e.find("#k-editor-accessibility-summary"),"summary",r,i),this._initAssociationDropDown(e.find("#k-editor-cells-headers"),"cellsWithHeaders",{valuePrimitive:!0},r,i),this._initNumericTextbox(e.find("#k-editor-table-header-rows"),"headerRows",r,i,{max:r.rows||a}),this._initNumericTextbox(e.find("#k-editor-table-header-columns"),"headerColumns",r,i,{max:r.columns||a})},_initNumericTextbox:function(t,n,r,o,a){var s=o[n]=t.kendoNumericTextBox(a?e.extend({},i,a):i).data("kendoNumericTextBox");n in r&&s.value(parseInt(r[n],10))},_initDropDownList:function(e,t,n,i,r){var o=i[t]=e.kendoDropDownList({dataSource:r}).data("kendoDropDownList");this._setComponentValue(o,n,t)},_initTableAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,r=s.dataSource;r[0].tooltip=n.alignLeft,r[1].tooltip=n.alignCenter,r[2].tooltip=n.alignRight,r[3].tooltip=n.alignRemove,this._initAlignmentDropDown(e,s,"alignment",t,i)},_initCellAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.cellView,r=l.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftMiddle,r[4].tooltip=n.alignCenterMiddle,r[5].tooltip=n.alignRightMiddle,r[6].tooltip=n.alignLeftBottom,r[7].tooltip=n.alignCenterBottom,r[8].tooltip=n.alignRightBottom,r[9].tooltip=n.alignRemove,this._initAlignmentDropDown(e,l,"alignment",t,i)},_initAccessibilityAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.accessibilityView,r=d.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftBottom,r[4].tooltip=n.alignCenterBottom,r[5].tooltip=n.alignRightBottom,r[6].tooltip=n.alignRemove,this._initAlignmentDropDown(e,d,"captionAlignment",t,i)},_initAlignmentDropDown:function(e,t,n,i,r){var o=r[n]=e.kendoDropDownList(t).data("kendoDropDownList");o.list.addClass("k-align").css("width","110px"),this._setComponentValue(o,i,n)},_initAssociationDropDown:function(e,t,n,i,r){var o=r[t]=e.kendoDropDownList(n).data("kendoDropDownList");this._setComponentValue(o,i,t)},_setComponentValue:function(e,t,n){n in t&&e.value(t[n])},_initColorPicker:function(e,t,n,i){var r=i[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");n[t]&&r.value(n[t])},_initInput:function(e,t,n,i){var r=i[t]=e.get(0);t in n&&(r.value=n[t])},_initCheckbox:function(e,t,n,i){var r=i[t]=e.get(0);t in n&&(r.checked=n[t])},destroy:function(){this._destroyComponents(this.components.tableView),this._destroyComponents(this.components.cellView),this._destroyComponents(this.components.accessibilityView),this._destroyComponents(this.components),delete this.components},_destroyComponents:function(e){for(var t in e)e[t].destroy&&e[t].destroy(),delete e[t]},_dialogTemplate:function(e){return n.template(c)({messages:e})}});n.ui.editor.TableWizardDialog=u}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.editor.min",["kendo.combobox.min","kendo.dropdownlist.min","kendo.resizable.min","kendo.window.min","kendo.colorpicker.min","kendo.imagebrowser.min","kendo.numerictextbox.min","util/undoredostack.min","editor/main.min","editor/dom.min","editor/serializer.min","editor/range.min","editor/command.min","editor/components.min","editor/toolbar.min","editor/immutables.min","editor/plugins/viewhtml.min","editor/plugins/link.min","editor/plugins/lists.min","editor/plugins/formatting.min","editor/plugins/image.min","editor/plugins/import.min","editor/plugins/insert.min","editor/plugins/export.min","editor/plugins/indent.min","editor/plugins/linebreak.min","editor/plugins/format.min","editor/plugins/inlineformat.min","editor/plugins/formatblock.min","editor/plugins/file.min","editor/plugins/tables.min","editor/plugins/clipboard.min","editor/plugins/keyboard.min","editor/plugins/exportpdf.min","editor/plugins/print.min","editor/plugins/formatpainter.min","editor/resizing/column-resizing.min","editor/resizing/row-resizing.min","editor/resizing/table-resizing.min","editor/resizing/table-resize-handle.min","editor/table-wizard/table-wizard-command.min","editor/table-wizard/table-wizard-dialog.min"],e)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.menu.min",["kendo.popup.min","kendo.data.min"],e)}(function(){return function(e,t){function n(e,t){return e=e.split(" ")[!t+0]||e,e.replace("top","up").replace("bottom","down")}function i(e,t,n){e=e.split(" ")[!t+0]||e;var i={origin:["bottom",n?"right":"left"],position:["top",n?"right":"left"]},r=/left|right/.test(e);return r?(i.origin=["top",e],i.position[1]=T.directions[e].reverse):(i.origin[0]=e,i.position[0]=T.directions[e].reverse),i.origin=i.origin.join(" "),i.position=i.position.join(" "),i}function r(t,n){try{return e.contains(t,n)}catch(i){return!1}}function o(t){t=e(t),t.addClass("k-item k-menu-item").children(W).addClass(Z),t.children("a").addClass(G).children(W).addClass(Z),t.filter(":not([disabled])").addClass(xe),t.filter(".k-separator").removeClass("k-menu-item").addClass("k-menu-separator").empty().append(" "),t.filter("li[disabled]").addClass(Se).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children($).length||t.contents().filter(function(){return!(this.nodeName.match(V)||3==this.nodeType&&!T.trim(this.nodeValue))}).wrapAll("<span class='"+G+"'/>"),a(t),l(t)}function a(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow-60]:not(.k-sprite)").remove(),t.filter(":has(.k-menu-group)").children(".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))").each(function(){var t=e(this),n=s(t);t.append("<span class='k-menu-expand-arrow k-icon "+n+"' />")})}function s(e){var t,n=e.parent().parent(),i=T.support.isRtl(n);return t=n.hasClass(q+"-horizontal")?"k-i-arrow-60-down":i?"k-i-arrow-60-left":"k-i-arrow-60-right"}function l(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(J),t.filter(".k-last:not(:last-child)").removeClass(Y),t.filter(":first-child").addClass(J),t.filter(":last-child").addClass(Y)}function d(e){var t,n;if(e&&e.length)for(t in e)n=e.eq(t),n.find("ul").length?n.attr("aria-haspopup",!0):n.removeAttr("aria-haspopup")}function c(e){if(!e.hasClass(q))return e.parentsUntil("."+q,"li")}function u(t,n){var i=f(n);i&&p(t,i),n.items&&e(t).children("ul").children("li").each(function(e){u(this,n.items[e])})}function p(t,n){e(t).children(".k-link").data({selectHandler:n})}function f(e){var t=e.select,n=T.isFunction;return t&&n(t)?t:null}function h(e){return e?"li[data-groupparent='"+e+"']":"li[data-groupparent]"}function m(e){var t=e?"[data-group='"+e+"']":"[data-group]";return"ul"+t+",div"+t}function g(t,n){var i=t.find(h()),r=[];return i.each(function(i,o){var a,s;for(o=e(o),a=o.data(ke),s=t;a;)s=n.find(m(a)+":visible"),s.length&&r.push(s),o=s.find(h()),a=o.data(ke)}),r}function v(t,n){var i=t.data(be);return i?n.find(h(i)):e([])}function _(t,n){var i=t.data(ke);return i?n.children(Ee).children(m(i)):e([])}function b(t,n){var i,r,o=[],a=function(e){for(;e.parentNode&&!n.is(e.parentNode);)o.push(e.parentNode),e=e.parentNode},s=t[0]||t;for(a(s),i=o[o.length-1];e(i).is(Ee)&&(r=e(i).children("ul"),s=v(r,n)[0]);)o.push(s),a(s),i=o[o.length-1];return o}function k(e){var t=0;return e.wheelDelta&&(t=-e.wheelDelta/120,t=t>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=Math.round(e.detail/3)),t}function y(e,t){for(var n=0,i=e.parentNode;i&&!isNaN(i[t]);)n+=i[t],i=i.parentNode;return n}function w(e){return se&&e.originalEvent&&e.originalEvent.pointerType in Ue}function x(e){var t=e.originalEvent;return D&&/touch/i.test(t.type||"")}function C(e){e.contents().filter(function(){return"LI"!=this.nodeName}).remove()}var T=window.kendo,S=T.ui,I=T._activeElement,D=T.support.touch&&T.support.mobileOS,F=e.isArray,E=T.data.HierarchicalDataSource,A="mousedown",z="click",N=30,P=50,H=e.extend,R=e.proxy,O=e.each,M=T.template,B=T.keys,L=S.Widget,V=/^(ul|a|div)$/i,U=".kendoMenu",W="img",j="open",q="k-menu",G="k-link k-menu-link",$=".k-link",K=".k-menu-expand-arrow",Y="k-last",Q="close",X="timer",J="k-first",Z="k-image",ee="select",te="zIndex",ne="activate",ie="deactivate",re="touchstart"+U+" MSPointerDown"+U+" pointerdown"+U,oe=T.support.pointers,ae=T.support.msPointers,se=ae||oe,le="change",de="error",ce=T.support.touch?"touchstart":"",ue=oe?"pointerover":ae?"MSPointerOver":"mouseenter",pe=oe?"pointerout":ae?"MSPointerOut":"mouseleave",fe="DOMMouseScroll"+U+" mousewheel"+U,he=T.support.resize+U,me="scrollWidth",ge="scrollHeight",ve="offsetWidth",_e="offsetHeight",be="group",ke="groupparent",ye=e(document.documentElement),we="kendoPopup",xe="k-state-default",Ce="k-state-hover",Te="k-state-focused",Se="k-state-disabled",Ie="k-state-selected",De=".k-menu",Fe=".k-menu-group",Ee=".k-animation-container",Ae=Fe+","+Ee,ze=":not(.k-list) > .k-item",Ne=".k-item.k-state-disabled",Pe=".k-item",He=".k-item:not(.k-state-disabled)",Re=".k-item:not(.k-state-disabled) > .k-link",Oe=":not(.k-item.k-separator)",Me=Pe+Oe+":eq(0)",Be=Pe+Oe+":last",Le="div:not(.k-animation-container,.k-list-container)",Ve=".k-menu-scroll-button",Ue={2:1,touch:1},We="string",je="dataBound",qe={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField",imageAttr:"dataImageAttrField",content:"dataContentField"},Ge={wrapperCssClass:function(e,t){var n="k-item k-menu-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),t.attr&&t.attr.hasOwnProperty("class")&&(n+=" "+t.attr["class"]),t.selected&&(n+=" "+Ie),n},itemCssAttributes:function(e){var t,n="",i=e.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(n+=t+'="'+i[t]+'" ');return n},imageCssAttributes:function(e){var t,n="",i=e&&e.toJSON?e.toJSON():{};i["class"]?i["class"]+=" "+Z:i["class"]=Z;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},contentCssAttributes:function(e){var t,n="",i=e.contentAttr||{},r="k-content k-group k-menu-group";i["class"]?i["class"]+=" "+r:i["class"]=r;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},textClass:function(){return G},arrowClass:function(e,t){var n="k-menu-expand-arrow k-icon";return n+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group k-menu-group"},content:function(e){return e.content?e.content:" "}},$e=T.ui.DataBoundWidget.extend({init:function(e,t){var n=this;L.fn.init.call(n,e,t),e=n.wrapper=n.element,t=n.options,n._accessors(),n._templates(),n._dataSource(),n._updateClasses(),n._animations(t),n.nextItemZIndex=100,n._tabindex(),n._initOverflow(t),n._attachMenuEventsHandlers(),t.openOnClick&&(n.clicked=!1),e.attr("role","menubar"),e[0].id&&(n._ariaId=T.format("{0}_mn_active",e[0].id)),T.notify(n)},events:[j,Q,ne,ie,ee,je],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,scrollable:!1,popupCollision:t},_initData:function(){var e=this;e.dataSource&&(e.angular("cleanup",function(){return{elements:e.element.children()}}),e.element.empty(),e.append(e.dataSource.view(),e.element),e.angular("compile",function(){return{elements:e.element.children()}}))},_attachMenuEventsHandlers:function(){var t=this,n=t.element,i=t.options,r=t._overflowWrapper();(r||n).on(re,Pe,R(t._focusHandler,t)).on(z+U,Ne,!1).on(z+U,Pe,R(t._click,t)).on(re+" "+A+U,".k-content",R(t._preventClose,t)).on(ue+U,He,R(t._mouseenter,t)).on(pe+U,He,R(t._mouseleave,t)).on(A+U,He,R(t._mousedown,t)).on(ce+U+" "+ue+U+" "+pe+U+" "+A+U+" "+z+U,Re,R(t._toggleHover,t)),n.on("keydown"+U,R(t._keydown,t)).on("focus"+U,R(t._focus,t)).on("focus"+U,".k-content",R(t._focus,t)).on("blur"+U,R(t._removeHoverItem,t)).on("blur"+U,"[tabindex]",R(t._checkActiveElement,t)),r&&r.on(pe+U,Ae,R(t._mouseleavePopup,t)).on(ue+U,Ae,R(t._mouseenterPopup,t)),i.openOnClick&&(t._documentClickHandler=R(t._documentClick,t),e(document).click(t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,n=t._overflowWrapper();n&&n.off(U),t.element.off(U),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},_initOverflow:function(t){var n,i,r,o,a=this,s="horizontal"==t.orientation;t.scrollable&&(a._openedPopups={},a._scrollWrapper=a.element.wrap("<div class='k-menu-scroll-wrapper "+t.orientation+"'></div>").parent(),s&&C(a.element),n=e(a.templates.scrollButton({direction:s?"left":"up"})),i=e(a.templates.scrollButton({direction:s?"right":"down"})),n.add(i).appendTo(a._scrollWrapper),a._initScrolling(a.element,n,i,s),r=a.element.outerWidth(),o=a.element[0].style.width,o="auto"===o?"":o,s&&e(window).on(he,T.throttle(function(){a._setOverflowWrapperWidth(r,o),a._toggleScrollButtons(a.element,n,i,s)},100)),a._setOverflowWrapperWidth(r,o),a._toggleScrollButtons(a.element,n,i,s))},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var n,i,r,o,a=this,s=a._scrollWrapper.css("width");a._scrollWrapper.css({width:""}),n=a._scrollWrapper.outerWidth(),a._scrollWrapper.css({width:s}),i=a.element.outerWidth(),r=a.element[0].offsetWidth-a.element[0].clientWidth,i!=n&&n>0&&(o=t?Math.min(e,n):n,a.element.width(o-r),a._scrollWrapper.width(o))},_reinitOverflow:function(e){var t=this,n=e.scrollable&&!t.options.scrollable||!e.scrollable&&t.options.scrollable||e.scrollable&&t.options.scrollable&&e.scrollable.distance!=t.options.scrollable.distance||e.orientation!=t.options.orientation;n&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(e),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var n=this,i=n._overflowWrapper();i&&(i.off(U),i.find(Ve).off(U).remove(),i.children(Ee).each(function(t,n){var r,o=e(n).children(Fe);o.off(fe),r=v(o,i),r.length&&r.append(n)}),i.find(h()).removeAttr("data-groupparent"),i.find(m()).removeAttr("data-group"),n.element.off(fe),e(window).off(he),i.contents().unwrap(),n._scrollWrapper=n._popupsWrapper=n._openedPopups=t)},_initScrolling:function(t,n,i,r){var o=this,a=o.options.scrollable,s=e.isNumeric(a.distance)?a.distance:P,l=s/2,d="-="+s,c="+="+s,u="-="+2*s,p="+="+2*s,f=!1,h=!1,m=function(e){var a=r?{scrollLeft:e}:{scrollTop:e};t.finish().animate(a,"fast","linear",function(){f&&m(e)}),o._toggleScrollButtons(t,n,i,r)},g=function(e){f||h||(m(e.data.direction),f=!0)},v=function(a){var s=r?{scrollLeft:a.data.direction}:{scrollTop:a.data.direction};h=x(a)||w(a),t.stop().animate(s,"fast","linear",function(){h?(o._toggleScrollButtons(t,n,i,r),f=!0):e(a.currentTarget).trigger(ue)}),f=!1,a.stopPropagation(),a.preventDefault()};n.on(ue+U,{direction:d},g).on(T.eventMap.down+U,{direction:u},v),i.on(ue+U,{direction:c},g).on(T.eventMap.down+U,{direction:p},v),n.add(i).on(pe+U,function(){t.stop(),f=!1,o._toggleScrollButtons(t,n,i,r)}),t.on(fe,function(e){var a,s,d,c;e.ctrlKey||e.shiftKey||e.altKey||(a=k(e.originalEvent),s=Math.abs(a)*l,d=(a>0?"+=":"-=")+s,c=r?{scrollLeft:d}:{scrollTop:d},o._closeChildPopups(t),t.finish().animate(c,"fast","linear",function(){o._toggleScrollButtons(t,n,i,r)}),e.preventDefault())})},_toggleScrollButtons:function(e,t,n,i){var r=i?T.scrollLeft(e):e.scrollTop(),o=i?me:ge,a=i?ve:_e;t.toggle(0!==r),n.toggle(r<e[0][o]-e[0][a]-1)},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=H(!0,t,e.animation),"dataSource"in e&&this._dataSource(e),this._updateClasses(),this._reinitOverflow(e),L.fn.setOptions.call(this,e)},destroy:function(){var e=this;L.fn.destroy.call(e),e._detachMenuEventsHandlers(),e._destroyOverflow(),T.destroy(e.element)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},attemptGetItem:function(t){var n,i;return t=t||this.element,n=this.element.find(t),i=this._overflowWrapper(),n.length||t===this.element?n:i?i.find(t):e()},append:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.length?this._childPopupElement(t):null);return O(n.items,function(t){n.group.append(this),a(this),u(this,e[t]||e)}),a(t),l(n.group.find(".k-first, .k-last").add(n.items)),d(c(n.group)),this},insertBefore:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.parent());return O(n.items,function(n){t.before(this),a(this),l(this),u(this,e[n]||e)}),l(t),this},insertAfter:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.parent());return O(n.items,function(n){t.after(this),a(this),l(this),u(this,e[n]||e)}),l(t),this},_insert:function(t,n,i){var r,a,s,l,d=this;return n&&n.length||(i=d.element),s=e.isPlainObject(t)||t instanceof T.data.ObservableObject,l={firstLevel:i.hasClass(q),horizontal:i.hasClass(q+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(d.renderGroup({group:l,options:d.options})).appendTo(n)),s||F(t)||t instanceof T.data.ObservableArray?r=e(e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t).get():e(d.renderItem({group:l,item:H(t,{index:n})})).get()})):(r="string"==typeof t&&"<"!=t.charAt(0)?d.element.find(t):e(t),a=r.find("> ul").addClass("k-menu-group").attr("role","menu"),r=r.filter("li"),r.add(a.find("> li")).each(function(){o(this)})),{items:r,group:i}},remove:function(e){var t,n,i,r,o;return e=this.attemptGetItem(e),t=this,n=e.parentsUntil(t.element,ze),i=e.parent("ul:not(.k-menu)"),e.remove(),i&&!i.children(ze).length&&(r=c(i),o=i.parent(Ee),o.length?o.remove():i.remove(),d(r)),n.length&&(n=n.eq(0),a(n),l(n)),t},_openAfterLoad:function(e,t){var n=this;t.loaded()?(n.open(e),n._loading=!1):t.one(le,function(){e.find(K).removeClass("k-i-loading"),n._loading&&(n.open(e),n._loading=!1)})},open:function(r){var o,a,s,l=this,d=l.options,c="horizontal"==d.orientation,u=d.direction,p=T.support.isRtl(l.wrapper),f=l._overflowWrapper();return r=(f||l.element).find(r),o=l.dataSource&&l.dataSource.getByUid(r.data(T.ns+"uid")),o&&o.hasChildren&&!o.loaded()&&!l._loading?(l._loading=!0,r.find(K).addClass("k-i-loading"),o.load(),l._openAfterLoad(r,o),t):(/^(top|bottom|default)$/.test(u)&&(u=p?c?(u+" left").replace("default","bottom"):"left":c?(u+" right").replace("default","bottom"):"right"),
|
32
|
-
a=">.k-popup:visible,>.k-animation-container>.k-popup:visible",s=function(){var t=e(this).data(we);t&&l.close(e(this).closest("li.k-item"),!0)},r.siblings().find(a).each(s),f&&r.find(a).each(s),l.options.openOnClick&&(l.clicked=!0),r.each(function(){var r=e(this);clearTimeout(r.data(X)),r.data(X,setTimeout(function(){var o,a,s,m,g,v,_,b,k,y,w=r.find(".k-menu-group:first:hidden");!w[0]&&f&&(a=l._getPopup(r),w=a&&a.element),w.is(":visible")||w[0]&&l._triggerEvent({item:r[0],type:j})===!1&&(!w.find(".k-menu-group")[0]&&w.children(".k-item").length>1?(s=e(window).height(),m=function(){w.css({maxHeight:s-(T._outerHeight(w)-w.height())-T.getShadows(w).bottom,overflow:"auto"})},T.support.browser.msie&&T.support.browser.version<=7?setTimeout(m,0):m()):w.css({maxHeight:"",overflow:""}),r.data(te,r.css(te)),g=l.nextItemZIndex++,r.css(te,g),l.options.scrollable&&r.parent().siblings(Ve).css({zIndex:++g}),o=w.data(we),v=r.parent().hasClass(q),_=v&&c,b=i(u,v,p),k=d.animation.open.effects,y=k!==t?k:"slideIn:"+n(u,v),o?(o=w.data(we),o.options.origin=b.origin,o.options.position=b.position,o.options.animation.open.effects=y):o=w.kendoPopup({activate:function(){l._triggerEvent({item:this.wrapper.parent(),type:ne})},deactivate:function(e){l._closing=!1,e.sender.element.removeData("targetTransform").css({opacity:""}),l._triggerEvent({item:this.wrapper.parent(),type:ie})},origin:b.origin,position:b.position,collision:d.popupCollision!==t?d.popupCollision:_?"fit":"fit flip",anchor:r,appendTo:f||r,animation:{open:H(!0,{effects:y},d.animation.open),close:d.animation.close},open:R(l._popupOpen,l),close:function(e){var t,n;l._closing=!0,t=e.sender.wrapper.parent(),f&&(n=e.sender.element.data(be),n&&(t=(f||l.element).find(h(n))),e.sender.wrapper.children(Ve).hide()),l._triggerEvent({item:t[0],type:Q})?e.preventDefault():(t.css(te,t.data(te)),t.removeData(te),l.options.scrollable&&t.parent().siblings(Ve).css({zIndex:""}),(D||se||T.support.mouseAndTouchPresent)&&(t.removeClass(Ce),l._removeHoverItem()))}}).data(we),w.removeAttr("aria-hidden"),l._configurePopupOverflow(o,r),o._hovered=!0,o.open(),l._initPopupScrolling(o))},l.options.hoverDelay))}),l)},_configurePopupOverflow:function(e,t){var n,i=this;i.options.scrollable&&(i._wrapPopupElement(e),t.attr("data-groupparent")||(n=(new Date).getTime(),t.attr("data-groupparent",n),e.element.attr("data-group",n)))},_wrapPopupElement:function(e){e.element.parent().is(Ee)||(e.wrapper=T.wrap(e.element,e.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(e,t,n){var i=this;i.options.scrollable&&e.element[0].scrollHeight>e.element[0].offsetHeight&&i._initPopupScrollButtons(e,t,n)},_initPopupScrollButtons:function(t,n,i){var r=this,o=t.wrapper.children(Ve),a=r.options.animation,s=(a&&a.open&&a.open.duration||0)+N;setTimeout(function(){var a,s;o.length||(a=e(r.templates.scrollButton({direction:n?"left":"up"})),s=e(r.templates.scrollButton({direction:n?"right":"down"})),o=a.add(s).appendTo(t.wrapper),r._initScrolling(t.element,a,s,n),i||o.on(ue+U,function(){var n=r._overflowWrapper();e(g(t.element,n)).each(function(e,t){var i=n.find(h(t.data(be)));r.close(i)})}).on(pe+U,function(){setTimeout(function(){e.isEmptyObject(r._openedPopups)&&r._closeParentPopups(t.element)},N)})),r._toggleScrollButtons(t.element,o.first(),o.last(),n)},s)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children("."+Te).removeClass(Te),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,n){var i,r,o,a,s,l,d,c,u,p=t.element,f=p.add(p.parent(Ee));f.height(p.hasClass(q)&&this._initialHeight||""),i=t._location(n),r=e(window).height(),o=i.height,a=n?0:Math.max(i.top,0),s=n?0:y(this._overflowWrapper()[0],"scrollTop"),l=window.innerHeight-r,d=r-T.getShadows(p).bottom+l,c=d+s>o+a,c||(u=Math.min(d,d-a+s),f.css({overflow:"hidden",height:u+"px"}))},close:function(t,n){var i,r,o=this,a=o._overflowWrapper(),s=a||o.element;return t=s.find(t),t.length||(t=s.find(">.k-item")),i=function(t){var n=!1;return e.isEmptyObject(o._openedPopups)?n:(e(g(t,a)).each(function(e,t){return n=!!o._openedPopups[""+t.data(be)],!n}),n)},r=function(e){var t=e.data(ke);return!a||!t||!o._openedPopups[""+t]},t.each(function(){var s=e(this);!n&&o._isRootItem(s)&&(o.clicked=!1),clearTimeout(s.data(X)),s.data(X,setTimeout(function(){var e=o._getPopup(s);if(e&&(r(s)||o._forceClose)){if(!o._forceClose&&i(e.element))return;e.close(),e.element.attr("aria-hidden",!0),a&&o._forceClose&&t.last().is(s[0])&&delete o._forceClose}},o.options.hoverDelay))}),o},_getPopup:function(e){var t,n,i=this,r=e.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(we),o=i._overflowWrapper();return!r&&o&&(t=e.data(ke),t&&(n=o.find(m(t)),r=n.data(we))),r},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(xe,n).toggleClass(Se,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(T.eventTarget(t)||t.target).closest(ze),i=t.type==ue||A.indexOf(t.type)!==-1;n.siblings().removeClass(Ce),n.parents("li."+Se).length||n.toggleClass(Ce,i||"mousedown"==t.type||"pointerover"==t.type||t.type==ce),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var n=this,i=e(t?t.currentTarget:this._hoverItem()),o=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){document.hasFocus()&&(r(o,T._activeElement())||!t||r(o,t.currentTarget))||n.close(o)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(Te)&&(e.removeClass(Te),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element,n=".k-menu-init div ul";t.removeClass("k-menu-horizontal k-menu-vertical"),t.addClass("k-widget k-reset k-header k-menu-init "+q).addClass(q+"-"+this.options.orientation),t.find("li > ul").filter(function(){return!T.support.matchesSelector.call(this,n)}).addClass("k-group k-menu-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).parent("li").attr("aria-haspopup","true").end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-menu-group > li"),t.removeClass("k-menu-init"),e.each(function(){o(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),o=n._itemHasChildren(i),a=i.data(ke)||i.parent().data(be),s=w(t);a&&(n._openedPopups[""+a]=!0),n._closing||t.delegateTarget!=i.parents(De)[0]&&t.delegateTarget!=i.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(n._keyTriggered=!1,n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(ze))||n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(ze))||(!(n.options.openOnClick===!1||n.options.openOnClick.rootMenuItems===!1&&n._isRootItem(i.closest(ze))||n.options.openOnClick.subMenuItems===!1&&!n._isRootItem(i.closest(ze))||n.clicked)||D||s&&n._isRootItem(i.closest(ze))||!r(t.currentTarget,t.relatedTarget)&&o&&n.open(i),(n.options.openOnClick===!0&&n.clicked||D)&&i.siblings().each(R(function(e,t){n.close(t,!0)},n))))},_mousedown:function(t){var n=this,i=e(t.currentTarget);(n.options.openOnClick.subMenuItems&&!n._isRootItem(i)||D)&&i.siblings().each(R(function(e,t){n.close(t,!0)},n))},_mouseleave:function(n){var i=this,o=e(n.currentTarget),a=o.data(ke),s=o.children(Ee).length||o.children(Fe).length||a,l=e(window);return a&&delete i._openedPopups[""+a],o.parentsUntil(Ee,".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):i.options.openOnClick!==!1&&(i.options.openOnClick.rootMenuItems||!i._isRootItem(o))&&(i.options.openOnClick.subMenuItems||i._isRootItem(o))||D||w(n)||r(n.currentTarget,n.relatedTarget||n.target)||!s||r(n.currentTarget,T._activeElement())?((T.support.browser.msie&&!n.toElement&&!n.relatedTarget&&!w(n)||n.clientX<0||n.clientY<0||n.clientY>l.height()||n.clientX>l.width())&&i.close(o),t):(i.close(o,!0),i._loading=!1,t)},_mouseenterPopup:function(t){var n,i=this,r=e(t.currentTarget);r.parent().is(Ee)||(r=r.children("ul"),n=r.data(be),n&&(i._openedPopups[""+n]=!0))},_mouseleavePopup:function(t){var n=this,i=e(t.currentTarget);!w(t)&&i.is(Ee)&&n._closePopups(i.children("ul"))},_closePopups:function(t){var n,i=this,r=i._overflowWrapper(),o=t.data(be);o&&(delete i._openedPopups[""+o],n=r.find(h(o)),setTimeout(function(){if(i.options.openOnClick)i._closeChildPopups(t);else if(e.isEmptyObject(i._openedPopups)){var r=i._innerPopup(t);i._closeParentPopups(r)}else i.close(n,!0)},0))},_closeChildPopups:function(t){var n=this,i=n._overflowWrapper();e(g(t,i)).each(function(){var e=i.find(h(this.data(be)));n.close(e,!0)})},_innerPopup:function(e){var t=this._overflowWrapper(),n=g(e,t);return n[n.length-1]||e},_closeParentPopups:function(e){var t=this,n=t._overflowWrapper(),i=e.data(be),r=n.find(h(i));for(i=r.parent().data(be),t.close(r,!0);i&&!t._openedPopups[i]&&!r.parent().is(De);)r=n.find(h(i)),t.close(r,!0),i=r.parent().data(be)},_click:function(n){var i,r,o,a,s,l,d=this,c=d.options,u=e(T.eventTarget(n)),p=u[0],f=u[0]?u[0].nodeName.toUpperCase():"",h="INPUT"==f||"SELECT"==f||"BUTTON"==f||"LABEL"==f,g=u.closest($),v=u.closest(ze),_=v[0],b=g.attr("href"),k=u.attr("href"),y=e("<a href='#' />").attr("href"),x=!!b&&b!==y,C=x&&!!b.match(/^#/),S=!!k&&k!==y,I=d._overflowWrapper();if(!p||p.parentNode){for(e(u).hasClass("k-menu-expand-arrow")&&(this._lastClickedElement=p.parentElement);p&&p.parentNode!=_;)p=p.parentNode;if(!e(p).is(Le)){if(v.hasClass(Se))return n.preventDefault(),t;if(n.handled||!d._triggerSelect(u,_)||h||n.preventDefault(),n.handled=!0,r=v.children(Ae),I&&(s=v.data(ke),s&&(r=I.find(m(s)))),o=r.is(":visible"),a=c.openOnClick&&o&&d._isRootItem(v),c.closeOnClick&&(!x||C)&&(!r.length||a))return v.removeClass(Ce).css("height"),d._oldHoverItem=d._findRootParent(v),l=d._parentsUntil(g,d.element,ze),d._forceClose=!!I,d.close(l),d.clicked=!1,"MSPointerUp".indexOf(n.type)!=-1&&n.preventDefault(),t;x&&n.enterKey&&g[0].click(),(d._isRootItem(v)&&c.openOnClick!==!1||c.openOnClick.subMenuItems||T.support.touch||w(n)&&d._isRootItem(v.closest(ze)))&&(x||h||S||n.preventDefault(),d.clicked=!0,i=r.is(":visible")?Q:j,(c.closeOnClick||i!=Q)&&d[i](v))}}},_parentsUntil:function(n,i,r){var o,a,s=this._overflowWrapper();return s?(o=b(n,s),a=[],e(o).each(function(){var n=e(this);return!n.is(i)&&(n.is(r)&&a.push(this),t)}),e(a)):n.parentsUntil(i,r)},_triggerSelect:function(e,t){var n,i,r,o;return e=e.is(".k-link")?e:e.closest(".k-link"),n=e.data("selectHandler"),n&&(i=this._getEventData(e),n.call(this,i)),r=i&&i.isDefaultPrevented(),o=this._triggerEvent({item:t,type:ee}),r||o},_getEventData:function(e){var t={sender:this,target:e,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}};return t},_documentClick:function(n){var i=this,o=e(n.target).hasClass("k-menu-expand-arrow")?i._lastClickedElement:n.target;return r((i._overflowWrapper()||i.element)[0],o)?(i._lastClickedElement=t,t):(i.clicked=!1,t)},_focus:function(n){var i=this,r=n.target,o=i._hoverItem(),a=I();return r==i.wrapper[0]||e(r).is(":kendoFocusable")?(a===n.currentTarget&&(o.length?i._moveHover([],o):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(r).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(Te),i.wrapper.focus(),t)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=o._oldHoverItem,l=T.support.isRtl(o.wrapper);if(e.target==e.currentTarget||a==B.ESC){if(s||(s=o._oldHoverItem=o._hoverItem()),i=o._itemBelongsToVertival(s),r=o._itemHasChildren(s),o._keyTriggered=!0,a==B.RIGHT)n=o[l?"_itemLeft":"_itemRight"](s,i,r);else if(a==B.LEFT)n=o[l?"_itemRight":"_itemLeft"](s,i,r);else if(a==B.DOWN)n=o._itemDown(s,i,r);else if(a==B.UP)n=o._itemUp(s,i,r);else if(a==B.HOME)o._moveHover(s,s.parent().children().first()),e.preventDefault();else if(a==B.END)o._moveHover(s,s.parent().children().last()),e.preventDefault();else if(a==B.ESC)n=o._itemEsc(s,i);else if(a==B.ENTER||a==B.SPACEBAR)n=s.children(".k-link"),n.length>0&&(o._click({target:n[0],preventDefault:function(){},enterKey:!0}),r&&!s.hasClass(Se)?(o.open(s),o._moveHover(s,o._childPopupElement(s).children().first())):o._moveHover(s,o._findRootParent(s)));else if(a==B.TAB)return n=o._findRootParent(s),o._moveHover(s,n),o._checkActiveElement(),t;n&&n[0]&&(e.preventDefault(),e.stopPropagation())}},_hoverItem:function(){return this.wrapper.find(".k-item.k-state-hover,.k-item.k-state-focused").filter(":visible")},_itemBelongsToVertival:function(e){var t=this.wrapper.hasClass("k-menu-vertical");return e.length?e.parent().hasClass("k-menu-group")||t:t},_itemHasChildren:function(e){return!!(e&&e.length&&e[0].nodeType)&&(e.children(".k-menu-group, div.k-animation-container").length>0||!!e.data(ke)&&!!this._overflowWrapper().children(m(e.data(ke))))},_moveHover:function(t,n){var i=this,r=i._ariaId;t.length&&n.length&&t.removeClass(Te),n.length&&(n[0].id&&(r=n[0].id),n.addClass(Te),i._oldHoverItem=n,r&&(i.element.removeAttr("aria-activedescendant"),e("#"+r).removeAttr("id"),n.attr("id",r),i.element.attr("aria-activedescendant",r)),i._scrollToItem(n))},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,De,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(q)},_itemRight:function(e,t,n){var i,r,o,a,s=this;return t?n&&!e.hasClass(Se)?(s.open(e),i=s._childPopupElement(e).children().first()):"horizontal"==s.options.orientation&&(r=s._findRootParent(e),o=s._overflowWrapper(),o&&(a=_(r,o),s._closeChildPopups(a)),s.close(r),i=r.nextAll(Me)):(i=e.nextAll(Me),i.length||(i=e.prevAll(Be)),s.close(e)),i&&!i.length?i=s.wrapper.children(".k-item").first():i||(i=[]),s._moveHover(e,i),i},_itemLeft:function(e,t){var n,i,r=this;return t?(n=e.parent().closest(".k-item"),i=r._overflowWrapper(),!n.length&&i&&(n=v(e.parent(),i)),r.close(n),r._isRootItem(n)&&"horizontal"==r.options.orientation&&(n=n.prevAll(Me))):(n=e.prevAll(Me),n.length||(n=e.nextAll(Be)),r.close(e)),n.length||(n=r.wrapper.children(".k-item").last()),r._moveHover(e,n),n},_itemDown:function(e,t,n){var i,r=this;if(t)i=e.nextAll(Me);else{if(!n||e.hasClass(Se))return;r.open(e),i=r._childPopupElement(e).children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=r.wrapper.children(".k-item").first()),r._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prevAll(Me),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_scrollToItem:function(e){var t,n,i,r,o,a,s,l,d,c,u,p,f=this;f.options.scrollable&&e&&e.length&&(t=e.parent(),n=!!t.hasClass(q)&&"horizontal"==f.options.orientation,i=n?"scrollLeft":"scrollTop",r=n?T._outerWidth:T._outerHeight,o=t[i](),a=r(e),s=e[0][n?"offsetLeft":"offsetTop"],l=r(t),d=t.siblings(Ve),c=d.length?r(d.first()):0,o+l<s+a+c?u=s+a-l+c:o>s-c&&(u=s-c),isNaN(u)||(p={},p[i]=u,t.finish().animate(p,"fast","linear",function(){f._toggleScrollButtons(t,d.first(),d.last(),n)})))},_itemEsc:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._moveHover(e,n),n):e},_childPopupElement:function(e){var t=e.find(".k-menu-group"),n=this._overflowWrapper();return!t.length&&n&&(t=_(e,n)),t},_triggerEvent:function(e){var t=this;return t.trigger(e.type,{type:e.type,item:e.item})},_focusHandler:function(t){var n=this,i=e(T.eventTarget(t)).closest(ze);i.hasClass(Se)||setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(Te)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})},_dataSource:function(e){var t=this,n=e?e.dataSource:t.options.dataSource;n&&(n=F(n)?{data:n}:n,t._unbindDataSource(),n.fields||(n.fields=[{field:"uid"},{field:"text"},{field:"url"},{field:"cssClass"},{field:"spriteCssClass"},{field:"imageUrl"},{field:"imageAttr"},{field:"attr"},{field:"contentAttr"},{field:"content"},{field:"encoded"},{field:"items"},{field:"select"}]),t.dataSource=E.create(n),t._bindDataSource(),t.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=R(this.refresh,this),this._errorHandler=R(this._error,this),this.dataSource.bind(le,this._refreshHandler),this.dataSource.bind(de,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(le,this._refreshHandler),e.unbind(de,this._errorHandler))},_error:function(){},findByUid:function(e){var t=this._overflowWrapper()||this.element;return t.find("["+T.attr("uid")+"="+e+"]")},refresh:function(t){var n=this,i=t.node,r=t.action,o=i?n.findByUid(i.uid):n.element,a=t.items,s=t.index,l=e.proxy(n._updateItem,n),d=e.proxy(n._removeItem,n);"add"==r?n._appendItems(a,s,o):"remove"==r?a.forEach(d):"itemchange"==r?a.forEach(l):"itemloaded"===r?n.append(t.items,o):this._initData(),this.trigger(je,{item:o,dataItem:i})},_appendItems:function(e,t,n){var i=this,r=n.find(Pe).eq(t);r.length?i.insertBefore(e,r):i.append(e,n)},_removeItem:function(e){var t=this,n=t.findByUid(e.uid);t.remove(n)},_updateItem:function(e){var t=this,n=t.findByUid(e.uid),i=n.next(),r=e.parentNode();t.remove(n),i.length?t.insertBefore(e,i):t.append(e,r&&t.findByUid(r.uid))},_accessors:function(){var e,t,n,i=this,r=i.options,o=i.element;for(e in qe)t=r[qe[e]],n=o.attr(T.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),F(t)||(t=[t]),r[qe[e]]=t},_fieldAccessor:function(t){var n=this.options[qe[t]]||[],i=n.length,r="(function(item) {";return 0===i?r+="return item['"+t+"'];":(r+="var levels = ["+e.map(n,function(e){return"function(d){ return "+T.expr(e)+"}"}).join(",")+"];",r+="if(item.level){return levels[Math.min(item.level(), "+i+"-1)](item);}else",r+="{return levels["+i+"-1](item)}"),r+="})"},_templates:function(){var e=this,t=e.options,n=R(e._fieldAccessor,e);t.template&&typeof t.template==We?t.template=M(t.template):t.template||(t.template=M("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e.templates={content:M("#var contentHtml = "+n("content")+"(item);#<div #= contentCssAttributes(item.toJSON ? item.toJSON() : item) # tabindex='-1'>#= contentHtml || '' #</div>"),group:M("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),itemWrapper:M("# var url = "+n("url")+"(item); ## var imageUrl = "+n("imageUrl")+"(item); ## var imgAttributes = "+n("imageAttr")+"(item);## var tag = url ? 'a' : 'span' #<#= tag # class='#= textClass(item) #' #if(url){#href='#= url #'#}#># if (imageUrl) { #<img #= imageCssAttributes(imgAttributes) # alt='' src='#= imageUrl #' /># } ##= sprite(item) ##= data.menu.options.template(data) ##= arrow(data) #</#= tag #>"),item:M("#var contentHtml = "+n("content")+"(item);#<li class='#= wrapperCssClass(group, item) #' #= itemCssAttributes(item.toJSON ? item.toJSON() : item) # role='menuitem' #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#"+T.attr("uid")+"='#= item.uid #' >#= itemWrapper(data) ##if (item.hasChildren || item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl || contentHtml) { ##= renderContent(data) ## } #</li>"),scrollButton:M("<span class='k-button k-button-icon k-menu-scroll-button k-scroll-#= direction #' unselectable='on'><span class='k-icon k-i-arrow-60-#= direction #'></span></span>"),arrow:M("<span class='#= arrowClass(item, group) #'></span>"),sprite:M("# var spriteCssClass = "+n("spriteCssClass")+"(data); if(spriteCssClass) {#<span class='k-sprite #= spriteCssClass #'></span>#}#"),empty:M("")}},renderItem:function(e){var t,n,i=this;return e=H({menu:i,group:{}},e),t=i.templates.empty,n=e.item,i.templates.item(H(e,{sprite:i.templates.sprite,itemWrapper:i.templates.itemWrapper,renderContent:i.renderContent,arrow:n.items||n.content||n[i.options.dataContentField[0]]?i.templates.arrow:t,subGroup:i.renderGroup},Ge))},renderGroup:function(e){var t=this,n=t.templates||e.menu.templates;return n.group(H({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=H({length:r},e.group);n<r;n++)t+=e.menu.renderItem(H(e,{group:o,item:H({index:n},i[n])}));return t}},e,Ge))},renderContent:function(e){return e.menu.templates.content(H(e,Ge))}}),Ke=$e.extend({init:function(t,n){var i=this;$e.fn.init.call(i,t,n),i._marker=T.guid().substring(0,8),i.target=e(i.options.target),i._popup(),i._wire()},_initOverflow:function(t){var n=this;t.scrollable&&!n._overflowWrapper()&&(n._openedPopups={},n._popupsWrapper=(n.element.parent().is(Ee)?n.element.parent():n.element).wrap("<div class='k-popups-wrapper "+t.orientation+"'></div>").parent(),"horizontal"==n.options.orientation&&C(n.element),t.appendTo&&(t.appendTo=e(t.appendTo),t.appendTo.append(n._popupsWrapper)),n._initialHeight=n.element[0].style.height,n._initialWidth=n.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,copyAnchorStyles:!0,target:"body"},events:[j,Q,ne,ie,ee],setOptions:function(t){var n=this;$e.fn.setOptions.call(n,t),n.target.off(n.showOn+U+n._marker,n._showProxy),n.userEvents&&n.userEvents.destroy(),n.target=e(n.options.target),t.orientation&&n.popup.wrapper[0]&&n.popup.element.unwrap(),n._wire(),$e.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+U+e._marker),ye.off(T.support.mousedown+U+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),$e.fn.destroy.call(e)},open:function(n,i){var o,a,s=this;return n=e(n)[0],r(s.element[0],e(n)[0])||s._itemHasChildren(e(n))?$e.fn.open.call(s,n):s._triggerEvent({item:s.element,type:j})===!1&&(s.popup.visible()&&s.options.filter&&(s.popup.close(!0),s.popup.element.kendoStop(!0)),i!==t?(o=s._overflowWrapper(),o&&(a=o.offset(),n-=a.left,i-=a.top),s.popup.wrapper.hide(),s._configurePopupScrolling(n,i),s.popup.open(n,i)):(s.popup.options.anchor=(n?n:s.popup.anchor)||s.target,s.popup.element.kendoStop(!0),s._configurePopupScrolling(),s.popup.open()),ye.off(s.popup.downEvent,s.popup._mousedownProxy),ye.on(T.support.mousedown+U+s._marker,s._closeProxy)),s},_configurePopupScrolling:function(e,n){var i=this,r=i.popup,o="horizontal"==i.options.orientation;i.options.scrollable&&(i._wrapPopupElement(r),r.element.parent().css({position:"",height:""}),r.element.css({visibility:"hidden",display:"",position:""}),o?i._setPopupWidth(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}):i._setPopupHeight(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}),r.element.css({visibility:"",display:"none",position:"absolute"}),i._initPopupScrollButtons(r,o,!0),r.element.siblings(Ve).hide())},_setPopupWidth:function(t,n){var i,r,o,a,s,l,d,c,u=t.element,p=u.add(u.parent(Ee));p.width(this._initialWidth||""),i=t._location(n),r=e(window).width(),o=i.width,a=Math.max(i.left,0),s=n?0:y(this._overflowWrapper()[0],"scrollLeft"),l=T.getShadows(u),d=r-l.left-l.right,c=d+s>o+a,c||p.css({overflow:"hidden",width:d-a+s+"px"})},close:function(){var t=this;r(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?$e.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:Q})===!1&&(t.popup.close(),ye.off(T.support.mousedown+U+t._marker,t._closeProxy),t.unbind(ee,t._closeTimeoutProxy))},_showHandler:function(t){var n,i=t,o=this,a=o.options,s=e(T.support.mobileOS?i.target:i.currentTarget);t.event&&(i=t.event,i.pageX=t.x.location,i.pageY=t.y.location),r(o.element[0],t.relatedTarget||t.target)||(o._eventOrigin=i,i.preventDefault(),i.stopImmediatePropagation(),o.element.find("."+Te).removeClass(Te),(a.filter&&s.is(a.filter)||!a.filter)&&(a.alignToAnchor?(o.popup.options.anchor=i.currentTarget,o.open(i.currentTarget)):(o.popup.options.anchor=i.currentTarget,o._targetChild?(n=o.target.offset(),o.open(i.pageX-n.left,i.pageY-n.top)):o.open(i.pageX,i.pageY))))},_closeHandler:function(t){var n,i=this,o=e(t.relatedTarget||t.target),a=o.closest(i.target.selector)[0]==i.target[0],s=o.closest(Pe),l=i._itemHasChildren(s),d=i._overflowWrapper(),c=r(i.element[0],o[0])||d&&r(d[0],o[0]);i._eventOrigin=t,n=3!==t.which,i.popup.visible()&&(n&&a||!a)&&(i.options.closeOnClick&&!l&&c||!c)&&(c?(this.unbind(ee,this._closeTimeoutProxy),i.bind(ee,i._closeTimeoutProxy)):i.close())},_wire:function(){var e=this,t=e.options,n=e.target;e._preventProxy=null,e._showProxy=R(e._showHandler,e),e._closeProxy=R(e._closeHandler,e),e._closeTimeoutProxy=R(e.close,e),n[0]&&(T.support.mobileOS&&"contextmenu"==t.showOn&&(e.userEvents=new T.UserEvents(n,{filter:t.filter,allowSelection:!1}),e._preventProxy=function(){return!1},e.userEvents.bind("hold",e._showProxy)),t.filter?n.on(t.showOn+U+e._marker,t.filter,e._preventProxy||e._showProxy):n.on(t.showOn+U+e._marker,e._preventProxy||e._showProxy))},_triggerEvent:function(n){var i=this,r=e(i.popup.options.anchor)[0],o=i._eventOrigin;return i._eventOrigin=t,i.trigger(n.type,H({type:n.type,item:n.item||this.element[0],target:r},o?{event:o}:{}))},_popup:function(){var t=this,n=t._overflowWrapper();t._triggerProxy=R(t._triggerEvent,t),t.popup=t.element.addClass("k-context-menu").kendoPopup({autosize:"horizontal"===t.options.orientation,anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:n||t.options.appendTo,close:n?function(t){e(g(t.sender.element,n)).each(function(e,t){var n=t.data(we);n&&n.close(!0)})}:e.noop}).data(we),t._targetChild=r(t.target[0],t.popup.element[0])}});S.plugin($e),S.plugin(Ke)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multiselect.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t){var n;if(null===e&&null!==t||null!==e&&null===t)return!1;if(n=e.length,n!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0}var i=window.kendo,r=i.ui,o=r.List,a=e.extend({A:65},i.keys),s=i._activeElement,l=i.data.ObservableArray,d=e.proxy,c="id",u="li",p="accept",f="filter",h="rebind",m="open",g="close",v="change",_="progress",b="select",k="deselect",y="aria-disabled",w="aria-readonly",x="k-state-focused",C="k-state-selected",T="k-hidden",S="k-state-hover",I="k-state-disabled",D="k-no-click",F="disabled",E="readonly",A="off",z=".kendoMultiSelect",N="click"+z,P="keydown"+z,H="mouseenter"+z,R="mouseleave"+z,O=H+" "+R,M=/"/g,B=e.isArray,L=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],V=o.extend({init:function(t,n){var r,a,s=this;s.ns=z,o.fn.init.call(s,t,n),s._optionsMap={},s._customOptions={},s._wrapper(),s._tagList(),s._input(),s._textContainer(),s._loader(),s._clearButton(),s._tabindex(s.input),t=s.element.attr("multiple","multiple").hide(),n=s.options,n.placeholder||(n.placeholder=t.data("placeholder")),r=t.attr(c),r&&(s._tagID=r+"_tag_active",r+="_taglist",s.tagList.attr(c,r),s.input.attr("aria-describedby",r)),s._initialOpen=!0,s._ariaLabel(),s._ariaSetLive(),s._dataSource(),s._ignoreCase(),s._popup(),s._tagTemplate(),s.requireValueMapper(s.options),s._initList(),s._reset(),s._enable(),s._placeholder(),n.autoBind?s.dataSource.fetch():n.value&&s._preselect(n.value),a=e(s.element).parents("fieldset").is(":disabled"),a&&s.enable(!1),s._ariaSetSize(s.value().length),i.notify(s),s._toggleCloseVisibility()},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found."},enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,autoWidth:!1,popup:null},events:[m,g,v,b,k,"filtering","dataBinding","dataBound"],setDataSource:function(e){this.options.dataSource=e,this._state="",this._dataSource(),this.persistTagList=!1,this.listView.setDataSource(this.dataSource),this.options.autoBind&&this.dataSource.fetch()},setOptions:function(e){var t=this._listOptions(e);o.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(this.tagList.attr(c)),this._tagTemplate(),this._placeholder(),this._clearButton()},currentTag:function(e){var n=this;return e===t?n._currentTag:(n._currentTag&&(n._currentTag.removeClass(x).removeAttr(c),n._currentTag.find(".k-select").attr("aria-hidden",!0),n.input.removeAttr("aria-activedescendant")),e&&(e.addClass(x).attr(c,n._tagID),e.find(".k-select").removeAttr("aria-hidden"),n.input.attr("aria-activedescendant",n._tagID)),n._currentTag=e,t)},dataItems:function(){return this.listView.selectedDataItems()},destroy:function(){var e=this,t=e.ns;clearTimeout(e._busy),clearTimeout(e._typingTimeout),e.wrapper.off(t),e.tagList.off(t),e.input.off(t),e._clear.off(t),o.fn.destroy.call(e)},_activateItem:function(){this.popup.visible()&&o.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var n=this,r=o.fn._listOptions.call(n,e.extend(t,{selectedItemChange:d(n._selectedItemChange,n),selectable:"multiple"})),a=this.options.itemTemplate||this.options.template,s=r.itemTemplate||a||r.template;return s||(s="#:"+i.expr(r.dataTextField,"data")+"#"),r.template=s,r},_setListValue:function(){o.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var n,i=this.dataSource.flatView(),r=this._optionsMap,o=this._value;for(this._state===h&&(this._state=""),n=0;n<e.added.length;n++)if(r[o(e.added[n].dataItem)]===t){this._render(i);break}this._selectValue(e.added,e.removed)},_selectedItemChange:function(e){var t,n,i=e.items;for(n=0;n<i.length;n++)t=i[n],this.tagList.children().eq(t.index).children("span:first").html(this.tagTextTemplate(t.item))},_wrapperMousedown:function(t){var n=this,r="input"!==t.target.nodeName.toLowerCase(),o=e(t.target),a=o.hasClass("k-select")||o.hasClass("k-icon");a&&(a=!o.closest(".k-select").children(".k-i-arrow-60-down").length),!r||a&&i.support.mobileOS||!t.cancelable||t.preventDefault(),a||(n.input[0]!==s()&&r&&n.input.focus(),1===n.options.minLength&&n.open())},_inputFocus:function(){this._placeholder(!1),this.wrapper.addClass(x)},_inputFocusout:function(){var e=this;clearTimeout(e._typingTimeout),e.wrapper.removeClass(x),e._placeholder(!e.listView.selectedDataItems()[0],!0),e.close(),e._state===f&&(e._state=p,e.listView.skipUpdate(!0)),e.listView.bound()&&e.listView.isFiltered()&&(e.persistTagList=!0,e._clearFilter()),e.element.blur()},_removeTag:function(e,n){var i,r,o,a=this,s=a._state,l=e.index(),d=a.listView,c=d.value()[l],u=a.listView.selectedDataItems()[l],h=a._customOptions[c],m=d.element[0].children;return a.trigger(k,{dataItem:u,item:e})?(a._close(),t):(h!==t||s!==p&&s!==f||(h=a._optionsMap[c]),o=function(){a.currentTag(null),n&&a._change(),a._close()},h===t&&d.select().length?(a.persistTagList=!1,d.select(d.select()[l]).done(o)):(i=a.element[0].children[h],i&&(i.selected=!1),d.removeAt(l),r=m[h],r&&m[h].classList.remove("k-state-selected"),"single"!==a.options.tagMode?e.remove():a._updateTagListHTML(),o()),t)},_tagListClick:function(t){t.preventDefault(),t.stopPropagation();var n=e(t.currentTarget);n.children(".k-i-arrow-60-down").length||this._removeTag(n.closest(u),!0)},_clearValue:function(){var t=this;"single"===t.options.tagMode?t._clearSingleTagValue():t.tagList.children().each(function(n,i){t._removeTag(e(i),!1)}),t.input.val(""),t._search(),t._change(),t.focus(),t._hideClear(),t._state===f&&(t._state=p)},_clearSingleTagValue:function(){var e,n=this,i=n.dataItems(),r=n.tagList.children(),o=n.persistTagList;for(e=0;e<i.length;e+=1)if(n.trigger(k,{
|
33
|
-
dataItem:i[e],item:r.first()}))return n._close(),t;o&&(n.persistTagList=!1),n.listView.value([]),n.persistTagList=o},_focusHandler:function(){this.input.focus()},_editable:function(t){var n=this,i=t.disable,r=t.readonly,o=n.wrapper.off(z),a=n.tagList.off(z),s=n.element.add(n.input.off(z));r||i?(o.toggleClass(I,i).toggleClass(D,r),s.attr(F,i).attr(E,r).attr(y,i).attr(w,r)):(o.removeClass(I).removeClass(D).on(O,n._toggleHover).on("mousedown"+z+" touchend"+z,d(n._wrapperMousedown,n)).on(N,d(n._focusHandler,n)),n.input.on(P,d(n._keydown,n)).on("paste"+z,d(n._search,n)).on("input"+z,d(n._search,n)).on("focus"+z,d(n._inputFocus,n)).on("focusout"+z,d(n._inputFocusout,n)),n._clear.on(N+" touchend"+z,d(n._clearValue,n)),s.removeAttr(F).removeAttr(E).attr(y,!1).attr(w,!1),a.on(H,u,function(){e(this).addClass(S)}).on(R,u,function(){e(this).removeClass(S)}).on(N+" touchend"+z,"li.k-button .k-select",d(n._tagListClick,n)))},_close:function(){var e=this;e.options.autoClose?e.close():e.popup.position()},_filterSource:function(e,t){t||(t=this._retrieveData),this._retrieveData=!1,o.fn._filterSource.call(this,e,t)},close:function(){this._activeItem=null,this.input.removeAttr("aria-activedescendant"),this.popup.close()},open:function(){var t=this;t._request&&(t._retrieveData=!1),t._retrieveData||!t.listView.bound()||t._state===p?(t._open=!0,t._state=h,t.listView.skipUpdate(!0),t.persistTagList=!(t._initialOpen&&!t.listView.bound()),t._filterSource(),t._focusItem()):t._allowOpening()&&(!t._initialOpen||t.options.autoBind||t.options.virtual||!t.options.value||e.isPlainObject(t.options.value[0])||t.value(t.value()||t._initialValues),t.popup._hovered=!0,t._initialOpen=!1,t.popup.open(),t._focusItem())},toggle:function(e){e=e!==t?e:!this.popup.visible(),this[e?m:g]()},refresh:function(){this.listView.refresh()},_listBound:function(){var e=this,t=e.dataSource.flatView();e._render(t),e._renderFooter(),e._renderNoData(),e._toggleNoData(!t.length),e._resizePopup(),e._updateItemFocus(),e._open&&(e._open=!1,e.toggle(e._allowOpening())),e.popup.position(),e._touchScroller&&e._touchScroller.reset(),e._hideBusy(),e._makeUnselectable(),e.trigger("dataBound")},_updateItemFocus:function(){var e=this,n=e.dataSource.flatView(),i=e.listView.skip(),r=i===t||0===i;n.length&&r&&(e.options.highlightFirst?e.listView.focusFirst():e.listView.focus(-1))},_inputValue:function(){var e=this,t=e.input.val();return e.options.placeholder===t&&(t=""),t},value:function(e){var n=this,i=n.listView,r=i.value().slice(),o=n.options.maxSelectedItems,a=i.bound()&&i.isFiltered();return e===t?r:(n.persistTagList=!1,n.requireValueMapper(n.options,e),e=n._normalizeValues(e),null!==o&&e.length>o&&(e=e.slice(0,o)),a&&n._clearFilter(),i.value(e),n._old=n._valueBeforeCascade=e.slice(),a||n._fetchData(),n._ariaSetSize(n.value().length),n._toggleCloseVisibility(),t)},_preselect:function(t,n){var r=this;B(t)||t instanceof i.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof i.data.ObservableObject||!r.options.dataValueField)&&(r.dataSource.data(t),r.value(n||r._initialValues),r._retrieveData=!0)},_setOption:function(e,t){var n=this.element[0].children[this._optionsMap[e]];n&&(n.selected=t)},_fetchData:function(){var e=this,t=!!e.dataSource.view().length,n=0===e.listView.value().length;n||e._request||(e._retrieveData||!e._fetch&&!t)&&(e._fetch=!0,e._retrieveData=!1,e.dataSource.read().done(function(){e._fetch=!1}))},_isBound:function(){return this.listView.bound()&&!this._retrieveData},_dataSource:function(){var e=this,t=e.element,n=e.options,r=n.dataSource||{};r=B(r)?{data:r}:r,r.select=t,r.fields=[{field:n.dataTextField},{field:n.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=d(e._showBusy,e),e._errorHandler=d(e._hideBusy,e)),e.dataSource=i.data.DataSource.create(r).bind(_,e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initialValues),t._placeholder()})},t._form=r.on("reset",t._resetHandler))},_initValue:function(){var e=this.options.value||this.element.val();this._old=this._initialValues=this._normalizeValues(e)},_normalizeValues:function(t){var n=this;return null===t?t=[]:t&&e.isPlainObject(t)?t=[n._value(t)]:t&&e.isPlainObject(t[0])?t=e.map(t,function(e){return n._value(e)}):B(t)||t instanceof l?B(t)&&(t=t.slice()):t=[t],t},_change:function(){var e=this,t=e.value();n(t,e._old)||(e._old=t.slice(),e.trigger(v),e.element.trigger(v)),e.popup.position(),e._ariaSetSize(t.length),e._toggleCloseVisibility()},_click:function(e){var t=this,n=e.item;e.preventDefault(),t._select(n).done(function(){t._activeItem=n,t._change(),t._close()})},_getActiveItem:function(){return this._activeItem||e(this.listView.items()[this._getSelectedIndices().length-1])||this.listView.focus()},_getSelectedIndices:function(){return this.listView._selectedIndices||this.listView._selectedIndexes},_keydown:function(n){var r,o,s,l,d=this,c=n.keyCode,u=d._currentTag,f=d.listView,h=d.input.val(),m=i.support.isRtl(d.wrapper),g=d.popup.visible(),v=0;if(c!==a.ENTER&&(this._multipleSelection=!1),c===a.DOWN){if(n.preventDefault(),!g)return d.open(),f.focus()||f.focusFirst(),t;f.focus()?(!d._activeItem&&n.shiftKey&&(d._activeItem=f.focus(),v=-1),r=f.getElementIndex(d._getActiveItem().first()),f.focusNext(),f.focus()?n.shiftKey&&(this._multipleSelection=!0,d._selectRange(r,f.getElementIndex(f.focus().first())+v)):f.focusLast()):f.focusFirst()}else if(c===a.UP)g&&(!d._activeItem&&n.shiftKey&&(d._activeItem=f.focus(),v=1),r=f.getElementIndex(d._getActiveItem().first()),f.focusPrev(),f.focus()?n.shiftKey&&(this._multipleSelection=!0,d._selectRange(r,f.getElementIndex(f.focus().first())+v)):d.close()),n.preventDefault();else if(c===a.LEFT&&!m||c===a.RIGHT&&m)h||(u=u?u.prev():e(d.tagList[0].lastChild),u[0]&&d.currentTag(u));else if(c===a.RIGHT&&!m||c===a.LEFT&&m)!h&&u&&(u=u.next(),d.currentTag(u[0]?u:null));else if(n.ctrlKey&&!n.altKey&&c===a.A&&g&&!d.options.virtual)this._multipleSelection=!0,this._getSelectedIndices().length===f.items().length&&(d._activeItem=null),f.items().length&&d._selectRange(0,f.items().length-1);else if(c===a.ENTER&&g){if(!f.focus())return;if(n.preventDefault(),this._multipleSelection&&(this._multipleSelection=!1,f.focus().hasClass(C)))return d._close(),t;d._select(f.focus()).done(function(){d._change(),d._close()})}else if(c===a.SPACEBAR&&n.ctrlKey&&g)d._activeItem&&f.focus()&&f.focus()[0]===d._activeItem[0]&&(d._activeItem=null),e(f.focus()).hasClass(C)||(d._activeItem=f.focus()),d._select(f.focus()).done(function(){d._change()}),n.preventDefault();else if(c===a.SPACEBAR&&n.shiftKey&&g)o=f.getElementIndex(d._getActiveItem()),s=f.getElementIndex(f.focus()),o!==t&&s!==t&&d._selectRange(o,s),n.preventDefault();else if(c===a.ESC)g?n.preventDefault():(d.tagList.children().each(function(t,n){d._removeTag(e(n),!1)}),d._change()),d.close();else if(c===a.HOME)g?f.focus()?(n.ctrlKey&&n.shiftKey&&!d.options.virtual&&d._selectRange(f.getElementIndex(f.focus()[0]),0),f.focusFirst()):d.close():h||(u=d.tagList[0].firstChild,u&&d.currentTag(e(u)));else if(c===a.END)g?f.focus()?(n.ctrlKey&&n.shiftKey&&!d.options.virtual&&d._selectRange(f.getElementIndex(f.focus()[0]),f.element.children().length-1),f.focusLast()):d.close():h||(u=d.tagList[0].lastChild,u&&d.currentTag(e(u)));else if(c!==a.DELETE&&c!==a.BACKSPACE||h)!d.popup.visible()||c!==a.PAGEDOWN&&c!==a.PAGEUP?(clearTimeout(d._typingTimeout),setTimeout(function(){d._scale()}),d._search()):(n.preventDefault(),l=c===a.PAGEDOWN?1:-1,f.scrollWith(l*f.screenHeight()));else{if(d._state=p,"single"===d.options.tagMode)return d._clearSingleTagValue(),d._change(),d._close(),t;c!==a.BACKSPACE||u||(u=e(d.tagList[0].lastChild)),u&&u[0]&&d._removeTag(u,!0)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr("aria-busy",!1),e._loading.addClass(T),e._request=!1,e._busy=null,e._toggleCloseVisibility()},_showBusyHandler:function(){this.input.attr("aria-busy",!0),this._loading.removeClass(T),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(d(e._showBusyHandler,e),100))},_placeholder:function(e,n){var r=this,o=r.input,a=s(),l=r.options.placeholder,d=o.val(),c=o[0]===a,u=d.length;c&&!r.options.autoClose&&d!==l||(u=0,d=""),e===t&&(e=!1,o[0]!==a&&(e=!r.listView.selectedDataItems()[0])),r._prev=d,o.toggleClass("k-readonly",e).val(e?l:d),c&&!n&&i.caret(o[0],u,u),r._scale()},_scale:function(){var e,t=this,n=t.wrapper.find(".k-multiselect-wrap"),i=n.width(),r=t._span.text(t.input.val());n.is(":visible")?e=r.width()+25:(r.appendTo(document.documentElement),i=e=r.width()+25,r.appendTo(n)),t.input.width(e>i?i:e)},_option:function(e,n,r){var o="<option";return e!==t&&(e+="",e.indexOf('"')!==-1&&(e=e.replace(M,""")),o+=' value="'+e+'"'),r&&(o+=" selected"),o+=">",n!==t&&(o+=i.htmlEncode(n)),o+="</option>"},_render:function(e){var t,n,i,r,o,a,s=this.listView.selectedDataItems(),l=this.listView.value(),d=e.length,c="";for(l.length!==s.length&&(s=this._buildSelectedItems(l)),o={},a={},r=0;r<d;r++)n=e[r],i=this._value(n),t=this._selectedItemIndex(i,s),t!==-1&&s.splice(t,1),a[i]=r,c+=this._option(i,this._text(n),t!==-1);if(s.length)for(r=0;r<s.length;r++)n=s[r],i=this._value(n),o[i]=d,a[i]=d,d+=1,c+=this._option(i,this._text(n),!0);this._customOptions=o,this._optionsMap=a,this.element.html(c)},_buildSelectedItems:function(e){var t,n,i=this.options.dataValueField,r=this.options.dataTextField,o=[];for(n=0;n<e.length;n++)t={},t[i]=e[n],t[r]=e[n],o.push(t);return o},_selectedItemIndex:function(e,t){for(var n=this._value,i=0;i<t.length;i++)if(e===n(t[i]))return i;return-1},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout(function(){var t=e._inputValue();e._prev!==t&&(e._prev=t,e.search(t),e._toggleCloseVisibility())},e.options.delay)},_toggleCloseVisibility:function(){this.value().length||this.input.val()&&this.input.val()!==this.options.placeholder?this._showClear():this._hideClear()},_allowOpening:function(){return this._allowSelection()&&o.fn._allowOpening.call(this)},_allowSelection:function(){var e=this.options.maxSelectedItems;return null===e||e>this.listView.value().length},_angularTagItems:function(t){var n=this;n.angular(t,function(){return{elements:n.tagList[0].children,data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})},updatePersistTagList:function(e,t){this.persistTagList.added&&this.persistTagList.added.length===t.length&&this.persistTagList.removed&&this.persistTagList.removed.length===e.length?this.persistTagList=!1:(this.listView._removedAddedIndexes=this._old.slice(),this.persistTagList={added:e,removed:t})},_selectValue:function(e,n){var i,r,o,a=this,s=a.dataSource.total(),l=a.tagList,d=a._value;if(this.persistTagList)return this.updatePersistTagList(e,n),t;if(a._angularTagItems("cleanup"),"multiple"===a.options.tagMode){for(o=n.length-1;o>-1;o--)i=n[o],l.children().length&&(l[0].removeChild(l[0].children[i.position]),a._setOption(d(i.dataItem),!1));for(o=0;o<e.length;o++)r=e[o],l.append(a.tagTemplate(r.dataItem)),a._setOption(d(r.dataItem),!0);a._updateTagListAria()}else{for((!a._maxTotal||a._maxTotal<s)&&(a._maxTotal=s),this._updateTagListHTML(),o=n.length-1;o>-1;o--)a._setOption(d(n[o].dataItem),!1);for(o=0;o<e.length;o++)a._setOption(d(e[o].dataItem),!0)}a._angularTagItems("compile"),a._placeholder()},_updateTagListHTML:function(){var e=this,t=e.value(),n=e.dataSource.total(),i=e.tagList;i.html(""),t.length&&i.append(e.tagTemplate({values:t,dataItems:e.dataItems(),maxTotal:e._maxTotal,currentTotal:n})),e._updateTagListAria()},_updateTagListAria:function(){var e=this,t=e.tagList;t.attr("role",t.children().length?"listbox":"presentation")},_select:function(t){var n,i,r,o,a=e.Deferred().resolve();return t?(n=this,i=n.listView,r=i.dataItemByIndex(i.getElementIndex(t)),o=t.hasClass("k-state-selected"),n._state===h&&(n._state=""),n._allowSelection()||o?n.trigger(o?k:b,{dataItem:r,item:t})?(n._close(),a):(n.persistTagList=!1,i.select(t).done(function(){n._placeholder(),n._state===f&&(n._state=p,i.skipUpdate(!0))})):a):a},_selectRange:function(n,i){var r,o,a=this,s=this.listView,l=this.options.maxSelectedItems,d=this._getSelectedIndices().slice(),c=[],u=function(t){s.select(t).done(function(){t.forEach(function(t){var n=s.dataItemByIndex(t),i=s.element.children()[t],r=e(i).hasClass("k-state-selected");a.trigger(r?b:k,{dataItem:n,item:e(i)})}),a._change()})};if(d.length-1===i-n)return u(d);if(n<i)for(r=n;r<=i;r++)c.push(r);else for(r=n;r>=i;r--)c.push(r);for(null!==l&&c.length>l&&(c=c.slice(0,l)),r=0;r<c.length;r++)o=c[r],this._getSelectedIndices().indexOf(o)==-1?d.push(o):d.splice(d.indexOf(o),1);return d.length?(a.persistTagList=!1,u(d)):t},_input:function(){var t=this,n=t.element,i=n[0].accessKey,r=t._inputWrapper.children("input.k-input");r[0]||(r=e('<input class="k-input" style="width: 25px" />').appendTo(t._inputWrapper)),n.removeAttr("accesskey"),t._focused=t.input=r.attr({accesskey:i,autocomplete:A,role:"textbox",title:n[0].title,"aria-expanded":!1,"aria-haspopup":"true","aria-autocomplete":"list"})},_tagList:function(){var t=this,n=t._inputWrapper.children("ul");n[0]||(n=e('<ul unselectable="on" class="k-reset"/>').appendTo(t._inputWrapper)),t.tagList=n},_tagTemplate:function(){var e,t=this,n=t.options,r=n.tagTemplate,o=n.dataSource,a="multiple"===n.tagMode,s=n.messages.singleTag;t.element[0].length&&!o&&(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value"),e=a?i.template("#:"+i.expr(n.dataTextField,"data")+"#",{useWithBlock:!1}):i.template("#:values.length# "+s),t.tagTextTemplate=r=r?i.template(r):e,t.tagTemplate=function(e){return'<li role="option" aria-selected="true" class="k-button" unselectable="on"><span unselectable="on">'+r(e)+'</span><span aria-hidden="true" unselectable="on" aria-label="'+(a?'delete" title="'+t.options.messages.deleteTag+'" aria-label="'+t.options.messages.deleteTag:"open")+'" class="k-select"><span class="k-icon '+(a?"k-i-close":"k-i-arrow-60-down")+'"></span></span></li>'}},_loader:function(){this._loading=e('<span class="k-icon k-i-loading '+T+'"></span>').insertAfter(this.input)},_clearButton:function(){o.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-multiselect-clearable"))},_textContainer:function(){var t=i.getComputedStyles(this.input[0],L);t.position="absolute",t.visibility="hidden",t.top=-3333,t.left=-3333,this._span=e("<span/>").css(t).appendTo(this.wrapper)},_wrapper:function(){var t=this,n=t.element,i=n.parent("span.k-multiselect");i[0]||(i=n.wrap('<div class="k-widget k-multiselect" unselectable="on" />').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('<div class="k-multiselect-wrap k-floatwrap" unselectable="on" />').insertBefore(n)),t.wrapper=i.addClass(n[0].className).removeClass("input-validation-error").css("display",""),t._inputWrapper=e(i[0].firstChild)},_ariaSetSize:function(e){var t=this,n=t.tagList.children();e&&n.length&&n.attr("aria-setsize",e)},_ariaSetLive:function(){var e=this;e.ul.attr("aria-live",e._isFilterEnabled()?"polite":"off")}});r.plugin(V)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.panelbar.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(S),t.filter(".k-last:not(:last-child)").removeClass(_),t.filter(":first-child").addClass(S),t.filter(":last-child").addClass(_)}function i(t){var n=t,i=t.children("ul"),r=n.children(".k-link").children(".k-icon");t.hasClass("k-panelbar")||(!r.length&&i.length?r=e("<span class='k-icon' />").appendTo(n):i.length&&i.children().length||(r.remove(),i.remove()))}var r=window.kendo,o=r.ui,a=r.keys,s=e.extend,l=e.proxy,d=e.each,c=e.isArray,u=r.template,p=o.Widget,f=r.data.HierarchicalDataSource,h=/^(ul|a|div)$/i,m=".kendoPanelBar",g="img",v="href",_="k-last",b="k-link",k="."+b,y="error",w=".k-item",x=".k-group",C=x+":visible",T="k-image",S="k-first",I="change",D="expand",F="select",E="click",A="k-content",z="activate",N="collapse",P="dataBound",H="mouseenter",R="mouseleave",O="contentLoad",M="undefined",B="k-state-active",L="> .k-panel",V="> .k-content",U="string",W="k-state-focused",j="k-state-disabled",q="k-state-selected",G="."+q,$="k-state-highlight",K=w+":not(.k-state-disabled)",Y="> "+K+" > "+k+", .k-panel > "+K+" > "+k,Q=w+".k-state-disabled > .k-link",X="> li > "+G+", .k-panel > li > "+G,J="k-state-default",Z="aria-disabled",ee="aria-expanded",te="aria-hidden",ne="aria-selected",ie=":visible",re=":empty",oe="single",ae={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},se={aria:function(e){var t="";return(e.items||e.content||e.contentUrl||e.expanded)&&(t+=ee+"='"+(e.expanded?"true":"false")+"' "),e.enabled===!1&&(t+=Z+"='true'"),t},wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" "+j:t.expanded===!0?" "+B:" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),n},textClass:function(e,t){var n=b;return t.firstLevel&&(n+=" k-header"),e.selected&&(n+=" "+q),n},textAttributes:function(e){return e?" href='"+e+"'":""},arrowClass:function(e){var t="k-icon";return t+=e.expanded?" k-panelbar-collapse k-i-arrow-60-up":" k-panelbar-expand k-i-arrow-60-down"},text:function(e){return e.encoded===!1?e.text:r.htmlEncode(e.text)},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},ariaHidden:function(e){return e.expanded!==!0},groupCssClass:function(){return"k-group k-panel"},contentAttributes:function(e){return e.item.expanded!==!0?" style='display:none'":""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?'href="'+e.contentUrl+'"':""}},le=function(e){return e.children("span").children(".k-icon")},de=r.ui.DataBoundWidget.extend({init:function(e,t){var n,i,o=this;c(t)&&(t={dataSource:t}),i=t&&!!t.dataSource,p.fn.init.call(o,e,t),e=o.wrapper=o.element.addClass("k-widget k-reset k-header k-panelbar"),t=o.options,e[0].id&&(o._itemId=e[0].id+"_pb_active"),o._tabindex(),o._accessors(),o._dataSource(),o._templates(),o._initData(i),o._updateClasses(),o._animations(t),e.on(E+m,Y,l(o._click,o)).on(H+m+" "+R+m,Y,o._toggleHover).on(E+m,Q,!1).on(E+m,".k-request-retry",l(o._retryRequest,o)).on("keydown"+m,l(o._keydown,o)).on("focus"+m,function(){var e=o.select();o._current(e[0]?e:o._first())}).on("blur"+m,function(){o._current(null)}).attr("role","tree"),n=e.find("li."+B+" > ."+A),n[0]&&o.expand(n.parent(),!1),t.dataSource||o._angularCompile(),r.notify(o)},events:[D,N,F,z,I,y,P,O],options:{name:"PanelBar",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:200}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},autoBind:!0,loadOnDemand:!0,expandMode:"multiple",template:"",dataTextField:null},_angularCompile:function(){var e=this;e.angular("compile",function(){return{elements:e.element.children("li"),data:[{dataItem:e.options.$angular}]}})},_angularCompileElements:function(t,n){var i=this;i.angular("compile",function(){return{elements:t,data:e.map(n,function(e){return[{dataItem:e}]})}})},_angularCleanup:function(){var e=this;e.angular("cleanup",function(){return{elements:e.element.children("li")}})},destroy:function(){p.fn.destroy.call(this),this.element.off(m),this._angularCleanup(),r.destroy(this.element)},_initData:function(e){var t=this;e&&(t.element.empty(),t.options.autoBind&&(t._progress(!0),t.dataSource.fetch()))},_templates:function(){var e=this,t=e.options,n=l(e._fieldAccessor,e);t.template&&typeof t.template==U?t.template=u(t.template):t.template||(t.template=u("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e.templates={content:u("<div class='k-content'#= contentAttributes(data) #>#= content(item) #</div>"),group:u("<ul role='group' aria-hidden='#= ariaHidden(group) #' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),itemWrapper:u("# var url = "+n("url")+"(item); ## var imageUrl = "+n("imageUrl")+"(item); ## var spriteCssClass = "+n("spriteCssClass")+"(item); ## var contentUrl = contentUrl(item); ## var tag = url||contentUrl ? 'a' : 'span'; #<#= tag # class='#= textClass(item, group) #' #= contentUrl ##= textAttributes(url) #># if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #' /># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #'></span># } ##= data.panelBar.options.template(data) ##= arrow(data) #</#= tag #>"),item:u("<li role='treeitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'"+r.attr("uid")+"='#= item.uid #'>#= itemWrapper(data) ## if (item.items && item.items.length > 0) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),loading:u("<li class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</li>"),retry:u("<li class='k-item'>#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button></li>"),arrow:u("<span class='#= arrowClass(item) #'></span>"),empty:u("")}},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=s(!0,t,e.animation),"dataSource"in e&&this.setDataSource(e.dataSource),p.fn.setOptions.call(this,e)},expand:function(n,i){var r=this,o={};return n=this.element.find(n),r._animating&&n.find("ul").is(":visible")?(r.one("complete",function(){setTimeout(function(){r.expand(n)})}),t):(r._animating=!0,i=i!==!1,n.each(function(t,a){var s,l;if(a=e(a),s=n.children(".k-group,.k-content"),s.length||(s=r._addGroupElement(n)),l=s.add(a.find(V)),!a.hasClass(j)&&l.length>0){if(r.options.expandMode==oe&&r._collapseAllExpanded(a))return r;n.find("."+$).removeClass($),a.addClass($),i||(o=r.options.animation,r.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),r._triggerEvent(D,a)||r._toggleItem(a,!1,!1),i||(r.options.animation=o)}}),r)},collapse:function(t,n){var i=this,r={};return i._animating=!0,n=n!==!1,t=i.element.find(t),t.each(function(t,o){o=e(o);var a=o.find(L).add(o.find(V));!o.hasClass(j)&&a.is(ie)&&(o.removeClass($),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(N,o)||i._toggleItem(o,!0),n||(i.options.animation=r))}),i},updateArrow:function(t){var n=this;t=e(t),t.children(k).children(".k-panelbar-collapse, .k-panelbar-expand").remove(),t.filter(function(){var t=n.dataItem(this);return t?t.hasChildren||t.content||t.contentUrl:e(this).find(".k-panel").length>0||e(this).find(".k-content").length>0}).children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent();t.append("<span class='k-icon "+(n.hasClass(B)?" k-panelbar-collapse k-i-arrow-60-up":" k-panelbar-expand k-i-arrow-60-down")+"'/>")})},_accessors:function(){var e,t,n,i=this,o=i.options,a=i.element;for(e in ae)t=o[ae[e]],n=a.attr(r.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),c(t)||(t=[t]),o[ae[e]]=t},_progress:function(e,t){var n=this.element,i=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?n.html(i):n.empty()):le(e).toggleClass("k-i-loading",t).removeClass("k-i-refresh")},_refreshRoot:function(t){var n,i,r,a=this,l=a.element,d={firstLevel:!0,expanded:!0,length:l.children().length};for(this.element.empty(),n=e.map(t,function(t,n){return"string"==typeof t?e(t):(t.items=[],e(a.renderItem({group:d,item:s(t,{index:n})})))}),this.element.append(n),i=this.element.children(".k-item"),r=0;r<t.length;r++)this.trigger("itemChange",{item:i.eq(r).find(".k-link").first(),data:t[r],ns:o});this._angularCompileElements(n,t)},_refreshChildren:function(e,t){var n,r,a,s;if(t.children(".k-group").empty(),s=e.children.data(),s.length)for(this.append(e.children,t),this.options.loadOnDemand&&this._toggleGroup(t.children(".k-group"),!1),r=t.children(".k-group").children("li"),n=0;n<r.length;n++)a=r.eq(n),this.trigger("itemChange",{item:a.find(".k-link").first(),data:this.dataItem(a),ns:o});else i(t),r=t.children(".k-group").children("li"),this._angularCompileElements(r,s)},findByUid:function(t){var n,i,o=this.element.find(".k-item"),a=r.attr("uid");for(i=0;i<o.length;i++)if(o[i].getAttribute(a)==t){n=o[i];break}return e(n)},refresh:function(e){var n,i,r=this.options,o=e.node,a=e.action,s=e.items,l=this.wrapper,d=r.loadOnDemand;if(e.field){if(!s[0]||!s[0].level)return;return this._updateItems(s,e.field)}if(o&&(l=this.findByUid(o.uid),this._progress(l,!1)),"add"==a?this._appendItems(e.index,s,l):"remove"==a?this.remove(this.findByUid(s[0].uid)):"itemchange"==a?this._updateItems(s):"itemloaded"==a?this._refreshChildren(o,l):this._refreshRoot(s),"remove"!=a)for(n=0;n<s.length;n++)d&&!s[n].expanded||(i=s[n],this._hasChildItems(i)&&i.load());this.trigger(P,{node:o?l:t})},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),n=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),le(t).addClass("k-i-refresh"),e.node.loaded(!1)):(this._progress(!1),this.element.html(n))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch()},items:function(){return this.element.find(".k-item > span:first-child")},setDataSource:function(e){var t=this.options;t.dataSource=e,this._dataSource(),this.options.autoBind&&(this._progress(!0),this.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=l(this.refresh,this),this._errorHandler=l(this._error,this),this.dataSource.bind(I,this._refreshHandler),this.dataSource.bind(y,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(I,this._refreshHandler),e.unbind(y,this._errorHandler))},_fieldAccessor:function(t){var n=this.options[ae[t]]||[],i=n.length,o="(function(item) {";return 0===i?o+="return item['"+t+"'];":(o+="var levels = ["+e.map(n,function(e){return"function(d){ return "+r.expr(e)+"}"}).join(",")+"];",o+="if(item.level){return levels[Math.min(item.level(), "+i+"-1)](item);}else",o+="{return levels["+i+"-1](item)}"),o+="})"},_dataSource:function(){var e=this,t=e.options,n=t.dataSource;n&&(n=c(n)?{data:n}:n,e._unbindDataSource(),n.fields||(n.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource=f.create(n),e._bindDataSource())},_appendItems:function(t,n,i){var r,o,a,l,d,c=this;for(i.hasClass("k-panelbar")?(r=i.children("li"),o=i):(o=i.children(".k-group"),o.length||(o=c._addGroupElement(i)),r=o.children("li")),a={firstLevel:i.hasClass("k-panelbar"),expanded:!0,length:r.length},l=e.map(n,function(t,n){return e("string"==typeof t?t:c.renderItem({group:a,item:s(t,{index:n})}))}),typeof t==M&&(t=r.length),d=0;d<l.length;d++)0===r.length||0===t?o.append(l[d]):l[d].insertAfter(r[t-1]);c._angularCompileElements(l,n),c.dataItem(i)&&(c.dataItem(i).hasChildren=!0,c.updateArrow(i))},_updateItems:function(t,n){var i,r,a,l,d,c,u=this,p={panelBar:u.options,item:l,group:{}},f="expanded"!=n;if("selected"==n)t[0][n]?(d=u.findByUid(t[0].uid),d.hasClass(j)||u.select(d,!0)):u.clearSelection();else{for(c=e.map(t,function(e){return u.findByUid(e.uid)}),f&&u.angular("cleanup",function(){return{elements:c}}),i=0;i<t.length;i++)p.item=l=t[i],p.panelBar=u,a=c[i],r=a.parent(),f&&(p.group={firstLevel:r.hasClass("k-panelbar"),expanded:a.parent().hasClass(B),length:a.children().length},a.children(".k-link").remove(),a.prepend(u.templates.itemWrapper(s(p,{arrow:l.hasChildren||l.content||l.contentUrl?u.templates.arrow:u.templates.empty},se)))),"expanded"==n?u._toggleItem(a,!l[n],!l[n]||"true"):"enabled"==n&&(u.enable(a,l[n]),l[n]||l.selected&&l.set("selected",!1)),a.length&&this.trigger("itemChange",{item:a.find(".k-link").first(),data:l,ns:o});f&&u.angular("compile",function(){return{elements:c,data:e.map(t,function(e){return[{dataItem:e}]})}})}},_toggleDisabled:function(e,t){e=this.element.find(e),e.toggleClass(J,t).toggleClass(j,!t).attr(Z,!t)},dataItem:function(t){var n=e(t).closest(w).attr(r.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},select:function(n,i){var r=this;return n===t?r.element.find(X).parent():(n=r.element.find(n),n.length?n.each(function(){var n=e(this),o=n.children(k);return n.hasClass(j)?r:(r._updateSelected(o,i),t)}):this._updateSelected(n),r)},clearSelection:function(){this.select(e())},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.length?t.find(L):null);return d(i.items,function(){i.group.append(this),n(this)}),this.updateArrow(t),n(i.group.find(".k-first, .k-last")),i.group.height("auto"),this},insertBefore:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return d(i.items,function(){t.before(this),n(this)}),n(t),i.group.height("auto"),this},insertAfter:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return d(i.items,function(){t.after(this),n(this)}),n(t),i.group.height("auto"),this},remove:function(e){e=this.element.find(e);var t=this,i=e.parentsUntil(t.element,w),r=e.parent("ul");return e.remove(),!r||r.hasClass("k-panelbar")||r.children(w).length||r.remove(),i.length&&(i=i.eq(0),t.updateArrow(i),n(i)),t},reload:function(t){var n=this;t=n.element.find(t),t.each(function(){var t=e(this);n._ajaxRequest(t,t.children("."+A),!t.is(ie))})},_first:function(){return this.element.children(K).first()},_last:function(){var e=this.element.children(K).last(),t=e.children(C);return t[0]?t.children(K).last():e},_current:function(n){var i=this,r=i._focused,o=i._itemId;return n===t?r:(i.element.removeAttr("aria-activedescendant"),r&&r.length&&(r[0].id===o&&r.removeAttr("id"),r.children(k).removeClass(W)),e(n).length&&(o=n[0].id||o,n.attr("id",o).children(k).addClass(W),i.element.attr("aria-activedescendant",o)),i._focused=n,t)},_keydown:function(e){var t=this,n=e.keyCode,i=t._current();e.target==e.currentTarget&&(n==a.DOWN||n==a.RIGHT?(t._current(t._nextItem(i)),e.preventDefault()):n==a.UP||n==a.LEFT?(t._current(t._prevItem(i)),e.preventDefault()):n==a.ENTER||n==a.SPACEBAR?(t._click(e),e.preventDefault()):n==a.HOME?(t._current(t._first()),e.preventDefault()):n==a.END&&(t._current(t._last()),e.preventDefault()))},_nextItem:function(e){if(!e)return this._first();var t=e.children(C),n=e.nextAll(":visible").first();return t[0]&&(n=t.children("."+S)),n[0]||(n=e.parent(C).parent(w).next()),n[0]||(n=this._first()),n.hasClass(j)&&(n=this._nextItem(n)),n},_prevItem:function(e){if(!e)return this._last();var t,n=e.prevAll(":visible").first();if(n[0])for(t=n;t[0];)t=t.children(C).children("."+_),t[0]&&(n=t);else n=e.parent(C).parent(w),n[0]||(n=this._last());return n.hasClass(j)&&(n=this._prevItem(n)),n},_insert:function(t,n,i){var r,o,a,l=this,d=e.isPlainObject(t),c=n&&n[0];return c||(i=l.element),o={firstLevel:i.hasClass("k-panelbar"),expanded:e(n).hasClass(B),length:i.children().length},c&&!i.length&&(i=e(l.renderGroup({group:o,options:l.options})).appendTo(n)),d||e.isArray(t)||t instanceof f?(t instanceof f&&(t=t.data()),r=e.map(d?[t]:t,function(t,n){return e("string"==typeof t?t:l.renderItem({group:o,item:s(t,{index:n})}))}),c&&(a=l.dataItem(n),a?(a.hasChildren=!0,n.attr(ee,a.expanded).not("."+B).children("ul").attr(te,!a.expanded)):n.attr(ee,!1))):(r="string"==typeof t&&"<"!=t.charAt(0)?l.element.find(t):e(t),l._updateItemsClasses(r)),t.length||(t=[t]),l._angularCompileElements(r,t),{items:r,group:i}},_toggleHover:function(t){var n=e(t.currentTarget);n.parents("li."+j).length||n.toggleClass("k-state-hover",t.type==H);
|
34
|
-
},_updateClasses:function(){var t,i,r,o,a,s=this;t=s.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),o=t.parent(),a=s.dataItem(o),r=a&&a.expanded||!1,t.parent().attr(ee,r).not("."+B).children("ul").attr(te,!r).hide(),i=s.element.add(t).children(),s._updateItemsClasses(i),s.updateArrow(i),n(i)},_updateItemsClasses:function(e){for(var t=e.length,n=0;n<t;n++)this._updateItemClasses(e[n],n)},_updateItemClasses:function(t,n){var i,o,a=this._selected,s=this.options.contentUrls,l=s&&s[n],d=this.element[0];t=e(t).addClass("k-item").attr("role","treeitem"),r.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children(g).addClass(T),o=t.children("a").addClass(b),o[0]&&(o.attr("href",l),o.children(g).addClass(T)),t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"),t.filter("li[disabled]").addClass("k-state-disabled").attr(Z,!0).removeAttr("disabled"),t.children("div").addClass(A).attr(te,!0).hide().parent().attr(ee,!1),o=t.children(G),o[0]&&(a&&a.removeAttr(ne).children(G).removeClass(q),o.addClass(q),this._selected=t.attr(ne,!0)),t.children(k)[0]||(i="<span class='"+b+"'></span>",s&&s[n]&&t[0].parentNode==d&&(i='<a class="k-link k-header" href="'+s[n]+'"></a>'),t.contents().filter(function(){return!(this.nodeName.match(h)||3==this.nodeType&&!r.trim(this.nodeValue.trim))}).wrapAll(i)),t.parent(".k-panelbar")[0]&&t.children(k).addClass("k-header")},_click:function(n){var i,r,o,a,s,l,d,c,u,p=this,f=n.type==E?e(n.target):p._current().children(k),h=p.element;if(!f.parents("li."+j).length&&f.closest(".k-widget")[0]==h[0]&&(!f.is(":kendoFocusable")||f.hasClass(b))){if(s=f.closest(k),l=s.closest(w),p._updateSelected(s),d=l.children(".k-group,.k-content"),c=this.dataItem(l),!d.length&&(p.options.loadOnDemand&&c&&c.hasChildren||this._hasChildItems(l)||l.content||l.contentUrl)&&(d=p._addGroupElement(l)),r=l.find(L).add(l.find(V)),o=s.attr(v),a=o&&("#"==o.charAt(o.length-1)||o.indexOf("#"+p.element[0].id+"-")!=-1),i=!(!a&&!r.length),r.data("animating")&&i)return n.preventDefault(),t;if(p._triggerEvent(F,l)&&(i=!0),i!==!1){if(p.options.expandMode==oe&&p._collapseAllExpanded(l)&&i)return n.preventDefault(),t;r.length&&(u=r.is(ie),p._triggerEvent(u?N:D,l)||(i=p._toggleItem(l,u))),i&&n.preventDefault()}}},_hasChildItems:function(e){return e.items&&e.items.length>0||e.hasChildren},_toggleItem:function(e,n,i){var r,o,a=this,s=e.find(L),l=e.find(k),d=l.attr(v),c=a.dataItem(e),u=!n,p=c&&c.loaded();return c&&!i&&c.expanded!==u?(c.set("expanded",u),r=c.hasChildren||!!c.content||!!c.contentUrl):(!c||i&&"true"!==i||p||c.content||c.contentUrl?s.length?(this._toggleGroup(s,n),r=!0):(o=e.children("."+A),o.length&&(r=!0,o.is(re)&&d!==t?a._ajaxRequest(e,o,n):a._toggleGroup(o,n))):(a.options.loadOnDemand&&this._progress(e,!0),e.children(".k-group,.k-content").remove(),r=c.hasChildren,c.load()),r)},_toggleGroup:function(e,n){var i=this,r=i.options.animation,o=r.expand,a=r.collapse&&"effects"in r.collapse,l=s({},r.expand,r.collapse);return a||(l=s(l,{reverse:!0})),e.is(ie)!=n?(i._animating=!1,t):(e.attr(te,!!n),e.parent().attr(ee,!n).toggleClass(B,!n).find("> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand").toggleClass("k-i-arrow-60-up",!n).toggleClass("k-panelbar-collapse",!n).toggleClass("k-i-arrow-60-down",n).toggleClass("k-panelbar-expand",n),n?(o=s(l,{hide:!0}),o.complete=function(){i._animationCallback()}):o=s({complete:function(e){i._triggerEvent(z,e.closest(w)),i._animationCallback()}},o),e.kendoStop(!0,!0).kendoAnimate(o),t)},_animationCallback:function(){var e=this;e.trigger("complete"),e._animating=!1},_addGroupElement:function(t){var n=e('<ul role="group" aria-hidden="true" class="k-group k-panel" style="display:none"></ul>');return t.append(n),n},_collapseAllExpanded:function(t){var n,i=this,r=!1,o=t.find(L).add(t.find(V));return o.is(ie)&&(r=!0),o.is(ie)||0===o.length||(n=t.siblings(),n.find(L).add(n.find(V)).filter(function(){return e(this).is(ie)}).each(function(t,n){n=e(n),r=i._triggerEvent(N,n.closest(w)),r||i._toggleGroup(n,!0)}),i.one("complete",function(){setTimeout(function(){n.each(function(e,t){var n=i.dataItem(t);n&&n.set("expanded",!1)})})})),r},_ajaxRequest:function(t,n,i){var r=this,o=t.find(".k-panelbar-collapse, .k-panelbar-expand"),a=t.find(k),s=setTimeout(function(){o.addClass("k-i-loading")},100),l={},d=a.attr(v);e.ajax({type:"GET",cache:!1,url:d,dataType:"html",data:l,error:function(e,t){o.removeClass("k-i-loading"),r.trigger(y,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(s),o.removeClass("k-i-loading")},success:function(e){function o(){return{elements:n.get()}}try{r.angular("cleanup",o),n.html(e),r.angular("compile",o)}catch(a){var s=window.console;s&&s.error&&s.error(a.name+": "+a.message+" in "+d),this.error(this.xhr,"error")}r._toggleGroup(n,i),r.trigger(O,{item:t[0],contentElement:n[0]})}})},_triggerEvent:function(e,t){var n=this;return n.trigger(e,{item:t[0]})},_updateSelected:function(e,t){var n=this,i=n.element,r=e.parent(w),o=n._selected,a=n.dataItem(r);o&&o.removeAttr(ne),n._selected=r.attr(ne,!0),i.find(X).removeClass(q),i.find("> ."+$+", .k-panel > ."+$).removeClass($),e.addClass(q),e.parentsUntil(i,w).filter(":has(.k-header)").addClass($),n._current(r[0]?r:null),a&&a.set("selected",!0),t||n.trigger(I)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},renderItem:function(e){var t,n,i=this;return e=s({panelBar:i,group:{}},e),t=i.templates.empty,n=e.item,i.templates.item(s(e,{itemWrapper:i.templates.itemWrapper,renderContent:i.renderContent,arrow:i._hasChildItems(n)||n.content||n.contentUrl?i.templates.arrow:t,subGroup:!e.loadOnDemand||n.expanded?i.renderGroup:t},se))},renderGroup:function(e){var t=this,n=t.templates||e.panelBar.templates;return n.group(s({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=s({length:r},e.group);n<r;n++)t+=e.panelBar.renderItem(s(e,{group:o,item:s({index:n},i[n])}));return t}},e,se))},renderContent:function(e){return e.panelBar.templates.content(s(e,se))}});r.ui.plugin(de)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.splitter.min",["kendo.resizable.min"],e)}(function(){return function(e,t){function n(e){return v.test(e)}function i(e){return g.test(e)||/^\d+$/.test(e)}function r(e){return!n(e)&&!i(e)}function o(e,t){var i=parseInt(e,10);return n(e)&&(i=Math.floor(i*t/100)),i}function a(e,n){return function(i,r){var o,a=this.element.find(i).data(F);return 1==arguments.length?a[e]:(a[e]=r,n&&(o=this.element.data("kendo"+this.options.name),o.resize(!0)),t)}}function s(e){var t=this,n=e.orientation;t.owner=e,t._element=e.element,t.orientation=n,f(t,n===T?d:l),t._resizable=new c.ui.Resizable(e.element,{orientation:n,handle:".k-splitbar-draggable-"+n+"[data-marker="+e._marker+"]",hint:h(t._createHint,t),start:h(t._start,t),max:h(t._max,t),min:h(t._min,t),invalidClass:"k-restricted-size-"+n,resizeend:h(t._stop,t)})}var l,d,c=window.kendo,u=c.ui,p=c.keys,f=e.extend,h=e.proxy,m=u.Widget,g=/^\d+(\.\d+)?px$/i,v=/^\d+(\.\d+)?%$/i,_=".kendoSplitter",b="expand",k="collapse",y="contentLoad",w="error",x="resize",C="layoutChange",T="horizontal",S="vertical",I="mouseenter",D="click",F="pane",E="mouseleave",A="k-state-focused",z="k-"+F,N="."+z,P=m.extend({init:function(e,t){var n,i=this;m.fn.init.call(i,e,t),i.wrapper=i.element,i.options.orientation&&(n=i.options.orientation.toLowerCase()!=S),i.orientation=n?T:S,i._dimension=n?"width":"height",i._keys={decrease:n?p.LEFT:p.UP,increase:n?p.RIGHT:p.DOWN},i._resizeStep=10,i._marker=c.guid().substring(0,8),i._initPanes(),i.resizing=new s(i),i.element.triggerHandler("init"+_)},events:[b,k,y,w,x,C],_addOverlays:function(){this._panes().append("<div class='k-splitter-overlay k-overlay' />")},_removeOverlays:function(){this._panes().children(".k-splitter-overlay").remove()},_attachEvents:function(){var t=this,n=t.options.orientation;t.element.children(".k-splitbar-draggable-"+n).on("keydown"+_,h(t._keydown,t)).on("mousedown"+_,function(e){e.currentTarget.focus()}).on("focus"+_,function(t){e(t.currentTarget).addClass(A)}).on("blur"+_,function(n){e(n.currentTarget).removeClass(A),t.resizing&&t.resizing.end()}).on(I+_,function(){e(this).addClass("k-splitbar-"+t.orientation+"-hover")}).on(E+_,function(){e(this).removeClass("k-splitbar-"+t.orientation+"-hover")}).on("mousedown"+_,h(t._addOverlays,t)).end().children(".k-splitbar").on("dblclick"+_,h(t._togglePane,t)).children(".k-collapse-next, .k-collapse-prev").on(D+_,t._arrowClick(k)).end().children(".k-expand-next, .k-expand-prev").on(D+_,t._arrowClick(b)).end().end(),e(window).on("resize"+_+t._marker,h(t.resize,t,!1)),e(document).on("mouseup"+_+t._marker,h(t._removeOverlays,t))},_detachEvents:function(){var t=this;t.element.children(".k-splitbar-draggable-"+t.orientation).off(_).end().children(".k-splitbar").off("dblclick"+_).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(_),e(window).off(_+t._marker),e(document).off(_+t._marker)},options:{name:"Splitter",orientation:T,panes:[]},destroy:function(){m.fn.destroy.call(this),this._detachEvents(),this.resizing&&this.resizing.destroy(),c.destroy(this.element),this.wrapper=this.element=null},_keydown:function(t){var n,i=this,r=t.keyCode,o=i.resizing,a=e(t.currentTarget),s=i._keys,l=r===s.increase,d=r===s.decrease;l||d?(t.ctrlKey?(n=a[d?"next":"prev"](),o&&o.isResizing()&&o.end(),n[i._dimension]()?i._triggerAction(k,a[d?"prev":"next"]()):i._triggerAction(b,n)):o&&o.move((d?-1:1)*i._resizeStep,a),t.preventDefault()):r===p.HOME?(o.move(-o._maxPosition,a),t.preventDefault()):r===p.END?(o.move(o._maxPosition,a),t.preventDefault()):r===p.ENTER&&o&&(o.end(),t.preventDefault())},_initPanes:function(){var e=this.options.panes||[],t=this;this.element.addClass("k-widget").addClass("k-splitter").children().each(function(n,i){"script"!=i.nodeName.toLowerCase()&&t._initPane(i,e[n])}),this.resize()},_initPane:function(t,n){t=e(t).attr("role","group").addClass(z),t.data(F,n?n:{}).toggleClass("k-scrollable",!n||n.scrollable!==!1),this.ajaxRequest(t)},ajaxRequest:function(e,t,n){var i,r=this;e=r.element.find(e),i=e.data(F),t=t||i.contentUrl,t&&(e.append("<span class='k-icon k-i-loading k-pane-loading' />"),c.isLocalUrl(t)?jQuery.ajax({url:t,data:n||{},type:"GET",dataType:"html",success:function(t){r.angular("cleanup",function(){return{elements:e.get()}}),e.html(t),r.angular("compile",function(){return{elements:e.get()}}),r.trigger(y,{pane:e[0]})},error:function(t,n){r.trigger(w,{pane:e[0],status:n,xhr:t})}}):e.removeClass("k-scrollable").html("<iframe src='"+t+"' frameborder='0' class='k-content-frame'>This page requires frames in order to show content</iframe>"))},_triggerAction:function(e,t){this.trigger(e,{pane:t[0]})||this[e](t[0])},_togglePane:function(t){var n,i=this,r=e(t.target);r.closest(".k-splitter")[0]==i.element[0]&&(n=r.children(".k-icon:not(.k-resize-handle)"),1===n.length&&(n.is(".k-collapse-prev")?i._triggerAction(k,r.prev()):n.is(".k-collapse-next")?i._triggerAction(k,r.next()):n.is(".k-expand-prev")?i._triggerAction(b,r.prev()):n.is(".k-expand-next")&&i._triggerAction(b,r.next())))},_arrowClick:function(t){var n=this;return function(i){var r,o=e(i.target);o.closest(".k-splitter")[0]==n.element[0]&&(r=o.is(".k-"+t+"-prev")?o.parent().prev():o.parent().next(),n._triggerAction(t,r))}},_updateSplitBar:function(e,t,n){var i=function(e,t){return t?"<div class='k-icon "+e+"'></div>":""},r=this.orientation,o=t.resizable!==!1&&n.resizable!==!1,a=t.collapsible,s=t.collapsed,l=n.collapsible,d=n.collapsed;e.addClass("k-splitbar k-state-default k-splitbar-"+r).attr("role","separator").attr("aria-expanded",!(s||d)).removeClass("k-splitbar-"+r+"-hover").toggleClass("k-splitbar-draggable-"+r,o&&!s&&!d).toggleClass("k-splitbar-static-"+r,!o&&!a&&!l).html(i("k-collapse-prev k-i-arrow-60-up",a&&!s&&!d&&r==S)+i("k-collapse-prev k-i-arrow-60-left",a&&!s&&!d&&r==T)+i("k-expand-prev k-i-arrow-60-down",a&&s&&!d&&r==S)+i("k-expand-prev k-i-arrow-60-right",a&&s&&!d&&r==T)+i("k-resize-handle k-i-hbar",o&&r==S)+i("k-resize-handle k-i-vbar",o&&r==T)+i("k-collapse-next k-i-arrow-60-down",l&&!d&&!s&&r==S)+i("k-collapse-next k-i-arrow-60-right",l&&!d&&!s&&r==T)+i("k-expand-next k-i-arrow-60-up",l&&d&&!s&&r==S)+i("k-expand-next k-i-arrow-60-left",l&&d&&!s&&r==T)),o||a||l||e.removeAttr("tabindex")},_updateSplitBars:function(){var t=this;this.element.children(".k-splitbar").each(function(){var n=e(this),i=n.prevAll(N).first().data(F),r=n.nextAll(N).first().data(F);r&&t._updateSplitBar(n,i,r)})},_removeSplitBars:function(){this.element.children(".k-splitbar").remove()},_panes:function(){return this.element?this.element.children(N):e()},_resize:function(){var n,i,a,s,l,d,u,p,f,h,m=this,g=m.element,v=g.children(N),_=m.orientation==T,b=g.children(".k-splitbar"),k=b.length,y=_?"width":"height",w=g[y]();m.wrapper.addClass("k-splitter-resizing"),0===k?(k=v.length-1,v.slice(0,k).after("<div tabindex='0' class='k-splitbar' data-marker='"+m._marker+"' />"),m._updateSplitBars(),b=g.children(".k-splitbar")):m._updateSplitBars(),b.each(function(){w-=this[_?"offsetWidth":"offsetHeight"]}),n=0,i=0,a=e(),v.css({position:"absolute",top:0})[y](function(){var s,l=e(this),d=l.data(F)||{};if(l.removeClass("k-state-collapsed"),d.collapsed)s=d.collapsedSize?o(d.collapsedSize,w):0,l.css("overflow","hidden").addClass("k-state-collapsed");else{if(r(d.size))return a=a.add(this),t;s=o(d.size,w)}return i++,n+=s,s}),w-=n,s=a.length,l=Math.floor(w/s),a.slice(0,s-1).css(y,l).end().eq(s-1).css(y,w-(s-1)*l),d=0,u=_?"height":"width",p=_?"left":"top",f=_?"offsetWidth":"offsetHeight",0===s&&(h=v.filter(function(){return!(e(this).data(F)||{}).collapsed}).last(),h[y](w+h[0][f])),g.children().css(u,g[u]()).each(function(e,t){"script"!=t.tagName.toLowerCase()&&(t.style[p]=Math.floor(d)+"px",d+=t[f])}),m._detachEvents(),m._attachEvents(),m.wrapper.removeClass("k-splitter-resizing"),c.resize(v),m.trigger(C)},toggle:function(e,n){var i,r=this;e=r.element.find(e),i=e.data(F),(n||i.collapsible)&&(1==arguments.length&&(n=i.collapsed!==t&&i.collapsed),i.collapsed=!n,i.collapsed?e.css("overflow","hidden"):e.css("overflow",""),r.resize(!0))},collapse:function(e){this.toggle(e,!1)},expand:function(e){this.toggle(e,!0)},_addPane:function(e,t,n){var i=this;return n.length&&(i.options.panes.splice(t,0,e),i._initPane(n,e),i._removeSplitBars(),i.resize(!0)),n},append:function(t){t=t||{};var n=this,i=e("<div />").appendTo(n.element);return n._addPane(t,n.options.panes.length,i)},insertBefore:function(t,n){n=e(n),t=t||{};var i=this,r=i.wrapper.children(".k-pane").index(n),o=e("<div />").insertBefore(e(n));return i._addPane(t,r,o)},insertAfter:function(t,n){n=e(n),t=t||{};var i=this,r=i.wrapper.children(".k-pane").index(n),o=e("<div />").insertAfter(e(n));return i._addPane(t,r+1,o)},remove:function(t){var n=this;return t=n.wrapper.find(t),t.length&&(c.destroy(t),t.each(function(t,i){n.options.panes.splice(n.wrapper.children(".k-pane").index(i),1),e(i).remove()}),n._removeSplitBars(),n.options.panes.length&&n.resize(!0)),n},size:a("size",!0),min:a("min"),max:a("max")});u.plugin(P),l={sizingProperty:"height",sizingDomProperty:"offsetHeight",alternateSizingProperty:"width",positioningProperty:"top",mousePositioningProperty:"pageY"},d={sizingProperty:"width",sizingDomProperty:"offsetWidth",alternateSizingProperty:"height",positioningProperty:"left",mousePositioningProperty:"pageX"},s.prototype={press:function(e){this._resizable.press(e)},move:function(e,t){this.pressed||(this.press(t),this.pressed=!0),this._resizable.target||this._resizable.press(t),this._resizable.move(e)},end:function(){this._resizable.end(),this.pressed=!1},destroy:function(){this._resizable.destroy(),this._resizable=this._element=this.owner=null},isResizing:function(){return this._resizable.resizing},_createHint:function(t){var n=this;return e("<div class='k-ghost-splitbar k-ghost-splitbar-"+n.orientation+" k-state-default' />").css(n.alternateSizingProperty,t[n.alternateSizingProperty]())},_start:function(t){var n=this,r=e(t.currentTarget),o=r.prev(),a=r.next(),s=o.data(F),l=a.data(F),d=parseInt(o[0].style[n.positioningProperty],10),c=parseInt(a[0].style[n.positioningProperty],10)+a[0][n.sizingDomProperty]-r[0][n.sizingDomProperty],u=parseInt(n._element.css(n.sizingProperty),10),p=function(e){var t=parseInt(e,10);return(i(e)?t:u*t/100)||0},f=p(s.min),h=p(s.max)||c-d,m=p(l.min),g=p(l.max)||c-d;n.previousPane=o,n.nextPane=a,n._maxPosition=Math.min(c-m,d+h),n._minPosition=Math.max(d+f,c-g)},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var n,i,o,a,s,l,d,u,p=this,f=e(t.currentTarget),h=p.owner;return h._panes().children(".k-splitter-overlay").remove(),t.keyCode!==c.keys.ESC&&(n=t.position,i=f.prev(),o=f.next(),a=i.data(F),s=o.data(F),l=n-parseInt(i[0].style[p.positioningProperty],10),d=parseInt(o[0].style[p.positioningProperty],10)+o[0][p.sizingDomProperty]-n-f[0][p.sizingDomProperty],u=p._element.children(N).filter(function(){return r(e(this).data(F).size)}).length,(!r(a.size)||u>1)&&(r(a.size)&&u--,a.size=l+"px"),(!r(s.size)||u>1)&&(s.size=d+"px"),h.resize(!0)),!1}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.tooltip.min",["kendo.core.min","kendo.popup.min","kendo.fx.min"],e)}(function(){return function(e,t){function n(e){for(;e.length&&!i(e);)e=e.parent()}function i(e){var t=e.data(a.ns+"title");if(t)return e.attr("title",t),e.removeData(a.ns+"title"),!0}function r(e){var t=e.attr("title");if(t)return e.data(a.ns+"title",t),e.attr("title",""),!0}function o(e){for(;e.length&&!e.is("body")&&!r(e);)e=e.parent()}var a=window.kendo,s=a.ui.Widget,l=a.ui.Popup,d=a.isFunction,c=e.isPlainObject,u=e.extend,p=e.proxy,f=e(document),h=a.isLocalUrl,m="_tt_active",g="aria-describedby",v="show",_="hide",b="error",k="contentLoad",y="requestStart",w="k-content-frame",x='<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#"><div class="k-tooltip-content"></div>#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close" title="Close"></a></div> #}##if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',C=a.template("<iframe frameborder='0' class='"+w+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),T=".kendoTooltip",S={bottom:{origin:"bottom center",position:"top center"},top:{origin:"top center",position:"bottom center"},left:{origin:"center left",position:"center right",collision:"fit flip"},right:{origin:"center right",position:"center left",collision:"fit flip"},center:{position:"center center",origin:"center center"}},I={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},D={bottom:"n",top:"s",left:"e",right:"w",center:"n"},F={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},E=function(e){return e.target.data(a.ns+"title")},A=s.extend({init:function(e,t){var n,i=this;s.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=F[n],i._documentKeyDownHandler=p(i._documentKeyDown,i),a.support.touch&&this._isShownOnMouseEnter()&&i.element.on(a.support.mousedown+T,i.options.filter,p(i._showOn,i)),i.element.on(i.options.showOn+T,i.options.filter,p(i._showOn,i)),(this._isShownOnMouseEnter()||this._isShownOnClick())&&i.element.on("mouseenter"+T,i.options.filter,p(i._mouseenter,i)),this.options.autoHide&&this._isShownOnMouseEnter()&&i.element.on("mouseleave"+T,i.options.filter,p(i._mouseleave,i)),this.options.autoHide&&this._isShownOnFocus()&&i.element.on("blur"+T,i.options.filter,p(i._blur,i)),a.support.touch&&i.element.on(a.support.mousedown+T,i.options.filter,p(i._mouseenter,i))},options:{name:"Tooltip",filter:"",content:E,showAfter:100,hideAfter:100,callout:!0,offset:0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},events:[v,_,k,b,y],_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_isShownOnMouseEnter:function(){return this.options.showOn&&this.options.showOn.match(/mouseenter/)},_isShownOnClick:function(){return this.options.showOn&&this.options.showOn.match(/click/)},_mouseenter:function(t){o(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n._isShownOnClick()&&!n._isShownOnMouseEnter()?n._show(i):n._isShownOnFocus()?(o(i),n._show(i)):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,r=n.content,o=n.options.iframe;c(i)&&i.url?("iframe"in n.options||(o=!h(i.url)),n.trigger(y,{options:i,target:e}),o?(r.hide(),t=r.find("."+w)[0],t?t.src=i.url||t.src:r.html(C({content:i})),r.find("."+w).off("load"+T).on("load"+T,function(){n.trigger(k),r.show()})):(r.empty(),a.ui.progress(r,!0),n._ajaxRequest(i))):i&&d(i)?(i=i({sender:this,target:e}),r.html(i||"")):r.html(i),n.angular("compile",function(){return{elements:r}})},_ajaxRequest:function(e){var t=this;jQuery.ajax(u({type:"GET",dataType:"html",cache:!1,error:function(e,n){a.ui.progress(t.content,!1),t.trigger(b,{status:n,xhr:e})},success:p(function(e){a.ui.progress(t.content,!1),t.content.html(e),t.trigger(k)},t)},e))},_documentKeyDown:function(e){e.keyCode===a.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,o(e),this._show(e)},_show:function(e){var t=this,i=t.target();t.popup||t._initPopup(),i&&i[0]!=e[0]&&(t.popup.close(),t.popup.element.kendoStop(!0,!0)),i&&i[0]==e[0]||(t._appendContent(e),t.popup.options.anchor=e),t.popup.one("deactivate",function(){n(e),e.removeAttr(g),this.element.removeAttr("id").attr("aria-hidden",!0),f.off("keydown"+T,t._documentKeyDownHandler)}),t.popup._hovered=!0,t.popup.open()},_initPopup:function(){var n=this,i=n.options,r=e(a.template(x)({callout:i.callout&&"center"!==i.position,dir:D[i.position],autoHide:i.autoHide}));n.popup=new l(r,u({autosize:!0,activate:function(){var e=this.options.anchor,r=e[0].id||n.element[0].id;r&&(e.attr(g,r+m),this.element.attr("id",r+m)),i.callout?n._positionCallout():n._offset(n.options.position,n.options.offset),this.element.removeAttr("aria-hidden"),f.on("keydown"+T,n._documentKeyDownHandler),n.trigger(v),n.popup._hovered=t},close:function(){n.trigger(_)},copyAnchorStyles:!1,animation:i.animation},S[i.position])),r.css({width:i.width,height:i.height}),n.content=r.find(".k-tooltip-content"),n.arrow=r.find(".k-callout"),i.autoHide&&this._isShownOnMouseEnter()?r.on("mouseleave"+T,p(n._mouseleave,n)):r.on("click"+T,".k-tooltip-button",p(n._closeButtonClick,n))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){var t=this;clearTimeout(t.timeout),t.timeout=setTimeout(function(){t._closePopup(e.currentTarget)},t.options.hideAfter)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup&&!this.popup._hovered?this.popup.close():n(e(t))},target:function(){return this.popup?this.popup.options.anchor:null},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,r=i.offset,o=t.popup,a=o.options.anchor,s=e(a).offset(),l=e(o.element).offset(),d=D[o.flipped?I[n]:n],c=s[r]-l[r]+e(a)[i.size]()/2;t._offset(n,t.options.offset),t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+d).css(r,c)},destroy:function(){var e=this.popup;e&&(e.element.off(T),e.destroy()),clearTimeout(this.timeout),this.element.off(T),f.off("keydown"+T,this._documentKeyDownHandler),s.fn.destroy.call(this)},_offset:function(e,t){var n=this,i="top"==e||"left"==e,r=n.popup.flipped,o=i&&r||!i&&!r?1:-1,s=i?"margin-"+e:"margin-"+I[e],l=a._outerWidth(n.arrow)/2+t;n.popup.wrapper.css(s,l*o+"px")}});a.ui.plugin(A)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.treeview.draganddrop.min",["kendo.data.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=e.proxy,o=e.extend,a="visibility",s="k-state-hover",l="input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-arrow-60-right,span.k-icon.k-i-arrow-45-down-right",d="<div class='k-drop-hint k-drop-hint-h'><div class='k-drop-hint-start'></div><div class='k-drop-hint-line'></div></div>";i.HierarchicalDragAndDrop=n.Class.extend({init:function(t,a){this.element=t,this.hovered=t,this.options=o({dragstart:e.noop,drag:e.noop,drop:e.noop,dragend:e.noop},a),this._draggable=new i.Draggable(t,{ignore:l,filter:a.filter,autoScroll:a.autoScroll,cursorOffset:{left:10,top:n.support.mobileOS?-40/n.support.zoomLevel():10},hint:r(this._hint,this),dragstart:r(this.dragstart,this),dragcancel:r(this.dragcancel,this),drag:r(this.drag,this),dragend:r(this.dragend,this),$angular:a.$angular,holdToDrag:a.holdToDrag})},_hint:function(e){return"<div class='k-header k-drag-clue'><span class='k-icon k-drag-status'></span>"+this.options.hintText(e)+"</div>"},_removeTouchHover:function(){n.support.touch&&this.hovered&&(this.hovered.find("."+s).removeClass(s),this.hovered=!1)},_hintStatus:function(e){var i=this._draggable.hint.find(".k-drag-status")[0];return e?(i.className="k-icon k-drag-status "+e,t):n.trim(i.className.replace(/(p|k)-(icon|drag-status)/g,""))},dragstart:function(t){this.source=t.currentTarget.closest(this.options.itemSelector),this.options.dragstart(this.source)&&t.preventDefault(),this.dropHint=this.options.reorderable?e(d).css(a,"hidden").appendTo(this.element):e()},drag:function(t){var i,r,o,l,d,c,u,p,f,h,m,g=this.options,v=this.source,_=this.dropTarget=e(n.eventTarget(t)),b=_.closest(g.allowedContainers);b.length?v[0]==_[0]||g.contains(v[0],_[0])?m="k-i-cancel":(m="k-i-insert-middle",f=g.itemFromTarget(_),i=f.item,i.length?(this._removeTouchHover(),r=n._outerHeight(i),l=f.content,g.reorderable?(d=r/(l.length>0?4:2),o=n.getOffset(i).top,c=t.y.location<o+d,u=o+r-d<t.y.location,p=l.length&&!c&&!u):(p=!0,c=!1,u=!1),this.hovered=!!p&&b,this.dropHint.css(a,p?"hidden":"visible"),this._lastHover&&this._lastHover[0]!=l[0]&&this._lastHover.removeClass(s),this._lastHover=l.toggleClass(s,p),p?m="k-i-plus":(h=i.position(),h.top+=c?0:r,this.dropHint.css(h)[c?"prependTo":"appendTo"](g.dropHintContainer(i)),c&&f.first&&(m="k-i-insert-up"),u&&f.last&&(m="k-i-insert-down"))):_[0]!=this.dropHint[0]&&(this._lastHover&&this._lastHover.removeClass(s),m=e.contains(this.element[0],b[0])?"k-i-cancel":"k-i-plus")):(m="k-i-cancel",this._removeTouchHover()),this.options.drag({originalEvent:t.originalEvent,source:v,target:_,pageY:t.y.location,pageX:t.x.location,status:m.substring(2),setStatus:function(e){m=e}}),0!==m.indexOf("k-i-insert")&&this.dropHint.css(a,"hidden"),this._hintStatus(m)},dragcancel:function(){this.dropHint.remove()},dragend:function(e){var n,i,r,o="over",l=this.source,d=this.dropHint,c=this.dropTarget;return"visible"==d.css(a)?(o=this.options.dropPositionFrom(d),n=d.closest(this.options.itemSelector)):c&&(n=c.closest(this.options.itemSelector),n.length||(n=c.closest(this.options.allowedContainers))),i={originalEvent:e.originalEvent,source:l[0],destination:n[0],valid:"k-i-cancel"!=this._hintStatus(),setValid:function(e){this.valid=e},dropTarget:c[0],position:o},r=this.options.drop(i),d.remove(),this._removeTouchHover(),this._lastHover&&this._lastHover.removeClass(s),!i.valid||r?(this._draggable.dropped=i.valid,t):(this._draggable.dropped=!0,this.options.dragend({originalEvent:e.originalEvent,source:l,destination:n,position:o}),t)},destroy:function(){this._lastHover=this.hovered=null,this._draggable.destroy()}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.treeview.min",["kendo.data.min","kendo.treeview.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return function(t){var n=t.children(".k-animation-container");return n.length||(n=t),n.children(e)}}function i(e){return f.template(e,{useWithBlock:!1})}function r(e){return e.find(".k-checkbox-wrapper:first input[type=checkbox]")}function o(e){return function(t,n){n=n.closest(j);var i,r=n.parent();return r.parent().is("li")&&(i=r.parent()),this._dataSourceMove(t,r,i,function(t,i){var r=this.dataItem(n),o=r?r.parent().indexOf(r):n.index();return this._insert(t.data(),i,o+e)})}}function a(e,t){for(var n;e&&"ul"!=e.nodeName.toLowerCase();)n=e,e=e.nextSibling,3==n.nodeType&&(n.nodeValue=f.trim(n.nodeValue)),p.test(n.className)?t.insertBefore(n,t.firstChild):t.appendChild(n)}function s(t){var n=t.children("div"),i=t.children("ul"),r=n.children(".k-icon"),o=t.children("input[type=checkbox]"),s=n.children(".k-in");t.hasClass("k-treeview")||(n.length||(n=e("<div />").prependTo(t)),!r.length&&i.length?r=e("<span class='k-icon' />").prependTo(n):i.length&&i.children().length||(r.remove(),i.remove()),o.length&&e("<span class='k-checkbox-wrapper' />").appendTo(n).append(o),s.length||(s=t.children("a").eq(0).addClass("k-in k-link"),s.length||(s=e("<span class='k-in' />")),s.appendTo(n),n.length&&a(n[0].nextSibling,s[0])))}var l,d,c,u,p,f=window.kendo,h=f.ui,m=f.data,g=e.extend,v=f.template,_=e.isArray,b=h.Widget,k=m.HierarchicalDataSource,y=e.proxy,w=f.keys,x=".kendoTreeView",C=".kendoTreeViewTemp",T="select",S="check",I="navigate",D="expand",F="change",E="error",A="checked",z="indeterminate",N="collapse",P="dragstart",H="drag",R="drop",O="dragend",M="dataBound",B="click",L="undefined",V="k-state-hover",U="k-treeview",W=":visible",j=".k-item",q="string",G="aria-checked",$="aria-selected",K="aria-disabled",Y="aria-expanded",Q="k-state-disabled",X={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},J=function(e){return e instanceof f.jQuery||window.jQuery&&e instanceof window.jQuery},Z=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===q};d=n(".k-group"),c=n(".k-group,.k-content"),u=function(e){return e.children("div").children(".k-icon")},p=/k-sprite/,l=f.ui.DataBoundWidget.extend({init:function(e,t){var n,i=this,r=!1,o=t&&!!t.dataSource;_(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==L&&_(t.dataSource)&&(t.loadOnDemand=!1),b.prototype.init.call(i,e,t),e=i.element,t=i.options,i._dataSourceUids={},n=e.is("ul")&&e||e.hasClass(U)&&e.children("ul"),r=!o&&n.length,r&&(t.dataSource.list=n),i._animation(),i._accessors(),i._templates(),e.hasClass(U)?(i.wrapper=e,i.root=e.children("ul").eq(0)):(i._wrapper(),n&&(i.root=e,i._group(i.wrapper))),i._tabindex(),i.wrapper.attr("role","tree"),i._dataSource(r),i._attachEvents(),i._dragging(),r?i._syncHtmlAndDataSource():t.autoBind&&(i._progress(!0),i.dataSource.fetch()),t.checkboxes&&t.checkboxes.checkChildren&&i.updateIndeterminate(),i.element[0].id&&(i._ariaId=f.format("{0}_tv_active",i.element[0].id)),f.notify(i)},_attachEvents:function(){var t=this,n=".k-in:not(.k-state-selected,.k-state-disabled)",i="mouseenter";t.wrapper.on(i+x,".k-in.k-state-selected",function(e){e.preventDefault()}).on(i+x,n,function(){e(this).addClass(V)}).on("mouseleave"+x,n,function(){e(this).removeClass(V)}).on(B+x,n,y(t._click,t)).on("dblclick"+x,".k-in:not(.k-state-disabled)",y(t._toggleButtonClick,t)).on(B+x,".k-i-expand,.k-i-collapse",y(t._toggleButtonClick,t)).on("keydown"+x,y(t._keydown,t)).on("keypress"+x,y(t._keypress,t)).on("focus"+x,y(t._focus,t)).on("blur"+x,y(t._blur,t)).on("mousedown"+x,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",y(t._mousedown,t)).on("change"+x,".k-checkbox-wrapper :checkbox",y(t._checkboxChange,t)).on("click"+x,".checkbox-span",y(t._checkboxLabelClick,t)).on("click"+x,".k-request-retry",y(t._retryRequest,t)).on("click"+x,".k-link.k-state-disabled",function(e){
|
35
|
-
e.preventDefault()}).on("click"+x,function(n){var i=e(n.target);i.is(":kendoFocusable")||i.find("input,select,textarea,button,object").is(":kendoFocusable")||t.focus()})},_checkboxLabelClick:function(t){var n=e(t.target.previousSibling);n.is("[disabled]")||(n.prop("checked",!n.prop("checked")),n.trigger("change"))},_syncHtmlAndDataSource:function(e,t){e=e||this.root,t=t||this.dataSource;var n,i,o,a,s,l=t.view(),d=f.attr("uid"),c=f.attr("expanded"),u=this.options.checkboxes,p=e.children("li");for(n=0;n<p.length;n++)o=l[n],a=o.uid,i=p.eq(n),i.attr("role","treeitem").attr(d,a).attr($,i.hasClass("k-state-selected")),o.expanded="true"===i.attr(c),u&&(s=r(i),o.checked=s.prop(A),s.attr("id","_"+a),s.next(".k-checkbox-label").attr("for","_"+a)),this._syncHtmlAndDataSource(i.children("ul"),o.children)},_animation:function(){var e=this.options,t=e.animation,n=t.collapse&&"effects"in t.collapse,i=g({},t.expand,t.collapse);n||(i=g(i,{reverse:!0})),t===!1&&(t={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),t.collapse=g(i,{hide:!0}),e.animation=t},_dragging:function(){var t,n=this.options.dragAndDrop,i=this.dragging;n&&!i?(t=this,this.dragging=new h.HierarchicalDragAndDrop(this.element,{reorderable:!0,$angular:this.options.$angular,autoScroll:this.options.autoScroll,filter:"div:not(.k-state-disabled) .k-in",allowedContainers:".k-treeview",itemSelector:".k-treeview .k-item",hintText:y(this._hintText,this),contains:function(t,n){return e.contains(t,n)},dropHintContainer:function(e){return e},itemFromTarget:function(e){var t=e.closest(".k-top,.k-mid,.k-bot");return{item:t,content:e.closest(".k-in"),first:t.hasClass("k-top"),last:t.hasClass("k-bot")}},dropPositionFrom:function(e){return e.prevAll(".k-in").length>0?"after":"before"},dragstart:function(e){return t.trigger(P,{sourceNode:e[0]})},drag:function(e){t.trigger(H,{originalEvent:e.originalEvent,sourceNode:e.source[0],dropTarget:e.target[0],pageY:e.pageY,pageX:e.pageX,statusClass:e.status,setStatusClass:e.setStatus})},drop:function(n){var i=e(n.dropTarget),r=i.closest("a");return r&&r.attr("href")&&t._tempPreventNavigation(r),t.trigger(R,{originalEvent:n.originalEvent,sourceNode:n.source,destinationNode:n.destination,valid:n.valid,setValid:function(e){this.valid=e,n.setValid(e)},dropTarget:n.dropTarget,dropPosition:n.position})},dragend:function(e){function n(n){t.options.checkboxes&&t.options.checkboxes.checkChildren&&t.updateIndeterminate(),t.trigger(O,{originalEvent:e.originalEvent,sourceNode:n&&n[0],destinationNode:r[0],dropPosition:o})}var i=e.source,r=e.destination,o=e.position;"over"==o?t.append(i,r,n):("before"==o?i=t.insertBefore(i,r):"after"==o&&(i=t.insertAfter(i,r)),n(i))}})):!n&&i&&(i.destroy(),this.dragging=null)},_tempPreventNavigation:function(e){e.on(B+x+C,function(t){t.preventDefault(),e.off(B+x+C)})},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,n=y(e._fieldAccessor,e);t.template&&typeof t.template==q?t.template=v(t.template):t.template||(t.template=i("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e._checkboxes(),e.templates={setAttributes:function(e){var t,n="",i=e.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(n+=t+'="'+i[t]+'" ');return n},wrapperCssClass:function(e,t){var n="k-item",i=t.index;return e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},cssClass:function(e,t){var n="",i=t.index,r=e.length-1;return e.firstLevel&&0===i&&(n+="k-top "),n+=0===i&&i!=r?"k-top":i==r?"k-bot":"k-mid"},textClass:function(e,t){var n="k-in";return t&&(n+=" k-link"),e.enabled===!1&&(n+=" k-state-disabled"),e.selected===!0&&(n+=" k-state-selected"),n},toggleButtonClass:function(e){var t="k-icon";return t+=e.expanded!==!0?" k-i-expand":" k-i-collapse"},groupAttributes:function(e){var t="";return e.firstLevel||(t="role='group'"),t+(e.expanded!==!0?" style='display:none'":"")},groupCssClass:function(e){var t="k-group";return e.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:i("#= data.treeview.template(data) #"),group:i("<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"),itemContent:i("# var imageUrl = "+n("imageUrl")+"(data.item); ## var spriteCssClass = "+n("spriteCssClass")+"(data.item); ## if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #'># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #'></span># } ##= data.treeview.template(data) #"),itemElement:i("# var item = data.item, r = data.r; ## var url = "+n("url")+"(item); #<div class='#= r.cssClass(data.group, item) #'># if (item.hasChildren) { #<span class='#= r.toggleButtonClass(item) #'></span># } ## if (data.treeview.checkboxes) { #<span class='k-checkbox-wrapper' role='presentation'>#= data.treeview.checkboxes.template(data) #</span># } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) #</#=tag#></div>"),item:i("# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #'"+f.attr("uid")+'=\'#= item.uid #\' #= r.setAttributes(item.toJSON ? item.toJSON() : item) # # if (data.treeview.checkboxes) { #aria-checked=\'#= item.checked ? "true" : "false" #\' # } #aria-selected=\'#= item.selected ? "true" : "false" #\' #=item.enabled === false ? "aria-disabled=\'true\'" : \'\'#aria-expanded=\'#= item.expanded ? "true" : "false" #\' data-expanded=\'#= item.expanded ? "true" : "false" #\' >#= r.itemElement(data) #</li>'),loading:i("<div class='k-icon k-i-loading'></div> #: data.messages.loading #"),retry:i("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>")}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(t){var n=this.options;n.dataSource=t,this._dataSourceUids={},this._dataSource(),n.checkboxes&&n.checkboxes.checkChildren&&this.dataSource.one("change",e.proxy(this.updateIndeterminate,this,null)),this.options.autoBind&&this.dataSource.fetch()},_bindDataSource:function(){this._refreshHandler=y(this.refresh,this),this._errorHandler=y(this._error,this),this.dataSource.bind(F,this._refreshHandler),this.dataSource.bind(E,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(F,this._refreshHandler),e.unbind(E,this._errorHandler))},_dataSource:function(e){function t(e){for(var n=0;n<e.length;n++)e[n]._initChildren(),e[n].children.fetch(),t(e[n].children.view())}var n=this,i=n.options,r=i.dataSource;r=_(r)?{data:r}:r,n._unbindDataSource(),r.fields||(r.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),n.dataSource=r=k.create(r),e&&(r.fetch(),t(r.view())),n._bindDataSource()},events:[P,H,R,O,M,D,N,T,F,I,S],options:{name:"TreeView",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:100}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},dragAndDrop:!1,checkboxes:!1,autoBind:!0,autoScroll:!1,loadOnDemand:!0,template:"",dataTextField:null},_accessors:function(){var e,t,n,i=this,r=i.options,o=i.element;for(e in X)t=r[X[e]],n=o.attr(f.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),_(t)||(t=[t]),r[X[e]]=t},_fieldAccessor:function(t){var n=this.options[X[t]],i=n.length,r="(function(item) {";return 0===i?r+="return item['"+t+"'];":(r+="var levels = ["+e.map(n,function(e){return"function(d){ return "+f.expr(e)+"}"}).join(",")+"];",r+="return levels[Math.min(item.level(), "+i+"-1)](item)"),r+="})"},setOptions:function(e){b.fn.setOptions.call(this,e),this._animation(),this._dragging(),this._templates()},_trigger:function(e,t){return this.trigger(e,{node:t.closest(j)[0]})},_setChecked:function(t,n){if(t&&e.isFunction(t.view))for(var i=0,r=t.view();i<r.length;i++)r[i].enabled!==!1&&this._setCheckedValue(r[i],n),r[i].children&&this._setChecked(r[i].children,n)},_setCheckedValue:function(e,t){e[A]=t},_setIndeterminate:function(e){var t,n,i,o=d(e),a=!0;if(o.length&&(t=r(o.children()),n=t.length)){if(n>1){for(i=1;i<n;i++)if(t[i].checked!=t[i-1].checked||t[i].indeterminate||t[i-1].indeterminate){a=!1;break}}else a=!t[0].indeterminate;return e.attr(G,a?t[0].checked:"mixed"),r(e).data(z,!a).prop(z,!a).prop(A,a&&t[0].checked)}},updateIndeterminate:function(e){var t,n,i,r;if(e=e||this.wrapper,t=d(e).children(),t.length){for(n=0;n<t.length;n++)this.updateIndeterminate(t.eq(n));if(e.is(".k-treeview"))return;i=this._setIndeterminate(e),r=this.dataItem(e),i&&i.prop(A)?r.checked=!0:r&&delete r.checked}},_bubbleIndeterminate:function(e,t){if(e.length){t||this.updateIndeterminate(e);var n,i=this.parent(e);i.length&&(this._setIndeterminate(i),n=i.children("div").find(".k-checkbox-wrapper input[type=checkbox]"),this._skip=!0,n.prop(z)===!1?this.dataItem(i).set(A,n.prop(A)):this.dataItem(i).set(A,!1),this._skip=!1,this._bubbleIndeterminate(i,!0))}},_checkboxChange:function(t){var n=this,i=e(t.target),r=i.prop(A),o=i.closest(j),a=this.dataItem(o);this._preventChange||(a.checked!=r&&(a.set(A,r),o.attr(G,r),this._trigger(S,o)),i.is(":focus")&&(n._trigger(I,o),n.focus()))},_toggleButtonClick:function(t){var n=e(t.currentTarget).closest(j);n.is("[aria-disabled='true']")||this.toggle(n)},_mousedown:function(t){var n=this,i=e(t.currentTarget),r=e(t.currentTarget).closest(j),o=f.support.browser;r.is("[aria-disabled='true']")||((o.msie||o.edge)&&i.is(":checkbox")&&(i.prop(z)?(n._preventChange=!1,i.prop(A,!i.prop(A)),i.trigger(F),i.on(B+x,function(e){e.preventDefault()}),n._preventChange=!0):(i.off(B+x),n._preventChange=!1)),n._clickTarget=r,n.current(r))},_focusable:function(e){return e&&e.length&&e.is(":visible")&&!e.find(".k-in:first").hasClass(Q)},_focus:function(){var t=this.select(),n=this._clickTarget;f.support.touch||(n&&n.length&&(t=n),this._focusable(t)||(t=this.current()),this._focusable(t)||(t=this._nextVisible(e())),this.current(t))},focus:function(){var e,t=this.wrapper,n=t[0],i=[],r=[],o=document.documentElement;do n=n.parentNode,n.scrollHeight>n.clientHeight&&(i.push(n),r.push(n.scrollTop));while(n!=o);for(f.focusElement(t),e=0;e<i.length;e++)i[e].scrollTop=r[e]},_blur:function(){this.current().find(".k-in:first").removeClass("k-state-focused")},_enabled:function(e){return!e.children("div").children(".k-in").hasClass(Q)},parent:function(t){var n,i,r=/\bk-treeview\b/,o=/\bk-item\b/;typeof t==q&&(t=this.element.find(t)),Z(t)||(t=t[0]),i=o.test(t.className);do t=t.parentNode,o.test(t.className)&&(i?n=t:i=!0);while(!r.test(t.className)&&!n);return e(n)},_nextVisible:function(e){function t(e){for(;e.length&&!e.next().length;)e=i.parent(e);return e.next().length?e.next():e}var n,i=this,r=i._expanded(e);return e.length&&e.is(":visible")?r?(n=d(e).children().first(),n.length||(n=t(e))):n=t(e):n=i.root.children().eq(0),n},_previousVisible:function(e){var t,n,i=this;if(!e.length||e.prev().length)for(n=e.length?e.prev():i.root.children().last();i._expanded(n)&&(t=d(n).children().last(),t.length);)n=t;else n=i.parent(e)||e;return n},_keydown:function(n){var i,r=this,o=n.keyCode,a=r.current(),s=r._expanded(a),l=a.find(".k-checkbox-wrapper:first :checkbox"),d=f.support.isRtl(r.element);n.target==n.currentTarget&&(!d&&o==w.RIGHT||d&&o==w.LEFT?s?i=r._nextVisible(a):a.find(".k-in:first").hasClass(Q)||r.expand(a):!d&&o==w.LEFT||d&&o==w.RIGHT?s&&!a.find(".k-in:first").hasClass(Q)?r.collapse(a):(i=r.parent(a),r._enabled(i)||(i=t)):o==w.DOWN?i=r._nextVisible(a):o==w.UP?i=r._previousVisible(a):o==w.HOME?i=r._nextVisible(e()):o==w.END?i=r._previousVisible(e()):o!=w.ENTER||a.find(".k-in:first").hasClass(Q)?o==w.SPACEBAR&&l.length&&(a.find(".k-in:first").hasClass(Q)||(l.prop(A,!l.prop(A)).data(z,!1).prop(z,!1),r._checkboxChange({target:l})),i=a):a.find(".k-in:first").hasClass("k-state-selected")||r._trigger(T,a)||r.select(a),i&&(n.preventDefault(),a[0]!=i[0]&&(r._trigger(I,i),r.current(i))))},_keypress:function(e){var t,n=this,i=300,r=n.current().get(0),o=e.key,a=1===o.length;a&&(n._match||(n._match=""),n._match+=o,clearTimeout(n._matchTimer),n._matchTimer=setTimeout(function(){n._match=""},i),t=r&&n._matchNextByText(Array.prototype.indexOf.call(n.element.find(".k-item"),r),n._match),t.length||(t=n._matchNextByText(-1,n._match)),t.get(0)&&t.get(0)!==r&&(n._trigger(I,t),n.current(t)))},_matchNextByText:function(t,n){var i=this.element,r=i.find(".k-in").filter(function(i,r){return i>t&&e(r).is(":visible")&&0===e(r).text().toLowerCase().indexOf(n)});return r.eq(0).closest(j)},_click:function(t){var n,i=this,r=e(t.currentTarget),o=c(r.closest(j)),a=r.attr("href");n=a?"#"==a||a.indexOf("#"+this.element.id+"-")>=0:o.length&&!o.children().length,n&&t.preventDefault(),r.hasClass(".k-state-selected")||i._trigger(T,r)||i.select(r)},_wrapper:function(){var e,t,n=this,i=n.element,r="k-widget k-treeview";i.is("ul")?(e=i.wrap("<div />").parent(),t=i):(e=i,t=e.children("ul").eq(0)),n.wrapper=e.addClass(r),n.root=t},_getSelectedNode:function(){return this.element.find(".k-state-selected").closest(j)},_group:function(e){var t=this,n=e.hasClass(U),i={firstLevel:n,expanded:n||t._expanded(e)},r=e.children("ul");r.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),n||r.attr("role","group"),t._nodes(r,i)},_nodes:function(t,n){var i,r=this,o=t.children("li");n=g({length:o.length},n),o.each(function(t,o){o=e(o),i={index:t,expanded:r._expanded(o)},s(o),r._updateNodeClasses(o,n,i),r._group(o)})},_checkboxes:function(){var e,t=this.options,n=t.checkboxes;n&&(e="<input type='checkbox' tabindex='-1' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #",n.name&&(e+=" name='"+n.name+"'"),e+=" id='_#= item.uid #' class='k-checkbox' /><span class='k-checkbox-label checkbox-span'></span>",n=g({template:e},t.checkboxes),typeof n.template==q&&(n.template=v(n.template)),t.checkboxes=n)},_updateNodeClasses:function(e,t,n){var i,r,o=e.children("div"),a=e.children("ul"),s=this.templates;e.hasClass("k-treeview")||(n=n||{},n.expanded=typeof n.expanded!=L?n.expanded:this._expanded(e),n.index=typeof n.index!=L?n.index:e.index(),n.enabled=typeof n.enabled!=L?n.enabled:!o.children(".k-in").hasClass("k-state-disabled"),t=t||{},t.firstLevel=typeof t.firstLevel!=L?t.firstLevel:e.parent().parent().hasClass(U),t.length=typeof t.length!=L?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(s.wrapperCssClass(t,n)),o.removeClass("k-top k-mid k-bot").addClass(s.cssClass(t,n)),i=o.children(".k-in"),r=i[0]&&"a"==i[0].nodeName.toLowerCase(),i.removeClass("k-in k-link k-state-default k-state-disabled").addClass(s.textClass(n,r)),(a.length||"true"==e.attr("data-hasChildren"))&&(o.children(".k-icon").removeClass("k-i-expand k-i-collapse").addClass(s.toggleButtonClass(n)),a.addClass("k-group")))},_processNodes:function(t,n){var i,r=this,o=r.element.find(t);for(i=0;i<o.length;i++)n.call(r,i,e(o[i]).closest(j))},dataItem:function(t){var n=e(t).closest(j).attr(f.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},_dataItem:function(t){var n=e(t).closest(j).attr(f.attr("uid")),i=this.dataSource;return i&&this._dataSourceUids[n]},_insertNode:function(t,n,i,r,o){var a,l,c,u,p,h,m=this,g=d(i),v=g.children().length+1,_={firstLevel:i.hasClass(U),expanded:!o,length:v},b="",k=function(e,t){e.appendTo(t)};for(c=0;c<t.length;c++)u=t[c],u.index=n+c,b+=m._renderItem({group:_,item:u});if(l=e(b),l.length){for(m.angular("compile",function(){return{elements:l.get(),data:t.map(function(e){return{dataItem:e}})}}),g.length||(g=e(m._renderGroup({group:_})).appendTo(i)),r(l,g),i.hasClass("k-item")&&(s(i),m._updateNodeClasses(i,_,{expanded:!o})),p=l.prev().first(),h=l.next().last(),m._updateNodeClasses(p,{},{expanded:"true"==p.attr(f.attr("expanded"))}),m._updateNodeClasses(h,{},{expanded:"true"==h.attr(f.attr("expanded"))}),c=0;c<t.length;c++)u=t[c],u.hasChildren&&(a=u.children.data(),a.length&&m._insertNode(a,u.index,l.eq(c),k,!u.expanded));return l}},_updateNodes:function(t,n){function i(e,t){e.is(".k-group")&&e.find(".k-item:not([aria-disabled])").attr(G,t),e.find(".k-checkbox-wrapper input[type=checkbox]:not([disabled])").prop(A,t).data(z,!1).prop(z,!1)}var r,o,a,s,l,d,u,p=this,f={treeview:p.options,item:s},m="expanded"!=n&&"checked"!=n;if("selected"==n)s=t[0],o=p.findByUid(s.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected",s[n]).end(),s[n]&&p.current(o),o.attr($,!!s[n]);else{for(u=e.map(t,function(e){return p.findByUid(e.uid).children("div")}),m&&p.angular("cleanup",function(){return{elements:u}}),r=0;r<t.length;r++)f.item=s=t[r],a=u[r],o=a.parent(),m&&a.children(".k-in").html(p.templates.itemContent(f)),n==A?(l=s[n],i(a,l),o.attr(G,l),p.options.checkboxes.checkChildren&&(i(o.children(".k-group"),l),p._setChecked(s.children,l),p._bubbleIndeterminate(o))):"expanded"==n?p._toggle(o,s,s[n]):"enabled"==n&&(o.find(".k-checkbox-wrapper input[type=checkbox]").prop("disabled",!s[n]),d=!c(o).is(W),o.removeAttr(K),s[n]||(s.selected&&s.set("selected",!1),s.expanded&&s.set("expanded",!1),d=!0,o.attr($,!1).attr(K,!0)),p._updateNodeClasses(o,{},{enabled:s[n],expanded:!d})),a.length&&(s._events&&s._events.change&&s._events.change.splice(1),this.trigger("itemChange",{item:a,data:s,ns:h}));m&&p.angular("compile",function(){return{elements:u,data:e.map(t,function(e){return[{dataItem:e}]})}})}},_appendItems:function(e,t,n){var i,r,o,a=d(n),s=a.children(),l=!this._expanded(n);this.element===n?(i=this.dataSource.data(),r=this.dataSource.view(),o=r.length<i.length?r:i,e=o.indexOf(t[0])):t.length&&(e=t[0].parent().indexOf(t[0])),typeof e==L&&(e=s.length),this._insertNode(t,e,n,function(t,n){e>=s.length?t.appendTo(n):t.insertBefore(s.eq(e))},l),l||(this._updateNodeClasses(n,{},{expanded:!l}),d(n).css("display","block"))},_refreshChildren:function(e,t,n){var i,r,o,a=this.options,l=a.loadOnDemand,c=a.checkboxes&&a.checkboxes.checkChildren;if(d(e).empty(),t.length)for(this._appendItems(n,t,e),r=d(e).children(),l&&c&&this._bubbleIndeterminate(r.last()),i=0;i<r.length;i++)o=r.eq(i),this.trigger("itemChange",{item:o.children("div"),data:t[i],ns:h});else s(e)},_refreshRoot:function(t){var n,i,r,o=this._renderGroup({items:t,group:{firstLevel:!0,expanded:!0}});for(this.root.length&&this.root[0].parentElement?(this._angularItems("cleanup"),n=e(o),this.root.attr("class",n.attr("class")).html(n.html())):this.root=this.wrapper.html(o).children("ul"),i=this.root.children(".k-item"),r=0;r<t.length;r++)this.trigger("itemChange",{item:i.eq(r),data:t[r],ns:h});this._angularItems("compile")},refresh:function(e){var n,i,r=e.node,o=e.action,a=e.items,s=this.wrapper,l=this.options,d=l.loadOnDemand,c=l.checkboxes&&l.checkboxes.checkChildren;if(!this._skip){for(n=0;n<a.length;n++)this._dataSourceUids[a[n].uid]=a[n];if(e.field){if(!a[0]||!a[0].level)return;return this._updateNodes(a,e.field)}if(r&&(s=this.findByUid(r.uid),this._progress(s,!1)),c&&"remove"!=o){for(i=!1,n=0;n<a.length;n++)if("checked"in a[n]){i=!0;break}if(!i&&r&&r.checked)for(n=0;n<a.length;n++)a[n].checked=!0}if("add"==o?this._appendItems(e.index,a,s):"remove"==o?this._remove(this.findByUid(a[0].uid),!1):"itemchange"==o?this._updateNodes(a):"itemloaded"==o?this._refreshChildren(s,a,e.index):this._refreshRoot(a),"remove"!=o)for(n=0;n<a.length;n++)(!d||a[n].expanded||a[n]._loaded)&&a[n].load();this.trigger(M,{node:r?s:t}),this.dataSource.filter()&&this.options.checkboxes.checkChildren&&this.updateIndeterminate(s)}},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),n=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),u(t).addClass("k-i-reload"),e.node.loaded(!1)):(this._progress(!1),this.dataSource.data([]),this.element.html(n))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch()},expand:function(e){this._processNodes(e,function(e,t){this.toggle(t,!0)})},collapse:function(e){this._processNodes(e,function(e,t){this.toggle(t,!1)})},enable:function(e,t){"boolean"==typeof e?(t=e,e=this.items()):t=2!=arguments.length||!!t,this._processNodes(e,function(e,n){this.dataItem(n).set("enabled",t)})},current:function(n){var i=this,r=i._current,o=i.element,a=i._ariaId;return arguments.length>0&&n&&n.length?(r&&(r[0].id===a&&r.removeAttr("id"),r.find(".k-in:first").removeClass("k-state-focused")),r=i._current=e(n,o).closest(j),r.find(".k-in:first").addClass("k-state-focused"),a=r[0].id||a,a&&(i.wrapper.removeAttr("aria-activedescendant"),r.attr("id",a),i.wrapper.attr("aria-activedescendant",a)),t):(r||(r=i._nextVisible(e())),r)},select:function(n){var i=this,r=i.element;return arguments.length?(n=e(n,r).closest(j),r.find(".k-state-selected").each(function(){var t=i.dataItem(this);t?(t.set("selected",!1),delete t.selected):e(this).removeClass("k-state-selected")}),n.length&&(i.dataItem(n).set("selected",!0),i._clickTarget=n),i.trigger(F),t):r.find(".k-state-selected").closest(j)},_toggle:function(e,t,n){var i,r=this.options,o=c(e),a=n?"expand":"collapse";o.data("animating")||(i=t&&t.loaded(),n&&!i?(r.loadOnDemand&&this._progress(e,!0),o.remove(),t.load()):(this._updateNodeClasses(e,{},{expanded:n}),n||o.css("height",o.height()).css("height"),o.kendoStop(!0,!0).kendoAnimate(g({reset:!0},r.animation[a],{complete:function(){n&&o.css("height","")}}))))},toggle:function(t,n){t=e(t),u(t).is(".k-i-expand, .k-i-collapse")&&(1==arguments.length&&(n=!this._expanded(t)),this._expanded(t,n))},destroy:function(){var e=this;b.fn.destroy.call(e),e.wrapper.off(x),e.wrapper.find(".k-checkbox-wrapper :checkbox").off(x),e._unbindDataSource(),e.dragging&&e.dragging.destroy(),e._dataSourceUids={},f.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,n,i){var r,o=f.attr("expanded"),a=n,s=a?"expand":"collapse";return 1==arguments.length?(r=this._dataItem(e),"true"===e.attr(o)||r&&r.expanded):(r=this.dataItem(e),c(e).data("animating")||!i&&this._trigger(s,e)||(a?(e.attr(o,"true"),e.attr(Y,"true")):(e.removeAttr(o),e.attr(Y,"false")),r&&(r.set("expanded",a),a=r.expanded)),t)},_progress:function(e,t){var n=this.element,i=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?n.html(i):n.empty()):u(e).toggleClass("k-i-loading",t).removeClass("k-i-reload")},text:function(e,n){var i=this.dataItem(e),r=this.options[X.text],o=i.level(),a=r.length,s=r[Math.min(o,a-1)];return n?(i.set(s,n),t):i[s]},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,n,i,r){var o,a=this._objectOrSelf(i||n),s=a.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=a.element[0]&&(o=a.dataItem(i),o.loaded()||(a._progress(i,!0),l=o.load()),i!=this.root&&(s=o.children,s&&s instanceof k||(o._initChildren(),o.loaded(!0),s=o.children))),t=this._toObservableData(t),r.call(a,s,t,l)},_toObservableData:function(t){var n,i,r=t;return(J(t)||Z(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(f.attr("uid")),r=n.getByUid(i),r&&(r=n.remove(r))),r},_insert:function(e,t,n){t instanceof f.data.ObservableArray?t=t.toJSON():_(t)||(t=[t]);var i=e.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),e.splice.apply(e,[n,0].concat(t)),this.findByUid(e[n].uid)},insertAfter:o(1),insertBefore:o(0),append:function(t,n,i){var r=this.root;if(!(n&&t instanceof jQuery&&n[0]===t[0]))return n=n&&n.length?n:null,n&&(r=d(n)),this._dataSourceMove(t,r,n,function(t,r,o){function a(){n&&l._expanded(n,!0,!0);var e=t.data(),i=Math.max(e.length,0);return l._insert(e,r,i)}var s,l=this;return o.done(function(){s=a(),(i=i||e.noop)(s)}),s||null})},_remove:function(t,n){var i,r,o,a=this;return t=e(t,a.element),this.angular("cleanup",function(){return{elements:t.get()}}),i=t.parent().parent(),r=t.prev(),o=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(s(i),a._updateNodeClasses(i)),a._updateNodeClasses(r),a._updateNodeClasses(o),t},remove:function(e){var t=this.dataItem(e);t&&this.dataSource.remove(t)},detach:function(e){return this._remove(e,!0)},findByText:function(t){return e(this.element).find(".k-in").filter(function(n,i){return e(i).text()==t}).closest(j)},findByUid:function(t){var n,i,r=this.element.find(".k-item"),o=f.attr("uid");for(i=0;i<r.length;i++)if(r[i].getAttribute(o)==t){n=r[i];break}return e(n)},expandPath:function(t,n){function i(){a.shift(),a.length?r(a[0]).then(i):s.call(o)}function r(t){var n,i=e.Deferred(),r=o.dataSource.get(t),a=f.attr("expanded");return r?(n=o.findByUid(r.uid),r.loaded()?(r.set("expanded",!0),n.attr(a,!0),n.attr(Y,!0),i.resolve()):(o._progress(n,!0),r.load().then(function(){r.set("expanded",!0),n.attr(a,!0),n.attr(Y,!0),i.resolve()}))):i.resolve(),i.promise()}var o=this,a=t.slice(0),s=n||e.noop;r(a[0]).then(i)},_parentIds:function(e){for(var t=e&&e.parentNode(),n=[];t&&t.parentNode;)n.unshift(t.id),t=t.parentNode();return n},expandTo:function(e){e instanceof f.data.Node||(e=this.dataSource.get(e));var t=this._parentIds(e);this.expandPath(t)},_renderItem:function(e){return e.group||(e.group={}),e.treeview=this.options,e.r=this.templates,this.templates.item(e)},_renderGroup:function(e){var t=this;return e.renderItems=function(e){var n="",i=0,r=e.items,o=r?r.length:0,a=e.group;for(a.length=o;i<o;i++)e.group=a,e.item=r[i],e.item.index=i,n+=t._renderItem(e);return n},e.r=t.templates,t.templates.group(e)}}),h.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.touch.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,o=Math.abs,a=20,s=i.extend({init:function(e,t){function o(e){return function(t){s._triggerTouch(e,t)}}function a(e){return function(t){s.trigger(e,{touches:t.touches,distance:t.distance,center:t.center,event:t.event})}}var s=this;i.fn.init.call(s,e,t),t=s.options,e=s.element,s.wrapper=e,s.events=new n.UserEvents(e,{filter:t.filter,surface:t.surface,minHold:t.minHold,multiTouch:t.multiTouch,allowSelection:!0,fastTap:t.fastTap,press:o("touchstart"),hold:o("hold"),tap:r(s,"_tap"),gesturestart:a("gesturestart"),gesturechange:a("gesturechange"),gestureend:a("gestureend")}),t.enableSwipe?(s.events.bind("start",r(s,"_swipestart")),s.events.bind("move",r(s,"_swipemove"))):(s.events.bind("start",r(s,"_dragstart")),s.events.bind("move",o("drag")),s.events.bind("end",o("dragend"))),n.notify(s)},events:["touchstart","dragstart","drag","dragend","tap","doubletap","hold","swipe","gesturestart","gesturechange","gestureend"],options:{name:"Touch",surface:null,global:!1,fastTap:!1,filter:null,multiTouch:!1,enableSwipe:!1,minXDelta:30,maxYDelta:20,maxDuration:1e3,minHold:800,doubleTapTimeout:800},cancel:function(){this.events.cancel()},destroy:function(){i.fn.destroy.call(this),this.events.destroy()},_triggerTouch:function(e,t){this.trigger(e,{touch:t.touch,event:t.event})&&t.preventDefault()},_tap:function(e){var t=this,i=t.lastTap,r=e.touch;i&&r.endTime-i.endTime<t.options.doubleTapTimeout&&n.touchDelta(r,i).distance<a?(t._triggerTouch("doubletap",e),t.lastTap=null):(t._triggerTouch("tap",e),t.lastTap=r)},_dragstart:function(e){this._triggerTouch("dragstart",e)},_swipestart:function(e){2*o(e.x.velocity)>=o(e.y.velocity)&&e.sender.capture()},_swipemove:function(e){var t=this,n=t.options,i=e.touch,r=e.event.timeStamp-i.startTime,a=i.x.initialDelta>0?"right":"left";o(i.x.initialDelta)>=n.minXDelta&&o(i.y.initialDelta)<n.maxYDelta&&r<n.maxDuration&&(t.trigger("swipe",{direction:a,touch:e.touch}),i.cancel())}});n.ui.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
|
36
|
-
|
37
|
-
/* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM AB29E07F6D571EA2BA1027EE9CBE152A */
|