-
Notifications
You must be signed in to change notification settings - Fork 53
/
dream-ui.min.js
6 lines (6 loc) · 58.7 KB
/
dream-ui.min.js
1
2
3
4
5
6
/*!
* DreamUI v1.0.5
* Copyright (C) 2019, ZhaoGang
* Released under the MIT license.
*/
!function(a,J){"function"===typeof define&&define.amd?define("dreamui",["jquery"],J):"undefined"!==typeof module&&"object"===typeof exports?module.exports=J(require("jquery")):a.UI=J(a.jQuery)}("undefined"!==typeof window?window:this,function(a){if("undefined"===typeof jQuery)throw Error("\u8bf7\u5728 DreamUI \u524d\u5148\u5f15\u5165 jQuery");var J=a.fn.jquery;if(3>~~J.charAt(0))throw Error("DreamUI \u8981\u6c42 jQuery \u7684\u7248\u672c\u4e0d\u80fd\u4f4e\u4e8e 3.0.0\u3010 \u5f53\u524d jQuery \u7248\u672c\uff1a"+J+" \u3011");var P=a(window),K=a(document),Q=navigator.userAgent.toLowerCase(),T=Q.match("trident");a.event.special.valueChange={setup:function(){var b=!1;a(this).on({compositionstart:function(){b=!0},compositionend:function(){b=!1;a(this).trigger("input")},input:function(d){if(!b){var c=a(this).val(),g=d.type;d.type="valueChange";a.event.dispatch.call(this,d,c);d.type=g}}})}};a.fn.extend({valueChange:function(a){return this.on("valueChange",a)}});var C={decrease:function(a,d,c){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||16)+'" height\x3d"'+(d||16)+'"\x3e\x3cpath d\x3d"M768.440022 485.814618c0 14.475689-11.743462 26.185382-26.200732 26.185382l-460.467323 0c-14.458293 0-26.167986-11.70867-26.167986-26.185382l0 0c0-14.458293 11.70867-26.183336 26.167986-26.183336l460.467323 0C756.697583 459.631282 768.440022 471.356324 768.440022 485.814618L768.440022 485.814618z" fill\x3d"'+(c||"#000")+'"\x3e\x3c/path\x3e\x3c/svg\x3e'},increase:function(a,d,c){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||16)+'" height\x3d"'+(d||16)+'"\x3e\x3cpath d\x3d"M740.828151 485.179145 538.820344 485.179145 538.820344 283.185664c0-14.81645-11.989055-26.820855-26.820855-26.820855-14.769378 0-26.790156 12.004405-26.790156 26.820855l-0.013303 201.99348L283.200502 485.179145c-14.801101 0-26.820855 12.019755-26.820855 26.820855 0 14.81645 12.019755 26.819832 26.820855 26.819832l201.991434 0-0.013303 201.994504c0 14.800078 12.051477 26.821879 26.820855 26.821879 14.8318 0 26.820855-12.021801 26.820855-26.821879L538.820344 538.819832l201.979154 0c14.8318 0 26.820855-12.003382 26.820855-26.819832S755.631298 485.179145 740.828151 485.179145z" fill\x3d"'+(c||"#000")+'"\x3e\x3c/path\x3e\x3c/svg\x3e'},close:function(a,d,c){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||16)+'" height\x3d"'+(d||16)+'"\x3e\x3cpath d\x3d"M806.4 172.8l-633.6 633.6c-12.8 12.8-12.8 32 0 44.8 12.8 12.8 32 12.8 44.8 0l633.6-633.6c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0z" fill\x3d"'+(c||"#000")+'"\x3e\x3c/path\x3e\x3cpath d\x3d"M172.8 172.8c-12.8 12.8-12.8 32 0 44.8l633.6 633.6c12.8 12.8 32 12.8 44.8 0 12.8-12.8 12.8-32 0-44.8L217.6 172.8c-12.8-12.8-32-12.8-44.8 0z" fill\x3d"'+(c||"#000")+'"\x3e\x3c/path\x3e\x3c/svg\x3e'},info:function(a,d){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||30)+'" height\x3d"'+(d||30)+'"\x3e\x3cpath d\x3d"M513.46384 60.225663c-248.292969 0-449.584462 201.299679-449.584462 449.625394 0 248.296039 201.291492 449.594695 449.584462 449.594695 248.28069 0 449.63665-201.299679 449.63665-449.594695C963.099467 261.525342 761.744529 60.225663 513.46384 60.225663zM554.626331 714.465225c0 22.720468-18.416442 41.139979-41.136909 41.139979s-41.136909-18.419512-41.136909-41.139979L472.352513 453.586612c0-22.716374 18.416442-41.135886 41.136909-41.135886s41.136909 18.419512 41.136909 41.135886L554.626331 714.465225zM513.489422 372.423081c-25.719778 0-46.561455-20.845771-46.561455-46.557362 0-25.719778 20.841677-46.560432 46.561455-46.560432s46.561455 20.841677 46.561455 46.560432C560.050878 351.577311 539.2092 372.423081 513.489422 372.423081z" fill\x3d"#19b6f8"\x3e\x3c/path\x3e\x3c/svg\x3e'},success:function(a,d){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||30)+'" height\x3d"'+(d||30)+'"\x3e\x3cpath d\x3d"M513.559007 60.225663c-248.299109 0-449.587532 201.299679-449.587532 449.625394 0 248.296039 201.288422 449.594695 449.587532 449.594695 248.27762 0 449.63358-201.299679 449.63358-449.594695C963.192587 261.525342 761.836627 60.225663 513.559007 60.225663zM766.338151 407.245168 485.919507 692.261527c-0.044002 0.045025-0.084934 0.092098-0.127913 0.137123s-0.090051 0.085958-0.134053 0.12996l-0.751107 0.763386c-6.256494 6.359848-14.548344 9.5454-22.967084 9.597589-0.061398 0.001023-0.121773 0.001023-0.183172 0.002047-0.161682 0-0.322341 0.004093-0.485047 0.002047-8.398274 0.068562-16.715707-2.979868-23.057135-9.217942L282.51591 540.491914c-12.999059-12.791327-12.775978-34.097586 0.49835-47.590901 13.281491-13.494339 34.58468-14.06739 47.576575-1.276063l130.36921 128.264269 256.507048-260.722046c12.797467-12.999059 34.100656-12.771885 47.591925 0.502443C778.555403 372.942921 779.129478 394.243039 766.338151 407.245168z" fill\x3d"#08ba61"\x3e\x3c/path\x3e\x3c/svg\x3e'},warn:function(a,d){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||30)+'" height\x3d"'+(d||30)+'"\x3e\x3cpath d\x3d"M513.46384 60.225663c-248.291946 0-449.584462 201.299679-449.584462 449.624371 0 248.296039 201.292516 449.594695 449.584462 449.594695 248.28069 0 449.63665-201.299679 449.63665-449.594695C963.099467 261.525342 761.744529 60.225663 513.46384 60.225663zM473.683834 304.175721c2.690272-35.478026 40.597627-32.423457 40.597627-32.423457s34.488489-2.288113 39.011502 32.225959c0 0 8.162914 181.774997-15.904225 294.366308 0 0-3.746324 14.944364-23.107277 16.22145l0 0.275269c-20.751626-0.539282-24.692379-16.296151-24.692379-16.296151C465.521944 485.947647 473.683834 304.175721 473.683834 304.175721zM513.489422 747.984642c-25.719778 0-46.560432-20.840654-46.560432-46.560432 0-25.710568 20.840654-46.556339 46.560432-46.556339s46.561455 20.845771 46.561455 46.556339C560.050878 727.143988 539.2092 747.984642 513.489422 747.984642z" fill\x3d"#f39509"\x3e\x3c/path\x3e\x3c/svg\x3e'},error:function(a,d){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||30)+'" height\x3d"'+(d||30)+'"\x3e\x3cpath d\x3d"M513.559007 60.225663c-248.291946 0-449.587532 201.299679-449.587532 449.625394 0 248.291946 201.295586 449.594695 449.587532 449.594695 248.284783 0 449.632557-201.303772 449.632557-449.594695C963.191564 261.525342 761.84379 60.225663 513.559007 60.225663zM678.729837 644.059712c12.798491 13.003152 12.217253 34.302247-1.272993 47.575552-13.490246 13.275351-34.800597 13.502525-47.590901 0.503467l-116.284423-118.191866-116.278283 118.187773c-12.798491 13.003152-34.093493 12.774955-47.590901-0.499373-13.497409-13.277398-14.063297-34.576493-1.279133-47.575552l117.065206-118.984928L348.433202 406.088832c-12.783141-12.999059-12.218276-34.298154 1.279133-47.576575 13.497409-13.274328 34.792411-13.501502 47.590901-0.49835l116.279307 118.187773 116.2834-118.190843c12.790304-12.999059 34.100656-12.771885 47.590901 0.502443 13.491269 13.274328 14.071484 34.573423 1.272993 47.576575L561.666678 525.07376 678.729837 644.059712z" fill\x3d"#d81e06"\x3e\x3c/path\x3e\x3c/svg\x3e'},arrow:function(a,d){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||30)+'" height\x3d"'+(d||30)+'"\x3e\x3cpath d\x3d"M523.955 832.173l323.744-512c6.24-9.856 6.624-22.336 0.992-32.512-5.632-10.24-16.384-16.576-28.033-16.576h-647.328c-11.647 0-22.4 6.336-28.033 16.576-2.656 4.8-3.968 10.112-3.968 15.424 0 5.952 1.664 11.904 4.929 17.088l323.616 512c5.856 9.28 16.064 14.911 27.040 14.912s21.184-5.632 27.040-14.912z" fill\x3d"#000"\x3e\x3c/path\x3e\x3c/svg\x3e'},arrowLine:function(a,d){return'\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"'+(a||30)+'" height\x3d"'+(d||30)+'"\x3e\x3cpath d\x3d"M948.560332 281.179984c-13.765515-13.833053-36.127825-13.833053-49.89334 0L511.991302 668.591431 125.313565 281.179984c-13.763468-13.798261-36.093033-13.798261-49.856501 0-13.799284 13.798261-13.799284 36.161594 0 49.993624l410.857439 411.674037c7.067976 7.085372 16.402575 10.521634 25.675776 10.331299 9.274224 0.191358 18.608823-3.245927 25.677822-10.331299l410.891208-411.708829c6.863315-6.89913 10.331299-15.940041 10.331299-24.979928S955.423647 288.078091 948.560332 281.179984z" fill\x3d"#000"\x3e\x3c/path\x3e\x3c/svg\x3e'}},t={addZero:function(a){a+="";return 2>a.length?"0"+a:a},dateFormat:function(a){return[a.getFullYear(),a.getMonth()+1,a.getDate()]},datePicker:function(a){var d=t.dateFormat(new Date),c=a?a[0]:d[0],g=a?a[1]:d[1];a=a?a[2]:d[2];for(var b=(new Date(c,g-1,1)).getDay(),e=[31,28+(0==c%100?0==c%400?1:0:0==c%4?1:0),31,30,31,30,31,31,30,31,30,31],l="",f=0;f<e[g-1];f++)l+='\x3ci class\x3d"ui-datepicker-days" data-day\x3d"'+(f+1)+'"\x3e'+(f+1)+"\x3c/i\x3e";0<b&&(l=Array(b+1).join("front")+l);var b="",e=l.split("front").length-1,k=2===g-1?28+(0==c%100?0==c%400?1:0:0==c%4?1:0):1<g-1?-1<[1,3,5,7,8,10,12].indexOf(g-1)?31:30:31;if(e)for(f=k-e+1;f<k+1;f++)b+='\x3ci class\x3d"ui-datepicker-placeholder"\x3e'+f+"\x3c/i\x3e";k="";f=0;for(e=42-l.split("class").length+1-e;f<e;f++)k+='\x3ci class\x3d"ui-datepicker-placeholder"\x3e'+(f+1)+"\x3c/i\x3e";return{days:b+l.replace(/front/g,"")+k,result:[c,g,a],today:d}},dialogShortcuts:function(a,d,c){m.dialog({SHORTCUTS:{type:a,title:d,content:c}})},drawer:function(b,d){switch(b){case "init":if(a(".ui-drawer-container").length)break;a("body").append('\x3cdiv class\x3d"ui-drawer-container"\x3e\x3cdiv class\x3d"ui-drawer-mask"\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-drawer-wrapper"\x3e\x3cdiv class\x3d"ui-drawer-header"\x3e\x3cspan\x3e\x3c/span\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-drawer-body"\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e');var c=a(".ui-drawer-wrapper");b=a(".ui-drawer-mask");var g=c.find(".ui-drawer-header"),h=g.find("span"),e=c.find(".ui-drawer-body \x3e div"),l=a.extend({},{width:300,title:"",content:"",left:!1,closable:!0,mask:!0,maskClose:!1},d[0]);l.left?c.addClass("ui-drawer-left").css("marginLeft",-l.width+"px").data("ui-drawer-left",!0):c.css("marginRight",-l.width+"px");c.width(l.width);String(l.title)?h.text(l.title):(g.remove(),e.parent().css({height:"100%",top:0}));l.closable&&!g.children("i").length&&(g.append("\x3ci\x3e"+C.close()+"\x3c/i\x3e"),h.css("width","calc(100% - 61px)"));l.mask||b.remove();String(l.content)&&e.html(l.content);g.find("i").click(function(){m.drawer.close()});l.maskClose&&l.mask&&b.click(function(){m.drawer.close()});break;case "open":g=a(".ui-drawer-container");b=a(".ui-drawer-mask");c=a(".ui-drawer-wrapper");h=c.find(".ui-drawer-header \x3e span");e=c.find(".ui-drawer-body \x3e div");if(!g.length)break;var f=d[0];a.isPlainObject(f)&&(f.updateTitle&&h.html(f.updateTitle),f.appendTitle&&h.append(f.appendTitle),f.updateContent&&e.html(f.updateContent),f.appendContent&&e.append(f.appendContent));g.show();c.is(":animated")||(b.animate({opacity:1},500),b={opacity:1},b[c.data("ui-drawer-left")?"marginLeft":"marginRight"]=0,c.animate(b,500,function(){a.isFunction(f)?f(h.get(0),e.get(0)):f&&a.isFunction(f.callback)&&f.callback(h.get(0),e.get(0))}));break;case "close":c=a(".ui-drawer-wrapper");c.is(":animated")||(a(".ui-drawer-mask").animate({opacity:0},500),b={opacity:0},b[c.data("ui-drawer-left")?"marginLeft":"marginRight"]="-"+c.width()+"px",c.animate(b,500,function(){if(a.isFunction(d[0]))d[0](c.find(".ui-drawer-header \x3e span").get(0),c.find(".ui-drawer-body \x3e div").get(0));a(".ui-drawer-container").hide()}));break;case "remove":a(".ui-drawer-container").remove()}},message:function(b,d){var c={};if(d.length){a.isPlainObject(d[0])?c=d[0]:c.content=d[0];var g=a.extend({},{autoClose:2E3,closable:!1,afterClose:a.noop},c);a(".ui-message-container").length||a("body").append('\x3cdiv class\x3d"ui-message-container"\x3e\x3c/div\x3e');d=a(".ui-message-container");d.append('\x3cdiv class\x3d"ui-message-wrapper"\x3e\x3cdiv class\x3d"ui-message-icon"\x3e'+C[b]()+'\x3c/div\x3e\x3cdiv class\x3d"ui-message-content"\x3e\x3c/div\x3e\x3c/div\x3e');var h=d.children().last();b=h.find("svg");d=h.find(".ui-message-content");b.attr({width:18,height:18});d.text(g.content);g.closable&&d.after('\x3cdiv class\x3d"ui-message-close"\x3e'+C.close()+"\x3c/div\x3e").next().click(function(){m.message.close(h)});a.isFunction(g.afterClose)&&h.data("ui-message-afterclose",g.afterClose);var e=0;h.children().each(function(){e+=a(this).outerWidth(!0)}).end().width(e+5);h.addClass("ui-message-show").on("animationend",function(){if(a.isNumeric(g.autoClose)&&1E3<g.autoClose)var c=window.setTimeout(function(){window.clearTimeout(c);m.message.close(h)},~~g.autoClose)});return h}},notice:function(b,d){var c={};if(d.length){a.isPlainObject(d[0])?c=d[0]:c.title=d[0];var g=a.extend({},{title:"",content:"",autoClose:5E3,closable:!1,afterClose:a.noop},c);a(".ui-notice-container").length||a("body").append('\x3cdiv class\x3d"ui-notice-container"\x3e\x3c/div\x3e');d=a(".ui-notice-container");d.append('\x3cdiv class\x3d"ui-notice-wrapper"\x3e\x3cdiv class\x3d"ui-notice-icon"\x3e'+C[b]()+'\x3c/div\x3e\x3cdiv class\x3d"ui-notice-box"\x3e\x3cp class\x3d"ui-notice-title"\x3e\x3c/p\x3e\x3cp class\x3d"ui-notice-content"\x3e\x3c/p\x3e\x3c/div\x3e\x3c/div\x3e');var h=d.find(".ui-notice-wrapper").last();b=d.find(".ui-notice-content");h.find("svg").attr({width:18,height:18});h.find(".ui-notice-box \x3e p").first().html(g.title);g.content?b.html(g.content):b.remove();g.closable?h.append('\x3cdiv class\x3d"ui-notice-close"\x3e'+C.close()+"\x3c/div\x3e").find(".ui-notice-close").click(function(){m.notice.close(h)}):h.find(".ui-notice-box").css("width","calc(100% - 30px)");a.isFunction(g.afterClose)&&h.data("ui-notice-afterclose",g.afterClose);h.addClass("ui-notice-show").on("animationend",function(){if(a.isNumeric(g.autoClose)&&1E3<g.autoClose)var c=window.setTimeout(function(){window.clearTimeout(c);m.notice.close(h)},~~g.autoClose)});return h}},progress:function(a){return'\x3cdiv class\x3d"ui-progress-container" data-id\x3d"'+a+'"\x3e\x3cdiv class\x3d"ui-progress-box"\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-progress-result"\x3e\u7b49\u5f85\x3c/div\x3e\x3c/div\x3e'},randomID:function(){return Math.random().toString(36).substr(2)}},m={version:"1.0.5",autoComplete:function(b,d){var c=a.extend({},{placeholder:"",width:"auto",id:"",name:"",clear:!1,data:a.noop},d);return a(b).each(function(){function d(c){var e="";a.each(c,function(a,c){e+='\x3cli data-text\x3d"'+c+'"\x3e'+c+"\x3c/li\x3e"});return"\x3cul\x3e"+e+"\x3c/ul\x3e"}function b(){q.empty().hide()}function e(a){c.data(a).done(function(a){Array.isArray(a)&&a.length?q.html(d(a)).show():b()}).fail(function(a){console.error(a);b()})}var l=a(this);l.html('\x3cdiv class\x3d"ui-autocomplete-container"\x3e\x3cinput type\x3d"text" autocomplete\x3d"off" spellcheck\x3d"false"\x3e\x3cdiv class\x3d"ui-autocomplete-wrapper ui-noselect"\x3e\x3c/div\x3e\x3c/div\x3e');var f=l.children(),k=f.children().first(),q=k.next();f.outerWidth(c.width);c.clear&&(f.append('\x3cdiv class\x3d"ui-autocomplete-clear"\x3e'+C.close(10,10,"#fff")+"\x3c/div\x3e"),k.css({width:"calc(100% - 36px)",paddingRight:"26px",minWidth:"164px"}));var n=f.find(".ui-autocomplete-clear");n.hide();k.attr({id:c.id,name:c.name,placeholder:c.placeholder}).on({focus:function(){var a=k.val();a&&(e(a),n.show())},valueChange:function(a,c){c?(e(c),n.show()):(b(),n.hide())}});n.click(function(){k.val("").focus();n.hide();b()});q.on("click","li",function(){k.val(a(this).attr("data-text"));b()});K.on("click contextmenu",function(a){f.is(a.target)||f.has(a.target).length||b()})})},carousel:function(b,d){var c=a.extend({},{effect:"slide",arrow:!0,dot:!0,autoPlay:0,duration:700,dotEventType:"click",arrowHoverShow:!1},d);a(b).each(function(){function b(a){A.children().eq(a).addClass("active").siblings().removeClass("active")}function d(a){m||(m=!0,b(a),k.eq(a).fadeIn(c.duration,function(){m=!1;u=a}).siblings().fadeOut(c.duration))}function e(a){m||(m=!0,b(a===q?0:a),n.css({transform:"translateX(-"+p*(a+1)+"%)",transitionDuration:c.duration+"ms",transitionTimingFunction:"cubic-bezier(0.57, 0, 0.35, 1)"}).on("transitionend",function(){n.css("transitionDuration","0ms").off("transitionend");m=!1;u=a;-1===a&&(n.css("transform","translateX(-"+p*q+"%)"),u=q-1);a===q&&(n.css("transform","translateX(-"+p+"%)"),u=0)}))}function l(a){switch(c.effect){case "show":k.eq(a).show().siblings().hide();u=a;b(a);break;case "fade":d(a);break;case "slide":e(a);break;default:e(a)}}var f=a(this),k=f.children(),q=k.length;"static"===f.css("position")&&f.css("position","relative");k.wrapAll('\x3cdiv class\x3d"ui-carousel-container"\x3e\x3cdiv class\x3d"ui-carousel-wrapper"\x3e\x3c/div\x3e\x3c/div\x3e');f.find(".ui-carousel-container").first();var n=f.find(".ui-carousel-wrapper").first(),p=0;"slide"===c.effect?(p=100/(q+2),n.addClass("ui-carousel-slide").prepend(k.last().clone(!0)).append(k.first().clone(!0)).css({width:100*(q+2)+"%",transform:"translateX(-"+p+"%)"}).children().each(function(c){a(this).css({width:p+"%",marginLeft:c*p+"%"})})):(n.addClass("ui-carousel-fade"),k.hide().first().show());var z=a(""),E=a("");!0===c.arrow&&(f.append('\x3cdiv class\x3d"ui-carousel-arrow"\x3e\x3ci class\x3d"ui-carousel-arrow-prev"\x3e\x3c/i\x3e\x3ci class\x3d"ui-carousel-arrow-next"\x3e\x3c/i\x3e\x3c/div\x3e'),z=f.find(".ui-carousel-arrow-prev").first(),E=f.find(".ui-carousel-arrow-next").first());Array.isArray(c.arrow)&&2===c.arrow.length&&(z=a(c.arrow[0]),E=a(c.arrow[1]));c.arrowHoverShow&&(z.add(E).hide(),f.on({mouseenter:function(){z.add(E).stop().fadeIn(150)},mouseleave:function(){z.add(E).stop().fadeOut(150)}}));var A=a("");!0===c.dot&&(f.append('\x3cdiv class\x3d"ui-carousel-dot"\x3e'+Array(q+1).join("\x3ci\x3e\x3c/i\x3e")+"\x3c/div\x3e"),A=f.find(".ui-carousel-dot").first());"string"===typeof c.dot&&(A=a(c.dot));A.children().first().addClass("active");var m=!1,u=0,x=c.dotEventType.match(/(click|mouseenter)/)?c.dotEventType:"click";A.children().on(x,function(){a(this).hasClass("active")||l(a(this).index())});z.click(function(){!m&&u--;0>u&&"slide"!==c.effect&&(u=q-1);l(u)});E.click(function(){!m&&u++;u>q-1&&"slide"!==c.effect&&(u=0);l(u)});if(a.isNumeric(c.autoPlay)&&2E3<c.autoPlay){var D=function(){u++;l(u)},t=window.setInterval(D,~~c.autoPlay);f.on({mouseenter:function(){window.clearInterval(t)},mouseleave:function(){t=window.setInterval(D,~~c.autoPlay)}})}})},checkbox:function(b,d){var c=a.extend({},{data:[],vertical:!1,change:a.noop},d),g=a.isFunction(c.change);if(Array.isArray(c.data)&&c.data.length){var h="";a.each(c.data,function(a,c){a="ui-checkbox-id-"+t.randomID();h+='\x3cdiv\x3e\x3clabel for\x3d"'+a+'" class\x3d"ui-checkbox'+(c.checked?" ui-checkbox-checked":"")+'"\x3e\x3ci\x3e\x3c/i\x3e\x3cspan\x3e'+c.text+'\x3c/span\x3e\x3c/label\x3e\x3cinput type\x3d"checkbox" value\x3d"'+c.value+'" id\x3d"'+a+'" name\x3d"'+(c.name||"")+'" '+(c.checked?"checked":"")+' style\x3d"display:none;"\x3e\x3c/div\x3e'});h='\x3cdiv class\x3d"ui-checkbox-container ui-noselect'+(c.vertical?" ui-checkbox-vertical":"")+'"\x3e'+h+"\x3c/div\x3e";return a(b).each(function(){var e=a(this);e.html(h);var b=e.children().parents("form");if(b.length)b.last().on("reset",function(){e.html(h)});e.on("click",".ui-checkbox",function(){a(this).toggleClass("ui-checkbox-checked");if(g){var b=[];e.find(".ui-checkbox-checked + input").each(function(){b.push(a(this).val())});c.change(b)}})})}},collapse:function(b,d){var c=a.extend(!0,{accordion:!1,background:"#f8f8f8",arrow:{show:!0,left:!1,defaultDirection:"down"},active:null,change:a.noop},d);a(b).each(function(){var b=a(this),d=b.children();b.children().addClass("ui-collapse-part").each(function(){a(this).children().first().addClass("ui-collapse-title ui-noselect").next().addClass("ui-collapse-content")});var e=d.children(".ui-collapse-title"),l=d.children(".ui-collapse-content");e.css("backgroundColor",c.background).add(l).each(function(){a(this).html('\x3cdiv class\x3d"ui-collapse-wrapper"\x3e'+a(this).html()+"\x3c/div\x3e")});c.arrow&&c.arrow.show&&(e[c.arrow.left?"prepend":"append"]('\x3ci class\x3d"ui-collapse-arrow" style\x3d"display:none;"\x3e'+C.arrowLine(16,16)+"\x3c/i\x3e"),l=e.find(".ui-collapse-arrow"),e.children("div").css("width","calc(100% - 25px)"),c.arrow.defaultDirection.match(/(down|right)/)&&l.addClass("ui-collapse-arrow-"+c.arrow.defaultDirection),l.show());e.click(function(){var e=a(this),b=e.next(),g=e.parent().siblings();e.toggleClass("ui-collapse-arrow-animate");e=b.children().outerHeight(!0);b.height(b.hasClass("ui-collapse-show")?0:e).toggleClass("ui-collapse-show");c.accordion&&(g.children(".ui-collapse-content").height(0).removeClass("ui-collapse-show"),g.children(".ui-collapse-title").removeClass("ui-collapse-arrow-animate"));if(a.isFunction(c.change)){var l=[];d.children(".ui-collapse-arrow-animate").each(function(){l.push(a(this).parent().index())});c.change(l)}});Array.isArray(c.active)&&c.active.length&&(e=c.accordion?[c.active.pop()]:c.active,a.each(e,function(a,c){a=b.find(".ui-collapse-title").eq(c);var e=a.next();a.addClass("ui-collapse-arrow-animate");e.addClass("ui-collapse-show ui-collapse-no-transition").height(e.children().outerHeight(!0));var d=window.setTimeout(function(){e.removeClass("ui-collapse-no-transition");window.clearTimeout(d)},13)}))})},datePicker:function(b,d){function c(a){return g.format.replace("YYYY",a[0]).replace("MM",t.addZero(a[1])).replace("DD",t.addZero(a[2]))}var g=a.extend({},{format:"YYYY-MM-DD",width:200,name:"",id:"",placeholder:"",selectYear:!0,selectMonth:!0,showButton:!1,shortcuts:!1,buttonClearCallback:a.noop,disabledDays:[],change:a.noop},d);K.on("click contextmenu",function(c){var e=a(".ui-datepicker-container, .ui-datepicker-input");e.is(c.target)||e.has(c.target).length||(e.not(".ui-datepicker-input").remove(),a(".ui-datepicker-input").removeClass("active"))});return a(b).each(function(){var b=a(this);b.width(g.width-2).addClass("ui-datepicker-input ui-noselect").html('\x3cinput type\x3d"text" readonly autocomplete\x3d"off" placeholder\x3d"'+g.placeholder+'" id\x3d"'+g.id+'" name\x3d"'+g.name+'"\x3e\x3ci\x3e\x3c/i\x3e').find("*").end().click(function(){function e(a){B.text(a[0]);v.text(a[1]);d()}function d(){Array.isArray(g.disabledDays)&&g.disabledDays.length&&a.each(g.disabledDays,function(a,c){c=c.split("-");c[0]==r[0]&&~~c[1]==r[1]&&x.find('[data-day\x3d"'+~~c[2]+'"]').attr("class","ui-datepicker-placeholder")})}function f(e){y.remove();b.removeClass("active");e&&(r[2]=e,b.data("ui-datepicker-value",r),u.val(c(r)),a(".ui-datepicker-input").removeClass("active"),a.isFunction(g.change)&&g.change(r))}function h(){D.add(I).hide();y.find(".ui-datepicker-opacity").removeClass("ui-datepicker-opacity")}a(".ui-datepicker-input").removeClass("active");a(".ui-datepicker-container").remove();b.addClass("active");var q="";"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split("").forEach(function(a){q+="\x3ci\x3e"+a+"\x3c/i\x3e"});for(var n="",p=1900;2101>p;p++)n+="\x3ci\x3e"+p+"\u5e74\x3c/i\x3e";for(var z="",p=1;13>p;p++)z+="\x3ci\x3e"+p+"\u6708\x3c/i\x3e";var p=C.arrowLine(12,12),E=b.data("ui-datepicker-value"),m=t.datePicker(E);a("body").append('\x3cdiv class\x3d"ui-datepicker-container ui-noselect"\x3e\x3cdiv\x3e\x3cdiv class\x3d"ui-datepicker-header"\x3e\x3cdiv class\x3d"ui-datepicker-prev"\x3e\x3ci class\x3d"ui-datepicker-prev-year"\x3e'+p+p+'\x3c/i\x3e\x3ci class\x3d"ui-datepicker-prev-month"\x3e'+p+'\x3c/i\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-datepicker-result"\x3e\x3cspan\x3e'+m.result[0]+"\x3c/span\x3e\u5e74\x3cspan\x3e"+m.result[1]+'\x3c/span\x3e\u6708\x3c/div\x3e\x3cdiv class\x3d"ui-datepicker-next"\x3e\x3ci class\x3d"ui-datepicker-next-month"\x3e'+p+'\x3c/i\x3e\x3ci class\x3d"ui-datepicker-next-year"\x3e'+p+p+'\x3c/i\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-datepicker-week"\x3e'+q+'\x3c/div\x3e\x3cdiv class\x3d"ui-datepicker-box"\x3e'+m.days+'\x3c/div\x3e\x3cdiv class\x3d"ui-datepicker-footer"\x3e\x3cbutton info-ghost class\x3d"ui-datepicker-empty"\x3e\u6e05\u7a7a\x3c/button\x3e\x3cbutton info-ghost class\x3d"ui-datepicker-today"\x3e\u4eca\u5929\x3c/button\x3e\x3cbutton info-ghost class\x3d"ui-datepicker-sure"\x3e\u786e\u5b9a\x3c/button\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-datepicker-years"\x3e'+n+'\x3c/div\x3e\x3cdiv class\x3d"ui-datepicker-months"\x3e'+z+"\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e");var y=a(".ui-datepicker-container"),n=b.offset().left,z=b.offset().top;y.css({marginTop:z+b.outerHeight()+"px",marginLeft:n+"px"});var u=b.find("input"),n=y.find(".ui-datepicker-prev-year"),z=y.find(".ui-datepicker-next-year"),p=y.find(".ui-datepicker-prev-month"),E=y.find(".ui-datepicker-next-month"),x=y.find(".ui-datepicker-box"),D=y.find(".ui-datepicker-years"),I=y.find(".ui-datepicker-months"),H=y.find(".ui-datepicker-week"),G=y.find(".ui-datepicker-footer"),F=y.find(".ui-datepicker-result span"),B=F.first(),v=F.last(),r=[~~B.text(),~~v.text(),null];if(g.shortcuts){y.prepend('\x3cdiv class\x3d"ui-datepicker-shortcuts"\x3e\x3cul\x3e\x3c/ul\x3e\x3c/div\x3e');F=y.find(".ui-datepicker-shortcuts").find("ul");y.width(385).children().last().width(280);var N="";if(!0===g.shortcuts){var L="\u4eca\u5929 \u6628\u5929 \u4e09\u5929\u524d \u4e00\u5468\u524d \u534a\u4e2a\u6708\u524d \u4e00\u4e2a\u6708\u524d \u4e09\u4e2a\u6708\u524d \u534a\u5e74\u524d \u4e00\u5e74\u524d".split(" ");a.each([0,1,3,7,15,30,90,182,365],function(a,c){var e=new Date;e.setTime(e.getTime()-864E5*c);N+='\x3cli data-value\x3d"'+t.dateFormat(e)+'"\x3e'+L[a]+"\x3c/li\x3e"})}else a.isPlainObject(g.shortcuts)&&!a.isEmptyObject(g.shortcuts)&&a.each(g.shortcuts,function(a,c){N+='\x3cli data-value\x3d"'+t.dateFormat(c())+'"\x3e'+a+"\x3c/li\x3e"});F.html(N);F.on("click","li",function(){var e=a(this).attr("data-value").split(",");r[0]=e[0];r[1]=e[1];r[2]=e[2];b.data("ui-datepicker-value",r);u.val(c(r));y.remove();b.removeClass("active");a.isFunction(g.change)&&g.change(r)})}g.showButton&&(F=G.find("button"),G.show(),F.filter(".ui-datepicker-empty").click(function(){u.val("");b.removeData("ui-datepicker-value");y.remove();a.isFunction(g.buttonClearCallback)&&g.buttonClearCallback(u.get(0))}),F.filter(".ui-datepicker-today").click(function(){r=m.today;f(r[2])}),F.filter(".ui-datepicker-sure").click(function(){f(~~x.find(".active").text())}));d();x.find('[data-day\x3d"'+m.result[2]+'"]').addClass("active").siblings().removeClass("active");x.on("click",".ui-datepicker-days:not(.active)",function(){a(this).addClass("active").siblings().removeClass("active");g.showButton||f(~~a(this).text())});n.click(function(){--r[0];x.html(t.datePicker(r).days);e(r);h()});z.click(function(){r[0]+=1;x.html(t.datePicker(r).days);e(r);h()});B.click(function(){D.toggle();I.hide();x.add(H)[D.is(":hidden")?"removeClass":"addClass"]("ui-datepicker-opacity")});D.on("click","i",function(){r[0]=parseInt(a(this).text());x.html(t.datePicker(r).days);e(r);h()});p.click(function(){--r[1];0===r[1]&&(r[1]=12,--r[0]);x.html(t.datePicker(r).days);e(r);h()});E.click(function(){r[1]+=1;13===r[1]&&(r[1]=1,r[0]+=1);x.html(t.datePicker(r).days);e(r);h()});v.click(function(){I.toggle();D.hide();x.add(H)[I.is(":hidden")?"removeClass":"addClass"]("ui-datepicker-opacity")});I.on("click","i",function(){r[1]=parseInt(a(this).text());x.html(t.datePicker(r).days);e(r);h()});g.selectYear||(n.add(z).remove(),B.addClass("disabled"));g.selectMonth||(p.add(E).remove(),v.addClass("disabled"))})})},dialog:function(){var b='\x3cdiv class\x3d"ui-dialog-container"\x3e\x3cdiv class\x3d"ui-dialog-mask"\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-dialog-wrapper"\x3e\x3cdiv class\x3d"ui-dialog-header"\x3e\x3cspan\x3e\x3c/span\x3e\x3ci\x3e'+C.close()+'\x3c/i\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-dialog-main"\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-dialog-footer ui-noselect"\x3e\x3cdiv class\x3d"ui-dialog-cancel"\x3e\x3cspan\x3e\x3c/span\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-dialog-ok"\x3e\x3cspan\x3e\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e',d={title:"\u7f51\u9875\u6d88\u606f",content:"",contentBgColor:"#fff",iframeContent:null,videoContent:null,imageContent:null,fullscreen:!1,draggable:!1,maskClose:!1,mask:!0,closable:!0,showTitle:!0,bodyScroll:!0,showButton:!0,autoCloseEffect:!0,parentsIframeLayer:0,borderRadius:6,autoClose:0,width:500,checkbox:null,ok:{text:"\u786e\u5b9a",waiting:!1,waitingText:"\u786e\u5b9a",notClose:!1,callback:a.noop},cancel:{text:"\u53d6\u6d88",show:!0,callback:a.noop},afterOpen:a.noop,afterClose:a.noop,SHORTCUTS:null,WAITING:null,PROMPT:null},c=arguments,g=c.length,h={};if(g){1===g?a.isPlainObject(c[0])?h=c[0]:h.content=c[0]:(h.title=c[0],h.content=c[1],h.width=c[2]);var e=a.extend(!0,d,h);e.WAITING&&(e.showTitle=!1,e.showButton=!1,e.width="auto");e.PROMPT&&e.PROMPT.title&&(e.title=e.PROMPT.title);var d=e.fullscreen,l=e.width,f;if(e.parentsIframeLayer){f=window.parent;for(c=0;c<e.parentsIframeLayer-1;c++)f=f.parent;a("body",f.document).append(b)}else a("body").append(b);var k=f?a("body \x3e .ui-dialog-container:last-child",f.document):a("body \x3e .ui-dialog-container:last-child"),b=a(".ui-dialog-mask",k),q=a(".ui-dialog-wrapper",k),n=a(".ui-dialog-header",q),p=a("span",n),c=a("i",n),h=a(".ui-dialog-main",q),z=a("div",h),E=a(".ui-dialog-footer",q),A=a(".ui-dialog-ok",E),y=a(".ui-dialog-cancel",E),u=P.width(),x=P.height(),t=!!(430>u);if(l>u||d)l=u;q.width(l);!t||d||e.WAITING||q.width(u-60);p.text(e.title);q.css("borderRadius",e.borderRadius+"px");h.css("background",e.contentBgColor);z.html(e.content);a("span",A).text(e.ok.text);a("span",y).text(e.cancel.text);e.bodyScroll||a("body",f?f.document:window.document).addClass("ui-body-noscroll");e.showTitle||n.remove();e.showButton||E.remove();e.cancel.show||y.remove();e.closable||(c.remove(),p.css("width","calc(100% - 30px)"));e.mask||b.remove();var p=n.outerHeight()+E.outerHeight(),I=!1;if(a.isPlainObject(e.checkbox)&&!a.isEmptyObject(e.checkbox)&&e.showButton){E.prepend('\x3cdiv class\x3d"ui-dialog-checkbox"\x3e\x3cdiv\x3e\x3c/div\x3e\x3cspan\x3e'+(e.checkbox.text||"")+"\x3c/span\x3e\x3c/div\x3e");var H=a(".ui-dialog-checkbox",E);e.checkbox.checked&&(I=!0,H.addClass("active"));H.click(function(){H.toggleClass("active");if(a.isFunction(e.checkbox.change)){var c=H.hasClass("active");I=c;e.checkbox.change(c)}})}var G=e.iframeContent,F=!1;if(a.isPlainObject(e.iframeContent)){var B=G.src,v=G.height;if(!B||!v)return;F=!0;if(d||v>x-p)v=x-p;h.css({padding:0,height:v+"px"}).html('\x3ciframe src\x3d"'+B+'" frameborder\x3d"0" scrolling\x3d"auto"\x3e\x3c/iframe\x3e')}var r=e.imageContent,G=!1;if(a.isPlainObject(r)){var N=function(a){S=!0;J.css("transform","translateX("+-a*l+"px)").on("transitionend",function(){S=!1;J.off("transitionend")})},B=r.src,v=r.height;if(!B||!v)return;G=!0;if(d||v>x-p)v=x-p;var g=B.length,L="";Array.isArray(B)?(B.forEach(function(a){L+='\x3cimg src\x3d"'+a+'" style\x3d"width:'+l+"px;height:"+v+'px;" ondragstart\x3d"return false"\x3e'}),L='\x3cdiv class\x3d"ui-dialog-image-wrapper ui-dialog-noselect"\x3e\x3cdiv style\x3d"width:'+l*g+'px;"\x3e'+L+'\x3c/div\x3e\x3cdiv class\x3d"ui-dialog-image-prev"\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-dialog-image-next"\x3e\x3c/div\x3e\x3c/div\x3e'):L='\x3cimg src\x3d"'+B+'"\x3e';h.css({padding:0,overflow:"hidden",height:v+"px"}).html(L);var J=a(".ui-dialog-image-wrapper \x3e div:first-child",h),B=a(".ui-dialog-image-prev, .ui-dialog-image-next",h),M=0,S=!1;2===B.length&&B.first().click(function(){M&&!S&&(M--,N(M))}).next().click(function(){M<g-1&&!S&&(M++,N(M))})}var O=e.videoContent,r=!1;if(a.isPlainObject(O)){B=O.src;v=O.height;O=O.autoplay;if(!B||!v)return;r=!0;if(d||v>x-p)v=x-p;h.css({padding:0,overflow:"hidden",background:"#000",height:v+"px"}).html('\x3cvideo src\x3d"'+B+'" width\x3d"'+l+'" height\x3d"'+v+'" controls\x3e\x3c/video\x3e');O&&a("video",h).attr("autoplay",!0)}1<a(".ui-dialog-mask").length&&b.remove();a.isFunction(e.afterClose)&&k.data("ui-dialog-afterclose",e.afterClose);d&&(q.css({borderRadius:0,height:x+"px"}),h.height(x-p-(r||G||F?0:30)+"px"));a.isNumeric(e.autoClose)&&2E3<e.autoClose&&e.autoCloseEffect&&q.append('\x3cdiv class\x3d"ui-dialog-autoclose"\x3e\x3c/div\x3e');q.height()>x&&h.height(x-p);a.isPlainObject(e.SHORTCUTS)&&!a.isEmptyObject(e.SHORTCUTS)&&(n.add(y).add(z).remove(),E.css("borderTop","none"),q.width(t?w-60:420),q.addClass("ui-dialog-shortcuts-mark"),h.html('\x3cdiv\x3e\x3cdiv class\x3d"ui-dialog-shortcuts"\x3e\x3ci\x3e'+C[e.SHORTCUTS.type]()+"\x3c/i\x3e\x3cdiv\x3e\x3cp\x3e"+e.SHORTCUTS.title+"\x3c/p\x3e\x3cdiv\x3e"+(e.SHORTCUTS.content||"")+"\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e"),h.css("minHeight","90px"),t&&h.addClass("ui-dialog-mobile-main"));e.WAITING&&(q.addClass("ui-dialog-waiting-wrapper"),d="","string"===a.type(e.WAITING)&&(d=e.WAITING),h.html('\x3cdiv class\x3d"ui-dialog-waiting-box"\x3e\x3c/div\x3e\x3cspan\x3e'+d+"\x3c/span\x3e"),a.isFunction(e.WAITING)&&e.WAITING(a(".ui-dialog-waiting-box + span")));if(a.isPlainObject(e.PROMPT)&&!a.isEmptyObject(e.PROMPT)){q.width(t?w-60:350);h.css("minHeight",0).html('\x3cdiv class\x3d"ui-dialog-prompt"\x3e\x3c/div\x3e');a("div",h).append("textarea"!==e.PROMPT.type?'\x3cinput type\x3d"'+e.PROMPT.type+'" spellcheck\x3d"false"\x3e':'\x3ctextarea spellcheck\x3d"false"\x3e\x3c/textarea\x3e');var R=a("input, textarea",h);R.attr("maxlength",e.PROMPT.maxlength);e.PROMPT.placeholder&&R.attr("placeholder",e.PROMPT.placeholder);e.PROMPT.autofocus&&R.focus();A.addClass("ui-dialog-notclose");A.click(function(){a.isFunction(e.PROMPT.callback)&&(m.dialog.prompt.errorFeedBack(!1),e.PROMPT.callback(R.val(),R,A))})}e.maskClose&&b.click(function(){m.dialog.close(k,f)});c.click(function(){m.dialog.close(k,f)});y.click(function(){m.dialog.close(k,f);a.isFunction(e.cancel.callback)&&e.cancel.callback(y,I)});A.click(function(){a.isFunction(e.ok.callback)&&!e.PROMPT&&e.ok.callback(A,I);e.ok.waiting||e.ok.notClose||A.hasClass("ui-dialog-notclose")||m.dialog.close(k,f);e.ok.waiting&&(A.prepend("\x3ci\x3e\x3c/i\x3e").css({opacity:.5,pointerEvents:"none"}),a("span",A).text(e.ok.waitingText))});if(e.draggable&&!e.fullscreen){b.remove();var v=parseFloat(q.height()),U,Q;q.mousedown(function(){a(".ui-dialog-container-top").removeClass("ui-dialog-container-top");k.addClass("ui-dialog-container-top")});n.addClass("ui-dialog-header-move"+(T?"-ie":"")).mousedown(function(a){a.preventDefault();k.addClass("ui-noselect");n.css("cursor","grabbing");Q=a.pageX-q.get(0).offsetLeft;U=a.pageY-q.get(0).offsetTop;K.on("mousemove",function(a){var c=a.pageX-Q;a=a.pageY-U;c<l/2&&(c=l/2);a<v/2&&(a=v/2);c>u-l/2&&(c=u-l/2);a>x-v/2&&(a=x-v/2);q.css({left:c+"px",top:a+"px"})})});n.add(K).mouseup(function(){n.get(0).style.removeProperty("cursor");k.removeClass("ui-noselect");K.off("mousemove")})}b.addClass("ui-dialog-mask-show");q.addClass("ui-dialog-wrapper-show");q.on("animationend",function(){q.off("animationend");a.isFunction(e.afterOpen)&&e.afterOpen();var c=a(".ui-dialog-autoclose",q);if(c)c.css("transitionDuration",~~e.autoClose+"ms").addClass("ui-dialog-autoclose-active").on("transitionend",function(){m.dialog.close(k,f)})});return k}},drawer:{init:function(){return t.drawer("init",arguments)},open:function(){return t.drawer("open",arguments)},close:function(){return t.drawer("close",arguments)},remove:function(){return t.drawer("remove",arguments)}},email:function(b,d){var c=a.extend({},{email:"126.com 139.com 163.com gmail.com hotmail.com msn.com outlook.com qq.com sina.com sohu.com tom.com yahoo.com".split(" "),placeholder:"",name:"",id:"",clear:!1},d);return a(b).each(function(){var b=a(this);b.html('\x3cdiv class\x3d"ui-email-container"\x3e\x3cdiv class\x3d"ui-email-layer"\x3e\x3c/div\x3e\x3cinput type\x3d"text" spellcheck\x3d"false" maxlength\x3d"128" autocomplete\x3d"off"\x3e\x3cdiv class\x3d"ui-email-suffix ui-noselect"\x3e\x3ci\x3e'+C.arrowLine(10,10)+"\x3c/i\x3e\x3cspan\x3e\x3c/span\x3e\x3cul\x3e\x3c/ul\x3e\x3c/div\x3e\x3c/div\x3e");var d=b.children(),e=d.children().first(),l=e.next(),f=l.next(),k=b.find("i"),q=k.next(),n=q.next();e.css("lineHeight",d.innerHeight()-2+"px");l.attr("placeholder",c.placeholder);c.name&&l.attr("name",c.name);c.id&&l.attr("id",c.id);c.clear&&(d.append('\x3cdiv class\x3d"ui-email-clear"\x3e'+C.close(10,10,"#fff")+"\x3c/div\x3e"),l.css({width:"calc(100% - 159px)",paddingRight:"28px"}));var p=d.find(".ui-email-clear");p.hide().click(function(){l.val("").focus();p.hide();e.html("")});l.on({valueChange:function(a,c){p[c?"show":"hide"]();e.html(c)},focus:function(){e.hide();var b=l.val();a.each(c.email,function(a,c){b=b.replace("@"+c,"")});l.val(b);e.html(b)},blur:function(){e.show();var a=l.val(),a=a.replace(/[^\w-]/g,"");l.val(a?a+q.text():"");e.html(a||"")}});if(Array.isArray(c.email)&&c.email.length){var z="";a.each(c.email,function(a,c){z+="\x3cli\x3e\x3cb\x3e@\x3c/b\x3e"+c+"\x3c/li\x3e"});n.html(z).hide();d=n.find("li").first();d.addClass("active");q.html(d.html());f.click(function(){n.toggle();k.toggleClass("active")}).on("click","li",function(){a(this).addClass("active").siblings().removeClass("active");var c=a(this).text();q.html(c);l.val()&&l.val(l.val().replace(/@(.*)/g,"")+c)})}b=b.parents("form");if(b.length)b.on("reset",function(){e.html("").hide()});K.on("click contextmenu",function(a){f.is(a.target)||f.has(a.target).length||(n.hide(),k.removeClass("active"))})})},inputNumber:function(b,d){function c(a,c){var e=String(g.step),b=e.indexOf(".");a.val(-1<b?c.toFixed(e.substr(b+1).length):c)}var g=a.extend({},{defaultValue:0,max:Infinity,min:-Infinity,step:1,name:"",id:"",editable:!1,disabled:!1},d);return a(b).each(function(){function b(a){d.hasClass("ui-inputnumber-disabled")||(a(),p=!0,n=window.setTimeout(function(){p&&(q=window.setInterval(a,100));window.clearTimeout(n)},1E3))}var e=a(this);e.html('\x3cdiv class\x3d"ui-inputnumber-container ui-noselect"\x3e\x3cdiv class\x3d"ui-inputnumber-decrease"\x3e\x3c/div\x3e\x3cinput type\x3d"text" autocomplete\x3d"off" spellcheck\x3d"false" max\x3d"Infinity" min\x3d"-Infinity" value\x3d'+(g.defaultValue>g.max||g.defaultValue<g.min?0:g.defaultValue)+'\x3e\x3cdiv class\x3d"ui-inputnumber-increase"\x3e\x3c/div\x3e\x3c/div\x3e').data("ui-inputnumber-options",g);var d=e.children(),f=d.children(),e=f.eq(0),k=f.eq(1),f=f.eq(2);e.html(C.decrease(17,17,"#666"));f.html(C.increase(17,17,"#666"));k.on({focus:function(){d.addClass("active")},blur:function(){d.removeClass("active");var b=parseFloat(k.val());b<g.min&&(b=g.min);b>g.max&&(b=g.max);a.isNumeric(k.val())||(b=0);c(k,b)}});g.editable||k.off("focus blur").attr("readonly",!0).css("pointerEvents","none");g.disabled&&d.addClass("ui-inputnumber-disabled");g.name&&k.attr("name",g.name);g.id&&k.attr("id",g.id);var q=null,n=null,p=!1;e.mousedown(function(){b(function(){var b=k.val();a.isNumeric(b)||(b=g.defaultValue);b=parseFloat(b);b>g.min&&(b-=parseFloat(g.step));b<g.min&&(b=g.min);c(k,b)})});f.mousedown(function(){b(function(){var b=k.val();a.isNumeric(b)||(b=g.defaultValue);b=parseFloat(b);b<g.max&&(b+=parseFloat(g.step));b>g.max&&(b=g.max);c(k,b)})});K.mouseup(function(){p=!1;window.clearInterval(q);window.clearTimeout(n)})})},loading:function(b,d){var c=a.extend({},{text:"",onlyShowText:!1,zoom:1},d);return a(b).each(function(){var b=a(this);if(!b.children(".ui-loading-container").length){b.append('\x3cdiv class\x3d"ui-loading-container ui-noselect"\x3e\x3cdiv class\x3d"ui-loading-wrapper"\x3e\x3cdiv class\x3d"ui-loading-box"\x3e\x3cdiv class\x3d"ui-loading-ring"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-loading-text"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e');var d=b.children(".ui-loading-container"),e=d.find(".ui-loading-wrapper"),l=d.find(".ui-loading-box"),f=d.find(".ui-loading-text");b.is("body")?d.css("position","fixed"):"static"===b.css("position")&&b.data("ui-loading-position",b.get(0).style.position).css("position","relative");c.text?(f.text(c.text),c.onlyShowText&&(l.remove(),f.css("bottom","20px"))):(l.css("marginTop","12px"),f.remove());a.isNumeric(c.zoom)&&1<c.zoom&&e.css("transform","scale("+c.zoom+")")}})},message:{info:function(){return t.message("info",arguments)},success:function(){return t.message("success",arguments)},warn:function(){return t.message("warn",arguments)},error:function(){return t.message("error",arguments)},close:function(b){a(b||".ui-message-wrapper").addClass("ui-message-hide").on("animationend",function(){var b=a(this).data("ui-message-afterclose");b&&b();a(this).remove();a(".ui-message-wrapper").length||a(".ui-message-container").remove()})}},notice:{info:function(){return t.notice("info",arguments)},success:function(){return t.notice("success",arguments)},warn:function(){return t.notice("warn",arguments)},error:function(){return t.notice("error",arguments)},close:function(b){a(b||".ui-notice-wrapper").addClass("ui-notice-hide").on("animationend",function(){var b=a(this).data("ui-notice-afterclose");b&&b();a(this).remove();a(".ui-notice-wrapper").length||a(".ui-notice-container").remove()})}},radio:function(b,d){var c=a.extend({},{data:[],vertical:!1,change:a.noop},d),g=a.isFunction(c.change);if(Array.isArray(c.data)&&c.data.length){var h="";c.data.forEach(function(a){var c="ui-radio-id-"+t.randomID();h+='\x3cdiv\x3e\x3clabel for\x3d"'+c+'" class\x3d"ui-radio'+(a.checked?" ui-radio-checked":"")+'"\x3e\x3ci\x3e\x3c/i\x3e\x3cspan\x3e'+a.text+'\x3c/span\x3e\x3c/label\x3e\x3cinput type\x3d"radio" value\x3d"'+a.value+'" id\x3d"'+c+'" name\x3d"'+(a.name||"")+'" '+(a.checked?"checked":"")+' style\x3d"display:none;"\x3e\x3c/div\x3e'});h='\x3cdiv class\x3d"ui-radio-container ui-noselect'+(c.vertical?" ui-radio-vertical":"")+'"\x3e'+h+"\x3c/div\x3e";return a(b).each(function(){function b(){d.html(h).find(".ui-radio-checked:not(:last)").removeClass("ui-radio-checked")}var d=a(this);b();var f=d.children().parents("form");if(f.length)f.last().on("reset",b);d.on("click",".ui-radio",function(){a(this).addClass("ui-radio-checked").parent().siblings().find("label").removeClass("ui-radio-checked");if(g){var b=[];d.find(".ui-radio-checked + input").each(function(){b.push(a(this).val())});c.change(b)}})})}},select:function(b,d){var c=a.extend({},{data:[],multiple:!1,search:!1,placeholder:"\u8bf7\u9009\u62e9",name:"",id:"",change:a.noop},d),g=a.isFunction(c.change),h="",e=[];c.data.forEach(function(a){e.push(a.text);h+='\x3cli data-text\x3d"'+a.text+'" data-value\x3d"'+a.value+'" class\x3d"ui-select'+(a.selected?" ui-select-selected":"")+'"\x3e\x3ci\x3e\x3c/i\x3e\x3cspan\x3e'+a.text+"\x3c/span\x3e\x3c/li\x3e"});h='\x3cdiv class\x3d"ui-select-container ui-noselect"\x3e\x3cdiv class\x3d"ui-select-input ui-noselect"\x3e\x3cinput type\x3d"text" class\x3d"ui-noselect" spellcheck\x3d"false" placeholder\x3d"'+c.placeholder+'" readonly\x3e\x3ci\x3e'+C.arrow(12,12)+'\x3c/i\x3e\x3c/div\x3e\x3cdiv class\x3d"ui-select-wrapper" style\x3d"display:none;"\x3e\x3cul\x3e'+h+"\x3c/ul\x3e\x3c/div\x3e\x3c/div\x3e";return a(b).each(function(){var b=a(this);b.html(h).height(34);var d=b.find(".ui-select-container"),k=d.find("input"),q=k.parent(),n=d.find(".ui-select-wrapper"),p=d.find("li"),z="";p.each(function(){z+='\x3coption value\x3d"'+a(this).attr("data-value")+'"'+(a(this).hasClass("ui-select-selected")?"selected":"")+"\x3e"+a(this).attr("data-text")+"\x3c/option\x3e"});b.append('\x3cselect name\x3d"'+c.name+'" id\x3d"'+c.id+'" style\x3d"display:none;"\x3e'+z+"\x3c/select\x3e");var m=b.find("option"),A=d.find(".ui-select-selected");if(c.multiple){b.data("ui-select-multiple",!0);m.parent().prop("multiple",!0);var t=[];A.each(function(){t.push(a(this).attr("data-value"))});k.val("\u5df2\u9009\u62e9 "+t.length+" \u9879")}else A.each(function(c){c&&a(this).removeClass("ui-select-selected")}),k.val(A.attr("data-text"));if(c.search){var u=!1;n.prepend('\x3cinput type\x3d"text" placeholder\x3d"\u8bf7\u8f93\u5165\u5173\u952e\u8bcd"\x3e');n.find("input").on("valueChange",function(c,b){b?(u=!1,p.hide(),a.each(e,function(a,c){-1<c.indexOf(b)&&(u=!0,p.eq(a).show())}),u||n.find("p").length||n.append("\x3cp\x3e\u65e0\u5339\u914d\u6570\u636e\x3c/p\x3e"),u&&n.find("p").remove()):(u=!1,p.show(),n.find("p").remove())})}n.on("click","li",function(){var b=a(this),e=m.eq(b.index());if(c.multiple){if(b.toggleClass("ui-select-selected"),b.hasClass("ui-select-selected")?e.prop("selected",!0):e.removeProp("selected"),g){var f=[];d.find(".ui-select-selected").each(function(){f.push(a(this).attr("data-value"))});c.change(f);k.val("\u5df2\u9009\u62e9 "+f.length+" \u9879")}}else b.addClass("ui-select-selected").siblings().removeClass("ui-select-selected"),b=n.find(".ui-select-selected"),g&&c.change(b.attr("data-value")),n.hide().find("input").val(""),k.val(b.attr("data-text")),q.removeClass("active"),p.show(),e.prop("selected",!0)});A=b.parents("form");if(A.length)A.on("reset",function(){p.removeClass("ui-select-selected")});q.click(function(){q.toggleClass("active");a(".ui-select-wrapper").not(n).hide();n.toggle();n.is(":hidden")&&(n.find("input").val("").end().find("p").remove(),p.show())});K.on("click contextmenu",function(a){b.is(a.target)||b.has(a.target).length||(n.hide().find("input").val(""),q.removeClass("active"),n.find(".ui-select-selected").length||k.val(""),p.show(),n.find("p").remove())})})},switch:function(b,d){var c=a.extend({},{showText:!1,open:!1,change:a.noop},d),g=a.isFunction(c.change);return a(b).each(function(){var b=a(this);b.html('\x3cdiv class\x3d"ui-switch-container ui-noselect"\x3e\x3cdiv class\x3d"ui-switch-text"\x3e\u5f00\x3c/div\x3e\x3cdiv class\x3d"ui-switch-text active"\x3e\u5173\x3c/div\x3e\x3cdiv class\x3d"ui-switch-dot"\x3e\x3c/div\x3e\x3c/div\x3e');var e=b.find(".ui-switch-container"),d=e.find(".ui-switch-text"),f=e.find(".ui-switch-dot"),k=!1;c.showText||d.remove();c.open&&(e.add(f).addClass("active"),d.toggleClass("active"),k=!0);e.click(function(){e.add(d).add(f).toggleClass("active");k=!k;g&&c.change(k)})})},page:function(b,d){function c(a){a.addClass("active").siblings().removeClass("active")}function g(a){if(10<k)switch(a){case "first":q.css("marginLeft",0);break;case "last":q.css("marginLeft",(10-k)*p+"px");break;case "prev":0===(f+1)%10&&0<f?(a=10<=f?-(f+1-10):0,q.css("marginLeft",a*p+"px")):~~((f+1)/10)<~~(k/10)&&(a=-(f+1-(f+1)%10),q.css("marginLeft",a*p+"px"));break;case "next":0===f%10&&f<k&&(a=10<=k-f?-f/10*10:-(k-10),q.css("marginLeft",a*p+"px"))}l.find("input").val(f+1)}function h(a){l.find("i").filter('[data-id\x3d"'+a+'"]').trigger("click");if(10<k){a=(a-10)/10+"";a=-1<a.indexOf(".")?a.substring(a.indexOf(".")+1):0;var b;10<=k-f?(b=-f/10*10+Number(a)-1,0===a&&(b+=10),-10<b&&(b=0)):b=10-k;q.css("marginLeft",b*p+"px")}}var e=a.extend({},{total:1,pageSize:1,currentPage:1,simple:!0,change:a.noop},d),l=a(b),f=0;b="";var k=e.total/e.pageSize,k=1<=k?0<e.total%e.pageSize?~~k+1:k:k;1>k&&(k=1);for(d=1;d<=k;d++)b+="\x3ci data-id\x3d"+d+"\x3e"+d+"\x3c/i\x3e";b="\x3cdiv\x3e"+b+"\x3c/div\x3e";(d="none"===l.css("display"))&&l.show();l.empty().css("overflow","hidden").html('\x3cdiv class\x3d"ui-page-container ui-noselect"\x3e\x3cdiv class\x3d"ui-page-first"\x3e\u9996\u9875\x3c/div\x3e\x3cdiv class\x3d"ui-page-prev"\x3e\u4e0a\u4e00\u9875\x3c/div\x3e\x3cdiv class\x3d"ui-page-wrapper"\x3e'+b+'\x3c/div\x3e\x3cdiv class\x3d"ui-page-next"\x3e\u4e0b\u4e00\u9875\x3c/div\x3e\x3cdiv class\x3d"ui-page-last"\x3e\u5c3e\u9875\x3c/div\x3e\x3c/div\x3e');var q=l.find(".ui-page-wrapper div"),n=q.children(),p=n.first().outerWidth(!0);n.first().addClass("active");q.width(p*k).on("click","i",function(){var b=a(this),d=b.attr("data-id");f=d-1;b.is(".active")||(a.isFunction(e.change)&&e.change(~~d),c(b));l.find("input").val(f+1)});10<=k&&q.parent().width(10*p);l.find(".ui-page-first").click(function(){0!==f&&(c(n.first()),f=0,g("first"),e.change(~~n.first().attr("data-id")))});l.find(".ui-page-last").click(function(){f!==k-1&&(c(n.last()),f=k-1,g("last"),e.change(~~n.last().attr("data-id")))});l.find(".ui-page-prev").click(function(){0<f&&(f--,g("prev"),c(n.eq(f)),e.change(~~n.eq(f).attr("data-id")))});l.find(".ui-page-next").click(function(){f<k-1&&(f++,c(n.eq(f)),g("next"),e.change(~~n.eq(f).attr("data-id")))});b=e.currentPage;b>k&&(b=k);1<e.currentPage&&h(b);e.simple||(l.prepend('\x3cdiv class\x3d"ui-page-total"\x3e\u5171 \x3cspan\x3e'+e.total+"\x3c/span\x3e \u6761\x3c/div\x3e"),l.append('\x3cdiv class\x3d"ui-page-to"\x3e\u8df3\u81f3\x3cinput type\x3d"text" maxlength\x3d"4"\x3e\u9875\x3c/div\x3e').find("input").val(b).valueChange(function(b,c){a(this).val(c.replace(/[^0-9]/g,""))}).on("focus",function(){var b=a(this);K.keyup(function(c){c=c.keyCode;if(108==c||13==c)if(c=a.trim(b.val()))c>k&&(c=k),a.isNumeric(Number(c))||(c=1),b.val(c),h(c)})}));l.children().wrapAll('\x3cdiv class\x3d"ui-page-outer"\x3e\x3c/div\x3e');d&&l.hide()},table:function(b,d){var c=a.extend({},{data:{thead:null,tbody:null},height:"auto",theadHeight:46,stripe:!1,hoverHighLight:!0,align:"left",autoNumber:null,selection:!1,defaultSelectedAll:!1},d);d=c.data.thead;var g=c.data.tbody;if(Array.isArray(d)&&d.length&&Array.isArray(g)&&g.length){var h=[],e="";d.forEach(function(b){h.push(b.label);e+='\x3ctd data-label\x3d"'+b.label+'" data-sort\x3d"'+(b.sort||"false")+'"style\x3d"width:'+(a.isNumeric(b.width)?b.width-21+"px":"auto")+'"\x3e\x3cdiv\x3e\x3cspan\x3e'+b.title+"\x3c/span\x3e\x3c/div\x3e\x3c/td\x3e"});var e="\x3ctable\x3e\x3ctr\x3e"+e+"\x3c/tr\x3e\x3c/table\x3e",l="",f;g.forEach(function(a,b){f="";h.forEach(function(b){f+='\x3ctd data-label\x3d"'+b+'" data-text\x3d"'+a[b]+'"\x3e\x3cdiv\x3e'+a[b]+"\x3cdiv\x3e\x3c/td\x3e"});l+='\x3ctr data-index\x3d"'+b+'"\x3e'+f+"\x3c/tr\x3e"});var l="\x3ctable\x3e"+l+"\x3c/table\x3e",k='\x3cdiv class\x3d"ui-table-container"\x3e\x3cdiv class\x3d"ui-table-thead"\x3e'+e+'\x3c/div\x3e\x3cdiv class\x3d"ui-table-tbody"\x3e'+l+"\x3c/div\x3e\x3c/div\x3e";return a(b).each(function(){function b(){var b=[];l.each(function(){b.push(a(this).innerWidth())});b.forEach(function(a,b){t.eq(b).innerWidth(a)})}function e(){m.find(".ui-table-autonumber").each(function(b){a(this).text(b+1)})}var d=a(this);d.html(k).addClass("ui-table-border");var g=d.children(),f=g.children().first(),h=f.next(),l=f.find("td"),m=h.find("table"),t=m.find("tr:first-child td"),D=c.autoNumber,C;a.isPlainObject(D)&&!a.isEmptyObject(D)&&(g.find("tr").prepend('\x3ctd class\x3d"ui-table-autonumber"\x3e\x3c/td\x3e'),C=g.find(".ui-table-autonumber"),h.find(".ui-table-autonumber"),C.width(D.width||30).first().text(D.text).addClass("ui-table-autonumber-title"),C.not(".ui-table-autonumber-title").each(function(b){a(this).text(b+1)}),D.align&&C.css("textAlign",D.align));if(c.selection){g.find("tr").prepend('\x3ctd class\x3d"ui-table-select"\x3e\x3ci\x3e\x3c/i\x3e\x3c/td\x3e');var H=f.find(".ui-table-select i"),D=h.find(".ui-table-select"),G=H.parent(),F=D.length;h.on("click",".ui-table-select i",function(){a(this).parent().toggleClass("ui-table-selected");var b=F===h.find(".ui-table-selected").length?"addClass":"removeClass";H.parent()[b]("ui-table-selected")});H.click(function(){G.toggleClass("ui-table-selected");var a=G.hasClass("ui-table-selected")?"addClass":"removeClass";h.find(".ui-table-select")[a]("ui-table-selected")});c.defaultSelectedAll&&G.add(D).addClass("ui-table-selected")}f.find('[data-sort\x3d"true"] div').append('\x3cspan class\x3d"ui-table-arrow"\x3e\x3ci class\x3d"ui-table-sort-up"\x3e\x3c/i\x3e\x3ci class\x3d"ui-table-sort-down"\x3e\x3c/i\x3e\x3c/span\x3e');D=0<m.height()-c.height-c.theadHeight;f.height(c.theadHeight);l.height(c.theadHeight-1).css("padding","0 10px");a.isNumeric(c.height)&&(g.height(c.height),h.height(c.height-c.theadHeight),D&&(g.addClass("ui-table-bodyscroll"),m.css("width","calc(100% + "+(f.outerWidth()-m.outerWidth())+"px)")));b();P.on("resize",b);c.stripe&&h.addClass("ui-table-stripe");g.addClass("ui-table-align-"+c.align);c.hoverHighLight&&h.addClass("ui-table-hoverhighlight");var B=h.html();d.data("ui-table-init",d.find("table").clone(!0));var v,r;a(".ui-table-arrow i").click(function(){r=[];var b=a(this),c=b.parent().parent().parent();v=c.index();b.toggleClass("active").siblings().removeClass("active");c.siblings().find(".active").removeClass("active");if(b.hasClass("active")){m.find("tr").each(function(){r.push([a(this).find("td").eq(v).attr("data-text"),a(this).get(0).outerHTML])});var d=r[0][0];r.sort(function(b){return a.isNumeric(d)?function(a,c){return b?a[0]-c[0]:c[0]-a[0]}:function(a,c){a=Date.parse(a[0]);c=Date.parse(c[0]);return b?a-c:c-a}}(!!b.hasClass("ui-table-sort-up")));var g="";r.forEach(function(a){g+=a[1]});g="\x3ctbody\x3e"+g+"\x3c/tbody\x3e";m.html(g);e()}else{var f=[];h.find(".ui-table-selected").each(function(){f.push(a(this).parent().attr("data-index"))});m.html(B).find(".ui-table-select").removeClass("ui-table-selected");f.forEach(function(a){m.find(".ui-table-select").eq(a).addClass("ui-table-selected")})}})})}},tabs:function(b,d){var c=a.extend({},{theme:"line",active:0},d);a(b).each(function(){function b(b,c){p.stop().animate({width:f.eq(b).innerWidth()+"px",left:function(){var c=0;f.each(function(d){d<b&&(c+=a(this).innerWidth())});return c+"px"}()},c?0:200)}var d=a(this),e=d.children().first(),l=e.next(),f=e.children(),k=c.active>f.length?f.length-1:c.active,m=d.width();300>m&&d.width(300);e.addClass("ui-tabs-header ui-noselect").append('\x3cdiv class\x3d"ui-tabs-line"\x3e\x3c/div\x3e');l.addClass("ui-tabs-content");var n=l.children(),p=e.find(".ui-tabs-line");n.hide().eq(k).show();"card"===c.theme&&(e.addClass("ui-tabs-card"),p.remove());b(k,!0);f.eq(k).addClass("ui-tabs-active").end().click(function(){if(!a(this).hasClass("ui-tabs-active")){var c=a(this).index();a(this).addClass("ui-tabs-active").siblings().removeClass("ui-tabs-active");n.eq(c).show().siblings().hide();b(c)}});var t=0;f.each(function(){t+=a(this).outerWidth(!0)});t>m&&f.wrapAll('\x3cdiv class\x3d"ui-tabs-wrapper"\x3e\x3c/div\x3e').parent().width(d.width())})},top:function(b,d){function c(b,c){var d=a(b);d.is(":hidden")&&P.scroll(function(){var a=P.scrollTop();300<a&&d.show();0===a&&d.hide()});d.click(function(){!g.is(":animated")&&g.scrollTop()&&g.animate({scrollTop:0},c)})}var g=a("html, body"),h=a.isNumeric(b);b&&!h&&c(a(b).last(),d||400);if(!b||h)a(".ui-top").length||a("body").append('\x3cdiv class\x3d"ui-top"\x3e\x3cdiv\x3e\x3c/div\x3e\x3c/div\x3e'),c("body \x3e .ui-top:last-child",h?b:400)},upload:function(b){var d=a.extend({},{url:"",data:null,name:"file",progress:"",multiple:!1,success:a.noop,error:a.noop},b);a(".ui-upload-file").remove();a("\x3cinput\x3e",{type:"file",style:"display:none","class":"ui-upload-file"}).appendTo("body");var c=a(".ui-upload-file").last();d.multiple&&c.attr("multiple","multiple");var g=[],h=a.Deferred();c.click().off("change").on("change",function(){var b=[];a.each(this.files,function(a,c){b.push(c)});var l=new FormData,f={url:d.url,type:"POST",cache:!1,processData:!1,contentType:!1};a.each(b,function(b,c){l.append(d.name,c);f.data=l;if(d.progress){c=a(d.progress);c.append(t.progress(b+1));var e=c.find('.ui-progress-container[data-id\x3d"'+(b+1)+'"]').not(".ui-progress-pending, .ui-progress-over"),h=e.find(".ui-progress-box").children(),k=e.find(".ui-progress-result");f.xhr=function(){var b=a.ajaxSettings.xhr();b.upload&&b.upload.addEventListener("progress",function(a){a=Math.floor(a.loaded/a.total*100)+"%";h.width(a);k.text(a);e.addClass("ui-progress-pending");"100"===a.replace("%","")&&(h.css("backgroundColor","#08ba61"),k.text("\u5b8c\u6210").css("color","#08ba61"),e.addClass("ui-progress-over").removeClass("ui-progress-pending"))},!1);return b}}g.push(a.ajax(f))});if(g.length)return a.when.apply(this,g).done(function(){h.resolve(arguments);a.isFunction(d.success)&&d.success(arguments)}).fail(function(){h.reject(arguments);a.isFunction(d.error)&&d.error(arguments)}),c.remove(),h.promise()});(T||Q.match("edge"))&&c.trigger("change");return h}};m.autoComplete.value=function(a){return a.find(".ui-autocomplete-container \x3e input").val()};m.datePicker.value=function(a){return a.data("ui-datepicker-value")};m.dialog.info=function(a,d){t.dialogShortcuts("info",a,d);return m.dialog};m.dialog.success=function(a,d){t.dialogShortcuts("success",a,d);return m.dialog};m.dialog.warn=function(a,d){t.dialogShortcuts("warn",a,d);return m.dialog};m.dialog.error=function(a,d){t.dialogShortcuts("error",a,d);return m.dialog};m.dialog.waiting=function(a){m.dialog({WAITING:a||"\u8bf7\u7b49\u5f85"})};m.dialog.prompt=function(){var b=arguments,d={title:"",placeholder:"",autofocus:!0,maxlength:Infinity,type:"text",callback:a.noop},c={};if(a.isPlainObject(b[0]))c=b[0];else{c.title=b[0];var g=b.length;2===g&&(c.callback=b[1]);3===g&&(c.placeholder=b[1],c.callback=b[2])}b=a.extend({},d,c);m.dialog({PROMPT:b});return m.dialog};m.dialog.prompt.errorFeedBack=function(b){var d=a(".ui-dialog-prompt");b?(d.prepend("\x3cp\x3e"+b+"\x3c/p\x3e"),d.find("input").focus()):d.find("p").remove()};m.dialog.okNotClose=function(){a(".ui-dialog-ok").addClass("ui-dialog-notclose");return m.dialog};m.dialog.close=function(b,d){var c=(d||window).document;b=a(b||".ui-dialog-container",c);b.length&&b.each(function(){var b=a(this),d=a(".ui-dialog-wrapper",b),e=a(".ui-dialog-mask",b);d.addClass("ui-dialog-wrapper-hide");d.on("animationend",function(){var d=b.data("ui-dialog-afterclose");d&&d();b.remove();a("body",c).removeClass("ui-body-noscroll")});e.addClass("ui-dialog-mask-hide")})};m.dialog.remove=function(b,d){a(b||".ui-dialog-container",(d||window).document).remove()};m.dialog.ok=function(b){var d=a(".ui-dialog-shortcuts-mark .ui-dialog-ok"),c=a.isFunction(b);d.click(function(){if(d.hasClass("ui-dialog-notclose"))d.css("pointerEvents","none"),c&&b(d);else a(".ui-dialog-shortcuts-mark").on("animationend",function(){c&&b()})})};m.inputNumber.value=function(a){return parseFloat(a.find("input").val())};m.inputNumber.reset=function(a){return a.find("input").val(a.data("ui-inputnumber-options").defaultValue)};m.select.value=function(b){var d=b.data("ui-select-multiple");b=b.find(".ui-select-selected");if(d){var c=[];b.each(function(){c.push(a(this).attr("data-value"))});return c}return b.attr("data-value")};m.loading.close=function(a){var b=a.data("ui-loading-position");b?a.css("position",b):a.get(0).style.removeProperty("position");a.children(".ui-loading-container").remove()};m.switch.isOpen=function(a){return a.children().hasClass("active")};m.radio.value=function(a){return a.find(".ui-radio-checked + input").val()};m.checkbox.value=function(b){var d=[];b.find(".ui-checkbox-checked + input").each(function(){d.push(a(this).val())});return d};m.checkbox.all=function(a){a.find(".ui-checkbox").addClass("ui-checkbox-checked").next().prop("checked",!0)};m.checkbox.none=function(a){a.find(".ui-checkbox").removeClass("ui-checkbox-checked").next().removeProp("checked")};m.checkbox.reverse=function(b){b.find(".ui-checkbox").toggleClass("ui-checkbox-checked").each(function(){var b=a(this);b.hasClass("ui-checkbox-checked")?b.next().prop("checked",!0):b.next().removeProp("checked")})};m.email.value=function(a){return a.find("input").val()};m.table.selected=function(b){var d=[];b.find(".ui-table-tbody .ui-table-selected").each(function(){var b={};a(this).siblings("[data-label]").each(function(){b[a(this).attr("data-label")]=a(this).attr("data-text")});d.push(b)});return d};m.table.toExcel=function(b,d){d=a.extend({},{name:"Excel",keepSort:!1},d);if(b.children().hasClass("ui-table-container")&&a.isFunction(window.TableExport)&&a.isFunction(window.saveAs)&&"object"===typeof window.XLSX){var c=Math.random().toString(36).substr(2);b=d.keepSort?b.find("table").clone(!0):b.data("ui-table-init");a("body").append('\x3ctable id\x3d"ui-table-excel-'+c+'"\x3e\x3ctbody\x3e\x3c/tbody\x3e\x3c/table\x3e');var g=a("#ui-table-excel-"+c);b.each(function(){a(this).find(".ui-table-select, .ui-table-autonumber, .ui-table-arrow").remove();a(this).find("tr").appendTo(g.children())});g.hide().find("tr, td").removeAttr("style class data-index data-label data-text data-sort");TableExport(g.get(0),{headers:!0,footers:!0,formats:["xlsx"],filename:d.name,bootstrap:!1,exportButtons:!0,position:"bottom",ignoreRows:null,ignoreCols:null,trimWhitespace:!0});g.find("caption button").click();g.remove()}};!function d(a){Object.freeze(a);Object.keys(a).forEach(function(c){"object"===typeof a[c]&&d(a[c])})}(m);return m});