(.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}});f(i,{Command:h,GenericCommand:g,InsertHtmlCommand:m,InsertHtmlTool:v,UndoRedoStack:_,TypingHandler:b,SystemHandler:y,Keyboard:w,Clipboard:x,Cleaner:k,MSWordFormatCleaner:C,WebkitFormatCleaner:T}),o("insertHtml",new v({template:new c({template:r.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery),function(e){function t(e){return e.collapsed&&!u.isExpandable(e)}var n=window.kendo,i=n.Class,r=n.ui.editor,o=n.ui.Editor.fn.options.formats,a=r.EditorUtils,s=r.Tool,l=r.ToolTemplate,d=r.FormatTool,c=r.Dom,u=r.RangeUtils,p=e.extend,f=r.EditorUtils.registerTool,h=r.EditorUtils.registerFormat,g="k-marker",m=i.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){return!t&&this.numberOfSiblings(e)>0?null:c.parentOfType(e,this.format[0].tags)},findFormat:function(e){var t,n,i,r,o,a=this.format,s=c.attrEquals;for(t=0,n=a.length;n>t;t++){if(i=e,r=a[t].tags,o=a[t].attr,i&&c.ofType(i,r)&&s(i,o))return i;for(;i;)if(i=c.parentOfType(i,r),i&&s(i,o))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;n>t;t++)if(this.findFormat(e[t]))return!0;return!1}}),v=i.extend({init:function(e,t){var n=this;n.finder=new m(e),n.attributes=p({},e[0].attr,t),n.tag=e[0].tags[0]},wrap:function(e){return c.wrap(e,c.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){var n=this;n.finder.isFormatted(t)?(n.split(e),n.remove(t)):n.apply(t)},toggle:function(e){var t=u.textNodes(e);t.length>0&&this.activate(e,t)},apply:function(e){var t,n,i,r,o=this,a=[];for(t=0,n=e.length;n>t;t++)i=e[t],r=o.finder.findSuitable(i),r?c.attr(r,o.attributes):r=o.wrap(i),a.push(r);o.consolidate(a)},remove:function(e){var t,n,i,r=this;for(t=0,n=e.length;n>t;t++)i=r.finder.findFormat(e[t]),i&&(r.attributes&&r.attributes.style?(c.unstyle(i,r.attributes.style),i.style.cssText||i.attributes["class"]||c.unwrap(i)):c.unwrap(i))},split:function(e){var t,n,i=u.textNodes(e),r=i.length;if(r>0)for(t=0;r>t;t++)n=this.finder.findFormat(i[t]),n&&u.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){for(;t.firstChild;)n.appendChild(t.firstChild);c.remove(t)}}}),_=m.extend({init:function(e,t){var n=this;n.format=e,n.greedyProperty=t,m.fn.init.call(n,e)},getInlineCssValue:function(t){var n,i,r,o,a,s,l,d,u,p,f,h,g=t.attributes,m=e.trim;if(g)for(n=0,i=g.length;i>n;n++)if(r=g[n],o=r.nodeName,a=r.nodeValue,r.specified&&"style"==o)for(s=m(a||t.style.cssText).split(";"),d=0,u=s.length;u>d;d++)if(l=s[d],l.length){if(p=l.split(":"),f=m(p[0].toLowerCase()),h=m(p[1]),f!=this.greedyProperty)continue;return f.indexOf("color")>=0?c.toHex(h):h}},getFormatInner:function(t){var n,i,r,o=e(c.isDataNode(t)?t.parentNode:t),a=o.parents().andSelf();for(n=0,i=a.length;i>n;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;n>t;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),b=v.extend({init:function(e,t,n){var i=this;v.fn.init.call(i,e,t),i.greedyProperty=n,i.values=t,i.finder=new _(e,n)},activate:function(e,t){var n,i=this,r=i.greedyProperty,o="apply";i.split(e),r&&(n=r.replace(/-([a-z])/,function(e,t){return t.toUpperCase()}),"inherit"==i.values.style[n]&&(o="remove")),i[o](t)}}),y=d.extend({init:function(e){d.fn.init.call(this,p(e,{finder:new m(e.format),formatter:function(){return new v(e.format)}})),this.willDelayExecution=t}}),w=s.extend({willDelayExecution:t,update:function(e,t,n){var i,r=e.data(this.type),o=n.getPending(this.name);i=o&&o.options.params?o.options.params.value:this.finder.getFormat(t),r.close(),r.value(i)}}),x=w.extend({init:function(e){var t=this;s.fn.init.call(t,e),t.type=n.support.browser.msie||n.support.touch?"kendoDropDownList":"kendoComboBox",t.format=[{tags:["span"]}],t.finder=new _(t.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,i={};return new r.FormatCommand(p(e,{formatter:function(){return i[t.domAttr]=e.value,new b(n,{style:i},t.cssAttr)}}))},initialize:function(e,t){var n,i=t.editor,r=this.options,o=r.name,a=[];r.defaultValue&&(a=[{text:i.options.messages[r.defaultValue[0].text],value:r.defaultValue[0].value}]),n=a.concat(r.items?r.items:i.options[o]),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){s.exec(i,o,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+o).find("*").andSelf().attr("unselectable","on"),e.data(this.type).value("inherit")}}),k=s.extend({init:function(e){s.fn.init.call(this,e),this.format=[{tags:["span"]}]},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,i={};return new r.FormatCommand(p(e,{formatter:function(){return i[t.domAttr]=e.value,new b(n,{style:i},t.cssAttr)}}))},willDelayExecution:t,initialize:function(t,i){var r=i.editor,o=this.name,a=p({},k.fn.options,this.options),l=a.palette;t=this._widget=new n.ui.ColorPicker(t,{value:e.isArray(l)?l[0]:"#000",toolIcon:"k-"+a.name,palette:l,change:function(){var e=t.value();e&&s.exec(r,o,e)}}),t.bind("activate",function(e){e.preventDefault(),t.trigger("change"),r.focus()}),t.wrapper.attr({title:i.title,unselectable:"on"}).find("*").attr("unselectable","on")}}),C=w.extend({init:function(e){var t=this;s.fn.init.call(t,e),t.type="kendoSelectBox",t.format=[{tags:["span"]}],t.finder=new _(t.format,"className")},command:function(e){var t=this.format;return new r.FormatCommand(p(e,{formatter:function(){return new b(t,{className:e.value})}}))},initialize:function(e,t){var n=t.editor,i=this.options;new r.SelectBox(e,{dataTextField:"text",dataValueField:"value",dataSource:i.items||n.options.style,title:n.options.messages.style,change:function(){s.exec(n,"style",this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+this.name).find("*").andSelf().attr("unselectable","on")}});p(r,{InlineFormatFinder:m,InlineFormatter:v,GreedyInlineFormatFinder:_,GreedyInlineFormatter:b,InlineFormatTool:y,FontTool:x,ColorTool:k,StyleTool:C}),f("style",new r.StyleTool({template:new l({template:a.dropDownListTemplate,title:"Styles"})})),h("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),f("bold",new y({key:"B",ctrl:!0,format:o.bold,template:new l({template:a.buttonTemplate,title:"Bold"})})),h("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),f("italic",new y({key:"I",ctrl:!0,format:o.italic,template:new l({template:a.buttonTemplate,title:"Italic"})})),h("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),f("underline",new y({key:"U",ctrl:!0,format:o.underline,template:new l({template:a.buttonTemplate,title:"Underline"})})),h("strikethrough",[{tags:["del"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),f("strikethrough",new y({format:o.strikethrough,template:new l({template:a.buttonTemplate,title:"Strikethrough"})})),h("superscript",[{tags:["sup"]}]),f("superscript",new y({format:o.superscript,template:new l({template:a.buttonTemplate,title:"Superscript"})})),h("subscript",[{tags:["sub"]}]),f("subscript",new y({format:o.subscript,template:new l({template:a.buttonTemplate,title:"Subscript"})})),f("foreColor",new k({cssAttr:"color",domAttr:"color",name:"foreColor",template:new l({template:a.colorPickerTemplate,title:"Color"})})),f("backColor",new k({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new l({template:a.colorPickerTemplate,title:"Background Color"})})),f("fontName",new x({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new l({template:a.comboBoxTemplate,title:"Font Name"})})),f("fontSize",new x({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new l({template:a.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,o=t.ui.Editor.fn.options.formats,a=r.Dom,s=r.Command,l=r.Tool,d=r.ToolTemplate,c=r.FormatTool,u=r.EditorUtils,p=u.registerTool,f=u.registerFormat,h=r.RangeUtils,g=n.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,r;for(n=0,i=t.length;i>n;n++)if(r=t[n],!r||!a.isAncestorOrSelf(e,r))return!1;return!0},findSuitable:function(t){var n,i,r,o=this.format,s=[];for(n=0,i=t.length;i>n;n++){if(r=a.ofType(t[n],o[0].tags)?t[n]:a.parentOfType(t[n],o[0].tags),!r)return[];0>e.inArray(r,s)&&s.push(r)}for(n=0,i=s.length;i>n;n++)if(this.contains(s[n],s))return[s[n]];return s},findFormat:function(e){var t,n,i,r,o,s=this.format;for(t=0,n=s.length;n>t;t++)for(i=e,r=s[t].tags,o=s[t].attr;i;){if(a.ofType(i,r)&&a.attrEquals(i,o))return i;i=i.parentNode}return null},getFormat:function(e){var t,n,i=this,r=function(e){return i.findFormat(a.isDataNode(e)?e.parentNode:e)},o=r(e[0]);if(!o)return"";for(t=1,n=e.length;n>t;t++)if(o!=r(e[t]))return"";return o.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;n>t;t++)if(!this.findFormat(e[t]))return!1;return!0}}),m=n.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new g(e)},wrap:function(e,t,n){var i,r,o,s,l,d=1==n.length?a.blockParentOrBody(n[0]):a.commonAncestor.apply(null,n);for(a.isInline(d)&&(d=a.blockParentOrBody(d)),o=a.significantChildNodes(d),s=a.findNodeIndex(o[0]),l=a.create(d.ownerDocument,e,t),i=0;o.length>i;i++)r=o[i],a.isBlock(r)?(a.attr(r,t),l.childNodes.length&&(a.insertBefore(l,r),l=l.cloneNode(!1)),s=a.findNodeIndex(r)+1):l.appendChild(r);l.firstChild&&a.insertAt(d,l,s)},apply:function(e){var t,n,r,o,s=this,l=a.is(e[0],"img")?[e[0]]:s.finder.findSuitable(e),d=l.length?u.formatByName(a.name(l[0]),s.format):s.format[0];if(d)if(t=d.tags[0],n=i({},d.attr,s.values),l.length)for(r=0,o=l.length;o>r;r++)a.attr(l[r],n);else s.wrap(t,n,e)},remove:function(e){var t,n,i,r,o;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(o=a.name(i),"div"!=o||i.getAttribute("class")?(r=u.formatByName(o,this.format),r.attr.style&&a.unstyle(i,r.attr.style),r.attr.className&&a.removeClass(i,r.attr.className)):a.unwrap(i))},toggle:function(e){var t=this,n=h.nodes(e);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),v=n.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new g(e)},apply:function(e){var t,n,i,o,s,l=this.format,d=a.blockParents(e),c=l[0].tags[0];if(d.length)for(t=0,n=d.length;n>t;t++)a.is(d[t],"li")?(i=d[t].parentNode,o=new r.ListFormatter(i.nodeName.toLowerCase(),c),s=this.editor.createRange(),s.selectNode(d[t]),o.toggle(s)):a.changeTag(d[t],c);else new m(l,this.values).apply(e)},toggle:function(e){var t=h.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=h.textNodes(e),t.length||(t=a.significantChildNodes(e.commonAncestorContainer))),this.apply(t)}}),_=s.extend({init:function(e){e.formatter=e.formatter(),s.fn.init.call(this,e)}}),b=c.extend({init:function(e){c.fn.init.call(this,i(e,{finder:new g(e.format),formatter:function(){return new m(e.format)}}))}}),y=l.extend({init:function(e){l.fn.init.call(this,e),this.finder=new g([{tags:a.blockElements}])},command:function(e){return new _(i(e,{formatter:function(){return new v([{tags:[e.value]}],{})}}))},update:function(e,t){var n;n=e.is("select")?e.data("kendoSelectBox"):e.find("select").data("kendoSelectBox"),n.close(),n.value(this.finder.getFormat(t))},initialize:function(e,t){var n=t.editor,i="formatBlock";new r.SelectBox(e,{dataTextField:"text",dataValueField:"value",dataSource:this.options.items?this.options.items:n.options.formatBlock,title:n.options.messages.formatBlock,change:function(){l.exec(n,i,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+i).find("*").andSelf().attr("unselectable","on")}});i(r,{BlockFormatFinder:g,BlockFormatter:m,GreedyBlockFormatter:v,FormatCommand:_,BlockFormatTool:b,FormatBlockTool:y}),p("formatBlock",new y({template:new d({template:u.dropDownListTemplate})})),f("justifyLeft",[{tags:a.blockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left"}}}]),p("justifyLeft",new b({format:o.justifyLeft,template:new d({template:u.buttonTemplate,title:"Justify Left"})})),f("justifyCenter",[{tags:a.blockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto"}}}]),p("justifyCenter",new b({format:o.justifyCenter,template:new d({template:u.buttonTemplate,title:"Justify Center"})})),f("justifyRight",[{tags:a.blockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right"}}}]),p("justifyRight",new b({format:o.justifyRight,template:new d({template:u.buttonTemplate,title:"Justify Right"})})),f("justifyFull",[{tags:a.blockElements,attr:{style:{textAlign:"justify"}}}]),p("justifyFull",new b({format:o.justifyFull,template:new d({template:u.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery),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 t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},exec:function(){function e(e){if(e.firstChild&&r.is(e.firstChild,"br")&&r.remove(e.firstChild),r.isDataNode(e)&&!e.nodeValue&&(e=e.parentNode),e&&!r.is(e,"img")){for(;e.firstChild&&1==e.firstChild.nodeType;)e=e.firstChild;""===e.innerHTML&&(e.innerHTML=v)}}var n,i,o,a,c,u,p,f,h,g=this.getRange(),m=d.documentFromRange(g),v=t.support.browser.msie?"":'
',_="p,h1,h2,h3,h4,h5,h6".split(","),b=r.parentOfType(g.startContainer,_),y=r.parentOfType(g.endContainer,_),w=b&&!y||!b&&y;g.deleteContents(),c=this._insertMarker(m,g),u=r.parentOfType(c,["li"]),p=r.parentOfType(c,"h1,h2,h3,h4,h5,h6".split(",")),u?(f=g.cloneRange(),f.selectNode(u),d.textNodes(f).length||(a=r.create(m,"p"),u.nextSibling&&d.split(f,u.parentNode),r.insertAfter(a,u.parentNode),r.remove(1==u.parentNode.childNodes.length?u.parentNode:u),a.innerHTML=v,o=a)):p&&!c.nextSibling&&(a=r.create(m,"p"),r.insertAfter(a,p),a.innerHTML=v,r.remove(c),o=a),o||(u||p||new s([{tags:["p"]}]).apply([c]),g.selectNode(c),n=r.parentOfType(c,[u?"li":p?r.name(p):"p"]),d.split(g,n,w),i=n.previousSibling,r.is(i,"li")&&i.firstChild&&!r.is(i.firstChild,"br")&&(i=i.firstChild),o=n.nextSibling,r.is(o,"li")&&o.firstChild&&!r.is(o.firstChild,"br")&&(o=o.firstChild),r.remove(n),e(i),e(o),l(i)),l(o),r.is(o,"img")?g.setStartBefore(o):(g.selectNodeContents(o),h=d.textNodes(g)[0],h&&g.selectNodeContents(h)),g.collapse(!0),r.scrollTo(o),d.selectRange(g)}}),p=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},exec:function(){var e,n=this.getRange(),i=r.create(d.documentFromRange(n),"br");n.deleteContents(),n.insertNode(i),l(i.parentNode),t.support.browser.msie||i.nextSibling&&!r.isWhitespace(i.nextSibling)||(e=i.cloneNode(!0),e.setAttribute("_moz_dirty",""),r.insertAfter(e,i)),n.setStartAfter(i),n.collapse(!0),r.scrollTo(i.nextSibling||i),d.selectRange(n)}});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(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;e.length>n;n++)(t=this.findFormat(e[n]))&&o.name(t)==this.tag&&i.push(t);if(1>i.length)return!1;if(i.length!=e.length)return!1;for(n=0;i.length>n&&i[n].parentNode==t.parentNode;n++)if(i[n]!=t)return!1;return!0},findSuitable:function(e){var t=o.parentOfType(e[0],this.tags);return t&&o.name(t)==this.tag?t:null}}),g=n.extend({init:function(e,t){var n=this;n.finder=new h(e),n.tag=e,n.unwrapTag=t},wrap:function(e,t){var n,i,r=o.create(e.ownerDocument,"li");for(n=0;t.length>n;n++)if(i=t[n],o.is(i,"li"))e.appendChild(i);else if(o.is(i,"ul")||o.is(i,"ol"))for(;i.firstChild;)e.appendChild(i.firstChild);else if(o.is(i,"td")){for(;i.firstChild;)r.appendChild(i.firstChild);e.appendChild(r),i.appendChild(e),e=e.cloneNode(!1),r=r.cloneNode(!1)}else r.appendChild(i),o.isBlock(i)&&(e.appendChild(r),o.unwrap(i),r=r.cloneNode(!1));r.firstChild&&e.appendChild(r)},containsAny:function(e,t){for(var n=0;t.length>n;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},split:function(t){var n,i,r,s,l,d,c=p(t);if(c.length)for(n=o.parentOfType(c[0],["li"]),i=o.parentOfType(c[c.length-1],["li"]),t.setStartBefore(n),t.setEndAfter(i),r=0,s=c.length;s>r;r++)l=this.finder.findFormat(c[r]),l&&(d=e(l).parents("ul,ol"),d[0]?a.split(t,d.last()[0],!0):a.split(t,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)}},applyOnSection:function(t,n){function i(){a.push(this)}var r,a,s,l,d,c,u,p=this.tag;for(r=1==n.length?o.parentOfType(n[0],["ul","ol"]):o.commonAncestor.apply(null,n),r||(r=o.parentOfType(n[0],["p","td"])||n[0].ownerDocument.body),o.isInline(r)&&(r=o.blockParentOrBody(r)),a=[],s=this.finder.findSuitable(n),s||(s=new h("ul"==p?"ol":"ul").findSuitable(n)),l=o.significantChildNodes(r),l.length||(l=n),/table|tbody/.test(o.name(r))&&(l=e.map(n,function(e){return o.parentOfType(e,["td"])})),d=0;l.length>d;d++)c=l[d],u=o.name(c),!this.suitable(c,n)||s&&o.isAncestorOrSelf(s,c)||(!s||"ul"!=u&&"ol"!=u?a.push(c):(e.each(c.childNodes,i),o.remove(c)));a.length!=l.length||r==n[0].ownerDocument.body||/table|tbody|tr|td/.test(o.name(r))||(a=[r]),s||(s=o.create(r.ownerDocument,p),o.insertBefore(s,a[0])),this.wrap(s,a),o.is(s,p)||o.changeTag(s,p),this.merge(p,s)},apply:function(e){var t,n,i,r=0,a=[];do i=o.parentOfType(e[r],["td","body"]),t&&i==t?n.push(e[r]):(t&&a.push({section:t,nodes:n}),n=[e[r]],t=i),r++;while(e.length>r);for(a.push({section:t,nodes:n}),r=0;a.length>r;r++)this.applyOnSection(a[r].section,a[r].nodes)},unwrap:function(t){var n,i,r,a,s=t.ownerDocument.createDocumentFragment(),l=this.unwrapTag;for(i=t.firstChild;i;i=i.nextSibling){for(r=o.create(t.ownerDocument,l||"p");i.firstChild;)a=i.firstChild,o.isBlock(a)?(r.firstChild&&(s.appendChild(r),r=o.create(t.ownerDocument,l||"p")),s.appendChild(a)):r.appendChild(a);r.firstChild&&s.appendChild(r)}n=e(t).parents("ul,ol"),n[0]?(o.insertAfter(s,n.last()[0]),n.last().remove()):o.insertAfter(s,t),o.remove(t)},remove:function(e){var t,n,i;for(n=0,i=e.length;i>n;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))),n.finder.isFormatted(i)?(n.split(e),n.remove(i)):n.apply(i)}}),m=l.extend({init:function(e){e.formatter=new g(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 m(i(e,{tag:this.options.tag}))}});i(r,{ListFormatFinder:h,ListFormatter:g,ListCommand:m,ListTool:v}),f("insertUnorderedList",new v({tag:"ul",template:new d({template:s.buttonTemplate,title:"Remove Link"})})),f("insertOrderedList",new v({tag:"ol",template:new d({template:s.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery),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.Tool,c=r.ToolTemplate,u=r.InlineFormatter,p=r.InlineFormatFinder,f=a.textNodes,h=r.EditorUtils.registerTool,g=n.extend({findSuitable:function(e){return o.parentOfType(e,["a"])}}),m=n.extend({init:function(){this.finder=new g},apply:function(e,t){var n,i,r,s,l=f(e);t.innerHTML?(n=a.getMarkers(e),i=a.documentFromRange(e),e.deleteContents(),s=o.create(i,"a",t),e.insertNode(s),"a"==o.name(s.parentNode)&&o.insertAfter(s,s.parentNode),n.length>1&&(o.insertAfter(n[n.length-1],s),o.insertAfter(n[1],s),o[l.length>0?"insertBefore":"insertAfter"](n[0],s))):(r=new u([{tags:["a"]}],t),r.finder=this.finder,r.apply(l))}}),v=l.extend({init:function(e){e.formatter={toggle:function(e){new u([{tags:["a"]}]).remove(f(e))}},this.options=e,l.fn.init.call(this,e)}}),_=l.extend({init:function(e){var t=this;t.options=e,l.fn.init.call(t,e),t.formatter=new m,e.url?this.exec=function(){this.formatter.apply(e.range,{href:e.url,innerHTML:e.text||e.url,target:e.target})}:(t.attributes=null,t.async=!0)},_dialogTemplate:function(e){return t.template("
")({messages:this.editor.options.messages,showText:e})},exec:function(){function n(t){var n,i,o,a=u.element,s=e("#k-editor-link-url",a).val();s&&"http://"!=s&&(p.attributes={href:s},n=e("#k-editor-link-title",a).val(),n&&(p.attributes.title=n),i=e("#k-editor-link-text",a).val(),i===m||!i&&0!==l.length||(p.attributes.innerHTML=i||s),o=e("#k-editor-link-target",a).is(":checked"),p.attributes.target=o?"_blank":null,p.formatter.apply(h,p.attributes)),r(t),p.change&&p.change()}function r(e){e.preventDefault(),u.destroy(),o.windowFromDocument(a.documentFromRange(h)).focus(),p.releaseRange(h)}var l,d,c,u,p=this,h=p.getRange(),g=h.collapsed,m=null,v=p.editor.options.messages;h=p.lockRange(!0),l=f(h),d=l.length?p.formatter.finder.findSuitable(l[0]):null,c=1>=l.length||2==l.length&&g,u=s.createDialog(p._dialogTemplate(c),p.editor,i({},p.editor.options.dialogOptions,{title:v.createLink,close:r,visible:!1})).find(".k-dialog-insert").click(n).end().find(".k-dialog-close").click(r).end().find(".k-form-text-row input").keydown(function(e){var i=t.keys;e.keyCode==i.ENTER?n(e):e.keyCode==i.ESC&&r(e)}).end().find("#k-editor-link-url").val(d?d.getAttribute("href",2):"http://").end().find("#k-editor-link-text").val(l.length>0?1==l.length?l[0].nodeValue:l[0].nodeValue+l[1].nodeValue:"").end().find("#k-editor-link-title").val(d?d.title:"").end().find("#k-editor-link-target").attr("checked",d?"_blank"==d.target:!1).end().data("kendoWindow").center().open(),c&&l.length>0&&(m=e("#k-editor-link-text",u.element).val()),e("#k-editor-link-url",u.element).focus().select()},redo:function(){var e=this,t=e.lockRange(!0);e.formatter.apply(t,e.attributes),e.releaseRange(t)}}),b=d.extend({init:function(t){this.options=t,this.finder=new p([{tags:["a"]}]),d.fn.init.call(this,e.extend(t,{command:v}))},initialize:function(e,t){d.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")}});i(t.ui.editor,{LinkFormatFinder:g,LinkFormatter:m,UnlinkCommand:v,LinkCommand:_,UnlinkTool:b}),h("createLink",new d({key:"K",ctrl:!0,command:_,template:new c({template:s.buttonTemplate,title:"Create Link"})})),h("unlink",new b({key:"K",ctrl:!0,shift:!0,template:new c({template:s.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery),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=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=this.attributes;if(n.src&&"http://"!=n.src){if(!e)return e=a.create(d.documentFromRange(t),"img",n),e.onload=e.onerror=function(){e.removeAttribute("complete"),e.removeAttribute("width"),e.removeAttribute("height")},t.deleteContents(),t.insertNode(e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('
')({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 r(e){var t=c.element;g.attributes={src:t.find(p).val().replace(/ /g,"%20"),alt:t.find(f).val()},v=g.insertImage(_,m),s(e),g.change&&g.change()}function s(e){e.preventDefault(),c.destroy(),a.windowFromDocument(d.documentFromRange(m)).focus(),v||g.releaseRange(m)}function l(e){e.keyCode==u.ENTER?r(e):e.keyCode==u.ESC&&s(e)}var c,h,g=this,m=g.lockRange(),v=!1,_=d.image(m),b=g.editor.options,y=b.messages,w=b.imageBrowser,x=!!(n.ui.ImageBrowser&&w&&w.transport&&w.transport.read!==t);h=x?{width:"960px",height:"650px"}:{},c=o.createDialog(g._dialogTemplate(x),g.editor,i(h,b.dialogOptions,{title:y.insertImage,close:s,visible:!1,resizable:x,activate:function(){if(x){var e=this;new n.ui.ImageBrowser(e.element.find(".k-imagebrowser"),i({},w,{change:function(){e.element.find(p).val(this.value())},apply:r}))}}})).find(".k-dialog-insert").click(r).end().find(".k-dialog-close").click(s).end().find(".k-form-text-row input").keydown(l).end().find(p).val(_?_.getAttribute("src",2):"http://").end().find(f).val(_?_.alt:"").end().data("kendoWindow").center().open(),e(p,c.element).focus().select()}});n.ui.editor.ImageCommand=h,s("insertImage",new r.Tool({command:h,template:new l({template:o.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.DropDownList,r=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.value(n.options.title)},options:{name:"SelectBox"},value:function(e){var n=this,r=i.fn.value.call(n,e);return e===t?r:(e!==i.fn.value.call(n)&&(n.text(n.options.title),n._current.removeClass("k-state-selected"),n.current(null),n._oldIndex=n.selectedIndex=-1),t)}});n.ui.plugin(r),n.ui.editor.SelectBox=r}(window.kendo.jQuery),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,g=a.BlockFormatFinder,m=a.BlockFormatter,v=r.extend({init:function(){this.finder=new g([{tags:s.blockElements}])},apply:function(t){var i,r,o,a,l,d,c,u,p,f,h=this.finder.findSuitable(t),g=[];if(h.length){for(i=0,r=h.length;r>i;i++)s.is(h[i],"li")?e(h[i]).index()?0>e.inArray(h[i].parentNode,g)&&g.push(h[i]):g.push(h[i].parentNode):g.push(h[i]);for(;g.length;)if(o=g.shift(),s.is(o,"li"))if(a=o.parentNode,l=e(o).prev("li"),d=l.find("ul,ol").last(),c=e(o).children("ul,ol")[0],c&&l[0])d[0]?(d.append(o),d.append(e(c).children()),s.remove(c)):(l.append(c),c.insertBefore(o,c.firstChild));else for(c=l.children("ul,ol")[0],c||(c=s.create(o.ownerDocument,s.name(a)),l.append(c));o&&o.parentNode==a;)c.appendChild(o),o=g.shift();else for(u=parseInt(n(o),10)+30,n(o,u),p=0;g.length>p;p++)e.contains(o,g[p])&&g.splice(p,1)}else f=new m([{tags:"p"}],{style:{marginLeft:30}}),f.apply(t)},remove:function(t){var i,r,o,a,s,l,d,c,u=this.finder.findSuitable(t);for(r=0,o=u.length;o>r;r++){if(d=e(u[r]),d.is("li")){if(a=d.parent(),s=a.parent(),s.is("li,ul,ol")&&!n(a[0])){if(i&&e.contains(i,s[0]))continue;l=d.nextAll("li"),l.length&&e(a[0].cloneNode(!1)).appendTo(d).append(l),s.is("li")?d.insertAfter(s):d.appendTo(s),a.children("li").length||a.remove();continue}if(i==a[0])continue;i=a[0]}else i=u[r];c=parseInt(n(i),10)-30,n(i,c)}}}),_=c.extend({init:function(e){e.formatter={toggle:function(e){(new v).apply(f.nodes(e))}},c.fn.init.call(this,e)}}),b=c.extend({init:function(e){e.formatter={toggle:function(e){(new v).remove(f.nodes(e))}},c.fn.init.call(this,e)}}),y=u.extend({init:function(e){u.fn.init.call(this,e),this.finder=new g([{tags:h}])},update:function(i,r){var o,a,l,d,c=this.finder.findSuitable(r);for(l=0,d=c.length;d>l;l++)if(o=n(c[l]),o||(a=e(c[l]).parents("ul,ol").length,o=s.is(c[l],"li")&&(a>1||n(c[l].parentNode))||s.ofType(c[l],["ul","ol"])&&a>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:y}),d("indent",new u({command:_,template:new p({template:l.buttonTemplate,title:"Indent"})})),d("outdent",new y({command:b,template:new p({template:l.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Dom,o=i.RangeUtils,a=i.EditorUtils,s=i.Command,l=i.Tool,d=i.ToolTemplate,c=s.extend({init:function(e){var t=this;t.options=e,s.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){function i(e){d.value(f.find(g).val()),s(e),l.change&&l.change(),d.trigger("change")}function s(e){e.preventDefault(),f.data("kendoWindow").destroy();try{r.windowFromDocument(o.documentFromRange(u)).focus()}catch(t){}}var l=this,d=l.editor,u=d.getRange(),p=d.options.messages,f=e(t.template(c.template)(p)).appendTo(document.body),h=c.indent(d.value()),g=".k-editor-textarea";a.createDialog(f,d,n({},d.options.dialogOptions,{title:p.viewHtml,close:s,visible:!1})).find(g).val(h).end().find(".k-dialog-update").click(i).end().find(".k-dialog-close").click(s).end().data("kendoWindow").center().open(),f.find(g).focus()}});n(c,{template:"
",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"$1>\n").replace(/<(ul|ol)([^>]*)>
\n /gi,"
\n").replace(/\n$/,"")}}),t.ui.editor.ViewHtmlCommand=c,i.EditorUtils.registerTool("viewHtml",new l({command:c,template:new d({template:a.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,o=r.RangeUtils,a=r.Marker,s=n.extend({init:function(e){this.editor=e,this.formats=[]},apply:function(e){var t,n,r,s,l,d,c,u;if(this.hasPending()){if(t=new a,t.addCaret(e),n=e.startContainer.childNodes[e.startOffset],r=n.previousSibling,r?(r.nodeValue||(r=r.previousSibling),e.setStart(r,r.nodeValue.length-1)):e.setStart(e.startContainer,e.startOffset),t.add(e),!o.textNodes(e).length)return t.remove(e),e.collapse(!0),this.editor.selectRange(e),void 0;
for(s=t.end.previousSibling.previousSibling,d=this.formats,c=0;d.length>c;c++)l=d[c],u=l.command(i({range:e},l.options.params)),u.editor=this.editor,u.exec(),e.selectNode(s);t.remove(e),s.parentNode&&(e.setStart(s,1),e.collapse(!0)),this.clear(),this.editor.selectRange(e)}},hasPending:function(){return this.formats.length>0},isPending:function(e){return!!this.getPending(e)},getPending:function(e){var t,n=this.formats;for(t=0;n.length>t;t++)if(n[t].name==e)return n[t]},toggle:function(e){var t,n=this.formats;for(t=0;n.length>t;t++)if(n[t].name==e.name)return n[t].params&&n[t].params.value!=e.params.value?n[t].params.value=e.params.value:n.splice(t,1),void 0;n.push(e)},clear:function(){this.formats=[]}});i(r,{PendingFormats:s})}(window.kendo.jQuery),function(e,t){function n(e,t){return'
'+t+" "}function i(n,i){var r,o,a,s,l,d=i!==t;return n.selectionStart!==t?d?(n.focus(),n.setSelectionRange(i,i)):i=[n.selectionStart,n.selectionEnd]:document.selection&&(e(n).is(":visible")&&n.focus(),r=document.selection.createRange(),d?(r.move("character",i),r.select()):(s=n.createTextRange(),l=s.duplicate(),s.moveToBookmark(r.getBookmark()),l.setEndPoint("EndToStart",s),o=l.text.length,a=o+s.text.length,i=[o,a])),i}var r=window.kendo,o=r.keys,a=r.ui,s=a.Widget,l=r._activeElement,d=r._extractFormat,c=r.parseFloat,u=r.support.placeholder,p=r.getCulture,f=r._round,h="change",g="disabled",m="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",y="touchend",w="mouseleave"+b,x="mouseenter"+b+" "+w,k="k-state-default",C="k-state-focused",T="k-state-hover",S="focus",A=".",F="k-state-selected",D="k-state-disabled",I="aria-disabled",E="aria-readonly",P=null,z=e.proxy,H={190:".",188:","},R=s.extend({init:function(e,n){var i,o,a,l,c,u=this,p=n&&n.step!==t;s.fn.init.call(u,e,n),n=u.options,e=u.element.on("blur"+b,z(u._focusout,u)).attr("role","spinbutton"),n.placeholder=n.placeholder||e.attr("placeholder"),u._reset(),u._wrapper(),u._arrows(),u._input(),r.support.mobileOS?u._text.on(y+b+" "+S+b,function(t){u._toggleText(!1),t.type===S&&e.focus()}):u._text.on(S+b,z(u._click,u)),i=u.min(e.attr("min")),o=u.max(e.attr("max")),a=u._parse(e.attr("step")),n.min===P&&i!==P&&(n.min=i),n.max===P&&o!==P&&(n.max=o),p||a===P||(n.step=a),e.attr("aria-valuemin",n.min).attr("aria-valuemax",n.max),n.format=d(n.format),l=n.value,u.value(l!==P?l:e.val()),c=e.is("[disabled]"),c?u.enable(!1):u.readonly(e.is("[readonly]")),r.notify(u)},options:{name:"NumericTextBox",decimals:P,min:P,max:P,value:P,step:1,culture:"",format:"n",spinners:!0,placeholder:"",upArrowText:"Increase value",downArrowText:"Decrease value"},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(x);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+b).off("paste"+b),r||i?(a.addClass(i?D:k).removeClass(i?k:D),o.attr(g,i).attr(m,r).attr(I,i).attr(E,r)):(a.addClass(k).removeClass(D).on(x,t._toggleHover),o.removeAttr(g).removeAttr(m).attr(I,!1).attr(E,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(F)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(F)}),t.element.on("keydown"+b,z(t._keydown,t)).on("paste"+b,z(t._paste,t)))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b),e._form&&e._form.off("reset",e._resetHandler),s.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===P?e:(i!==P&&i>e?e=i:r!==P&&e>r&&(e=r),e)},_arrows:function(){var t,i=this,o=function(){clearTimeout(i._spinning),t.removeClass(F)},a=i.options,s=a.spinners,l=i.element;t=l.siblings(".k-icon"),t[0]||(t=e(n("n",a.upArrowText)+n("s",a.downArrowText)).insertAfter(l),t.wrapAll('
')),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})},_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=e.target,r=i(n)[0],o=n.value.substring(0,r),a=t._format(t.options.format),s=a[","],l=RegExp("\\"+s,"g"),d=RegExp("([\\d\\"+s+"]+)(\\"+a[A]+")?(\\d+)?"),c=d.exec(o),u=0;c&&(u=c[0].replace(l,"").length,-1!=o.indexOf("(")&&0>t._value&&u++),t._focusin(),i(t.element[0],u)})},_change:function(e){var t=this;t._update(e),e=t._value,t._old!=e&&(t._old=e,t.trigger(h),t.element.trigger(h))},_culture:function(e){return e||p(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()},_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="k-formatted-value",r=n.element.addClass(v).show()[0],o=r.accessKey,a=n.wrapper;t=a.find(A+i),t[0]||(t=e('
').insertBefore(r).addClass(i)),r.type="text",t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",n.options.placeholder),o&&(t.attr("accesskey",o),r.accessKey=""),n._text=t.addClass(r.className)},_keydown:function(e){var t=this,n=e.keyCode;n==o.DOWN?t._step(-1):n==o.UP?t._step(1):n==o.ENTER&&t._change(t.element.val()),t._prevent(n,e.shiftKey)&&!e.ctrlKey&&e.preventDefault()},_paste:function(e){var t=this,n=e.target,i=n.value;setTimeout(function(){t._parse(n.value)===P&&t._update(i)})},_prevent:function(e,t){var n,r=this,a=r.element[0],s=a.value,l=r.options,d=l.min,c=r._format(l.format),u=c[A],p=l.decimals,f=i(a),h=f[0],g=f[1],m=0===h&&g===s.length,v=!0;return p===P&&(p=c.decimals),e>16&&21>e||e>32&&37>e||e>47&&58>e||e>95&&106>e||e==o.INSERT||e==o.DELETE||e==o.LEFT||e==o.RIGHT||e==o.TAB||e==o.BACKSPACE||e==o.ENTER?(v=!1,t&&(n=parseInt(String.fromCharCode(e),10),isNaN(n)||(n+="",s=s.substring(0,h)+n+s.substring(g),(-1===a.maxLength||a.maxLength>=s.length)&&(a.value=s,i(a,h+n.length)),v=!0))):(H[e]===u||110==e)&&p>0&&(-1==s.indexOf(u)||m)?110==e?(a.value=s.substring(0,h)+u+s.substring(g),i(a,h+u.length)):t||(v=!1):!(d===P||0>d)||-1!=s.indexOf("-")||189!=e&&109!=e&&173!=e||0!==h||(v=!1),v},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=i._parse(n),(n||"step"!==e)&&(r[e]=n,i.element.attr("aria-value"+e,n).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._parse(n.val())||0;l()!=n[0]&&t._focusin(),i+=t.options.step*e,t._update(t._adjust(i)),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 c(e,this._culture(t),this.options.format)},_update:function(e){var t,n=this,i=n.options,o=i.format,a=i.decimals,s=n._culture(),l=n._format(o,s);a===P&&(a=l.decimals),e=n._parse(e,s),t=e!==P,t&&(e=parseFloat(f(e,a))),n._value=e=n._adjust(e),n._placeholder(r.toString(e,o,s)),t?(e=""+e,-1!==e.indexOf("e")&&(e=f(+e,a))):e="",n.element.val(e).attr("aria-valuenow",e)},_placeholder:function(e){this._text.val(e),u||e||this._text.val(this.options.placeholder)},_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('
').parent(),t=t.wrap("
").parent()),t[0].style.cssText=r.style.cssText,r.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(r.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var e=this,t=e.element,n=t.closest("form");n[0]&&(e._resetHandler=function(){setTimeout(function(){e.value(t[0].value)})},e._form=n.on("reset",e._resetHandler))}});a.plugin(R)}(window.kendo.jQuery),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]=l.directions[e].reverse):(i.origin[0]=e,i.position[0]=l.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").children(k).addClass(E),t.children("a").addClass(S).children(k).addClass(E),t.filter(":not([disabled])").addClass(B),t.filter(".k-separator:empty").append(" "),t.filter("li[disabled]").addClass(U).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+S).length||t.contents().filter(function(){return!(this.nodeName.match(w)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll("
"),a(t),s(t)}function a(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow]").remove(),t.filter(":has(.k-group)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent().parent();t.append("
")})}function s(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(I),t.filter(".k-last:not(:last-child)").removeClass(A),t.filter(":first-child").addClass(I),t.filter(":last-child").addClass(A)}var l=window.kendo,d=l.ui,c=l._activeElement,u=l.support.touch&&l.support.mobileOS,p=u||l.support.pointers,f="mousedown",h="click",g=e.extend,m=e.proxy,v=e.each,_=l.template,b=l.keys,y=d.Widget,w=/^(ul|a|div)$/i,x=".kendoMenu",k="img",C="open",T="k-menu",S="k-link",A="k-last",F="close",D="timer",I="k-first",E="k-image",P="select",z="zIndex",H="activate",R="deactivate",O=l.support.pointers?"MSPointerOver":"mouseenter",M=l.support.pointers?"MSPointerOut":"mouseleave",N="kendoPopup",B="k-state-default",L="k-state-hover",V="k-state-focused",U="k-state-disabled",W=".k-group",j=":not(.k-list) > .k-item",q=".k-item.k-state-disabled",G=".k-item:not(.k-state-disabled)",$=".k-item:not(.k-state-disabled) > .k-link",Y=":not(.k-item.k-separator)",Q=Y+":eq(0)",K=Y+":last",X="div:not(.k-animation-container,.k-list-container)",J={content:_("
#= content(item) #
"),group:_("
"),itemWrapper:_("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) ##= tag(item) #>"),item:_("
#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } # "),image:_("
"),arrow:_("
"),sprite:_("
"),empty:_("")},Z={wrapperCssClass:function(e,t){var n="k-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),n},textClass:function(){return S},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-s":" k-i-arrow-e"},text:function(e){return e.encoded===!1?e.text:l.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group"},content:function(e){return e.content?e.content:" "}},et=y.extend({init:function(t,n){var i=this;y.fn.init.call(i,t,n),t=i.wrapper=i.element,n=i.options,i._initData(n),i._updateClasses(),i._animations(n),i.nextItemZIndex=100,i._tabindex(),i._focusProxy=m(i._focusHandler,i),t.on("touchstart MSPointerDown",i._focusProxy).on(h+x,q,!1).on(h+x,G,m(i._click,i)).on("keydown"+x,m(i._keydown,i)).on("focus"+x,m(i._focus,i)).on("focus"+x,".k-content",m(i._focus,i)).on("blur"+x,m(i._removeHoverItem,i)).on("blur"+x,"[tabindex]",m(i._checkActiveElement,i)).on(O+x,G,m(i._mouseenter,i)).on(M+x,G,m(i._mouseleave,i)).on(O+x+" "+M+x+" "+f+x+" "+h+x,$,m(i._toggleHover,i)),n.openOnClick&&(i.clicked=!1,i._documentClickHandler=m(i._documentClick,i),e(document).click(i._documentClickHandler)),t.attr("role","menubar"),t[0].id&&(i._ariaId=l.format("{0}_mn_active",t[0].id)),l.notify(i)},events:[C,F,H,R,P],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100},_initData:function(e){var t=this;e.dataSource&&(t.element.empty(),t.append(e.dataSource,t.element))},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=g(!0,t,e.animation),"dataSource"in e&&this._initData(e),y.fn.setOptions.call(this,e)},destroy:function(){var t=this;y.fn.destroy.call(t),t.element.off(x),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},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 n=this._insert(e,t,t.length?t.find("> .k-group, > .k-animation-container > .k-group"):null);return v(n.items,function(){n.group.append(this),a(this)}),a(t),s(n.group.find(".k-first, .k-last").add(n.items)),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return v(n.items,function(){t.before(this),a(this),s(this)}),s(t),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return v(n.items,function(){t.after(this),a(this),s(this)}),s(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),l={firstLevel:i.hasClass(T),horizontal:i.hasClass(T+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(et.renderGroup({group:l})).appendTo(n)),s||e.isArray(t)?r=e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t):e(et.renderItem({group:l,item:g(t,{index:n})}))}):(r=e(t),a=r.find("> ul").addClass("k-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;return e=this.element.find(e),t=this,n=e.parentsUntil(t.element,j),i=e.parent("ul"),e.remove(),i&&!i.children(j).length&&(r=i.parent(".k-animation-container"),r.length?r.remove():i.remove()),n.length&&(n=n.eq(0),a(n),s(n)),t},open:function(r){var o=this,a=o.options,s="horizontal"==a.orientation,d=a.direction,c=l.support.isRtl(o.wrapper);return r=o.element.find(r),/^(top|bottom|default)$/.test(d)&&(d=c?s?(d+" left").replace("default","bottom"):"left":s?(d+" right").replace("default","bottom"):"right"),r.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function(){var t=e(this).data("kendoPopup");t&&t.close()}),r.each(function(){var r=e(this);clearTimeout(r.data(D)),r.data(D,setTimeout(function(){var e,l,u,p,f,h,m=r.find(".k-group:first:hidden");m[0]&&o.trigger(C,{item:r[0]})===!1&&(r.data(z,r.css(z)),r.css(z,o.nextItemZIndex++),e=m.data(N),l=r.parent().hasClass(T),u=l&&s,p=i(d,l,c),f=a.animation.open.effects,h=f!==t?f:"slideIn:"+n(d,l),e?(e=m.data(N),e.options.origin=p.origin,e.options.position=p.position,e.options.animation.open.effects=h):e=m.kendoPopup({activate:function(){o.trigger(H,{item:this.wrapper.parent()})},deactivate:function(){o.trigger(R,{item:this.wrapper.parent()})},origin:p.origin,position:p.position,collision:a.popupCollision!==t?a.popupCollision:u?"fit":"fit flip",anchor:r,appendTo:r,animation:{open:g(!0,{effects:h},a.animation.open),close:a.animation.close},close:function(e){var t=e.sender.wrapper.parent();o.trigger(F,{item:t[0]})?e.preventDefault():(t.css(z,t.data(z)),t.removeData(z))}}).data(N),m.removeAttr("aria-hidden"),e.open())},o.options.hoverDelay))}),o},close:function(t){var n=this,i=n.element;return t=i.find(t),t.length||(t=i.find(">.k-item")),t.each(function(){var t=e(this);clearTimeout(t.data(D)),t.data(D,setTimeout(function(){var e=t.find(".k-group:not(.k-list-container):first:visible").data(N);e&&(e.close(),e.element.attr("aria-hidden",!0))},n.options.hoverDelay))}),n},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(B,n).toggleClass(U,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(l.eventTarget(t)||t.target).closest(j),i=t.type==O||-1!==f.indexOf(t.type);n.parents("li."+U).length||n.toggleClass(L,i||"mousedown"==t.type||"click"==t.type),this._removeHoverItem()},_checkActiveElement:function(t){var n=this,i=e(this._hoverItem()[0]||(t?t.currentTarget:{})),o=n._findRootParent(i)[0];setTimeout(function(){document.hasFocus()&&r(o,l._activeElement())||n.close(o)},0)},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(V)&&(e.removeClass(V),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element;t.addClass("k-widget k-reset k-header "+T).addClass(T+"-"+this.options.orientation),t.find("li > ul").addClass("k-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-group > li"),e.each(function(){o(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),o=i.children(".k-animation-container").length||i.children(W).length;t.delegateTarget==i.parents(".k-menu")[0]&&((!n.options.openOnClick||n.clicked)&&!r(t.currentTarget,t.relatedTarget)&&o&&n.open(i),(n.options.openOnClick&&n.clicked||p)&&i.siblings().each(m(function(e,t){n.close(t)},n)))},_mouseleave:function(n){var i=this,o=e(n.currentTarget),a=o.children(".k-animation-container").length||o.children(W).length;return o.parentsUntil(".k-animation-container",".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):(i.options.openOnClick||u||l.support.pointers&&2==n.originalEvent.pointerType||r(n.currentTarget,n.relatedTarget)||!a||i.close(o),t)},_click:function(n){var i,r,o,a=this,s=a.options,d=e(l.eventTarget(n)),c=d[0]?d[0].nodeName.toUpperCase():"",u="INPUT"==c||"SELECT"==c||"BUTTON"==c,f=d.closest("."+S),h=d.closest(j),g=f.attr("href"),m=!!g&&"#"!=g.charAt(g.length-1);if(!h.children(X)[0])return h.hasClass(U)?(n.preventDefault(),t):(n.handled||!a.trigger(P,{item:h[0]})||u||n.preventDefault(),n.handled=!0,r=h.children(W+",.k-animation-container"),o=r.is(":visible"),s.closeOnClick&&!m&&(!r.length||s.openOnClick&&o)?(h.removeClass(L).css("height"),a._oldHoverItem=a._findRootParent(h),a.close(f.parentsUntil(a.element,j)),a.clicked=!1,-1!="MSPointerUp".indexOf(n.type)&&n.preventDefault(),t):((h.parent().hasClass(T)&&s.openOnClick||!p)&&(m||u||n.preventDefault(),a.clicked=!0,i=r.is(":visible")?F:C,(s.closeOnClick||i!=F)&&a[i](h)),t))},_documentClick:function(e){r(this.element[0],e.target)||(this.clicked=!1)},_focus:function(n){var i=this,r=n.target,o=i._hoverItem(),a=c();return r==i.wrapper[0]||e(r).is(":focusable")?(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-group").closest(".k-item").addClass(V),i.wrapper.focus(),t)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=o._oldHoverItem,d=l.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),a==b.RIGHT)n=o[d?"_itemLeft":"_itemRight"](s,i,r);else if(a==b.LEFT)n=o[d?"_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.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(){}}),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-group")||t:t},_itemHasChildren:function(e){return e.length?e.children("ul.k-group, div.k-animation-container").length>0:!1},_moveHover:function(e,t){var n=this,i=n._ariaId;e.length&&t.length&&(e.removeClass(V),e[0].id===i&&e.removeAttr("id")),t.length&&(t[0].id&&(i=t[0].id),t.addClass(V),n._oldHoverItem=t,i&&(n.element.removeAttr("aria-activedescendant"),t.attr("id",i),n.element.attr("aria-activedescendant",i)))},_findRootParent:function(e){return e.parent().hasClass("k-menu")?e:e.parentsUntil(".k-menu","li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass("k-menu")},_itemRight:function(e,t,n){var i,r,o=this;return t?n?(o.open(e),i=e.find(".k-group").children().first()):"horizontal"==o.options.orientation&&(r=o._findRootParent(e),o.close(r),i=r.nextAll(Q)):(i=e.nextAll(Q),i.length||(i=e.prevAll(K))),i&&!i.length?i=o.wrapper.children(".k-item").first():i||(i=[]),o._moveHover(e,i),i},_itemLeft:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._isRootItem(n)&&"horizontal"==i.options.orientation&&(n=n.prevAll(Q))):(n=e.prevAll(Q),n.length||(n=e.nextAll(K))),n.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_itemDown:function(e,t,n){var i,r=this;if(t)i=e.nextAll(Q);else{if(!n||e.hasClass(U))return;r.open(e),i=e.find(".k-group").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(Q),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),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},_focusHandler:function(t){var n=this,i=e(l.eventTarget(t)).closest(j);setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(V)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});g(et,{renderItem:function(e){e=g({menu:{},group:{}},e);var t=J.empty,n=e.item;return J.item(g(e,{image:n.imageUrl?J.image:t,sprite:n.spriteCssClass?J.sprite:t,itemWrapper:J.itemWrapper,renderContent:et.renderContent,arrow:n.items||n.content?J.arrow:t,subGroup:et.renderGroup},Z))},renderGroup:function(e){return J.group(g({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=g({length:r},e.group);r>n;n++)t+=et.renderItem(g(e,{group:o,item:g({index:n},i[n])}));return t}},e,Z))},renderContent:function(e){return J.content(g(e,Z))}}),l.ui.plugin(et)}(window.kendo.jQuery),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, ["+s.attr("role")+"=upload], ["+s.attr("skip")+"], [type=file]), select").each(function(){var t=s.attr("bind"),n=this.getAttribute(t)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",r=this.name;-1===n.indexOf(i)&&r&&(n+=(n.length?",":"")+i+r,e(this).attr(t,n))})}function r(e){var t,i,r=(e.model.fields||e.model)[e.field],o=n(r),a=r?r.validation:{},l=s.attr("type"),d=s.attr("bind"),c={name:e.field};for(t in a)i=a[t],h(t,_)>=0?c[l]=t:p(i)||(c[t]=f(i)?i.value||t:i),c[s.attr(t+"-msg")]=i.message;return h(o,_)>=0&&(c[l]=o),c[d]=("boolean"===o?"checked:":"value:")+e.field,c}function o(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;n>t;t++)i=e[t],o=i.text||i.value||i,r=null==i.value?i.text||i:i.value,a[t]={text:o,value:r};return a}function a(e,t){var n,i=e?e.validation||{}:{};for(n in i)p(i[n])&&(t[n]=i[n])}var s=window.kendo,l=s.ui,d=l.Widget,c=e.extend,u=s.support.browser.msie&&9>s.support.browser.version,p=e.isFunction,f=e.isPlainObject,h=e.inArray,g=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,m='
',v="change",_=["url","email","number","date","boolean"],b={number:function(t,n){var i=r(n);e('
').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("
').hide().appendTo(t)},date:function(t,n){var i=r(n),o=n.format;o&&(o=s._extractFormat(o)),i[s.attr("format")]=o,e('
').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("
').hide().appendTo(t)},string:function(t,n){var i=r(n);e('
').attr(i).appendTo(t)},"boolean":function(t,n){var i=r(n);e('
').attr(i).appendTo(t)},values:function(t,n){var i=r(n);e("
').attr(i).appendTo(t),e("
').hide().appendTo(t)}},y=d.extend({init:function(t,n){var i=this;d.fn.init.call(i,t,n),i._validateProxy=e.proxy(i._validate,i),i.refresh()},events:[v],options:{name:"Editable",editors:b,clearContainer:!0,errorTemplate:m},editor:function(e,t){var i=this,r=i.options.editors,o=f(e),a=o?e.field:e,l=i.options.model||{},d=o&&e.values,u=d?"values":n(t),p=o&&e.editor,h=p?e.editor:r[u],m=i.element.find("["+s.attr("container-for")+"="+a.replace(g,"\\$1")+"]");h=h?h:r.string,p&&"string"==typeof e.editor&&(h=function(t){t.append(e.editor)}),m=m.length?m:i.element,h(m,c(!0,{},o?e:{field:a},{model:l}))},_validate:function(t){var n,i=this,r="boolean"==typeof t.value,o=i._validationEventInProgress,a={};a[t.field]=t.value,n=e(":input["+s.attr("bind")+'="'+(r?"checked:":"value:")+t.field.replace(g,"\\$1")+'"]',i.element);try{i._validationEventInProgress=!0,(!i.validatable.validateInput(n)||!o&&i.trigger(v,{values:a}))&&t.preventDefault()}finally{i._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var e=this;d.fn.destroy.call(e),e.options.model.unbind("set",e._validateProxy),s.unbind(e.element),s.destroy(e.element),e.element.removeData("kendoValidator")},refresh:function(){var n,r,o,l,d,c,p,h,g=this,m=g.options.fields||[],v=g.options.clearContainer?g.element.empty():g.element,_=g.options.model||{},b={};for(e.isArray(m)||(m=[m]),n=0,r=m.length;r>n;n++)o=m[n],l=f(o),d=l?o.field:o,c=(_.fields||_)[d],a(c,b),g.editor(o,c);if(!r){p=_.fields||_;for(d in p)a(p[d],b)}i(v),s.bind(v,g.options.model),g.options.model.bind("set",g._validateProxy),g.validatable=v.kendoValidator({validateOnBlur:!1,errorTemplate:g.options.errorTemplate||t,rules:b}).data("kendoValidator"),h=v.find(":focusable:first").focus(),u&&h.focus()}});l.plugin(y)}(window.kendo.jQuery),function(e){function t(n,i){n.filters&&(n.filters=e.grep(n.filters,function(e){return t(e,i),e.filters?e.filters.length:e.field!=i}))}function n(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;n>t;t++)i=e[t],o=i.text||i.value||i,r=null==i.value?i.text||i:i.value,a[t]={text:o,value:r};return a}function i(t,n){return e.grep(t,function(t){return t.filters?(t.filters=e.grep(t.filters,function(e){return e.field!=n}),t.filters.length):t.field!=n})}var r=window.kendo,o=r.ui,a=e.proxy,s="kendoPopup",l="init",d=".kendoFilterMenu",c="Is equal to",u="Is not equal to",p={number:"numerictextbox",date:"datepicker"},f=e.isFunction,h=o.Widget,g='
',m='
#=messages.info#
#for(var op in operators){##=operators[op]# #}# #if(values){#
#}else{#
#}##if(extra){#
#=messages.and# #=messages.or# #for(var op in operators){##=operators[op]# #}# #if(values){#
#}else{#
#}##}#
#=messages.filter# #=messages.clear#
',v=h.extend({init:function(t,n){var i,o,s,l,c=this,u="string";h.fn.init.call(c,t,n),i=c.operators=n.operators||{},t=c.element,n=c.options,n.appendToElement||(s=t.addClass("k-filterable").find(".k-grid-filter"),s[0]||(s=t.prepend('
').find(".k-grid-filter")),s.attr("tabindex",-1).on("click"+d,a(c._click,c))),c.link=s||e(),c.dataSource=n.dataSource,c.field=n.field||t.attr(r.attr("field")),c.model=c.dataSource.reader.model,c._parse=function(e){return e+""},c.model&&c.model.fields&&(l=c.model.fields[c.field],l&&(u=l.type||"string",l.parse&&(c._parse=a(l.parse,l)))),n.values&&(u="enums"),c.type=u,i=i[u]||n.operators[u];for(o in i)break;c._defaultFilter=function(){return{field:c.field,operator:o||"eq",value:""}},c._refreshHandler=a(c.refresh,c),c.dataSource.bind("change",c._refreshHandler),n.appendToElement?c._init():c.refresh()},_init:function(){var t,i=this,o=i.options,c=i.operators||{},u=o.ui,h=f(u),v=i.type;c=c[v]||o.operators[v],h||(t=u||p[v]),i.form=e('').html(r.template("boolean"===v?g:m)({field:i.field,format:o.format,ns:r.ns,messages:o.messages,extra:o.extra,operators:c,type:v,role:t,values:n(o.values)})).on("keydown"+d,a(i._keydown,i)).on("submit"+d,a(i._submit,i)).on("reset"+d,a(i._reset,i)),o.appendToElement?(i.element.append(i.form),i.popup=i.element.closest(".k-popup").data(s)):i.popup=i.form[s]({anchor:i.link,open:a(i._open,i),activate:a(i._activate,i),close:i.options.closeCallback}).data(s),h&&i.form.find(".k-textbox").removeClass("k-textbox").each(function(){u(e(this))
}),i.form.find("["+r.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+r.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+r.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+r.attr("role")+"=datepicker]").removeClass("k-textbox"),i.refresh(),i.trigger(l,{field:i.field,container:i.form})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"};e.filterModel=r.observable({logic:"and",filters:[e._defaultFilter(),e._defaultFilter()]}),e.form&&r.bind(e.form.children().first(),e.filterModel),e._bind(t)?e.link.addClass("k-state-active"):e.link.removeClass("k-state-active")},destroy:function(){var e=this;h.fn.destroy.call(e),e.form&&(r.unbind(e.form),r.destroy(e.form),e.form.unbind(d),e.popup.destroy()),e.link.unbind(d),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler)},_bind:function(e){var t,n,i,r,o=this,a=e.filters,s=!1,l=0,d=o.filterModel;for(t=0,n=a.length;n>t;t++)r=a[t],r.field==o.field?(d.set("logic",e.logic),i=d.filters[l],i||(d.filters.push({field:o.field}),i=d.filters[l]),i.set("value",o._parse(r.value)),i.set("operator",r.operator),l++,s=!0):r.filters&&(s=s||o._bind(r));return s},_merge:function(n){var i,r,o,a=this,s=n.logic||"and",l=n.filters,d=a.dataSource.filter()||{filters:[],logic:"and"};for(t(d,a.field),l=e.grep(l,function(e){return""!==e.value&&null!=e.value}),r=0,o=l.length;o>r;r++)i=l[r],i.value=a._parse(i.value);return l.length&&(d.filters.length?(n.filters=l,"and"!==d.logic&&(d.filters=[{logic:d.logic,filters:d.filters}],d.logic="and"),l.length>1?d.filters.push(n):d.filters.push(l[0])):(d.filters=l,d.logic=s)),d},filter:function(e){e=this._merge(e),e.filters.length&&this.dataSource.filter(e)},clear:function(){var t=this,n=t.dataSource.filter()||{filters:[]};n.filters=e.grep(n.filters,function(e){return e.filters?(e.filters=i(e.filters,t.field),e.filters.length):e.field!=t.field}),n.filters.length||(n=null),t.dataSource.filter(n)},_submit:function(e){var t=this;e.preventDefault(),t.filter(t.filterModel.toJSON()),t.popup.close()},_reset:function(){this.clear(),this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup||this._init(),this.popup.toggle()},_open:function(){var t;e(".k-filter-menu").not(this.form).each(function(){t=e(this).data(s),t&&t.close()})},_activate:function(){this.form.find(":focusable:first").focus()},_keydown:function(e){e.keyCode==r.keys.ESC&&this.popup.close()},events:[l],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:c,neq:u,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with"},number:{eq:c,neq:u,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"},date:{eq:c,neq:u,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before"},enums:{eq:c,neq:u}},messages:{info:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-"}}});o.plugin(v)}(window.kendo.jQuery),function(e,t){function n(t){t=e(t),t.children(v).children(".k-icon").remove(),t.filter(":has(.k-panel),:has(.k-content)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent();t.append("
")})}function i(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(k),t.filter(".k-last:not(:last-child)").removeClass(g),t.filter(":first-child").addClass(k),t.filter(":last-child").addClass(g)}var r=window.kendo,o=r.ui,a=r.keys,s=e.extend,l=e.each,d=r.template,c=o.Widget,u=/^(ul|a|div)$/i,p=".kendoPanelBar",f="img",h="href",g="k-last",m="k-link",v="."+m,_="error",b=".k-item",y=".k-group",w=y+":visible",x="k-image",k="k-first",C="expand",T="select",S="k-content",A="activate",F="collapse",D="mouseenter",I="mouseleave",E="contentLoad",P="k-state-active",z="> .k-panel",H="> .k-content",R="k-state-focused",O="k-state-disabled",M="k-state-selected",N="."+M,B="k-state-highlight",L=b+":not(.k-state-disabled)",V=L+" > .k-link",U=b+".k-state-disabled > .k-link",W="> li > "+N+", .k-panel > li > "+N,j="k-state-default",q="aria-disabled",G="aria-expanded",$="aria-hidden",Y="aria-selected",Q=":visible",K=":empty",X="single",J={content:d("
#= content(item) #
"),group:d("
"),itemWrapper:d("<#= tag(item) # class='#= textClass(item, group) #' #= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) ##= tag(item) #>"),item:d("
#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } # "),image:d("
"),arrow:d("
"),sprite:d("
"),empty:d("")},Z={aria:function(e){var t="";return(e.items||e.content||e.contentUrl)&&(t+=G+"='"+(e.expanded?"true":"false")+"' "),e.enabled===!1&&(t+=q+"='true'"),t},wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" "+O:t.expanded===!0?" "+P:" 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=m;return t.firstLevel&&(n+=" k-header"),n},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e){var t="k-icon";return t+=e.expanded?" k-i-arrow-n k-panelbar-collapse":" k-i-arrow-s k-panelbar-expand"},text:function(e){return e.encoded===!1?e.text:r.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},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?r.attr("content-url")+'="'+e.contentUrl+'"':""}},et=c.extend({init:function(t,n){var i,o=this;c.fn.init.call(o,t,n),t=o.wrapper=o.element.addClass("k-widget k-reset k-header k-panelbar"),n=o.options,t[0].id&&(o._itemId=t[0].id+"_pb_active"),o._tabindex(),o._initData(n),o._updateClasses(),o._animations(n),t.on("click"+p,V,function(t){o._click(e(t.currentTarget))&&t.preventDefault()}).on(D+p+" "+I+p,V,o._toggleHover).on("click"+p,U,!1).on("keydown"+p,e.proxy(o._keydown,o)).on("focus"+p,function(){var e=o.select();o._current(e[0]?e:o._first())}).on("blur"+p,function(){o._current(null)}).attr("role","menu"),i=t.find("li."+P+" > ."+S),i[0]&&o.expand(i.parent(),!1),r.notify(o)},events:[C,F,T,A,_,E],options:{name:"PanelBar",animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:200}},expandMode:"multiple"},destroy:function(){c.fn.destroy.call(this),this.element.off(p),r.destroy(this.element)},_initData:function(e){var t=this;e.dataSource&&(t.element.empty(),t.append(e.dataSource,t.element))},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=s(!0,t,e.animation),"dataSource"in e&&this._initData(e),c.fn.setOptions.call(this,e)},expand:function(t,n){var i=this,r={};return n=n!==!1,t=this.element.find(t),t.each(function(o,a){a=e(a);var s=a.find(z).add(a.find(H));if(!a.hasClass(O)&&s.length>0){if(i.options.expandMode==X&&i._collapseAllExpanded(a))return i;t.find("."+B).removeClass(B),a.addClass(B),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(C,a)||i._toggleItem(a,!1),n||(i.options.animation=r)}}),i},collapse:function(t,n){var i=this,r={};return n=n!==!1,t=i.element.find(t),t.each(function(t,o){o=e(o);var a=o.find(z).add(o.find(H));!o.hasClass(O)&&a.is(Q)&&(o.removeClass(B),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(F,o)||i._toggleItem(o,!0),n||(i.options.animation=r))}),i},_toggleDisabled:function(e,t){e=this.element.find(e),e.toggleClass(j,t).toggleClass(O,!t).attr(q,!t)},select:function(n){var i=this;return n===t?i.element.find(W).parent():(i.element.find(n).each(function(){var n=e(this),r=n.children(v);return n.hasClass(O)?i:(i._updateSelected(r),t)}),i)},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 r=this._insert(e,t,t.length?t.find(z):null);return l(r.items,function(){r.group.append(this),i(this)}),n(t),i(r.group.find(".k-first, .k-last")),r.group.height("auto"),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return l(n.items,function(){t.before(this),i(this)}),i(t),n.group.height("auto"),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return l(n.items,function(){t.after(this),i(this)}),i(t),n.group.height("auto"),this},remove:function(e){e=this.element.find(e);var t=this,r=e.parentsUntil(t.element,b),o=e.parent("ul");return e.remove(),!o||o.hasClass("k-panelbar")||o.children(b).length||o.remove(),r.length&&(r=r.eq(0),n(r),i(r)),t},reload:function(t){var n=this;t=n.element.find(t),t.each(function(){var t=e(this);n._ajaxRequest(t,t.children("."+S),!t.is(Q))})},_first:function(){return this.element.children(L).first()},_last:function(){var e=this.element.children(L).last(),t=e.children(w);return t[0]?t.children(L).last():e},_current:function(e){var n=this,i=n._focused,r=n._itemId;return e===t?i:(n.element.removeAttr("aria-activedescendant"),i&&(i[0].id===r&&i.removeAttr("id"),i.children(v).removeClass(R)),e&&(r=e[0].id||r,e.attr("id",r).children(v).addClass(R),n.element.attr("aria-activedescendant",r)),n._focused=e,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(i.children(v)),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(w),n=e.next();return t[0]&&(n=t.children("."+k)),n[0]||(n=e.parent(w).parent(b).next()),n[0]&&n.is(":visible")||(n=this._first()),n.hasClass(O)&&(n=this._nextItem(n)),n},_prevItem:function(e){if(!e)return this._last();var t,n=e.prev();if(n[0])for(t=n;t[0];)t=t.children(w).children("."+g),t[0]&&(n=t);else n=e.parent(w).parent(b),n[0]||(n=this._last());return n.hasClass(O)&&(n=this._prevItem(n)),n},_insert:function(t,n,i){var r,o,a=this,l=e.isPlainObject(t),d=n&&n[0];return d||(i=a.element),o={firstLevel:i.hasClass("k-panelbar"),expanded:i.parent().hasClass(P),length:i.children().length},d&&!i.length&&(i=e(et.renderGroup({group:o})).appendTo(n)),l||e.isArray(t)?(r=e.map(l?[t]:t,function(t,n){return"string"==typeof t?e(t):e(et.renderItem({group:o,item:s(t,{index:n})}))}),d&&n.attr(G,!1)):(r=e(t),a._updateItemsClasses(r)),{items:r,group:i}},_toggleHover:function(t){var n=e(t.currentTarget);n.parents("li."+O).length||n.toggleClass("k-state-hover",t.type==D)},_updateClasses:function(){var t,r,o=this;t=o.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),t.parent().attr(G,!1).not("."+P).children("ul").attr($,!0).hide(),r=o.element.add(t).children(),o._updateItemsClasses(r),n(r),i(r)},_updateItemsClasses:function(e){for(var t=e.length,n=0;t>n;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","menuitem"),r.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children(f).addClass(x),o=t.children("a").addClass(m),o[0]&&(o.attr("href",l),o.children(f).addClass(x)),t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"),t.filter("li[disabled]").addClass("k-state-disabled").attr(q,!0).removeAttr("disabled"),t.children("div").addClass(S).attr("role","region").attr($,!0).hide().parent().attr(G,!1),o=t.children(N),o[0]&&(a&&a.removeAttr(Y).children(N).removeClass(M),o.addClass(M),this._selected=t.attr(Y,!0)),t.children(v)[0]||(i="
",s&&s[n]&&t[0].parentNode==d&&(i=''),t.contents().filter(function(){return!(this.nodeName.match(u)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(i)),t.parent(".k-panelbar")[0]&&t.children(v).addClass("k-header")},_click:function(e){var t,n,i,r,o,a,s,l=this,d=l.element;if(!e.parents("li."+O).length&&e.closest(".k-widget")[0]==d[0]){if(o=e.closest(v),a=o.closest(b),l._updateSelected(o),n=a.find(z).add(a.find(H)),i=o.attr(h),r=i&&("#"==i.charAt(i.length-1)||-1!=i.indexOf("#"+l.element[0].id+"-")),t=!(!r&&!n.length),n.data("animating"))return t;if(l._triggerEvent(T,a)&&(t=!0),t!==!1)return l.options.expandMode==X&&l._collapseAllExpanded(a)?t:(n.length&&(s=n.is(Q),l._triggerEvent(s?F:C,a)||(t=l._toggleItem(a,s))),t)}},_toggleItem:function(e,t){var n,i,r=this,o=e.find(z);return o.length?(this._toggleGroup(o,t),n=!0):(i=e.children("."+S),i.length&&(n=!0,i.is(K)?r._ajaxRequest(e,i,t):r._toggleGroup(i,t))),n},_toggleGroup:function(e,t){var n=this,i=n.options.animation,r=i.expand,o=s({},i.collapse),a=o&&"effects"in o;e.is(Q)==t&&(e.parent().attr(G,!t).attr($,t).toggleClass(j,t).toggleClass(P,!t).find("> .k-link > .k-icon").toggleClass("k-i-arrow-n",!t).toggleClass("k-panelbar-collapse",!t).toggleClass("k-i-arrow-s",t).toggleClass("k-panelbar-expand",t),r=t?s(a?o:s({reverse:!0},r),{hide:!0}):s({complete:function(e){n._triggerEvent(A,e.closest(b))}},r),e.kendoStop(!0,!0).kendoAnimate(r))},_collapseAllExpanded:function(n){var i,r,o=this,a=!1;return n.children(v).hasClass("k-header")?(r=n.find(z).add(n.find(H)),r.is(Q)&&(a=!0),r.is(Q)||0===r.length||(i=e(o.element).children(),i.find(z).add(i.find(H)).filter(function(){return e(this).is(Q)}).each(function(t,n){n=e(n),a=o._triggerEvent(F,n.closest(b)),a||o._toggleGroup(n,!0)})),a):t},_ajaxRequest:function(t,n,i){var r=this,o=t.find(".k-panelbar-collapse, .k-panelbar-expand"),a=t.find(v),s=setTimeout(function(){o.addClass("k-loading")},100),l={},d=a.attr(h);e.ajax({type:"GET",cache:!1,url:d,dataType:"html",data:l,error:function(e,t){o.removeClass("k-loading"),r.trigger(_,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(s),o.removeClass("k-loading")},success:function(e){try{n.html(e)}catch(o){var a=window.console;a&&a.error&&a.error(o.name+": "+o.message+" in "+d),this.error(this.xhr,"error")}r._toggleGroup(n,i),r.trigger(E,{item:t[0],contentElement:n[0]})}})},_triggerEvent:function(e,t){var n=this;return n.trigger(e,{item:t[0]})},_updateSelected:function(e){var t=this,n=t.element,i=e.parent(b),r=t._selected;r&&r.removeAttr(Y),t._selected=i.attr(Y,!0),n.find(W).removeClass(M),n.find("> ."+B+", .k-panel > ."+B).removeClass(B),e.addClass(M),e.parentsUntil(n,b).filter(":has(.k-header)").addClass(B),t._current(i)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})}});s(et,{renderItem:function(e){e=s({panelBar:{},group:{}},e);var t=J.empty,n=e.item;return J.item(s(e,{image:n.imageUrl?J.image:t,sprite:n.spriteCssClass?J.sprite:t,itemWrapper:J.itemWrapper,renderContent:et.renderContent,arrow:n.items||n.content||n.contentUrl?J.arrow:t,subGroup:et.renderGroup},Z))},renderGroup:function(e){return J.group(s({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=s({length:r},e.group);r>n;n++)t+=et.renderItem(s(e,{group:o,item:s({index:n},i[n])}));return t}},e,Z))},renderContent:function(e){return J.content(s(e,Z))}}),r.ui.plugin(et)}(window.kendo.jQuery),function(e,t){function n(t){t.children(g).addClass(k),t.children("a").addClass(_).children(g).addClass(k),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(z),t.filter("li[disabled]").addClass(P).removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(H+" "+M),t.attr("role","tab"),t.filter("."+H).attr("aria-selected",!0),t.each(function(){var t=e(this);t.children("."+_).length||t.contents().filter(function(){return!(this.nodeName.match(f)||3==this.nodeType&&!d(this.nodeValue))}).wrapAll("
")})}function i(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(C),t.filter(".k-last:not(:last-child)").removeClass(b),t.filter(":first-child").addClass(C),t.filter(":last-child").addClass(b)}var r=window.kendo,o=r.ui,a=r.keys,s=e.map,l=e.each,d=e.trim,c=e.extend,u=r.template,p=o.Widget,f=/^(a|div)$/i,h=".kendoTabStrip",g="img",m="href",v="prev",_="k-link",b="k-last",y="click",w="error",x=":empty",k="k-image",C="k-first",T="select",S="activate",A="k-content",F="contentUrl",D="mouseenter",I="mouseleave",E="contentLoad",P="k-state-disabled",z="k-state-default",H="k-state-active",R="k-state-focused",O="k-state-hover",M="k-tab-on-top",N=".k-item:not(."+P+")",B=".k-tabstrip-items > "+N+":not(."+H+")",L={content:u("
#= content(item) #
"),itemWrapper:u("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= tag(item) #>"),item:u("
#= itemWrapper(data) # "),image:u("
"),sprite:u("
"),empty:u("")},V={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:r.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?r.attr("content-url")+'="'+e.contentUrl+'"':""}},U=p.extend({init:function(t,n){var i,o,a=this;p.fn.init.call(a,t,n),a._animations(a.options),a.wrapper=a.element.is("ul")?a.element.wrapAll("
").parent():a.element,n=a.options,a._isRtl=r.support.isRtl(a.wrapper),a._tabindex(),a._updateClasses(),a._dataSource(),n.dataSource&&a.dataSource.fetch(),a.options.contentUrls&&a.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,n){e(n).find(">."+_).data(F,a.options.contentUrls[t])}),a.wrapper.on(D+h+" "+I+h,B,a._toggleHover).on("keydown"+h,e.proxy(a._keydown,a)).on("focus"+h,e.proxy(a._active,a)).on("blur"+h,function(){a._current(null)}),a.wrapper.children(".k-tabstrip-items").on(y+h,".k-state-disabled .k-link",!1).on(y+h," > "+N,function(t){a._click(e(t.currentTarget))&&t.preventDefault()}),i=a.tabGroup.children("li."+H),o=a.contentHolder(i.index()),o.length>0&&0===o[0].childNodes.length&&a.activateTab(i.eq(0)),a.element.attr("role","tablist"),a.element[0].id&&(a._ariaId=a.element[0].id+"_ts_active"),r.notify(a)},_active:function(){var e=this.tabGroup.children().filter("."+H);e=e[0]?e:this._endItem("first"),e[0]&&this._current(e)},_endItem:function(e){return this.tabGroup.children(N)[e]()},_item:function(e,t){var n;return n=t===v?"last":"first",e?(e=e[t](),e[0]||(e=this._endItem(n)),e.hasClass(P)&&(e=this._item(e,t)),e):this._endItem(n)},_current:function(e){var n=this,i=n._focused,r=n._ariaId;return e===t?i:(i&&(i[0].id===r&&i.removeAttr("id"),i.removeClass(R)),e&&(e.hasClass(H)||e.addClass(R),n.element.removeAttr("aria-activedescendant"),r=e[0].id||r,r&&(e.attr("id",r),n.element.attr("aria-activedescendant",r))),n._focused=e,t)},_keydown:function(e){var n,i=this,r=e.keyCode,o=i._current(),s=i._isRtl;if(e.target==e.currentTarget){if(r==a.DOWN||r==a.RIGHT)n=s?v:"next";else if(r==a.UP||r==a.LEFT)n=s?"next":v;else if(r==a.ENTER||r==a.SPACEBAR)i._click(o),e.preventDefault();else{if(r==a.HOME)return i._click(i._endItem("first")),e.preventDefault(),t;if(r==a.END)return i._click(i._endItem("last")),e.preventDefault(),t}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=r.data.DataSource.create(t.options.dataSource).bind("change",t._refreshHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),e.fetch()},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{effects:{}}})},refresh:function(e){var t,n,i,o,a=this,s=a.options,l=r.getter(s.dataTextField),d=r.getter(s.dataContentField),c=r.getter(s.dataContentUrlField),u=r.getter(s.dataImageUrlField),p=r.getter(s.dataUrlField),f=r.getter(s.dataSpriteCssClass),h=[],g=a.dataSource.view();for(e=e||{},i=e.action,i&&(g=e.items),t=0,o=g.length;o>t;t++)n={text:l(g[t])},s.dataContentField&&(n.content=d(g[t])),s.dataContentUrlField&&(n.contentUrl=c(g[t])),s.dataUrlField&&(n.url=p(g[t])),s.dataImageUrlField&&(n.imageUrl=u(g[t])),s.dataSpriteCssClass&&(n.spriteCssClass=f(g[t])),h[t]=n;if("add"==e.action)e.index
t;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))):(a.trigger("dataBinding"),a.remove("li"),a.append(h),a.trigger("dataBound"))},value:function(n){var i=this;return n===t?i.select().text():(n!=i.value()&&i.tabGroup.children().each(function(){e.trim(e(this).text())==n&&i.select(this)}),t)},items:function(){return this.tabGroup[0].children},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=c(!0,t,e.animation),p.fn.setOptions.call(this,e)},events:[T,S,w,E,"change","dataBinding","dataBound"],options:{name:"TabStrip",dataTextField:"",dataContentField:"",dataImageUrlField:"",dataUrlField:"",dataSpriteCssClass:"",dataContentUrlField:"",animation:{open:{effects:"expand:vertical fadeIn",duration:200},close:{duration:200}},collapsible:!1},destroy:function(){var e=this;p.fn.destroy.call(e),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler),e.wrapper.off(h),r.destroy(e.wrapper)},select:function(t){var n=this;return 0===arguments.length?n.tabGroup.children("li."+H):(isNaN(t)||(t=n.tabGroup.children().get(t)),t=n.tabGroup.find(t),e(t).each(function(t,i){i=e(i),i.hasClass(H)||n.trigger(T,{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){t=this.tabGroup.find(t);var n=this;return t.each(function(){var t=e(this),i=t.find("."+_).data(F),r=n.contentHolder(t.index());i&&n.ajaxRequest(t,r,null,i)}),n},append:function(e){var t=this,n=t._create(e);return l(n.tabs,function(e){t.tabGroup.append(this),t.wrapper.append(n.contents[e])}),i(t.tabGroup),t._updateContentElements(),t},insertBefore:function(t,n){var r=this,o=r._create(t),a=e(r.contentElement(n.index()));return l(o.tabs,function(e){n.before(this),a.before(o.contents[e])}),i(r.tabGroup),r._updateContentElements(),r},insertAfter:function(t,n){var r=this,o=r._create(t),a=e(r.contentElement(n.index()));return l(o.tabs,function(e){n.after(this),a.after(o.contents[e])}),i(r.tabGroup),r._updateContentElements(),r},remove:function(t){var n=this,i=typeof t,r=e();return"string"===i?t=n.tabGroup.find(t):"number"===i&&(t=n.tabGroup.children().eq(t)),t.each(function(){r.push(n.contentElement(e(this).index()))}),t.remove(),r.remove(),n._updateContentElements(),n},_create:function(i){var r,o,a=e.isPlainObject(i),l=this;return a||e.isArray(i)?(i=e.isArray(i)?i:[i],r=s(i,function(t,n){return e(U.renderItem({group:l.tabGroup,item:c(t,{index:n})}))}),o=s(i,function(n,i){return n.content||n.contentUrl?e(U.renderContent({item:c(n,{index:i})})):t})):(r=e(i),o=e("
"),n(r)),{tabs:r,contents:o}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(z,n).toggleClass(P,!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("").appendTo(s.wrapper)),r=s.tabGroup.find("li").addClass("k-item"),r.length&&(o=r.filter("."+H).index(),a=o>=0?o:t,s.tabGroup.contents().filter(function(){return 3==this.nodeType&&!d(this.nodeValue)}).remove()),o>=0&&r.eq(o).addClass(M),s.contentElements=s.wrapper.children("div"),s.contentElements.addClass(A).eq(a).addClass(H).css({display:"block"}),r.length&&(n(r),i(s.tabGroup),s._updateContentElements())},_updateContentElements:function(){var t=this,n=t.options.contentUrls||[],i=t.element.attr("id"),o=t.wrapper.children("div");t.tabGroup.find(".k-item").each(function(r){var a=o.eq(r),s=i+"-"+(r+1);this.setAttribute("aria-controls",s),!a.length&&n[r]?e("
").appendTo(t.wrapper):a.attr("id",s),a.attr("role","tabpanel"),a.filter(":not(."+H+")").attr("aria-hidden",!0).attr("aria-expanded",!1),a.filter("."+H).attr("aria-expanded",!0)}),t.contentElements=t.contentAnimators=t.wrapper.children("div"),r.kineticScrollNeeded&&r.mobile.ui.Scroller&&(r.touchScroller(t.contentElements),t.contentElements=t.contentElements.children(".km-scroll-container"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(O,t.type==D)},_click:function(e){var t,n,i=this,r=e.find("."+_),o=r.attr(m),a=i.options.collapsible,s=i.contentHolder(e.index());if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is("."+P+(a?"":",."+H)))return!0;if(n=r.data(F)||o&&("#"==o.charAt(o.length-1)||-1!=o.indexOf("#"+i.element[0].id+"-")),t=!o||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(T,{item:e[0],contentElement:s[0]}))return!0;if(t!==!1)return a&&e.is("."+H)?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},deactivateTab:function(e){var t=this,n=t.options.animation,i=n.open,o=c({},n.close),a=o&&"effects"in o;e=t.tabGroup.find(e),o=c(a?o:c({reverse:!0},i),{hide:!0}),r.size(i.effects)?(e.kendoAddClass(z,{duration:i.duration}),e.kendoRemoveClass(H,{duration:i.duration})):(e.addClass(z),e.removeClass(H)),e.removeAttr("aria-selected"),t.contentAnimators.filter("."+H).kendoStop(!0,!0).kendoAnimate(o).removeClass(H).attr("aria-hidden",!0)},activateTab:function(e){var t,n,i,o,a,s,l,d,u,p,f,h,g,m,v;return e=this.tabGroup.find(e),t=this,n=t.options.animation,i=n.open,o=c({},n.close),a=o&&"effects"in o,s=e.parent().children(),l=s.filter("."+H),d=s.index(e),o=c(a?o:c({reverse:!0},i),{hide:!0}),r.size(i.effects)?(l.kendoRemoveClass(H,{duration:o.duration}),e.kendoRemoveClass(O,{duration:o.duration})):(l.removeClass(H),e.removeClass(O)),u=t.contentAnimators,e.data("in-request")&&(t.xhr.abort(),e.removeAttr("data-in-request")),0===u.length?(l.removeClass(M),e.addClass(M).css("z-index"),e.addClass(H),t._current(e),t.trigger("change"),!1):(p=u.filter("."+H),f=t.contentHolder(d),h=f.closest(".k-content"),0===f.length?(p.removeClass(H).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(o),!1):(e.attr("data-animating",!0),g=(e.children("."+_).data(F)||!1)&&f.is(x),m=function(){l.removeClass(M),e.addClass(M).css("z-index"),r.size(i.effects)?(l.kendoAddClass(z,{duration:i.duration}),e.kendoAddClass(H,{duration:i.duration})):(l.addClass(z),e.addClass(H)),l.removeAttr("aria-selected"),e.attr("aria-selected",!0),t._current(e),h.addClass(H).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(c({init:function(){t.trigger(S,{item:e[0],contentElement:f[0]})}},i,{complete:function(){e.removeAttr("data-animating")}}))},v=function(){g?(e.removeAttr("data-animating"),t.ajaxRequest(e,f,function(){e.attr("data-animating",!0),m(),t.trigger("change")})):(m(),t.trigger("change"))},p.removeClass(H),p.attr("aria-hidden",!0),p.attr("aria-expanded",!1),p.length?p.kendoStop(!0,!0).kendoAnimate(c({complete:v},o)):v(),!0))},contentElement:function(e){var n,i,o,a;if(isNaN(e-0))return t;if(n=this.contentElements&&this.contentElements[0]&&!r.kineticScrollNeeded?this.contentElements:this.contentAnimators,i=RegExp("-"+(e+1)+"$"),n)for(o=0,a=n.length;a>o;o++)if(i.test(n.closest(".k-content")[o].id))return n[o];return t},contentHolder:function(t){var n=e(this.contentElement(t)),i=n.children(".km-scroll-container");return r.support.touch&&i[0]?i:n},ajaxRequest:function(t,n,i,r){if(t=this.tabGroup.find(t),!t.find(".k-loading").length){var o=this,a=t.find("."+_),s={},l=null,d=setTimeout(function(){l=e(" ").prependTo(a)},100);r=r||a.data(F)||a.attr(m),t.attr("data-in-request",!0),o.xhr=e.ajax({type:"GET",cache:!1,url:r,dataType:"html",data:s,error:function(e,t){o.trigger("error",{xhr:e,status:t})&&this.complete()},complete:function(){t.removeAttr("data-in-request"),clearTimeout(d),null!==l&&l.remove()},success:function(e){try{n.html(e)}catch(a){var s=window.console;s&&s.error&&s.error(a.name+": "+a.message+" in "+r),this.error(this.xhr,"error")}i&&i.call(o,n),o.trigger(E,{item:t[0],contentElement:n[0]})}})}}});c(U,{renderItem:function(e){e=c({tabStrip:{},group:{}},e);var t=L.empty,n=e.item;return L.item(c(e,{image:n.imageUrl?L.image:t,sprite:n.spriteCssClass?L.sprite:t,itemWrapper:L.itemWrapper},V))},renderContent:function(e){return L.content(c(e,V))}}),r.ui.plugin(U)}(window.kendo.jQuery),function(e,t){function n(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*P))}function i(){var e=new G,t=new G(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),n=new G(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);return-1*(t.getTimezoneOffset()-n.getTimezoneOffset())}function r(e){return 60*e.getHours()*P+e.getMinutes()*P+1e3*e.getSeconds()+e.getMilliseconds()}function o(e,t,n){var i,o=r(t),a=r(n);return e&&o!=a?(i=r(e),o>i&&(i+=z),o>a&&(a+=z),i>=o&&a>=i):!0}function a(e){var t=e.parseFormats;e.format=f(e.format||c.getCulture(e.culture).calendars.standard.patterns.t),t=W(t)?t:[t],t.splice(0,0,e.format),e.parseFormats=t}function s(e){e.preventDefault()}var l,d,c=window.kendo,u=c.keys,p=c._activeElement,f=c._extractFormat,h=c.support,g=h.browser,m=c.ui,v=m.Widget,_="open",b="close",y="change",w=".kendoTimePicker",x="click"+w,k="k-state-default",C="disabled",T="readonly",S="li",A=" ",F="k-state-focused",D="k-state-hover",I="mouseenter"+w+" mouseleave"+w,E="mousedown"+w,P=6e4,z=864e5,H="k-state-selected",R="k-state-disabled",O="aria-selected",M="aria-expanded",N="aria-hidden",B="aria-disabled",L="aria-readonly",V="aria-activedescendant",U="id",W=e.isArray,j=e.extend,q=e.proxy,G=Date,$=new G;$=new G($.getFullYear(),$.getMonth(),$.getDate(),0,0,0),l=function(t){var n=this,i=t.id;n.options=t,n.ul=e('').css({overflow:h.kineticScrollNeeded?"":"auto"}).on(x,S,q(n._click,n)).on("mouseenter"+w,S,function(){e(this).addClass(D)}).on("mouseleave"+w,S,function(){e(this).removeClass(D)}),n.list=e("
").append(n.ul).on(E,s),i&&(n._timeViewID=i+"_timeview",n._optionID=i+"_option_selected",n.ul.attr(U,n._timeViewID)),n._popup(),n.template=c.template('#=data# ',{useWithBlock:!1})
},l.prototype={current:function(n){var i=this,r=i.options.active;return n===t?i._current:(i._current&&i._current.removeClass(H).removeAttr(O).removeAttr(U),n&&(n=e(n).addClass(H).attr(U,i._optionID).attr(O,!0),i.scroll(n[0])),i._current=n,r&&r(n),t)},close:function(){this.popup.close()},destroy:function(){var e=this;e.ul.off(w),e.list.off(w),e.popup.destroy()},open:function(){var e=this;e.ul[0].firstChild||e.bind(),e.popup.open(),e._current&&e.scroll(e._current[0])},dataBind:function(e){for(var t,n=this,i=n.options,r=i.format,a=c.toString,s=n.template,l=e.length,d=0,u="";l>d;d++)t=e[d],o(t,i.min,i.max)&&(u+=s(a(t,r,i.culture)));n._html(u,l)},refresh:function(){var e,t,o,a=this,s=a.options,l=s.format,d=i(),u=0>d,p=s.min,f=s.max,h=r(p),g=r(f),m=s.interval*P,v=c.toString,_=a.template,b=new G(+p),y=b.getDate(),w=0,x="";for(o=u?(z+d*P)/m:z/m,h!=g&&(h>g&&(g+=z),o=(g-h)/m+1),t=parseInt(o,10);o>w;w++)w&&n(b,m,u),g&&t==w&&(e=r(b),b.getDate()>y&&(e+=z),e>g&&(b=new G(+f))),x+=_(v(b,l,s.culture));a._html(x,o)},bind:function(){var e=this,t=e.options.dates;t&&t[0]?e.dataBind(t):e.refresh()},_html:function(e,t){var n=this;n.ul[0].innerHTML=e,n._height(t),n.current(null),n.select(n._value)},scroll:function(e){if(e){var t=this.ul[0],n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,o=t.clientHeight,a=n+i;t.scrollTop=r>n?n:a>r+o?a-o:r}},select:function(t){var n=this,i=n.options,r=n._current;t instanceof Date&&(t=c.toString(t,i.format,i.culture)),"string"==typeof t&&(r&&r.text()===t?t=r:(t=e.grep(n.ul[0].childNodes,function(e){return(e.textContent||e.innerText)==t}),t=t[0]?t:null)),n.current(t)},toggle:function(){var e=this;e.popup.visible()?e.close():e.open()},value:function(e){var t=this;t._value=e,t.ul[0].firstChild&&t.select(e)},_click:function(t){var n=this,i=e(t.currentTarget);t.isDefaultPrevented()||(n.select(i),n.options.change(i.text(),!0),n.close())},_height:function(e){if(e){var t=this,n=t.list,i=n.parent(".k-animation-container"),r=t.options.height;n.add(i).show().height(t.ul[0].scrollHeight>r?r:"auto").hide()}},_parse:function(e){var t=this,n=t.options,i=t._value||$;return e instanceof G?e:(e=c.parseDate(e,n.parseFormats,n.culture),e&&(e=new G(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),e)},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,r=this.options.anchor;(n.data("width")||!i)&&(e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=e?parseFloat(e.width):r.outerWidth(),e&&(g.mozilla||g.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i=t-(n.outerWidth()-n.width()),n.css({fontFamily:r.css("font-family"),width:i}).data("width",i))},_popup:function(){var e=this,t=e.list,n=e.options,i=n.anchor;e.popup=new m.Popup(t,j(n.popup,{anchor:i,open:n.open,close:n.close,animation:n.animation,isRtl:h.isRtl(n.anchor)})),c.touchScroller(e.popup.element)},move:function(e){var n=this,i=e.keyCode,r=n.ul[0],o=n._current,a=i===u.DOWN;if(i===u.UP||a){if(e.altKey)return n.toggle(a),t;o=a?o?o[0].nextSibling:r.firstChild:o?o[0].previousSibling:r.lastChild,o&&n.select(o),n.options.change(n._current.text()),e.preventDefault()}else(i===u.ENTER||i===u.TAB||i===u.ESC)&&(e.preventDefault(),o&&n.options.change(o.text(),!0),n.close())}},l.getMilliseconds=r,c.TimeView=l,d=v.extend({init:function(e,t){var n,i,r,o=this;v.fn.init.call(o,e,t),e=o.element,t=o.options,a(t),o._wrapper(),o.timeView=i=new l(j({},t,{id:e.attr(U),anchor:o.wrapper,format:t.format,change:function(t,n){n?o._change(t):e.val(t)},open:function(t){o.timeView._adjustListWidth(),o.trigger(_)?t.preventDefault():(e.attr(M,!0),n.attr(N,!1))},close:function(t){o.trigger(b)?t.preventDefault():(e.attr(M,!1),n.attr(N,!0))},active:function(t){e.removeAttr(V),t&&e.attr(V,i._optionID)}})),n=i.ul,o._icon(),o._reset(),e[0].type="text",e.addClass("k-input").attr({role:"textbox","aria-haspopup":!0,"aria-expanded":!1,"aria-owns":i._timeViewID}),r=e.is("[disabled]"),r?o.enable(!1):o.readonly(e.is("[readonly]")),o.value(t.value||e.val()),c.notify(o)},options:{name:"TimePicker",min:$,max:$,format:"",dates:[],parseFormats:[],value:null,interval:30,height:200,animation:{}},events:[_,b,y],setOptions:function(e){var t=this,n=t.timeView,i=n.options;v.fn.setOptions.call(t,e),a(t.options),n.options=j(i,t.options,{active:i.active,change:i.change,close:i.close,open:i.open}),n.ul[0].innerHTML=""},dataBind:function(e){W(e)&&this.timeView.dataBind(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._arrow.off(w),o=t.element.off(w),a=t._inputWrapper.off(w);i||n?(a.addClass(n?R:k).removeClass(n?k:R),o.attr(C,n).attr(T,i).attr(B,n).attr(L,i)):(a.addClass(k).removeClass(R).on(I,t._toggleHover),o.removeAttr(C).removeAttr(T).attr(B,!1).attr(L,!1).on("keydown"+w,q(t._keydown,t)).on("blur"+w,q(t._blur,t)).on("focus"+w,function(){t._inputWrapper.addClass(F)}),r.on(x,q(t._click,t)).on(E,s))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;v.fn.destroy.call(e),e.timeView.destroy(),e.element.off(w),e._arrow.off(w),e._inputWrapper.off(w),e._form&&e._form.off("reset",e._resetHandler)},close:function(){this.timeView.close()},open:function(){this.timeView.open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(F)},_click:function(){var e=this,t=e.element;e.timeView.toggle(),h.touch||t[0]===p()||t.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t.trigger(y),t.element.trigger(y))},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('select ').insertAfter(i)),n._arrow=t.attr({role:"button","aria-controls":n.timeView._timeViewID})},_keydown:function(e){var t=this,n=e.keyCode,i=t.timeView,r=t.element.val();i.popup.visible()||e.altKey?i.move(e):n===u.ENTER&&r!==t._oldText&&t._change(r)},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=i.timeView._parse(n),n&&(n=new G(+n),r[e]=n,i.timeView.options[e]=n,i.timeView.bind()),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(D,"mouseenter"===t.type)},_update:function(e){var t=this,n=t.options,i=t.timeView,r=i._parse(e);return o(r,n.min,n.max)||(r=null),t._value=r,t.element.val(r?c.toString(r,n.format,n.culture):e),i.value(r),r},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-timepicker"),t[0]||(t=i.wrap(A).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(A).parent()),t[0].style.cssText=i[0].style.cssText,n.wrapper=t.addClass("k-widget k-timepicker k-header").addClass(i[0].className),i.css({width:"100%",height:i[0].style.height}),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var e=this,t=e.element,n=t.closest("form");n[0]&&(e._resetHandler=function(){e.value(t[0].defaultValue)},e._form=n.on("reset",e._resetHandler))}}),m.plugin(d)}(window.kendo.jQuery),function(e,t){function n(e){e.preventDefault()}function i(t){var n,i=r.getCulture(t.culture).calendars.standard.patterns;t.format=l(t.format||i.g),t.timeFormat=n=l(t.timeFormat||i.t),r.DateView.normalize(t),-1===e.inArray(n,t.parseFormats)&&t.parseFormats.splice(1,0,n)}var r=window.kendo,o=r.TimeView,a=r.parseDate,s=r._activeElement,l=r._extractFormat,d=r.calendar,c=d.isInRange,u=d.restrictValue,p=d.isEqualDatePart,f=o.getMilliseconds,h=r.ui,g=h.Widget,m="open",v="close",_="change",b=".kendoDateTimePicker",y="click"+b,w="disabled",x="readonly",k="k-state-default",C="k-state-focused",T="k-state-hover",S="k-state-disabled",A="mouseenter"+b+" mouseleave"+b,F="mousedown"+b,D="month",I=" ",E="aria-activedescendant",P="aria-expanded",z="aria-hidden",H="aria-owns",R="aria-disabled",O="aria-readonly",M=Date,N=new M(1900,0,1),B=new M(2099,11,31),L={view:"date"},V={view:"time"},U=e.extend,W=g.extend({init:function(e,t){var n,o=this;g.fn.init.call(o,e,t),e=o.element,t=o.options,i(t),o._wrapper(),o._views(),o._icons(),o._reset(),o._template(),e[0].type="text",e.addClass("k-input").attr({role:"textbox","aria-haspopup":!0,"aria-expanded":!1}),o._midnight=0===f(t.min)+f(t.max),n=e.is("[disabled]"),n?o.enable(!1):o.readonly(e.is("[readonly]")),o.value(t.value||e.val()),r.notify(o)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],min:new M(N),max:new M(B),interval:30,height:200,footer:"",start:D,depth:D,animation:{},month:{},ARIATemplate:'Current focused date is #=kendo.toString(data.current, "G")#'},events:[m,v,_],setOptions:function(e){var t=this,n=t.dateView.options,r=t.timeView.options;g.fn.setOptions.call(t,e),i(t.options),e=t.options,U(n,e,{change:n.change,close:n.close,open:n.open}),U(r,e,{format:e.timeFormat,active:r.active,change:r.change,close:r.close,open:r.open}),t.timeView.ul[0].innerHTML=""},_editable:function(t){var i=this,o=i.element.off(b),a=i._dateIcon.off(b),l=i._timeIcon.off(b),d=i._inputWrapper.off(b),c=t.readonly,u=t.disable;c||u?(d.addClass(u?S:k).removeClass(u?k:S),o.attr(w,u).attr(x,c).attr(R,u).attr(O,c)):(d.addClass(k).removeClass(S).on(A,i._toggleHover),o.removeAttr(w).removeAttr(x).attr(R,!1).attr(O,!1).on("keydown"+b,e.proxy(i._keydown,i)).on("focus"+b,function(){i._inputWrapper.addClass(C)}).on("blur"+b,function(){i._inputWrapper.removeClass(C),o.val()!==i._oldText&&i._change(o.val()),i.close("date"),i.close("time")}),a.on(F,n).on(y,function(){i.toggle("date"),r.support.touch||o[0]===s()||o.focus()}),l.on(F,n).on(y,function(){i.toggle("time"),r.support.touch||o[0]===s()||o.focus()}))},readonly:function(e){this._editable({readonly:e===t?!0:e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t?!0:e)})},destroy:function(){var e=this;g.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.element.off(b),e._dateIcon.off(b),e._timeIcon.off(b),e._inputWrapper.off(b),e._form&&e._form.off("reset",e._resetHandler)},close:function(e){"time"!==e&&(e="date"),this[e+"View"].close()},open:function(e){"time"!==e&&(e="date"),this[e+"View"].open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},toggle:function(e){var t="timeView";"time"!==e?e="date":t="dateView",this[e+"View"].toggle(),this[t].close()},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t.trigger(_),t.element.trigger(_))},_option:function(e,n){var i=this,r=i.options,o=i.timeView,s=o.options,l=i._value||i._old;if(n===t)return r[e];if(n=a(n,r.parseFormats,r.culture)){if(r[e]=new M(+n),i.dateView[e](n),i._midnight=0===f(r.min)+f(r.max),l&&p(n,l)){if(i._midnight&&"max"==e)return s[e]=B,o.dataBind([B]),t;s[e]=n}else s.max=B,s.min=N;o.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_update:function(t){var n,i,o,s,l,d=this,f=d.options,h=f.min,g=f.max,m=f.dates,v=d.timeView,_=a(t,f.parseFormats,f.culture);return+_===+d._value?(l=r.toString(_,f.format,f.culture),l!==t&&d.element.val(null===_?t:l),_):(null!==_&&p(_,h)?_=u(_,h,g):c(_,h,g)||(_=null),d._value=_,v.value(_),d.dateView.value(_),_&&(o=d._old,i=v.options,m[0]&&(m=e.grep(m,function(e){return p(_,e)}),m[0]&&(v.dataBind(m),s=!0)),s||(p(_,h)&&(i.min=h,i.max=B,n=!0),p(_,g)&&(d._midnight?(v.dataBind([B]),s=!0):(i.max=g,n||(i.min=N),n=!0))),!s&&(!o&&n||o&&!p(o,_))&&(n||(i.max=B,i.min=N),v.bind())),d.element.val(_?r.toString(_,f.format,f.culture):t),d._updateARIA(_),_)},_keydown:function(e){var t=this,n=t.dateView,i=t.timeView,o=t.element.val(),a=n.popup.visible();e.altKey&&e.keyCode===r.keys.DOWN?t.toggle(a?"time":"date"):a?(n.move(e),t._updateARIA(n._current)):i.popup.visible()?i.move(e):e.keyCode===r.keys.ENTER&&o!==t._oldText&&t._change(o)},_views:function(){var e,t,n,i,s,l=this,d=l.element,u=l.options,p=d.attr("id");l.dateView=e=new r.DateView(U({},u,{id:p,anchor:l.wrapper,change:function(){var t,n=e.calendar.value(),i=+n,r=+u.min,o=+u.max;(i===r||i===o)&&(t=new M(+l._value),t.setFullYear(n.getFullYear()),t.setMonth(n.getMonth()),t.setDate(n.getDate()),c(t,r,o)&&(n=t)),l._change(n),l.close("date")},close:function(e){l.trigger(v,L)?e.preventDefault():(d.attr(P,!1),n.attr(z,!0),t.popup.visible()||d.removeAttr(H))},open:function(t){l.trigger(m,L)?t.preventDefault():(l.element.val()!==l._oldText&&(s=a(d.val(),u.parseFormats,u.culture),s?(l.dateView._current=s,l.dateView.calendar._focus(s)):l.dateView.value(s)),n.attr(z,!1),d.attr(P,!0).attr(H,e._dateViewID))}})),n=e.div,l.timeView=t=new o({id:p,value:u.value,anchor:l.wrapper,animation:u.animation,format:u.timeFormat,culture:u.culture,height:u.height,interval:u.interval,min:new M(N),max:new M(B),parseFormats:u.parseFormats,change:function(n,i){n=t._parse(n),u.min>n?(n=new M(+u.min),t.options.min=n):n>u.max&&(n=new M(+u.max),t.options.max=n),i?(l._timeSelected=!0,l._change(n)):(d.val(r.toString(n,u.format,u.culture)),e.value(n),l._updateARIA(n))},close:function(t){l.trigger(v,V)?t.preventDefault():(i.attr(z,!0),d.attr(P,!1),e.popup.visible()||d.removeAttr(H))},open:function(e){t._adjustListWidth(),l.trigger(m,V)?e.preventDefault():(i.attr(z,!1),d.attr(P,!0).attr(H,t._timeViewID))},active:function(e){d.removeAttr(E),e&&d.attr(E,t._optionID)}}),i=t.ul},_icons:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('select select ').insertAfter(i)),t=t.children(),n._dateIcon=t.eq(0).attr({role:"button","aria-controls":n.dateView._dateViewID}),n._timeIcon=t.eq(1).attr({role:"button","aria-controls":n.timeView._timeViewID})},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datetimepicker"),t[0]||(t=i.wrap(I).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(I).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-datetimepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var e=this,t=e.element,n=t.closest("form");n[0]&&(e._resetHandler=function(){e.value(t[0].defaultValue)},e._form=n.on("reset",e._resetHandler))},_template:function(){this._ariaTemplate=r.template(this.options.ARIATemplate)},_updateARIA:function(e){this.element.attr("aria-label",this._ariaTemplate({current:e}))}});h.plugin(W)}(window.kendo.jQuery),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 e.children("div").find(".k-checkbox:first :checkbox")}function r(e){return function(t,n){n=n.closest(L);var i,r=n.parent();return r.parent().is("li")&&(i=r.parent()),this._dataSourceMove(t,r,i,function(t,i){return this._insert(t.data(),i,n.index()+e)})}}function o(t){var n,i,r=t.children("div"),o=t.children("ul"),a=r.children(".k-icon"),s=t.children(":checkbox"),l=r.children(".k-in");if(!t.hasClass("k-treeview")&&(r.length||(r=e("
").prependTo(t)),!a.length&&o.length?a=e(" ").prependTo(r):o.length&&o.children().length||(a.remove(),o.remove()),s.length&&e(" ").appendTo(r).append(s),!l.length))for(l=e(" ").appendTo(r)[0],n=r[0].nextSibling,l=r.find(".k-in")[0];n&&"ul"!=n.nodeName.toLowerCase();)i=n,n=n.nextSibling,3==i.nodeType&&(i.nodeValue=e.trim(i.nodeValue)),l.appendChild(i)}function a(e){var t=this;t.treeview=e,t.hovered=e.element,t._draggable=new p.Draggable(e.element,{filter:"div:not(.k-state-disabled) .k-in",hint:function(t){return e.templates.dragClue({item:e.dataItem(t),treeview:e.options})},cursorOffset:{left:10,top:u.support.touch||u.support.pointers?-40/u.support.zoomLevel():10},dragstart:b(t.dragstart,t),dragcancel:b(t.dragcancel,t),drag:b(t.drag,t),dragend:b(t.dragend,t)})}var s,l,d,c,u=window.kendo,p=u.ui,f=u.data,h=e.extend,g=u.template,m=e.isArray,v=p.Widget,_=f.HierarchicalDataSource,b=e.proxy,y=u.keys,w=".kendoTreeView",x="select",k="navigate",C="expand",T="change",S="error",A="checked",F="collapse",D="dragstart",I="drag",E="drop",P="dragend",z="dataBound",H="click",R="visibility",O="undefined",M="k-state-hover",N="k-treeview",B=":visible",L=".k-item",V="string",U="aria-selected",W="aria-disabled",j={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},q=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===V};l=n(".k-group"),d=n(".k-group,.k-content"),c=function(e){return e.children("div").children(".k-icon")},s=v.extend({init:function(e,t){var n,i=this,r=!1;m(t)&&(n=!0,t={dataSource:t}),t&&typeof t.loadOnDemand==O&&m(t.dataSource)&&(t.loadOnDemand=!1),v.prototype.init.call(i,e,t),e=i.element,t=i.options,r=e.is("ul")||e.hasClass(N),r&&(t.dataSource.list=e.is("ul")?e:e.children("ul")),i._animation(),i._accessors(),i._templates(),e.hasClass(N)?(i.wrapper=e,i.root=e.children("ul").eq(0)):(i._wrapper(),r&&(i.root=e,i._group(i.wrapper))),i._tabindex(),i.wrapper.filter("[role=tree]").length||i.wrapper.attr("role","tree"),i._dataSource(r),i._attachEvents(),t.dragAndDrop&&(i.dragging=new a(i)),r?i._attachUids():t.autoBind&&(i._progress(!0),i.dataSource.fetch()),t.checkboxes&&t.checkboxes.checkChildren&&i._updateIndeterminateInitial(i.wrapper),i.element[0].id&&(i._ariaId=u.format("{0}_tv_active",i.element[0].id))},_attachEvents:function(){var t=this,n=".k-in:not(.k-state-selected,.k-state-disabled)",i="mouseenter";t.wrapper.on(i+w,".k-in.k-state-selected",function(e){e.preventDefault()}).on(i+w,n,function(){e(this).addClass(M)}).on("mouseleave"+w,n,function(){e(this).removeClass(M)}).on(H+w,n,b(t._click,t)).on("dblclick"+w,".k-in:not(.k-state-disabled)",b(t._toggleButtonClick,t)).on(H+w,".k-plus,.k-minus",b(t._toggleButtonClick,t)).on("keydown"+w,b(t._keydown,t)).on("focus"+w,b(t._focus,t)).on("blur"+w,b(t._blur,t)).on("mousedown"+w,".k-in,.k-checkbox :checkbox,.k-plus,.k-minus",b(t._mousedown,t)).on("change"+w,".k-checkbox :checkbox",b(t._checkboxChange,t)).on("click"+w,".k-checkbox :checkbox",b(t._checkboxClick,t)).on("click"+w,".k-request-retry",b(t._retryRequest,t)).on("click"+w,function(n){e(n.target).is(":focusable")||t.focus()})},_checkboxClick:function(t){var n=e(t.target);n.data("indeterminate")&&(n.data("indeterminate",!1).prop("indeterminate",!1).prop(A,!0),this._checkboxChange(t))},_attachUids:function(t,n){var i,r=this,o=u.attr("uid");t=t||r.root,n=n||r.dataSource,i=n.view(),t.children("li").each(function(t,n){n=e(n).attr(o,i[t].uid),n.attr("role","treeitem"),r._attachUids(n.children("ul"),i[t].children)})},_animation:function(){var e=this.options,t=e.animation;t===!1?t={expand:{effects:{}},collapse:{hide:!0,effects:{}}}:t.collapse&&"effects"in t.collapse||(t.collapse=h({reverse:!0},t.expand)),h(t.collapse,{hide:!0}),e.animation=t},_templates:function(){var e=this,t=e.options,n=b(e._fieldAccessor,e);t.template&&typeof t.template==V?t.template=g(t.template):t.template||(t.template=g("# var text = "+n("text")+"(item); #"+"# if (typeof item.encoded != 'undefined' && item.encoded === false) {#"+"#= text #"+"# } else { #"+"#: text #"+"# } #")),e._checkboxes(),e.templates={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){var t="k-in";return e.enabled===!1&&(t+=" k-state-disabled"),e.selected===!0&&(t+=" k-state-selected"),t},toggleButtonClass:function(e){var t="k-icon";return t+=e.expanded!==!0?" k-plus":" k-minus",e.enabled===!1&&(t+="-disabled"),t},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(e){var t="k-group";return e.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:g(""),group:g(""),itemContent:g("# var imageUrl = "+n("imageUrl")+"(item); #"+"# var spriteCssClass = "+n("spriteCssClass")+"(item); #"+"# if (imageUrl) { #"+" "+"# } #"+"# if (spriteCssClass) { #"+" "+"# } #"+"#= treeview.template(data) #"),itemElement:g("# var url = "+n("url")+"(item); #"+""+"# if (item.hasChildren) { #"+" "+"# } #"+"# if (treeview.checkboxes) { #"+""+"#= treeview.checkboxes.template(data) #"+" "+"# } #"+"# var tag = url ? 'a' : 'span'; #"+"# var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #"+"<#=tag# class='#= r.textClass(item) #'#= textAttr #>"+"#= r.itemContent(data) #"+"#=tag#>"+"
"),item:g(""+"#= r.itemElement(data) #"+" "),loading:g("
Loading..."),retry:g("Request failed. Retry ")}},items:function(){return this.element.find(".k-item")},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.dataSource.fetch()},_dataSource:function(e){function t(e){for(var n=0;e.length>n;n++)e[n]._initChildren(),e[n].children.fetch(),t(e[n].children.view())}var n=this,i=n.options,r=i.dataSource;r=m(r)?{data:r}:r,n.dataSource&&(n.dataSource.unbind(T,b(n.refresh,n)),n.dataSource.unbind(S,b(n._error,n))),r.fields||(r.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),n.dataSource=r=_.create(r),e&&(r.fetch(),t(r.view())),r.bind(T,b(n.refresh,n)),r.bind(S,b(n._error,n))},events:[D,I,E,P,z,C,F,x,T,k],options:{name:"TreeView",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:100}},dragAndDrop:!1,checkboxes:!1,autoBind:!0,loadOnDemand:!0,template:"",dataTextField:null},_accessors:function(){var e,t,n,i=this,r=i.options,o=i.element;for(e in j)t=r[j[e]],n=o.attr(u.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),m(t)||(t=[t]),r[j[e]]=t},_fieldAccessor:function(t){var n=this.options[j[t]],i=n.length,r="(function(item) {";return 0===i?r+="return item['"+t+"'];":(r+="var level = item.level();var levels = ["+e.map(n,function(e){return"function(d){ return "+u.expr(e)+"}"}).join(",")+"];",r+="return levels[Math.min(level, "+i+"-1)](item)"),r+="})"},setOptions:function(e){var t=this;"dragAndDrop"in e&&e.dragAndDrop&&!t.options.dragAndDrop&&(t.dragging=new a(t)),v.fn.setOptions.call(t,e),t._animation(),t._templates()},_trigger:function(e,t){return this.trigger(e,{node:t.closest(L)[0]})},_setChecked:function(t,n){if(t&&e.isFunction(t.view))for(var i=0,r=t.view();r.length>i;i++)r[i][A]=n,r[i].children&&this._setChecked(r[i].children,n)},_setIndeterminate:function(e){var t,n,r,o=l(e),a=!0;if(o.length){if(t=i(o.children()),n=t.length,n>1){for(r=1;n>r;r++)if(t[r].checked!=t[r-1].checked||t[r].indeterminate||t[r-1].indeterminate){a=!1;break}}else a=!t[0].indeterminate;i(e).data("indeterminate",!a).prop("indeterminate",!a).prop(A,a&&t[0].checked)}},_updateIndeterminateInitial:function(e){var t,n=l(e).children();if(n.length){for(t=0;n.length>t;t++)this._updateIndeterminateInitial(n.eq(t));this._setIndeterminate(e)}},_updateIndeterminate:function(e){var t,n=this.parent(e);n.length&&(this._setIndeterminate(n),t=n.children("div").find(".k-checkbox :checkbox"),t.prop("indeterminate")===!1?this.dataItem(n).set(A,t.prop(A)):this.dataItem(n).checked=!1,this._updateIndeterminate(n))},_checkboxChange:function(t){var n=e(t.target),i=n.prop(A),r=n.closest(L),o=this;o.dataItem(r).set(A,i)},_toggleButtonClick:function(t){this.toggle(e(t.target).closest(L))},_mousedown:function(t){var n=e(t.currentTarget).closest(L);this._clickTarget=n,this.current(n)},_focusable:function(e){return e&&e.length&&e.is(":visible")&&!e.find(".k-in:first").hasClass("k-state-disabled")},_focus:function(){var t=this.select(),n=this._clickTarget;u.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(t.focus(),e=0;i.length>e;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("k-state-disabled")},parent:function(t){var n,i,r=/\bk-treeview\b/,o=/\bk-item\b/;typeof t==V&&(t=this.element.find(t)),q(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){var t,n=this,i=n._expanded(e);if(e.length&&e.is(":visible"))if(i)t=l(e).children().first();else{for(;e.length&&!e.next().length;)e=n.parent(e);t=e.next().length?e.next():e}else t=n.root.children().eq(0);return n._enabled(t)||(t=n._nextVisible(t)),t},_previousVisible:function(e){var t,n=this;if(!e.length||e.prev().length)for(t=e.length?e.prev():n.root.children().last();n._expanded(t);)t=l(t).children().last();else t=n.parent(e)||e;return n._enabled(t)||(t=n._previousVisible(t)),t},_keydown:function(n){var i,r=this,o=n.keyCode,a=r.current(),s=r._expanded(a),l=a.find(".k-checkbox:first :checkbox"),d=u.support.isRtl(r.element);n.target==n.currentTarget&&(!d&&o==y.RIGHT||d&&o==y.LEFT?s?i=r._nextVisible(a):r.expand(a):!d&&o==y.LEFT||d&&o==y.RIGHT?s?r.collapse(a):(i=r.parent(a),r._enabled(i)||(i=t)):o==y.DOWN?i=r._nextVisible(a):o==y.UP?i=r._previousVisible(a):o==y.HOME?i=r._nextVisible(e()):o==y.END?i=r._previousVisible(e()):o==y.ENTER?a.find(".k-in:first").hasClass("k-state-selected")||r._trigger(x,a)||r.select(a):o==y.SPACEBAR&&l.length&&(l.prop(A,!l.prop(A)).data("indeterminate",!1).prop("indeterminate",!1),r._checkboxChange({target:l}),i=a),i&&(n.preventDefault(),a[0]!=i[0]&&(r._trigger(k,i),r.current(i))))},_click:function(t){var n,i=this,r=e(t.target),o=d(r.closest(L)),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(x,r)||i.select(r)},_wrapper:function(){var e,t,n=this,i=n.element,r="k-widget k-treeview";i.is("div")?(e=i,t=e.children("ul").eq(0)):(e=i.wrap("
").parent(),t=i),n.wrapper=e.addClass(r),n.root=t},_group:function(e){var t=this,n=e.hasClass(N),i={firstLevel:n,expanded:n||t._expanded(e)},r=e.children("ul");r.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),t._nodes(r,i)},_nodes:function(t,n){var i,r=this,a=t.children("li");n=h({length:a.length},n),a.each(function(t,a){a=e(a),i={index:t,expanded:r._expanded(a)},o(a),r._updateNodeClasses(a,n,i),r._group(a)})},_checkboxes:function(){var e,t=this.options,n=t.checkboxes;(n||t.checkboxTemplate)&&(t.checkboxTemplate?e=t.checkboxTemplate:(e=" "),n=h({template:e},t.checkboxes),typeof n.template==V&&(n.template=g(n.template)),t.checkboxes=n)},_updateNodeClasses:function(e,t,n){var i=e.children("div"),r=e.children("ul"),o=this.templates;e.hasClass("k-treeview")||(n=n||{},n.expanded=typeof n.expanded!=O?n.expanded:this._expanded(e),n.index=typeof n.index!=O?n.index:e.index(),n.enabled=typeof n.enabled!=O?n.enabled:!i.children(".k-in").hasClass("k-state-disabled"),t=t||{},t.firstLevel=typeof t.firstLevel!=O?t.firstLevel:e.parent().parent().hasClass(N),t.length=typeof t.length!=O?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(o.wrapperCssClass(t,n)),i.removeClass("k-top k-mid k-bot").addClass(o.cssClass(t,n)),i.children(".k-in").removeClass("k-in k-state-default k-state-disabled").addClass(o.textClass(n)),(r.length||"true"==e.attr("data-hasChildren"))&&(i.children(".k-icon").removeClass("k-plus k-minus k-plus-disabled k-minus-disabled").addClass(o.toggleButtonClass(n)),r.addClass("k-group")))},_processNodes:function(t,n){var i=this;i.element.find(t).each(function(t,r){n.call(i,t,e(r).closest(L))})},dataItem:function(t){var n=e(t).closest(L).attr(u.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},_insertNode:function(t,n,i,r,a){var s,d,c,u,p=this,f=l(i),h=f.children().length+1,g={firstLevel:i.hasClass(N),expanded:!a,length:h},m="",v=function(e,t){e.appendTo(t)};for(c=0;t.length>c;c++)u=t[c],u.index=n+c,m+=p._renderItem({group:g,item:u});if(d=e(m),d.length){for(f.length||(f=e(p._renderGroup({group:g})).appendTo(i)),r(d,f),i.hasClass("k-item")&&(o(i),p._updateNodeClasses(i)),p._updateNodeClasses(d.prev().first()),p._updateNodeClasses(d.next().last()),c=0;t.length>c;c++)u=t[c],u.hasChildren&&(s=u.children.data(),s.length&&p._insertNode(s,u.index,d.eq(c),v,!p._expanded(d.eq(c))));return d}},_updateNode:function(t,n){function i(){f=!0}function r(e,t){e.find(".k-checkbox :checkbox").prop(A,t).data("indeterminate",!1).prop("indeterminate",!1)}var o,a,s,l,c,u=this,p={treeview:u.options,item:s},f=!1;if("selected"==t)s=n[0],a=u.findByUid(s.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected",s[t]).end(),s[t]?(u.current(a),a.attr(U,!0)):a.attr(U,!1);else for(e.inArray(t,u.options.dataTextField)>=0?f=!0:(p.item=n[0],p.item.bind("get",i),u.templates.itemContent(p),p.item.unbind("set",i)),o=0;n.length>o;o++)p.item=s=n[o],"spriteCssClass"==t||"imageUrl"==t||f?u.findByUid(s.uid).find(">div>.k-in").html(u.templates.itemContent(p)):t==A?(a=u.findByUid(s.uid),l=s[t],r(a.children("div"),l),u.options.checkboxes.checkChildren&&(r(a.children(".k-group"),l),u._setChecked(s.children,l),u._updateIndeterminate(a))):"expanded"==t?u._toggle(u.findByUid(s.uid),s,s[t]):"enabled"==t&&(a=u.findByUid(s.uid),a.find(".k-checkbox :checkbox").prop("disabled",!s[t]),c=!d(a).is(B),a.removeAttr(W),s[t]||(s.selected&&s.set("selected",!1),s.expanded&&s.set("expanded",!1),c=!0,a.removeAttr(U).attr(W,!0)),u._updateNodeClasses(a,{},{enabled:s[t],expanded:!c}))},refresh:function(e){function n(e,t){var n=l(t),i=n.children(),o=!r._expanded(t);typeof u==O&&(u=i.length),r._insertNode(e,u,t,function(e,t){u==i.length?e.appendTo(t):e.insertBefore(i.eq(u))},o),r._expanded(t)&&(r._updateNodeClasses(t),l(t).css("display","block"))}var i,r=this,a=r.wrapper,s=e.node,d=e.action,c=e.items,u=e.index,p=r.options,f=p.loadOnDemand,h=p.checkboxes&&p.checkboxes.checkChildren;if(e.field)return r._updateNode(e.field,c);if(s&&(a=r.findByUid(s.uid),r._progress(a,!1)),h&&"remove"!=d&&s&&s.checked)for(i=0;c.length>i;i++)c[i].checked=!0;for("add"==d?n(c,a):"remove"==d?r._remove(r.findByUid(c[0].uid),!1):s?(l(a).empty(),c.length?n(c,a):o(a)):r.root=r.wrapper.html(r._renderGroup({items:c,group:{firstLevel:!0,expanded:!0}})).children("ul"),i=0;c.length>i;i++)(!f||c[i].expanded)&&c[i].load();r.trigger(z,{node:s?a:t})},_error:function(e){var t=this,n=e.node&&t.findByUid(e.node.uid);n?(this._progress(n,!1),c(n).addClass("k-i-refresh"),e.node.loaded(!1)):(this._progress(!1),this.element.html(this.templates.retry))
},_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){t=2==arguments.length?!!t:!0,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(L),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(L),r.find(".k-state-selected").each(function(){var e=i.dataItem(this);e.set("selected",!1),delete e.selected}),n.length&&i.dataItem(n).set("selected",!0),i.trigger(T),t):r.find(".k-state-selected").closest(L)},_toggle:function(e,t,n){var i,r=this,o=r.options,a=d(e),s=n?"expand":"collapse",l=o.animation[s];if(!a.data("animating")&&!r._trigger(s,e))if(r._expanded(e,n),i=t&&t.loaded(),i&&a.children().length>0){if(r._updateNodeClasses(e,{},{expanded:n}),a.css("display")==(n?"block":"none"))return;n||a.css("height",a.height()).css("height"),a.kendoStop(!0,!0).kendoAnimate(h({reset:!0},l,{complete:function(){n&&a.css("height","")}}))}else(!i||i&&n)&&(o.loadOnDemand&&r._progress(e,!0),a.remove(),t.load())},toggle:function(t,n){t=e(t),c(t).is(".k-minus,.k-plus,.k-minus-disabled,.k-plus-disabled")&&(1==arguments.length&&(n=!this._expanded(t)),this._expanded(t,n))},destroy:function(){var e=this;v.fn.destroy.call(e),e.element.off(w),e.dragging&&e.dragging.destroy(),u.destroy(e.element)},_expanded:function(e,n){var i=u.attr("expanded"),r=this.dataItem(e);return 1==arguments.length?"true"===e.attr(i)||r&&r.expanded:(d(e).data("animating")||(r&&r.set("expanded",n),n?(e.attr(i,"true"),e.attr("aria-expanded","true")):(e.removeAttr(i),e.attr("aria-expanded","false"))),t)},_progress:function(e,t){var n=this.element;1==arguments.length?(t=e,t?n.html(this.templates.loading):n.empty()):c(e).toggleClass("k-loading",t)},text:function(e,n){var i=this.dataItem(e),r=this.options[j.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(e,t,n,i){var r,o=this._objectOrSelf(n||t),a=o.dataSource;return n&&n[0]!=o.element[0]&&(r=o.dataItem(n),r.loaded()||(o._progress(n,!0),r.load()),n!=this.root&&(a=r.children,a&&a instanceof _||(r._initChildren(),r.loaded(!0),a=r.children))),e=this._toObservableData(e),i.call(this,a,e)},_toObservableData:function(t){var n,i,r=t;return(t instanceof window.jQuery||q(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(u.attr("uid")),r=n.getByUid(i),r&&(r=n.remove(r))),r},_insert:function(e,t,n){t instanceof u.data.ObservableArray?t=t.toJSON():m(t)||(t=[t]);var i=e.parent();return i&&(i.hasChildren=!0,i._initChildren()),e.splice.apply(e,[n,0].concat(t)),this.findByUid(e[n].uid)},insertAfter:r(1),insertBefore:r(0),append:function(e,t){var n=this,i=n.root;return t&&(i=l(t)),n._dataSourceMove(e,i,t,function(e,i){function r(){t&&n._expanded(t,!0);var r=e.data(),o=Math.max(r.length,0);return n._insert(r,i,o)}return e.data()?r():(e.one(T,r),null)})},_remove:function(t,n){var i,r,a,s=this;return t=e(t,s.element),i=t.parent().parent(),r=t.prev(),a=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(o(i),s._updateNodeClasses(i)),s._updateNodeClasses(r),s._updateNodeClasses(a),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(L)},findByUid:function(e){return this.element.find(".k-item["+u.attr("uid")+"="+e+"]")},_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;o>i;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)}}),a.prototype={_removeTouchHover:function(){var e=this;u.support.touch&&e.hovered&&(e.hovered.find("."+M).removeClass(M),e.hovered=!1)},_hintStatus:function(n){var i=this._draggable.hint.find(".k-drag-status")[0];return n?(i.className="k-icon k-drag-status "+n,t):e.trim(i.className.replace(/k-(icon|drag-status)/g,""))},dragstart:function(t){var n=this,i=n.treeview,r=n.sourceNode=t.currentTarget.closest(L);i.trigger(D,{sourceNode:r[0]})&&t.preventDefault(),n.dropHint=e("
").css(R,"hidden").appendTo(i.element)},drag:function(t){var n,i,r,o,a,s,l,d,c,p,f=this,h=f.treeview,g=f.sourceNode,m=f.dropTarget=e(u.eventTarget(t)),v=m.closest(".k-treeview");v.length?e.contains(g[0],m[0])?n="k-denied":(n="k-insert-middle",i=m.closest(".k-top,.k-mid,.k-bot"),i.length?(o=i.outerHeight(),a=u.getOffset(i).top,s=m.closest(".k-in"),l=o/(s.length>0?4:2),d=a+l>t.y.location,c=t.y.location>a+o-l,f._removeTouchHover(),p=s.length&&!d&&!c,f.hovered=p?v:!1,f.dropHint.css(R,p?"hidden":"visible"),s.toggleClass(M,p),p?n="k-add":(r=i.position(),r.top+=d?0:o,f.dropHint.css(r)[d?"prependTo":"appendTo"](m.closest(L).children("div:first")),d&&i.hasClass("k-top")&&(n="k-insert-top"),c&&i.hasClass("k-bot")&&(n="k-insert-bottom"))):m[0]!=f.dropHint[0]&&(n=v[0]!=h.element[0]?"k-add":"k-denied")):(n="k-denied",f._removeTouchHover()),h.trigger(I,{sourceNode:g[0],dropTarget:m[0],pageY:t.y.location,pageX:t.x.location,statusClass:n.substring(2),setStatusClass:function(e){n=e}}),0!==n.indexOf("k-insert")&&f.dropHint.css(R,"hidden"),f._hintStatus(n)},dragcancel:function(){this.dropHint.remove()},dragend:function(){var e,n,i,r=this,o=r.treeview,a="over",s=r.sourceNode,l=r.dropHint,d=r.dropTarget;return"visible"==l.css(R)?(a=l.prevAll(".k-in").length>0?"after":"before",e=l.closest(L)):d&&(e=d.closest(L),e.length||(e=d.closest(".k-treeview"))),n="k-denied"!=r._hintStatus(),i=o.trigger(E,{sourceNode:s[0],destinationNode:e[0],valid:n,setValid:function(e){n=e},dropTarget:d[0],dropPosition:a}),l.remove(),r._removeTouchHover(),!n||i?(r._draggable.dropped=n,t):(r._draggable.dropped=!0,"over"==a?s=o.append(s,e):"before"==a?s=o.insertBefore(s,e):"after"==a&&(s=o.insertAfter(s,e)),o.trigger(P,{sourceNode:s&&s[0],destinationNode:e[0],dropPosition:a}),t)},destroy:function(){this._draggable.destroy()}},p.plugin(s)}(window.kendo.jQuery),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+"'":"",""}function i(e,t,n){var i="";return i="increase"==t?n?"k-i-arrow-e":"k-i-arrow-n":n?"k-i-arrow-w":"k-i-arrow-s",""+e[t+"ButtonTitle"]+" "}function r(e,t){var n,i="",r=w.floor(d(t/e.smallStep))+1;for(n=0;r>n;n++)i+=" ";return i+=" "}function o(e,t){var n=t.is("input")?1:2,i=2==n?e.leftDragHandleTitle:e.dragHandleTitle;return""}function a(e){return function(t){return t+e}}function s(e){return function(){return e}}function l(e){return(e+"").replace(".",f.cultures.current.numberFormat["."])}function d(e){e=parseFloat(e,10);var t=w.pow(10,W||0);return w.round(e*t)/t}function c(e,n){var i=_(e.getAttribute(n));return null===i&&(i=t),i}function u(e){return typeof e!==q}var p,f=window.kendo,h=f.ui.Widget,g=f.ui.Draggable,m=e.extend,v=f.format,_=f.parseFloat,b=e.proxy,y=e.isArray,w=Math,x=f.support,k=x.pointers,C="change",T="slide",S=".slider",A="touchstart"+S+" mousedown"+S,F=k?"MSPointerDown"+S:A,D="touchend"+S+" mouseup"+S,I=k?"MSPointerUp"+S:D,E="moveSelection",P="keydown"+S,z="click"+S,H="mouseover"+S,R="focus"+S,O="blur"+S,M=".k-draghandle",N=".k-slider-track",B=".k-tick",L="k-state-selected",V="k-state-default",U="k-state-disabled",W=3,j="disabled",q="undefined",G="tabindex",$=f.getTouches,Y=h.extend({init:function(e,t){var n,i,o,l=this;h.fn.init.call(l,e,t),t=l.options,l._distance=t.max-t.min,l._isHorizontal="horizontal"==t.orientation,l._isRtl=l._isHorizontal&&f.support.isRtl(e),l._position=l._isHorizontal?"left":"bottom",l._size=l._isHorizontal?"width":"height",l._outerSize=l._isHorizontal?"outerWidth":"outerHeight",t.tooltip.format=t.tooltip.enabled?t.tooltip.format||"{0}":"{0}",l._createHtml(),l.wrapper=l.element.closest(".k-slider"),l._trackDiv=l.wrapper.find(N),l._setTrackDivWidth(),l._maxSelection=l._trackDiv[l._size](),n=l._maxSelection/((t.max-t.min)/t.smallStep),i=l._calculateItemsWidth(w.floor(l._distance/t.smallStep)),"none"!=t.tickPlacement&&n>=2&&(l._trackDiv.before(r(t,l._distance)),l._setItemsWidth(i),l._setItemsTitle(),l._setItemsLargeTick()),l._calculateSteps(i),l._tabindex(l.wrapper.find(M)),l[t.enabled?"enable":"disable"](),o=f.support.isRtl(l.wrapper)?-1:1,l._keyMap={37:a(-1*o*t.smallStep),40:a(-t.smallStep),39:a(1*o*t.smallStep),38:a(+t.smallStep),35:s(t.max),36:s(t.min),33:a(+t.largeStep),34:a(-t.largeStep)},f.notify(l)},events:[C,T],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_setTrackDivWidth:function(){var e=this,t=2*parseFloat(e._trackDiv.css(e._isRtl?"right":e._position),10);e._trackDiv[e._size](e.wrapper[e._size]()-2-t)},_setItemsWidth:function(t){var n,i=this,r=i.options,o=0,a=t.length-1,s=i.wrapper.find(B),l=0,d=2,c=s.length,u=0;for(n=0;c-2>n;n++)e(s[n+1])[i._size](t[n]);if(i._isHorizontal?(e(s[o]).addClass("k-first")[i._size](t[a-1]),e(s[a]).addClass("k-last")[i._size](t[a])):(e(s[a]).addClass("k-first")[i._size](t[a]),e(s[o]).addClass("k-last")[i._size](t[a-1])),0!==i._distance%r.smallStep&&!i._isHorizontal){for(n=0;t.length>n;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(B),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;0!==a-s;a+=l)e(i[a]).attr("title",v(n.tooltip.format,d(r))),r+=n.smallStep},_setItemsLargeTick:function(){var t,n=this,i=n.options,r=n.wrapper.find(B),o={},a=d(i.largeStep/i.smallStep);if(0===1e3*i.largeStep%(1e3*i.smallStep))if(n._isHorizontal&&!n._isRtl)for(t=0;r.length>t;t=d(t+a))o=e(r[t]),o.addClass("k-tick-large").html(""+o.attr("title")+" ");else for(t=r.length-1;t>=0;t=d(t-a))o=e(r[t]),o.addClass("k-tick-large").html(""+o.attr("title")+" "),n._isRtl||0!==t&&t!==r.length-1&&o.css("line-height",o[n._size]()+"px")},_calculateItemsWidth:function(e){var t,n,i,r=this,o=r.options,a=parseFloat(r._trackDiv.css(r._size))+1,s=a/r._distance;for(r._distance/o.smallStep-w.floor(r._distance/o.smallStep)>0&&(a-=r._distance%o.smallStep*s),t=a/e,n=[],i=0;e-1>i;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;i>t;t++)n+=e[t]-w.floor(e[t]),e[t]=w.floor(e[t]);return n=w.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;e>n;n++)t[parseInt(w.round(i*n),10)]+=1;return t},_calculateSteps:function(e){var t,n=this,i=n.options,r=i.min,o=0,a=w.ceil(n._distance/i.smallStep),s=1;if(a+=0===n._distance/i.smallStep%1?1:0,e.splice(0,0,2*e[a-2]),e.splice(a-1,1,2*e.pop()),n._pixelSteps=[o],n._values=[r],0!==a){for(;a>s;)o+=(e[s-1]+e[s])/2,n._pixelSteps[s]=o,n._values[s]=r+=i.smallStep,s++;t=0===n._distance%i.smallStep?a-1:a,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=w.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,a>i._maxSelection-(parseInt(i._maxSelection%o,10)-3)/2)return r.max;for(n=0;i._pixelSteps.length>n;n++)if(s>=w.abs(i._pixelSteps[n]-a)-1)return d(i._values[n])},_getFormattedValue:function(e,t){var n,i,r,o=this,a="",s=o.options.tooltip;return y(e)?(i=e[0],r=e[1]):t&&t.type&&(i=t.selectionStart,r=t.selectionEnd),t&&(n=t.tooltipTemplate),!n&&s.template&&(n=f.template(s.template)),y(e)||t&&t.type?n?a=n({selectionStart:i,selectionEnd:r}):(i=v(s.format,i),r=v(s.format,r),a=i+" - "+r):(t&&(t.val=e),a=n?n({value:e}):v(s.format,e)),a},_getDraggableArea:function(){var e=this,t=f.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).val(r.selectionStart),a.eq(1).val(r.selectionEnd)):t.val(r.value),t.wrap(n(r,t,e._isHorizontal)).hide(),r.showButtons&&t.before(i(r,"increase",e._isHorizontal)).before(i(r,"decrease",e._isHorizontal)),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(M).eq(0)[0]?(o=n._firstHandleDrag,n._activeHandle=0):(o=n._lastHandleDrag,n._activeHandle=1),r=r[n._activeHandle]),e(i).addClass(L),o&&(n._activeHandleDrag=o,o.selectionStart=n.options.selectionStart,o.selectionEnd=n.options.selectionEnd,o._updateTooltip(r))},_focusWithMouse:function(t){var n=this,i=e(t.target),r=i.is(M)?i.index():0;window.setTimeout(function(){n.wrapper.find(M)[2==r?1:0].focus()},1),n._setTooltipTimeout()},_blur:function(t){var n=this,i=n._activeHandleDrag;e(t.target).removeClass(L),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)}}),Q=Y.extend({init:function(n,i){var r,o=this;n.type="text",i=m({},{value:c(n,"value"),min:c(n,"min"),max:c(n,"max"),smallStep:c(n,"step")},i),n=e(n),i&&i.enabled===t&&(i.enabled=!n.is("[disabled]")),Y.fn.init.call(o,n,i),i=o.options,u(i.value)&&null!==i.value||(i.value=i.min,n.val(i.min)),i.value=w.max(w.min(i.value,i.max),i.min),r=o.wrapper.find(M),new Q.Selection(r,o,i),o._drag=new Q.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(U).addClass(V),a.wrapper.find("input").removeAttr(j),i=function(n){var i,r,o,s=$(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(L),t;a._update(a._getValueFromPosition(i,r)),a._focusWithMouse(n),a._drag.dragstart(n),n.preventDefault()}},a.wrapper.find(B+", "+N).on(F,i).end().on(F,function(){e(document.documentElement).one("selectstart",f.preventDefault)}).on(I,function(){a._drag._end()}),a.wrapper.find(M).attr(G,0).on(D,function(){a._setTooltipTimeout()}).on(z,function(e){a._focusWithMouse(e),e.preventDefault()}).on(R,b(a._focus,a)).on(O,b(a._blur,a)),r=b(function(e){var t=a._nextValueByIndex(a._valueIndex+1*e);a._setValueInRange(t),a._drag._updateTooltip(t)},a),s.showButtons&&(o=b(function(e,t){this._clearTooltipTimeout(),(1===e.which||x.touch&&0===e.which)&&(r(t),this.timeout=setTimeout(b(function(){this.timer=setInterval(function(){r(t)},60)},this),200))},a),a.wrapper.find(".k-button").on(D,b(function(e){this._clearTimer(),a._focusWithMouse(e)},a)).on(H,function(t){e(t.currentTarget).addClass("k-state-hover")}).on("mouseout"+S,b(function(t){e(t.currentTarget).removeClass("k-state-hover"),this._clearTimer()},a)).eq(0).on(A,b(function(e){o(e,1)},a)).click(!1).end().eq(1).on(A,b(function(e){o(e,-1)},a)).click(f.preventDefault)),a.wrapper.find(M).off(P,!1).on(P,b(this._keydown,a)),s.enabled=!0)},disable:function(){var t=this;t.wrapper.removeClass(V).addClass(U),e(t.element).prop(j,j),t.wrapper.find(".k-button").off(A).on(A,f.preventDefault).off(D).on(D,f.preventDefault).off("mouseleave"+S).on("mouseleave"+S,f.preventDefault).off(H).on(H,f.preventDefault),t.wrapper.find(B+", "+N).off(F).off(I),t.wrapper.find(M).attr(G,-1).off(D).off(P).off(z).off(R).off(O),t.options.enabled=!1},_update:function(e){var t=this,n=t.value()!=e;t.value(e),n&&t.trigger(C,{value:t.options.value})},value:function(e){var n=this,i=n.options;return e=d(e),isNaN(e)?i.value:(e>=i.min&&i.max>=e&&i.value!=e&&(n.element.prop("value",l(e)),i.value=e,n._refreshAriaAttr(e),n._refresh()),t)},_refresh:function(){this.trigger(E,{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(M).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=d(e),isNaN(e)?(n._update(i.min),t):(e=w.max(w.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[w.max(0,w.min(e,t-1))]},destroy:function(){var e=this;h.fn.destroy.call(e),e.wrapper.off(S).find(".k-button").off(S).end().find(M).off(S).end().find(B+", "+N).off(S).end(),e._drag.draggable.destroy()}});Q.Selection=function(e,t,n){function i(i){var r=i-n.min,o=t._valueIndex=w.ceil(d(r/n.smallStep)),a=parseInt(t._pixelSteps[o],10),s=t._trackDiv.find(".k-slider-selection"),l=parseInt(e[t._outerSize]()/2,10),c=t._isRtl?2:0;s[t._size](t._isRtl?t._maxSelection-a:a),e.css(t._position,a-l-c)}i(n.value),t.bind([C,T,E],function(e){i(parseFloat(e.value,10))})},Q.Drag=function(e,t,n,i){var r=this;r.owner=n,r.options=i,r.dragHandle=e,r.dragHandleSize=e[n._outerSize](),r.type=t,r.draggable=new g(e,{distance:0,dragstart:b(r._dragstart,r),drag:b(r.drag,r),dragend:b(r.dragend,r),dragcancel:b(r.dragcancel,r)}),e.click(!1)},Q.Drag.prototype={dragstart:function(e){this.draggable.userEvents._start(e)},_dragstart:function(n){var i=this,r=i.owner,o=i.options;return o.enabled?(r.element.off(H),i.dragHandle.addClass(L),e(document.documentElement).css("cursor","pointer"),i.dragableArea=r._getDraggableArea(),i.step=w.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=f.template(o.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("
").appendTo(document.body),a=r._getFormattedValue(i.val||r.value(),i),i.type||(n="k-callout-"+(r._isHorizontal?"s":"e"),i.tooltipInnerDiv="
",a+=i.tooltipInnerDiv),i.tooltipDiv.html(a),i._scrollOffset={top:s.scrollTop(),left:s.scrollLeft()},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,s>r):n.constrainValue(r,a,s,r>=s):n.constrainValue(o,s,a,s>=o),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.selectionStart=n.valn.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(T,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(d(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._end()},_end:function(){var e=this,t=e.owner;return t._focusWithMouse({target:e.dragHandle[0]}),t.element.on(H),!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.dragHandle,c=f.getOffset(d),u=8,p=e(window),h=o.tooltipDiv.find(".k-callout"),g=o.tooltipDiv.outerWidth(),m=o.tooltipDiv.outerHeight();o.type?(t=a.wrapper.find(M),c=f.getOffset(t.eq(0)),n=f.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).outerWidth()+2*u):(s=c.top,l=c.left,r=d.outerWidth()+2*u),a._isHorizontal?(l-=parseInt((g-d[a._outerSize]())/2,10),s-=m+h.height()+u):(s-=parseInt((m-d[a._outerSize]())/2,10),l-=g+h.width()+u),a._isHorizontal?(i=o._flip(s,m,r,p.outerHeight()+o._scrollOffset.top),s+=i,l+=o._fit(l,g,p.outerWidth()+o._scrollOffset.left)):(i=o._flip(l,g,r,p.outerWidth()+o._scrollOffset.left),s+=o._fit(s,m,p.outerHeight()+o._scrollOffset.top),l+=i),i>0&&h&&(h.removeClass(),h.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)),0>e&&(i=-e),i},_flip:function(e,t,n,i){var r=0;return e+t>i&&(r+=-(n+t)),0>e+r&&(r+=n+t),r},constrainValue:function(e,t,n,i){var r=this,o=0;return o=e>t&&n>e?r.owner._getValueFromPosition(e,r.dragableArea):i?r.options.max:r.options.min}},f.ui.plugin(Q),p=Y.extend({init:function(n,i){var r,o=this,a=e(n).find("input"),s=a.eq(0)[0],l=a.eq(1)[0];s.type="text",l.type="text",i=m({},{selectionStart:c(s,"value"),min:c(s,"min"),max:c(s,"max"),smallStep:c(s,"step")},{selectionEnd:c(l,"value"),min:c(l,"min"),max:c(l,"max"),smallStep:c(l,"step")},i),i&&i.enabled===t&&(i.enabled=!a.is("[disabled]")),Y.fn.init.call(o,n,i),i=o.options,u(i.selectionStart)&&null!==i.selectionStart||(i.selectionStart=i.min,a.eq(0).val(i.min)),u(i.selectionEnd)&&null!==i.selectionEnd||(i.selectionEnd=i.max,a.eq(1).val(i.max)),r=o.wrapper.find(M),new p.Selection(r,o,i),o._firstHandleDrag=new Q.Drag(r.eq(0),"firstHandle",o,i),o._lastHandleDrag=new Q.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(U).addClass(V),r.wrapper.find("input").removeAttr(j),i=function(n){var i,a,s,l,d,c=$(n)[0];if(c){if(a=r._isHorizontal?c.location.pageX:c.location.pageY,s=r._getDraggableArea(),l=r._getValueFromPosition(a,s),d=e(n.target),d.hasClass("k-draghandle"))return d.addClass(L),t;o.selectionStart>l?(r._setValueInRange(l,o.selectionEnd),r._firstHandleDrag.dragstart(n),i=0):l>r.selectionEnd?(r._setValueInRange(o.selectionStart,l),r._lastHandleDrag.dragstart(n),i=1):l-o.selectionStart<=o.selectionEnd-l?(r._setValueInRange(l,o.selectionEnd),r._firstHandleDrag.dragstart(n),i=0):(r._setValueInRange(o.selectionStart,l),r._lastHandleDrag.dragstart(n),i=1),r._focusWithMouse({target:r.wrapper.find(M)[i]})}},r.wrapper.find(B+", "+N).on(F,i).end().on(F,function(){e(document.documentElement).one("selectstart",f.preventDefault)}).on(I,function(){r._drag._end()}),r.wrapper.find(M).attr(G,0).on(D,function(){r._setTooltipTimeout()}).on(z,function(e){r._focusWithMouse(e),e.preventDefault()}).on(R,b(r._focus,r)).on(O,b(r._blur,r)),r.wrapper.find(M).off(P,f.preventDefault).eq(0).on(P,b(function(e){this._keydown(e,"firstHandle")},r)).end().eq(1).on(P,b(function(e){this._keydown(e,"lastHandle")},r)),r.options.enabled=!0)},disable:function(){var e=this;e.wrapper.removeClass(V).addClass(U),e.wrapper.find("input").prop(j,j),e.wrapper.find(B+", "+N).off(F).off(I),e.wrapper.find(M).attr(G,-1).off(D).off(P).off(z).off(R).off(O),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(a,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(C,{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=d(e),n=d(n),e>=r.min&&r.max>=e&&n>=r.min&&r.max>=n&&n>=e&&(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 y(e)?this._value(e[0],e[1]):this._value(e,t)},_refresh:function(){var e=this,t=e.options;e.trigger(E,{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(M),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=w.max(w.min(e,n.max),n.min),t=w.max(w.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(w.min(e,t),w.max(e,t))},_setZIndex:function(t){this.wrapper.find(M).each(function(n){e(this).css("z-index","firstHandle"==t?1-n:n)})},destroy:function(){var e=this;h.fn.destroy.call(e),e.wrapper.off(S).find(B+", "+N).off(S).end().find(M).off(S),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),p.Selection=function(e,t,n){function i(i){i=i||[];var o=i[0]-n.min,a=i[1]-n.min,s=w.ceil(d(o/n.smallStep)),l=w.ceil(d(a/n.smallStep)),c=t._pixelSteps[s],u=t._pixelSteps[l],p=parseInt(e.eq(0)[t._outerSize]()/2,10),f=t._isRtl?2:0;e.eq(0).css(t._position,c-p-f).end().eq(1).css(t._position,u-p-f),r(c,u)}function r(e,n){var i,r,o=t._trackDiv.find(".k-slider-selection");i=w.abs(e-n),o[t._size](i),t._isRtl?(r=w.max(e,n),o.css("right",t._maxSelection-r-1)):(r=w.min(e,n),o.css(t._position,r-1))}i(t.value()),t.bind([C,T,E],function(e){i(e.values)})},f.ui.plugin(p)}(window.kendo.jQuery),function(e,t){function n(e){return m.test(e)}function i(e){return g.test(e)||/^\d+$/.test(e)}function r(e){return!n(e)&&!i(e)}function o(e,n){return function(i,r){var o,a=this.element.find(i).data(A);return 1==arguments.length?a[e]:(a[e]=r,n&&(o=this.element.data("kendoSplitter"),o.trigger(w)),t)}}function a(e){var t=this,n=e.orientation;t.owner=e,t._element=e.element,t.orientation=n,p(t,n===k?l:s),t._resizable=new d.ui.Resizable(e.element,{orientation:n,handle:".k-splitbar-draggable-"+n+"[data-marker="+e._marker+"]",hint:f(t._createHint,t),start:f(t._start,t),max:f(t._max,t),min:f(t._min,t),invalidClass:"k-restricted-size-"+n,resizeend:f(t._stop,t)})}var s,l,d=window.kendo,c=d.ui,u=d.keys,p=e.extend,f=e.proxy,h=c.Widget,g=/^\d+(\.\d+)?px$/i,m=/^\d+(\.\d+)?%$/i,v=".kendoSplitter",_="expand",b="collapse",y="contentLoad",w="resize",x="layoutChange",k="horizontal",C="vertical",T="mouseenter",S="click",A="pane",F="mouseleave",D="k-state-focused",I="k-"+A,E="."+I,P=h.extend({init:function(t,n){var i,r=this;h.fn.init.call(r,t,n),r.wrapper=r.element,i=r.options.orientation.toLowerCase()!=C,r.orientation=i?k:C,r._dimension=i?"width":"height",r._keys={decrease:i?u.LEFT:u.UP,increase:i?u.RIGHT:u.DOWN},r._resizeStep=10,r.bind(w,f(r._resize,r)),r._marker=d.guid().substring(0,8),r._initPanes(),r._resizeHandler=function(){r.trigger(w),r._detachEvents(),r._attachEvents()},r._attachEvents(),e(window).on("resize",r._resizeHandler),r.element.children(".k-splitbar-draggable-"+r.orientation).length&&(r.resizing=new a(r)),r.element.triggerHandler("init"+v)},events:[_,b,y,w,x],_parentSplitter:function(){return this.element.parent().closest(".k-splitter")},_attachEvents:function(){var t=this,n=t.options.orientation;t.element.children(".k-splitbar-draggable-"+n).on("keydown"+v,e.proxy(t._keydown,t)).on("mousedown"+v,function(e){e.currentTarget.focus()}).on("focus"+v,function(t){e(t.currentTarget).addClass(D)}).on("blur"+v,function(n){e(n.currentTarget).removeClass(D),t.resizing&&t.resizing.end()}).on(T+v,function(){e(this).addClass("k-splitbar-"+t.orientation+"-hover")}).on(F+v,function(){e(this).removeClass("k-splitbar-"+t.orientation+"-hover")}).on("mousedown"+v,function(){t._panes().append("
")}).on("mouseup"+v,function(){t._panes().children(".k-splitter-overlay").remove()}).end().children(".k-splitbar").on("dblclick"+v,f(t._togglePane,t)).children(".k-collapse-next, .k-collapse-prev").on(S+v,t._arrowClick(b)).end().children(".k-expand-next, .k-expand-prev").on(S+v,t._arrowClick(_)).end().end(),t._parentSplitter().each(function(){var n=e(this),i=n.data("kendoSplitter");i?i.bind(w,t._resizeHandler):n.off("init"+v).one("init"+v,function(){e(this).data("kendoSplitter").bind(w,t._resizeHandler),t._resizeHandler()})})},_detachEvents:function(){var e=this,t=e._parentSplitter().data("kendoSplitter");e.element.children(".k-splitbar-draggable-"+e.orientation).off(v).end().children(".k-splitbar").off("dblclick"+v).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(v),t&&t.unbind(w,e._resizeHandler)},options:{name:"Splitter",orientation:k,panes:[]},destroy:function(){var t=this;h.fn.destroy.call(t),t._detachEvents(),t.resizing&&t.resizing.destroy(),e(window).off("resize",t._resizeHandler),d.destroy(t.element)},_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(b,a[d?"prev":"next"]()):i._triggerAction(_,n)):o&&o.move((d?-1:1)*i._resizeStep,a),t.preventDefault()):r===u.ENTER&&o&&(o.end(),t.preventDefault())},_initPanes:function(){var t=this,n=t.options.panes||[];
t.element.addClass("k-widget").addClass("k-splitter").children(":not(script)").each(function(i,r){var o=n&&n[i];r=e(r).attr("role","group").addClass(I),r.data(A,o?o:{}).toggleClass("k-scrollable",o?o.scrollable!==!1:!0),t.ajaxRequest(r)}).end(),t.trigger(w)},ajaxRequest:function(e,t,n){var i,r=this;e=r.element.find(e),i=e.data(A),t=t||i.contentUrl,t&&(e.append(" "),d.isLocalUrl(t)?jQuery.ajax({url:t,data:n||{},type:"GET",dataType:"html",success:function(t){e.html(t),r.trigger(y,{pane:e[0]})}}):e.removeClass("k-scrollable").html(""))},_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(b,r.prev()):n.is(".k-collapse-next")?i._triggerAction(b,r.next()):n.is(".k-expand-prev")?i._triggerAction(_,r.prev()):n.is(".k-expand-next")&&i._triggerAction(_,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?"
":""},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",a&&!s&&!d)+i("k-expand-prev",a&&s&&!d)+i("k-resize-handle",o)+i("k-collapse-next",l&&!d&&!s)+i("k-expand-next",l&&d&&!s))},_updateSplitBars:function(){var t=this;this.element.children(".k-splitbar").each(function(){var n=e(this),i=n.prev(E).data(A),r=n.next(E).data(A);r&&t._updateSplitBar(n,i,r)})},_panes:function(){return this.element.children(E)},_resize:function(){var i,o,a,s,l,d,c,u,p,f,h=this,g=h.element,m=g.children(":not(.k-splitbar)"),v=h.orientation==k,_=g.children(".k-splitbar"),b=_.length,y=v?"width":"height",w=g[y]();0===b?(b=m.length-1,m.slice(0,b).after("
"),h._updateSplitBars(),_=g.children(".k-splitbar")):h._updateSplitBars(),_.each(function(){w-=this[v?"offsetWidth":"offsetHeight"]}),i=0,o=0,a=e(),m.css({position:"absolute",top:0})[y](function(){var s,l=e(this).data(A)||{};if(l.collapsed)s=0,e(this).css("overflow","hidden");else{if(r(l.size))return a=a.add(this),t;s=parseInt(l.size,10),n(l.size)&&(s=Math.floor(s*w/100))}return o++,i+=s,s}),w-=i,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,c=v?"height":"width",u=v?"left":"top",p=v?"offsetWidth":"offsetHeight",0===s&&(f=m.filter(function(){return!(e(this).data(A)||{}).collapsed}).last(),f[y](w+f[0][p])),g.children().css(c,g[c]()).each(function(e,t){t.style[u]=Math.floor(d)+"px",d+=t[p]}),h.trigger(x)},toggle:function(e,n){var i;e=this.element.find(e),i=e.data(A),(n||i.collapsible)&&(1==arguments.length&&(n=i.collapsed===t?!1:i.collapsed),i.collapsed=!n,i.collapsed?e.css("overflow","hidden"):e.css("overflow",""),this.trigger(w),this.resizing&&this.resizing.destroy(),this._detachEvents(),this._attachEvents(),this.element.children(".k-splitbar-draggable-"+this.orientation).length&&(this.resizing=new a(this)))},collapse:function(e){this.toggle(e,!1)},expand:function(e){this.toggle(e,!0)},size:o("size",!0),min:o("min"),max:o("max")});c.plugin(P),s={sizingProperty:"height",sizingDomProperty:"offsetHeight",alternateSizingProperty:"width",positioningProperty:"top",mousePositioningProperty:"pageY"},l={sizingProperty:"width",sizingDomProperty:"offsetWidth",alternateSizingProperty:"height",positioningProperty:"left",mousePositioningProperty:"pageX"},a.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()},isResizing:function(){return this._resizable.resizing},_createHint:function(t){var n=this;return e("
").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(A),l=a.data(A),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,g=p(l.min),m=p(l.max)||c-d;n.previousPane=o,n.nextPane=a,n._maxPosition=Math.min(c-g,d+h),n._minPosition=Math.max(d+f,c-m)},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var n,i,o,a,s,l,c,u,p=this,f=e(t.currentTarget),h=p.owner;return h._panes().children(".k-splitter-overlay").remove(),t.keyCode!==d.keys.ESC&&(n=t.position,i=f.prev(),o=f.next(),a=i.data(A),s=o.data(A),l=n-parseInt(i[0].style[p.positioningProperty],10),c=parseInt(o[0].style[p.positioningProperty],10)+o[0][p.sizingDomProperty]-n-f[0][p.sizingDomProperty],u=p._element.children(E).filter(function(){return r(e(this).data(A).size)}).length,(!r(a.size)||u>1)&&(r(a.size)&&u--,a.size=l+"px"),(!r(s.size)||u>1)&&(s.size=c+"px"),h._resizeHandler()),!1}}}(window.kendo.jQuery),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:_.htmlEncode(t),extension:a(t),size:e.size||e.fileSize,rawFile:e}}function a(e){var t=e.match(w);return t?t[0]:""}function s(e){var t=e.lastIndexOf("\\");return-1!=t?e.substr(t+1):e}function l(t,n,i){var r,o;n._supportsRemove()&&(r=t.data("fileNames"),o=e.map(r,function(e){return e.name}),n._submitRemove(o,i,function(e,i,o){n._removeFileEntry(t),n.trigger(T,{operation:"remove",files:r,response:e,XMLHttpRequest:o})},function(e){n.trigger(S,{operation:"remove",files:r,XMLHttpRequest:e}),y("Server response: "+e.responseText)}))}function d(t,n,i){var r=!1,o="";try{o=e.parseJSON(c(t)),r=!0}catch(a){i()}r&&n(o)}function c(e){return(e===t||""===e)&&(e="{}"),e}function u(e){e.stopPropagation(),e.preventDefault()}function p(e,t,n,i){var r,o;e.on("dragenter"+t,function(){n(),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 f(e){return e.children(".k-icon").is(".k-loading, .k-success, .k-fail")}function h(t){return e(t.target).closest(".k-file")}function g(){var n={},i=e("meta[name=csrf-token]").attr("content"),r=e("meta[name=csrf-param]").attr("content");return e("input[name^='__RequestVerificationToken']").each(function(){n[this.name]=this.value}),r!==t&&i!==t&&(n[r]=i),n}var m,v,_=window.kendo,b=_.ui.Widget,y=_.logToConsole,w=/\.([^\.]+)$/,x=".kendoUpload",k="select",C="upload",T="success",S="error",A="complete",F="cancel",D="progress",I="remove",E=b.extend({init:function(t,n){var i,r,o=this;b.fn.init.call(o,t,n),o.name=t.name,o.multiple=o.options.multiple,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=x+"-"+_.guid(),i.closest("form").on("submit"+r,e.proxy(o._onParentFormSubmit,o)).on("reset"+r,e.proxy(o._onParentFormReset,o)),o.options.async.saveUrl?(o._module=o._supportsFormData()?new v(o):new m(o),o._async=!0):o._module=new P(o),o._supportsDrop()&&o._setupDropZone(),o.wrapper.delegate(".k-upload-action","click",e.proxy(o._onFileAction,o)).delegate(".k-upload-selected","click",e.proxy(o._onUploadSelected,o)).delegate(".k-file","t:progress",e.proxy(o._onFileProgress,o)).delegate(".k-file","t:upload-success",e.proxy(o._onUploadSuccess,o)).delegate(".k-file","t:upload-error",e.proxy(o._onUploadError,o))},events:[k,C,T,S,A,F,D,I],options:{name:"Upload",enabled:!0,multiple:!0,showFileList:!0,async:{removeVerb:"POST",autoUpload:!0},localization:{select:"Select...",cancel:"Cancel",retry:"Retry",remove:"Remove",uploadSelectedFiles:"Upload files",dropFilesHere:"drop files here to upload",statusUploading:"uploading",statusUploaded:"uploaded",statusFailed:"failed"}},setOptions:function(e){var t=this,n=t.element;b.fn.setOptions.call(t,e),t.multiple=t.options.multiple,n.attr("multiple",t._supportsMultiple()?t.multiple:!1),t.toggle(t.options.enabled)},enable:function(e){e=e===t?!0:e,this.toggle(e)},disable:function(){this.toggle(!1)},toggle:function(e){e=e===t?e:!e,this.wrapper.toggleClass("k-state-disabled",e)},destroy:function(){var t=this;e(document).add(e(".k-dropzone",t.wrapper)).add(t.wrapper.closest("form")).off(t._ns),e(t.element).off(x),b.fn.destroy.call(t)},_addInput:function(t){var n=this;t.insertAfter(n.element).data("kendoUpload",n),e(n.element).hide().removeAttr("id").off(x),n._activeInput(t)},_activeInput:function(t){var n=this,i=n.wrapper;n.element=t,t.attr("multiple",n._supportsMultiple()?n.multiple:!1).attr("autocomplete","off").on("click"+x,function(e){i.hasClass("k-state-disabled")&&e.preventDefault()}).on("focus"+x,function(){e(this).parent().addClass("k-state-focused")}).on("blur"+x,function(){e(this).parent().removeClass("k-state-focused")}).on("change"+x,e.proxy(n._onInputChange,n))},_onInputChange:function(t){var n=this,r=e(t.target),o=n.trigger(k,{files:i(r)});o?(n._addInput(r.clone().val("")),r.remove()):r.trigger("t:select")},_onDrop:function(t){var n,i=t.originalEvent.dataTransfer,o=this,a=i.files;u(t),a.length>0&&(n=o.trigger(k,{files:r(a)}),n||e(".k-dropzone",o.wrapper).trigger("t:select",[a]))},_enqueueFile:function(t,n){var i,r,o=this,a=e(".k-upload-files",o.wrapper);return 0===a.length&&(a=e("").appendTo(o.wrapper),o.options.showFileList||a.hide()),i=e(".k-file",a),r=e(""+t+" ").appendTo(a).data(n),o._async&&r.prepend(" "),o.multiple||i.trigger("t:remove"),r},_removeFileEntry:function(t){var n,i=t.closest(".k-upload-files");t.remove(),n=e(".k-file",i),n.find("> .k-fail").length===n.length&&this._hideUploadButton(),0===n.length&&i.remove()},_fileAction:function(e,t){var n={remove:"k-delete",cancel:"k-cancel",retry:"k-retry"};n.hasOwnProperty(t)&&(this._clearFileAction(e),e.append(this._renderAction(n[t],this.localization[t]).addClass("k-upload-action")))},_fileState:function(e,t){var n,i=this.localization,r={uploading:{cssClass:"k-loading",text:i.statusUploading},uploaded:{cssClass:"k-success",text:i.statusUploaded},failed:{cssClass:"k-fail",text:i.statusFailed}},o=r[t];o&&(n=e.children(".k-icon").text(o.text),n[0].className="k-icon "+o.cssClass)},_renderAction:function(t,n){return""!==t?e(" "+n+" "):e(""+n+" ")},_clearFileAction:function(e){e.find(".k-upload-action").remove()},_onFileAction:function(t){var n,i,r,o,a=this;return a.wrapper.hasClass("k-state-disabled")||(n=e(t.target).closest(".k-upload-action"),i=n.find(".k-icon"),r=n.closest(".k-file"),o={files:r.data("fileNames")},i.hasClass("k-delete")?a.trigger(I,o)||r.trigger("t:remove",o.data):i.hasClass("k-cancel")?(a.trigger(F,o),r.trigger("t:cancel"),this._checkAllComplete()):i.hasClass("k-retry")&&r.trigger("t:retry")),!1},_onUploadSelected:function(){return this.wrapper.trigger("t:saveSelected"),!1},_onFileProgress:function(t,n){var i=e(".k-progress-status",t.target);0===i.length&&(i=e(" ").appendTo(e(".k-filename",t.target)).find(".k-progress-status")),i.width(n+"%"),this.trigger(D,{files:h(t).data("fileNames"),percentComplete:n})},_onUploadSuccess:function(e,t,n){var i=h(e);this._fileState(i,"uploaded"),this.trigger(T,{files:i.data("fileNames"),response:t,operation:"upload",XMLHttpRequest:n}),this._supportsRemove()?this._fileAction(i,I):this._clearFileAction(i),this._checkAllComplete()},_onUploadError:function(e,t){var n=h(e);this._fileState(n,"failed"),this._fileAction(n,"retry"),this.trigger(S,{operation:"upload",files:n.data("fileNames"),XMLHttpRequest:t}),y("Server response: "+t.responseText),this._checkAllComplete()},_showUploadButton:function(){var t=e(".k-upload-selected",this.wrapper);0===t.length&&(t=this._renderAction("",this.localization.uploadSelectedFiles).addClass("k-upload-selected")),this.wrapper.append(t)},_hideUploadButton:function(){e(".k-upload-selected",this.wrapper).remove()},_onParentFormSubmit:function(){var t,n=this,i=n.element;i.trigger("t:abort"),i.value||(t=e(i),t.attr("disabled","disabled"),window.setTimeout(function(){t.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!(_.support.browser.opera||_.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,n,i=this;e(".k-upload-button",this.wrapper).wrap("
"),t=i._ns,n=e(".k-dropzone",i.wrapper).append(e(""+i.localization.dropFilesHere+" ")).on("dragenter"+t,u).on("dragover"+t,function(e){e.preventDefault()}).on("drop"+t,e.proxy(this._onDrop,this)),p(n,t,function(){n.addClass("k-dropzone-hovered")},function(){n.removeClass("k-dropzone-hovered")}),p(e(document),t,function(){n.addClass("k-dropzone-active")},function(){n.removeClass("k-dropzone-active")})},_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,g());s[a]=t,jQuery.ajax({type:this.options.async.removeVerb,dataType:"json",dataFilter:c,url:this.options.async.removeUrl,traditional:!0,data:s,success:i,error:r})},_wrapInput:function(e){return e.wrap(""),e.closest(".k-button").append(""+this.localization.select+" "),e.closest(".k-upload")},_checkAllComplete:function(){0===e(".k-file .k-icon.k-loading",this.wrapper).length&&this.trigger(A)}}),P=function(t){this.name="syncUploadModule",this.element=t.wrapper,this.upload=t,this.element.bind("t:select",e.proxy(this.onSelect,this)).bind("t:remove",e.proxy(this.onRemove,this)).closest("form").attr("enctype","multipart/form-data").attr("encoding","multipart/form-data")};P.prototype={onSelect:function(t){var r,o=this.upload,a=e(t.target);o._addInput(a.clone().val("")),r=o._enqueueFile(n(a),{relatedInput:a,fileNames:i(a)}),o._fileAction(r,I)},onRemove:function(e){var t=h(e);t.data("relatedInput").remove(),this.upload._removeFileEntry(t)}},m=function(t){this.name="iframeUploadModule",this.element=t.wrapper,this.upload=t,this.iframes=[],this.element.bind("t:select",e.proxy(this.onSelect,this)).bind("t:cancel",e.proxy(this.onCancel,this)).bind("t:retry",e.proxy(this.onRetry,this)).bind("t:remove",e.proxy(this.onRemove,this)).bind("t:saveSelected",e.proxy(this.onSaveSelected,this)).bind("t:abort",e.proxy(this.onAbort,this))},E._frameId=0,m.prototype={onSelect:function(t){var n=this.upload,i=e(t.target),r=this.prepareUpload(i);n.options.async.autoUpload?this.performUpload(r):(n._supportsRemove()&&this.upload._fileAction(r,I),n._showUploadButton())},prepareUpload:function(t){var r,o,a,s=this.upload,l=e(s.element),d=s.options.async.saveField||t.attr("name");return s._addInput(t.clone().val("")),t.attr("name",d),r=this.createFrame(s.name+"_"+E._frameId++),this.registerFrame(r),o=this.createForm(s.options.async.saveUrl,r.attr("name")).append(l),a=s._enqueueFile(n(t),{frame:r,relatedInput:l,fileNames:i(t)}),r.data({form:o,file:a}),a},performUpload:function(t){var n,i,r,o={files:t.data("fileNames")},a=t.data("frame"),s=this.upload;if(s.trigger(C,o))s._removeFileEntry(a.data("file")),this.cleanupFrame(a),this.unregisterFrame(a);else{s._hideUploadButton(),a.appendTo(document.body),n=a.data("form").appendTo(document.body),o.data=e.extend({},o.data,g());for(i in o.data)r=n.find("input[name='"+i+"']"),0===r.length&&(r=e(" ",{type:"hidden",name:i}).appendTo(n)),r.val(o.data[i]);s._fileAction(t,F),s._fileState(t,"uploading"),a.one("load",e.proxy(this.onIframeLoad,this)),n[0].submit()}},onSaveSelected:function(){var t=this;e(".k-file",this.element).each(function(){var n=e(this),i=f(n);i||t.performUpload(n)})},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};d(n,function(n){e.extend(o,{statusText:"OK",status:"200"}),i.trigger("t:progress",[100]),i.trigger("t:upload-success",[n,o]),r.cleanupFrame(t),r.unregisterFrame(t)},function(){e.extend(o,{statusText:"error",status:"500"}),i.trigger("t:upload-error",[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=h(e);this.performUpload(t)},onRemove:function(e,t){var n=h(e),i=n.data("frame");i?(this.unregisterFrame(i),this.upload._removeFileEntry(n),this.cleanupFrame(i)):l(n,this.upload,t)},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("")},createForm:function(t,n){return e("")},stopFrameSubmit:function(e){e.stop!==t?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)}},v=function(t){this.name="formDataUploadModule",this.element=t.wrapper,this.upload=t,this.element.bind("t:select",e.proxy(this.onSelect,this)).bind("t:cancel",e.proxy(this.onCancel,this)).bind("t:remove",e.proxy(this.onRemove,this)).bind("t:retry",e.proxy(this.onRetry,this)).bind("t:saveSelected",e.proxy(this.onSaveSelected,this)).bind("t:abort",e.proxy(this.onAbort,this))},v.prototype={onSelect:function(t,n){var i=this.upload,o=this,a=e(t.target),s=n?r(n):this.inputFiles(a),l=this.prepareUpload(a,s);e.each(l,function(){i.options.async.autoUpload?o.performUpload(this):(i._supportsRemove()&&i._fileAction(this,I),i._showUploadButton())})},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.clone().val(""))),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(", "),o=a._enqueueFile(n,{fileNames:t}),o.data("files",t),l.push(o);else for(i=0;s>i;i++)r=t[i],n=r.name,o=a._enqueueFile(n,{fileNames:[r]}),o.data("files",[r]),l.push(o);return l},inputFiles:function(e){return i(e)},performUpload:function(t){var n,i=this.upload,r=this.createFormData(t.data("files")),o=new XMLHttpRequest,a={files:t.data("fileNames"),XMLHttpRequest:o};if(i.trigger(C,a))this.removeFileEntry(t);else{i._fileAction(t,F),i._hideUploadButton(),a.data=e.extend({},a.data,g());for(n in a.data)r.append(n,a.data[n]);i._fileState(t,"uploading"),this.postFormData(i.options.async.saveUrl,r,t,o)}},onSaveSelected:function(){var t=this;e(".k-file",this.element).each(function(){var n=e(this),i=f(n);i||t.performUpload(n)})},onCancel:function(e){var t=h(e);this.stopUploadRequest(t),this.removeFileEntry(t)},onRetry:function(e){var t=h(e);this.performUpload(t)},onRemove:function(e,t){var n=h(e);n.children(".k-icon").is(".k-success")?l(n,this.upload,t):this.removeFileEntry(n)},postFormData:function(e,t,n,i){var r=this;n.data("request",i),i.addEventListener("load",function(e){r.onRequestSuccess.call(r,e,n)},!1),i.addEventListener(S,function(e){r.onRequestError.call(r,e,n)},!1),i.upload.addEventListener("progress",function(e){r.onRequestProgress.call(r,e,n)},!1),i.open("POST",e),i.withCredentials="true",i.send(t)},createFormData:function(e){var t,n=new FormData,i=this.upload,r=e.length;for(t=0;r>t;t++)n.append(i.options.async.saveField||i.name,e[t].rawFile);return n},onRequestSuccess:function(e,t){function n(){t.trigger("t:upload-error",[i])}var i=e.target,r=this;i.status>=200&&299>=i.status?d(i.responseText,function(e){t.trigger("t:progress",[100]),t.trigger("t:upload-success",[e,i]),r.cleanupFileEntry(t)},n):n()},onRequestError:function(e,t){var n=e.target;t.trigger("t:upload-error",[n])},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.children(".k-icon").is(".k-success"))}),i&&n.remove())},removeFileEntry:function(e){this.cleanupFileEntry(e),this.upload._removeFileEntry(e)},onRequestProgress:function(e,t){var n=Math.round(100*e.loaded/e.total);t.trigger("t:progress",[n])},stopUploadRequest:function(e){e.data("request").abort()}},_.ui.plugin(E)}(window.kendo.jQuery),function(e,t){function n(e){return e!==t}function i(e,t,n){return Math.max(Math.min(parseInt(e,10),1/0===n?n:parseInt(n,10)),parseInt(t,10))}function r(e,t){var n=e.children(k);return n.data("kendoWindow")||n.data("kendo"+t)}function o(t){return e(y).filter(function(){var n=e(this),i=r(n,t);return i.options.modal&&n.is(I)&&i.options.visible}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")})}function a(e,t){return function(){var e=this,n=e.wrapper,i=n[0].style,r=e.options;if(!r.isMaximized&&!r.isMinimized)return e.restoreOptions={width:i.width,height:i.height},n.find(C).hide().end().find(j).parent().hide().eq(0).before(Y.action({name:"Restore"})),t.call(e),e}}function s(e){var t=this;t.owner=e,t._draggable=new u(e.wrapper,{filter:C,group:e.wrapper.id+"-resizing",dragstart:h(t.dragstart,t),drag:h(t.drag,t),dragend:h(t.dragend,t)})}function l(e){var t=this;t.owner=e,t._draggable=new u(e.wrapper,{filter:x,group:e.wrapper.id+"-moving",dragstart:h(t.dragstart,t),drag:h(t.drag,t),dragend:h(t.dragend,t),dragcancel:h(t.dragcancel,t)})}var d=window.kendo,c=d.ui.Widget,u=d.ui.Draggable,p=e.isPlainObject,f=d._activeElement,h=e.proxy,g=e.extend,m=e.each,v=d.template,_="body",b=".kendoWindow",y=".k-window",w=".k-window-title",x=w+"bar",k=".k-window-content",C=".k-resize-handle",T=".k-overlay",S="k-content-frame",A="k-loading",F="k-state-hover",D="k-state-focused",I=":visible",E="hidden",P="cursor",z="open",H="activate",R="deactivate",O="close",M="refresh",N="resize",B="dragstart",L="dragend",V="error",U="overflow",W="zIndex",j=".k-window-actions .k-i-minimize,.k-window-actions .k-i-maximize",q=".k-window-titlebar .k-window-action",G=d.isLocalUrl,$=c.extend({init:function(t,i){var r,o,a,u,f,g,v,_=this,C=!1,T=i&&i.actions&&!i.actions.length;c.fn.init.call(_,t,i),i=_.options,t=_.element,f=i.content,T&&(i.actions=[]),_.appendTo=e(i.appendTo||document.body),_._animations(),f&&!p(f)&&(f=i.content={url:f}),t.find("script").filter(function(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}).remove(),t.parent().is(_.appendTo)||(t.is(I)?(o=t.offset(),C=!0):(a=t.css("visibility"),u=t.css("display"),t.css({visibility:E,display:""}),o=t.offset(),t.css({visibility:a,display:u}))),n(i.visible)&&null!==i.visible||(i.visible=t.is(I)),r=_.wrapper=t.closest(y),t.is(".k-content")&&r[0]||(t.addClass("k-window-content k-content"),_._createWindow(t,i),r=_.wrapper=t.closest(y),_._dimensions()),o&&r.css({top:o.top,left:o.left}),f&&_.refresh(f),i.visible&&_.toFront(),g=r.children(k),_._tabindex(g),i.visible&&i.modal&&_._overlay(r.is(I)).css({opacity:.5}),r.on("mouseenter"+b,q,function(){e(this).addClass(F)}).on("mouseleave"+b,q,function(){e(this).removeClass(F)}).on("click"+b,q,h(_._windowActionHandler,_)),g.on("keydown"+b,h(_._keydown,_)).on("focus"+b,function(){r.addClass(D)}).on("blur"+b,function(){r.removeClass(D)}),i.resizable&&(r.on("dblclick"+b,x,function(t){return e(t.target).closest(".k-window-action").length||_.toggleMaximization(),this}),m("n e s w se sw ne nw".split(" "),function(e,t){r.append(Y.resizeHandle(t))}),_.resizing=new s(_)),i.draggable&&(_.dragging=new l(_)),v=t.attr("id"),v&&(v+="_wnd_title",r.find(x).children(w).attr("id",v),g.attr({role:"dialog","aria-labelledby":v})),r.add(r.find(".k-resize-handle,.k-window-titlebar")).on("mousedown"+b,h(_.toFront,_)),_.touchScroller=d.touchScroller(t),_._resizeHandler=function(e){return _._onDocumentResize(e)},e(window).on("resize",_._resizeHandler),i.visible&&(_.trigger(z),_.trigger(H)),d.notify(_)},_dimensions:function(){var e=this,t=e.wrapper,n=e.options,r=n.width,o=n.height,a=n.maxHeight;e.title(n.title),m(["minWidth","minHeight","maxWidth","maxHeight"],function(e,i){var r=n[i];r&&1/0!=r&&t.css(i,r)}),a&&1/0!=a&&e.element.css("maxHeight",a),r&&((""+r).indexOf("%")>0?t.width(r):t.width(i(r,n.minWidth,n.maxWidth))),o&&((""+o).indexOf("%")>0?t.height(o):t.height(i(o,n.minHeight,n.maxHeight))),n.visible||t.hide()},_animations:function(){var e=this.options;e.animation===!1&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})},setOptions:function(e){c.fn.setOptions.call(this,e),this._animations(),this._dimensions()},events:[z,H,R,O,M,N,B,L,V],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"],modal:!1,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,visible:null,height:null,width:null},_closable:function(){return e.inArray("close",e.map(this.options.actions,function(e){return e.toLowerCase()}))>-1},_keydown:function(e){var t,n,r,o,a=this,s=a.options,l=d.keys,c=e.keyCode,u=a.wrapper,p=10,f=a.options.isMaximized;e.target==e.currentTarget&&(c==l.ESC&&a._closable()&&a._close(!0),!s.draggable||e.ctrlKey||f||(t=d.getOffset(u),c==l.UP?n=u.css("top",t.top-p):c==l.DOWN?n=u.css("top",t.top+p):c==l.LEFT?n=u.css("left",t.left-p):c==l.RIGHT&&(n=u.css("left",t.left+p))),s.resizable&&e.ctrlKey&&!f&&(c==l.UP?(n=!0,o=u.height()-p):c==l.DOWN&&(n=!0,o=u.height()+p),c==l.LEFT?(n=!0,r=u.width()-p):c==l.RIGHT&&(n=!0,r=u.width()+p),n&&(u.css({width:i(r,s.minWidth,s.maxWidth),height:i(o,s.minHeight,s.maxHeight)}),a.trigger(N))),n&&e.preventDefault())},_overlay:function(t){var n=this.appendTo.children(".k-overlay"),i=this.wrapper;return n.length||(n=e("
")),n.insertBefore(i[0]).toggle(t).css(W,parseInt(i.css(W),10)-1),n},_windowActionHandler:function(n){var i=e(n.target).closest(".k-window-action").find(".k-icon"),r=this;r._closing||m({"k-i-close":function(){r._close(!0)},"k-i-maximize":r.maximize,"k-i-minimize":r.minimize,"k-i-restore":r.restore,"k-i-refresh":r.refresh},function(e,o){return i.hasClass(e)?(n.preventDefault(),o.call(r),!1):t})},center:function(){var t=this.wrapper,n=e(window);return t.css({left:n.scrollLeft()+Math.max(0,(n.width()-t.width())/2),top:n.scrollTop()+Math.max(0,(n.height()-t.height())/2)}),this},title:function(e){var t=this,n=t.wrapper,i=t.options,r=n.find(x),o=r.children(w),a=r.outerHeight();return arguments.length?(e===!1?(n.addClass("k-window-titleless"),r.remove()):(r.length||n.prepend(Y.titlebar(g(Y,i))),n.css("padding-top",a),r.css("margin-top",-a)),o.text(e),t):o.text()},content:function(e){var t=this.wrapper.children(k),n=t.children(".km-scroll-container");return t=n[0]?n:t,e?(d.destroy(this.element.children()),t.html(e),this):t.html()},open:function(){var t,n=this,i=n.wrapper,r=n.options,o=r.animation.open,a=i.children(k),s=a.css(U);return n.trigger(z)||(n._closing=!1,n.toFront(),n.element.focus(),r.visible=!0,r.modal&&(t=n._overlay(!1),o.duration?t.kendoStop().kendoAnimate({effects:"fade:in",duration:o.duration}).show():t.css("opacity",.5).show()),i.is(I)||(a.css(U,E),i.show().kendoStop().kendoAnimate({effects:o.effects,duration:o.duration,complete:function(){n.element.focus(),n.trigger(H),a.css(U,s)}}))),r.isMaximized&&(n._documentScrollTop=e(document).scrollTop(),e("html, body").css(U,E)),n},_close:function(n){var i,a,s,l=this,d=l.wrapper,c=l.options,u=c.animation.open,p=c.animation.close;d.is(I)&&!l.trigger(O,{userTriggered:!!n})&&(l._closing=!0,c.visible=!1,e(y).each(function(t,n){var i=e(n),r=i.find(k);n!=d&&r.find("> ."+S).length>0&&r.children(".k-overlay").remove()}),i=o(c.name),a=c.modal&&!i.length,s=c.modal?l._overlay(!0):e(t),a?p.duration?s.kendoStop().kendoAnimate({effects:"fade:out",duration:p.duration,hide:!0}):s.hide():i.length&&r(i.eq(i.length-1),c.name)._overlay(!0),d.kendoStop().kendoAnimate({effects:p.effects||u.effects,reverse:p.reverse===!0,duration:p.duration,complete:function(){d.hide(),l.trigger(R)}})),l.options.isMaximized&&(e("html, body").css(U,""),l._documentScrollTop&&l._documentScrollTop>0&&e(document).scrollTop(l._documentScrollTop))},close:function(){return this._close(!1),this},toFront:function(t){var n,i,r=this,o=r.wrapper,a=o[0],s=+o.css(W),l=s,d=f(),c=r.element,u=t&&t.target?t.target:null;return e(y).each(function(t,n){var i=e(n),r=i.css(W),o=i.find(k);isNaN(r)||(s=Math.max(+r,s)),n!=a&&o.find("> ."+S).length>0&&o.append(Y.overlay)}),(10001==s||s>l)&&o.css(W,s+2),r.element.find("> .k-overlay").remove(),e(d).is(c)||e(u).is(q+","+q+" .k-icon,:input,a")||c.find(d).length&&c.find(u).length||(c.focus(),n=e(window).scrollTop(),i=parseInt(r.wrapper.position().top,10),i>0&&0>i-n&&(n>0?e(window).scrollTop(i):r.wrapper.css("top",n))),r},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t=this,n=t.options,i=t.restoreOptions;if(n.isMaximized||n.isMinimized)return t.wrapper.css({position:"absolute",left:i.left,top:i.top,width:i.width,height:i.height}).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-restore").parent().remove().end().end().find(j).parent().show(),e("html, body").css(U,""),this._documentScrollTop&&this._documentScrollTop>0&&e(document).scrollTop(this._documentScrollTop),n.isMaximized=n.isMinimized=!1,t.trigger(N),t},maximize:a("maximize",function(){var t=this,n=t.wrapper,i=n.position();g(t.restoreOptions,{left:i.left,top:i.top}),n.css({left:0,top:0,position:"fixed"}),this._documentScrollTop=e(document).scrollTop(),e("html, body").css(U,E),t.options.isMaximized=!0,t._onDocumentResize()}),minimize:a("minimize",function(){var e=this;e.wrapper.css("height",""),e.element.hide(),e.options.isMinimized=!0}),_onDocumentResize:function(){var t=this,n=t.wrapper,i=e(window);t.options.isMaximized&&(n.css({width:i.width(),height:i.height()-parseInt(n.css("padding-top"),10)}),t.trigger(N))},refresh:function(t){var i,r,o,a=this,s=a.options,l=e(a.element);
return p(t)||(t={url:t}),t=g({},s.content,t),r=n(s.iframe)?s.iframe:t.iframe,o=t.url,o?(n(r)||(r=!G(o)),r?(i=l.find("."+S)[0],i?i.src=o||i.src:l.html(Y.contentFrame(g({},s,{content:t}))),l.find("."+S).unbind("load"+b).on("load"+b,function(){a.trigger(M)})):a._ajaxRequest(t)):(t.template&&a.content(v(t.template)({})),a.trigger(M)),a},_ajaxRequest:function(t){var n=this,i=t.template,r=n.wrapper.find(".k-window-titlebar .k-i-refresh"),o=setTimeout(function(){r.addClass(A)},100);e.ajax(g({type:"GET",dataType:"html",cache:!1,error:h(function(e,t){n.trigger(V,{status:t,xhr:e})},n),complete:function(){clearTimeout(o),r.removeClass(A)},success:h(function(e){i&&(e=v(i)(e||{})),n.content(e),n.element.prop("scrollTop",0),n.trigger(M)},n)},t))},destroy:function(){var t,n,i=this;c.fn.destroy.call(i),d.destroy(i.wrapper),i.resizing&&i.resizing.destroy(),i.dragging&&i.dragging.destroy(),i.element.children("iframe").remove(),i.wrapper.remove().add(i.wrapper.find(".k-resize-handle,.k-window-titlebar")).off(b),e(window).off("resize",i._resizeHandler),t=o(),n=i.options.modal&&!t.length,n?i._overlay(!1).remove():t.length>0&&r(t.eq(t.length-1),i.options.name)._overlay(!0)},_createWindow:function(){var t,n,i=this,r=i.element,o=i.options,a=d.support.isRtl(r);o.scrollable===!1&&r.attr("style","overflow:hidden;"),n=e(Y.wrapper(o)),o.title!==!1&&n.append(Y.titlebar(g(Y,o))),t=r.find("iframe:not(.k-content)").map(function(){var e=this.getAttribute("src");return this.src="",e}),n.toggleClass("k-rtl",a).appendTo(i.appendTo).append(r).find("iframe:not(.k-content)").each(function(e){this.src=t[e]}),n.find(".k-window-title").css(a?"left":"right",n.find(".k-window-actions").outerWidth()+10),r.show()}}),Y={wrapper:v("
"),action:v("#= name # "),titlebar:v(""),overlay:"
",contentFrame:v(""),resizeHandle:v("
")};s.prototype={dragstart:function(t){var n=this,i=n.owner,r=i.wrapper;n.elementPadding=parseInt(i.wrapper.css("padding-top"),10),n.initialCursorPosition=d.getOffset(r,"position"),n.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),n.initialSize={width:r.width(),height:r.height()},n.containerOffset=d.getOffset(i.appendTo),r.append(Y.overlay).find(C).not(t.currentTarget).hide(),e(_).css(P,t.currentTarget.css(P))},drag:function(e){var t,n,r,o,a=this,s=a.owner,l=s.wrapper,d=s.options,c=a.resizeDirection,u=a.containerOffset,p=a.initialCursorPosition,f=a.initialSize,h=Math.max(e.x.location,u.left),g=Math.max(e.y.location,u.top);c.indexOf("e")>=0?(t=h-p.left,l.width(i(t,d.minWidth,d.maxWidth))):c.indexOf("w")>=0&&(o=p.left+f.width,t=i(o-h,d.minWidth,d.maxWidth),l.css({left:o-t-u.left,width:t})),c.indexOf("s")>=0?(n=g-p.top-a.elementPadding,l.height(i(n,d.minHeight,d.maxHeight))):c.indexOf("n")>=0&&(r=p.top+f.height,n=i(r-g,d.minHeight,d.maxHeight),l.css({top:r-n-u.top,height:n})),s.trigger(N)},dragend:function(t){var n=this,i=n.owner,r=i.wrapper;return r.find(T).remove().end().find(C).not(t.currentTarget).show(),e(_).css(P,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&r.css(n.initialCursorPosition).css(n.initialSize),!1},destroy:function(){this._draggable.destroy()}},l.prototype={dragstart:function(t){var n=this.owner,i=n.element,r=i.find(".k-window-actions"),o=d.getOffset(n.appendTo);n.trigger(B),n.initialWindowPosition=d.getOffset(n.wrapper,"position"),n.startPosition={left:t.x.client-n.initialWindowPosition.left,top:t.y.client-n.initialWindowPosition.top},n.minLeftPosition=r.length>0?r.outerWidth()+parseInt(r.css("right"),10)-i.outerWidth():20-i.outerWidth(),n.minLeftPosition-=o.left,n.minTopPosition=-o.top,n.wrapper.append(Y.overlay).find(C).hide(),e(_).css(P,t.currentTarget.css(P))},drag:function(t){var n=this.owner,i={left:Math.max(t.x.client-n.startPosition.left,n.minLeftPosition),top:Math.max(t.y.client-n.startPosition.top,n.minTopPosition)};e(n.wrapper).css(i)},_finishDrag:function(){var t=this.owner;t.wrapper.find(C).toggle(!t.options.isMinimized).end().find(T).remove(),e(_).css(P,"")},dragcancel:function(e){this._finishDrag(),e.currentTarget.closest(y).css(this.owner.initialWindowPosition)},dragend:function(){return this._finishDrag(),this.owner.trigger(L),!1},destroy:function(){this._draggable.destroy()}},d.ui.plugin($)}(window.kendo.jQuery),function(e,t){function n(e){var t={top:0,right:0,bottom:0,left:0};return"number"==typeof e?t[Nt]=t[Ot]=t[ft]=t[Dt]=e:(t[Nt]=e[Nt]||0,t[Ot]=e[Ot]||0,t[ft]=e[ft]||0,t[Dt]=e[Dt]||0),t}function i(e,t){return et.extend({init:function(e){this.view=e},decorate:function(n){var i,r=this,o=r.view,a=n.options.animation;return a&&a.type===e&&o.options.transitions&&(i=n._animation=new t(n,a),o.animations.push(i)),n}})}function r(t,n,i){var o,s,d,c,u,p,f,h,g,m,v,_=a(n),b=t+_+i,y=r.cache.get(b),w={width:0,height:0,baseline:0};if(y)return y;o=r.measureBox,s=r.baselineMarker.cloneNode(!1),o&&o.parentNode||(o=r.measureBox=e("
").appendTo(X.body)[0]);for(d in n)o.style[d]=n[d];return o.innerHTML=t,o.appendChild(s),(t+"").length&&(w={width:o.offsetWidth-ut,height:o.offsetHeight,baseline:s.offsetTop+ut}),i&&(c=w.width,u=w.height,p=c/2,f=u/2,h=l(0,0,p,f,i),g=l(c,0,p,f,i),m=l(c,u,p,f,i),v=l(0,u,p,f,i),w.normalWidth=c,w.normalHeight=u,w.width=ot.max(h.x,g.x,m.x,v.x)-ot.min(h.x,g.x,m.x,v.x),w.height=ot.max(h.y,g.y,m.y,v.y)-ot.min(h.y,g.y,m.y,v.y)),r.cache.put(b,w),w}function o(e,t){var n,i,r,o=t-e;if(0===o){if(0===t)return.1;o=ot.abs(t)}return n=ot.pow(10,ot.floor(ot.log(o)/ot.log(10))),i=m(o/n,bt),r=1,r=1.904762>i?.2:4.761904>i?.5:9.523809>i?1:2,m(n*r,bt)}function a(e){var t,n=[];for(t in e)n.push(t+e[t]);return n.sort().join(" ")}function s(){return Y.current.alloc()}function l(e,t,n,i,r){var o=r*wt;return{x:n+(e-n)*ot.cos(o)+(t-i)*ot.sin(o),y:i-(e-n)*ot.sin(o)+(t-i)*ot.cos(o)}}function d(t,n){if(t.x1==n.x1&&t.y1==n.y1&&t.x2==n.x2&&t.y2==n.y2)return n;var i=ot.min(t.x1,n.x1),r=ot.max(t.x1,n.x1),o=ot.min(t.x2,n.x2),a=ot.max(t.x2,n.x2),s=ot.min(t.y1,n.y1),l=ot.max(t.y1,n.y1),d=ot.min(t.y2,n.y2),c=ot.max(t.y2,n.y2),u=[];return u[0]=C(r,s,o,l),u[1]=C(i,l,r,d),u[2]=C(o,l,a,d),u[3]=C(r,d,o,c),t.x1==i&&t.y1==s||n.x1==i&&n.y1==s?(u[4]=C(i,s,r,l),u[5]=C(o,d,a,c)):(u[4]=C(o,s,a,l),u[5]=C(i,d,r,c)),e.grep(u,function(e){return e.height()>0&&e.width()>0})[0]}function c(){return X.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}function u(e,t){return-1!=rt(e,t)}function p(e){return e[e.length-1]}function f(e,t){[].push.apply(e,t)}function h(e,t){return m(ot.ceil(e/t)*t,bt)}function g(e,t){return m(ot.floor(e/t)*t,bt)}function m(e,t){var n=ot.pow(10,t||0);return ot.round(e*n)/n}function v(e,t,n){return m(e+(t-e)*n,gt)}function _(e){return typeof e!==Bt}function b(e,t){return e-t}function y(e,t,n){var i,r=e.length;for(i=0;r>i;i++)e[i][t]=n}function w(e,t){return e.match(kt)?J.format.apply(this,arguments):J.toString(t,e)}function x(e){return X.getElementById(e)}function k(e){for(var t=e.parentNode;t&&t.parentNode;)t=t.parentNode;return t!==X}var C,T,S,A,F,D,I,E,P,z,H,R,O,M,N,B,L,V,U,W,j,q,G,$,Y,Q,K,X=document,J=window.kendo,Z=J.dataviz={},et=J.Class,tt=J.template,nt=e.map,it=e.noop,rt=e.inArray,ot=Math,at=J.deepExtend,st=function(e){return tt(e,{useWithBlock:!1,paramName:"d"})},lt="k-",dt=10,ct="axisLabelClick",ut=1,pt="#000",ft="bottom",ht="center",gt=3,mt="clip",vt="12px sans-serif",_t=400,bt=6,yt=600,wt=ot.PI/180,xt="fadeIn",kt=/\{\d+:?/,Ct="height",Tt="k",St=1e3,At=1e4,Ft=600,Dt="left",It="linear",Et=Number.MAX_VALUE,Pt=-Number.MAX_VALUE,zt="none",Ht="outside",Rt="radial",Ot="right",Mt="swing",Nt="top",Bt="undefined",Lt=/([A-Z])/g,Vt="width",Ut="#fff",Wt="x",jt="y",qt=.2,Gt=function(e,n){var i=this;return i instanceof Gt?(i.x=m(e||0,gt),i.y=m(n||0,gt),t):new Gt(e,n)};Gt.fn=Gt.prototype={clone:function(){var e=this;return new Gt(e.x,e.y)}},C=function(e,n,i,r){var o=this;return o instanceof C?(o.x1=e||0,o.x2=i||0,o.y1=n||0,o.y2=r||0,t):new C(e,n,i,r)},C.fn=C.prototype={width:function(){return this.x2-this.x1},height:function(){return this.y2-this.y1},translate:function(e,t){var n=this;return n.x1+=e,n.x2+=e,n.y1+=t,n.y2+=t,n},move:function(e,t){var n=this,i=n.height(),r=n.width();return n.x1=e,n.y1=t,n.x2=n.x1+r,n.y2=n.y1+i,n},wrap:function(e){var t=this;return t.x1=ot.min(t.x1,e.x1),t.y1=ot.min(t.y1,e.y1),t.x2=ot.max(t.x2,e.x2),t.y2=ot.max(t.y2,e.y2),t},wrapPoint:function(e){return this.wrap(new C(e.x,e.y,e.x,e.y)),this},snapTo:function(e,t){var n=this;return t!=Wt&&t||(n.x1=e.x1,n.x2=e.x2),t!=jt&&t||(n.y1=e.y1,n.y2=e.y2),n},alignTo:function(e,t){var n,i,r=this,o=r.height(),a=r.width(),s=t==Nt||t==ft?jt:Wt,l=s==jt?o:a;return t===ht?(n=e.center(),i=r.center(),r.x1+=n.x-i.x,r.y1+=n.y-i.y):r[s+1]=t===Nt||t===Dt?e[s+1]-l:e[s+2],r.x2=r.x1+a,r.y2=r.y1+o,r},shrink:function(e,t){var n=this;return n.x2-=e,n.y2-=t,n},expand:function(e,t){return this.shrink(-e,-t),this},pad:function(e){var t=this,i=n(e);return t.x1-=i.left,t.x2+=i.right,t.y1-=i.top,t.y2+=i.bottom,t},unpad:function(e){var t=this,i=n(e);return i.left=-i.left,i.top=-i.top,i.right=-i.right,i.bottom=-i.bottom,t.pad(i)},clone:function(){var e=this;return new C(e.x1,e.y1,e.x2,e.y2)},center:function(){var e=this;return{x:e.x1+e.width()/2,y:e.y1+e.height()/2}},containsPoint:function(e){var t=this;return e.x>=t.x1&&e.x<=t.x2&&e.y>=t.y1&&e.y<=t.y2},points:function(){var e=this;return[new Gt(e.x1,e.y1),new Gt(e.x2,e.y1),new Gt(e.x2,e.y2),new Gt(e.x1,e.y2)]},getHash:function(){var e=this;return[e.x1,e.y1,e.x2,e.y2].join(",")}},T=et.extend({init:function(e,t,n,i,r){var o=this;o.c=e,o.ir=t,o.r=n,o.startAngle=i,o.angle=r},clone:function(){var e=this;return new T(e.c,e.ir,e.r,e.startAngle,e.angle)},middle:function(){return this.startAngle+this.angle/2},radius:function(e,t){var n=this;return t?n.ir=e:n.r=e,n},point:function(e,t){var n=this,i=e*wt,r=ot.cos(i),o=ot.sin(i),a=t?n.ir:n.r,s=n.c.x-r*a,l=n.c.y-o*a;return new Gt(s,l)},getBBox:function(){var e,t,n,i=this,r=new C(Et,Et,Pt,Pt),o=m(i.startAngle%360),a=m((o+i.angle)%360),s=i.ir,l=[0,90,180,270,o,a].sort(b),d=rt(o,l),c=rt(a,l);for(e=o==a?l:c>d?l.slice(d,c+1):[].concat(l.slice(0,c+1),l.slice(d,l.length)),t=0;e.length>t;t++)n=i.point(e[t]),r.wrapPoint(n),r.wrapPoint(n,s);return s||r.wrapPoint(i.c),r},expand:function(e){return this.r+=e,this}}),S=T.extend({init:function(e,t,n,i){T.fn.init.call(this,e,0,t,n,i)},expand:function(e){return T.fn.expand.call(this,e)},clone:function(){var e=this;return new S(e.c,e.r,e.startAngle,e.angle)},radius:function(e){return T.fn.radius.call(this,e)},point:function(e){return T.fn.point.call(this,e)}}),A=et.extend({init:function(e){at(this,{height:40,rotation:90,radius:10,arcAngle:10},e)}}),F=et.extend({init:function(e){var t=this;t.children=[],t.options=at({},t.options,e)},reflow:function(e){var t,n,i,r=this,o=r.children;for(n=0;o.length>n;n++)i=o[n],i.reflow(e),t=t?t.wrap(i.box):i.box.clone();r.box=t||e},getViewElements:function(e){var t,n,i,r=this,o=r.options,a=o.modelId,s=[],l=r.children,d=l.length;for(n=0;d>n;n++)i=l[n],i.discoverable||(i.options=i.options||{},i.options.modelId=a),s.push.apply(s,i.getViewElements(e));return r.discoverable&&(t=r.getRoot(),t&&(t.modelMap[a]=r)),s},enableDiscovery:function(){var e=this,t=e.options;t.modelId=Y.current.alloc(),e.discoverable=!0},destroy:function(){var e,n=this,i=n.children,r=n.getRoot(),o=n.options.modelId;for(r&&o&&(r.modelMap[o]&&Y.current.free(o),r.modelMap[o]=t),e=0;i.length>e;e++)i[e].destroy()},getRoot:function(){var e=this.parent;return e?e.getRoot():null},translateChildren:function(e,t){var n,i=this,r=i.children,o=r.length;for(n=0;o>n;n++)r[n].box.translate(e,t)},append:function(){var e,t=this,n=arguments.length;for(f(t.children,arguments),e=0;n>e;e++)arguments[e].parent=t}}),D=F.extend({init:function(e){var t=this;t.modelMap={},F.fn.init.call(t,e)},options:{width:yt,height:_t,background:Ut,border:{color:pt,width:0},margin:n(5),zIndex:-2},reflow:function(){var e,t=this,n=t.options,i=t.children,r=new C(0,0,n.width,n.height);for(t.box=r.unpad(n.margin),e=0;i.length>e;e++)i[e].reflow(r),r=d(r,i[e].box)},getViewElements:function(e){var t=this,n=t.options,i=n.border||{},r=t.box.clone().pad(n.margin).unpad(i.width),o=[e.createRect(r,{stroke:i.width?i.color:"",strokeWidth:i.width,dashType:i.dashType,fill:n.background,fillOpacity:n.opacity,zIndex:n.zIndex})];return o.concat(F.fn.getViewElements.call(t,e))},getRoot:function(){return this}}),I=F.extend({init:function(e){F.fn.init.call(this,e)},options:{align:Dt,vAlign:Nt,margin:{},padding:{},border:{color:pt,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0},reflow:function(e){function t(){o.align(e,Wt,a.align),o.align(e,jt,a.vAlign),o.paddingBox=i.clone().unpad(s).unpad(d)}var i,r,o=this,a=o.options,s=n(a.margin),l=n(a.padding),d=a.border.width;F.fn.reflow.call(o,e),i=a.width&&a.height?o.box=new C(0,0,a.width,a.height):o.box,a.shrinkToFit?(t(),r=o.contentBox=o.paddingBox.clone().unpad(l)):(r=o.contentBox=i.clone(),i.pad(l).pad(d).pad(s),t()),o.translateChildren(i.x1-r.x1+s.left+d+l.left,i.y1-r.y1+s.top+d+l.top)},align:function(e,t,n){var i=this,r=i.box,o=t+1,a=t+2,s=t===Wt?Vt:Ct,l=r[s]();u(n,[Dt,Nt])?(r[o]=e[o],r[a]=r[o]+l):u(n,[Ot,ft])?(r[a]=e[a],r[o]=r[a]-l):n==ht&&(r[o]=e[o]+(e[s]()-l)/2,r[a]=r[o]+l)},hasBox:function(){var e=this.options;return e.border.width||e.background},getViewElements:function(e,t){var n=this,i=n.options,r=[];return i.visible?(n.hasBox()&&r.push(e.createRect(n.paddingBox,at(n.elementStyle(),t))),r.concat(F.fn.getViewElements.call(n,e))):[]},elementStyle:function(){var e=this,t=e.options,n=t.border||{};return{id:t.id,stroke:n.width?n.color:"",strokeWidth:n.width,dashType:n.dashType,strokeOpacity:t.opacity,fill:t.background,fillOpacity:t.opacity,animation:t.animation,zIndex:t.zIndex,data:{modelId:t.modelId}}}}),E=F.extend({init:function(e,t){var n=this;F.fn.init.call(n,t),n.content=e,n.reflow(new C)},options:{font:vt,color:pt,align:Dt,vAlign:""},reflow:function(e){var t,n,i=this,o=i.options;t=o.size=r(i.content,{font:o.font},o.rotation),i.baseline=t.baseline,o.align==Dt?i.box=new C(e.x1,e.y1,e.x1+t.width,e.y1+t.height):o.align==Ot?i.box=new C(e.x2-t.width,e.y1,e.x2,e.y1+t.height):o.align==ht&&(n=(e.width()-t.width)/2,i.box=new C(m(e.x1+n,gt),e.y1,m(e.x2-n,gt),e.y1+t.height)),o.vAlign==ht?(n=(e.height()-t.height)/2,i.box=new C(i.box.x1,e.y1+n,i.box.x2,e.y2-n)):o.vAlign==ft?i.box=new C(i.box.x1,e.y2-t.height,i.box.x2,e.y2):o.vAlign==Nt&&(i.box=new C(i.box.x1,e.y1,i.box.x2,e.y1+t.height))},getViewElements:function(e){var t=this,n=t.options;return F.fn.getViewElements.call(this,e),[e.createText(t.content,at({},n,{x:t.box.x1,y:t.box.y1,baseline:t.baseline,data:{modelId:n.modelId}}))]}}),P=I.extend({init:function(e,t){var n,i=this;I.fn.init.call(i,t),t=i.options,n=new E(e,at({},t,{align:Dt,vAlign:Nt})),i.append(n),i.hasBox()&&(n.options.id=s()),i.reflow(new C)}}),z=F.extend({init:function(e){var t=this;F.fn.init.call(t,e),e=t.options,t.append(new P(e.text,at({},e,{vAlign:e.position})))},options:{color:pt,position:Nt,align:ht,margin:n(5),padding:n(5)},reflow:function(e){var t=this;F.fn.reflow.call(t,e),t.box.snapTo(e,Wt)}}),z.buildTitle=function(e,t,n){var i;return"string"==typeof e&&(e={text:e}),e=at({visible:!0},n,e),e&&e.visible&&e.text&&(i=new z(e),t.append(i)),i},H=P.extend({init:function(e,t,n,i){var r=this,o=e;i.template?(r.template=tt(i.template),o=r.template({value:e,dataItem:n})):i.format&&(o=r.formatValue(e,i)),r.text=o,r.value=e,r.index=t,r.dataItem=n,P.fn.init.call(r,o,at({id:s()},i)),r.enableDiscovery()},formatValue:function(e,t){return w(t.format,e)},click:function(t,n){var i=this;t.trigger(ct,{element:e(n.target),value:i.value,text:i.text,index:i.index,dataItem:i.dataItem,axis:i.parent.options})}}),R=F.extend({init:function(e){var t=this;F.fn.init.call(t,e),t.options.visible||(t.options=at({},t.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),t.options.minorTicks=at({},{color:t.options.line.color,width:t.options.line.width,visible:t.options.minorTickType!=zt},t.options.minorTicks,{size:t.options.minorTickSize,align:t.options.minorTickType}),t.options.majorTicks=at({},{color:t.options.line.color,width:t.options.line.width,visible:t.options.majorTickType!=zt},t.options.majorTicks,{size:t.options.majorTickSize,align:t.options.majorTickType}),t.createLabels(),t.createTitle()},options:{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:pt,visible:!0},title:{visible:!0,position:ht},majorTicks:{align:Ht,size:4},minorTicks:{align:Ht,size:3},axisCrossingValue:0,majorTickType:Ht,minorTickType:zt,minorGridLines:{visible:!1,width:1,color:pt},margin:5,visible:!0,reverse:!1,justified:!0,_alignLines:!0},createLabels:function(){var e,t,n,i=this,r=i.options,o=r.vertical?Ot:ht,a=at({},r.labels,{align:o,zIndex:r.zIndex,modelId:r.modelId}),s=a.step;if(i.labels=[],a.visible)for(n=i.labelsCount(),t=a.skip;n>t;t+=s)e=i.createAxisLabel(t,a),i.append(e),i.labels.push(e)},destroy:function(){var e,t=this,n=t.labels;for(e=0;n.length>e;e++)n[e].destroy();F.fn.destroy.call(t)},lineBox:function(){var e=this,t=e.options,n=e.box,i=t.vertical,r=e.labels,o=i?Ct:Vt,a=t.justified,s=t.labels.mirror,l=s?n.x1:n.x2,d=s?n.y2:n.y1,c=0,u=t.line.width;return a&&r.length>1&&(c=r[0].box[o]()/2,u=p(r).box[o]()/2),i?new C(l,n.y1+c,l,n.y2-u):new C(n.x1+c,d,n.x2-u,d)},createTitle:function(){var e,t=this,n=t.options,i=at({rotation:n.vertical?-90:0,text:"",zIndex:1},n.title);i.visible&&i.text&&(e=new P(i.text,i),t.append(e),t.title=e)},renderTicks:function(e){function t(t,a,u,p,f){var h,g=f/a,m=t.length;if(p)for(h=0;m>h;h++)0!==h%g&&(n=c?d.x2:d.x2-u.size,i=c?d.y1-u.size:d.y1,r=t[h],o={strokeWidth:u.width,stroke:u.color,align:l._alignLines},l.vertical?s.push(e.createLine(n,r,n+u.size,r,o)):s.push(e.createLine(r,i,r,i+u.size,o)))}var n,i,r,o,a=this,s=[],l=a.options,d=a.lineBox(),c=l.labels.mirror;return t(a.getMajorTickPositions(),l.majorUnit,l.majorTicks,l.majorTicks.visible),t(a.getMinorTickPositions(),l.minorUnit,l.minorTicks,l.minorTicks.visible,l.majorTicks.visible?l.majorUnit:0),s},getViewElements:function(e){var t,n=this,i=n.options,r=i.line,o=n.lineBox(),a=F.fn.getViewElements.call(n,e);return r.width>0&&r.visible&&(t={strokeWidth:r.width,stroke:r.color,dashType:r.dashType,zIndex:r.zIndex,align:i._alignLines},a.push(e.createLine(o.x1,o.y1,o.x2,o.y2,t)),f(a,n.renderTicks(e))),f(a,n.renderPlotBands(e)),a},getActualTickSize:function(){var e=this,t=e.options,n=0;return t.majorTicks.visible&&t.minorTicks.visible?n=ot.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?n=t.majorTicks.size:t.minorTicks.visible&&(n=t.minorTicks.size),n},renderPlotBands:function(e){var t,n,i,r,o=this,a=o.options,s=a.plotBands||[],l=a.vertical,d=[],c=o.plotArea;return s.length&&(d=nt(s,function(a){return i=_(a.from)?a.from:Pt,r=_(a.to)?a.to:Et,l?(t=c.axisX.lineBox(),n=o.getSlot(a.from,a.to)):(t=o.getSlot(a.from,a.to),n=c.axisY.lineBox()),e.createRect(new C(t.x1,n.y1,t.x2,n.y2),{fill:a.color,fillOpacity:a.opacity,zIndex:-1})})),d},renderGridLines:function(e,n){var i=this,r=i.plotArea.options.modelId,o=i.options,a=o.vertical,s=n.lineBox(),l=s[a?"x1":"y1"],d=s[a?"x2":"y2"],c=i.getMajorTickPositions(),p=[],f=function(e,t){return{pos:e,options:t}};return o.majorGridLines.visible&&(p=nt(c,function(e){return f(e,o.majorGridLines)})),o.minorGridLines.visible&&(p=p.concat(nt(i.getMinorTickPositions(),function(e){return o.majorGridLines.visible?u(e,c)?t:f(e,o.minorGridLines):f(e,o.minorGridLines)}))),nt(p,function(t){var i={data:{modelId:r},strokeWidth:t.options.width,stroke:t.options.color,dashType:t.options.dashType,zIndex:-1},o=m(t.pos),s=n.lineBox();if(a){if(!n.options.line.visible||s.y1!==o)return e.createLine(l,o,d,o,i)}else if(!n.options.line.visible||s.x1!==o)return e.createLine(o,l,o,d,i)})},reflow:function(e){var t,n,i=this,r=i.options,o=r.vertical,a=i.labels,s=a.length,l=i.getActualTickSize()+r.margin,d=0,c=0,u=i.title;for(n=0;s>n;n++)t=a[n],d=ot.max(d,t.box.height()),c=ot.max(c,t.box.width());u&&(o?c+=u.box.width():d+=u.box.height()),i.box=o?new C(e.x1,e.y1,e.x1+c+l,e.y2):new C(e.x1,e.y1,e.x2,e.y1+d+l),i.arrangeTitle(),i.arrangeLabels(c,d)},arrangeLabels:function(){var e,t,n,i,r,o,a,s,l,d,c,u=this,p=u.options,f=p.labels,h=u.labels,g=!p.justified,m=p.vertical,v=u.lineBox(),_=p.labels.mirror,b=u.getMajorTickPositions(),y=u.getActualTickSize()+p.margin;for(n=0;h.length>n;n++)s=h[n],l=f.skip+f.step*n,d=m?s.box.height():s.box.width(),c=b[l]-d/2,m?(g&&(i=b[l],r=b[l+1],o=i+(r-i)/2,c=o-d/2),a=v.x2,_?a+=y:a-=y+s.box.width(),e=s.box.move(a,c)):(g?(i=b[l],r=b[l+1]):(i=c,r=c+d),t=v.y1,_?t-=y+s.box.height():t+=y,e=new C(i,t,r,t+s.box.height())),s.reflow(e)},arrangeTitle:function(){var e=this,t=e.options,n=t.labels.mirror,i=t.vertical,r=e.title;r&&(i?(r.options.align=n?Ot:Dt,r.options.vAlign=r.options.position):(r.options.align=r.options.position,r.options.vAlign=n?Nt:ft),r.reflow(e.box))},alignTo:function(e){var t=this,n=e.lineBox(),i=t.options.vertical,r=i?jt:Wt;t.box.snapTo(n,r),i?t.box.shrink(0,t.lineBox().height()-n.height()):t.box.shrink(t.lineBox().width()-n.width(),0),t.box[r+1]-=t.lineBox()[r+1]-n[r+1],t.box[r+2]-=t.lineBox()[r+2]-n[r+2]}}),O=R.extend({init:function(e,t,n){var i=this,r=i.initDefaults(e,t,n);R.fn.init.call(i,r)},options:{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:pt},zIndex:1},initDefaults:function(e,t,n){var i,r=this,a=n.narrowRange,s=r.autoAxisMin(e,t,a),l=r.autoAxisMax(e,t,a),d=o(s,l),c={majorUnit:d};return 0>s&&(s-=d),l>0&&(l+=d),c.min=g(s,d),c.max=h(l,d),n&&(i=_(n.min)||_(n.max),i&&n.min===n.max&&(n.min>0?n.min=0:n.max=1),n.majorUnit?(c.min=g(c.min,n.majorUnit),c.max=h(c.max,n.majorUnit)):i&&(n=at(c,n),c.majorUnit=o(n.min,n.max))),c.minorUnit=(n.majorUnit||c.majorUnit)/5,at(c,n)},range:function(){var e=this.options;return{min:e.min,max:e.max}},autoAxisMax:function(e,t,n){var i,r;if(!e&&!t)return 1;if(0>=e&&0>=t){if(t=e==t?0:t,r=ot.abs((t-e)/t),!n&&r>qt)return 0;i=ot.min(0,t-(e-t)/2)}else e=e==t?0:e,i=t;return i},autoAxisMin:function(e,t,n){var i,r;if(!e&&!t)return 0;if(e>=0&&t>=0){if(e=e==t?0:e,r=(t-e)/t,!n&&r>qt)return 0;i=ot.max(0,e-(t-e)/2)}else t=e==t?0:t,i=e;return i},getDivisions:function(e){var t=this.options,n=t.max-t.min;return ot.floor(m(n/e,gt))+1},getTickPositions:function(e){var t,n=this,i=n.options,r=i.vertical,o=i.reverse,a=n.lineBox(),s=r?a.height():a.width(),l=i.max-i.min,d=s/l,c=e*d,u=n.getDivisions(e),p=(r?-1:1)*(o?-1:1),f=1===p?1:2,h=a[(r?jt:Wt)+f],g=[];for(t=0;u>t;t++)g.push(m(h,gt)),h+=c*p;return g},getMajorTickPositions:function(){var e=this;return e.getTickPositions(e.options.majorUnit)},getMinorTickPositions:function(){var e=this;return e.getTickPositions(e.options.minorUnit)},getSlot:function(e,t){var n,i,r=this,o=r.options,a=o.reverse,s=o.vertical,l=s?jt:Wt,d=r.lineBox(),c=d[l+(a?2:1)],u=s?d.height():d.width(),p=a?-1:1,f=p*(u/(o.max-o.min)),h=new C(d.x1,d.y1,d.x1,d.y1);return _(e)||(e=t||0),_(t)||(t=e||0),e=ot.max(ot.min(e,o.max),o.min),t=ot.max(ot.min(t,o.max),o.min),s?(n=o.max-ot.max(e,t),i=o.max-ot.min(e,t)):(n=ot.min(e,t)-o.min,i=ot.max(e,t)-o.min),h[l+1]=c+f*(a?i:n),h[l+2]=c+f*(a?n:i),h},getValue:function(e){var t,n=this,i=n.options,r=i.reverse,o=i.vertical,a=1*i.max,s=1*i.min,l=o?jt:Wt,d=n.lineBox(),c=d[l+(r?2:1)],u=o?d.height():d.width(),p=r?-1:1,f=p*(e[l]-c),h=(a-s)/u,g=f*h;return 0>f||f>u?null:(t=o?a-g:s+g,m(t,bt))},translateRange:function(e){var t=this,n=t.options,i=t.lineBox(),r=n.vertical,o=n.reverse,a=r?i.height():i.width(),s=n.max-n.min,l=a/s,d=m(e/l,bt);return!r&&!o||r&&o||(d=-d),{min:n.min+d,max:n.max+d}},scaleRange:function(e){var t=this,n=t.options,i=-e*n.majorUnit;return{min:n.min-i,max:n.max+i}},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var n=this,i=n.options,r=m(i.min+e*i.majorUnit,bt);return new H(r,e,null,t)}}),M=et.extend({init:function(e){var t=this;t.children=[],t.options=at({},t.options,e)},render:function(){return this.template(this)},renderContent:function(){var e,t=this,n="",i=t.sortChildren(),r=i.length;for(e=0;r>e;e++)n+=i[e].render();return n},sortChildren:function(){var e,t,n=this,i=n.children;for(t=0,e=i.length;e>t;t++)i[t]._childIndex=t;return i.slice(0).sort(n.compareChildren)},refresh:e.noop,compareChildren:function(e,t){var n=e.options.zIndex||0,i=t.options.zIndex||0;return n!==i?n-i:e._childIndex-t._childIndex},renderId:function(){var e=this,t="";return e.options.id&&(t=e.renderAttr("id",e.options.id)),t},renderAttr:function(e,t){return _(t)?" "+e+"='"+t+"' ":""},renderDataAttributes:function(){var e,t,n=this,i=n.options.data,r="";for(e in i)t="data-"+e.replace(Lt,"-$1").toLowerCase(),r+=n.renderAttr(t,i[e]);return r}}),N=M.extend({init:function(e){var t=this;M.fn.init.call(t,e),t.definitions={},t.decorators=[],t.animations=[]},destroy:function(){for(var e=this.animations;e.length>0;)e.shift().destroy()},renderDefinitions:function(){var e,t=this.definitions,n="";for(e in t)t.hasOwnProperty(e)&&(n+=t[e].render());return n},decorate:function(e){var t,n,i=this.decorators,r=i.length;for(t=0;r>t;t++)n=i[t],this._decorateChildren(n,e),e=n.decorate.call(n,e);return e},_decorateChildren:function(e,t){var n,i=this,r=t.children,o=r.length;for(n=0;o>n;n++)i._decorateChildren(e,r[n]),r[n]=e.decorate.call(e,r[n])},setupAnimations:function(){for(var e=0;this.animations.length>e;e++)this.animations[e].setup()},playAnimations:function(){for(var e=0;this.animations.length>e;e++)this.animations[e].play()},buildGradient:function(e){var t,n,i,r=this,o=r._gradientCache;return o||(o=r._gradientCache=[]),e&&(t=a(e),n=o[t],i=Z.Gradients[e.gradient],!n&&i&&(n=at({id:s()},i,e),o[t]=n)),n},setDefaults:function(e){var t=this.options;return e=e||{},_(e.inline)||(e.inline=t.inline),_(e.align)||(e.align=t.align),e}}),Z.Gradients={glass:{type:It,rotation:0,stops:[{offset:0,color:Ut,opacity:0},{offset:.25,color:Ut,opacity:.3},{offset:1,color:Ut,opacity:0}]},sharpBevel:{type:Rt,stops:[{offset:0,color:Ut,opacity:.55},{offset:.65,color:Ut,opacity:0},{offset:.95,color:Ut,opacity:.25}]},roundedBevel:{type:Rt,stops:[{offset:.33,color:Ut,opacity:.06},{offset:.83,color:Ut,opacity:.2},{offset:.95,color:Ut,opacity:0}]},roundedGlass:{type:Rt,supportVML:!1,stops:[{offset:0,color:Ut,opacity:0},{offset:.5,color:Ut,opacity:.3},{offset:.99,color:Ut,opacity:0}]},sharpGlass:{type:Rt,supportVML:!1,stops:[{offset:0,color:Ut,opacity:.2},{offset:.15,color:Ut,opacity:.15},{offset:.17,color:Ut,opacity:.35},{offset:.85,color:Ut,opacity:.05},{offset:.87,color:Ut,opacity:.15},{offset:.99,color:Ut,opacity:0}]}},B=et.extend({init:function(e,t){var n=this;n.options=at({},n.options,t),n.element=e},options:{duration:Ft,easing:Mt},play:function(){var t,n,i,r,o,a=this,s=a.options,l=a.element,d=l.options.id,c=s.delay||0,u=+new Date+c,p=s.duration,f=u+p,h=e.easing[s.easing];setTimeout(function(){var e=function(){a._stopped||(n=+new Date,i=ot.min(n-u,p),r=i/p,o=h(r,i,0,1,p),a.step(o),(!t||k(t))&&(t=x(d)),l.refresh(t),f>n?Z.requestFrame(e):a.destroy())};e()},c)},abort:function(){this._stopped=!0},destroy:function(){this.abort()},setup:it,step:it}),L=B.extend({options:{duration:200,easing:It},setup:function(){var e=this,t=e.element.options;e.targetFillOpacity=t.fillOpacity,e.targetStrokeOpacity=t.strokeOpacity,t.fillOpacity=t.strokeOpacity=0},step:function(e){var t=this,n=t.element.options;n.fillOpacity=e*t.targetFillOpacity,n.strokeOpacity=e*t.targetStrokeOpacity}}),V=B.extend({options:{size:0,easing:It},setup:function(){var e=this.element.points;e[1].x=e[2].x=e[0].x},step:function(e){var t=this.options,n=v(0,t.size,e),i=this.element.points;i[1].x=i[2].x=i[0].x+n},destroy:function(){B.fn.destroy.call(this),this.element.destroy()}}),U=B.extend({options:{easing:It,duration:900},setup:function(){var e,t,n=this,i=n.element,r=i.options,o=n.options,a=o.center;r.rotation&&(e=o.startAngle,t=r.rotation[0],o.duration=ot.max(1e3*(ot.abs(e-t)/o.speed),1),n.endState=t,r.rotation=[e,a.x,a.y])},step:function(e){var t=this,n=t.element;n.options.rotation&&(n.options.rotation[0]=v(t.options.startAngle,t.endState,e))}}),W=B.extend({options:{easing:Mt},setup:function(){var e,t=this,n=t.element,i=n.points,r=n.options,o=r.vertical?jt:Wt,a=r.stackBase,s=r.aboveAxis,l=t.endState={top:i[0].y,right:i[1].x,bottom:i[3].y,left:i[0].x};e=o===jt?_(a)?a:l[s?ft:Nt]:_(a)?a:l[s?Dt:Ot],t.startPosition=e,y(i,o,e)},step:function(e){var t=this,n=t.startPosition,i=t.endState,r=t.element,o=r.points;r.options.vertical?(o[0].y=o[1].y=v(n,i.top,e),o[2].y=o[3].y=v(n,i.bottom,e)):(o[0].x=o[3].x=v(n,i.left,e),o[1].x=o[2].x=v(n,i.right,e))}}),j=B.extend({options:{easing:Mt,duration:1e3},setup:function(){var e,t,n,i=this,r=i.element,o=r.points,a=r.options.animation,s=a.vertical,l=a.reverse,d=i.axis=s?"y":"x",c=i.options.endPosition,u=i.initialState={top:o[0].y,right:o[1].x,bottom:o[3].y,left:o[0].x},p=!_(i.options.endPosition);s?(n=l?"y2":"y1",e=u[p&&!l?ft:Nt],t=p?u[l?ft:Nt]:c[n]):(n=l?"x1":"x2",e=u[p&&!l?Dt:Ot],t=p?u[l?Dt:Ot]:c[n]),i.start=e,i.end=t,p?y(o,d,i.start):a.speed&&(i.options.duration=ot.max(1e3*(ot.abs(i.start-i.end)/a.speed),1))},step:function(e){var t=this,n=t.start,i=t.end,r=t.element,o=r.points,a=t.axis;r.options.animation.vertical?o[0][a]=o[1][a]=v(n,i,e):o[1][a]=o[2][a]=v(n,i,e)}}),q=B.extend({options:{easing:Mt,duration:1e3},setup:function(){var e,t,n,i=this,r=i.element,o=r.points,a=r.options.animation,s=a.vertical,l=a.reverse,d=s?"y":"x",c=d+(l?"1":"2"),u=d+(l?"2":"1"),p=a.startPosition[s?c:u],f=a.size/2,h=o.length,g=!_(i.options.endPosition),m=f;for(i.axis=d,i.endPositions=[],i.startPositions=[],g||(p=o[1][d],t=i.options.endPosition[s?u:c],a.speed&&(i.options.duration=ot.max(1e3*(ot.abs(p-t)/a.speed),1))),n=0;h>n;n++)e=at({},o[n]),g?(i.endPositions[n]=e[d],o[n][d]=p-m):i.endPositions[n]=t-m,i.startPositions[n]=o[n][d],m-=f},step:function(e){var t,n=this,i=n.startPositions,r=n.endPositions,o=n.element,a=o.points,s=n.axis,l=a.length;for(t=0;l>t;t++)a[t][s]=v(i[t],r[t],e)}}),G=i(xt,L),$=function(e){var t,n,i,r,o,a=this,s=$.formats;if(1===arguments.length)for(e=a.resolveColor(e),r=0;s.length>r;r++)t=s[r].re,n=s[r].process,i=t.exec(e),i&&(o=n(i),a.r=o[0],a.g=o[1],a.b=o[2]);else a.r=arguments[0],a.g=arguments[1],a.b=arguments[2];a.r=a.normalizeByte(a.r),a.g=a.normalizeByte(a.g),a.b=a.normalizeByte(a.b)},$.prototype={toHex:function(){var e=this,t=e.padDigit,n=e.r.toString(16),i=e.g.toString(16),r=e.b.toString(16);return"#"+t(n)+t(i)+t(r)},resolveColor:function(e){return e=e||pt,"#"==e.charAt(0)&&(e=e.substr(1,6)),e=e.replace(/ /g,""),e=e.toLowerCase(),e=$.namedColors[e]||e},normalizeByte:function(e){return 0>e||isNaN(e)?0:e>255?255:e},padDigit:function(e){return 1===e.length?"0"+e:e},brightness:function(e){var t=this,n=ot.round;return t.r=n(t.normalizeByte(t.r*e)),t.g=n(t.normalizeByte(t.g*e)),t.b=n(t.normalizeByte(t.b*e)),t},percBrightness:function(){var e=this;return ot.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)}},$.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)]}}],$.namedColors={aqua:"00ffff",azure:"f0ffff",beige:"f5f5dc",black:"000000",blue:"0000ff",brown:"a52a2a",coral:"ff7f50",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgray:"a9a9a9",darkgreen:"006400",darkorange:"ff8c00",darkred:"8b0000",dimgray:"696969",fuchsia:"ff00ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lightblue:"add8e6",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumblue:"0000cd",navy:"000080",olive:"808000",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",pink:"ffc0cb",plum:"dda0dd",purple:"800080",red:"ff0000",royalblue:"4169e1",salmon:"fa8072",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",steelblue:"4682b4",tan:"d2b48c",teal:"008080",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},Y=et.extend({init:function(e,t,n){this._pool=[],this._freed={},this._size=e,this._id=n,this._prefix=t
},alloc:function(){var e,t=this,n=t._pool;return n.length>0?(e=n.pop(),t._freed[e]=!1):e=t._prefix+t._id++,e},free:function(e){var t=this,n=t._pool,i=t._freed;n.length=n._size?(i[n._head.key]=null,n._head=n._head.newer,n._head.older=null):n._length++},get:function(e){var n=this,i=n._map[e];return i?(i===n._head&&i!==n._tail&&(n._head=i.newer,n._head.older=null),i!==n._tail&&(i.older&&(i.older.newer=i.newer,i.newer.older=i.older),i.older=n._tail,i.newer=null,n._tail.newer=i,n._tail=i),i.value):t}}),r.cache=new Q(1e3),r.baselineMarker=e("
")[0],K=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,dt)},Z.requestFrame=function(e,t){return K(e,t)},at(J.dataviz,{init:function(e){J.init(e,J.dataviz.ui)},ui:{roles:{},themes:{},views:[],defaultView:function(){var e,t=Z.ui.views,n=t.length;for(e=0;n>e;e++)if(t[e].available())return t[e];J.logToConsole("Warning: KendoUI DataViz cannot render. Possible causes:\n- The browser does not support SVG or VML. User agent: "+navigator.userAgent+"\n"+"- The kendo.dataviz.svg.js or kendo.dataviz.vml.js scripts are not loaded")},registerView:function(e){var t=Z.ui.views[0];!t||e.preference>t.preference?Z.ui.views.unshift(e):Z.ui.views.push(e)},plugin:function(e){J.ui.plugin(e,Z.ui)}},AXIS_LABEL_CLICK:ct,COORD_PRECISION:gt,DEFAULT_PRECISION:bt,DEFAULT_WIDTH:yt,DEFAULT_HEIGHT:_t,DEFAULT_FONT:vt,INITIAL_ANIMATION_DURATION:Ft,CLIP:mt,Axis:R,AxisLabel:H,Box2D:C,BoxElement:I,ChartElement:F,Color:$,ElementAnimation:B,ExpandAnimation:V,ArrowAnimation:q,BarAnimation:W,BarIndicatorAnimatin:j,FadeAnimation:L,FadeAnimationDecorator:G,IDPool:Y,LRUCache:Q,NumericAxis:O,Point2D:Gt,Ring:T,Pin:A,RootElement:D,RotationAnimation:U,Sector:S,Text:E,TextBox:P,Title:z,ViewBase:N,ViewElement:M,animationDecorator:i,append:f,autoFormat:w,autoMajorUnit:o,boxDiff:d,defined:_,getElement:x,getSpacing:n,inArray:u,interpolateValue:v,last:p,measureText:r,rotatePoint:l,round:m,ceil:h,floor:g,supportsSVG:c,renderTemplate:st,uniqueId:s})}(window.kendo.jQuery),function(){var e=window.kendo,t=e.dataviz.ui,n=e.deepExtend,i=1.5,r=.4,o="#000",a="Arial,Helvetica,sans-serif",s="11px "+a,l="12px "+a,d="16px "+a,c="#fff",u={title:{font:d},legend:{labels:{font:l}},seriesDefaults:{visible:!0,labels:{font:s},donut:{margin:1},line:{width:4},area:{line:{opacity:1,width:0}},candlestick:{line:{width:1,color:o},border:{width:1,_brightness:.8},gap:1,spacing:.3,downColor:c,aggregate:{open:"max",high:"max",low:"min",close:"max"},highlight:{line:{width:2},border:{width:2,opacity:1}}},ohlc:{line:{width:1},gap:1,spacing:.3,aggregate:{open:"max",high:"max",low:"min",close:"max"},highlight:{line:{width:3,opacity:1}}},bubble:{opacity:.6,border:{width:0},labels:{background:"transparent"}},bar:{gap:i,spacing:r},column:{gap:i,spacing:r},bullet:{gap:i,spacing:r,target:{color:"#ff0000"}},verticalBullet:{gap:i,spacing:r,target:{color:"#ff0000"}}},categoryAxis:{majorGridLines:{visible:!0}},axisDefaults:{labels:{font:l},title:{font:d,margin:5},crosshair:{tooltip:{font:l}}},tooltip:{font:l},navigator:{pane:{height:90,margin:{top:10}}}},p={scale:{labels:{font:l}}},f=t.themes,h=t.registerTheme=function(e,t){var i,r={};r.chart=n({},u,t.chart),r.gauge=n({},p,t.gauge),i=r.chart.seriesDefaults,i.verticalLine=n({},i.line),i.verticalArea=n({},i.area),f[e]=r};h("black",{chart:{title:{color:c},legend:{labels:{color:c},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:c},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#3d3d3d"}},scatter:{markers:{background:"#3d3d3d"}},scatterLine:{markers:{background:"#3d3d3d"}},area:{opacity:.4,markers:{visible:!1,size:6}},candlestick:{downColor:"#555",line:{color:c},border:{_brightness:1.5,opacity:1},highlight:{border:{color:c,opacity:.2}}},ohlc:{line:{color:c}}},chartArea:{background:"#3d3d3d"},seriesColors:["#0081da","#3aafff","#99c900","#ffeb3d","#b20753","#ff4195"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:c},majorGridLines:{color:"#545454"},minorGridLines:{color:"#454545"},title:{color:c},crosshair:{color:"#8e8e8e"}}},gauge:{pointer:{color:"#0070e4"},scale:{rangePlaceholderColor:"#1d1d1d",labels:{color:c},minorTicks:{color:c},majorTicks:{color:c},line:{color:c}}}}),h("blueopal",{chart:{title:{color:"#293135"},legend:{labels:{color:"#293135"},inactiveItems:{labels:{color:"#27A5BA"},markers:{color:"#27A5BA"}}},seriesDefaults:{labels:{color:o,background:c,opacity:.5},area:{opacity:.4,markers:{visible:!1,size:6}},candlestick:{downColor:"#c4d0d5",line:{color:"#9aabb2"}}},seriesColors:["#0069a5","#0098ee","#7bd2f6","#ffb800","#ff8517","#e34a00"],axisDefaults:{line:{color:"#9aabb2"},labels:{color:"#293135"},majorGridLines:{color:"#c4d0d5"},minorGridLines:{color:"#edf1f2"},title:{color:"#293135"},crosshair:{color:"#9aabb2"}}},gauge:{pointer:{color:"#005c83"},scale:{rangePlaceholderColor:"#daecf4",labels:{color:"#293135"},minorTicks:{color:"#293135"},majorTicks:{color:"#293135"},line:{color:"#293135"}}}}),h("highcontrast",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#66465B"},markers:{color:"#66465B"}}},seriesDefaults:{labels:{color:"#ffffff"},pie:{overlay:{gradient:"sharpGlass"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#2c232b"}},scatter:{markers:{background:"#2c232b"}},scatterLine:{markers:{background:"#2c232b"}},area:{opacity:.5,markers:{visible:!1,size:6}},candlestick:{downColor:"#664e62",line:{color:"#ffffff"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#ffffff",opacity:1}}},ohlc:{line:{color:"#ffffff"}}},chartArea:{background:"#2c232b"},seriesColors:["#a7008f","#ffb800","#3aafff","#99c900","#b20753","#ff4195"],axisDefaults:{line:{color:"#ffffff"},labels:{color:"#ffffff"},majorGridLines:{color:"#664e62"},minorGridLines:{color:"#4f394b"},title:{color:"#ffffff"},crosshair:{color:"#ffffff"}}},gauge:{pointer:{color:"#a7008f"},scale:{rangePlaceholderColor:"#2c232b",labels:{color:"#ffffff"},minorTicks:{color:"#2c232b"},majorTicks:{color:"#664e62"},line:{color:"#ffffff"}}}}),h("default",{chart:{title:{color:"#8e8e8e"},legend:{labels:{color:"#232323"},inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}},seriesDefaults:{labels:{color:o,background:c,opacity:.5},area:{opacity:.4,markers:{visible:!1,size:6}},candlestick:{downColor:"#dedede",line:{color:"#8d8d8d"}}},seriesColors:["#ff6800","#a0a700","#ff8d00","#678900","#ffb53c","#396000"],axisDefaults:{line:{color:"#8e8e8e"},labels:{color:"#232323"},minorGridLines:{color:"#f0f0f0"},majorGridLines:{color:"#dfdfdf"},title:{color:"#232323"},crosshair:{color:"#8e8e8e"}}},gauge:{pointer:{color:"#ea7001"},scale:{rangePlaceholderColor:"#dedede",labels:{color:"#2e2e2e"},minorTicks:{color:"#2e2e2e"},majorTicks:{color:"#2e2e2e"},line:{color:"#2e2e2e"}}}}),h("silver",{chart:{title:{color:"#4e5968"},legend:{labels:{color:"#4e5968"},inactiveItems:{labels:{color:"#B1BCC8"},markers:{color:"#B1BCC8"}}},seriesDefaults:{labels:{color:"#293135",background:"#eaeaec",opacity:.5},line:{markers:{background:"#eaeaec"}},scatter:{markers:{background:"#eaeaec"}},scatterLine:{markers:{background:"#eaeaec"}},pie:{connectors:{color:"#A6B1C0"}},donut:{connectors:{color:"#A6B1C0"}},area:{opacity:.4,markers:{visible:!1,size:6}},candlestick:{downColor:"#a6afbe"}},chartArea:{background:"#eaeaec"},seriesColors:["#007bc3","#76b800","#ffae00","#ef4c00","#a419b7","#430B62"],axisDefaults:{line:{color:"#a6b1c0"},labels:{color:"#4e5968"},majorGridLines:{color:"#dcdcdf"},minorGridLines:{color:"#eeeeef"},title:{color:"#4e5968"},crosshair:{color:"#a6b1c0"}}},gauge:{pointer:{color:"#0879c0"},scale:{rangePlaceholderColor:"#f3f3f4",labels:{color:"#515967"},minorTicks:{color:"#515967"},majorTicks:{color:"#515967"},line:{color:"#515967"}}}}),h("metro",{chart:{title:{color:"#777777"},legend:{labels:{color:"#777777"},inactiveItems:{labels:{color:"#CBCBCB"},markers:{color:"#CBCBCB"}}},seriesDefaults:{labels:{color:o},area:{opacity:.4,markers:{visible:!1,size:6}},candlestick:{downColor:"#c7c7c7",line:{color:"#787878"}},overlay:{gradient:"none"},border:{_brightness:1}},seriesColors:["#8ebc00","#309b46","#25a0da","#ff6900","#e61e26","#d8e404","#16aba9","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#c7c7c7"},labels:{color:"#777777"},minorGridLines:{color:"#c7c7c7"},majorGridLines:{color:"#c7c7c7"},title:{color:"#777777"},crosshair:{color:"#c7c7c7"}}},gauge:{pointer:{color:"#8ebc00"},scale:{rangePlaceholderColor:"#e6e6e6",labels:{color:"#777"},minorTicks:{color:"#777"},majorTicks:{color:"#777"},line:{color:"#777"}}}}),h("metroblack",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#797979"},markers:{color:"#797979"}}},seriesDefaults:{border:{_brightness:1},labels:{color:"#ffffff"},line:{markers:{background:"#0e0e0e"}},bubble:{opacity:.6},scatter:{markers:{background:"#0e0e0e"}},scatterLine:{markers:{background:"#0e0e0e"}},area:{opacity:.4,markers:{visible:!1,size:6}},candlestick:{downColor:"#828282",line:{color:"#ffffff"}},overlay:{gradient:"none"}},chartArea:{background:"#0e0e0e"},seriesColors:["#00aba9","#309b46","#8ebc00","#ff6900","#e61e26","#d8e404","#25a0da","#7e51a1","#313131","#ed1691"],axisDefaults:{line:{color:"#cecece"},labels:{color:"#ffffff"},minorGridLines:{color:"#2d2d2d"},majorGridLines:{color:"#333333"},title:{color:"#ffffff"},crosshair:{color:"#cecece"}}},gauge:{pointer:{color:"#00aba9"},scale:{rangePlaceholderColor:"#2d2d2d",labels:{color:"#ffffff"},minorTicks:{color:"#333333"},majorTicks:{color:"#cecece"},line:{color:"#cecece"}}}}),h("moonlight",{chart:{title:{color:"#ffffff"},legend:{labels:{color:"#ffffff"},inactiveItems:{labels:{color:"#A1A7AB"},markers:{color:"#A1A7AB"}}},seriesDefaults:{labels:{color:"#ffffff"},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#212a33"}},bubble:{opacity:.6},scatter:{markers:{background:"#212a33"}},scatterLine:{markers:{background:"#212a33"}},area:{opacity:.3,markers:{visible:!1,size:6}},candlestick:{downColor:"#757d87",line:{color:"#ea9d06"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:c,opacity:.2}}},ohlc:{line:{color:"#ea9d06"}}},chartArea:{background:"#212a33"},seriesColors:["#ffca08","#ff710f","#ed2e24","#ff9f03","#e13c02","#a00201"],axisDefaults:{line:{color:"#8c909e"},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},labels:{color:"#ffffff"},majorGridLines:{color:"#3e424d"},minorGridLines:{color:"#2f3640"},title:{color:"#ffffff"},crosshair:{color:"#8c909e"}}},gauge:{pointer:{color:"#f4af03"},scale:{rangePlaceholderColor:"#2f3640",labels:{color:c},minorTicks:{color:"#8c909e"},majorTicks:{color:"#8c909e"},line:{color:"#8c909e"}}}}),h("uniform",{chart:{title:{color:"#686868"},legend:{labels:{color:"#686868"},inactiveItems:{labels:{color:"#B6B6B6"},markers:{color:"#B6B6B6"}}},seriesDefaults:{labels:{color:"#686868"},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"}},area:{opacity:.3,markers:{visible:!1,size:6}},candlestick:{downColor:"#cccccc",line:{color:"#cccccc"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#cccccc",opacity:.2}}},ohlc:{line:{color:"#cccccc"}}},chartArea:{background:"#ffffff"},seriesColors:["#527aa3","#6f91b3","#8ca7c2","#a8bdd1","#c5d3e0","#e2e9f0"],axisDefaults:{line:{color:"#9e9e9e"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},labels:{color:"#686868"},majorGridLines:{color:"#dadada"},minorGridLines:{color:"#e7e7e7"},title:{color:"#686868"},crosshair:{color:"#9e9e9e"}}},gauge:{pointer:{color:"#527aa3"},scale:{rangePlaceholderColor:"#e7e7e7",labels:{color:"#686868"},minorTicks:{color:"#aaaaaa"},majorTicks:{color:"#888888"},line:{color:"#9e9e9e"}}}}),h("bootstrap",{chart:{title:{color:"#343434"},legend:{labels:{color:"#343434"},inactiveItems:{labels:{color:"#9A9A9A"},markers:{color:"#9A9A9A"}}},seriesDefaults:{labels:{color:"#343434"},pie:{overlay:{gradient:"sharpBevel"}},donut:{overlay:{gradient:"sharpGlass"}},line:{markers:{background:"#ffffff"}},bubble:{opacity:.6},scatter:{markers:{background:"#ffffff"}},scatterLine:{markers:{background:"#ffffff"}},area:{opacity:.3,markers:{visible:!1,size:6}},candlestick:{downColor:"#d0d0d0",line:{color:"#d0d0d0"},border:{_brightness:1.5,opacity:1},highlight:{border:{color:"#b8b8b8",opacity:.2}}},ohlc:{line:{color:"#d0d0d0"}}},chartArea:{background:"#ffffff"},seriesColors:["#006dcc","#49AFCD","#5BB75B","#FAA732","#DA4F49","#363636"],axisDefaults:{line:{color:"#b8b8b8"},minorTicks:{color:"#dddddd"},majorTicks:{color:"#b8b8b8"},labels:{color:"#343434"},majorGridLines:{color:"#b8b8b8"},minorGridLines:{color:"#dddddd"},title:{color:"#343434"},crosshair:{color:"#b8b8b8"}}},gauge:{pointer:{color:"#0044cc"},scale:{rangePlaceholderColor:"#b8b8b8",labels:{color:"#343434"},minorTicks:{color:"#dddddd"},majorTicks:{color:"#b8b8b8"},line:{color:"#b8b8b8"}}}})}(window.kendo.jQuery),function(e,t){function n(e,t,n){function i(e,t,i){var r,o=typeof t;return r=o===Gi?It[t](e):"function"===o?t(e,i,n):It.max(e)}function r(e,t,n){var r,o,a,s=T(n.type),l=s.length,d=e.length,c=[],u=[];for(r=0;l>r;r++){for(a=s[r],o=0;d>o;o++)u.push(e[o][a]);c.push(i(u,t[a],n)),u=[]}return c}var o,a=t.aggregate;return o="object"==typeof a?r(e,a,t):i(e,a,t)}function i(e){return o(e).min}function r(e){return o(e).max}function o(e){var n,i,r=vi,o=_i,a=e.length;for(n=0;a>n;n++)i=e[n],null!==i&&isFinite(i)&&(r=Rt.min(r,i),o=Rt.max(o,i));return{min:r===vi?t:r,max:o===_i?t:o}}function a(e,t,n,i){var r,o,a=(i.x-n.x)*(e.y-n.y)-(i.y-n.y)*(e.x-n.x),s=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y);return 0!==s&&(o=a/s,r=new nn(e.x+o*(t.x-e.x),e.y+o*(t.y-e.y))),r}function s(e,t){var n,i,r=e.series,o=r.length,a=e.seriesDefaults,s=jt({},e.seriesDefaults),d=t?jt({},t.seriesDefaults):{},c=jt({},d);for(l(s),l(c),n=0;o>n;n++)i=r[n].type||e.seriesDefaults.type,r[n]=jt({},c,d[i],{tooltip:e.tooltip},s,a[i],r[n])}function l(e){delete e.bar,delete e.column,delete e.line,delete e.verticalLine,delete e.pie,delete e.donut,delete e.area,delete e.verticalArea,delete e.scatter,delete e.scatterLine,delete e.bubble,delete e.candlestick,delete e.ohlc,delete e.bullet,delete e.verticalBullet}function d(e){var t,n=e.series,i=n.length,r=e.seriesColors||[];for(t=0;i>t;t++)n[t].color=n[t].color||r[t%r.length]}function c(e){var t;Pt([On,lr,hr,gr],function(){t=this+"Axes",e[t]&&(e[this+"Axis"]=e[t],delete e[t])})}function u(t,n){var i=(n||{}).axisDefaults||{};Pt([On,lr,hr,gr],function(){var n=this+"Axis",r=[].concat(t[n]),o=t.axisDefaults||{};r=e.map(r,function(e){var t=(e||{}).color,r=jt({},i,i[n],o,o[n],{line:{color:t},labels:{color:t},title:{color:t}},e);return delete r[n],r}),t[n]=r.length>1?r:r[0]})}function p(e,t,n){e[t]=(e[t]||0)+n}function f(e){var t,n=e.length,i=0;for(t=0;n>t;t++)i=Rt.max(i,e[t].data.length);return i}function h(e){return e*e}function g(e,t){if(null===t)return t;var n=qt(e,!0);return n(t)}function m(e){var t,n,i;if(e instanceof Date)t=e;else if(typeof e===Gi)n=$n.exec(e),t=new Date(n?parseInt(n[1],10):e);else if(e)if(e.length)for(t=[],i=0;e.length>i;i++)t.push(m(e[i]));else t=new Date(e);return t}function v(e){return zt(e)?Ht(e,v):e?m(e).getTime():t}function _(e,t,n,i){var r=e;return e&&(e=m(e),n===mr?r=new Date(e.getFullYear()+t,0,1):n===yi?r=new Date(e.getFullYear(),e.getMonth()+t,1):n===pr?r=_(b(e,i),7*t,Yn):n===Yn?r=new Date(e.getFullYear(),e.getMonth(),e.getDate()+t):n===si?(r=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()+t),t>0&&H(e,r)&&(r=_(e,t+1,n,i))):n===bi&&(r=new Date(e.getTime()+t*$i),r.setSeconds(0))),r}function b(e,t){var n=e.getDay(),i=0;for(t=t||0;n!==t;)0===n?n=6:n--,i++;return k(e,-i*Qi)}function y(e,t,n){return e=m(e),_(e,0,t,n)}function w(e,t,n){return e=m(e),e&&y(e,t,n).getTime()===e.getTime()?e:_(e,1,t,n)}function x(e,t){var n=e.getTime()-t,i=e.getTimezoneOffset()-t.getTimezoneOffset();return n-i*$i}function k(e,t){var n=e.getTimezoneOffset(),i=new Date(e.getTime()+t),r=i.getTimezoneOffset()-n;return new Date(i.getTime()+r*$i)}function C(e,t,n){var i;return i=n===mr?t.getFullYear()-e.getFullYear():n===yi?12*C(e,t,mr)+t.getMonth()-e.getMonth():n===Yn?Rt.floor(x(t,e)/Qi):Rt.floor((t-e)/Zi[n])}function T(e){var t=[lr];return gn(e,[Rn,Di])?t=["open","high","low","close"]:gn(e,[Hn,cr])?t=["current","target"]:gn(e,kr)&&(t=[hr,gr],e===zn&&t.push("size")),t}function S(e,t,n){var i,r,o,a,s=e.data[t],l={},d=T(e.type),c={value:s};return pn(s)?zt(s)?(i=s.slice(d.length),a=A(s,d),l=A(i,n)):"object"==typeof s&&(r=D(e,d),o=D(e,n),a=F(s,d,r),l=F(s,n,o)):a=F({},d),pn(a)&&(1===d.length&&(a=a[d[0]]),c.value=a),c.fields=l,c}function A(e,t){var n,i,r={};if(t)for(i=Rt.min(t.length,e.length),n=0;i>n;n++)r[t[n]]=e[n];return r}function F(e,t,n){var i,r,o,a,s={};if(t)for(r=t.length,n=n||t,i=0;r>i;i++)o=t[i],a=n[i],s[o]=g(a,e);return s}function D(e,t){var n,i,r,o,a;if(t)for(i=t.length,o=[],n=0;i>n;n++)r=t[n],a=r===lr?"field":r+"Field",o.push(e[a]||r);return o}function I(e){return 1===e.length?e[0]:e}function E(e,t,n){return Rt.max(Rt.min(e,n),t)}function P(e){var t,n,i,r=e.length;if(r>0)for(n=0;r>n;n++)i=e[n].box,t?t.wrap(i):t=i.clone();return t||Kt()}function z(e,t){return e&&t?e.toLowerCase()===t.toLowerCase():e===t}function H(e,t){return e&&t?v(e)===v(t):e===t}function R(e){for(var t,n=e.length;n--;)if(t=e[n],pn(t)&&null!==t)return t}function O(e,t){null!==t&&e.push(t)}function M(e,t){for(var n,i,r=0,o=e.length-1;o>=r;)if(n=Rt.floor((r+o)/2),i=e[n],t>i)r=n+1;else{if(!(i>t))return n;o=n-1}return t>=e[n]?n:n-1}function N(e){var t,n,i=!0,r=e.length;for(t=0;r>t;t++)if(n=e[t],"number"!=typeof n||isNaN(n)){i=!1;break}return i}function B(e){var t,n,i,r={};for(t=0;e.length>t;t++)n=e[t],i=n.options.name,i&&(r[i]=n.range());return r}function L(e){var t=e.originalEvent,n=0;return t.wheelDelta&&(n=-t.wheelDelta/120,n=n>0?Rt.ceil(n):Rt.floor(n)),t.detail&&(n=_n(t.detail/3)),n}function V(e,n){var i,r,o,a=[],s=n.length;for(e.groupNameTemplate&&(i=Wt(e.groupNameTemplate)),r=0;s>r;r++)o=jt({},e),o.color=t,o._groupIx=r,a.push(o),i&&(o.name=i({series:o,group:n[r]}));return a}var U,W,j,q,G,$,Y,Q,K,X,J,Z,et,tt,nt,it,rt,ot,at,st,lt,dt,ct,ut,pt,ft,ht,gt,mt,vt,_t,bt,yt,wt,xt,kt,Ct,Tt,St,At,Ft,Dt,It,Et,Pt=e.each,zt=e.isArray,Ht=e.map,Rt=Math,Ot=e.extend,Mt=e.proxy,Nt=window.kendo,Bt=Nt.Class,Lt=Nt.Observable,Vt=Nt.data.DataSource,Ut=Nt.ui.Widget,Wt=Nt.template,jt=Nt.deepExtend,qt=Nt.getter,Gt=Nt.dataviz,$t=Gt.Axis,Yt=Gt.AxisLabel,Qt=Gt.BarAnimation,Kt=Gt.Box2D,Xt=Gt.BoxElement,Jt=Gt.ChartElement,Zt=Gt.Color,en=Gt.ElementAnimation,tn=Gt.NumericAxis,nn=Gt.Point2D,rn=Gt.RootElement,on=Gt.Ring,an=Gt.Text,sn=Gt.TextBox,ln=Gt.Title,dn=Gt.animationDecorator,cn=Gt.append,un=Gt.autoFormat,pn=Gt.defined,fn=Gt.getElement,hn=Gt.getSpacing,gn=Gt.inArray,mn=Gt.interpolateValue,vn=Gt.last,_n=Gt.round,bn=Gt.renderTemplate,yn=Gt.uniqueId,wn=".kendoChart",xn="above",kn="area",Cn="auto",Tn="fit",Sn=Gt.AXIS_LABEL_CLICK,An="bar",Fn=.8,Dn="below",In="#000",En="both",Pn="bottom",zn="bubble",Hn="bullet",Rn="candlestick",On="category",Mn="center",Nn="change",Bn="circle",Ln="click"+wn,Vn=Gt.CLIP,Un="column",Wn=Gt.COORD_PRECISION,jn="k-",qn="dataBound",Gn="date",$n=/^\/Date\((.*?)\)\/$/,Yn="days",Qn=Gt.DEFAULT_FONT,Kn=Gt.DEFAULT_HEIGHT,Xn=Gt.DEFAULT_PRECISION,Jn=Gt.DEFAULT_WIDTH,Zn=Rt.PI/180,ei="donut",ti=50,ni="drag",ii="dragEnd",ri="dragStart",oi="fadeIn",ai="glass",si="hours",li=Gt.INITIAL_ANIMATION_DURATION,di="insideBase",ci="insideEnd",ui="interpolate",pi="left",fi="legendItemClick",hi="legendItemHover",gi="line",mi=8,vi=Number.MAX_VALUE,_i=-Number.MAX_VALUE,bi="minutes",yi="months",wi="mouseleave"+wn,xi="mousemove.tracking",ki="mouseover"+wn,Ci="mouseout"+wn,Ti="mousemove"+wn,Si=20,Ai=150,Fi="DOMMouseScroll"+wn+" mousewheel"+wn,Di="ohlc",Ii="outsideEnd",Ei="_outline",Pi="pie",zi=70,Hi="plotAreaClick",Ri="pointer",Oi="right",Mi="roundedBevel",Ni="roundedGlass",Bi="scatter",Li="scatterLine",Vi="selectStart",Ui="select",Wi="selectEnd",ji="seriesClick",qi="seriesHover",Gi="string",$i=6e4,Yi=60*$i,Qi=24*Yi,Ki=7*Qi,Xi=31*Qi,Ji=365*Qi,Zi={years:Ji,months:Xi,weeks:Ki,days:Qi,hours:Yi,minutes:$i},er="top",tr=150,nr=5,ir=100,rr=100,or="tooltip-inverse",ar="touchstart"+wn,sr="triangle",lr="value",dr="verticalArea",cr="verticalBullet",ur="verticalLine",pr="weeks",fr="#fff",hr="x",gr="y",mr="years",vr="zero",_r=3,br="zoomStart",yr="zoom",wr="zoomEnd",xr=[An,Un,gi,ur,kn,dr,Rn,Di,Hn,cr],kr=[Bi,Li,zn],Cr=[bi,si,Yn,pr,yi,mr],Tr={minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},Sr=Ut.extend({init:function(e,t){var n,i,r,o,a=this,s=Gt.ui.themes||{};Nt.destroy(e),Ut.fn.init.call(a,e),n=jt({},a.options,t),a.element.addClass(jn+n.name.toLowerCase()).css("position","relative"),a._originalOptions=jt({},n),o=n.theme,r=s[o]||s[o.toLowerCase()],i=o&&r?r.chart:{},c(n),a._applyDefaults(n,i),a.options=jt({},i,n),d(a.options),a.bind(a.events,a.options),a.wrapper=a.element,a._initDataSource(t),Nt.notify(a,Gt.ui)},_initDataSource:function(e){var t=this,n=(e||{}).dataSource;t._dataChangeHandler=Mt(t._onDataChanged,t),t.dataSource=Vt.create(n).bind(Nn,t._dataChangeHandler),t._redraw(),t._attachEvents(),n&&t.options.autoBind&&t.dataSource.fetch()},setDataSource:function(e){var t=this;t.dataSource.unbind(Nn,t._dataChangeHandler),t.dataSource=e,e.bind(Nn,t._dataChangeHandler),t.options.autoBind&&e.fetch()},events:[qn,ji,qi,Sn,fi,hi,Hi,ri,ni,ii,br,yr,wr,Vi,Ui,Wi],items:function(){return e()},options:{name:"Chart",theme:"default",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},autoBind:!0,seriesDefaults:{type:Un,data:[],highlight:{visible:!0},groupNameTemplate:"#= group.value + (kendo.dataviz.defined(series.name) ? ': ' + series.name : '') #",labels:{}},series:[],tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{}},refresh:function(){var e=this;e._applyDefaults(e.options),d(e.options),e._bindSeries(),e._bindCategories(),e.trigger(qn),e._redraw()},redraw:function(e){var t,n,i=this;i._applyDefaults(i.options),e?(n=i._model._plotArea,t=n.findPane(e),n.redraw(t)):i._redraw()},_redraw:function(){var e,t=this,n=t._getModel(),i=Gt.ui.defaultView();t._destroyView(),t._model=n,t._plotArea=n._plotArea,i&&(e=t._view=i.fromModel(n),t._viewElement=t._renderView(e),t._tooltip=t._createTooltip(),t._highlight=new Ct(e,t._viewElement),t._setupSelection())},_sharedTooltip:function(){var e=this,t=e.options;return e._plotArea instanceof ht&&t.tooltip.shared},_createTooltip:function(){var e,t=this,n=t.options,i=t.element;return e=t._sharedTooltip()?new At(i,t._plotArea,n.tooltip):new St(i,n.tooltip)},_renderView:function(){var e=this;return e._view.renderTo(e.element[0])},svg:function(){var e=this._getModel(),t=Gt.SVGView.fromModel(e);return t.render()},_applyDefaults:function(e,t){u(e,t),s(e,t)},_getModel:function(){var e,t=this,n=t.options,i=new rn(t._modelOptions());return i.parent=t,ln.buildTitle(n.title,i),e=i._plotArea=t._createPlotArea(),n.legend.visible&&i.append(new Dr(e.options.legend)),i.append(e),i.reflow(),i},_modelOptions:function(){var e=this,t=e.options,n=e.element,i=Rt.floor(n.height()),r=Rt.floor(n.width());return jt({width:r||Jn,height:i||Kn,transitions:t.transitions},t.chartArea)},_createPlotArea:function(){var e,t,n,i=this,r=i.options,o=r.series,a=o.length,s=[],l=[],d=[],c=[],u=[];for(e=0;a>e;e++)t=o[e],gn(t.type,xr)?s.push(t):gn(t.type,kr)?l.push(t):t.type===Pi?d.push(t):t.type===ei?c.push(t):t.type===Hn&&u.push(t);return n=d.length>0?new vt(d,r):c.length>0?new _t(c,r):l.length>0?new mt(l,r):new ht(s,r)},_setupSelection:function(){var e,t,n,i,r,o,a=this,s=a._plotArea,l=s.axes,d=a._selections=[];for(a._selectStartHandler||(a._selectStartHandler=Mt(a._selectStart,a),a._selectHandler=Mt(a._select,a),a._selectEndHandler=Mt(a._selectEnd,a)),t=0;l.length>t;t++)n=l[t],o=n.options,n instanceof Ir&&o.select&&!o.vertical&&(i=0,r=o.categories.length-1,n instanceof Pr&&(i=o.categories[i],r=o.categories[r]),o.justified||(n instanceof Pr?r=_(r,1,o.baseUnit,o.weekStartDay):r++),e=new Et(a,n,jt({min:i,max:r},o.select)),e.bind(Vi,a._selectStartHandler),e.bind(Ui,a._selectHandler),e.bind(Wi,a._selectEndHandler),d.push(e))},_selectStart:function(e){return this.trigger(Vi,e)},_select:function(e){return this.trigger(Ui,e)},_selectEnd:function(e){return this.trigger(Wi,e)},_attachEvents:function(){var e=this,t=e.element;t.on(Ln,Mt(e._click,e)),t.on(ki,Mt(e._mouseover,e)),t.on(Ci,Mt(e._mouseout,e)),t.on(Fi,Mt(e._mousewheel,e)),t.on(ar,Mt(e._tap,e)),t.on(wi,Mt(e._mouseleave,e)),(e._plotArea.crosshairs.length||e._tooltip&&e._sharedTooltip())&&t.on(Ti,Mt(e._mousemove,e)),Nt.UserEvents&&(e._userEvents=new Nt.UserEvents(t,{global:!0,threshold:5,filter:":not(.k-selector)",multiTouch:!1,start:Mt(e._start,e),move:Mt(e._move,e),end:Mt(e._end,e)}))},_mouseout:function(e){var t=this,n=t._model.modelMap[e.target.getAttribute("data-model-id")];n&&n.leave&&n.leave(t,e)},_start:function(e){var t=this,n=t._events;pn(n[ri]||n[ni]||n[ii])&&t._startNavigation(e,ri)},_move:function(e){var t,n,i,r,o,a,s=this,l=s._navState,d={};if(l){for(e.preventDefault(),t=l.axes,n=0;t.length>n;n++)i=t[n],r=i.options.name,r&&(o=i.options.vertical?e.y:e.x,a=o.startLocation-o.location,0!==a&&(d[i.options.name]=i.translateRange(a)));l.axisRanges=d,s.trigger(ni,{axisRanges:d,originalEvent:e})}},_end:function(e){this._endNavigation(e,ii)},_mousewheel:function(e){var t,n,i,r,o,a,s=this,l=e.originalEvent,d=L(e),c=s._navState,u={};if(c||(t=s._startNavigation(l,br),t||(c=s._navState)),c){for(n=c.totalDelta||d,c.totalDelta=n+d,i=s._navState.axes,r=0;i.length>r;r++)o=i[r],a=o.options.name,a&&(u[a]=o.scaleRange(n));s.trigger(yr,{delta:d,axisRanges:u,originalEvent:e}),s._mwTimeout&&clearTimeout(s._mwTimeout),s._mwTimeout=setTimeout(function(){s._endNavigation(e,wr)},Ai)}},_startNavigation:function(e,t){var n,i,r,o=this,a=o._eventCoordinates(e),s=o._model._plotArea,l=s.findPointPane(a),d=s.axes.slice(0),c=!1;if(l){for(n=0;d.length>n;n++)if(i=d[n],i.box.containsPoint(a)){c=!0;break}!c&&s.backgroundBox().containsPoint(a)&&(r=o.trigger(t,{axisRanges:B(d),originalEvent:e}),r?o._userEvents.cancel():(o._suppressHover=!0,o._unsetActivePoint(),o._navState={pane:l,axes:d}))}},_endNavigation:function(e,t){var n=this;n._navState&&(n.trigger(t,{axisRanges:n._navState.axisRanges,originalEvent:e}),n._suppressHover=!1,n._navState=null)},_getChartElement:function(t){var n,i=this,r=e(t.target).data("modelId"),o=i._model;return r&&(n=o.modelMap[r]),n&&n.aliasFor&&(n=n.aliasFor(t,i._eventCoordinates(t))),n},_eventCoordinates:function(e){var t=this,n=pn((e.x||{}).client),i=n?e.x.client:e.clientX,r=n?e.y.client:e.clientY;return t._toModelCoordinates(i,r)},_toModelCoordinates:function(t,n){var i=this.element,r=i.offset(),o=parseInt(i.css("paddingLeft"),10),a=parseInt(i.css("paddingTop"),10),s=e(window);return new nn(t-r.left-o+s.scrollLeft(),n-r.top-a+s.scrollTop())},_click:function(e){for(var t=this,n=t._getChartElement(e);n;)n.click&&n.click(t,e),n=n.parent},_startHover:function(e){var n,i=this,r=i._tooltip,o=i._highlight,a=i.options.tooltip;if(!i._suppressHover&&o&&!gn(e.target,o._overlays)&&!i._sharedTooltip())return n=i._getChartElement(e),n&&n.hover&&(n.hover(i,e),!e.isDefaultPrevented())?(i._activePoint=n,a=jt({},a,n.options.tooltip),a.visible&&r.show(n),o.show(n),!0):t},_mouseover:function(t){var n=this;n._startHover(t)&&e(document).on(xi,Mt(n._mouseMoveTracking,n))},_mouseMoveTracking:function(t){var n,i,r,o=this,a=o.options,s=o._tooltip,l=o._highlight,d=o._eventCoordinates(t),c=o._activePoint;o._plotArea.box.containsPoint(d)?c&&c.series&&(c.series.type===gi||c.series.type===kn)&&(i=c.parent,r=i.getNearestPoint(d.x,d.y,c.seriesIx),r&&r!=c&&(r.hover(o,t),o._activePoint=r,n=jt({},a.tooltip,c.options.tooltip),n.visible&&s.show(r),l.show(r))):(e(document).off(xi),o._unsetActivePoint())},_mousemove:function(e){var t,n=this,i=new Date,r=n._mousemove.timestamp;(!r||i-r>Si)&&(t=n._eventCoordinates(e),n._trackCrosshairs(t),n._sharedTooltip()&&n._trackSharedTooltip(t),n._mousemove.timestamp=i)},_trackCrosshairs:function(e){var t,n,i=this._plotArea.crosshairs;for(t=0;i.length>t;t++)n=i[t],n.box.containsPoint(e)?n.showAt(e):n.hide()},_trackSharedTooltip:function(e){var t,n,i=this,r=i.options,o=i._plotArea,a=o.categoryAxis,s=i._tooltip,l=r.tooltip,d=i._highlight;t=a.getCategoryIndex(e),t!==i._tooltipCategoryIx&&(n=o.pointsByCategoryIndex(t),n.length>0?(l.visible&&s.showAt(n,e),d.show(n)):s.hide(),i._tooltipCategoryIx=t)},_mouseleave:function(){var e,t=this,n=t._plotArea,i=n.crosshairs,r=t._tooltip,o=t._highlight;for(e=0;i.length>e;e++)i[e].hide();setTimeout(Mt(r.hide,r),rr),o.hide(),t._tooltipCategoryIx=null},_unsetActivePoint:function(){var e=this,t=e._tooltip,n=e._highlight;e._activePoint=null,t&&t.hide(),n&&n.hide()},_onDataChanged:function(){var e,t,n=this,i=n.options,r=n._sourceSeries||i.series,o=r.length,a=n.dataSource.view(),s=(n.dataSource.group()||[]).length>0,l=[];for(e=0;o>e;e++)t=r[e],n._isBindable(t)&&s?cn(l,V(t,a)):l.push(t||[]);n._sourceSeries=r,i.series=l,d(n.options),n._bindSeries(),n._bindCategories(),n.trigger(qn),n._redraw()},_bindSeries:function(){var e,t,n,i,r=this,o=r.dataSource.view(),a=r.options.series,s=a.length;for(e=0;s>e;e++)t=a[e],r._isBindable(t)&&(n=t._groupIx,i=pn(n)?(o[n]||{}).items:o,t.autoBind!==!1&&(t.data=i))},_bindCategories:function(){var e,t,n=this,i=n.dataSource.view(),r=(n.dataSource.group()||[]).length>0,o=(r?i[0].items:i)||[],a=n.options,s=[].concat(a.categoryAxis);for(e=0;s.length>e;e++)t=s[e],t.autoBind!==!1&&n._bindCategoryAxis(t,o)},_bindCategoryAxis:function(e,t){var n,i,r;if(e.field)for(e.categories=[],n=0;t.length>n;n++)r=t[n],i=g(e.field,r),0===n?(e.categories=[i],e.dataItems=[r]):(e.categories.push(i),e.dataItems.push(r))},_isBindable:function(e){var t,n,i=T(e.type),r=!0;for(n=0;i.length>n;n++)if(t=i[n],t===lr?t="field":t+="Field",!e[t]){r=!1;break}return r},_tap:function(e){var t=this;t._startHover(e)||t._unsetActivePoint(),t._click(e)},_legendItemClick:function(e,t){var n,i,r=this,o=r._plotArea,a=(o.srcSeries||o.series)[e];gn(a.type,[Pi,ei])?(n=a.data[t],n.visible=pn(n.visible)?!n.visible:!1):a.visible=!a.visible,r.options.transitions&&(r.options.transitions=!1,i=!0),r.redraw(),i&&(r.options.transitions=!0)},_legendItemHover:function(e,t){var n,i=this,r=i._plotArea,o=i._highlight,a=(r.srcSeries||r.series)[e];n=gn(a.type,[Pi,ei])?r.charts[0].segments[t]:r.pointsBySeriesIndex(e),o.show(n)},destroy:function(){var t=this,n=t.dataSource;t.element.off(wn),n.unbind(Nn,t._dataChangeHandler),e(document).off(xi),t._userEvents&&t._userEvents.destroy(),t._destroyView(),Ut.fn.destroy.call(t)},_destroyView:function(){var t=this,n=Gt.IDPool.current,i=t._model,r=t._view,o=t._viewElement,a=t._selections;if(i&&i.destroy(),r&&r.destroy(),o&&e("[id]",o).each(function(){n.free(e(this).attr("id"))}),a)for(;a.length>0;)a.shift().destroy()}}),Ar=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.append(new sn(e,n.options))},options:{position:Ii,margin:hn(3),padding:hn(4),color:In,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:oi,delay:li},zIndex:1},reflow:function(e){var t=this,n=t.options,i=n.vertical,r=n.aboveAxis,o=t.children[0],a=o.box,s=o.options.padding;o.options.align=i?Mn:pi,o.options.vAlign=i?er:Mn,n.position==ci?i?(o.options.vAlign=er,!r&&a.height()e;e++)t=i[e],n.append(new Fr(t,jt({},n.options.labels,{color:t.labelColor})))},reflow:function(e){var n=this,i=n.options,r=n.children.length;return 0===r?(n.box=e.clone(),t):"custom"==i.position?(n.customLayout(e),t):(i.position==er||i.position==Pn?n.horizontalLayout(e):n.verticalLayout(e),t)},getViewElements:function(e){var t,n,i,r,o,a,s,l=this,d=l.children,c=l.options,u=c.items,p=u.length,f=l.markerSize(),h=e.createGroup({zIndex:c.zIndex}),g=c.border||{};for(cn(h.children,Jt.fn.getViewElements.call(l,e)),s=0;p>s;s++)r=u[s].markerColor,o=d[s],n=Kt(),a=o.box,i=i?i.wrap(a):a.clone(),n.x1=a.x1-2*f,n.x2=n.x1+f,n.y1=c.position==er||c.position==Pn?a.y1+f/2:a.y1+(a.height()-f)/2,n.y2=n.y1+f,h.children.push(e.createRect(n,{fill:r,stroke:r,strokeWidth:c.markers.border.width,data:{modelId:o.options.modelId},cursor:{style:Ri}}));return d.length>0&&(t=hn(c.padding),t.left+=2*f,i.pad(t),h.children.unshift(e.createRect(i,{stroke:g.width?g.color:"",strokeWidth:g.width,dashType:g.dashType,fill:c.background}))),[h]},verticalLayout:function(e){var t,n,i,r,o,a=this,s=a.options,l=a.children,d=l.length,c=l[0].box.clone(),u=hn(s.margin),p=2*a.markerSize();for(r=1;d>r;r++)i=a.children[r],i.box.alignTo(a.children[r-1].box,Pn),c.wrap(i.box);s.position==pi?(t=e.x1+p+u.left,n=(e.y2-c.height())/2,c.x2+=p+u.left+u.right):(t=e.x2-c.width()-u.right,n=(e.y2-c.height())/2,c.translate(t,n),c.x1-=p+u.left),a.translateChildren(t+s.offsetX,n+s.offsetY),o=c.width(),c.x1=Rt.max(e.x1,c.x1),c.x2=c.x1+o,c.y1=e.y1,c.y2=e.y2,a.box=c},horizontalLayout:function(e){var t,n,i,r,o=this,a=o.options,s=o.children,l=s.length,d=s[0].box.clone(),c=3*o.markerSize(),u=hn(a.margin),p=s[0].box.width()+c,f=e.width(),h=0;for(r=1;l>r;r++)i=s[r],p+=i.box.width()+c,p>f-c?(i.box=Kt(d.x1,d.y2,d.x1+i.box.width(),d.y2+i.box.height()),p=i.box.width()+c,h=i.box.y1):(i.box.alignTo(s[r-1].box,Oi),i.box.y2=h+i.box.height(),i.box.y1=h,i.box.translate(c,0)),d.wrap(i.box);t=(e.width()-d.width()+c)/2,a.position===er?(n=e.y1+u.top,d.y2=e.y1+d.height()+u.top+u.bottom,d.y1=e.y1):(n=e.y2-d.height()-u.bottom,d.y1=e.y2-d.height()-u.top-u.bottom,d.y2=e.y2),o.translateChildren(t+a.offsetX,n+a.offsetY),d.x1=e.x1,d.x2=e.x2,o.box=d},customLayout:function(e){var t,n=this,i=n.options,r=n.children,o=r.length,a=r[0].box.clone(),s=2*n.markerSize();for(t=1;o>t;t++)a=n.children[t].box,a.alignTo(n.children[t-1].box,Pn),a.wrap(a);n.translateChildren(i.offsetX+s,i.offsetY),n.box=e},markerSize:function(){var e=this,t=e.children;return t.length>0?t[0].box.height()/2:0}}),Ir=$t.extend({init:function(e){var t=this;$t.fn.init.call(t,e),e=t.options,e.categories=e.categories.slice(0),t._ticks={}},options:{type:On,categories:[],vertical:!1,majorGridLines:{visible:!1,width:1,color:In},zIndex:1,justified:!1},range:function(){return{min:0,max:this.options.categories.length}},getTickPositions:function(e){var t,n=this,i=n.options,r=i.vertical,o=i.justified,a=n.lineBox(),s=r?a.height():a.width(),l=e-(o?1:0),d=s/l,c=r?gr:hr,u=a[c+1],p=[];for(t=0;e>t;t++)p.push(_n(u,Wn)),u+=d;return o||p.push(a[c+2]),i.reverse?p.reverse():p},getMajorTickPositions:function(){return this.getTicks().majorTicks},getMinorTickPositions:function(){return this.getTicks().minorTicks},getTicks:function(){var e,t=this,n=t._ticks,i=t.options,r=i.categories.length,o=i.reverse,a=i.justified,s=t.lineBox();return e=s.getHash()+r+o+a,n._hash!==e&&(n._hash=e,n.majorTicks=t.getTickPositions(r),n.minorTicks=t.getTickPositions(2*r)),n},getSlot:function(e,t){var n,i,r,o=this,a=o.options,s=o.getMajorTickPositions(),l=a.reverse,d=a.justified,c=a.vertical?gr:hr,u=o.lineBox(),p=u[c+(l?2:1)],f=u[c+(l?1:2)],h=u.clone(),g=Rt.max(1,s.length-(d?0:1));return e=pn(e)?e:0,t=pn(t)?t:e,e=E(e,0,g),t=E(t-1,e,g),t=Rt.max(e,t),n=0===e?p:s[e],i=d?n:s[t],r=t-e,(r>0||e===t)&&(i=s[t+1]||f),d&&(e===g?n=i:i=n),h[c+1]=l?i:n,h[c+2]=l?n:i,h},getCategoryIndex:function(e){var t,n,i,r,o=this,a=o.options,s=a.reverse,l=a.vertical,d=l?gr:hr,c=o.lineBox(),u=c[d+1],p=c[d+2],f=e[d],h=o.getMajorTickPositions(),g=vi;if(u>f||f>p)return null;for(i=0;h.length>i;i++)if(t=h[i],n=h[i+1],pn(n)||(n=s?u:p),s&&(t=n,n=h[i]),a.justified){if(f===n){r=Rt.max(0,l?h.length-i-1:i+1);break}g>Rt.abs(f-t)&&(g=f-t,r=i)}else if(f>=t&&n>=f){r=i;break}return r},getCategory:function(e){var t=this.getCategoryIndex(e);return null===t?null:this.options.categories[t]},translateRange:function(e){var t=this,n=t.options,i=t.lineBox(),r=n.vertical?i.height():i.width(),o=n.categories.length,a=r/o,s=_n(e/a,Xn);return{min:s,max:o+s}},scaleRange:function(e){var t=this,n=t.options,i=n.categories.length,r=e*i;return{min:-r,max:i+r}},labelsCount:function(){return this.options.categories.length},createAxisLabel:function(e,t){var n=this,i=n.options,r=i.dataItems?i.dataItems[e]:null,o=pn(i.categories[e])?i.categories[e]:"";return new Yt(o,e,r,t)}}),Er=Yt.extend({formatValue:function(e,t){return Nt.toString(e,t.format,t.culture)}}),Pr=Ir.extend({init:function(e){var t,n,i=this;e=e||{},e=jt({roundToBaseUnit:!0},e,{min:m(e.min),max:m(e.max)}),e.categories&&e.categories.length>0&&(t=(e.baseUnit||"").toLowerCase(),n=t!==Tn&&!gn(t,Cr),n&&(e.baseUnit=i.defaultBaseUnit(e)),(t===Tn||e.baseUnitStep===Cn)&&i.autoBaseUnit(e),i.groupCategories(e)),Ir.fn.init.call(i,e)},options:{type:Gn,labels:{dateFormats:Tr},autoBaseUnitSteps:{minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10},translateRange:function(e){var t=this,n=Ir.fn.translateRange.call(t,e),i=t.options,r=i.baseUnit,o=Rt.round(n.min),a=i.weekStartDay;return{min:_(i.min,o,r,a),max:_(i.max,o,r,a)}},scaleRange:function(e){for(var t,n,i=this,r=i.options,o=Rt.abs(e),a=r.min,s=r.max;o--;)t=x(a,s),n=Rt.round(.1*t),0>e?(a=k(a,n),s=k(s,-n)):(a=k(a,-n),s=k(s,n));return{min:a,max:s}},defaultBaseUnit:function(e){var t,n,i,r,o,a=e.categories,s=pn(a)?a.length:0,l=vi;for(t=0;s>t;t++)n=m(a[t]),n&&r&&(i=x(n,r),i>0&&(l=Rt.min(l,i),o=l>=Ji?mr:l>=Xi-3*Qi?yi:l>=Ki?pr:l>=Qi?Yn:l>=Yi?si:bi)),r=n;return o||Yn},range:function(e){e=e||this.options;var t=m(e.categories),n=e.baseUnit===Tn,i=n?Cr[0]:e.baseUnit,r=v(e.min),a=v(e.max),s=o(t),l=v(s.min),d=v(s.max);return e.roundToBaseUnit?{min:_(r||l,0,i,e.weekStartDay),max:_(a||d,1,i,e.weekStartDay)}:{min:m(r||l),max:m(a||d)}},autoBaseUnit:function(e){for(var t,n,i,r=this,o=r.range(e),a=e.baseUnit===Tn,s=0,l=a?Cr[s++]:e.baseUnit,d=o.max-o.min,c=d/Zi[l],u=c,p=e.maxDateGroups||r.options.maxDateGroups,f=jt({},r.options.autoBaseUnitSteps,e.autoBaseUnitSteps);!n||c>p;)if(t=t||f[l].slice(0),i=t.shift())n=i,c=u/n;else{if(l===vn(Cr)){n=Rt.ceil(u/p);break}if(!a){c>p&&(n=Rt.ceil(u/p));break}l=Cr[s++]||vn(Cr),u=d/Zi[l],t=null}e.baseUnitStep=n,e.baseUnit=l},getMajorTickPositions:function(){var e,t,n,i,r,o,a,s,l,d,c,u,p,f,h,g,m,v=this,_=v.options,b=_.categories,y=[];if(_.roundToBaseUnit||0===b.length)y=Ir.fn.getMajorTickPositions.call(v);else{for(n=_.vertical,i=_.reverse,r=v.lineBox(),o=n?r.height():r.width(),a=b[0].getTime(),s=v.range(v.options),l=s.max-s.min,d=o/l,c=b.length,u=(n?-1:1)*(i?-1:1),p=1===u?1:2,f=1===u?2:1,h=r[(n?gr:hr)+p],g=r[(n?gr:hr)+f],m=h,e=0;c>e;e++)t=b[e]-a,m=h+t*d*u,y.push(_n(m,Wn));vn(y)!==g&&y.push(g)}return y},groupCategories:function(e){var t,n,i,r,o,a,s=this,l=m(e.categories),d=e.baseUnit,c=e.baseUnitStep||1,u=s.range(e),p=e.roundToBaseUnit,f=[],h=s.categoryMap=[],g=[];for(t=p?_(u.max,c-1,d,e.weekStartDay):u.max,H(u.min,u.max)&&(t=m(v(t)+1)),n=u.min;t>n;n=i){for(i=_(n,c,d,e.weekStartDay),f.push(n),r=[],o=M(l,n);l.length>o;o++)if(a=l[o],a&&a>=n)if(i>a)e.justified&&H(a,t)?g.push(o):r.push(o);else{if(p||!H(i,t))break;g.push(o)}h.push(r)}g.length&&(f.push(t),h.push(g)),e.max||0!==(vn(h)||[]).length||(h.pop(),f.pop()),e.min=f[0],e.max=p?vn(f):t,e.categories=f},createAxisLabel:function(e,t){var n,i=this.options,r=i.dataItems?i.dataItems[e]:null,o=i.categories[e],a=i.baseUnit,s=!0,l=t.dateFormats[a];return i.justified&&(n=y(o,a,i.weekStartDay),s=H(n,o)),t=jt({format:l},t,{visible:s}),new Er(o,e,r,t)}}),zr=$t.extend({init:function(e,t,n){var i=this;n=n||{},jt(n,{min:m(n.min),max:m(n.max),axisCrossingValue:m(n.axisCrossingValues||n.axisCrossingValue)}),n=i.applyDefaults(m(e),m(t),n),$t.fn.init.call(i,n)},options:{type:Gn,labels:{dateFormats:Tr}},applyDefaults:function(e,n,i){var r=this,o=i.min||e,a=i.max||n,s=i.baseUnit||r.timeUnits(a-o),l=Zi[s],d=y(v(o)-1,s)||m(a),c=w(v(a)+1,s),u=i.majorUnit?i.majorUnit:t,p=u||Gt.ceil(Gt.autoMajorUnit(d.getTime(),c.getTime()),l)/l,f=C(d,c,s),h=Gt.ceil(f,p),g=h-f,b=Rt.floor(g/2),x=g-b;return i.baseUnit||delete i.baseUnit,jt({baseUnit:s,min:_(d,-b,s),max:_(c,x,s),minorUnit:p/5},i,{majorUnit:p})},range:function(){var e=this.options;return{min:e.min,max:e.max}},getDivisions:function(e){var t=this.options;return Rt.floor(C(t.min,t.max,t.baseUnit)/e+1)},getTickPositions:function(e){var t,n=this,i=n.options,r=i.vertical,o=i.reverse,a=n.lineBox(),s=r?a.height():a.width(),l=C(i.min,i.max,i.baseUnit),d=s/l,c=e*d,u=n.getDivisions(e),p=(r?-1:1)*(o?-1:1),f=1===p?1:2,h=a[(r?gr:hr)+f],g=[];for(t=0;u>t;t++)g.push(_n(h,Wn)),h+=c*p;return g},getMajorTickPositions:function(){var e=this;return e.getTickPositions(e.options.majorUnit)},getMinorTickPositions:function(){var e=this;return e.getTickPositions(e.options.minorUnit)},getSlot:function(e,t){return tn.fn.getSlot.call(this,m(e),m(t))},getValue:function(e){var t=tn.fn.getValue.call(this,e);return null!==t?m(t):null},labelsCount:function(){return this.getDivisions(this.options.majorUnit)},createAxisLabel:function(e,t){var n=this.options,i=e*n.majorUnit,r=_(n.min,i,n.baseUnit),o=t.dateFormats[n.baseUnit];return t.format=t.format||o,new Er(r,e,null,t)},timeUnits:function(e){var t=si;return e>=Ji?t=mr:e>=Xi?t=yi:e>=Ki?t=pr:e>=Qi&&(t=Yn),t},translateRange:function(e){var t=this,n=t.options,i=n.baseUnit,r=n.weekStartDay,o=t.lineBox(),a=n.vertical?o.height():o.width(),s=t.range(),l=a/(s.max-s.min),d=_n(e/l,Xn),c=k(n.min,d),u=k(n.max,d);return{min:_(c,0,i,r),max:_(u,0,i,r)}},scaleRange:function(e){for(var t,n,i=this,r=i.options,o=r.baseUnit,a=r.weekStartDay,s=Rt.abs(e),l=r.min,d=r.max;s--;)t=x(l,d),n=Rt.round(.1*t),0>e?(l=k(l,n),d=k(d,-n)):(l=k(l,-n),d=k(d,n)),l=_(l,0,o,a),d=_(d,1,o,a);return{min:l,max:d}}}),Hr=Jt.extend({init:function(e){var t=this;Jt.fn.init.call(t,e)},options:{vertical:!1,gap:0,spacing:0},reflow:function(e){var t,n,i=this,r=i.options,o=r.vertical,a=o?gr:hr,s=i.children,l=r.gap,d=r.spacing,c=s.length,u=c+l+d*(c-1),p=(o?e.height():e.width())/u,f=e[a+1]+p*(l/2);for(n=0;c>n;n++)t=(s[n].box||e).clone(),t[a+1]=f,t[a+2]=f+p,s[n].reflow(t),c-1>n&&(f+=p*d),f+=p}}),Rr=Jt.extend({init:function(e){var t=this;Jt.fn.init.call(t,e)},options:{vertical:!0,isReversed:!1},reflow:function(e){var t,n,i,r,o=this,a=o.options,s=a.vertical,l=s?hr:gr,d=s?gr:hr,c=e[d+2],u=o.children,p=o.box=new Kt,f=u.length;for(t=a.isReversed?s?Pn:pi:s?er:Oi,n=0;f>n;n++)i=u[n],r=i.box.clone(),r.snapTo(e,l),i.options&&(i.options.stackBase=c),0===n?p=o.box=r.clone():r.alignTo(u[n-1].box,t),i.reflow(r),p.wrap(r)}}),Or={click:function(t,n){var i=this;t.trigger(ji,{value:i.value,category:i.category,series:i.series,dataItem:i.dataItem,element:e(n.target)})},hover:function(t,n){var i=this;t.trigger(qi,{value:i.value,category:i.category,series:i.series,dataItem:i.dataItem,element:e(n.target)})}},Mr=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.value=e,0>e&&t.negativeColor&&(n.options.color=t.negativeColor),n.options.id=yn(),n.enableDiscovery()},options:{color:fr,border:{width:1},vertical:!0,overlay:{gradient:ai},aboveAxis:!0,labels:{visible:!1},animation:{type:An},opacity:1},render:function(){var e,t=this,n=t.value,i=t.options,r=i.labels,o=n;t._rendered||(t._rendered=!0,r.visible&&n&&(r.template?(e=Wt(r.template),o=e({dataItem:t.dataItem,category:t.category,value:t.value,series:t.series})):r.format&&(o=un(r.format,o)),t.append(new Ar(o,jt({vertical:i.vertical,id:yn()},i.labels)))))},reflow:function(e){this.render();var t=this,n=t.options,i=t.children,r=i[0];t.box=e,r&&(r.options.aboveAxis=n.aboveAxis,r.reflow(e))},getViewElements:function(e){var t=this,n=t.options,i=n.vertical,r=n.border.width>0?{stroke:t.getBorderColor(),strokeWidth:n.border.width,strokeOpacity:n.border.opacity,dashType:n.border.dashType}:{},o=t.box,a=jt({id:n.id,fill:n.color,fillOpacity:n.opacity,strokeOpacity:n.opacity,vertical:n.vertical,aboveAxis:n.aboveAxis,stackBase:n.stackBase,animation:n.animation,data:{modelId:n.modelId}},r),s=[];return o.width()>0&&o.height()>0&&(n.overlay&&(a.overlay=jt({rotation:i?0:90},n.overlay)),s.push(e.createRect(o,a))),cn(s,Jt.fn.getViewElements.call(t,e)),s},highlightOverlay:function(e,t){var n=this,i=n.box;return t=jt({data:{modelId:n.options.modelId}},t),t.id=null,e.createRect(i,t)},getBorderColor:function(){var e=this,t=e.options,n=t.color,i=t.border,r=i.color,o=i._brightness||Fn;return pn(r)||(r=new Zt(n).brightness(o).toHex()),r},tooltipAnchor:function(e,t){var n,i,r=this,o=r.options,a=r.box,s=o.vertical,l=o.aboveAxis;return s?(n=a.x2+nr,i=l?a.y1:a.y2-t):o.isStacked?(n=l?a.x2-e:a.x1,i=a.y1-t-nr):(n=l?a.x2+nr:a.x1-e-nr,i=a.y1),new nn(n,i)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}});jt(Mr.fn,Or),U=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.plotArea=e,n.categoryAxis=e.seriesCategoryAxis(t.series[0]),n.valueAxisRanges={},n.points=[],n.categoryPoints=[],n.seriesPoints=[],n.render()},options:{series:[],invertAxes:!1,isStacked:!1},render:function(){var e=this;e.traverseDataPoints(Mt(e.addValue,e))},addValue:function(e,t,n,i,r){var o,a=this,s=e.value,l=a.categoryPoints[n],d=a.seriesPoints[r];l||(a.categoryPoints[n]=l=[]),d||(a.seriesPoints[r]=d=[]),a.updateRange(s,n,i),o=a.createPoint(e,t,n,i,r),o&&(o.category=t,o.series=i,o.seriesIx=r,o.owner=a,o.dataItem=i.data[n]),a.points.push(o),d.push(o),l.push(o)},updateRange:function(e,t,n){var i=this,r=n.axis,o=i.valueAxisRanges[r];pn(e)&&!isNaN(e)&&(o=i.valueAxisRanges[r]=o||{min:vi,max:_i},o.min=Rt.min(o.min,e),o.max=Rt.max(o.max,e))},seriesValueAxis:function(e){var t=this.plotArea,n=e.axis,i=n?t.namedValueAxes[n]:t.valueAxis;if(!i)throw Error("Unable to locate value axis with name "+n);return i},reflow:function(e){var t,n,i,r,o=this,a=o.options,s=a.invertAxes,l=0,d=o.categorySlots=[],c=o.points,u=o.categoryAxis;o.traverseDataPoints(function(e,a,p,f){if(f.visible!==!1){t=o.pointValue(e),n=o.seriesValueAxis(f),i=o.categoryAxisCrossingValue(n),r=c[l++],r&&r.plotValue&&(t=r.plotValue);var h=o.categorySlot(u,p,n),g=o.valueSlot(n,t,i),m=s?g:h,v=s?h:g,_=new Kt(m.x1,v.y1,m.x2,v.y2),b=n.options.reverse?i>t:t>=i;r&&(r.options.aboveAxis=b,r.reflow(_)),d[p]||(d[p]=h)}}),o.reflowCategories(d),o.box=e},categoryAxisCrossingValue:function(e){var t=this.categoryAxis,n=e.options,i=[].concat(n.axisCrossingValues||n.axisCrossingValue);return i[t.axisIndex||0]||0},reflowCategories:function(){},valueSlot:function(e,t,n){return e.getSlot(t,n)},categorySlot:function(e,t){return e.getSlot(t)},traverseDataPoints:function(e){var t,n,i,r,o,a=this,s=a.options,l=s.series,d=a.categoryAxis.options.categories||[],c=f(l),u=a.bindableFields(),p=l.length;for(t=0;c>t;t++)for(n=0;p>n;n++)o=l[n],r=d[t],i=S(o,t,u),e(i,r,t,o,n)},bindableFields:function(){return[]},formatPointValue:function(e,t){return un(t,e.value)},pointValue:function(e){return e.value}}),W=U.extend({init:function(e,t){var n=this;n._groupTotals={},n._groups=[],U.fn.init.call(n,e,t)},render:function(){var e=this;U.fn.render.apply(e),e.computeAxisRanges()},createPoint:function(e,n,i,r){var o,a,s,l,d,c=this,u=e.value,p=c.options,f=c.children,h=c.options.isStacked,g=jt({},r.labels);return h&&g.position==Ii&&(g.position=ci),o=new Mr(u,jt({},{vertical:!p.invertAxes,overlay:r.overlay,labels:g,isStacked:h},r,{color:e.fields.color||t})),a=f[i],a||(a=new Hr({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing}),c.append(a)),h?(d=c.getStackWrap(r,a),0===d.children.length?(s=new Rr({vertical:!p.invertAxes}),l=new Rr({vertical:!p.invertAxes,isReversed:!0}),d.append(s,l)):(s=d.children[0],l=d.children[1]),u>0?s.append(o):l.append(o)):a.append(o),o},getStackWrap:function(e,t){var n,i,r=t.children,o=e.stack,a=r.length;if(typeof o===Gi){for(i=0;a>i;i++)if(r[i]._stackGroup===o){n=r[i];break}}else n=r[0];return n||(n=new Jt,n._stackGroup=o,t.append(n)),n},updateRange:function(e,t,n){var i,r=this,o=r.options.isStacked;pn(e)&&(o?(i=r.groupTotals(n.stack),p(e>0?i.positive:i.negative,t,e)):U.fn.updateRange.apply(r,arguments))},computeAxisRanges:function(){var e,t,n=this,o=n.options.isStacked;o&&(e=n.options.series[0].axis,t=n.categoryTotals(),n.valueAxisRanges[e]={min:i(t.negative.concat(0)),max:r(t.positive.concat(0))})},seriesValueAxis:function(e){var t=this,n=t.options;return U.fn.seriesValueAxis.call(t,n.isStacked?t.options.series[0]:e)},valueSlot:function(e,t,n){return e.getSlot(t,this.options.isStacked?0:n)},categorySlot:function(e,t,n){var i,r,o=this,a=o.options,s=e.getSlot(t);return a.isStacked&&(r=n.getSlot(0,0),i=a.invertAxes?hr:gr,s[i+1]=s[i+2]=r[i+1]),s},reflow:function(e){var t=this;t.setStacksDirection(),U.fn.reflow.call(t,e)},setStacksDirection:function(){var e,t,n,i,r,o,a,s,l,d=this,c=d.options,u=c.series,p=f(u),h=d.children,g=u.length;for(t=0;g>t;t++)for(n=u[t],i=d.seriesValueAxis(n),e=0;p>e;e++)r=h[e],o=d.getStackWrap(n,r),a=o.children,s=a[0],l=a[1],s&&l&&(s.options.isReversed=i.options.reverse,l.options.isReversed=!i.options.reverse)},reflowCategories:function(e){var t,n=this,i=n.children,r=i.length;for(t=0;r>t;t++)i[t].reflow(e[t])},groupTotals:function(e){var t,n,i=this;return t=typeof e===Gi?e:i._groups[0]||"default",n=i._groupTotals[t],n||(n=i._groupTotals[t]={positive:[],negative:[]},i._groups.push(t)),n},categoryTotals:function(){var e,t,n,i=this,r=i._groups,o=i._groupTotals,a={positive:[],negative:[]},s=r.length;for(n=0;s>n;n++)e=r[n],t=o[e],cn(a.positive,t.positive),cn(a.negative,t.negative);return a},bindableFields:function(){return["color"]}}),j=U.extend({init:function(e,t){var n=this;n.wrapData(t),U.fn.init.call(n,e,t)},wrapData:function(e){var t,n,i,r=e.series;for(t=0;r.length>t;t++)i=r[t],n=i.data,n&&!zt(n[0])&&"object"!=typeof n[0]&&(i.data=[n])},addValue:function(e,t,n,i,r){var o,a=this,s=a.categoryPoints[n],l=a.seriesPoints[r];s||(a.categoryPoints[n]=s=[]),l||(a.seriesPoints[r]=l=[]),a.updateRange(e.value,n,i),o=a.createPoint(e.value,n,i),o&&(o.category=t,o.series=i,o.seriesIx=r,o.owner=a,o.dataItem=i.data[n]),a.points.push(o),l.push(o),s.push(o)},reflowCategories:function(e){var t,n=this,i=n.children,r=i.length;for(t=0;r>t;t++)i[t].reflow(e[t])},createPoint:function(e,t,n){var i,r,o=this,a=o.options,s=o.children;return i=new q(e,jt({},{vertical:!a.invertAxes,overlay:n.overlay,categoryIx:t,invertAxes:a.invertAxes},n)),r=s[t],r||(r=new Hr({vertical:a.invertAxes,gap:a.gap,spacing:a.spacing}),o.append(r)),r.append(i),i},updateRange:function(e,t,n){var i=this,r=n.axis,o=e.current,a=e.target,s=i.valueAxisRanges[r];pn(o)&&!isNaN(o)&&pn(a&&!isNaN(a))&&(s=i.valueAxisRanges[r]=s||{min:vi,max:_i},s.min=Rt.min.apply(Rt,[s.min,o,a]),s.max=Rt.max.apply(Rt,[s.max,o,a]))},formatPointValue:function(e,t){return un(t,e.value.current,e.value.target)},pointValue:function(e){return e.value.current}}),q=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.value=e,n.options.id=yn(),n.enableDiscovery(),n.render()},options:{color:fr,border:{width:1},vertical:!1,animation:{type:An},opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}Target: {1}"}},render:function(){var e=this,t=e.options;e.target=new $({id:e.options.id,type:t.target.shape,background:t.target.color||t.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:er,align:Oi}),e.append(e.target)},reflow:function(e){var t=this,n=t.options,i=t.owner,r=t.target,o=n.invertAxes,a=i.seriesValueAxis(t.options),s=i.categorySlot(i.categoryAxis,n.categoryIx,a),l=i.valueSlot(a,t.value.target,t.value.target),d=o?l:s,c=o?s:l,u=new Kt(d.x1,c.y1,d.x2,c.y2);r.options.height=o?u.height():n.target.line.width,r.options.width=o?n.target.line.width:u.width(),r.reflow(u),t.box=e},getViewElements:function(e){var t=this,n=t.options,i=n.vertical,r=n.border.width>0?{stroke:n.border.color||n.color,strokeWidth:n.border.width,dashType:n.border.dashType}:{},o=t.box,a=jt({id:n.id,fill:n.color,fillOpacity:n.opacity,strokeOpacity:n.opacity,vertical:n.vertical,aboveAxis:n.aboveAxis,animation:n.animation,data:{modelId:n.modelId}},r),s=[];return o.width()>0&&o.height()>0&&(n.overlay&&(a.overlay=jt({rotation:i?0:90},n.overlay)),s.push(e.createRect(o,a))),cn(s,Jt.fn.getViewElements.call(t,e)),s},tooltipAnchor:function(e,t){var n,i,r=this,o=r.options,a=r.box,s=o.vertical,l=o.aboveAxis;return s?(n=a.x2+nr,i=l?a.y1:a.y2-t):o.isStacked?(n=l?a.x2-e:a.x1,i=a.y1-t-nr):(n=l?a.x2+nr:a.x1-e-nr,i=a.y1),new nn(n,i)},highlightOverlay:function(e,t){var n=this,i=n.box;return t=jt({data:{modelId:n.options.modelId}},t),t.id=null,e.createRect(i,t)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),jt(q.fn,Or),G=Xt.extend({options:{type:Bn,align:Mn,vAlign:Mn},getViewElements:function(e,t){var n,i,r=this,o=r.options,a=o.type,s=r.paddingBox,l=s.width()/2;return o.visible&&r.hasBox()?(i=jt(r.elementStyle(),t),n=a===sr?e.createPolyline([new nn(s.x1+l,s.y1),new nn(s.x1,s.y2),new nn(s.x2,s.y2)],!0,i):a===Bn?e.createCircle(new nn(_n(s.x1+l,Wn),_n(s.y1+s.height()/2,Wn)),l,i):e.createRect(s,i),[n]):[]}}),$=G.extend(),jt($.fn,Or),Y=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.value=e,n.options.id=yn(),n.enableDiscovery()},options:{aboveAxis:!0,vertical:!0,markers:{visible:!0,background:fr,size:mi,type:Bn,border:{width:2},opacity:1},labels:{visible:!1,position:xn,margin:hn(3),padding:hn(4),animation:{type:oi,delay:li}}},render:function(){var e,t=this,n=t.options,i=n.markers,r=n.labels,o=i.background,a=jt({},i.border),s=t.value;t._rendered||(t._rendered=!0,pn(a.color)||(a.color=new Zt(o).brightness(Fn).toHex()),t.marker=new G({id:t.options.id,visible:i.visible&&i.size,type:i.type,width:i.size,height:i.size,background:o,border:a,opacity:i.opacity,zIndex:i.zIndex,animation:i.animation}),t.append(t.marker),r.visible&&(r.template?(e=Wt(r.template),s=e({dataItem:t.dataItem,category:t.category,value:t.value,series:t.series})):r.format&&(s=t.formatValue(r.format)),t.label=new sn(s,jt({id:yn(),align:Mn,vAlign:Mn,margin:{left:5,right:5}},r)),t.append(t.label)))},markerBox:function(){return this.marker.box},reflow:function(e){var t,n=this,i=n.options,r=i.vertical,o=i.aboveAxis;n.render(),n.box=e,t=e.clone(),r?o?t.y1-=t.height():t.y2+=t.height():o?t.x1+=t.width():t.x2-=t.width(),n.marker.reflow(t),n.reflowLabel(t)},reflowLabel:function(e){var t=this,n=t.options,i=t.marker,r=t.label,o=n.labels.position;r&&(o=o===xn?er:o,o=o===Dn?Pn:o,r.reflow(e),r.box.alignTo(i.box,o),r.reflow(r.box))},highlightOverlay:function(e,t){var n=this,i=n.marker;return t=jt({data:{modelId:n.options.modelId}},t),i.getViewElements(e,jt(t,{id:null,fill:i.options.border.color,fillOpacity:1,strokeOpacity:0}))[0]},tooltipAnchor:function(e,t){var n=this,i=n.marker.box,r=n.options.aboveAxis;return new nn(i.x2+nr,r?i.y1-t:i.y2)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),jt(Y.fn,Or),Q=Y.extend({init:function(e,t){var n=this;Y.fn.init.call(n,e,t),n.category=e.category},options:{labels:{position:Mn},highlight:{opacity:1,border:{width:1,opacity:1}}},highlightOverlay:function(e){var t=this,n=t.options,i=n.highlight,r=i.border.width,o=n.markers,a=t.box.center(),s=o.size/2-r/2,l=i.border.color||new Zt(o.background).brightness(Fn).toHex();return e.createCircle(a,s,{id:null,data:{modelId:t.options.modelId},stroke:l,strokeWidth:r,strokeOpacity:i.border.opacity})},toggleHighlight:function(e){var n,i=this,r=i.options.highlight.opacity;i.highlighted=!i.highlighted,n=i.marker.getViewElements(e,{fillOpacity:i.highlighted?r:t})[0],n.refresh(fn(this.options.id))}}),K=Jt.extend({init:function(e,t,n){var i=this;Jt.fn.init.call(i),i.linePoints=e,i.series=t,i.seriesIx=n,i.options.id=yn(),i.enableDiscovery()},options:{},points:function(e){var t,n,i=this,r=i.linePoints.concat(e||[]),o=[],a=r.length;for(t=0;a>t;t++)n=r[t].markerBox().center(),o.push(new nn(n.x,n.y));return o},getViewElements:function(e){var t=this,n=t.series;return Jt.fn.getViewElements.call(t,e),[e.createPolyline(t.points(),!1,{id:t.options.id,stroke:n.color,strokeWidth:n.width,strokeOpacity:n.opacity,fill:"",dashType:n.dashType,data:{modelId:t.options.modelId},zIndex:-1})]},aliasFor:function(e,t){var n=this,i=n.seriesIx;return n.parent.getNearestPoint(t.x,t.y,i)}}),X={renderSegments:function(){var e,t,n,i,r,o,a,s=this,l=s.options,d=l.series,c=s.seriesPoints,u=c.length,p=[];for(t=0;u>t;t++){for(e=d[t],n=c[t],a=n.length,i=[],o=0;a>o;o++)r=n[o],r?i.push(r):s.seriesMissingValues(e)!==ui&&(i.length>1&&p.push(s.createSegment(i,e,t,vn(p))),i=[]);i.length>1&&p.push(s.createSegment(i,e,t,vn(p)))}s._segments=p,s.append.apply(s,p)},seriesMissingValues:function(e){var t=e.missingValues,n=!t&&this.options.isStacked;return n?vr:t},createSegment:function(e,t,n){return new K(e,t,n)},getNearestPoint:function(e,t,n){var i,r,o,a,s,l=this,d=l.options.invertAxes,c=d?gr:hr,u=d?t:e,p=l.seriesPoints[n],f=vi,h=p.length;for(s=0;h>s;s++)i=p[s],i&&pn(i.value)&&null!==i.value&&(r=i.box,o=Rt.abs(r.center()[c]-u),f>o&&(a=i,f=o));return a}},J=U.extend({init:function(e,t){var n=this;n._stackAxisRange={min:vi,max:_i},n._categoryTotals=[],n.enableDiscovery(),U.fn.init.call(n,e,t)},render:function(){var e=this;U.fn.render.apply(e),e.computeAxisRanges(),e.renderSegments()},createPoint:function(e,t,n,i){var r,o,a=this,s=e.value,l=a.options,d=l.isStacked,c=a.categoryPoints[n],u=a.seriesMissingValues(i),p=0,f=e.fields;if(!pn(s)||null===s){if(u!==vr)return null;s=0}return o=new Y(s,jt({vertical:!l.invertAxes,markers:{border:{color:i.color}}},i,{color:f.color,markers:{border:{color:f.color}}})),d&&(r=R(c),r&&(p=r.plotValue),o.plotValue=s+p),a.append(o),o},updateRange:function(e,t){var n,i=this,r=i.options.isStacked,a=i._stackAxisRange,s=i._categoryTotals;pn(e)&&(r?(p(s,t,e),n=o(s),a.min=Rt.min(a.min,n.min),a.max=Rt.max(a.max,n.max)):U.fn.updateRange.apply(i,arguments))},computeAxisRanges:function(){var e,t=this,n=t.options.isStacked;n&&(e=t.options.series[0].axis,t.valueAxisRanges[e]=t._stackAxisRange)},getViewElements:function(e){var t=this,n=U.fn.getViewElements.call(t,e),i=e.createGroup({animation:{type:Vn}});return i.children=n,[i]},bindableFields:function(){return["color"]}}),jt(J.fn,X),Z=K.extend({init:function(e,t,n,i){var r=this;r.stackPoints=t,K.fn.init.call(r,e,n,i)},points:function(){var e,t,n=this,i=n.parent,r=i.plotArea,o=i.options.invertAxes,a=i.seriesValueAxis(n.series),s=a.lineBox(),l=r.seriesCategoryAxis(n.series),d=l.lineBox(),c=o?d.x1:d.y1,u=n.stackPoints,p=K.fn.points.call(n,u),f=o?hr:gr;return c=E(c,s[f+1],s[f+2]),!n.stackPoints&&p.length>1&&(e=p[0],t=vn(p),o?(p.unshift(nn(c,e.y)),p.push(nn(c,t.y))):(p.unshift(nn(e.x,c)),p.push(nn(t.x,c)))),p},getViewElements:function(e){var t=this,n=t.series,i=jt({color:n.color,opacity:n.opacity},n.line),r=K.fn.points.call(t),o=t.points();return Jt.fn.getViewElements.call(t,e),[e.createPolyline(o,!1,{id:t.options.id,fillOpacity:n.opacity,fill:n.color,stack:n.stack,data:{modelId:t.options.modelId},zIndex:-1}),e.createPolyline(r,!1,{stroke:i.color,strokeWidth:i.width,strokeOpacity:i.opacity,dashType:i.dashType,data:{modelId:t.options.modelId},strokeLineCap:"butt",zIndex:-1})]}}),et=J.extend({createSegment:function(e,t,n,i){var r,o=this,a=o.options;return a.isStacked&&n>0&&i&&(r=i.linePoints.slice(0).reverse()),new Z(e,r,t,n)},seriesMissingValues:function(e){return e.missingValues||vr}}),tt=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.plotArea=e,n.xAxisRanges={},n.yAxisRanges={},n.points=[],n.seriesPoints=[],n.render()},options:{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"}},render:function(){var e=this;e.traverseDataPoints(Mt(e.addValue,e))},addValue:function(e,t){var n,i=this,r=e.x,o=e.y,a=t.seriesIx,s=i.seriesPoints[a];i.updateRange(e,t.series),pn(r)&&null!==r&&pn(o)&&null!==o&&(n=i.createPoint(e,t.series,a,t),n&&Ot(n,t)),i.points.push(n),s.push(n)},updateRange:function(e,t){var n=this,i=e.x,r=e.y,o=t.xAxis,a=t.yAxis,s=n.xAxisRanges[o],l=n.yAxisRanges[a];pn(i)&&null!==i&&(s=n.xAxisRanges[o]=s||{min:vi,max:_i},typeof i===Gi&&(i=m(i)),s.min=Rt.min(s.min,i),s.max=Rt.max(s.max,i)),pn(r)&&null!==r&&(l=n.yAxisRanges[a]=l||{min:vi,max:_i},typeof r===Gi&&(r=m(r)),l.min=Rt.min(l.min,r),l.max=Rt.max(l.max,r))},createPoint:function(e,t,n,i){var r,o=this;return r=new Y(e,jt({markers:{border:{color:t.color},opacity:t.opacity},tooltip:{format:o.options.tooltip.format},labels:{format:o.options.labels.format}},t,{color:i.color,markers:{border:{color:i.color}}})),o.append(r),r},seriesAxes:function(e){var t=this.plotArea,n=e.xAxis,i=n?t.namedXAxes[n]:t.axisX,r=e.yAxis,o=r?t.namedYAxes[r]:t.axisY;if(!i)throw Error("Unable to locate X axis with name "+n);if(!o)throw Error("Unable to locate Y axis with name "+r);return{x:i,y:o}},reflow:function(e){var t,n,i=this,r=i.points,o=0;i.traverseDataPoints(function(e,a){t=r[o++],n=i.seriesAxes(a.series);var s=n.x.getSlot(e.x,e.x),l=n.y.getSlot(e.y,e.y),d=new Kt(s.x1,l.y1,s.x2,l.y2);t&&t.reflow(d)}),i.box=e},getViewElements:function(e){var t=this,n=Jt.fn.getViewElements.call(t,e),i=e.createGroup({animation:{type:Vn}});return i.children=n,[i]},traverseDataPoints:function(e){var t,n,i,r,o,a,s,l=this,d=l.options,c=d.series,u=l.seriesPoints,p=l.bindableFields();for(n=0;c.length>n;n++)for(i=c[n],r=u[n],r||(u[n]=[]),t=0;i.data.length>t;t++)o=S(i,t,p),a=o.value,s=o.fields,e(a,jt({pointIx:t,series:i,seriesIx:n,dataItem:i.data[t],owner:l},s))},bindableFields:function(){return["color"]},formatPointValue:function(e,t){var n=e.value;return un(t,n.x,n.y)}}),nt=tt.extend({render:function(){var e=this;tt.fn.render.call(e),e.renderSegments()}}),jt(nt.fn,X),it=tt.extend({options:{tooltip:{format:"{3}"},labels:{format:"{3}"}},addValue:function(e,t){var n,i=this,r=t.series,o=r.negativeValues,a=i.plotArea.options.seriesColors||[],s=!0;n=t.color||r.color||a[t.pointIx%a.length],0>e.size&&(n=o.color||n,s=o.visible),t.color=n,s&&tt.fn.addValue.call(this,e,t)},reflow:function(e){var t=this;t.updateBubblesSize(e),tt.fn.reflow.call(t,e)},createPoint:function(e,t,n,i){var r,o=this,a=t.data.length,s=i.pointIx*(li/a),l={delay:s,duration:li-s,type:zn};return r=new Q(e,jt({tooltip:{format:o.options.tooltip.format},labels:{format:o.options.labels.format,animation:l}},t,{color:i.color,markers:{type:Bn,background:i.color,border:t.border,opacity:t.opacity,animation:l}})),o.append(r),r},updateBubblesSize:function(e){var t,n,i,r,o,a,s,l,d,c,u,p,f,h,g,m,v=this,_=v.options,b=_.series,y=Rt.min(e.width(),e.height());for(t=0;b.length>t;t++)for(i=b[t],r=v.seriesPoints[t],o=v.maxSize(r),a=i.minSize||Rt.max(.02*y,10),s=i.maxSize||.2*y,l=a/2,d=s/2,c=Rt.PI*l*l,u=Rt.PI*d*d,p=u-c,f=p/o,n=0;r.length>n;n++)h=r[n],g=Rt.abs(h.value.size)*f,m=Rt.sqrt((c+g)/Rt.PI),jt(h.options,{markers:{size:2*m,zIndex:d-m},labels:{zIndex:d-m+1}})
},maxSize:function(e){var t,n,i=e.length,r=0;for(t=0;i>t;t++)n=e[t].value.size,r=Rt.max(r,Rt.abs(n));return r},bindableFields:function(){return["color","category","visibleInLegend"]},getViewElements:function(e){var t=this,n=Jt.fn.getViewElements.call(t,e),i=e.createGroup();return i.children=n,[i]},formatPointValue:function(e,t){var n=e.value;return un(t,n.x,n.y,n.size,e.category)}}),rt=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.value=e,n.options.id=yn(),n.enableDiscovery()},options:{border:{_brightness:.8},line:{width:2},overlay:{gradient:ai},tooltip:{format:"{4:d} Open: {0:C} High: {1:C} Low: {2:C} Close: {3:C}
"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}}},reflow:function(e){var t,n,i,r=this,o=r.options,a=r.owner,s=r.value,l=a.seriesValueAxis(o),d=[];n=l.getSlot(s.open,s.close),i=l.getSlot(s.low,s.high),n.x1=i.x1=e.x1,n.x2=i.x2=e.x2,r.realBody=n,t=i.center().x,d.push([new nn(t,i.y1),new nn(t,n.y1)]),d.push([new nn(t,n.y2),new nn(t,i.y2)]),r.lowHighLinePoints=d,r.box=i.clone().wrap(n)},getViewElements:function(e){var t=this,n=t.options,i=[],r=n.border.width>0?{stroke:t.getBorderColor(),strokeWidth:n.border.width,dashType:n.border.dashType,strokeOpacity:pn(n.border.opacity)?n.border.opacity:n.opacity}:{},o=jt({fill:n.color,fillOpacity:n.opacity},r),a={strokeOpacity:pn(n.line.opacity)?n.line.opacity:n.opacity,strokeWidth:n.line.width,stroke:n.line.color||n.color,dashType:n.line.dashType,strokeLineCap:"butt"},s=e.createGroup({animation:{type:Vn}});return n.overlay&&(o.overlay=jt({rotation:0},n.overlay)),i.push(e.createRect(t.realBody,o)),i.push(e.createPolyline(t.lowHighLinePoints[0],!1,a)),i.push(e.createPolyline(t.lowHighLinePoints[1],!1,a)),i.push(t.createOverlayRect(e,n)),cn(i,Jt.fn.getViewElements.call(t,e)),s.children=i,[s]},getBorderColor:function(){var e=this,t=e.options,n=t.border,i=n.color;return pn(i)||(i=new Zt(t.color).brightness(n._brightness).toHex()),i},createOverlayRect:function(e,t){return e.createRect(this.box,{data:{modelId:t.modelId},fill:"#fff",fillOpacity:0})},highlightOverlay:function(e,t){var n=this,i=n.options,r=i.highlight,o=r.border,a=n.getBorderColor(),s=r.line,l={data:{modelId:i.modelId}},d=jt({},l,t,{stroke:a,strokeOpacity:o.opacity,strokeWidth:o.width}),c=jt({},l,{stroke:s.color||a,strokeWidth:s.width,strokeOpacity:s.opacity,strokeLineCap:"butt"}),u=e.createGroup();return u.children.push(e.createRect(n.realBody,d)),u.children.push(e.createPolyline(n.lowHighLinePoints[0],!1,c)),u.children.push(e.createPolyline(n.lowHighLinePoints[1],!1,c)),u},tooltipAnchor:function(){var e=this,t=e.box;return new nn(t.x2+nr,t.y1+nr)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),jt(rt.fn,Or),ot=U.extend({options:{},bindableFields:function(){return["color","downColor"]},reflowCategories:function(e){var t,n=this,i=n.children,r=i.length;for(t=0;r>t;t++)i[t].reflow(e[t])},addValue:function(e,t,n,i,r){var o,a,s=this,l=s.options,d=e.value,c=s.children,u=e.fields.color||i.color,p=this.splitValue(d),f=N(p),h=s.categoryPoints[n];h||(s.categoryPoints[n]=h=[]),f&&(i.type==Rn&&d.open>d.close&&(u=e.fields.downColor||i.downColor),o=s.createPoint(d,jt({},i,{color:u}))),a=c[n],a||(a=new Hr({vertical:l.invertAxes,gap:l.gap,spacing:l.spacing}),s.append(a)),o&&(s.updateRange(d,n,i),a.append(o),o.categoryIx=n,o.category=t,o.series=i,o.seriesIx=r,o.owner=s,o.dataItem=i.data[n]),s.points.push(o),h.push(o)},createPoint:function(e,t){return new rt(e,t)},splitValue:function(e){return[e.low,e.open,e.close,e.high]},updateRange:function(e,t,n){var i=this,r=n.axis,o=i.valueAxisRanges[r],a=i.splitValue(e);o=i.valueAxisRanges[r]=o||{min:vi,max:_i},o=i.valueAxisRanges[r]={min:Rt.min.apply(Rt,a.concat([o.min])),max:Rt.max.apply(Rt,a.concat([o.max]))}},formatPointValue:function(e,t){var n=e.value;return un(t,n.open,n.high,n.low,n.close,e.category)}}),at=rt.extend({reflow:function(e){var t,n,i,r,o=this,a=o.options,s=o.owner,l=o.value,d=s.seriesValueAxis(a),c=[],u=[],p=[];r=d.getSlot(l.low,l.high),n=d.getSlot(l.open,l.open),i=d.getSlot(l.close,l.close),n.x1=i.x1=r.x1=e.x1,n.x2=i.x2=r.x2=e.x2,t=r.center().x,c.push(new nn(n.x1,n.y1)),c.push(new nn(t,n.y1)),u.push(new nn(t,i.y1)),u.push(new nn(i.x2,i.y1)),p.push(new nn(t,r.y1)),p.push(new nn(t,r.y2)),o.oPoints=c,o.cPoints=u,o.lhPoints=p,o.box=r.clone().wrap(n.clone().wrap(i))},getViewElements:function(e){var t=this,n=t.options,i=[],r={strokeOpacity:n.opacity,zIndex:-1,strokeWidth:n.width,stroke:n.color,dashType:n.dashType},o=e.createGroup({animation:{type:Vn}});return i.push(t.createOverlayRect(e,n)),i.push(e.createPolyline(t.oPoints,!0,r)),i.push(e.createPolyline(t.cPoints,!0,r)),i.push(e.createPolyline(t.lhPoints,!0,r)),cn(i,Jt.fn.getViewElements.call(t,e)),o.children=i,[o]},highlightOverlay:function(e){var t=this,n=t.options,i=n.highlight,r={data:{modelId:n.modelId}},o=jt(r,{strokeWidth:i.line.width,strokeOpacity:i.line.opacity,stroke:i.line.color||t.color}),a=e.createGroup();return a.children.push(e.createPolyline(t.oPoints,!0,o)),a.children.push(e.createPolyline(t.cPoints,!0,o)),a.children.push(e.createPolyline(t.lhPoints,!0,o)),a}}),st=ot.extend({createPoint:function(e,t){return new at(e,t)},bindableFields:function(){return["color"]}}),lt=Jt.extend({init:function(e,t,n){var i=this;i.value=e,i.sector=t,i.enableDiscovery(),Jt.fn.init.call(i,n)},options:{color:fr,overlay:{gradient:Mi},border:{width:.5},labels:{visible:!1,distance:35,font:Qn,margin:hn(.5),align:Bn,zIndex:1,position:Ii},animation:{type:Pi},highlight:{visible:!0,border:{width:1}},visible:!0},render:function(){var e,t=this,n=t.options,i=n.labels,r=t.value;t._rendered||t.visible===!1||(t._rendered=!0,i.template?(e=Wt(i.template),r=e({dataItem:t.dataItem,category:t.category,value:t.value,series:t.series,percentage:t.percentage})):i.format&&(r=un(i.format,r)),i.visible&&r&&(t.label=new sn(r,jt({},i,{id:yn(),align:Mn,vAlign:"",animation:{type:oi,delay:t.animationDelay}})),t.append(t.label)))},reflow:function(e){var t=this;t.render(),t.box=e,t.reflowLabel()},reflowLabel:function(){var e,t,n,i,r=this,o=r.sector.clone(),a=r.options,s=r.label,l=a.labels,d=l.distance,c=o.middle();s&&(i=s.box.height(),n=s.box.width(),l.position==Mn?(o.r=Rt.abs((o.r-i)/2)+i,e=o.point(c),s.reflow(Kt(e.x,e.y-i/2,e.x,e.y))):l.position==ci?(o.r=o.r-i/2,e=o.point(c),s.reflow(Kt(e.x,e.y-i/2,e.x,e.y))):(e=o.clone().expand(d).point(c),e.x>=o.c.x?(t=e.x+n,s.orientation=Oi):(t=e.x-n,s.orientation=pi),s.reflow(Kt(t,e.y-i,e.x,e.y))))},getViewElements:function(e){var t=this,n=t.sector,i=t.options,r=i.border||{},o=r.width>0?{stroke:r.color,strokeWidth:r.width,strokeOpacity:r.opacity,dashType:r.dashType}:{},a=[],s=i.overlay;return s&&(s=jt({},i.overlay,{r:n.r,ir:n.ir,cx:n.c.x,cy:n.c.y,bbox:n.getBBox()})),t.value&&a.push(t.createSegment(e,n,jt({id:i.id,fill:i.color,overlay:s,fillOpacity:i.opacity,strokeOpacity:i.opacity,animation:jt(i.animation,{delay:t.animationDelay}),data:{modelId:i.modelId},zIndex:i.zIndex,singleSegment:1===(t.options.data||[]).length},o))),cn(a,Jt.fn.getViewElements.call(t,e)),a},createSegment:function(e,t,n){return n.singleSegment?e.createCircle(t.c,t.r,n):e.createSector(t,n)},highlightOverlay:function(e,t){var n,i=this,r=i.options.highlight||{},o=r.border||{},a=i.options.id+Ei;return t=jt({},t,{id:a}),0!==i.value&&(n=i.createSegment(e,i.sector,jt({},t,{fill:r.color,fillOpacity:r.opacity,strokeOpacity:o.opacity,strokeWidth:o.width,stroke:o.color,id:null,data:{modelId:i.options.modelId}}))),n},tooltipAnchor:function(e,t){var n=this,i=n.sector.clone().expand(nr),r=e/2,o=t/2,a=i.middle(),s=a*Zn,l=i.point(a),d=l.x-r,c=l.y-o,u=Rt.sin(s),p=Rt.cos(s);return.9>Rt.abs(u)&&(d+=r*-p/Rt.abs(p)),.9>Rt.abs(p)&&(c+=o*-u/Rt.abs(u)),new nn(d,c)},formatValue:function(e){var t=this;return t.owner.formatPointValue(t,e)}}),jt(lt.fn,Or),dt=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.plotArea=e,n.segments=[],n.legendItems=[],n.render()},options:{startAngle:90,connectors:{width:1,color:"#939393",padding:4},inactiveItems:{markers:{},labels:{}}},render:function(){var e=this;e.traverseDataPoints(Mt(e.addValue,e))},traverseDataPoints:function(e){var t,n,i,r,o,a,s,l,d,c,u,p,f=this,h=f.options,g=f.plotArea.options.seriesColors||[],m=g.length,v=h.series,_=v.length,b=yn(),y=f.bindableFields(),w=0;for(r=0;_>r;r++){for(t=v[r],a=t.data,c=f.pointsTotal(t,y),s=360/c,u=pn(t.startAngle)?t.startAngle:h.startAngle,r!=_-1&&t.labels.position==Ii&&(t.labels.position=Mn),p=0;a.length>p;p++)n=S(t,p,y),l=n.value,i=n.fields,o=_n(l*s,Xn),d=1!=a.length&&!!i.explode,t.color=i.color||g[p%m],e(l,new on(null,0,0,u,o),{owner:f,category:i.category||"",index:w,series:t,seriesIx:r,dataItem:a[p],percentage:l/c,explode:d,visibleInLegend:i.visibleInLegend,visible:i.visible,overlay:{id:b+r},zIndex:_-r,animationDelay:f.animationDelay(p,r,_)}),n.fields.visible!==!1&&(u+=o),w++;w=0}},bindableFields:function(){return["category","color","explode","visibleInLegend","visible"]},addValue:function(e,t,n){var i,r=this;r.createLegendItem(e,n),n.visible!==!1&&(i=new lt(e,t,n.series),i.options.id=yn(),Ot(i,n),r.append(i),r.segments.push(i))},createLegendItem:function(e,t){var n,i,r,o,a=this,s=(a.options.legend||{}).labels||{},l=(a.options.legend||{}).inactiveItems||{};t&&t.visibleInLegend!==!1&&(n=t.category||"",(s||{}).template&&(i=Wt(s.template),n=i({text:n,series:t.series,dataItem:t.dataItem,percentage:t.percentage,value:e})),t.visible===!1?(r=(l.markers||{}).color,o=(l.labels||{}).color):(r=(t.series||{}).color,o=s.color),a.legendItems.push({pointIndex:t.index,text:n,series:t.series,markerColor:r,labelColor:o}))},pointsTotal:function(e,t){var n,i,r,o=e.data,a=o.length,s=0;for(i=0;a>i;i++)r=S(e,i,t),n=r.value,n&&r.fields.visible!==!1&&(s+=n);return s},reflow:function(e){var t,n,i,r,o,a,s,l,d=this,c=d.options,u=e.clone(),p=5,f=Rt.min(u.width(),u.height()),h=f/2,g=f-.85*f,m=pn(c.padding)?c.padding:g,v=Kt(u.x1,u.y1,u.x1+f,u.y1+f),_=v.center(),b=d.seriesConfigs||[],y=u.center(),w=d.segments,x=w.length,k=c.series.length,C=[],T=[];for(m=m>h-p?h-p:m,v.translate(y.x-_.x,y.y-_.y),a=h-m,l=nn(a+v.x1+m,a+v.y1+m),s=0;x>s;s++)r=w[s],o=r.sector,o.r=a,o.c=l,n=r.seriesIx,b.length&&(t=b[n],o.ir=t.ir,o.r=t.r),n==k-1&&r.explode&&(o.c=o.clone().radius(.15*o.r).point(o.middle())),r.reflow(v),i=r.label,i&&i.options.position===Ii&&n==k-1&&(i.orientation===Oi?T.push(i):C.push(i));C.length>0&&(C.sort(d.labelComparator(!0)),d.leftLabelsReflow(C)),T.length>0&&(T.sort(d.labelComparator(!1)),d.rightLabelsReflow(T)),d.box=v},leftLabelsReflow:function(e){var t=this,n=t.distanceBetweenLabels(e);t.distributeLabels(n,e)},rightLabelsReflow:function(e){var t=this,n=t.distanceBetweenLabels(e);t.distributeLabels(n,e)},distanceBetweenLabels:function(e){var t,n,i,r=this,o=r.segments,a=o[o.length-1],s=a.sector,l=e[0].box,d=e.length-1,c=s.r+a.options.labels.distance,u=[];for(n=_n(l.y1-(s.c.y-c-l.height()-l.height()/2)),u.push(n),i=0;d>i;i++)l=e[i].box,t=e[i+1].box,n=_n(t.y1-l.y2),u.push(n);return n=_n(s.c.y+c-e[d].box.y2-e[d].box.height()/2),u.push(n),u},distributeLabels:function(e,t){var n,i,r,o,a=this,s=e.length;for(o=0;s>o;o++)for(i=r=o,n=-e[o];n>0&&(i>=0||s>r);)n=a._takeDistance(e,o,--i,n),n=a._takeDistance(e,o,++r,n);a.reflowLabels(e,t)},_takeDistance:function(e,t,n,i){if(e[n]>0){var r=Rt.min(e[n],i);i-=r,e[n]-=r,e[t]+=r}return i},reflowLabels:function(e,t){var n,i,r,o,a=this,s=a.segments,l=s[s.length-1],d=l.sector,c=t.length,u=l.options.labels,p=u.distance,f=d.c.y-(d.r+p)-t[0].box.height();for(e[0]+=2,o=0;c>o;o++)n=t[o],f+=e[o],r=n.box,i=a.hAlignLabel(r.x2,d.clone().expand(p),f,f+r.height(),n.orientation==Oi),n.orientation==Oi?(u.align!==Bn&&(i=d.r+d.c.x+p),n.reflow(new Kt(i+r.width(),f,i,f))):(u.align!==Bn&&(i=d.c.x-d.r-p),n.reflow(new Kt(i-r.width(),f,i,f))),f+=r.height()},getViewElements:function(e){var t,n,i,r,o,s,l,d,c,u,p,f,h,g,m,v=this,_=v.options,b=_.connectors,y=v.segments,w=[],x=y.length,k=4;for(d=0;x>d;d++)o=y[d],n=o.sector,i=n.middle(),l=o.label,s={seriesId:o.seriesIx},l&&(r=[],l.options.position===Ii&&0!==o.value&&(f=l.box,h=n.c,g=n.point(i),m=nn(f.x1,f.center().y),g=n.clone().expand(b.padding).point(i),r.push(g),l.orientation==Oi?(u=nn(f.x1-b.padding,f.center().y),p=a(h,g,m,u),m=nn(u.x-k,u.y),p=p||m,p.x=Rt.min(p.x,m.x),v.pointInCircle(p,n.c,n.r+k)||p.xc?r.push(nn(c,g.y)):r.push(nn(g.x+2*k,g.y)):r.push(nn(c,g.y)),r.push(nn(m.x,u.y))):(p.y=u.y,r.push(p))):(u=nn(f.x2+b.padding,f.center().y),p=a(h,g,m,u),m=nn(u.x+k,u.y),p=p||m,p.x=Rt.max(p.x,m.x),v.pointInCircle(p,n.c,n.r+k)||p.x>n.c.x?(c=n.c.x-n.r-k,o.options.labels.align!==Un?c>m.x?r.push(nn(c,g.y)):r.push(nn(g.x-2*k,g.y)):r.push(nn(c,g.y)),r.push(nn(m.x,u.y))):(p.y=u.y,r.push(p))),r.push(u),t=e.createPolyline(r,!1,{id:yn(),stroke:b.color,strokeWidth:b.width,animation:{type:oi,delay:o.animationDelay},data:{modelId:o.options.modelId}}),w.push(t)));return cn(w,Jt.fn.getViewElements.call(v,e)),w},labelComparator:function(e){return e=e?-1:1,function(t,n){return t=(t.parent.sector.middle()+270)%360,n=(n.parent.sector.middle()+270)%360,(t-n)*e}},hAlignLabel:function(e,t,n,i,r){var o=t.c.x,a=t.c.y,s=t.r,l=Rt.min(Rt.abs(a-n),Rt.abs(a-i));return l>s?e:o+Rt.sqrt(s*s-l*l)*(r?1:-1)},pointInCircle:function(e,t,n){return h(t.x-e.x)+h(t.y-e.y)p-c?p-c:h,i=p-h,o=0;m>o;o++)t=g[o],0===o&&pn(t.holeSize)&&(n=t.holeSize,i-=t.holeSize),pn(t.size)?i-=t.size:v++,pn(t.margin)&&o!=m-1&&(i-=t.margin);for(pn(n)||(y=(p-h)/(m+.75),n=.75*y,i-=n),b=n,o=0;m>o;o++)t=g[o],r=pn(t.size)?t.size:i/v,b+=_,a=b+r,s.seriesConfigs.push({ir:b,r:a}),_=t.margin||0,b=a;dt.fn.reflow.call(s,e)},animationDelay:function(e,t,n){return e*ti+li*(t+1)/(n+1)}}),pt=Xt.extend({init:function(e){var t=this;Xt.fn.init.call(t,e),e=t.options,e.id=yn(),t.title=ln.buildTitle(e.title,t,pt.fn.options.title),t.content=new Jt,t.append(t.content),t.axes=[],t.charts=[]},options:{zIndex:-1,shrinkToFit:!0,title:{align:pi},visible:!0},appendAxis:function(e){var t=this;t.content.append(e),t.axes.push(e),e.pane=t},appendChart:function(e){var t=this;t.charts.push(e),t.content.append(e),e.pane=t},empty:function(){var e,t=this,n=t.parent;if(n){for(e=0;t.axes.length>e;e++)n.removeAxis(t.axes[e]);for(e=0;t.charts.length>e;e++)n.removeChart(t.charts[e])}t.axes=[],t.charts=[],t.content.destroy(),t.content.children=[]},reflow:function(e){var t=this;vn(t.children)===t.content&&t.children.pop(),Xt.fn.reflow.call(t,e),t.title&&(t.contentBox.y1+=t.title.box.height())},getViewElements:function(e){var t=this,n=U.fn.getViewElements.call(t,e),i=e.createGroup({id:t.options.id}),r=[];return i.children=n.concat(t.renderGridLines(e),t.content.getViewElements(e)),t.view=e,t.options.visible&&(r=[i]),r},renderGridLines:function(e){var t,n,i,r,o,a,s=this,l=s.axes,d=l.concat(s.parent.axes),c=[],u=[];for(n=0;l.length>n;n++)for(r=l[n],o=r.options.vertical,t=o?c:u,i=0;d.length>i;i++)0===t.length&&(a=d[i],o!==a.options.vertical&&cn(t,r.renderGridLines(e,a,r)));return c.concat(u)},refresh:function(){var e=this,t=e.view,n=fn(e.options.id);t&&n&&n.parentNode.replaceChild(t.renderElement(e.getViewElements(t)[0]),n)}}),ft=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.series=e,n.setSeriesIndexes(),n.charts=[],n.options.legend.items=[],n.axes=[],n.crosshairs=[],n.options.id=yn(),n.enableDiscovery(),n.createPanes(),n.render(),n.createCrosshairs()},options:{series:[],plotArea:{margin:{}},background:"",border:{color:In,width:0},legend:{}},setSeriesIndexes:function(){var e,t,n=this.series;for(e=0;n.length>e;e++)t=n[e],t.index=e},createPanes:function(){var e,t,n=this,i=[],r=n.options.panes||[],o=Rt.max(r.length,1);for(e=0;o>e;e++)t=new pt(r[e]),t.paneIndex=e,i.push(t),n.append(t);n.panes=i},destroy:function(){var e,t=this,n=t.charts,i=t.axes;for(e=0;n.length>e;e++)n[e].destroy();for(e=0;i.length>e;e++)i[e].destroy();Jt.fn.destroy.call(t)},createCrosshairs:function(){var e,t,n,i,r,o=this,a=o.panes;for(e=0;a.length>e;e++)for(n=a[e],t=0;n.axes.length>t;t++)i=n.axes[t],i.options.crosshair&&i.options.crosshair.visible&&(r=new Ft(i,i.options.crosshair),o.crosshairs.push(r),o.append(r))},findPane:function(e){var t,n,i=this,r=i.panes;for(t=0;r.length>t;t++)if(r[t].options.name===e){n=r[t];break}return n||r[0]},findPointPane:function(e){var t,n,i=this,r=i.panes;for(t=0;r.length>t;t++)if(r[t].box.containsPoint(e)){n=r[t];break}return n},appendAxis:function(e){var t=this,n=t.findPane(e.options.pane);n.appendAxis(e),t.axes.push(e),e.plotArea=t},removeAxis:function(e){var t,n,i=this,r=[];for(t=0;i.axes.length>t;t++)n=i.axes[t],e!==n&&r.push(n);i.axes=r},appendChart:function(e,t){var n=this;n.charts.push(e),t?t.appendChart(e):n.append(e)},removeChart:function(e){var t,n,i=this,r=[];for(t=0;i.charts.length>t;t++)n=i.charts[t],n!==e&&r.push(n);i.charts=r},addToLegend:function(e){var t,n,i,r,o,a=e.length,s=[],l=this.options.legend,d=l.labels||{},c=l.inactiveItems||{};for(t=0;a>t;t++)n=e[t],n.visibleInLegend!==!1&&(i=n.name||"",d.template&&(i=Wt(d.template)({text:i,series:n})),n.visible===!1?(r=c.labels.color,o=c.markers.color):(r=d.color,o=n.color),s.push({text:i,labelColor:r,markerColor:o,series:n,active:n.visible}));cn(l.items,s)},groupAxes:function(e){var t,n,i,r,o=[],a=[];for(i=0;e.length>i;i++)for(t=e[i].axes,r=0;t.length>r;r++)n=t[r],n.options.vertical?a.push(n):o.push(n);return{x:o,y:a,any:o.concat(a)}},groupSeriesByPane:function(){var e,t,n,i=this,r=i.series,o={};for(e=0;r.length>e;e++)n=r[e],t=i.seriesPaneName(n),o[t]?o[t].push(n):o[t]=[n];return o},filterSeriesByType:function(e,t){var n,i,r=[];for(t=[].concat(t),n=0;e.length>n;n++)i=e[n],gn(i.type,t)&&r.push(i);return r},filterVisibleSeries:function(e){var t,n,i=[];for(t=0;e.length>t;t++)n=e[t],n.visible!==!1&&i.push(n);return i},reflow:function(e){var t=this,n=t.options.plotArea,i=t.panes,r=hn(n.margin);t.box=e.clone().unpad(r),t.reflowPanes(),t.reflowAxes(i),t.reflowCharts(i)},redraw:function(e){var t,n=this;for(e=[].concat(e),t=0;e.length>t;t++)e[t].empty();for(n.render(e),n.reflowAxes(n.panes),n.reflowCharts(e),t=0;e.length>t;t++)e[t].refresh()},axisCrossingValues:function(e,t){var n,i=e.options,r=[].concat(i.axisCrossingValues||i.axisCrossingValue),o=t.length-r.length,a=r[0]||0;for(n=0;o>n;n++)r.push(a);return r},alignAxisTo:function(e,t,n,i){var r=e.getSlot(n,n),o=e.options.reverse?2:1,a=t.getSlot(i,i),s=t.options.reverse?2:1,l=e.box.translate(a[hr+s]-r[hr+o],a[gr+s]-r[gr+o]);e.pane!==t.pane&&l.translate(0,e.pane.box.y1-t.pane.box.y1),e.reflow(l)},alignAxes:function(e,t){var n,i,r,o,a=this,s=e[0],l=t[0],d=a.axisCrossingValues(s,t),c=a.axisCrossingValues(l,e),u={},p={},f={},h={};for(o=0;t.length>o;o++)r=t[o],n=r.pane,i=n.options.id,a.alignAxisTo(r,s,c[o],d[o]),r.options._overlap||(_n(r.lineBox().x1)===_n(s.lineBox().x1)&&(u[i]&&r.reflow(r.box.alignTo(u[i].box,pi).translate(-r.options.margin,0)),u[i]=r),_n(r.lineBox().x2)===_n(s.lineBox().x2)&&(r._mirrored||(r.options.labels.mirror=!r.options.labels.mirror,r._mirrored=!0),a.alignAxisTo(r,s,c[o],d[o]),p[i]&&r.reflow(r.box.alignTo(p[i].box,Oi).translate(r.options.margin,0)),p[i]=r),0!==o&&l.pane===r.pane&&r.alignTo(l));for(o=0;e.length>o;o++)r=e[o],n=r.pane,i=n.options.id,a.alignAxisTo(r,l,d[o],c[o]),r.options._overlap||(_n(r.lineBox().y1)===_n(l.lineBox().y1)&&(r._mirrored||(r.options.labels.mirror=!r.options.labels.mirror,r._mirrored=!0),a.alignAxisTo(r,l,d[o],c[o]),f[i]&&r.reflow(r.box.alignTo(f[i].box,er).translate(0,-r.options.margin)),f[i]=r),_n(r.lineBox().y2,Wn)===_n(l.lineBox().y2,Wn)&&(h[i]&&r.reflow(r.box.alignTo(h[i].box,Pn).translate(0,r.options.margin)),h[i]=r),0!==o&&r.alignTo(s))},shrinkAxisWidth:function(e){var t,n,i,r=this,o=r.groupAxes(e).any,a=P(o),s=0;for(t=0;e.length>t;t++)n=e[t],n.axes.length>0&&(s=Rt.max(s,a.width()-n.contentBox.width()));for(t=0;o.length>t;t++)i=o[t],i.options.vertical||i.reflow(i.box.shrink(s,0))},shrinkAxisHeight:function(e){var t,n,i,r,o,a;for(t=0;e.length>t;t++)for(n=e[t],i=n.axes,r=Rt.max(0,P(i).height()-n.contentBox.height()),o=0;i.length>o;o++)a=i[o],a.options.vertical&&a.reflow(a.box.shrink(0,r))},fitAxes:function(e){var t,n,i,r,o,a,s,l,d=this,c=d.groupAxes(e).any,u=0;for(s=0;e.length>s;s++)if(o=e[s],t=o.axes,n=o.contentBox,t.length>0)for(i=P(t),u=Rt.max(u,n.x1-i.x1),r=Rt.max(n.y1-i.y1,n.y2-i.y2),l=0;t.length>l;l++)a=t[l],a.reflow(a.box.translate(0,r));for(s=0;c.length>s;s++)a=c[s],a.reflow(a.box.translate(u,0))},reflowAxes:function(e){var t,n=this,i=n.groupAxes(e);for(t=0;e.length>t;t++)n.reflowPaneAxes(e[t]);i.x.length>0&&i.y.length>0&&(n.alignAxes(i.x,i.y),n.shrinkAxisWidth(e),n.alignAxes(i.x,i.y),n.shrinkAxisHeight(e),n.alignAxes(i.x,i.y),n.fitAxes(e))},reflowPaneAxes:function(e){var t,n=e.axes,i=n.length;if(i>0)for(t=0;i>t;t++)n[t].reflow(e.contentBox)},reflowCharts:function(e){var t,n,i=this,r=i.charts,o=r.length,a=i.box;for(n=0;o>n;n++)t=r[n].pane,(!t||gn(t,e))&&r[n].reflow(a)},reflowPanes:function(){var e,t,n,i,r,o=this,a=o.box,s=o.panes,l=s.length,d=a.height(),c=l,u=0,p=a.y1;for(e=0;l>e;e++)t=s[e],i=t.options.height,t.options.width=a.width(),t.options.height?(i.indexOf&&i.indexOf("%")&&(r=parseInt(i,10)/100,t.options.height=r*a.height()),t.reflow(a.clone()),d-=t.options.height):u++;for(e=0;l>e;e++)t=s[e],t.options.height||(t.options.height=d/u);for(e=0;l>e;e++)t=s[e],n=a.clone().move(a.x1,p),t.reflow(n),c--,p+=t.options.height},backgroundBox:function(){var e,t,n,i,r,o,a=this,s=a.axes,l=s.length;for(n=0;l>n;n++)for(r=s[n],i=0;l>i;i++)o=s[i],r.options.vertical!==o.options.vertical&&(e=r.lineBox().clone().wrap(o.lineBox()),t=t?t.wrap(e):e);return t||a.box},getViewElements:function(e){var t=this,n=t.backgroundBox(),i=t.options,r=i.plotArea,o=r.border||{},a=Jt.fn.getViewElements.call(t,e);return cn(a,[e.createRect(n,{fill:r.background,fillOpacity:r.opacity,zIndex:-2,strokeWidth:.1}),e.createRect(n,{id:i.id,data:{modelId:i.modelId},stroke:o.width?o.color:"",strokeWidth:o.width,fill:fr,fillOpacity:0,zIndex:-1,dashType:o.dashType})]),a},pointsByCategoryIndex:function(e){var t,n,i,r,o,a=this.charts,s=[];if(null!==e)for(t=0;a.length>t;t++)if(o=a[t],"_navigator"!==o.pane.options.name&&(i=a[t].categoryPoints[e],i&&i.length))for(n=0;i.length>n;n++)r=i[n],r&&pn(r.value)&&null!==r.value&&s.push(r);return s},pointsBySeriesIndex:function(e){var t,n,i,r,o,a=this.charts,s=[];for(i=0;a.length>i;i++)for(o=a[i],t=o.points,r=0;t.length>r;r++)n=t[r],n.options.index===e&&s.push(n);return s},paneByPoint:function(e){var t,n,i=this,r=i.panes;for(n=0;r.length>n;n++)if(t=r[n],t.box.containsPoint(e))return t}}),ht=ft.extend({init:function(e,t){var n=this;n.namedCategoryAxes={},n.namedValueAxes={},n.valueAxisRangeTracker=new gt,e.length>0&&(n.invertAxes=gn(e[0].type,[An,Hn,ur,dr])),ft.fn.init.call(n,e,t)},options:{categoryAxis:{categories:[]},valueAxis:{}},render:function(e){var t=this;e=e||t.panes,t.createCategoryAxes(e),t.aggregateDateSeries(e),t.createCharts(e),t.createValueAxes(e)},removeAxis:function(e){var t=this,n=e.options.name;ft.fn.removeAxis.call(t,e),e instanceof Ir?delete t.namedCategoryAxes[n]:(t.valueAxisRangeTracker.reset(n),delete t.namedValueAxes[n]),e===t.categoryAxis&&delete t.categoryAxis,e===t.valueAxis&&delete t.valueAxis},createCharts:function(e){var t,n,i,r,o=this,a=o.groupSeriesByPane();for(t=0;e.length>t;t++)n=e[t],i=a[n.options.name||"default"]||[],o.addToLegend(i),r=o.filterVisibleSeries(i),r&&(o.createAreaChart(o.filterSeriesByType(r,[kn,dr]),n),o.createBarChart(o.filterSeriesByType(r,[Un,An]),n),o.createLineChart(o.filterSeriesByType(r,[gi,ur]),n),o.createCandlestickChart(o.filterSeriesByType(r,Rn),n),o.createOHLCChart(o.filterSeriesByType(r,Di),n),o.createBulletChart(o.filterSeriesByType(r,[Hn,cr]),n))},aggregateDateSeries:function(e){var t,i,r,o,a,s,l,d,c,u,p,f,h,g,m,v,_,b=this,y=b.srcSeries||b.series,w=[];for(l=0;y.length>l;l++){if(d=y[l],c=jt({},d),t=b.seriesCategoryAxis(d),i=b.findPane(t.options.pane),gn(i,e)&&z(t.options.type,Gn))for(r=t.options.categories,o=t.categoryMap,u=c.data,c.data=p=[],a=0;r.length>a;a++){for(s=o[a],f=[],_=[],h=0;s.length>h;h++)g=s[h],m=S(d,g),v=m.value,pn(v)&&f.push(m.value),_.push(d.data[g]);p[a]=f.length>1?n(f,d,_):u[s[0]]}w.push(c)}b.srcSeries=y,b.series=w},appendChart:function(e,t){for(var n=this,i=e.options.series,r=n.seriesCategoryAxis(i[0]),o=r.options.categories,a=Rt.max(0,f(i)-o.length);a--;)o.push("");n.valueAxisRangeTracker.update(e.valueAxisRanges),ft.fn.appendChart.call(n,e,t)},seriesPaneName:function(t){var n=this,i=n.options,r=t.axis,o=[].concat(i.valueAxis),a=e.grep(o,function(e){return e.name===r})[0],s=i.panes||[{}],l=(s[0]||{}).name||"default",d=(a||{}).pane||l;return d},seriesCategoryAxis:function(e){var t=this,n=e.categoryAxis,i=n?t.namedCategoryAxes[n]:t.categoryAxis;if(!i)throw Error("Unable to locate category axis with name "+n);return i},createBarChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new W(n,{series:e,invertAxes:n.invertAxes,isStacked:i.stack&&e.length>1,gap:i.gap,spacing:i.spacing});n.appendChart(r,t)}},createBulletChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new j(n,{series:e,invertAxes:n.invertAxes,gap:i.gap,spacing:i.spacing});n.appendChart(r,t)}},createLineChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new J(n,{invertAxes:n.invertAxes,isStacked:i.stack&&e.length>1,series:e});n.appendChart(r,t)}},createAreaChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new et(n,{invertAxes:n.invertAxes,isStacked:i.stack&&e.length>1,series:e});n.appendChart(r,t)}},createOHLCChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new st(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing});n.appendChart(r,t)}},createCandlestickChart:function(e,t){if(0!==e.length){var n=this,i=e[0],r=new ot(n,{invertAxes:n.invertAxes,gap:i.gap,series:e,spacing:i.spacing});n.appendChart(r,t)}},axisRequiresRounding:function(e,t){var n,i,r=this,o=r.filterSeriesByType(r.series,[An,Un,Di,Rn]);for(n=0;o.length>n;n++)if(i=o[n].categoryAxis||"",i===e||!i&&0===t)return!0},createCategoryAxes:function(e){var t,n,i,r,o,a,s,l,d,c=this,u=c.invertAxes,p=[].concat(c.options.categoryAxis),f=[];for(t=0;p.length>t;t++)if(n=p[t],i=c.findPane(n.pane),gn(i,e)){if(a=n.name,r=n.categories||[],s=r[0]instanceof Date,o=n.type||"",n=jt({vertical:u,axisCrossingValue:u?vi:0},n),pn(n.justified)||(n.justified=c.inJustified()),c.axisRequiresRounding(a,t)&&(n.justified=!1,n.roundToBaseUnit=!0),l=!o&&s||z(o,Gn)?new Pr(n):new Ir(n),a){if(c.namedCategoryAxes[a])throw Error("Category axis with name "+a+" is already defined");c.namedCategoryAxes[a]=l}l.axisIndex=t,f.push(l),c.appendAxis(l)}d=c.categoryAxis||f[0],c.categoryAxis=d,u?c.axisY=d:c.axisX=d},inJustified:function(){var e,t,n=this,i=n.series;for(e=0;i.length>e;e++)if(t=i[e],t.type!==kn)return!1;return!0},createValueAxes:function(e){var t,n,i,r,o,a,s,l=this,d=l.valueAxisRangeTracker,c=d.query(),u=[].concat(l.options.valueAxis),p=l.invertAxes,f={vertical:!p},h=[];for(s=0;u.length>s;s++)if(t=u[s],n=l.findPane(t.pane),gn(n,e)){if(a=t.name,o=d.query(a)||c||{min:0,max:1},0===s&&o&&c&&(o.min=Rt.min(o.min,c.min),o.max=Rt.max(o.max,c.max)),i=new tn(o.min,o.max,jt({},f,t)),a){if(l.namedValueAxes[a])throw Error("Value axis with name "+a+" is already defined");l.namedValueAxes[a]=i}i.axisIndex=s,h.push(i),l.appendAxis(i)}r=l.valueAxis||h[0],l.valueAxis=r,p?l.axisX=r:l.axisY=r},click:function(t,n){var i,r,o,a=this,s=t._eventCoordinates(n),l=new nn(s.x,s.y),d=a.pointPane(l),c=[],u=[];if(d){for(i=d.axes,r=0;i.length>r;r++)o=i[r],o.getValue?O(u,o.getValue(l)):O(c,o.getCategory(l));0===c.length&&O(c,a.categoryAxis.getCategory(l)),c.length>0&&u.length>0&&t.trigger(Hi,{element:e(n.target),category:I(c),value:I(u)})}},pointPane:function(e){var t,n,i=this,r=i.panes;for(n=0;r.length>n;n++)if(t=r[n],t.contentBox.containsPoint(e))return t}}),gt=Bt.extend({init:function(){var e=this;e.axisRanges={}},update:function(e){var t,n,i,r=this,o=r.axisRanges;for(i in e)t=o[i],n=e[i],o[i]=t=t||{min:vi,max:_i},t.min=Rt.min(t.min,n.min),t.max=Rt.max(t.max,n.max)},reset:function(e){this.axisRanges[e]=t},query:function(e){return this.axisRanges[e]}}),mt=ft.extend({init:function(e,t){var n=this;n.namedXAxes={},n.namedYAxes={},n.xAxisRangeTracker=new gt,n.yAxisRangeTracker=new gt,ft.fn.init.call(n,e,t)},options:{xAxis:{},yAxis:{}},render:function(e){var t,n,i,r,o=this,a=o.groupSeriesByPane();for(e=e||o.panes,t=0;e.length>t;t++)n=e[t],i=a[n.options.name||"default"]||[],o.addToLegend(i),r=o.filterVisibleSeries(i),r&&(o.createScatterChart(o.filterSeriesByType(r,Bi),n),o.createScatterLineChart(o.filterSeriesByType(r,Li),n),o.createBubbleChart(o.filterSeriesByType(r,zn),n));o.createAxes(e)},appendChart:function(e,t){var n=this;n.xAxisRangeTracker.update(e.xAxisRanges),n.yAxisRangeTracker.update(e.yAxisRanges),ft.fn.appendChart.call(n,e,t)},removeAxis:function(e){var t=this,n=e.options.name;ft.fn.removeAxis.call(t,e),e.options.vertical?(t.yAxisRangeTracker.reset(n),delete t.namedYAxes[n]):(t.xAxisRangeTracker.reset(n),delete t.namedXAxes[n]),e===t.axisX&&delete t.axisX,e===t.axisY&&delete t.axisY},seriesPaneName:function(t){var n=this,i=n.options,r=t.xAxis,o=[].concat(i.xAxis),a=e.grep(o,function(e){return e.name===r})[0],s=t.yAxis,l=[].concat(i.yAxis),d=e.grep(l,function(e){return e.name===s})[0],c=i.panes||[{}],u=c[0].name||"default",p=(a||{}).pane||(d||{}).pane||u;return p},createScatterChart:function(e,t){var n=this;e.length>0&&n.appendChart(new tt(n,{series:e}),t)},createScatterLineChart:function(e,t){var n=this;e.length>0&&n.appendChart(new nt(n,{series:e}),t)},createBubbleChart:function(e,t){var n=this;e.length>0&&n.appendChart(new it(n,{series:e}),t)},createXYAxis:function(e,t,n){var i,r,o,a,s,l,d,c=this,u=e.name,p=t?c.namedYAxes:c.namedXAxes,f=t?c.yAxisRangeTracker:c.xAxisRangeTracker,h=f.query(),g=f.query(u)||h||{min:0,max:1},m=jt({},e,{vertical:t}),v=c.series,_=[m.min,m.max];for(r=0;v.length>r;r++)if(o=v[r],a=o[t?"yAxis":"xAxis"],a==m.name||0===n&&!a){s=S(o,0).value,_.push(s[t?"y":"x"]);break}for(0===n&&h&&(g.min=Rt.min(g.min,h.min),g.max=Rt.max(g.max,h.max)),d=0;_.length>d;d++)if(_[d]instanceof Date){l=!0;break}if(i=z(m.type,Gn)||!m.type&&l?new zr(g.min,g.max,m):new tn(g.min,g.max,m),u){if(p[u])throw Error((t?"Y":"X")+" axis with name "+u+" is already defined");p[u]=i}return c.appendAxis(i),i},createAxes:function(e){var t,n=this,i=n.options,r=[].concat(i.xAxis),o=[],a=[].concat(i.yAxis),s=[];Pt(r,function(i){t=n.findPane(this.pane),gn(t,e)&&o.push(n.createXYAxis(this,!1,i))}),Pt(a,function(i){t=n.findPane(this.pane),gn(t,e)&&s.push(n.createXYAxis(this,!0,i))}),n.axisX=n.axisX||o[0],n.axisY=n.axisY||s[0]},click:function(t,n){var i,r,o,a,s=this,l=t._eventCoordinates(n),d=new nn(l.x,l.y),c=s.axes,u=c.length,p=[],f=[];for(i=0;u>i;i++)r=c[i],a=r.options.vertical?f:p,o=r.getValue(d),null!==o&&a.push(o);p.length>0&&f.length>0&&t.trigger(Hi,{element:e(n.target),x:I(p),y:I(f)})}}),vt=ft.extend({render:function(){var e=this,t=e.series;e.createPieChart(t)},createPieChart:function(e){var t=this,n=e[0],i=new dt(t,{series:e,padding:n.padding,startAngle:n.startAngle,connectors:n.connectors,legend:t.options.legend});
t.appendChart(i)},appendChart:function(e,t){ft.fn.appendChart.call(this,e,t),cn(this.options.legend.items,e.legendItems)}}),_t=vt.extend({render:function(){var e=this,t=e.series;e.createDonutChart(t)},createDonutChart:function(e){var t=this,n=e[0],i=new ut(t,{series:e,padding:n.padding,connectors:n.connectors,legend:t.options.legend});t.appendChart(i)}}),bt=en.extend({options:{easing:"easeOutElastic",duration:li},setup:function(){var e,t=this.element,n=t.config;t.options.singleSegment&&(n=t),this.endRadius=n.r,e=this.startRadius=n.ir||0,n.r=e},step:function(e){var t=this,n=t.element,i=t.endRadius,r=n.config,o=t.startRadius;n.options.singleSegment&&(r=n),r.r=mn(o,i,e)}}),yt=en.extend({options:{easing:"easeOutElastic",duration:li},setup:function(){var e=this.element;e.endRadius=e.radius,e.radius=0},step:function(e){var t=this.element,n=t.endRadius;t.radius=mn(0,n,e)}}),wt=dn(An,Qt),xt=dn(Pi,bt),kt=dn(zn,yt),Ct=Bt.extend({init:function(e,t,n){var i=this;i.options=jt({},i.options,n),i.view=e,i.viewElement=t,i._overlays=[]},options:{fill:fr,fillOpacity:.2,stroke:fr,strokeWidth:1,strokeOpacity:.2},show:function(e){var t,n,i,r,o,a=this,s=a.view,l=a.viewElement,d=a._overlays;for(a.hide(),a._points=e=[].concat(e),i=0;e.length>i;i++)r=e[i],r&&(o=r.options,(!o||(o.highlight||{}).visible)&&(r.highlightOverlay&&(t=r.highlightOverlay(s,a.options),t&&(n=s.renderElement(t),l.appendChild(n),d.push(n))),r.toggleHighlight&&r.toggleHighlight(s)))},hide:function(){for(var e,t,n,i,r=this,o=r._points,a=r._overlays;a.length;)e=r._overlays.pop(),e.parentNode.removeChild(e);if(o)for(t=0;o.length>t;t++)n=o[t],n&&(i=n.options,(!i||(i.highlight||{}).visible)&&n.toggleHighlight&&n.toggleHighlight(r.view));r._points=[]}}),Tt=Bt.extend({init:function(t,n){var i=this;i.options=jt({},i.options,n),i.chartElement=t,i.chartPadding={top:parseInt(t.css("paddingTop"),10),left:parseInt(t.css("paddingLeft"),10)},i.template=Tt.template,i.template||(i.template=Tt.template=bn(""+"
")),i.element=e(i.template(i.options)).appendTo(t),i._moveProxy=Mt(i.move,i)},options:{border:{width:1},opacity:1,animation:{duration:tr}},move:function(){var e=this,t=e.options,n=e.element,i=e._offset();e.visible||n.css({top:i.top,left:i.left}),n.stop(!0,!0).show().animate({left:i.left,top:i.top},t.animation.duration),e.visible=!0},_offset:function(){var t=this,n=t.element,i=t.anchor,r=t.chartPadding,o=_n(i.y+r.top),a=_n(i.x+r.left),s=Nt.support.zoomLevel(),l=e(window),d=window.pageYOffset||document.documentElement.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||0;return d=t.chartElement.offset().top-d,c=t.chartElement.offset().left-c,o+=t._currentPosition(o+d,n.outerHeight(),l.outerHeight()/s),a+=t._currentPosition(a+c,n.outerWidth(),l.outerWidth()/s),{top:o,left:a}},setStyle:function(e){this.element.css({backgroundColor:e.background,borderColor:e.border.color||e.background,font:e.font,color:e.color,opacity:e.opacity,borderWidth:e.border.width})},show:function(){var e=this;e.showTimeout=setTimeout(e._moveProxy,ir)},hide:function(){var e=this;clearTimeout(e.showTimeout),e.visible&&(e._hideElement(),e.point=null,e.visible=!1,e.index=null)},_hideElement:function(){this.element.fadeOut()},_pointContent:function(e){var t,n,i=this,r=jt({},i.options,e.options.tooltip);return pn(e.value)&&(t=""+e.value),r.template?(n=Wt(r.template),t=n({value:e.value,category:e.category,series:e.series,dataItem:e.dataItem,percentage:e.percentage})):r.format&&(t=e.formatValue(r.format)),t},_pointAnchor:function(e){var t=this,n=t.element;return e.tooltipAnchor(n.outerWidth(),n.outerHeight())},_currentPosition:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),0>e&&(i=-e),i},_updateStyle:function(e,t){if(pn(e.background)||(e.background=t.color),!pn(e.color)){var n=this,i=n.element,r=new Zt(e.background).percBrightness();r>180?i.addClass(jn+or):i.removeClass(jn+or)}}}),St=Tt.extend({show:function(e){var t=this,n=jt({},t.options,e.options.tooltip);e&&(t.element.html(t._pointContent(e)),t.anchor=t._pointAnchor(e),t._updateStyle(n,e.options),t.setStyle(n),Tt.fn.show.call(t,e))}}),At=Tt.extend({init:function(e,t,n){var i=this;Tt.fn.init.call(i,e,n),i.plotArea=t},options:{sharedTemplate:"#= categoryText # # for(var i = 0; i < points.length; i++) { ## var point = points[i]; ## if(point.series.name) { ##= point.series.name #: # } ##= content(point) # # } #
",categoryFormat:"{0:d}"},showAt:function(e,t){var n,i=this,r=i.options,o=i.plotArea,a=o.categoryAxis,s=a.getCategoryIndex(t),l=a.getCategory(t),d=a.getSlot(s);n=i._content(e,l),i.element.html(n),i.anchor=i._slotAnchor(t,d),i._updateStyle(r,e[0].options),i.setStyle(r),Tt.fn.show.call(i)},_slotAnchor:function(e,t){var n,i=this,r=i.plotArea,o=r.categoryAxis,a=e.y-i.element.height()/2;return n=o.options.vertical?nn(e.x,a):nn(t.center().x,a)},_content:function(e,t){var n,i,r=this;return n=Nt.template(r.options.sharedTemplate),i=n({points:e,category:t,categoryText:un(r.options.categoryFormat,t),content:r._pointContent})}}),Ft=Jt.extend({init:function(e,t){var n=this;Jt.fn.init.call(n,t),n.axis=e,n.options.id||(n.options.id=yn()),n._visible=!1,n.stickyMode=e instanceof Ir},options:{color:In,width:1,zIndex:-1,tooltip:{visible:!1}},repaint:function(){var e=this,t=e.element;e.getViewElements(e._view),t=e.element,t.refresh(fn(e.options.id))},showAt:function(e){var t=this;t.updateAxisReference(),t._visible=!0,t.point=e,t.repaint(),t.options.tooltip.visible&&(t.tooltip||(t.tooltip=new Dt(t,jt({},t.options.tooltip,{stickyMode:t.stickyMode}))),t.tooltip.showAt(e))},hide:function(){var e=this;e._visible&&(e._visible=!1,e.repaint(),e.tooltip&&e.tooltip.hide())},linePoints:function(){var e,t,n,i=this,r=i.axis,o=r.options.vertical,a=i.getBox(),s=i.point,l=o?gr:hr;return t=nn(a.x1,a.y1),n=o?nn(a.x2,a.y1):nn(a.x1,a.y2),s&&(i.stickyMode?(e=r.getSlot(r.getCategoryIndex(s)),t[l]=n[l]=e.center()[l]):t[l]=n[l]=s[l]),i.box=a,[t,n]},getBox:function(){var e,t,n,i=this,r=i.axis,o=r.pane.axes,a=o.length,s=r.options.vertical,l=r.lineBox().clone(),d=s?hr:gr;for(n=0;a>n;n++)t=o[n],t.options.vertical!=s&&(e?e.wrap(t.lineBox()):e=t.lineBox().clone());return l[d+1]=e[d+1],l[d+2]=e[d+2],l},getViewElements:function(e){var t=this,n=t.options,i=[];return t.points=t.linePoints(),t.element=e.createPolyline(t.points,!1,{id:n.id,stroke:n.color,strokeWidth:n.width,strokeOpacity:n.opacity,dashType:n.dashType,zIndex:n.zIndex,visible:t._visible}),i.push(t.element),t._view=e,cn(i,Jt.fn.getViewElements.call(t,e)),i},updateAxisReference:function(){var e,t,n=this,i=n.axis,r=i.plotArea,o=r.axes;for(t=0;o.length>t;t++)if(e=o[t],pn(i.axisIndex)&&i instanceof tn!=e instanceof Ir&&i.axisIndex===e.axisIndex){n.axis=e;break}}}),Dt=Tt.extend({init:function(e,t){var n=this,i=e.axis.getRoot().parent.element;n.crosshair=e,Tt.fn.init.call(n,i,jt({},n.options,{background:e.axis.plotArea.options.seriesColors[0]},t)),n._updateStyle(n.options,{}),n.setStyle(n.options)},options:{padding:10},showAt:function(e){var t=this,n=t.element;t.point=e,t.element.html(t.content(e)),t.anchor=t.getAnchor(n.outerWidth(),n.outerHeight()),t.move()},move:function(){var e=this,t=e.element,n=e._offset();t.css({top:n.top,left:n.left}).show()},content:function(e){var t,n,i,r=this,o=r.options,a=r.crosshair.axis,s=a.options;return n=t=a[o.stickyMode?"getCategory":"getValue"](e),o.template?(i=Wt(o.template),t=i({value:n})):o.format?t=un(o.format,n):s.type===Gn&&(t=un(s.labels.dateFormats[s.baseUnit],n)),t},getAnchor:function(e,t){var n,i,r=this,o=r.options,a=o.position,s=r.crosshair.axis.options.vertical,l=r.crosshair.points,d=l[0],c=l[1],u=e/2,p=t/2,f=o.padding;return s?a===pi?(n=d.x-e-f,i=d.y-p):(n=c.x+f,i=c.y-p):a===Pn?(n=c.x-u,i=c.y+f):(n=d.x-u,i=d.y-t-f),nn(n,i)},hide:function(){this.element.hide(),this.point=null}}),It={max:function(e){var t=Rt.max.apply(Rt,e);return isNaN(t)?r(e):t},min:function(e){var t=Rt.min.apply(Rt,e);return isNaN(t)?i(e):t},sum:function(e){var t,n,i=e.length,r=0;for(t=0;i>t;t++)n=e[t],pn(n)&&!isNaN(n)&&(r+=n);return r},count:function(e){return e.length},avg:function(e){return It.sum(e)/It.count(e)}},Et=Lt.extend({init:function(t,n,i){var r,o,a=this,s=t.element,l=n.lineBox(),d=a.getValueAxis(n),c=d.lineBox(),u="."+jn;Lt.fn.init.call(a),a.options=jt({},a.options,i),i=a.options,a.chart=t,a.chartElement=s,a.categoryAxis=n,a._dateAxis=a.categoryAxis instanceof Pr,a.valueAxis=d,a._dateAxis&&jt(i,{min:m(i.min),max:m(i.max),from:m(i.from),to:m(i.to)}),a.template=Et.template,a.template||(a.template=Et.template=bn("")),o={left:parseInt(s.css("paddingLeft"),10),right:parseInt(s.css("paddingTop"),10)},a.options=jt({},{width:l.width(),height:c.height(),padding:o,offset:{left:c.x2+o.left,top:c.y1+o.right},from:i.min,to:i.max},i),a.options.visible&&(a.wrapper=r=e(a.template(a.options)).appendTo(s),a.selection=r.find(u+"selection"),a.leftMask=r.find(u+"mask").first(),a.rightMask=r.find(u+"mask").last(),a.leftHandle=r.find(u+"leftHandle"),a.rightHandle=r.find(u+"rightHandle"),a.options.selection={border:{left:parseFloat(a.selection.css("border-left-width"),10),right:parseFloat(a.selection.css("border-right-width"),10)}},a.leftHandle.css("top",(a.selection.height()-a.leftHandle.height())/2),a.rightHandle.css("top",(a.selection.height()-a.rightHandle.height())/2),a.set(a._index(i.from),a._index(i.to)),a.bind(a.events,a.options),a.wrapper[0].style.cssText=a.wrapper[0].style.cssText,a.wrapper.on(Fi,Mt(a._mousewheel,a)),Nt.UserEvents?a.userEvents=new Nt.UserEvents(a.wrapper,{global:!0,threshold:5,stopPropagation:!0,multiTouch:!0,start:Mt(a._start,a),move:Mt(a._move,a),end:Mt(a._end,a),tap:Mt(a._tap,a),gesturestart:Mt(a._gesturechange,a),gesturechange:Mt(a._gesturechange,a)}):a.leftHandle.add(a.rightHandle).removeClass(jn+"handle"))},events:[Vi,Ui,Wi],options:{visible:!0,mousewheel:{zoom:En},min:_i,max:vi},destroy:function(){var e=this,t=e.userEvents;t&&t.destroy()},_rangeEventArgs:function(e){var t=this;return{axis:t.categoryAxis.options,from:t._value(e.from),to:t._value(e.to)}},_start:function(t){var n,i=this,r=i.options,o=e(t.event.target);!i._state&&o&&(i.chart._unsetActivePoint(),i._state={moveTarget:o.parents(".k-handle").add(o).first(),startLocation:t.x?t.x.location:0,range:{from:i._index(r.from),to:i._index(r.to)}},n=i._rangeEventArgs({from:i._index(r.from),to:i._index(r.to)}),i.trigger(Vi,n)&&(i.userEvents.cancel(),i._state=null))},_move:function(e){if(this._state){var t=this,n=t._state,i=t.options,r=t.categoryAxis.options.categories,o=t._index(i.from),a=t._index(i.to),s=t._index(i.min),l=t._index(i.max),d=n.startLocation-e.x.location,c=n.range,u={from:c.from,to:c.to},p=c.to-c.from,f=n.moveTarget,h=t.wrapper.width()/(r.length-1),g=Rt.round(d/h);f&&(e.preventDefault(),f.is(".k-selection, .k-selection-bg")?(c.from=Rt.min(Rt.max(s,o-g),l-p),c.to=Rt.min(c.from+p,l)):f.is(".k-leftHandle")?(c.from=Rt.min(Rt.max(s,o-g),l-1),c.to=Rt.max(c.from+1,c.to)):f.is(".k-rightHandle")&&(c.to=Rt.min(Rt.max(s+1,a-g),l),c.from=Rt.min(c.to-1,c.from)),(c.from!==u.from||c.to!==u.to)&&(t.move(c.from,c.to),t.trigger(Ui,t._rangeEventArgs(c))))}},_end:function(){var e=this,t=e._state.range;delete e._state,e.set(t.from,t.to),e.trigger(Wi,e._rangeEventArgs(t))},_gesturechange:function(e){if(this._state){var t=this,n=t.chart,i=t._state,r=t.options,o=t.categoryAxis,a=i.range,s=n._toModelCoordinates(e.touches[0].x.location).x,l=n._toModelCoordinates(e.touches[1].x.location).x,d=Rt.min(s,l),c=Rt.max(s,l);e.preventDefault(),i.moveTarget=null,a.from=o.getCategoryIndex(new Gt.Point2D(d))||r.min,a.to=o.getCategoryIndex(new Gt.Point2D(c))||r.max,t.move(a.from,a.to)}},_tap:function(e){var t=this,n=t.options,i=t.chart._eventCoordinates(e),r=t.categoryAxis,o=r.getCategoryIndex(new Gt.Point2D(i.x,r.box.y1)),a=t._index(n.from),s=t._index(n.to),l=t._index(n.min),d=t._index(n.max),c=s-a,u=a+c/2,p=Rt.round(u-o),f={},h=3===e.event.which;t._state||h||(e.preventDefault(),t.chart._unsetActivePoint(),r.options.justified||p--,f.from=Rt.min(Rt.max(l,a-p),d-c),f.to=Rt.min(f.from+c,d),t._start(e),t._state&&(t._state.range=f,t.trigger(Ui,t._rangeEventArgs(f)),t._end()))},_mousewheel:function(e){var t,n=this,i=n.options,r=L(e);n._start({event:{target:n.selection}}),n._state&&(t=n._state.range,e.preventDefault(),e.stopPropagation(),Rt.abs(r)>1&&(r*=_r),i.mousewheel.reverse&&(r*=-1),n.expand(r)&&n.trigger(Ui,{axis:n.categoryAxis.options,delta:r,originalEvent:e,from:n._value(t.from),to:n._value(t.to)}),n._mwTimeout&&clearTimeout(n._mwTimeout),n._mwTimeout=setTimeout(function(){n._end()},Ai))},_index:function(e){var t=this,n=t.categoryAxis,i=n.options.categories,r=e;return e instanceof Date&&(r=M(i,e),!n.options.justified&&e>vn(i)&&(r+=1)),r},_value:function(e){var t=this,n=this.categoryAxis,i=n.options.categories,r=e;return t._dateAxis&&(r=e>i.length-1?t.options.max:i[e]),r},_slot:function(e){var t=this,n=this.categoryAxis;return n.getSlot(t._index(e))},move:function(e,t){var n,i,r,o,a=this,s=a.options,l=s.offset,d=s.padding,c=s.selection.border;r=a._slot(e),n=_n(r.x1-l.left+d.left),a.leftMask.width(n),a.selection.css("left",n),r=a._slot(t),i=_n(s.width-(r.x1-l.left+d.left)),a.rightMask.width(i),o=s.width-i,o!=s.width&&(o+=c.right),a.rightMask.css("left",o),a.selection.width(Rt.max(s.width-(n+i)-c.right,0))},set:function(e,t){var n=this,i=n.options,r=n._index(i.min),o=n._index(i.max);e=E(n._index(e),r,o),t=E(n._index(t),e+1,o),i.visible&&n.move(e,t),i.from=n._value(e),i.to=n._value(t)},expand:function(e){var n=this,i=n.options,r=n._index(i.min),o=n._index(i.max),a=i.mousewheel.zoom,s=n._index(i.from),l=n._index(i.to),d={from:s,to:l},c=jt({},d);return n._state&&(d=n._state.range),a!==Oi&&(d.from=E(E(s-e,0,l-1),r,o)),a!==pi&&(d.to=E(E(l+e,d.from+1,o),r,o)),d.from!==c.from||d.to!==c.to?(n.set(d.from,d.to),!0):t},getValueAxis:function(e){var t,n,i=e.pane.axes,r=i.length;for(t=0;r>t;t++)if(n=i[t],n.options.vertical!==e.options.vertical)return n}}),Ot(e.easing,{easeOutElastic:function(e,t,n,i){var r=1.70158,o=0,a=i;return 0===e?n:1===e?n+i:(o||(o=.5),Rt.abs(i)>a?(a=i,r=o/4):r=o/(2*Rt.PI)*Rt.asin(i/a),a*Rt.pow(2,-10*e)*Rt.sin((1*e-r)*1.1*Rt.PI/o)+i+n)}}),Gt.ui.plugin(Sr),jt(Gt,{Aggregates:It,AreaChart:et,Bar:Mr,BarAnimationDecorator:wt,BarChart:W,BarLabel:Ar,BubbleAnimationDecorator:kt,BubbleChart:it,CandlestickChart:ot,Candlestick:rt,CategoricalPlotArea:ht,CategoryAxis:Ir,ClusterLayout:Hr,Crosshair:Ft,CrosshairTooltip:Dt,DateCategoryAxis:Pr,DateValueAxis:zr,DonutChart:ut,DonutPlotArea:_t,DonutSegment:ct,Highlight:Ct,SharedTooltip:At,Legend:Dr,LineChart:J,LinePoint:Y,Pane:pt,PieAnimation:bt,PieAnimationDecorator:xt,PieChart:dt,PiePlotArea:vt,PieSegment:lt,ScatterChart:tt,ScatterLineChart:nt,Selection:Et,ShapeElement:G,StackLayout:Rr,Tooltip:St,OHLCChart:st,OHLCPoint:at,XYPlotArea:mt,addDuration:_,axisGroupBox:P,validNumbers:N,bindPoint:S,categoriesCount:f,ceilDate:w,duration:C,floorDate:y,lteDateIndex:M,sparseArrayLimits:o,toDate:m,toTime:v})}(window.kendo.jQuery),function(){function e(e,n,i){var r=w(e.from)?e.from:H,o=w(e.to)?e.to:z;return e.from=t.max(t.min(o,r),n),e.to=t.min(t.max(o,r),i),e}var t=Math,n=window.kendo,i=n.ui.Widget,r=n.deepExtend,o=n.dataviz,a=o.Axis,s=o.Box2D,l=o.ChartElement,d=o.NumericAxis,c=o.Pin,u=o.Ring,p=o.RootElement,f=o.RotationAnimation,h=o.BarIndicatorAnimatin,g=o.ArrowAnimation,m=o.append,v=o.animationDecorator,_=o.autoMajorUnit,b=o.getElement,y=o.getSpacing,w=o.defined,x=o.rotatePoint,k=o.Point2D,C=o.round,T=o.uniqueId,S=150,A="arrow",F="arrowPointer",D="barIndicator",I="#000",E=.05,P=o.COORD_PRECISION,z=Number.MAX_VALUE,H=-Number.MAX_VALUE,R=200,O=.5,M=200,N=60,B=60,L=t.PI/180,V="inside",U="needle",W="outside",j="radialPointer",q=90,G=l.extend({init:function(e,n){var i=this,r=e.options;l.fn.init.call(i,n),n=i.options,n.id||(n.id=T()),n.fill=n.color,i.scale=e,n.value=w(n.value)?t.min(t.max(n.value,r.min),r.max):r.min},options:{color:I},value:function(e){var n=this,i=n.options,r=i.value,o=n.scale.options;return 0===arguments.length?r:(i._oldValue=i.value,i.value=t.min(t.max(e,o.min),o.max),n.repaint(),undefined)}}),$=G.extend({options:{shape:U,cap:{size:E},arrow:{width:16,height:14},animation:{type:j,speed:S}},reflow:function(){var e=this,t=e.options,n=e.scale,i=n.ring,r=i.c,o=i.r*t.cap.size;e.box=new s(r.x-o,r.y-o,r.x+o,r.y+o)},repaint:function(){var e=this,t=e.scale,n=e.options,i=e.elements[0],o=n.animation,a=t.slotAngle(t.options.min),s=t.slotAngle(n._oldValue)-a,l=i._animation;i.options.rotation[0]=t.slotAngle(n.value)-a,l&&l.abort(),o.transitions===!1?i.refresh(b(n.id)):(l=i._animation=new f(i,r(o,{startAngle:s,reverse:t.options.reverse})),l.setup(),l.play())},_renderNeedle:function(e,t,n,i){var r=this,o=r.options,a=r.scale,s=a.ring.r*o.cap.size;return[e.createPolyline([x((t.x1+t.x2)/2,t.y1+a.options.minorTicks.size,n.x,n.y,i),x(n.x-s/2,n.y,n.x,n.y,i),x(n.x+s/2,n.y,n.x,n.y,i)],!0,o),e.createCircle(n,s,{fill:o.cap.color||o.color})]},_renderArrow:function(e,t,n,i){var r=this,o=r.options,a=r.scale,s=a.ring.clone(),l=5,d=o.arrow,u=d.height;return s.ir=s.r-l,[e.createPin(new c({origin:x((t.x1+t.x2)/2,t.y1+u,n.x,n.y,i),height:d.height,radius:l,rotation:i,arcAngle:180}),o),e.createRing(s,{fill:o.color})]},renderPointer:function(e){var t,n=this,i=n.scale,o=i.ring,a=o.c,l=o.r,d=n.options,c=new s(a.x-l,a.y-l,a.x+l,a.y+l),u=c.center(),p=i.slotAngle(i.options.min),f=q-p;return d.animation!==!1&&r(d.animation,{startAngle:0,center:u,reverse:i.options.reverse}),r(d,{rotation:[i.slotAngle(d.value)-p,u.x,u.y]}),t=d.shape==A?n._renderArrow(e,c,u,f):n._renderNeedle(e,c,u,f)},getViewElements:function(e){var t=this,n=t.renderPointer(e);return t.elements=n,n}}),Y=d.extend({init:function(e){var t=this;t.options=r({},t.options,e),t.options.majorUnit=t.options.majorUnit||_(t.options.min,t.options.max),a.fn.init.call(t,t.options),t.options.minorUnit=t.options.minorUnit||t.options.majorUnit/10},options:{min:0,max:100,majorTicks:{size:15,align:V,color:I,width:O,visible:!0},minorTicks:{size:10,align:V,color:I,width:O,visible:!0},startAngle:-30,endAngle:210,labels:{position:V,padding:2}},reflow:function(e){var n=this,i=n.options,r=e.center(),a=t.min(e.height(),e.width())/2,s=n.ring||new o.Ring(r,a-i.majorTicks.size,a,i.startAngle,i.endAngle-i.startAngle);n.ring=s,n.box=s.getBBox(),n.arrangeLabels()},slotAngle:function(e){var t,n=this.options,i=n.startAngle,r=n.reverse,o=n.endAngle-i,a=n.min,s=n.max;return t=r?n.endAngle-(e-a)/(s-a)*o:(e-a)/(s-a)*o+i},renderTicks:function(e){function t(t,r,o,a,s){var l,d,c,u=n.tickAngles(t,r),p=s/r,f=u.length;if(a)for(l=0;f>l;l++)0!==l%p&&(c=t.point(u[l]),d=t.point(u[l],!0),i.push(e.createLine(d.x,d.y,c.x,c.y,{align:!1,stroke:o.color,strokeWidth:o.width})))}var n=this,i=[],r=n.ring,o=r.clone(),a=n.options,s=a.minorTicks.size;return t(r,a.majorUnit,a.majorTicks,a.majorTicks.visible),a.labels.position==V?o.radius(o.r-s,!0):o.radius(o.ir+s),t(o,a.minorUnit,a.minorTicks,a.minorTicks.visible,a.majorUnit),i},arrangeLabels:function(){var e,n,i,r,o,a,l,d,c,u,p=this,f=p.options,h=p.ring.clone(),g=p.tickAngles(h,f.majorUnit),m=p.labels,v=m.length,_=f.labels,b=_.padding,y=.05*h.r,w=f.rangeSize=f.rangeSize||.1*h.r,x=f.ranges||[];for(p.options.rangeDistance!==undefined?y=p.options.rangeDistance:p.options.rangeDistance=y,_.position===V&&x.length&&(h.r-=w+y,h.ir-=w+y),l=0;v>l;l++)o=m[l],e=o.box.width()/2,n=o.box.height()/2,r=g[l],i=r*L,u=_.position===V,a=h.point(r,u),d=a.x+t.cos(i)*(e+b)*(u?1:-1),c=a.y+t.sin(i)*(n+b)*(u?1:-1),o.reflow(new s(d-e,c-n,d+e,c+n)),p.box.wrap(o.box)},tickAngles:function(e,t){var n,i=this,r=i.options,o=r.reverse,a=r.max-r.min,s=e.angle,l=e.startAngle,d=a/t,c=s/d,u=[];for(o&&(l+=s,c=-c),n=0;d>n;n++)u.push(C(l,P)),l+=c;return C(l)<=r.endAngle&&u.push(l),u},renderRanges:function(e){var t,n,i,r,o,a=this,s=[],l=a.rangeSegments(),d=l.length,c=a.options.reverse;if(d)for(r=a.getRadius(),o=0;d>o;o++)i=l[o],t=a.slotAngle(i[c?"to":"from"]),n=a.slotAngle(i[c?"from":"to"]),0!==n-t&&s.push(e.createRing(new u(a.ring.c,r.inner,r.outer,t,n-t),{fill:i.color,fillOpacity:i.opacity,zIndex:-1}));return s},rangeSegments:function(){function t(e,t,n){return{from:e,to:t,color:n}}var n,i,r,o,a,s=this,l=s.options,d=l.ranges||[],c=d.length,u=l.rangePlaceholderColor,p=[],f=l.min,h=l.max;if(c)for(p.push(t(f,h,u)),o=0;c>o;o++)for(n=e(d[o],f,h),i=p.length,a=0;i>a;a++)if(r=p[a],r.from<=n.from&&n.from<=r.to){p.push(t(n.from,n.to,n.color)),r.from<=n.to&&n.to<=r.to&&p.push(t(n.to,r.to,u)),r.to=n.from;break}return p},getRadius:function(){var e,t,n=this,i=n.options,r=i.rangeSize,o=i.rangeDistance,a=n.ring;return i.labels.position===W?(t=a.ir-o,e=t-r):(t=a.r,e=t-r,a.r-=r+o,a.ir-=r+o),{inner:e,outer:t}},getViewElements:function(e){var t=this,n=l.fn.getViewElements.call(t,e);return m(n,t.renderRanges(e)),m(n,t.renderTicks(e)),n}}),Q=l.extend({init:function(e){l.fn.init.call(this,e),this.render()},options:{margin:{},background:"",border:{color:I,width:0},minorTicks:{align:V}},reflow:function(e){var t,n=this,i=n.scale,r=n.pointer;i.reflow(e),t=i.box.clone(),r.scale=i,r.reflow(),t.wrap(r.box),n.box=t,n.fitScale(e),n.alignScale(e)},alignScale:function(e){var t=this,n=t.box.center(),i=e.center(),r=n.x-i.x,o=n.y-i.y,a=t.scale,s=t.pointer;a.ring.c.x-=r,a.ring.c.y-=o,a.reflow(e),s.reflow(),t.box=a.box.clone().wrap(s.box)},fitScale:function(e){for(var n,i,r,o,a=this,s=a.scale,l=s.ring,d=a.box,c=t.abs(a.getDiff(d,e)),u=C(c,P),p=C(-c,P),f=0;!(!(100>f)||(f++,u!=o&&(n=a.getPlotBox(u,e,l),n>=0&&2>=n))||p!=o&&(r=a.getPlotBox(p,e,l),r>=0&&2>=r)||(o=n>0&&r>0?2*u:0>n&&0>r?2*p:C((u+p)/2||1,P),i=a.getPlotBox(o,e,l),i>=0&&2>=i));)i>0?(p=o,r=i):(u=o,n=i)},getPlotBox:function(e,t,n){var i=this,r=i.scale,o=i.pointer;return n=n.clone(),n.r+=e,n.ir+=e,r.ring=n,r.reflow(t),o.scale=r,o.reflow(),i.box=r.box.clone().wrap(o.box),i.getDiff(i.box,t)},getDiff:function(e,n){return t.min(n.width()-e.width(),n.height()-e.height())},render:function(){var e,t=this,n=t.options;e=t.scale=new Y(n.scale),t.append(t.scale),t.pointer=new $(e,r({},n.pointer,{animation:{transitions:n.transitions}})),t.append(t.pointer)}}),K=d.extend({init:function(e){var t=this;t.options=r({},t.options,e),t.options=r({},t.options,{labels:{mirror:t.options.mirror}}),t.options.majorUnit=t.options.majorUnit||_(t.options.min,t.options.max),a.fn.init.call(t,t.options),t.options.minorUnit=t.options.minorUnit||t.options.majorUnit/10},options:{min:0,max:50,majorTicks:{size:15,align:V,color:I,width:O,visible:!0},minorTicks:{size:10,align:V,color:I,width:O,visible:!0},line:{width:O},labels:{position:V,padding:2},mirror:!1,_alignLines:!1},renderRanges:function(t){var n,i,r,o,a,l=this,d=l.options,c=d.min,u=d.max,p=d.ranges||[],f=d.vertical,h=d.labels.mirror,g=[],m=p.length,v=d.rangeSize||d.minorTicks.size/2;if(m)for(o=0;m>o;o++)n=e(p[o],c,u),a=l.getSlot(n.from,n.to),i=f?l.lineBox():a,r=f?a:l.lineBox(),f?i.x1-=v*(h?-1:1):r.y2+=v*(h?-1:1),g.push(t.createRect(new s(i.x1,r.y1,i.x2,r.y2),{fill:n.color,fillOpacity:n.opacity}));return g},getViewElements:function(e){var t=this,n=d.fn.getViewElements.call(t,e);return m(n,t.renderRanges(e)),n}}),X=G.extend({init:function(e,t){var n=this;G.fn.init.call(n,e,t),n.options=r({size:n.pointerSize(),track:{visible:w(t.track)}},n.options)},options:{shape:D,track:{border:{width:1}},color:I,border:{width:1},opacity:1,margin:y(3),animation:{type:D},visible:!0},repaint:function(){var e=this,t=e.scale,n=e.options,i=e.element,o=i._animation;o&&o.abort(),n.animation.transitions===!1?(e.getViewElements(e._view),i.points=e.element.points,i.refresh(b(n.id))):(n.animation=r({},n.animation,{endPosition:t.getSlot(t.options.min,n.value),reverse:t.options.reverse}),o=i._animation=n.shape===A?new g(i,n.animation):new h(i,n.animation),o.setup(),o.play())},reflow:function(){var e,t,n,i=this,r=i.options,o=i.scale,a=o.lineBox(),l=r.track.size||r.size,d=r.size/2,c=o.options.mirror,u=y(r.margin),p=o.options.vertical,f=p?u[c?"left":"right"]:u[c?"bottom":"top"];f=c?-f:f,p?(n=new s(a.x1+f,a.y1,a.x1+f,a.y2),c?n.x1-=l:n.x2+=l,r.shape!==D&&(t=new s(a.x2+f,a.y1-d,a.x2+f,a.y2+d),e=t)):(n=new s(a.x1,a.y1-f,a.x2,a.y1-f),c?n.y2+=l:n.y1-=l,r.shape!==D&&(t=new s(a.x1-d,a.y1-f,a.x2+d,a.y1-f),e=t)),i.trackBox=n,i.pointerRangeBox=t,i.box=e||n.clone().pad(r.border.width)},renderPointer:function(e){var t,n=this,i=n.scale,o=n.options,a=w(o.border)?{stroke:o.border.width?o.border.color||o.color:"",strokeWidth:o.border.width,dashType:o.border.dashType}:{},s=r({fill:o.color,fillOpacity:o.opacity,animation:r(o.animation,{startPosition:i.getSlot(i.options.min,o.value),size:o.size,vertical:i.options.vertical,reverse:i.options.reverse}),id:o.id,zIndex:2,align:!1},a),l=n.pointerShape(o.value);return o.shape===A?(s.animation.type=F,t=e.createPolyline(l,!0,s)):t=e.createRect(l,s),t},pointerShape:function(e){var t,n,i,r=this,o=r.options,a=r.scale,l=a.getSlot(e,a.options.min),d=o.size,c=r.pointerRangeBox,u=a.options.vertical,p=d/2,f=a.options.mirror?-1:1,h=a.options.reverse;return o.shape==A?u?(n=h?"y2":"y1",t=[new k(c.x1,l[n]-p),new k(c.x1-f*d,l[n]),new k(c.x1,l[n]+p)]):(n=h?"x1":"x2",t=[new k(l[n]-p,c.y2),new k(l[n],c.y2+f*d),new k(l[n]+p,c.y2)]):(i=r.trackBox,t=u?new s(i.x1,l.y1,i.x1+d,l.y2):new s(l.x1,i.y1,l.x2,i.y1+d)),t},pointerSize:function(){var e,t=this,n=t.options,i=t.scale,r=i.options.majorTicks.size;return e=n.shape===A?.6*r:.3*r,C(e)},renderTrack:function(e){var t=this,n=t.options,i=n.track,r=i.border||{},o=t.trackBox.clone().pad(r.width||0);return e.createRect(o,{fill:i.color,fillOpacity:i.opacity,stroke:r.width?r.color||i.color:"",strokeWidth:r.width,dashType:r.dashType,align:!1})},getViewElements:function(e){var t=this,n=t.options,i=[];return t.element=t.renderPointer(e),i.push(t.element),!n.track.visible||n.shape!==D&&""!==n.shape||i.push(t.renderTrack(e)),t._view=e,m(i,G.fn.getViewElements.call(t,e)),i}}),J=l.extend({init:function(e){l.fn.init.call(this,e),this.render()},options:{plotArea:{margin:{},background:"",border:{color:I,width:0}},pointer:{},scale:{}},reflow:function(e){var t=this,n=t.scale,i=t.pointer;n.reflow(e),i.reflow(e),t.box=t.getBox(e),t.alignElements(),t.shrinkElements()},shrinkElements:function(){var e=this,n=e.scale,i=e.pointer,r=n.box.clone(),o=i.box,a=n.options.vertical?"y":"x";r[a+1]+=t.max(r[a+1]-o[a+1],0),r[a+2]-=t.max(o[a+2]-r[a+2],0),n.reflow(r),i.reflow(e.box)},getBox:function(e){var t,n=this,i=n.scale,r=n.pointer,o=e.center(),a=r.box.clone().wrap(i.box);return i.options.vertical?(t=a.width()/2,a=new s(o.x-t,e.y1,o.x+t,e.y2)):(t=a.height()/2,a=new s(e.x1,o.y-t,e.x2,o.y+t)),a},alignElements:function(){var e,t=this,n=t.scale,i=t.pointer,r=n.box,o=i.box.clone().wrap(n.box),a=t.box;n.options.vertical?(e=a.center().x-o.center().x,n.reflow(new s(r.x1+e,a.y1,r.x2+e,a.y2))):(e=a.center().y-o.center().y,n.reflow(new s(a.x1,r.y1+e,a.x2,r.y2+e))),i.reflow(t.box)},render:function(){var e,t=this,n=t.options;e=t.scale=new K(n.scale),t.append(t.scale),t.pointer=new X(e,r({},n.pointer,{animation:{transitions:n.transitions}})),t.append(t.pointer)},getViewElements:function(e){var t=this,n=t.options.plotArea,i=l.fn.getViewElements.call(t,e),r=n.border||{},o=[e.createRect(t.box,{fill:n.background,stroke:r.width?r.color:"",strokeWidth:r.width,dashType:r.dashType})];return m(o,i),o}}),Z=i.extend({init:function(e,t){var n,a,s,l,d=this,c=o.ui.themes||{};i.fn.init.call(d,e),d.wrapper=d.element,d._originalOptions=r({},t),n=r({},d.options,t),s=n.theme,l=c[s]||c[s.toLowerCase()],a=s&&l?l.gauge:{},d.options=r({},a,n),d.element.addClass("k-gauge"),d.redraw()},options:{plotArea:{},theme:"default",pointer:{},scale:{},gaugeArea:{}},value:function(e){return 0===arguments.length?this._pointers[0].value():(this._pointers[0].value(e),undefined)},redraw:function(){var e,t=this,n=t.element,i=t._model=t._getModel(),r=o.ui.defaultView();t._plotArea=i._plotArea,r&&(e=t._view=r.fromModel(i),n.css("position","relative"),t._viewElement=e.renderTo(n[0]))},svg:function(){var e=this._getModel(),t=o.SVGView.fromModel(e);return t.render()},_createModel:function(){var e=this,t=e.options,n=e._getSize();return new p(r({width:n.width,height:n.height,transitions:t.transitions},t.gaugeArea))},_getSize:function(){var e=this,t=e.element,n=t.width(),i=t.height();return n||(n=M),i||(i=R),{width:n,height:i}}}),et=Z.extend({init:function(e,t){var i=this;Z.fn.init.call(i,e,t),n.notify(i,o.ui)},options:{name:"RadialGauge",transitions:!0,gaugeArea:{background:""}},_getModel:function(){var e,t=this,n=t.options,i=t._createModel();return e=i._plotArea=new Q(n),t._pointers=[e.pointer],i.append(e),i.reflow(),i}}),tt=Z.extend({init:function(e,t){var i=this;Z.fn.init.call(i,e,t),n.notify(i,o.ui)},options:{name:"LinearGauge",transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}},_getModel:function(){var e,t=this,n=t.options,i=t._createModel();return e=i._plotArea=new J(n),t._pointers=[e.pointer],i.append(e),i.reflow(),i},_getSize:function(){var e=this,t=e.element,n=t.width(),i=t.height(),r=e.options.scale.vertical;return n||(n=r?N:M),i||(i=r?R:B),{width:n,height:i}}}),nt=v(j,f),it=v(F,g),rt=v(D,h);o.ui.plugin(et),o.ui.plugin(tt),r(o,{Gauge:Z,RadialGaugePlotArea:Q,LinearGaugePlotArea:J,RadialPointer:$,LinearPointer:X,LinearScale:K,RadialScale:Y,RadialPointerAnimationDecorator:nt,ArrowPointerAnimationDecorator:it,BarIndicatorAnimationDecorator:rt})}(window.kendo.jQuery),function(e){function t(){}function n(e){return t.prototype=e,new t}var i,r=window.kendo,o=r.Class,a=r.Observable,s=r.deepExtend,l=Math,d=e.proxy,c=r.dataviz,u=r.template,p=c.defined,f=c.ui.Chart,h=c.Selection,g=c.addDuration,m=c.duration,v=c.last,_=c.lteDateIndex,b=c.renderTemplate,y=c.toDate,w=c.toTime,x=28,k="change",C="k-",T="drag",S="dragEnd",A="_navigator",F=A,D=3,I="zoom",E="zoomEnd",P=f.extend({init:function(t,n){e(t).addClass(C+"chart"),f.fn.init.call(this,t,n)},_applyDefaults:function(e,t){var n=this,i=n.element.width()||c.DEFAULT_WIDTH,r={axisDefaults:{categoryAxis:{name:"default",field:e.dateField,majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:l.floor(i/x)}}};t&&(t=s({},t,r)),n._navigator||z.setup(e,t),f.fn._applyDefaults.call(n,e,t)},_initDataSource:function(e){var t,n,i=e||{},r=i.dataSource,o=r&&r.serverFiltering,a=[].concat(i.categoryAxis)[0],l=i.navigator||{},d=l.select,u=d&&d.from&&d.to;o&&u&&(t=[].concat(r.filter||[]),n=new c.DateCategoryAxis(s({baseUnit:"fit"},a,{categories:[d.from,d.to]})),r.filter=z.buildFilter(n.options.min,d.to).concat(t)),f.fn._initDataSource.call(this,e)},options:{name:"StockChart",dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0,template:"#= kendo.toString(category, 'd') #"},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}},_redraw:function(){var e=this,t=e._navigator;t&&t.dataSource?t.redrawSlaves():(t||(t=e._navigator=new z(e)),t.filterAxes(),f.fn._redraw.call(e),t.redraw())},_onDataChanged:function(){var e=this;f.fn._onDataChanged.call(e),e._dataBound=!0},_trackSharedTooltip:function(e){var t=this,n=t._plotArea,i=n.paneByPoint(e);i&&i.options.name===A?t._unsetActivePoint():f.fn._trackSharedTooltip.call(t,e)},destroy:function(){var e=this;e._navigator.destroy(),f.fn.destroy.call(e)}}),z=a.extend({init:function(e){var t=this;t.chart=e,t.options=s({},t.options,e.options.navigator),t._initDataSource(),p(t.options.hint.visible)||(t.options.hint.visible=t.options.visible),e.bind(T,d(t._drag,t)),e.bind(S,d(t._dragEnd,t)),e.bind(I,d(t._zoom,t)),e.bind(E,d(t._zoomEnd,t))
},options:{},_initDataSource:function(){var e=this,t=e.options,n=t.autoBind,i=t.dataSource;p(n)||(n=e.chart.options.autoBind),e._dataChangedHandler=d(e._onDataChanged,e),i&&(e.dataSource=r.data.DataSource.create(i).bind(k,e._dataChangedHandler),n&&e.dataSource.fetch())},_onDataChanged:function(){var e,t,n,i,r=this,o=r.chart,a=o.options.series,s=a.length,l=o.options.categoryAxis,d=l.length,c=r.dataSource.view();for(e=0;s>e;e++)n=a[e],n.axis==F&&o._isBindable(n)&&(n.data=c);for(t=0;d>t;t++)i=l[t],i.pane==A&&o._bindCategoryAxis(i,c);o._model&&(r.redraw(),r.filterAxes(),(!o.options.dataSource||o.options.dataSource&&o._dataBound)&&r.redrawSlaves())},destroy:function(){var e=this,t=e.dataSource;t&&t.unbind(k,e._dataChangeHandler),e.selection&&e.selection.destroy()},redraw:function(){this._redrawSelf();var t=this,r=t.chart,o=t.options,a=t.mainAxis(),s=n(a),l=a.options.categories,d=t.options.select||{},c=t.selection,u=l[0],p=v(l),f=d.from||u,g=d.to||p;l.length>0&&(c&&(c.destroy(),c.wrapper.remove()),s.box=a.box,c=t.selection=new h(r,s,{min:u,max:p,from:f,to:g,selectStart:e.proxy(t._selectStart,t),select:e.proxy(t._select,t),selectEnd:e.proxy(t._selectEnd,t),mousewheel:{zoom:"left"}}),o.hint.visible&&(t.hint=new i(r.element,{min:l[0],max:v(l),template:o.hint.template,format:o.hint.format})))},_redrawSelf:function(e){var t=this.chart._plotArea;t&&t.redraw(v(t.panes),e)},redrawSlaves:function(){var e=this,t=e.chart,n=t._plotArea,i=n.panes.slice(0,-1);n.srcSeries=t.options.series,n.redraw(i)},_drag:function(e){var t,n,i=this,r=i.chart,o=r._eventCoordinates(e.originalEvent),a=i.mainAxis(),s=a.pane.box.containsPoint(o),d=a.options.categories,u=r._plotArea.categoryAxis,p=u.options.baseUnit,f=e.axisRanges[u.options.name],h=i.selection,v=m(u.options.min,u.options.max,u.options.baseUnit);f&&!s&&(t=y(l.min(l.max(d[0],f.min),g(c.last(d),-v,p))),n=y(l.min(g(t,v,p),c.last(d))),i.options.select={from:t,to:n},i._liveDrag()&&(i.filterAxes(),i.redrawSlaves()),h.set(t,g(t,v+1,p)),i.showHint(t,n))},_dragEnd:function(){var e=this;e.filterAxes(),e.filterDataSource(),e.redrawSlaves(),e.hint&&e.hint.hide()},_liveDrag:function(){var e=r.support,t=e.touch,n=e.browser,i=n.mozilla,o=n.msie&&9>n.version;return!t&&!i&&!o},readSelection:function(){var e=this,t=e.selection,n=t.options,i=e.options.select;i.from=n.from,i.to=n.to},filterAxes:function(){var e,t,n,i,r,o=this,a=o.options.select||{},s=o.chart,l=s.options.categoryAxis,d=a.from,c=a.to;for(i=0;l.length>i;i++)if(r=l[i],r.name===F&&(e=r.categories,e&&e.length>0)){t=w(e[0]),n=w(v(e)),d=w(d),(t>d||d>n)&&(d=t),c=w(c),(t>c||c>n)&&(c=n);break}for(i=0;l.length>i;i++)r=l[i],r.pane!==A&&(r.min=y(d),r.max=y(c))},filterDataSource:function(){var e,t=this,n=t.options.select||{},i=t.chart,r=i.dataSource,o=r&&r.options.serverFiltering;t.dataSource&&o&&(e=new c.DateCategoryAxis(s({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[n.from,n.to]})).options,r.filter(z.buildFilter(g(e.min,-e.baseUnitStep,e.baseUnit),g(e.max,e.baseUnitStep,e.baseUnit))))},_zoom:function(e){var t=this,n=t.chart,i=e.delta,o=n._plotArea.categoryAxis,a=t.options.select,s=t.selection,d=t.mainAxis().options.categories,c=_(d,s.options.from),u=_(d,s.options.to);e.originalEvent.preventDefault(),l.abs(i)>1&&(i*=D),u-c>1?(s.expand(i),t.readSelection()):(o.options.min=a.from,a.from=o.scaleRange(-e.delta).min),r.support.touch||(t.filterAxes(),t.redrawSlaves()),s.set(a.from,a.to),t.showHint(t.options.select.from,t.options.select.to)},_zoomEnd:function(e){this._dragEnd(e)},showHint:function(e,t){var n=this,i=n.chart,r=i._plotArea;n.hint&&n.hint.show(e,t,r.backgroundBox())},_selectStart:function(e){var t=this.chart;t._selectStart.call(t,e)},_select:function(e){var t=this,n=t.chart;t.showHint(e.from,e.to),n._select.call(n,e)},_selectEnd:function(e){var t=this,n=t.chart;t.hint&&t.hint.hide(),t.readSelection(),t.filterAxes(),t.filterDataSource(),t.redrawSlaves(),n._selectEnd.call(n,e)},mainAxis:function(){var e=this.chart._plotArea;return e?e.namedCategoryAxes[F]:undefined}});z.setup=function(e,t){e=e||{},t=t||{};var n=s({},t.navigator,e.navigator),i=e.panes=[].concat(e.panes),r=s({},n.pane,{name:A});n.visible||(r.visible=!1,r.height=.1),i.push(r),z.attachAxes(e,n),z.attachSeries(e,n,t)},z.attachAxes=function(e,t){var n=e.categoryAxis=[].concat(e.categoryAxis),i=e.valueAxis=[].concat(e.valueAxis),r=s({type:"date",pane:A,field:t.dateField,roundToBaseUnit:!1,justified:!0,tooltip:{visible:!1},labels:{step:1},autoBind:!t.dataSource,autoBaseUnitSteps:{minutes:[1],hours:[1],days:[1],weeks:[],months:[1],years:[1]},_overlap:!1},t.categoryAxis);n.push(s({},r,{name:F,baseUnit:"fit",maxDateGroups:200,baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),s({},r,{name:F+"_labels",maxDateGroups:20,baseUnitStep:"auto",autoBaseUnitSteps:{minutes:[]},majorTicks:{visible:!0}}),s({},r,{name:F+"_ticks",maxDateGroups:200,majorTicks:{visible:!0,width:.5},labels:{visible:!1,mirror:!0}})),i.push({name:F,pane:A,majorGridLines:{visible:!1},visible:!1})},z.attachSeries=function(e,t,n){var i,r=e.series=e.series||[],o=[].concat(t.series),a=n.seriesColors,l=t.seriesDefaults;for(i=0;o.length>i;i++)r.push(s({color:a[i%a.length],visibleInLegend:!1,tooltip:{visible:!1}},l,o[i],{axis:F,categoryAxis:F,autoBind:!t.dataSource}))},z.buildFilter=function(e,t){return[{field:"Date",operator:"gte",value:y(e)},{field:"Date",operator:"lt",value:y(t)}]},i=o.extend({init:function(t,n){var i=this;i.options=s({},i.options,n),i.container=t,i.chartPadding={top:parseInt(t.css("paddingTop"),10),left:parseInt(t.css("paddingLeft"),10)},i.template=i.template,i.template||(i.template=i.template=b("")),i.element=e(i.template()).appendTo(t)},options:{format:"{0:d} - {1:d}",hideDelay:500},show:function(e,t,n){var i,o=this,a=y(w(e)+w(t-e)/2),s=o.options,l=r.format(o.options.format,e,t),d=o.element.find("."+C+"tooltip"),c=o.element.find("."+C+"scroll"),p=.4*n.width(),f=n.center().x-p,h=n.center().x,g=h-f,m=s.max-s.min,v=g/m,_=a-s.min;o._hideTimeout&&clearTimeout(o._hideTimeout),o._visible||(o.element.stop(!1,!0).css("visibility","hidden").show(),o._visible=!0),s.template&&(i=u(s.template),l=i({from:e,to:t})),d.text(l).css({left:n.center().x-d.outerWidth()/2,top:n.y1}),c.css({width:p,left:f+_*v,top:n.y1+parseInt(d.css("margin-top"),10)+parseInt(d.css("border-top-width"),10)+d.height()/2}),o.element.css("visibility","visible")},hide:function(){var e=this;e._hideTimeout&&clearTimeout(e._hideTimeout),e._hideTimeout=setTimeout(function(){e._visible=!1,e.element.fadeOut("slow")},e.options.hideDelay)}}),c.ui.plugin(P),s(c,{Navigator:z})}(window.kendo.jQuery),function(e){function t(e){return"number"==typeof e?[e]:e}var n=window.kendo,i=n.dataviz,r=i.ui.Chart,o=n.data.ObservableArray,a=i.SharedTooltip,s=n.deepExtend,l=e.isArray,d=i.inArray,c=Math,u="k-",p=150,f=150,h="bar",g="bullet",m="pie",v=[h,g],_=r.extend({init:function(n,i){var a=this,p=a.stage=e(" "),f=i||{};n=e(n).addClass(u+"sparkline").empty().append(p),a._initialWidth=c.floor(n.width()),f=t(f),(l(f)||f instanceof o)&&(f={seriesDefaults:{data:f}}),f.series||(f.series=[{data:t(f.data)}]),s(f,{seriesDefaults:{type:f.type}}),(d(f.series[0].type,v)||d(f.seriesDefaults.type,v))&&(f=s({},{categoryAxis:{crosshair:{visible:!1}}},f)),r.fn.init.call(a,n,f)},options:{name:"Sparkline",chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5},_modelOptions:function(){var e,t=this,n=t.options,i=t._initialWidth,r=t.stage;return t.stage[0].innerHTML=" ",e=s({width:i?i:t._autoWidth(),height:r.height(),transitions:n.transitions},n.chartArea,{inline:!0,align:!1}),r.css({width:e.width,height:e.height}),e},_createTooltip:function(){var e,t=this,n=t.options,i=t.element;return e=t._sharedTooltip()?new b(i,t._plotArea,n.tooltip):r.fn._createTooltip.call(t)},_renderView:function(){var e=this;return e.element.empty().append(e.stage),e._view.renderTo(e.stage[0])},_autoWidth:function(){var e,t,n,r=this,o=r.options,a=i.getSpacing(o.chartArea.margin),s=o.series,l=r.dataSource.total(),d=0;for(t=0;s.length>t;t++){if(n=s[t],n.type===h)return p;if(n.type===g)return f;if(n.type===m)return r.stage.height();n.data&&(d=c.max(d,n.data.length))}return e=c.max(l,d)*o.pointWidth,e>0&&(e+=a.left+a.right),e}}),b=a.extend({options:{animation:{duration:0}},_anchor:function(e,t){var n=a.fn._anchor.call(this,e,t);return n.y=-this.element.height()-this.options.offset,n},_hideElement:function(){this.element.hide()}});i.ui.plugin(_),s(i,{})}(window.kendo.jQuery),function(){function e(e){this.view=e}function t(e){this.view=e}function n(e){return w.round(e)+.5}function i(e,t){var n,i,r=[];if(e=e?e.toLowerCase():null,e&&e!=j){for(n=$[e],i=0;n.length>i;i++)r.push(n[i]*(t||1));return"stroke-dasharray='"+r.join(" ")+"' "}return""}var r,o,a,s,l,d,c,u,p,f,h,g,m,v,_,b=jQuery,y=document,w=Math,x=window.kendo,k=x.Class,C=x.dataviz,T=C.Box2D,S=C.ExpandAnimation,A=C.Point2D,F=C.ViewBase,D=C.ViewElement,I=x.deepExtend,E=C.defined,P=C.round,z=C.renderTemplate,H=C.rotatePoint,R=C.uniqueId,O="butt",M=C.CLIP,N=C.COORD_PRECISION,B=C.DEFAULT_WIDTH,L=C.DEFAULT_HEIGHT,V=C.DEFAULT_FONT,U="none",W="radial",j="solid",q="square",G="http://www.w3.org/2000/svg",$={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Y="transparent",Q="undefined",K=F.extend({init:function(n){var i=this;F.fn.init.call(i,n),i.decorators.push(new e(i),new t(i)),C.ui.Chart&&i.decorators.push(new C.BarAnimationDecorator(i),new C.PieAnimationDecorator(i),new C.BubbleAnimationDecorator(i)),i.decorators.push(new v(i),new C.FadeAnimationDecorator(i)),C.Gauge&&i.decorators.push(new C.RadialPointerAnimationDecorator(i),new C.ArrowPointerAnimationDecorator(i),new C.BarIndicatorAnimationDecorator(i)),i.defsId=R(),i.template=K.template,i.display=i.options.inline?"inline":"block",i.template||(i.template=K.template=z(""+"#= d.renderDefinitions() #"+"#= d.renderContent() # "))},options:{width:B,height:L},renderTo:function(e){var t,n=this;return n.setupAnimations(),C.renderSVG(e,n.render()),t=e.firstElementChild,n.alignToScreen(t),n.playAnimations(),t},renderDefinitions:function(){var e=this,t=e.defsId,n=F.fn.renderDefinitions.call(e);return""+n+" "},renderElement:function(e){var t,n,i=this,r=y.createElement("div"),o=y.getElementById(i.defsId);return C.renderSVG(r,""+i.renderDefinitions()+e.render()+" "),t=r.firstElementChild.firstChild,n=r.firstElementChild.lastChild,o&&o.textContent!==t.textContent&&o.parentNode.replaceChild(t,o),n},createGroup:function(e){return this.decorate(new u(e))},createText:function(e,t){return this.decorate(new r(e,t))},createRect:function(e,t){return this.decorate(new a(e.points(),!0,this.setDefaults(t)))},createLine:function(e,t,n,i,r){return this.decorate(new a([new A(e,t),new A(n,i)],!1,this.setDefaults(r)))},createPolyline:function(e,t,n){return this.decorate(new a(e,t,this.setDefaults(n)))},createCircle:function(e,t,n){return this.decorate(new c(e,t,n))},createSector:function(e,t){return this.decorate(new d(e,t))},createRing:function(e,t){return this.decorate(new s(e,t))},createPin:function(e,t){return this.decorate(new l(e,t))},createGradient:function(e){return e.type===W?E(e.ir)?new m(e):new g(e):new h(e)},alignToScreen:function(e){var t,n,i,r;try{t=e.getScreenCTM?e.getScreenCTM():null}catch(o){}t&&(n=-t.e%1,i=-t.f%1,r=e.style,(0!==n||0!==i)&&(r.left=n+"px",r.top=i+"px"))}});K.fromModel=function(e){var t=new K(e.options);return[].push.apply(t.children,e.getViewElements(t)),t},K.available=C.supportsSVG,K.preference=100,C.ui.registerView(K),r=D.extend({init:function(e,t){var n=this;D.fn.init.call(n,t),n.content=e,n.template=r.template,n.template||(n.template=r.template=z("#= d.content # "))},options:{x:0,y:0,baseline:0,font:V,size:{width:0,height:0},fillOpacity:1,cursor:{}},refresh:function(e){var t=this.options;b(e).attr({"fill-opacity":t.fillOpacity})},clone:function(){var e=this;return new r(e.content,I({},e.options))},renderCursor:function(){var e=this.options,t="";return E(e.cursor.style)&&(t+="cursor: "+e.cursor.style+";"),t},renderRotation:function(){var e=this,t=e.options,n=t.size,i=P(t.x+n.normalWidth/2,N),r=P(t.y+n.normalHeight/2,N),o=P(t.x+n.width/2,N),a=P(t.y+n.height/2,N),s=P(o-i,N),l=P(a-r,N);return"transform='translate("+s+","+l+") "+"rotate("+t.rotation+","+i+","+r+")'"}}),o=D.extend({init:function(e){var t=this;D.fn.init.call(t,e),t.template=o.template,t.template||(t.template=o.template=z(" "))},options:{fill:"",fillOpacity:1,strokeOpacity:1,rotation:[0,0,0],strokeLineCap:q,visible:!0,cursor:{}},refresh:function(e){var t=this.options;b(e).attr({d:this.renderPoints(),"fill-opacity":t.fillOpacity,"stroke-opacity":t.strokeOpacity}).css("display",this.renderDisplay())},clone:function(){return new o(I({},this.options))},renderPoints:function(){},renderCursor:function(){var e=this.options,t="";return E(e.cursor.style)&&(t+="cursor: "+e.cursor.style+";"),t},renderDashType:function(){var e=this,t=e.options;return i(t.dashType,t.strokeWidth)},renderLinecap:function(){var e=this.options,t=e.dashType,n=e.strokeLineCap;return t&&t!=j?O:n},renderFill:function(){var e=this.options.fill;return e&&e!==Y?e:U},renderDisplay:function(){return this.options.visible?"block":"none"},destroy:function(){}}),a=o.extend({init:function(e,t,n){var i=this;o.fn.init.call(i,n),i.points=e,i.closed=t},renderPoints:function(){var e,t=this,n=t.points,i=n.length,r=function(e){var n=t.options.rotation;return H(e.x,e.y,n[1],n[2],-n[0])},o="M"+t._print(r(n[0]));for(e=1;i>e;e++)o+=" "+t._print(r(n[e]));return t.closed&&(o+=" z"),o},clone:function(){var e=this;return new a(I([],e.points),e.closed,I({},e.options))},_print:function(e){var t=this,i=t.options,r=i.strokeWidth,o=i.align!==!1&&r&&0!==r%2,a=o?n:P;return a(e.x,N)+" "+a(e.y,N)}}),s=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,t),n.pathTemplate=s.pathTemplate,n.pathTemplate||(n.pathTemplate=s.pathTemplate=z("M #= d.firstOuterPoint.x # #= d.firstOuterPoint.y # A#= d.r # #= d.r # 0 #= d.isReflexAngle ? '1' : '0' #,1 #= d.secondOuterPoint.x # #= d.secondOuterPoint.y # L #= d.secondInnerPoint.x # #= d.secondInnerPoint.y # A#= d.ir # #= d.ir # 0 #= d.isReflexAngle ? '1' : '0' #,0 #= d.firstInnerPoint.x # #= d.firstInnerPoint.y # z")),n.config=e||{}},renderPoints:function(){var e,t,n=this,i=n.config,r=i.startAngle,o=i.angle+r,a=o-r>180,s=w.max(i.r,0),l=w.max(i.ir,0),d=i.c,c=i.point(r),u=i.point(r,!0);return P(r)%360===P(o)%360&&(o-=.05),e=i.point(o),t=i.point(o,!0),n.pathTemplate({firstOuterPoint:c,secondOuterPoint:e,isReflexAngle:a,r:s,ir:l,cx:d.x,cy:d.y,firstInnerPoint:u,secondInnerPoint:t})},clone:function(){var e=this;return new s(I({},e.config),I({},e.options))}}),l=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,t),n.pathTemplate=l.pathTemplate,n.pathTemplate||(n.pathTemplate=l.pathTemplate=z("M #= d.origin.x # #= d.origin.y # #= d.as.x # #= d.as.y # A#= d.r # #= d.r # 0 #= d.isReflexAngle ? '1' : '0' #,0 #= d.ae.x # #= d.ae.y # z")),n.config=e||new C.Pin},renderPoints:function(){var e=this,t=e.config,n=t.radius,i=w.PI/180,r=t.arcAngle,o=n*w.sin(r*i/2),a=t.height-n*(1-w.cos(r*i/2)),s=t.origin,l={x:s.x+o,y:s.y-a},d={x:s.x-o,y:s.y-a},c=function(n,i){var r=e.options.rotation,o=t.rotation;return n=H(n.x,n.y,r[1],r[2],-r[0]),i&&(n=H(n.x,n.y,s.x,s.y,o)),n};return s=c(s),e.pathTemplate({origin:s,as:c(l,!0),ae:c(d,!0),r:n,isReflexAngle:r>180})}}),d=s.extend({init:function(e,t){var n=this;s.fn.init.call(n,e,t),n.pathTemplate=d.pathTemplate,n.pathTemplate||(n.pathTemplate=d.pathTemplate=z("M #= d.firstOuterPoint.x # #= d.firstOuterPoint.y # A#= d.r # #= d.r # 0 #= d.isReflexAngle ? '1' : '0' #,1 #= d.secondOuterPoint.x # #= d.secondOuterPoint.y # L #= d.cx # #= d.cy # z"))},options:{fill:"",fillOpacity:1,strokeOpacity:1,strokeLineCap:q},clone:function(){var e=this;return new d(I({},e.config),I({},e.options))}}),c=D.extend({init:function(e,t,n){var i=this;D.fn.init.call(i,n),i.c=e,i.r=t,i.template=c.template,i.template||(i.template=c.template=z(" "))},options:{fill:"",fillOpacity:1,strokeOpacity:1},refresh:function(e){b(e).attr({r:w.max(0,this.r),"fill-opacity":this.options.fillOpacity})},clone:function(){var e=this;return new c(I({},e.c),e.r,I({},e.options))}}),u=D.extend({init:function(e){var t=this;D.fn.init.call(t,e),t.template=u.template,t.template||(t.template=u.template=z('#= d.renderContent() # '))}}),p=D.extend({init:function(e){var t=this;D.fn.init.call(t,e),t.template=p.template,t.template||(t.template=p.template=z('#= d.renderContent() # '))}}),f=D.extend({init:function(e){var t=this;D.fn.init.call(t,e)},options:{id:""},renderStops:function(){var e,t,n=this,i=n.options.stops,r=n.stopTemplate,o=i.length,a="";for(e=0;o>e;e++)t=i[e],a+=r(t);return a}}),h=f.extend({init:function(e){var t=this;f.fn.init.call(t,e),t.template=h.template,t.stopTemplate=h.stopTemplate,t.template||(t.template=h.template=z(" #= d.renderStops() # "),t.stopTemplate=h.stopTemplate=z(" "))},options:{rotation:0}}),g=f.extend({init:function(e){var t=this;f.fn.init.call(t,e),t.template=g.template,t.stopTemplate=g.stopTemplate,t.template||(t.template=g.template=z("#= d.renderStops() # "),t.stopTemplate=g.stopTemplate=z(" "))}}),m=D.extend({init:function(e){var t=this;D.fn.init.call(t,e),t.template=m.template,t.stopTemplate=m.stopTemplate,t.template||(t.template=m.template=z("#= d.renderStops() # "),t.stopTemplate=m.stopTemplate=z(" "))},options:{id:""},renderStops:function(){var e,t,n=this,i=n.options,r=i.stops,o=n.stopTemplate,a=100*(i.ir/i.r),s=r.length,l="";for(t=I({},r[0]),t.offset=a,l+=o(t),e=1;s>e;e++)t=I({},r[e]),t.offset=t.offset*(100-a)+a,l+=o(t);return l}}),e.prototype={decorate:function(e){var t,n,i=this,r=i.view,o=e.options,a=o.id;return o.overlay?(e.options.id=R(),t=r.createGroup(),n=e.clone(),t.children.push(e,n),n.options.id=a,n.options.fill=o.overlay,t):e}},t.prototype={decorate:function(e){var t=this,n=e.options;return n.fill=t.getPaint(n.fill),e},getPaint:function(e){var t,n,i,r=this,o=r.view,a=o.definitions;return e&&E(e.gradient)?(t=o.buildGradient(e),t?(n=t.id,i=a[n],i||(i=o.createGradient(t),a[n]=i),"url("+r.baseUrl()+"#"+i.options.id+")"):U):e},baseUrl:function(){var e=y.getElementsByTagName("base")[0],t="",n=y.location.href,i=n.indexOf("#");return e&&!x.support.browser.msie&&(-1!==i&&(n=n.substring(0,i)),t=n),t}},v=k.extend({init:function(e){this.view=e},decorate:function(e){var t,n,i=this,r=i.view,o=i.clipId,a=r.options,s=e.options.animation,l=r.definitions;return s&&s.type===M&&a.transitions&&(o||(i.clipId=o=R()),t=l[o],t||(t=new p({id:o}),n=r.createRect(new T(0,0,a.width,a.height),{id:R()}),t.children.push(n),l[o]=t,r.animations.push(new S(n,{size:a.width}))),e.options.clipPath="url(#"+o+")"),e}}),_=function(e,t){e.innerHTML=t},function(){var e=" ",t=y.createElement("div"),n=typeof DOMParser!=Q;t.innerHTML=e,n&&t.firstChild.namespaceURI!=G&&(_=function(e,t){var n=new DOMParser,i=n.parseFromString(t,"text/xml"),r=y.adoptNode(i.documentElement);e.innerHTML="",e.appendChild(r)})}(),I(C,{renderSVG:_,SVGCircle:c,SVGClipAnimationDecorator:v,SVGClipPath:p,SVGGradientDecorator:t,SVGGroup:u,SVGLine:a,SVGLinearGradient:h,SVGOverlayDecorator:e,SVGPath:o,SVGRadialGradient:g,SVGDonutGradient:m,SVGRing:s,SVGSector:d,SVGText:r,SVGView:K})}(window.kendo.jQuery),function(){function e(e){this.view=e}function t(e){this.view=e}function n(){return C.support.browser.msie&&!B()&&window.performance!==void 0}function i(e,t,n){var i=new F(e),o=new F(t),a=r(i.r,o.r,n),s=r(i.g,o.g,n),l=r(i.b,o.b,n);return new F(a,s,l).toHex()}function r(e,t,n){return k.round(n*t+(1-n)*e)}function o(e,t){var n,r,o,a=t.stops,s=a.length,l=S({},t);for(l.stops=[],n=0;s>n;n++)r=a[n],o=l.stops[n]=S({},a[n]),o.color=i(e,r.color,r.opacity),o.opacity=0;return l}var a,s,l,d,c,u,p,f,h,g,m,v,_,b,y,w=jQuery,x=document,k=Math,C=window.kendo,T=C.Class,S=C.deepExtend,A=C.dataviz,F=A.Color,D=A.Box2D,I=A.Point2D,E=A.ExpandAnimation,P=A.ViewBase,z=A.ViewElement,H=A.defined,R=A.renderTemplate,O=A.uniqueId,M=A.rotatePoint,N=A.round,B=A.supportsSVG,L="#000",V=A.CLIP,U=A.COORD_PRECISION,W=A.DEFAULT_WIDTH,j=A.DEFAULT_HEIGHT,q=A.DEFAULT_FONT,G="object",$="linear",Y="radial",Q="transparent",K=P.extend({init:function(i){var r=this;P.fn.init.call(r,i),r.decorators.push(new e(r),new t(r)),A.ui.Chart&&r.decorators.push(new A.BarAnimationDecorator(r),new A.PieAnimationDecorator(r),new A.BubbleAnimationDecorator(r)),r.decorators.push(new y(r)),n()||r.decorators.push(new A.FadeAnimationDecorator(r)),A.Gauge&&r.decorators.push(new A.RadialPointerAnimationDecorator(r),new A.ArrowPointerAnimationDecorator(r),new A.BarIndicatorAnimationDecorator(r)),r.template=K.template,r.tagName=r.options.inline?"span":"div",r.template||(r.template=K.template=R("<#= d.tagName # style='width:#= d.options.width #px; height:#= d.options.height #px; position: relative;'>#= d.renderContent() ##= d.tagName #>"))},options:{width:W,height:j},renderTo:function(e){var t=this;return x.namespaces&&x.namespaces.add("kvml","urn:schemas-microsoft-com:vml","#default#VML"),t.setupAnimations(),e.innerHTML=t.render(),t.playAnimations(),e.firstChild},renderElement:function(e){var t,n=x.createElement("div");return n.style.display="none",x.body.appendChild(n),n.innerHTML=e.render(),t=n.firstChild,x.body.removeChild(n),t},createText:function(e,t){return this.decorate(t&&t.rotation?new s(e,t):new a(e,t))},createRect:function(e,t){return this.decorate(new u(e.points(),!0,this.setDefaults(t)))},createLine:function(e,t,n,i,r){return this.decorate(new u([new I(e,t),new I(n,i)],!1,this.setDefaults(r)))},createPolyline:function(e,t,n){return this.decorate(new u(e,t,this.setDefaults(n)))},createCircle:function(e,t,n){return this.decorate(new h(e,t,n))},createSector:function(e,t){return this.decorate(new f(e,t))},createRing:function(e,t){return this.decorate(new p(e,this.setDefaults(t)))},createGroup:function(e){return this.decorate(new g(this.setDefaults(e)))},createGradient:function(e){var t=H(e.cx)&&H(e.cy)&&H(e.bbox);return e.type===Y&&t?new b(e):e.type===$?new _(e):L}});K.fromModel=function(e){var t=new K(e.options);return[].push.apply(t.children,e.getViewElements(t)),t},K.available=function(){return C.support.browser.msie},K.preference=50,A.ui.registerView(K),a=z.extend({init:function(e,t){var n=this;z.fn.init.call(n,t),n.content=e,n.template=a.template,n.template||(n.template=a.template=R("#= d.content # "))},options:{x:0,y:0,font:q,color:L,fillOpacity:1,cursor:{}},refresh:function(e){w(e).css("visibility",this.renderVisibility())},clone:function(){var e=this;return new a(e.content,S({},e.options))},renderVisibility:function(){return this.options.fillOpacity>0?"visible":"hidden"},renderCursor:function(){var e=this.options,t="";return H(e.cursor.style)&&(t+="cursor: "+e.cursor.style+";"),t}}),s=z.extend({init:function(e,t){var n=this;z.fn.init.call(n,t),n.content=e,n.template=s.template,n.template||(n.template=s.template=R("#= d.renderPath() # "))},options:{x:0,y:0,font:q,color:L,size:{width:0,height:0}},renderPath:function(){var e=this,t=e.options,n=t.size.width,i=t.size.height,r=t.x+n/2,o=t.y+i/2,a=-t.rotation,s=M(t.x,o,r,o,a),l=M(t.x+n,o,r,o,a);return" "}}),l=z.extend({init:function(e){var t=this;z.fn.init.call(t,e),t.template=l.template,t.template||(t.template=l.template=R(' '))},refresh:function(e){try{e.opacity=this.options.strokeOpacity}catch(t){}}}),d=z.extend({init:function(e){var t=this;z.fn.init.call(t,e),t.template=d.template,t.template||(t.template=d.template=R(' '))},isEnabled:function(){var e=this.options.fill;return!!e&&e.toLowerCase()!==Q},refresh:function(e){try{e.opacity=this.options.fillOpacity}catch(t){}}}),c=z.extend({init:function(e){var t=this;z.fn.init.call(t,e),t.template=c.template,t.template||(t.template=c.template=R(" #= d.fill.render() + d.stroke.render() # ")),t.stroke=new l(t.options),t.fill=new d(t.options)},options:{fill:"",fillOpacity:1,strokeOpacity:1,rotation:[0,0,0],visible:!0,cursor:{}},renderCoordsize:function(){var e=this.options.align===!1?1e4:1;return"coordsize='"+e+" "+e+"'"},renderSize:function(){var e=this.options.align===!1?100:1;return"width:"+e+"px; height:"+e+"px;"},render:function(){var e=this;return e.fill.options.fillOpacity=e.options.fillOpacity,e.stroke.options.strokeOpacity=e.options.strokeOpacity,z.fn.render.call(e)},renderDisplay:function(){return this.options.visible?"block":"none"},renderPoints:function(){},refresh:function(e){if(e){var t=this,n=w(e),i=n[0].parentNode,r=t.fill,o=t.stroke;i&&(n.find("path")[0].v=this.renderPoints(),r.options=o.options=t.options,r.refresh(n.find("fill")[0]),o.refresh(n.find("stroke")[0]),n.css("display",t.renderDisplay()),i.style.cssText=i.style.cssText)}},renderCursor:function(){var e=this.options,t="";return H(e.cursor.style)&&(t+="cursor: "+e.cursor.style+";"),t}}),u=c.extend({init:function(e,t,n){var i=this;c.fn.init.call(i,n),i.points=e,i.closed=t},renderPoints:function(){var e,t=this,n=t.points,i=n.length,r=function(e){var n=t.options.rotation;return M(e.x,e.y,n[1],n[2],-n[0])},o="m "+t._print(r(n[0]));if(i>1)for(o+=" l ",e=1;i>e;e++)o+=t._print(r(n[e])),i-1>e&&(o+=", ");return t.closed&&(o+=" x"),o},clone:function(){var e=this;return new u(S([],e.points),e.closed,S({},e.options))},_print:function(e){var t=this.options.align===!1?100:1;return k.round(e.x*t)+","+k.round(e.y*t)}}),p=c.extend({init:function(e,t){var n=this;c.fn.init.call(n,t),n.pathTemplate=p.pathTemplate,n.pathTemplate||(n.pathTemplate=p.pathTemplate=R("M #= d.osp.x #,#= d.osp.y # WA #= d.obb.l #,#= d.obb.t # #= d.obb.r #,#= d.obb.b # #= d.osp.x #,#= d.osp.y # #= d.oep.x #,#= d.oep.y # L #= d.iep.x #,#= d.iep.y # AT #= d.ibb.l #,#= d.ibb.t # #= d.ibb.r #,#= d.ibb.b # #= d.iep.x #,#= d.iep.y # #= d.isp.x #,#= d.isp.y # X E")),n.config=e},renderPoints:function(){function e(e){return new I(N(e.x),N(e.y))}var t,n,i,r,o=this,a=o.config,s=k.max(N(a.r),0),l=k.max(N(a.ir),0),d=N(a.c.x),c=N(a.c.y),u=a.startAngle,p=a.angle+u,f=p-u,h={l:d-s,t:c-s,r:d+s,b:c+s},g={l:d-l,t:c-l,r:d+l,b:c+l};return 1>=f?p+=1-f:f>359&&(p-=1-f),t=e(a.point(u)),n=e(a.point(u,!0)),r=e(a.point(p)),i=e(a.point(p,!0)),o.pathTemplate({obb:h,ibb:g,osp:t,isp:n,oep:r,iep:i,cx:d,cy:c})},clone:function(){var e=this;return new p(S({},e.config),S({},e.options))}}),f=p.extend({init:function(e,t){var n=this;p.fn.init.call(n,e,t),n.pathTemplate=f.pathTemplate,n.pathTemplate||(n.pathTemplate=f.pathTemplate=R("M #= d.osp.x #,#= d.osp.y # WA #= d.obb.l #,#= d.obb.t # #= d.obb.r #,#= d.obb.b # #= d.osp.x #,#= d.osp.y # #= d.oep.x #,#= d.oep.y # L #= d.cx #,#= d.cy # X E"))},clone:function(){var e=this;return new f(S({},e.config),S({},e.options))}}),h=z.extend({init:function(e,t,n){var i=this;z.fn.init.call(i,n),i.c=e,i.r=t,i.template=h.template,i.template||(i.template=h.template=R("#= d.fill.render() + d.stroke.render() # ")),i.stroke=new l(i.options),i.fill=new d(i.options)},options:{fill:"",fillOpacity:1},refresh:function(e){var t=this,n=t.c,i=k.max(0,t.r),r=2*i,o=w(e);o.css({width:r,height:r,top:n.y-i,left:n.x-i}),t.fill.options=t.options,t.fill.refresh(o.find("fill")[0])},clone:function(){var e=this;return new h(S({},e.c),e.r,S({},e.options))}}),g=z.extend({init:function(e){var t=this;z.fn.init.call(t,e),t.tagName=t.options.inline?"span":"div",t.template=g.template,t.template||(t.template=g.template=R("<#= d.tagName # #= d.renderId() ##= d.renderDataAttributes() #style='position: absolute; white-space: nowrap;'>#= d.renderContent() ##= d.tagName #>"))}}),m=z.extend({init:function(e,t){var n=this;z.fn.init.call(n,t),n.tagName=n.options.inline?"span":"div",n.template=m.template,n.clipTemplate=m.clipTemplate,n.template||(n.template=m.template=R("<#= d.tagName # #= d.renderId() #style='position:absolute; width:#= d.box.width() #px; height:#= d.box.height() #px; top:#= d.box.y1 #px; left:#= d.box.x1 #px; clip:#= d._renderClip() #;' >#= d.renderContent() ##= d.tagName #>"),n.clipTemplate=m.clipTemplate=R("rect(#= d.points[0].y #px #= d.points[1].x #px #= d.points[2].y #px #= d.points[0].x #px)")),n.box=e,n.points=e.points()
},clone:function(){var e=this;return new m(e.box,S({},e.options))},refresh:function(e){e&&(e.style.clip=this._renderClip())},_renderClip:function(){return this.clipTemplate(this)},destroy:function(){w("#"+this.options.id+">*").unwrap()}}),v=z.extend({init:function(e){var t=this;z.fn.init.call(t,e)},options:{opacity:1},renderColors:function(){var e,t,n=this,i=n.options,r=i.stops,o=r.length,a=[],s=k.round;for(t=0;o>t;t++)e=r[t],a.push(s(100*e.offset)+"% "+e.color);return a.join(",")}}),_=v.extend({init:function(e){var t=this;v.fn.init.call(t,e),t.template=_.template,t.template||(t.template=_.template=R(" "))},options:{rotation:0}}),b=v.extend({init:function(e){var t=this;v.fn.init.call(t,e),t.template=b.template,t.template||(t.template=b.template=R(" "))},focusPosition:function(){var e=this.options,t=e.bbox,n=e.cx,i=e.cy,r=Math.max(0,Math.min(1,(n-t.x1)/t.width())),o=Math.max(0,Math.min(1,(i-t.y1)/t.height()));return N(r,U)+" "+N(o,U)},firstColor:function(){var e=this.options.stops;return e[0].color},lastColor:function(){var e=this.options.stops;return e[e.length-1].color}}),e.prototype={decorate:function(e){var t,n,i=e.options,r=this.view;return i.overlay&&(n=i.overlay.bbox,t=r.buildGradient(S({},i.overlay,{_overlayFill:i.fill,_bboxHash:H(n)?n.getHash():""}))),t?(delete i.overlay,i.fill=S(o(i.fill,t),{opacity:i.fillOpacity}),e):e}},t.prototype={decorate:function(e){var t=this,n=t.view,i=e.options,r=i.fill;return r&&r.supportVML!==!1&&(r.gradient&&(r=n.buildGradient(r)),typeof r===G&&(e.fill=n.createGradient(r))),e}},y=T.extend({init:function(e){this.view=e},decorate:function(e){var t,n=this,i=n.view,r=i.options,o=e.options.animation;return o&&o.type===V&&r.transitions?(t=new m(new D(0,0,r.width,r.height),{id:O(),inline:r.inline}),i.animations.push(new E(t,{size:r.width})),t.children.push(e),t):e}}),S(A,{VMLCircle:h,VMLClipAnimationDecorator:y,VMLClipRect:m,VMLFill:d,VMLGroup:g,VMLLine:u,VMLLinearGradient:_,VMLOverlayDecorator:e,VMLPath:c,VMLRadialGradient:b,VMLRing:p,VMLRotatedText:s,VMLSector:f,VMLStroke:l,VMLText:a,VMLView:K,blendColors:i,blendGradient:o})}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.ui.Widget,i=e.proxy,r=Math.abs,o=20,a=t.Class.extend({init:function(n,i,o){o=e.extend({minXDelta:30,maxYDelta:20,maxDuration:1e3},o),new t.UserEvents(n,{surface:o.surface,allowSelection:!0,start:function(e){2*r(e.x.velocity)>=r(e.y.velocity)&&e.sender.capture()},move:function(e){var t=e.touch,n=e.event.timeStamp-t.startTime,a=t.x.initialDelta>0?"right":"left";r(t.x.initialDelta)>=o.minXDelta&&r(t.y.initialDelta)n&&(i({direction:a,touch:t,target:t.target}),t.cancel())}})}}),s=n.extend({init:function(e,r){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;n.fn.init.call(s,e,r),r=s.options,e=s.element,s.events=new t.UserEvents(e,{filter:r.filter,surface:r.surface,multiTouch:r.multiTouch,allowSelection:!0,press:i(s,"_touchstart"),tap:i(s,"_tap"),gesturestart:a("gesturestart"),gesturechange:a("gesturechange"),gestureend:a("gestureend")}),r.enableSwipe?(s.events.bind("start",i(s,"_swipestart")),s.events.bind("move",i(s,"_swipemove"))):(s.events.bind("start",i(s,"_dragstart")),s.events.bind("move",o("drag")),s.events.bind("end",o("dragend"))),t.notify(s)},events:["touchstart","dragstart","drag","dragend","tap","doubletap","hold","swipe","gesturestart","gesturechange","gestureend"],options:{name:"Touch",surface:null,global:!1,multiTouch:!1,enableSwipe:!1,minXDelta:30,maxYDelta:20,maxDuration:1e3,minHold:800,doubleTapTimeout:800},_cancelHold:function(){clearTimeout(this.holdTimeout)},_triggerTouch:function(e,t){this.trigger(e,{touch:t.touch,event:t.event})},_touchstart:function(e){var t=this;t._triggerTouch("touchstart",e),t._cancelHold(),t.holdTimeout=setTimeout(function(){t._triggerTouch("hold",e)},t.options.minHold)},_tap:function(e){var n=this,i=n.lastTap,r=e.touch;n._cancelHold(),i&&r.endTime-i.endTimet.touchDelta(r,i).distance?(n._triggerTouch("doubletap",e),n.lastTap=null):(n._triggerTouch("tap",e),n.lastTap=r)},_dragstart:function(e){this._cancelHold(),this._triggerTouch("dragstart",e)},_swipestart:function(e){this._cancelHold(),2*r(e.x.velocity)>=r(e.y.velocity)&&e.sender.capture()},_swipemove:function(e){var t=this,n=t.options,i=e.touch,o=e.event.timeStamp-i.startTime,a=i.x.initialDelta>0?"right":"left";t._cancelHold(),r(i.x.initialDelta)>=n.minXDelta&&r(i.y.initialDelta)o&&(t.trigger("swipe",{direction:a,touch:e.touch}),i.cancel())}});window.jQuery.fn.kendoMobileSwipe=function(e,t){this.each(function(){new a(this,e,t)})},t.ui.plugin(s)}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.mobile,i=n.ui,r="show",o="hide",a="open",s="close",l='',d='',c='',u="km-up km-down km-left km-right",p=i.Widget,f={down:{origin:"bottom center",position:"top center"},up:{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"}},h={animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:400}}},g={horizontal:{offset:"top",size:"height"},vertical:{offset:"left",size:"width"}},m={up:"down",down:"up",left:"right",right:"left"},v=p.extend({init:function(i,r){var a,s=this,u=i.closest(".km-modalview-wrapper"),m=u[0]?u:n.application.element,v={viewport:n.application.element,open:function(){s.overlay.show()},activate:e.proxy(s._activate,s),deactivate:function(){s.overlay.hide(),s.trigger(o)}};p.fn.init.call(s,i,r),i=s.element,r=s.options,i.wrap(l).addClass("km-popup").show(),a=s.options.direction.match(/left|right/)?"horizontal":"vertical",s.dimensions=g[a],s.wrapper=i.parent().css({width:r.width,height:r.height}).addClass("km-popup-wrapper km-"+r.direction).hide(),s.arrow=e(d).prependTo(s.wrapper).hide(),s.overlay=e(c).appendTo(m).hide(),v.appendTo=s.overlay,s.popup=new t.ui.Popup(s.wrapper,e.extend(!0,v,h,f[r.direction]))},options:{name:"Popup",width:240,height:320,direction:"down"},events:[r,o],show:function(t){var n=this,i=n.popup;i.options.anchor=e(t),i.open()},target:function(){return this.popup.options.anchor},hide:function(){this.popup.close()},destroy:function(){p.fn.destroy.call(this),this.popup.destroy()},_activate:function(){var t=this,n=t.options.direction,i=t.dimensions,o=i.offset,a=t.popup,s=a.options.anchor,l=e(s).offset(),d=e(a.element).offset(),c=a.flipped?m[n]:n,p=l[o]-d[o]+e(s)[i.size]()/2;t.wrapper.removeClass(u).addClass("km-"+c),t.arrow.css(o,p).show(),t.trigger(r)}}),_=p.extend({init:function(n,r){var o,l=this;l.initialOpen=!1,p.fn.init.call(l,n,r),r=l.options,o=e.extend({show:function(){l.trigger(a,{target:l.popup.target()})},hide:function(){l.trigger(s)}},this.options.popup),l.popup=new v(l.element,o),l.pane=new i.Pane(l.element,this.options.pane),t.notify(l,i)},options:{name:"PopOver",popup:{},pane:{}},events:[a,s],open:function(e){this.openFor(e)},openFor:function(e){this.popup.show(e),this.initialOpen||(this.pane.navigate(""),this.initialOpen=!0)},close:function(){this.popup.hide()},destroy:function(){p.fn.destroy.call(this),this.pane.destroy(),this.popup.destroy(),t.destroy(this.element)}});i.plugin(v),i.plugin(_)}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.mobile.ui,i=n.Widget,r=e.map(t.eventMap,function(e){return e}).join(" ").split(" "),o=i.extend({init:function(t,n){var r=this,o=e('
');i.fn.init.call(r,o,n),r.container=t,r._attachCapture(),o.append(r.options.loading).hide().appendTo(t)},options:{name:"Loader",loading:"Loading... ",timeout:100},show:function(){var e=this;clearTimeout(e._loading),e.options.loading!==!1&&(e._loading=setTimeout(function(){e.element.show()},e.options.timeout))},hide:function(){var e=this;clearTimeout(e._loading),e.element.hide()},transition:function(){this.transitioning=!0,this.container.css("pointer-events","none")},transitionDone:function(){this.transitioning=!1,this.container.css("pointer-events","")},_attachCapture:function(){function e(e){n.transitioning&&e.stopPropagation()}var t,n=this;for(n.transitioning=!1,t=0;r.length>t;t++)n.container[0].addEventListener(r[t],e,!0)}});n.plugin(o)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.mobile.ui,r=n.ui.Popup,o='
',a=i.Widget,s=a.extend({init:function(t,i){var s=this,l=n.mobile.application,d=l?l.os.name:n.support.mobileOS.name,c="ios"===d||"wp"===d,u=i.align||(c?"bottom center":"center center"),p=i.position||(c?"bottom center":"center center"),f=i.effect||(c?"slideIn:up":"fade:in"),h=e(o).handler(s).hide();a.fn.init.call(s,t,i),s.shim=h,s.element=t,s.options.modal||s.shim.on("up","hide"),(l?l.element:e(document.body)).append(h),s.popup=new r(s.element,{anchor:h,appendTo:h,origin:u,position:p,animation:{open:{effects:f,duration:s.options.duration},close:{duration:s.options.duration}},deactivate:function(){h.hide()},open:function(){h.show()}}),n.notify(s)},options:{name:"Shim",modal:!0,align:t,position:t,effect:t,duration:200},show:function(){this.popup.open()},hide:function(t){t&&e.contains(this.shim[0],t.target)||this.popup.close()},destroy:function(){a.fn.destroy.call(this),this.shim.kendoDestroy(),this.popup.destroy()}});i.plugin(s)}(window.kendo.jQuery),function(e,t){function n(e){var t,n,i=e.find(b("popover")),r=l.roles;for(t=0,n=i.length;n>t;t++)a.initWidget(i[t],{},r)}function i(e,t){e[0]&&t[0]&&e[0]!=t[0]&&e.kendoAnimateTo(t,{effects:"fade"})}function r(t){t.each(function(){a.initWidget(e(this),{},l.roles)})}function o(e){for(var t=e.split("?")[1]||"",n={},i=t.split(/&|=/),r=i.length,o=0;r>o;o+=2)n[i[o]]=i[o+1];return n}var a=window.kendo,s=a.mobile,l=s.ui,d=a.attr,c=a.Class,u=l.Widget,p="init",f="show",h="beforeShow",g="afterShow",m="hide",v="z-index",_=a.attrValue,b=a.roleSelector,y=u.extend({init:function(t,n){var i=this;u.fn.init.call(i,t,n),t=i.element,i.params={},i.lastParams={},e.extend(i,n),i._layout(),i._scroller(),i._model()},events:[p,h,f,g,m],options:{name:"View",title:"",reload:!1,defaultTransition:"",useNativeScrolling:!1,stretch:!1,zoom:!1,model:null},destroy:function(){this.layout&&this.layout.detach(this),u.fn.destroy.call(this),this.scroller&&this.scroller.destroy(),a.destroy(this.element)},purge:function(){this.destroy(),this.element.remove()},showStart:function(){var e=this;e.element.css("display",""),e.inited||(e.inited=!0,e.trigger(p,{view:e})),e.layout&&e.layout.attach(e),e.trigger(f,{view:e})},hideStart:function(){var e=this;e.layout&&e.layout.detach(e)},hideComplete:function(){var e=this;e.element.hide(),e.trigger(m,{view:e})},updateParams:function(e){var t=this;t.trigger(h,{view:t})||(t.lastParams=t.params,t.params=e,t.trigger(f,{view:t}))},switchWith:function(e,t,n,i){var r=this,o=function(){r.trigger(g,{view:r}),i()};r.trigger(h,{view:r})||(r.lastParams=r.params,r.params=n,e?(e.hideStart(),r.showStart(),new w({current:e,next:r,transition:t,defaultTransition:e.options.defaultTransition,complete:o})):(r.showStart(),o()))},parallaxContents:function(e){var t=this,n=t.content;return e.header[0]||(n=n.add(t.header)),e.footer[0]||(n=n.add(t.footer)),n},contentElement:function(){var e=this;return e.options.stretch?e.content:e.scrollerContent},_scroller:function(){var t=this;t.options.stretch?t.content.addClass("km-stretched-view"):(t.content.kendoMobileScroller({zoom:t.options.zoom,useNative:t.options.useNativeScrolling}),t.scroller=t.content.data("kendoMobileScroller"),t.scrollerContent=t.scroller.scrollElement),a.support.kineticScrollNeeded&&e(t.element).on("touchmove",".km-header, .km-content",function(e){e.target.tagName.match(/textarea|input/i)||e.preventDefault()})},_model:function(){var e=this,t=e.element,i=e.options.model;"string"==typeof i&&(i=a.getter(i)(window)),e.model=i,n(t),i?a.bind(t.children(),i,l,a.ui,a.dataviz.ui):s.init(t.children())},_layout:function(){var e=this,t=b("content"),n=e.element;n.data("kendoView",e).addClass("km-view"),e.transition=_(n,"transition"),e.header=n.children(b("header")).addClass("km-header"),e.footer=n.children(b("footer")).addClass("km-footer"),n.children(t)[0]||n.wrapInner("
'),e.content=n.children(b("content")).addClass("km-content"),e.element.prepend(e.header).append(e.footer),e.id=_(n,"url")||"#"+n.attr("id"),e.layout&&e.layout.setup(e)}}),w=c.extend({init:function(t){e.extend(this,t);var n=this,r=n.current,o=n.next,a=r.element,s=o.element,l=o,d=r,c=n._transition();c.reverse&&!c.parallax&&(l=r,d=o),l.element.css(v,1),d.element.css(v,0),c.parallax&&(i(r.footer,o.footer),i(r.header,o.header),a=r.parallaxContents(o),s=o.parallaxContents(r)),a.kendoAnimateTo(s,c),n.back()||(r.nextViewID=o.id,r.backTransition=c.transition)},_transition:function(){var e=this,t=e.current,n=e.next,i=e.back(),r=function(){t.hideComplete(),e.complete()},o=i?n.backTransition:n.transition,a=e.transition||o||e.defaultTransition,s=a.split(" "),l=s[0],d=/^slide/.test(l),c="reverse"===s[1];return e.back()&&!e.transition&&(c=!c),{effects:l,reverse:c,parallax:d,complete:r,transition:a}},back:function(){var e=this.next,t=this.current;return e.nextViewID&&e.nextViewID===t.id&&JSON.stringify(e.params)===JSON.stringify(e.lastParams)}}),x=u.extend({init:function(e,t){var i=this;u.fn.init.call(i,e,t),e=i.element,i.element=e.detach(),i.header=e.children(b("header")).addClass("km-header"),i.footer=e.children(b("footer")).addClass("km-footer"),i.elements=i.header.add(i.footer),n(e),a.mobile.init(i.element.children()),i.trigger(p,{layout:i})},options:{name:"Layout"},events:[p,f,m],setup:function(e){e.header[0]||(e.header=this.header),e.footer[0]||(e.footer=this.footer)},detach:function(e){var t=this;e.header===t.header&&t.header[0]&&e.element.prepend(t.header.detach()[0].cloneNode(!0)),e.footer===t.footer&&t.footer.length&&e.element.append(t.footer.detach()[0].cloneNode(!0)),t.trigger(m,{layout:t,view:e})},attach:function(e){var t=this;e.header===t.header&&(t.header.detach(),e.element.children(b("header")).remove(),e.element.prepend(t.header)),e.footer===t.footer&&(t.footer.detach(),e.element.children(b("footer")).remove(),e.element.append(t.footer)),t.trigger(f,{layout:t,view:e})}}),k=a.Observable,C=/]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,T="loadStart",S="loadComplete",A="showStart",F="viewShow",D=k.extend({init:function(t){var n,i,o=this;if(k.fn.init.call(o),e.extend(o,t),o.sandbox=e("
"),i=o.container,n=o._hideViews(i),o.rootView=n.first(),!o.rootView[0])throw Error('Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.');o._view=null,o.layouts={},o._setupLayouts(i),r(i.children(b("modalview"))),o.loader&&(o.bind(A,function(){o.loader.transition()}),o.bind(T,function(){o.loader.show()}),o.bind(S,function(){o.loader.hide()}),o.bind(F,function(){o.loader.transitionDone()}))},view:function(){return this._view},showView:function(e,t){if(e!==this.url){this.trigger(A);var n=this,i=function(i){n._show(i,t,o(e))},r=n._findViewElement(e),a=r.data("kendoView");n.url=e,a&&a.reload&&(a.purge(),r=[]),this.trigger("viewTypeDetermined",{remote:0===r.length,url:e}),r[0]?(a||(a=n._createView(r)),i(a)):n._loadView(e,i)}},_findViewElement:function(e){var t,n=e.split("?")[0];return e&&"/"!==e?(t=this.container.children("["+d("url")+"='"+n+"']"),t[0]||-1!==n.indexOf("/")||(t=this.container.children("#"===n.charAt(0)?n:"#"+n)),t):this.rootView},_createView:function(e){var n,i=this,r=_(e,"layout");return r===t&&(r=i.layout),r&&(r=i.layouts[r]),n={defaultTransition:i.transition,loader:i.loader,container:i.container,layout:r,reload:_(e,"reload")},a.initWidget(e,n,l.roles)},_loadView:function(n,i){var r=this;return this.serverNavigation?(location.href=n,t):(r._xhr&&r._xhr.abort(),r.trigger(T),r._xhr=e.get(n,function(e){r.trigger(S),i(r._createRemoteView(n,e))},"html").fail(function(e){r.trigger(S),0===e.status&&e.responseText&&i(r._createRemoteView(n,e.responseText))}),t)},_createRemoteView:function(e,t){var n,i,o,a=this,s=a.sandbox,l=e.split("?")[0],c=a.container;return C.test(t)&&(t=RegExp.$1),s[0].innerHTML=t,c.append(s.children("script, style")),n=a._hideViews(s),o=n.first(),o.length||(n=o=s.wrapInner("
").children()),o.hide().attr(d("url"),l),a._setupLayouts(s),i=s.children(b("modalview")),c.append(s.children(b("layout modalview")).add(n)),r(i),a._createView(o)},_show:function(e,t,n){var i=this;i._view!==e?e.switchWith(i._view,t,n,function(){i._view=e,i.trigger(F,{view:e})}):(i._view.updateParams(n),i.trigger(F,{view:e}))},_hideViews:function(e){return e.children(b("view splitview")).hide()},_setupLayouts:function(n){var i=this;n.children(b("layout")).each(function(){var n=e(this),r=_(n,"platform");(r===t||r===s.application.os.name)&&(i.layouts[a.attrValue(n,"id")]=a.initWidget(n,{},l.roles))})}});a.mobile.ViewEngine=D,l.plugin(y),l.plugin(x)}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.mobile.ui,i=n.Shim,r=n.Widget,o="open",a="close",s="init",l='
',d=n.View.extend({init:function(e,n){var o,a,d=this;r.fn.init.call(d,e,n),e=d.element,n=d.options,o=e[0].style.width||e.css("width"),a=e[0].style.height||e.css("height"),e.addClass("km-modalview").wrap(l),d.wrapper=e.parent().css({width:n.width||o||300,height:n.height||a||300}),e.css({width:"",height:""}),d.shim=new i(d.wrapper,{modal:n.modal,position:"center center",align:"center center",effect:"fade:in"}),d._layout(),d._scroller(),d._model(),d.trigger(s),t.onResize(function(){var e=d.wrapper.parent(),t=e.parent();e.css({top:(t.height()-e.height())/2+"px",left:(t.width()-e.width())/2+"px"})})},events:[s,o,a],options:{name:"ModalView",modal:!0,width:null,height:null},destroy:function(){r.fn.destroy.call(this),this.shim.destroy()},open:function(t){var n=this;n.target=e(t),n.shim.show(),n.trigger("show",{view:n})},openFor:function(e){this.open(e),this.trigger(o,{target:e})},close:function(){this.shim.hide(),this.trigger(a)}});n.plugin(d)}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.mobile.ui,i=n.Widget,r=n.View,o=r.extend({init:function(r,o){var a=this;i.fn.init.call(a,r,o),r=a.element,e.extend(a,o),a._layout(),a._style(),t.mobile.init(r.children(t.roleSelector("modalview"))),a.panes=[],a.element.children(t.roleSelector("pane")).each(function(){a.panes.push(t.initWidget(this,{},n.roles))})},options:{name:"SplitView",style:"horizontal"},_layout:function(){var n=this,i=n.element;i.data("kendoView",n).addClass("km-view km-splitview"),n.transition=t.attrValue(i,"transition"),e.extend(n,{header:[],footer:[],content:i})},_style:function(){var t,n=this.options.style,i=this.element;n&&(t=n.split(" "),e.each(t,function(){i.addClass("km-split-"+this)}))},showStart:function(){var t=this;t.element.css("display",""),t.inited||(t.inited=!0,e.each(t.panes,function(){this.navigate("")}),t.trigger("init",{view:t})),t.trigger("show",{view:t})}});n.plugin(o)}(window.kendo.jQuery),function(e,t){function n(t){v(e(t.currentTarget),"rel")!=c&&t.preventDefault()}var i=window.kendo,r=i.mobile,o=i.roleSelector,a=r.ui,s=a.Widget,l=r.ViewEngine,d=r.ui.Loader,c="external",u="href",p="#!",f="navigate",h="viewShow",g=/popover|actionsheet|modalview/,m="#:back",v=i.attrValue,_="button backbutton detailbutton listview-link",b="tab",y=s.extend({init:function(e,t){var n,i=this;s.fn.init.call(i,e,t),e=i.element,e.addClass("km-pane"),i.history=[],i.loader=new d(e,{loading:i.options.loading}),i.viewEngine=new l({container:e,transition:i.options.transition,serverNavigation:i.options.serverNavigation,layout:i.options.layout,loader:i.loader}),i.viewEngine.bind(h,function(e){i.trigger(h,e)}),i.viewEngine.bind("viewTypeDetermined",function(e){e.remote&&i.options.serverNavigation||i.trigger(f,{url:e.url})}),n=i.options.initial,n&&i.navigate(n),i._setupAppLinks()},options:{name:"Pane",transition:"",layout:"",initial:t,loading:t},events:[f,h],destroy:function(){s.fn.destroy.call(this),i.destroy(this.element)},navigate:function(e,t){var n=this,i=n.history;e===m?(i.pop(),e=i[i.length-1]):n.history.push(e),n.viewEngine.showView(e,t)},hideLoading:function(){this.loader.hide()},showLoading:function(){this.loader.show()},view:function(){return this.viewEngine.view()},_setupAppLinks:function(){this.element.handler(this).on("down",o(b),"_mouseup").on("up",o(_),"_mouseup").on("click",o(b+" "+_),n)},_mouseup:function(n){if(!(n.which>1||n.isDefaultPrevented())){var o=e(n.currentTarget),s=v(o,"transition"),l=v(o,"rel")||"",d=v(o,"target"),f=this,h=o.attr(u);l!==c&&h!==t&&h!==p&&(o.attr(u,p),setTimeout(function(){o.attr(u,h)}),l.match(g)?(i.widgetInstance(e(h),a).openFor(o),n.stopPropagation()):("_top"===d?f=r.application.pane:d&&(f=e("#"+d).data("kendoMobilePane")),f.navigate(h,s)),n.preventDefault())}}});a.plugin(y)}(window.kendo.jQuery),function(e,t){function n(e){var t=[];return t.push("km-"+e.name),u&&t.push("km-on-"+u.name),t.push("km-"+e.name+e.majorVersion),t.push("km-"+e.majorVersion),t.push("km-m"+(e.minorVersion?e.minorVersion[0]:0)),e.appMode?t.push("km-app"):t.push("km-web"),t.join(" ")}function i(e){return u.wp?"-kendo-landscape"==e.css("animation-name"):1==Math.abs(window.orientation)/90}function r(e){return i(e)?h:f}function o(){e("meta[name=viewport]").remove(),k.append(m({height:", width=device-width"+(i()?", height="+window.innerHeight+"px":l.mobileOS.flatVersion>=600&&700>l.mobileOS.flatVersion?", height="+window.innerWidth+"px":", height=device-height")}))}var a=window.kendo,s=a.mobile,l=a.support,d=s.ui.Pane,c="ios",u=l.mobileOS,p="blackberry"==u.device&&u.flatVersion>=600&&1e3>u.flatVersion&&u.appMode,f="km-vertical",h="km-horizontal",g={ios:{ios:!0,appMode:!1,browser:"default",device:"iphone",flatVersion:"612",majorVersion:"6",minorVersion:"1.2",name:"ios",tablet:!1},android:{android:!0,appMode:!1,browser:"default",device:"android",flatVersion:"233",majorVersion:"2",minorVersion:"3.3",name:"android",tablet:!1},blackberry:{blackberry:!0,appMode:!1,browser:"default",device:"blackberry",flatVersion:"710",majorVersion:"7",minorVersion:"1.0",name:"blackberry",tablet:!1},meego:{meego:!0,appMode:!1,browser:"default",device:"meego",flatVersion:"850",majorVersion:"8",minorVersion:"5.0",name:"meego",tablet:!1},wp:{wp:!0,appMode:!1,browser:"default",device:"wp",flatVersion:"800",majorVersion:"8",minorVersion:"0.0",name:"wp",tablet:!1}},m=a.template(' ',{usedWithBlock:!1}),v=' ',_=m({height:""}),b=a.template(' ',{usedWithBlock:!1}),y=("iphone"==u.device||"ipod"==u.device)&&"mobilesafari"==u.browser,w=60,x=e(window),k=e("head"),C=e.proxy,T=a.Observable.extend({init:function(t,n){var i=this;s.application=i,i.options=e.extend({hideAddressBar:!0,transition:"",updateDocumentTitle:!0},n),a.Observable.fn.init.call(i,i.options),e(function(){i.element=e(t?t:document.body),i._setupPlatform(),i._setupElementClass(),i._attachHideBarHandlers(),i.pane=new d(i.element,i.options),i._attachMeta(),i.options.updateDocumentTitle&&i._setupDocumentTitle(),i._startHistory()})},navigate:function(e,t){this.pane.navigate(e,t)},scroller:function(){return this.view().scroller},hideLoading:function(){this.pane.hideLoading()},showLoading:function(){this.pane.showLoading()},view:function(){return this.pane.view()},_setupPlatform:function(){var t,i=this,r=i.options.platform,o=u||g[c];r&&(o="string"==typeof r?g[r]:r),i.os=o,i.osCssClass=n(i.os),"wp"==o.name&&(t=C(i._setupWP8Theme,i),e(window).on("focusin",t),document.addEventListener("resume",t),i._setupWP8Theme())},_setupWP8Theme:function(){var t,n=this,i=e(n.element);n._bgColorDiv||(n._bgColorDiv=e("
").css({background:"Background",visibility:"hidden",position:"absolute",top:"-3333px"}).appendTo(document.body)),t=parseInt(n._bgColorDiv.css("background-color").split(",")[1],10),i.removeClass("km-wp-dark km-wp-light"),0===t?i.addClass("km-wp-dark"):i.addClass("km-wp-light"),i.parent().css("overflow","hidden")},_startHistory:function(){var e=this,t=e.options.initial,n=new a.Router({init:function(e){var i=e.url;"/"===i&&t&&(n.navigate(t,!0),e.preventDefault())},routeMissing:function(t){e.pane.navigate(t.url)}});e.pane.bind("navigate",function(e){n.navigate(e.url,!0)}),n.start(),e.router=n},_setupElementClass:function(){var e=this,t=e.element;t.parent().addClass("km-root km-"+(e.os.tablet?"tablet":"phone")),t.addClass(e.osCssClass+" "+r(t)),l.wpDevicePixelRatio&&t.parent().css("font-size",l.wpDevicePixelRatio+"em"),p&&o(),a.onResize(function(){t.removeClass("km-horizontal km-vertical").addClass(r(t)),p&&o()})},_attachMeta:function(){var e,t=this.options.icon;if(p||k.prepend(_),k.prepend(v),t){"string"==typeof t&&(t={"":t});for(e in t)k.prepend(b({icon:t[e],size:e}))}},_attachHideBarHandlers:function(){var e=this,t=C(e._hideBar,e);!l.mobileOS.appMode&&e.options.hideAddressBar&&(e._initialHeight={},y&&(x.on("load",t),a.onResize(t),e.element[0].addEventListener("touchstart",t,!0)))},_setupDocumentTitle:function(){var e=this,n=document.title;e.pane.bind("viewShow",function(e){var i=e.view.title;document.title=i!==t?i:n})},_hideBar:function(){var e,t=this,n=t.element,i=window.orientation+"",r=t._initialHeight;r[i]||(r[i]=x.height()),e=r[i]+w,e!=n.height()&&n.height(e),setTimeout(window.scrollTo,0,0,1)}});a.mobile.Application=T}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.support,i=t.mobile.ui,r=i.Shim,o=i.Popup,a=i.Widget,s="open",l="li>a",d="actionsheetContext",c='
',u=t.template('#:cancel# '),p=a.extend({init:function(s,d){var p=this,f=n.mobileOS,h=f.tablet?o:r;a.fn.init.call(p,s,d),s=p.element,s.addClass("km-actionsheet").append(u({cancel:p.options.cancel})).wrap(c).on("up",l,"_click").on("click",l,t.preventDefault),p.wrapper=s.parent(),p.shim=new h(p.wrapper,e.extend({modal:!(f.android||f.meego||f.wp)},p.options.popup)),t.notify(p,i),t.onResize(e.proxy(this,"_resize"))},events:[s],options:{name:"ActionSheet",cancel:"Cancel",popup:{height:"auto"}},open:function(t,n){var i=this;i.target=e(t),i.context=n,i.shim.show(t)},close:function(){this.context=this.target=null,this.shim.hide()},openFor:function(e){var t=this,n=e.data(d);t.open(e,n),t.trigger(s,{target:e,context:n})},destroy:function(){a.fn.destroy.call(this),this.shim.destroy()},_click:function(n){if(!n.isDefaultPrevented()){var i=e(n.currentTarget).data("action");i&&t.getter(i)(window)({target:this.target,context:this.context}),n.preventDefault(),this.close()}},_resize:function(){if(n.mobileOS.tablet)this.shim.hide();else{var e=this.wrapper.parent(),t=e.parent();e.css({top:t.height()-e.height()+"px",width:t.width()+"px"})}}});i.plugin(p)}(window.kendo.jQuery),function(e){function t(t,n,i){e(n.target).closest(".km-button,.km-detail").toggleClass("km-state-active",i),d&&t.deactivateTimeoutID&&(clearTimeout(t.deactivateTimeoutID),t.deactivateTimeoutID=0)}function n(t){return e(''+t+" ")}var i=window.kendo,r=i.mobile,o=r.ui,a=o.Widget,s=i.support,l=s.mobileOS,d=l.android&&l.flatVersion>=300,c="click",u=a.extend({init:function(e,n){var r=this;a.fn.init.call(r,e,n),r._wrap(),r._style(),r._userEvents=new i.UserEvents(r.element,{press:function(e){r._activate(e)},tap:function(e){r._release(e)},end:function(e){t(r,e,!1)}}),d&&r.element.on("move","_timeoutDeactivate")},destroy:function(){a.fn.destroy.call(this),this._userEvents.destroy()},events:[c],options:{name:"Button",icon:"",style:"",badge:""},badge:function(e){var t=this.badgeElement=this.badgeElement||n(e).appendTo(this.element);return e?(t.html(e),this):e===!1?(t.empty().remove(),this.badgeElement=!1,this):t.html()},_timeoutDeactivate:function(e){this.deactivateTimeoutID||(this.deactivateTimeoutID=setTimeout(t,500,this,e,!1))},_activate:function(e){var n=document.activeElement,i=n?n.nodeName:"";t(this,e,!0),("INPUT"==i||"TEXTAREA"==i)&&n.blur()},_release:function(t){var n=this;t.which>1||n.trigger(c,{target:e(t.target),button:n.element})&&t.preventDefault()},_style:function(){var t,n=this.options.style,i=this.element;n&&(t=n.split(" "),e.each(t,function(){i.addClass("km-"+this)}))},_wrap:function(){var t=this,i=t.options.icon,r=t.options.badge,o=' ').children("span.km-text")),!l[0]&&i&&(s[0]||(o+=" km-notext"),t.iconElement=a.prepend(e(o+'" />'))),r&&(t.badgeElement=n(r).appendTo(a))}}),p=u.extend({options:{name:"BackButton",style:"back"},init:function(e,t){var n=this;u.fn.init.call(n,e,t),n.element.attr("href")===undefined&&n.element.attr("href","#:back")}}),f=u.extend({options:{name:"DetailButton",style:""},init:function(e,t){u.fn.init.call(this,e,t)},_style:function(){var t,n=this.options.style+" detail",i=this.element;n&&(t=n.split(" "),e.each(t,function(){i.addClass("km-"+this)}))},_wrap:function(){var t=this,n=t.options.icon,i=' ')))}});o.plugin(u),o.plugin(p),o.plugin(f)}(window.kendo.jQuery),function(e,t){function n(t){return e(''+t+" ")}var i=window.kendo,r=i.mobile.ui,o=r.Widget,a="km-state-active",s="select",l="li:not(."+a+")",d=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,e,t),n.element.addClass("km-buttongroup").find("li").each(n._button),n.element.on(n.options.selectOn,l,"_select"),n.select(n.options.index)},events:[s],options:{name:"ButtonGroup",selectOn:"down",index:-1},current:function(){return this.element.find("."+a)},select:function(n){var i=this,r=-1;n!==t&&-1!==n&&(i.current().removeClass(a),"number"==typeof n?(r=n,n=e(i.element[0].children[n])):n.nodeType&&(n=e(n),r=n.index()),n.addClass(a),i.selectedIndex=r)},badge:function(t,i){var r,o=this.element;return isNaN(t)||(t=o.children().get(t)),t=o.find(t),r=e(t.children(".km-badge")[0]||n(i).appendTo(t)),i?(r.html(i),this):i===!1?(r.empty().remove(),this):r.html()},_button:function(){var t=e(this).addClass("km-button"),r=i.attrValue(t,"icon"),o=i.attrValue(t,"badge"),a=t.children("span"),s=t.find("img").addClass("km-image");a[0]||(a=t.wrapInner(" ").children("span")),a.addClass("km-text"),!s[0]&&r&&t.prepend(e(' ')),o&&n(o).appendTo(t)},_select:function(e){if(!(e.which>1||e.isDefaultPrevented())){var t=this;t.select(e.currentTarget),t.trigger(s)}}});r.plugin(d)}(window.kendo.jQuery),function(e){function t(){return this.nodeType===s.TEXT_NODE&&this.nodeValue.match(F)}function n(e,t){t&&e.prepend(' ')}function i(e){n(e,g(e,"icon"))}function r(e){var i=e.parent(),r=e.add(i.children(a.roleSelector("detailbutton"))),o=i.contents().not(r).not(t);o.length||(e.addClass("km-listview-link").attr(a.attr("role"),"listview-link"),n(e,g(i,"icon")))}function o(e){if(e.children("input[type=checkbox],input[type=radio]").length){var t=e.parent();
t.contents().not(e).not(function(){return 3==this.nodeType})[0]||e.addClass("km-listview-label")}}var a=window.kendo,s=window.Node,l=a.mobile,d=l.ui,c=a.data.DataSource,u=d.Widget,p=".km-list > li, > li:not(.km-group-container)",f=".km-listview-link, .km-listview-label",h=e.proxy,g=a.attrValue,m="km-group-title",v="km-state-active",_='',b=a.template('#= this.headerTemplate(data) #
#= kendo.render(this.template, data.items)# '),y='
',w=a.template(''),x=".kendoMobileListView",k="lastPageReached",C="click",T="change",S="progress",A="function",F=/^\s+$/,D=/button/,I=u.extend({init:function(e,t){var n=this;u.fn.init.call(n,e,t),e=n.element,t=n.options,t.scrollTreshold&&(t.scrollThreshold=t.scrollTreshold),e.on("down",f,"_highlight").on("move up cancel",f,"_dim"),n._userEvents=new a.UserEvents(e,{filter:p,allowSelection:!0,tap:function(e){n._click(e)}}),e.css("-ms-touch-action","auto"),e.wrap(y),n.wrapper=n.element.parent(),n._footer(),n._dataSource(),n._bindScroller(),n._fixHeaders(),n._filterable(),t.dataSource&&n.options.autoBind?n.dataSource.fetch():n._style(),a.notify(n,d)},events:[C,"dataBound",k],options:{name:"ListView",style:"",type:"flat",autoBind:!0,fixedHeaders:!1,template:"#:data#",headerTemplate:'#:value# ',appendOnRefresh:!1,loadMore:!1,loadMoreText:"Press to load more",endlessScroll:!1,scrollThreshold:30,pullToRefresh:!1,pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing",pullOffset:140,filterable:!1},setOptions:function(e){u.fn.setOptions.call(this,e)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},destroy:function(){var e=this;u.fn.destroy.call(e),e._unbindDataSource(),e.stopEndlessScrolling(),e.stopLoadMore(),a.destroy(e.element),e._userEvents.destroy()},refresh:function(t){t=t||{};var n,i,r,o,s,c=this,u=c.element,p=c.options,f=c.dataSource,h=f.view(),g=c.loading,m="html",v=t.action,_=t.items,b=0;if("itemchange"===v)return o=_[0],s=e(c.template(o)),u.find("[data-"+a.ns+"uid="+o.uid+"]").replaceWith(s),c.trigger("itemChange",{item:s,data:o,ns:d}),c._style(),undefined;if("add"===v){for(r=_.length;r>b;b++)s=e(c.template(_[b])),s.appendTo(u),l.init(s);return c._style(),undefined}if("remove"!==v)c.template||c._templates(),c._cacheDataItems(h),c.trigger("dataBinding"),i=f.group(),i&&i[0]?(p.type="group",n=a.render(c.groupTemplate,h)):n=a.render(c.template,h),g?m="append":p.appendOnRefresh&&!c._filter&&(m="prepend"),c._filter=!1,n=e(n),u[m](n),l.init(n),g&&(c.loading=!1,c._calcThreshold(),c._toggleLoader(!1)),p.pullToRefresh&&c._scroller().pullHandled(),c._hideLoading(),c._shouldFixHeaders(),c._style(),c._invalidateLoadMore(),c.trigger("dataBound",{ns:d});else for(r=_.length;r>b;b++)u.find("[data-"+a.ns+"uid="+_[b].uid+"]").remove()},_invalidateLoadMore:function(){var e=this,t=e.options,n=e.dataSource,i=e._stopLoadMore&&(!n.total()||n.page()1)){var i=e(t.currentTarget),r=i.parent(),o=g(i,"role")||"",a=!o.match(D),s=t.isDefaultPrevented();a&&r.toggleClass(v,n&&!s)}},_unbindDataSource:function(){var e=this;e.dataSource.unbind(T,e._refreshHandler).unbind(S,e._progressHandler)},_dataSource:function(){var e=this,t=e.options;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=h(e.refresh,e),e._progressHandler=h(e._showLoading,e)),e.dataSource=c.create(t.dataSource).bind(T,e._refreshHandler),t.pullToRefresh||t.loadMore||t.endlessScroll||e.dataSource.bind(S,e._progressHandler)},_fixHeader:function(t){if(this.fixedHeaders){var n,i,r,o=0,a=this,s=a._scroller(),l=t.scrollTop,d=a.headers;do{if(n=d[o++],!n){r=e("
");break}i=n.offset,r=n.header}while(i>l);a.currentHeader!=o&&(s.fixedContainer.html(r.clone()),a.currentHeader=o)}},_shouldFixHeaders:function(){this.fixedHeaders="group"===this.options.type&&this.options.fixedHeaders},_cacheHeaders:function(){var t=this,n=[];t.fixedHeaders&&(t.element.find("."+m).each(function(t,i){i=e(i),n.unshift({offset:i.position().top,header:i})}),t.headers=n,t._fixHeader({scrollTop:0}))},_fixHeaders:function(){var e=this,t=e._scroller(),n=function(){e._cacheHeaders()};e._shouldFixHeaders(),e.container().bind("show",n),t&&(a.onResize(n),t.bind("scroll",function(t){e._fixHeader(t)}))},_bindScroller:function(){var e=this,t=e.options,n=e._scroller();n&&(t.pullToRefresh&&n.setOptions({pullToRefresh:!0,pull:function(){var n=t.pullParameters,i={page:1};n&&(i=n.call(e,e._first)),e._pulled=!0,e.dataSource.read(i)},pullTemplate:t.pullTemplate,releaseTemplate:t.releaseTemplate,refreshTemplate:t.refreshTemplate}),t.endlessScroll&&(e._scrollHeight=n.element.height(),e._scrollerResize=function(){e._scrollHeight=n.element.height(),e._calcThreshold()},e._scrollerScroll=function(t){!e.loading&&t.scrollTop+e._scrollHeight>e._threshold&&e._nextPage()},e.initEndlessScrolling()))},_calcThreshold:function(){var e=this,t=e._scroller();t&&(e._threshold=t.scrollHeight()-e.options.scrollThreshold)},_nextPage:function(){var e,t=this,n=t.options,i=n.endlessScrollParameters||n.loadMoreParameters;t.loading=!0,t._toggleLoader(!0),i&&(e=i.call(t,t._firstOrigin,t._last)),t.dataSource.next(e)||(t.stopLoadMore(),t.stopEndlessScrolling())},_templates:function(){var e=this,t=e.options.template,n=e.options.headerTemplate,i=' data-uid="#=data.uid || ""#"',r={},o={};typeof t===A&&(r.template=t,t="#=this.template(data)#"),o.template=e.template=h(a.template(""+t+" "),r),typeof n===A&&(o._headerTemplate=n,n="#=this._headerTemplate(data)#"),o.headerTemplate=a.template(n),e.groupTemplate=h(b,o)},_click:function(t){if(!(t.event.which>1||t.isDefaultPrevented())){var n,i=this,r=t.target,o=e(t.event.target),s=o.closest(a.roleSelector("button","detailbutton","backbutton")),l=a.widgetInstance(s,d),c=r.attr(a.attr("uid"));c&&(n=i.dataSource.getByUid(c)),i.trigger(C,{target:o,item:r,dataItem:n,button:l})&&t.preventDefault()}},_style:function(){var t=this,n=t.options,i="group"===n.type,r=t.element,o="inset"===n.style;r.addClass("km-listview").toggleClass("km-list",!i).toggleClass("km-listinset",!i&&o).toggleClass("km-listgroup",i&&!o).toggleClass("km-listgroupinset",i&&o),i&&(r.children().children("ul").addClass("km-list"),r.children("li").each(function(){var t=e(this),n=t.contents().first();t.addClass("km-group-container"),n.is("ul")||n.is("div."+m)||n.wrap(_)})),t._enhanceItems(),r.parents(".km-listview")[0]||r.closest(".km-content").toggleClass("km-insetcontent",o),t._cacheHeaders()},_enhanceItems:function(){this.items().each(function(){var t,n=e(this),a=!1;n.children().each(function(){t=e(this),t.is("a")?(r(t),a=!0):t.is("label")&&(o(t),a=!0)}),a||i(n)})},_footer:function(){var t,n=this,i=n.options,r=i.loadMore;(r||i.endlessScroll)&&(n._loadIcon=e(' '),t=e(' ').append(n._loadIcon),r&&(n._loadButton=e(''+i.loadMoreText+" "),n.initLoadMore(),t.append(n._loadButton)),n.wrapper.append(t))},_toggleLoader:function(e){var t=this,n=t._loadIcon,i=t._loadButton;i&&i.toggle(!e),e?(n.parent().addClass("km-scroller-refresh"),n.css("display","block")):(n.hide(),n.parent().removeClass("km-scroller-refresh"))},_scroller:function(){var e,t=this;return t._scrollerInstance||(e=t.view(),t._scrollerInstance=e&&e.scroller),t._scrollerInstance},_showLoading:function(){var e=this.view();e&&e.loader&&e.loader.show()},_hideLoading:function(){var e=this.view();e&&e.loader&&e.loader.hide()},_filterable:function(){var e=this,t=e.options.filterable,n="change paste";t&&(e.element.before(w({placeholder:t.placeholder||"Search..."})),t.autoFilter!==!1&&(n+=" keyup"),e.searchInput=e.wrapper.find("input[type=search]").closest("form").on("submit"+x,function(e){e.preventDefault()}).end().on("focus"+x,function(){e._oldFilter=e.searchInput.val()}).on(n.split(" ").join(x+" ")+x,h(e._filterChange,e)),e.clearButton=e.wrapper.find(".km-filter-reset").on(C,h(e._clearFilter,e)).hide())},_search:function(e){this._filter=!0,this.clearButton[e?"show":"hide"](),this.dataSource.filter(e)},_filterChange:function(e){var t=this;"paste"==e.type&&t.options.filterable.autoFilter!==!1?setTimeout(function(){t._applyFilter()},1):t._applyFilter()},_applyFilter:function(){var e=this,t=e.options.filterable,n=e.searchInput.val(),i=n.length?{field:t.field,operator:t.operator||"startsWith",ignoreCase:t.ignoreCase,value:n}:null;n!==e._oldFilter&&(e._oldFilter=n,e._search(i))},_clearFilter:function(e){this.searchInput.val(""),this._search(null),e.preventDefault()}});d.plugin(I)}(window.kendo.jQuery),function(e){function t(t,n){var r=n.find("["+i.attr("align")+"="+t+"]");return r[0]?e('
').append(r).prependTo(n):undefined}function n(t){var n=t.siblings(),i=!!t.children("ul")[0];t.prevAll().toggleClass("km-absolute",i),t.toggleClass("km-show-title",!!n[0]&&""===e.trim(t.text())),t.toggleClass("km-no-title",i),t.toggleClass("km-hide-title","hidden"==t.css("visibility")&&!n.children().is(":visible"))}var i=window.kendo,r=i.mobile,o=r.ui,a=i.roleSelector,s=o.Widget,l=s.extend({init:function(n,i){var r=this;s.fn.init.call(r,n,i),n=r.element,r.container().bind("show",e.proxy(this,"refresh")),n.addClass("km-navbar").wrapInner(e('
')),r.leftElement=t("left",n),r.rightElement=t("right",n),r.centerElement=n.find(".km-view-title")},options:{name:"NavBar"},title:function(e){this.element.find(a("view-title")).text(e),n(this.centerElement)},refresh:function(e){var t=e.view;t.options.title?this.title(t.options.title):n(this.centerElement)},destroy:function(){s.fn.destroy.call(this),i.destroy(this.element)}});o.plugin(l)}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.mobile,i=n.ui,r=e.proxy,o=t.effects.Transition,a=t.ui.Pane,s=t.ui.PaneDimensions,l=i.Widget,d=Math,c=d.abs,u=d.ceil,p=d.round,f=d.max,h=d.min,g=d.floor,m="change",v="changing",_="km-current-page",b=l.extend({init:function(n,i){var d,u,p,f,h,g,v=this;l.fn.init.call(v,n,i),n=v.element,n.wrapInner("
").addClass("km-scrollview").append(' '),v.inner=n.children().first(),v.pager=n.children().last(),v.page=0,v.inner.css("height",v.options.contentHeight),v.container().bind("show",e.proxy(this,"viewShow")).bind("init",e.proxy(this,"viewInit")),d=new t.ui.Movable(v.inner),u=new o({axis:"x",movable:d,onEnd:r(v._transitionEnd,v)}),p=new t.UserEvents(n,{start:function(e){2*c(e.x.velocity)>=c(e.y.velocity)?p.capture():p.cancel(),u.cancel()},allowSelection:!0,end:r(v._dragEnd,v)}),f=new s({element:v.inner,container:v.element}),h=f.x,h.bind(m,r(v.refresh,v)),g=new a({dimensions:f,userEvents:p,movable:d,elastic:!0}),e.extend(v,{movable:d,transition:u,userEvents:p,dimensions:f,dimension:h,pane:g}),v.page=v.options.page},options:{name:"ScrollView",page:0,duration:300,velocityThreshold:.8,contentHeight:"auto",pageSize:1,bounceVelocityThreshold:1.6},events:[v,m],destroy:function(){l.fn.destroy.call(this),this.userEvents.destroy(),t.destroy(this.element)},viewInit:function(){this.movable.moveAxis("x",-this.page*this.dimension.getSize())},viewShow:function(){this.dimensions.refresh()},refresh:function(){var e,t,n=this,i="",r=n.dimension,o=r.getSize(),a=n.element.find("[data-role=page]");for(a.width(o),r.update(!0),a[0]||(n.page=Math.floor(-n.movable.x/o)),n.scrollTo(n.page,!0),e=n.pages=u(r.getTotal()/o),n.minSnap=-(e-1)*o,n.maxSnap=0,t=0;e>t;t++)i+=" ";n.pager.html(i),n._updatePager()},content:function(e){this.element.children().first().html(e),this.dimensions.refresh()},scrollTo:function(e,t){this.page=e,this._moveTo(-e*this.dimension.getSize(),o.easeOutExpo,t)},_moveTo:function(e,t,n){this.transition.moveTo({location:e,duration:n?1:this.options.duration,ease:t})},_dragEnd:function(e){var t,n=this,i=e.x.velocity,r=n.dimension.size*n.options.pageSize,a=n.options,s=a.velocityThreshold,l=p,d=o.easeOutExpo;i>s?l=u:-s>i&&(l=g),c(i)>a.bounceVelocityThreshold&&(d=o.easeOutBack),t=f(n.minSnap,h(l(n.movable.x/r)*r,n.maxSnap)),this.trigger(v,{currentPage:n.page})&&(t=-n.page*n.dimension.getSize()),this._moveTo(t,d)},_transitionEnd:function(){var e=this,t=Math.round(-e.movable.x/e.dimension.size);t!=e.page&&(e.page=t,e.trigger(m,{page:t}),e._updatePager())},_updatePager:function(){this.pager.children().removeClass(_).eq(this.page).addClass(_)}});i.plugin(b)}(window.kendo.jQuery),function(e,t){function n(e,t,n){return Math.max(t,Math.min(n,e))}var i=window.kendo,r=i.mobile.ui,o=r.Widget,a=i.support,s="change",l="km-switch-on",d="km-switch-off",c="margin-left",u="km-state-active",p=a.transitions.css+"transform",f=e.proxy,h=o.extend({init:function(t,n){var r,a=this;o.fn.init.call(a,t,n),a._wrapper(),a._drag(),a._background(),a.origin=parseInt(a.background.css(c),10),a._handle(),a.constrain=0,a.snapPoint=0,a.container().bind("show",e.proxy(this,"refresh")),t=a.element[0],t.type="checkbox",a._animateBackground=!0,r=a.options.checked,null===r&&(r=t.checked),a.check(r),a.refresh(),i.notify(a,i.mobile.ui)},refresh:function(){var e,t,n=this;e=n.wrapper.width(),t=n.handle.outerWidth(!0),n.constrain=e-t,n.snapPoint=e/2-t/2,n.background.data("origin",n.origin),n.check(n.element[0].checked)},events:[s],options:{name:"Switch",onLabel:"ON",offLabel:"OFF",checked:null},check:function(e){var n=this,i=n.element[0];return e===t?i.checked:(n._position(e?n.constrain:0),i.checked=e,n.wrapper.toggleClass(l,e).toggleClass(d,!e),t)},destroy:function(){o.fn.destroy.call(this),this.userEvents.destroy()},toggle:function(){var e=this;e.check(!e.element[0].checked)},_move:function(e){var t=this;e.preventDefault(),t._position(n(t.position+e.x.delta,0,t.constrain))},_position:function(e){var t=this;t.position=e,t.handle.css(p,"translatex("+e+"px)"),t._animateBackground&&t.background.css(c,t.origin+e)},_start:function(){this.userEvents.capture(),this.handle.addClass(u)},_stop:function(){var e=this;e.handle.removeClass(u),e._toggle(e.position>e.snapPoint)},_toggle:function(e){var t,n=this,r=n.handle,o=n.element[0],a=o.checked,c=i.mobile.application&&i.mobile.application.os.wp?100:200;n.wrapper.toggleClass(l,e).toggleClass(d,!e),n.position=t=e*n.constrain,n._animateBackground&&n.background.kendoStop(!0,!0).kendoAnimate({effects:"slideMargin",offset:t,reset:!0,reverse:!e,axis:"left",duration:c}),r.kendoStop(!0,!0).kendoAnimate({effects:"slideTo",duration:c,offset:t+"px,0",reset:!0,complete:function(){a!==e&&(o.checked=e,n.trigger(s,{checked:e}))}})},_background:function(){var t,n=this;t=e(" ").appendTo(n.wrapper).children(".km-switch-background"),n.background=t},_handle:function(){var t=this,n=t.options;t.handle=e(" ").appendTo(t.wrapper).children(".km-switch-handle"),t.handle.append(''+n.onLabel+' '+n.offLabel+" ")},_wrapper:function(){var e=this,t=e.element,n=t.parent("span.km-switch");n[0]||(n=t.wrap(' ').parent()),e.wrapper=n},_drag:function(){var e=this;e.userEvents=new i.UserEvents(e.wrapper,{tap:function(){e._toggle(!e.element[0].checked)},start:f(e._start,e),move:f(e._move,e),end:f(e._stop,e)})}});r.plugin(h)}(window.kendo.jQuery),function(e){function t(t){return e(''+t+" ")}var n=window.kendo,i=n.mobile.ui,r=i.Widget,o="km-state-active",a="select",s=r.extend({init:function(t,n){var i=this;r.fn.init.call(i,t,n),i.container().bind("show",e.proxy(this,"refresh")),i.element.addClass("km-tabstrip").find("a").each(i._buildButton).eq(i.options.selectedIndex).addClass(o),i.element.on("down","a","_release")},events:[a],switchTo:function(t){for(var n,i,r=this.element.find("a"),o=0,a=r.length;a>o;o++)if(n=r[o],i=n.href.replace(/(\#.+)(\?.+)$/,"$1"),-1!==i.indexOf(t,i.length-t.length))return this._setActiveItem(e(n)),undefined},clear:function(){this.currentItem().removeClass(o)},currentItem:function(){return this.element.children("."+o)},badge:function(n,i){var r,o=this.element;return isNaN(n)||(n=o.children().get(n)),n=o.find(n),r=e(n.find(".km-badge")[0]||t(i).appendTo(n.children(".km-icon"))),i?(r.html(i),this):i===!1?(r.empty().remove(),this):r.html()},_release:function(t){if(!(t.which>1)){var n=this,i=e(t.currentTarget);i[0]!==n.currentItem()[0]&&(n.trigger(a,{item:i})?t.preventDefault():n._setActiveItem(i))}},_setActiveItem:function(e){e[0]&&(this.clear(),e.addClass(o))},_buildButton:function(){var i=e(this),r=n.attrValue(i,"icon"),o=n.attrValue(i,"badge"),a=i.find("img"),s=e(' ');i.addClass("km-button").attr(n.attr("role"),"tab").contents().not(a).wrapAll(' '),a[0]?a.addClass("km-image"):(i.prepend(s),r&&(s.addClass("km-"+r),o&&t(o).appendTo(s)))},refresh:function(e){this.switchTo(e.view.id)},destroy:function(){r.fn.destroy.call(this)},options:{name:"TabStrip",selectedIndex:0,enable:!0}});i.plugin(s)}(window.kendo.jQuery);