demo20230512/Scripts/kendo/2014.2.716/kendo.core.min.js

17 lines
44 KiB
JavaScript
Raw Normal View History

2023-05-12 10:20:28 +08:00
/**
* Copyright 2014 Telerik AD
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
!function(e,define){define([],e)}(function(){return function(e,t){function n(){}function r(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),r=e.substring(1);return"="===n?"+("+r+")+":":"===n?"+e("+r+")+":";"+e+";o+="}function o(e,t,n){return e+="",t=t||2,n=t-e.length,n?R[t].substring(0,n)+e:e}function i(e){var t=e.css(pt.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Dt)||[0,0,0,0,0]:[0,0,0,0,0],r=bt.max(+n[3],+(n[4]||0));return{left:-n[1]+r,right:+n[1]+r,bottom:+n[2]+r}}function a(t,n){var r,o,a,s,u,l,c,d,f=St.browser,m="rtl"==t.css("direction");return t.parent().hasClass("k-animation-container")?(c=t.parent(".k-animation-container"),d=c[0].style,c.is(":hidden")&&c.show(),r=Tt.test(d.width)||Tt.test(d.height),r||c.css({width:t.outerWidth(),height:t.outerHeight(),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(o=i(t),a=t[0].style.width,s=t[0].style.height,u=Tt.test(a),l=Tt.test(s),f.opera&&(o.left=o.right=o.bottom=5),r=u||l,!u&&(!n||n&&a)&&(a=t.outerWidth()),!l&&(!n||n&&s)&&(s=t.outerHeight()),t.wrap(e("<div/>").addClass("k-animation-container").css({width:a,height:s,marginLeft:o.left*(m?1:-1),paddingLeft:o.left,paddingRight:o.right,paddingBottom:o.bottom})),r&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),f.msie&&bt.floor(f.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function s(e){var t=1,n=arguments.length;for(t=1;n>t;t++)u(e,arguments[t]);return e}function u(e,t){var n,r,o,i,a=pt.data.ObservableArray,s=pt.data.DataSource,l=pt.data.HierarchicalDataSource;for(n in t)r=t[n],o=typeof r,o===Ht&&null!==r&&r.constructor!==Array&&r.constructor!==a&&r.constructor!==s&&r.constructor!==l?r instanceof Date?e[n]=new Date(r.getTime()):C(r.clone)?e[n]=r.clone():(i=e[n],e[n]=typeof i===Ht?i||{}:{},u(e[n],r)):o!==Nt&&(e[n]=r);return e}function l(e,n,r){for(var o in n)if(n.hasOwnProperty(o)&&n[o].test(e))return o;return r!==t?r:e}function c(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function d(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function f(t,n){var r,o={};return document.defaultView&&document.defaultView.getComputedStyle?(r=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){o[t]=r.getPropertyValue(t)})):(r=t.currentStyle,n&&e.each(n,function(e,t){o[t]=r[d(t)]})),pt.size(o)||(o=r),o}function m(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function p(e,t,n){t||(t="offset");var r=e[t]();return St.browser.msie&&(St.pointers||St.msPointers)&&!n&&(r.top-=window.pageYOffset-document.documentElement.scrollTop,r.left-=window.pageXOffset-document.documentElement.scrollLeft),r}function h(e){var t={};return gt("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function g(e){return new pt.effects.Element(e)}function y(e,t,n,r){return typeof e===zt&&(C(t)&&(r=t,t=400,n=!1),C(n)&&(r=n,n=!1),typeof t===At&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:r}),ht({effects:{},duration:400,reverse:!1,init:wt,teardown:wt,hide:!1},e,{completeCallback:e.complete,complete:wt})}function v(t,n,r,o,i){for(var a,s=0,u=t.length;u>s;s++)a=e(t[s]),a.queue(function(){L.promise(a,y(n,r,o,i))});return t}function w(e,t,n,r){return t&&(t=t.split(" "),gt(t,function(t,n){e.toggleClass(n,r)})),e}function b(e){return(""+e).replace(j,"&amp;").replace(B,"&lt;").replace(Y,"&gt;").replace($,"&quot;").replace(J,"&#39;")}function M(e,n){var r;return 0===n.indexOf("data")&&(n=n.substring(4),n=n.charAt(0).toLowerCase()+n.substring(1)),n=n.replace(tt,"-$1"),r=e.getAttribute("data-"+pt.ns+n),null===r?r=t:"null"===r?r=null:"true"===r?r=!0:"false"===r?r=!1:Ot.test(r)?r=parseFloat(r):X.test(r)&&!et.test(r)&&(r=Function("return ("+r+")")()),r}function S(n,r){var o,i,a={};for(o in r)i=M(n,o),i!==t&&(K.test(o)&&(i=pt.template(e("#"+i).html())),a[o]=i);return a}function T(t
for(e[0]||(e=[pt.ui,pt.dataviz.ui]),t=0,n=e.length;n>t;t++)r[t]=e[t].roles;return ht.apply(null,[{}].concat(r.reverse()))},pt.init=function(t){var n=pt.rolesFromNamespaces(_t.call(arguments,1));e(t).find("[data-"+pt.ns+"role]").addBack().each(function(){pt.initWidget(this,{},n)})},pt.destroy=function(t){e(t).find("[data-"+pt.ns+"role]").addBack().each(function(){var t,n=e(this).data();for(t in n)0===t.indexOf("kendo")&&typeof n[t].destroy===kt&&n[t].destroy()})},pt.resize=function(t,n){var r,o=e(t).find("[data-"+pt.ns+"role]").addBack().filter(x);o.length&&(r=e.makeArray(o),r.sort(T),e.each(r,function(){var t=pt.widgetInstance(e(this));t&&t.resize(n)}))},pt.parseOptions=S,ht(pt.ui,{Widget:Q,DataBoundWidget:Z,roles:{},progress:function(t,n){var r,o,i,a,s=t.find(".k-loading-mask"),u=pt.support,l=u.browser;n?s.length||(r=u.isRtl(t),o=r?"right":"left",a=t.scrollLeft(),i=l.webkit&&r?t[0].scrollWidth-t.width()-2*a:0,s=e("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top",t.scrollTop()).css(o,Math.abs(a)+i).prependTo(t)):s&&s.remove()},plugin:function(n,r,o){var i,a=n.fn.options.name;r=r||pt.ui,o=o||"",r[a]=n,r.roles[a.toLowerCase()]=n,i="getKendo"+o+a,a="kendo"+o+a,e.fn[a]=function(r){var o,i=this;return typeof r===zt?(o=_t.call(arguments,1),this.each(function(){var n,s,u=e.data(this,a);if(!u)throw Error(pt.format("Cannot call method '{0}' of {1} before it is initialized",r,a));if(n=u[r],typeof n!==kt)throw Error(pt.format("Cannot find method '{0}' of {1}",r,a));return s=n.apply(u,o),s!==t?(i=s,!1):t})):this.each(function(){new n(this,r)}),i},e.fn[i]=function(){return this.data(a)}}}),nt={bind:function(){return this},nullObject:!0,options:{}},rt=Q.extend({init:function(e,t){Q.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){Q.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(pt.roleSelector("view splitview modalview drawer"));return pt.widgetInstance(e,pt.mobile.ui)||nt},viewHasNativeScrolling:function(){var e=this.view();return e&&e.options.useNativeScrolling},container:function(){var e=this.element.closest(pt.roleSelector("view layout modalview drawer splitview"));return pt.widgetInstance(e.eq(0),pt.mobile.ui)||nt}}),ht(pt.mobile,{init:function(e){pt.init(e,pt.mobile.ui,pt.ui,pt.dataviz.ui)},appLevelNativeScrolling:function(){return pt.mobile.application&&pt.mobile.application.options&&pt.mobile.application.options.useNativeScrolling},ui:{Widget:rt,DataBoundWidget:Z.extend(rt.prototype),roles:{},plugin:function(e){pt.ui.plugin(e,pt.mobile.ui,"Mobile")}}}),pt.touchScroller=function(t,n){return e(t).map(function(t,r){return r=e(r),St.kineticScrollNeeded&&pt.mobile.ui.Scroller&&!r.data("kendoMobileScroller")?(r.kendoMobileScroller(n),r.data("kendoMobileScroller")):!1})[0]},pt.preventDefault=function(e){e.preventDefault()},pt.widgetInstance=function(e,t){var n,r,o,i,a=e.data(pt.ns+"role"),s=[];if(a){if("content"===a&&(a="scroller"),t)if(t[0])for(n=0,r=t.length;r>n;n++)s.push(t[n].roles[a]);else s.push(t.roles[a]);else s=[pt.ui.roles[a],pt.dataviz.ui.roles[a],pt.mobile.ui.roles[a]];for(a.indexOf(".")>=0&&(s=[pt.getter(a)(window)]),n=0,r=s.length;r>n;n++)if(o=s[n],o&&(i=e.data("kendo"+o.fn.options.prefix+o.fn.options.name)))return i}},pt.onResize=function(t){var n=t;return St.mobileOS.android&&(n=function(){setTimeout(t,600)}),e(window).on(St.resize,n),n},pt.unbindResize=function(t){e(window).off(St.resize,t)},pt.attrValue=function(e,t){return e.data(pt.ns+t)},pt.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr[":"],{kendoFocusable:function(t){var n=e.attr(t,"tabindex");return D(t,!isNaN(n)&&n>-1)}}),ot=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],it="label, input, [data-rel=external]",at={setupMouseMute:function(){var t,n=0,r=ot.length,o=document.doc