!function(p){"use strict";function i(){this.v="2.9.13"}function h(e,t){t=t||"log",p.console&&console[t]&&console[t]("layui error hint: "+e)}var e,y=p.document,m={modules:{},status:{},timeout:10,event:{}},t=p.LAYUI_GLOBAL||{},g=(e=y.currentScript?y.currentScript.src:function(){for(var e,t=y.scripts,n=t.length-1,i=n;01e3*m.timeout/4?h(c+" is not a valid module","error"):void(m.status[c]?f():setTimeout(e,4))}())}function f(){t.push(layui[c]),11e3*m.timeout/4?h(c+" is not a valid module","error"):void("string"==typeof m.modules[c]&&m.status[c]?f():setTimeout(e,4))}():((a=y.createElement("script")).async=!0,a.charset="utf-8",a.src=o+((l=!0===m.version?m.v||(new Date).getTime():m.version||"")?"?v="+l:""),s.appendChild(a),!a.attachEvent||a.attachEvent.toString&&a.attachEvent.toString().indexOf("[native code")<0||v?a.addEventListener("load",function(e){u(e,o)},!1):a.attachEvent("onreadystatechange",function(e){u(e,o)}),m.modules[c]=o)),r},i.prototype.disuse=function(e){var n=this;return e=n.isArray(e)?e:[e],n.each(e,function(e,t){m.status[t],delete n[t],delete x[t],delete n.modules[t],delete m.status[t],delete m.modules[t]}),n},i.prototype.getStyle=function(e,t){return(e=e.currentStyle||p.getComputedStyle(e,null))[e.getPropertyValue?"getPropertyValue":"getAttribute"](t)},i.prototype.link=function(i,a,e){var o=this,t=y.getElementsByTagName("head")[0],n=y.createElement("link"),r="layuicss-"+((e="string"==typeof a?a:e)||i).replace(/\.|\//g,""),l="creating",s=0;return n.href=i+(m.debug?"?v="+(new Date).getTime():""),n.rel="stylesheet",n.id=r,n.media="all",y.getElementById(r)||t.appendChild(n),"function"==typeof a&&function e(t){var n=y.getElementById(r);return++s>1e3*m.timeout/100?h(i+" timeout"):void(1989===parseInt(o.getStyle(n,"width"))?(t===l&&n.removeAttribute("lay-status"),n.getAttribute("lay-status")===l?setTimeout(e,100):a()):(n.setAttribute("lay-status",l),setTimeout(function(){e(l)},100)))}(),o},i.prototype.addcss=function(e,t,n){return layui.link(m.dir+"css/"+e,t,n)},m.callback={},i.prototype.factory=function(e){if(layui[e])return"function"==typeof m.callback[e]?m.callback[e]:null},i.prototype.img=function(e,t,n){var i=new Image;if(i.src=e,i.complete)return t(i);i.onload=function(){i.onload=null,"function"==typeof t&&t(i)},i.onerror=function(e){i.onerror=null,"function"==typeof n&&n(e)}},i.prototype.config=function(e){for(var t in e=e||{})m[t]=e[t];return this},i.prototype.modules=function(){var e,t={};for(e in x)t[e]=x[e];return t}(),i.prototype.extend=function(e){for(var t in e=e||{})this[t]||this.modules[t]?h(t+" Module already exists","error"):this.modules[t]=e[t];return this},i.prototype.router=i.prototype.hash=function(e){var n={path:[],search:{},hash:((e=e||location.hash).match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)&&(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],this.each(e,function(e,t){/^\w+=/.test(t)?(t=t.split("="),n.search[t[0]]=t[1]):n.path.push(t)})),n},i.prototype.url=function(e){var a,t;return{pathname:(e?((e.match(/\.[^.]+?\/.+/)||[])[0]||"").replace(/^[^\/]+/,"").replace(/\?.+/,""):location.pathname).replace(/^\//,"").split("/"),search:(a={},t=(e?((e.match(/\?.+/)||[])[0]||"").replace(/\#.+/,""):location.search).replace(/^\?+/,"").split("&"),this.each(t,function(e,t){var n=t.indexOf("="),i=n<0?t.substr(0,t.length):0!==n&&t.substr(0,n);i&&(a[i]=0(u.innerHeight||p.documentElement.clientHeight)},f.getStyleRules=function(e,n){if(e)return e=(e=e.sheet||e.styleSheet||{}).cssRules||e.rules,"function"==typeof n&&layui.each(e,function(e,t){if(n(t,e))return!0}),e},f.style=function(e){e=e||{};var t=f.elem("style"),n=e.text||"",i=e.target;if(n)return"styleSheet"in t?(t.setAttribute("type","text/css"),t.styleSheet.cssText=n):t.innerHTML=n,t.id="LAY-STYLE-"+(e.id||(n=f.style.index||0,f.style.index++,"DF-"+n)),i&&((e=f(i).find("#"+t.id))[0]&&e.remove(),f(i).append(t)),t},f.position=function(e,t,n){var i,a,o,r,l,s,c,d;t&&(n=n||{},e!==p&&e!==f("body")[0]||(n.clickType="right"),c="right"===n.clickType?{left:(c=n.e||u.event||{}).clientX,top:c.clientY,right:c.clientX,bottom:c.clientY}:e.getBoundingClientRect(),l=t.offsetWidth,s=t.offsetHeight,i=function(e){return p.body[e=e?"scrollLeft":"scrollTop"]|p.documentElement[e]},a=function(e){return p.documentElement[e?"clientWidth":"clientHeight"]},o="margin"in n?n.margin:5,d=c.left,r=c.bottom,"center"===n.align?d-=(l-e.offsetWidth)/2:"right"===n.align&&(d=d-l+e.offsetWidth),(d=d+l+o>a("width")?a("width")-l-o:d)a()&&(c.top>s+o&&c.top<=a()?r=c.top-s-2*o:n.allowBottomOut||(r=a()-s-2*o)<0&&(r=0)),(l=n.position)&&(t.style.position=l),s=n.offset?n.offset[0]:0,c=n.offset?n.offset[1]:0,t.style.left=d+("fixed"===l?0:i(1))+s+"px",t.style.top=r+("fixed"===l?0:i())+c+"px",f.hasScrollbar()||(d=t.getBoundingClientRect(),!n.SYSTEM_RELOAD&&d.bottom+o>a()&&(n.SYSTEM_RELOAD=!0,setTimeout(function(){f.position(e,t,n)},50))))},f.options=function(t,n){if(n="object"==typeof n?n:{attr:n},t===p)return{};var t=f(t),i=n.attr||"lay-options",t=t.attr(i);try{return new Function("return "+(t||"{}"))()}catch(e){return layui.hint().error(n.errorText||[i+'="'+t+'"',"\n parseerror: "+e].join("\n"),"error"),{}}},f.isTopElem=function(n){var e=[p,f("body")[0]],i=!1;return f.each(e,function(e,t){if(t===n)return i=!0}),i},f.clipboard={writeText:function(t){var n=String(t.text);function e(){var e=p.createElement("textarea");e.value=n,e.style.position="fixed",e.style.opacity="0",e.style.top="0px",e.style.left="0px",p.body.appendChild(e),e.select();try{p.execCommand("copy"),"function"==typeof t.done&&t.done()}catch(e){"function"==typeof t.error&&t.error(e)}finally{e.remove?e.remove():p.body.removeChild(e)}}navigator&&"clipboard"in navigator?navigator.clipboard.writeText(n).then(t.done,function(){e()}):e()}},f.passiveSupported=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});u.addEventListener("test",null,t),u.removeEventListener("test",null,t)}catch(e){}return e}(),f.touchEventsSupported=function(){return"ontouchstart"in u},f.touchSwipe=function(e,t){var n,i,a,o=t,r=f(e)[0];r&&f.touchEventsSupported()&&(n={pointerStart:{x:0,y:0},pointerEnd:{x:0,y:0},distanceX:0,distanceY:0,direction:"none",timeStart:null},t=function(e){1===e.touches.length&&(r.addEventListener("touchmove",i,!!f.passiveSupported&&{passive:!1}),r.addEventListener("touchend",a),r.addEventListener("touchcancel",a),n.timeStart=Date.now(),n.pointerStart.x=n.pointerEnd.x=e.touches[0].clientX,n.pointerStart.y=n.pointerEnd.y=e.touches[0].clientY,n.distanceX=n.distanceY=0,n.direction="none",o.onTouchStart)&&o.onTouchStart(e,n)},i=function(e){e.preventDefault(),n.pointerEnd.x=e.touches[0].clientX,n.pointerEnd.y=e.touches[0].clientY,n.distanceX=n.pointerStart.x-n.pointerEnd.x,n.distanceY=n.pointerStart.y-n.pointerEnd.y,Math.abs(n.distanceX)>Math.abs(n.distanceY)?n.direction=0]|&(?=#[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e}};n.prototype.tagExp=function(e,t,n){var i=this.config;return s((t||"")+i.open+["#([\\s\\S])+?","([^{#}])*?"][e||0]+i.close+(n||""))},n.prototype.parse=function(t,n){var i=this,a=i.config,o=t,r=s("^"+a.open+"#"),l=s(a.close+"$");if("string"!=typeof t)return t;t='"use strict";var view = "'+t.replace(/\s+|\r|\t|\n/g," ").replace(s(a.open+"#"),a.open+"# ").replace(s(a.close+"}"),"} "+a.close).replace(/\\/g,"\\\\").replace(s(a.open+"!(.+?)!"+a.close),function(e){return e.replace(s("^"+a.open+"!"),"").replace(s("!"+a.close),"").replace(s(a.open+"|"+a.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(i.tagExp(),function(e){return'";'+(e=e.replace(r,"").replace(l,"")).replace(/\\(.)/g,"$1")+';view+="'}).replace(i.tagExp(1),function(e){var t='"+laytpl.escape(';return e.replace(/\s/g,"")===a.open+a.close?"":(e=e.replace(s(a.open+"|"+a.close),""),/^=/.test(e)?e=e.replace(/^=/,""):/^-/.test(e)&&(e=e.replace(/^-/,""),t='"+('),t+e.replace(/\\(.)/g,"$1")+')+"')})+'";return view;';try{return i.cache=t=new Function("d, laytpl",t),t(n,c)}catch(e){return delete i.cache,t=e,n=o,i="Laytpl Error: ","object"==typeof console&&console.error(i+t+"\n"+(n||"")),i+t}},n.prototype.render=function(e,t){e=e||{};e=this.cache?this.cache(e,c):this.parse(this.template,e);return"function"==typeof t&&t(e),e};t.config=function(e){for(var t in e=e||{})i[t]=e[t]},t.v="2.0.0",e("laytpl",t)}),layui.define(function(e){"use strict";function t(e){this.config=e||{},this.config.index=++u.index,this.render(!0)}var o=document,r="getElementById",d="getElementsByTagName",s="layui-disabled",u=(t.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},t.prototype.view=function(){var i,e,n,a=this.config,o=a.groups="groups"in a?Number(a.groups)||0:5,r=(a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=Number(a.count)||0,a.curr=Number(a.curr)||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=Number(a.limit)||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages?a.curr=a.pages:a.curr<1&&(a.curr=1),o<0?o=1:o>a.pages&&(o=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页",a.pages>o?Math.ceil((a.curr+(1'+a.prev+"":"",page:function(){var e=[];if(a.count<1)return"";1'+(a.first||1)+"");var t=Math.floor((o-1)/2),n=1a.pages?a.pages:t:o;for(i-n...');n<=i;n++)n===a.curr?e.push('"+n+""):e.push(''+n+"");return a.pages>o&&a.pages>i&&!1!==a.last&&(i+1...'),0!==o)&&e.push(''+(a.last||a.pages)+""),e.join("")}(),next:a.next?''+a.next+"":"",count:''+(e="object"==typeof a.countText?a.countText:["共 "," 条"])[0]+a.count+e[1]+"",limit:(i=['"),refresh:['','',""].join(""),skip:[''+(e="object"==typeof a.skipText?a.skipText:["到第","页","确定"])[0],'',e[1]+'",""].join("")};return['
',(n=[],layui.each(a.layout,function(e,t){l[t]&&n.push(l[t])}),n.join("")),"
"].join("")},t.prototype.jump=function(e,t){if(e){var n=this,i=n.config,a=e.children,o=e[d]("button")[0],r=e[d]("input")[0],e=e[d]("select")[0],l=function(){var e=Number(r.value.replace(/\s|\D/g,""));e&&(i.curr=e,n.render())};if(t)return l();for(var s=0,c=a.length;si.pages||(i.curr=e,n.render())});e&&u.on(e,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,n.render()}),o&&u.on(o,"click",function(){l()})}},t.prototype.skip=function(n){var i,e;n&&(i=this,e=n[d]("input")[0])&&u.on(e,"keyup",function(e){var t=this.value,e=e.keyCode;/^(37|38|39|40)$/.test(e)||(/\D/.test(t)&&(this.value=t.replace(/\D/,"")),13===e&&i.jump(n,!0))})},t.prototype.render=function(e){var t=this,n=t.config,i=t.type(),a=t.view(),i=(2===i?n.elem&&(n.elem.innerHTML=a):3===i?n.elem.html(a):o[r](n.elem)&&(o[r](n.elem).innerHTML=a),n.jump&&n.jump(n,e),o[r]("layui-laypage-"+n.index));t.jump(i),n.hash&&!e&&(location.hash="!"+n.hash+"="+n.curr),t.skip(i)},{render:function(e){return new t(e).index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(t,e,n){return t.attachEvent?t.attachEvent("on"+e,function(e){e.target=e.srcElement,n.call(t,e)}):t.addEventListener(e,n,!1),this}});e("laypage",u)}),function(a,v){"use strict";function o(){var t=this,e=t.config.id;return(o.that[e]=t).inst={hint:function(e){t.hint.call(t,e)},reload:function(e){t.reload.call(t,e)},config:t.config}}function x(e){var t,n=this,i=(n.index=++b.index,n.config=lay.extend({},n.config,b.config,e),lay(e.elem||n.config.elem));return 1请重新选择",invalidDate:"不在有效日期或时间范围内",formatError:["日期格式不合法
必须遵循下述格式:
","
已为你重置"],preview:"当前选中的结果"},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"},timeout:"End time cannot be less than start Time
Please re-select",invalidDate:"Invalid date",formatError:["The date format error
Must be followed:
","
It has been reset"],preview:"The selected result"}};return e[this.config.lang]||e.cn},x.prototype.markerOfChineseFestivals={"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-10-1":"国庆","0-12-25":"圣诞"},x.prototype.reload=function(e){this.config=lay.extend({},this.config,e),this.init()},x.prototype.init=function(){var r=this,l=r.config,e="static"===l.position,t={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};l.elem=lay(l.elem),l.eventElem=lay(l.eventElem),l.elem[0]&&("array"!==layui.type(l.theme)&&(l.theme=[l.theme]),l.fullPanel&&("datetime"!==l.type||l.range)&&delete l.fullPanel,r.rangeStr=l.range?"string"==typeof l.range?l.range:"-":"",r.rangeLinked=!(!l.range||!l.rangeLinked||"date"!==l.type&&"datetime"!==l.type),r.autoCalendarModel=function(){var e=r.rangeLinked;return r.rangeLinked=l.range&&("date"===l.type||"datetime"===l.type)&&(!r.startDate||!r.endDate||r.startDate&&r.endDate&&r.startDate.year===r.endDate.year&&r.startDate.month===r.endDate.month),lay(r.elem)[r.rangeLinked?"addClass":"removeClass"]("layui-laydate-linkage"),r.rangeLinked!=e},r.autoCalendarModel.auto=r.rangeLinked&&"auto"===l.rangeLinked,"array"===layui.type(l.range)&&(r.rangeElem=[lay(l.range[0]),lay(l.range[1])]),t[l.type]||(a.console&&console.error&&console.error("laydate type error:'"+l.type+"' is not supported"),l.type="date"),l.format===t.date&&(l.format=t[l.type]||t.date),r.format=o.formatArr(l.format),l.weekStart&&!/^[0-6]$/.test(l.weekStart)&&(t=r.lang(),l.weekStart=t.weeks.indexOf(l.weekStart),-1===l.weekStart)&&(l.weekStart=0),r.EXP_IF="",r.EXP_SPLIT="",lay.each(r.format,function(e,t){e=new RegExp(f).test(t)?"\\d{"+(new RegExp(f).test(r.format[0===e?e+1:e-1]||"")?/^yyyy|y$/.test(t)?4:t.length:/^yyyy$/.test(t)?"1,4":/^y$/.test(t)?"1,308":"1,2")+"}":"\\"+t,r.EXP_IF=r.EXP_IF+e,r.EXP_SPLIT=r.EXP_SPLIT+"("+e+")"}),r.EXP_IF_ONE=new RegExp("^"+r.EXP_IF+"$"),r.EXP_IF=new RegExp("^"+(l.range?r.EXP_IF+"\\s\\"+r.rangeStr+"\\s"+r.EXP_IF:r.EXP_IF)+"$"),r.EXP_SPLIT=new RegExp("^"+r.EXP_SPLIT+"$",""),r.isInput(l.elem[0])||"focus"===l.trigger&&(l.trigger="click"),l.elem.attr("lay-key",r.index),l.eventElem.attr("lay-key",r.index),l.elem.attr(s,l.id),lay.each(["min","max"],function(e,t){var n=[],i=[];if("number"==typeof l[t])var a=l[t],o=new Date,o=r.newDate({year:o.getFullYear(),month:o.getMonth(),date:o.getDate(),hours:e?23:0,minutes:e?59:0,seconds:e?59:0}).getTime(),n=[(e=new Date(a?a<864e5?o+864e5*a:a:o)).getFullYear(),e.getMonth()+1,e.getDate()],i=[e.getHours(),e.getMinutes(),e.getSeconds()];else if("string"==typeof l[t])n=(l[t].match(/\d+-\d+-\d+/)||[""])[0].split("-"),i=(l[t].match(/\d+:\d+:\d+/)||[""])[0].split(":");else if("object"==typeof l[t])return l[t];l[t]={year:0|n[0]||(new Date).getFullYear(),month:n[1]?(0|n[1])-1:(new Date).getMonth(),date:0|n[2]||(new Date).getDate(),hours:0|i[0],minutes:0|i[1],seconds:0|i[2]}}),r.elemID="layui-laydate"+l.elem.attr("lay-key"),(l.show||e)&&r.render(),e||r.events(),"function"==typeof l.formatToDisplay&&(r.isInput(l.elem[0])?r.formatToDisplay(l.elem[0],l.formatToDisplay):(t=r.rangeElem)&&(r.formatToDisplay(t[0][0],l.formatToDisplay),r.formatToDisplay(t[1][0],l.formatToDisplay))),l.value)&&l.isInitValue&&("date"===layui.type(l.value)?r.setValue(r.parse(0,r.systemDate(l.value))):r.setValue(l.value))},x.prototype.render=function(){var n,i,a,o,r=this,l=r.config,s=r.lang(),c="static"===l.position,d=r.elem=lay.elem("div",{id:r.elemID,class:["layui-laydate",l.range?" layui-laydate-range":"",r.rangeLinked?" layui-laydate-linkage":"",c?" "+w:"",l.fullPanel?" laydate-theme-fullpanel":"",(n="",lay.each(l.theme,function(e,t){"default"===t||/^#/.test(t)||(n+=" laydate-theme-"+t)}),n)].join("")}),u=r.elemMain=[],f=r.elemHeader=[],p=r.elemCont=[],h=r.table=[],e=r.footer=lay.elem("div",{class:"layui-laydate-footer"}),t=r.shortcut=lay.elem("ul",{class:"layui-laydate-shortcut"}),y=(l.zIndex&&(d.style.zIndex=l.zIndex),lay.each(new Array(2),function(e){if(!l.range&&0'+s.timeTips+""),(l.range||"datetime"!==l.type||l.fullPanel)&&y.push(''),lay.each(l.btns,function(e,t){var n=s.tools[t]||"btn";l.range&&"now"===t||(c&&"clear"===t&&(n="cn"===l.lang?"重置":"Reset"),i.push(''+n+""))}),y.push('"),y.join(""))),l.shortcuts&&(d.appendChild(t),lay(t).html((a=[],lay.each(l.shortcuts,function(e,t){a.push('
  • '+t.text+"
  • ")}),a.join(""))).find("li").on("click",function(e){var t=("function"==typeof(t=l.shortcuts[this.dataset.index]||{}).value?t.value():t.value)||[],i=(layui.isArray(t)||(t=[t]),l.type);lay.each(t,function(e,t){var n=[l.dateTime,r.endDate][e];"time"===i&&"date"!==layui.type(t)?r.EXP_IF.test(t)&&(t=(t.match(r.EXP_SPLIT)||[]).slice(1),lay.extend(n,{hours:0|t[0],minutes:0|t[2],seconds:0|t[4]})):lay.extend(n,r.systemDate("date"===layui.type(t)?t:new Date(t))),"time"!==i&&"datetime"!==i||(r[["startTime","endTime"][e]]={hours:n.hours,minutes:n.minutes,seconds:n.seconds}),0===e?r.startDate=lay.extend({},n):r.endState=!0,"year"===i||"month"===i||"time"===i?r.listYM[e]=[n.year,n.month+1]:e&&r.autoCalendarModel.auto&&r.autoCalendarModel()}),r.checkDate("limit").calendar(null,null,"init"),(t=lay(r.footer).find("."+L).removeClass(E))&&"date"===t.attr("lay-type")&&t[0].click(),r.done(null,"change"),lay(this).addClass(T),"static"!==l.position&&r.setValue(r.parse()).done().remove()})),lay.each(u,function(e,t){d.appendChild(t)}),l.showBottom&&d.appendChild(e),lay.elem("style")),m=[],g=!0,t=(lay.each(l.theme,function(e,t){g&&/^#/.test(t)?(g=!(o=!0),m.push(["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} li.layui-this,#{{id}} td.layui-this>div{background-color:{{theme}} !important;}",-1!==l.theme.indexOf("circle")?"":"#{{id}} .layui-this{background-color:{{theme}} !important;}","#{{id}} .laydate-day-now{color:{{theme}} !important;}","#{{id}} .laydate-day-now:after{border-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,r.elemID).replace(/{{theme}}/g,t))):!g&&/^#/.test(t)&&m.push(["#{{id}} .laydate-selected>div{background-color:{{theme}} !important;}","#{{id}} .laydate-selected:hover>div{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,r.elemID).replace(/{{theme}}/g,t))}),l.shortcuts&&l.range&&m.push("#{{id}}.layui-laydate-range{width: 628px;}".replace(/{{id}}/g,r.elemID)),m.length&&(m=m.join(""),"styleSheet"in y?(y.setAttribute("type","text/css"),y.styleSheet.cssText=m):y.innerHTML=m,o&&lay(d).addClass("laydate-theme-molv"),d.appendChild(y)),r.remove(x.thisElemDate),b.thisId=l.id,c?l.elem.append(d):(v.body.appendChild(d),r.position()),l.shade?'
    ':"");d.insertAdjacentHTML("beforebegin",t),r.checkDate().calendar(null,0,"init"),r.changeEvent(),x.thisElemDate=r.elemID,r.renderAdditional(),"function"==typeof l.ready&&l.ready(lay.extend({},l.dateTime,{month:l.dateTime.month+1})),r.preview()},x.prototype.remove=function(e){var t=this,n=t.config,i=lay("#"+(e||t.elemID));return i[0]&&(i.hasClass(w)||t.checkDate(function(){i.remove(),delete t.startDate,delete t.endDate,delete t.endState,delete t.startTime,delete t.endTime,delete b.thisId,"function"==typeof n.close&&n.close(t)}),lay("."+C).remove()),t},x.prototype.position=function(){var e=this.config;return lay.position(e.elem[0],this.elem,{position:e.position}),this},x.prototype.hint=function(e){var t=this,n=(t.config,lay.elem("div",{class:c}));t.elem&&(n.innerHTML=(e="object"==typeof e?e||{}:{content:e}).content||"",lay(t.elem).find("."+c).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){lay(t.elem).find("."+c).remove()},"ms"in e?e.ms:3e3))},x.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),11h[1]&&(e.year=h[1],l=!0),11t)&&(e.date=t,l=!0)};return"limit"===e?c.range?(p(s.rangeLinked?s.startDate:d),s.endDate&&p(s.endDate)):p(d):("string"==typeof(f=f||c.value)&&(f=f.replace(/\s+/g," ").replace(/^\s|\s$/g,"")),(i=function(){var e,t,n;c.range&&(s.endDate=s.endDate||lay.extend({},c.dateTime,(e={},t=c.dateTime,n=s.getAsYM(t.year,t.month),"year"===c.type?e.year=t.year+1:"time"!==c.type&&(e.year=n[0],e.month=n[1]),"datetime"!==c.type&&"time"!==c.type||(e.hours=23,e.minutes=e.seconds=59),e)))})(),"string"==typeof f&&f?s.EXP_IF.test(f)?c.range?(f=f.split(" "+s.rangeStr+" "),lay.each([c.dateTime,s.endDate],function(e,t){n(t,f[e],e)})):n(d,f):(s.hint(r.formatError[0]+(c.range?c.format+" "+s.rangeStr+" "+c.format:c.format)+r.formatError[1]),l=!0):f&&"date"===layui.type(f)?c.dateTime=s.systemDate(f):(c.dateTime=s.systemDate(),delete s.startTime,delete s.endDate,i(),delete s.endTime),s.rangeElem&&(i=[s.rangeElem[0].val(),s.rangeElem[1].val()],a=[c.dateTime,s.endDate],lay.each(i,function(e,t){s.EXP_IF_ONE.test(t)&&n(a[e],t,e)})),p(d),c.range&&p(s.endDate),l&&f&&s.setValue(!c.range||s.endDate?s.parse():""),s.getDateTime(d)>s.getDateTime(c.max)?(d=c.dateTime=lay.extend({},c.max),o=!0):s.getDateTime(d)s.getDateTime(c.max))&&(s.endDate=lay.extend({},c.max),o=!0),s.startTime={hours:c.dateTime.hours,minutes:c.dateTime.minutes,seconds:c.dateTime.seconds},s.endTime={hours:s.endDate.hours,minutes:s.endDate.minutes,seconds:s.endDate.seconds},"month"===c.type)&&(c.dateTime.date=1,s.endDate.date=1),o&&f&&(s.setValue(s.parse()),s.hint("value "+r.invalidDate+r.formatError[1])),s.startDate=s.startDate||f&&lay.extend({},c.dateTime),s.autoCalendarModel.auto&&s.autoCalendarModel(),s.endState=!c.range||!s.rangeLinked||!(!s.startDate||!s.endDate),e&&e()),s},x.prototype.markRender=function(e,n,t){var i;"object"==typeof t?lay.each(t||{},function(e,t){(e=e.split("-"))[0]!=n[0]&&0!=e[0]||e[1]!=n[1]&&0!=e[1]||e[2]!=n[2]||(i=t||n[2])}):"string"==typeof t&&(i=t||n[2]),i&&e.find("div").html(''+i+"")},x.prototype.mark=function(t,n){function e(e){i.markRender(t,n,e)}var i=this,a=i.config;return a.calendar&&"cn"===a.lang&&e(i.markerOfChineseFestivals),"function"==typeof a.mark?a.mark({year:n[0],month:n[1],date:n[2]},e):"object"==typeof a.mark&&e(a.mark),i},x.prototype.holidaysRender=function(r,l,e){function s(e,t,n){e.find("div").html(["",n,""].join(""))}var c=["holidays","workdays"];"array"===layui.type(e)?lay.each(e,function(o,e){lay.each(e,function(e,t){var n=r.attr("lay-ymd"),i=t.split("-"),a=n.split("-");lay.each(i,function(e,t){i[e]=parseInt(t,10)}),lay.each(a,function(e,t){a[e]=parseInt(t,10)}),i.join("-")===a.join("-")&&s(r,c[o],l[2])})}):"string"==typeof e&&-1!==c.indexOf(e)&&s(r,e,l[2])},x.prototype.holidays=function(t,n){function e(e){i.holidaysRender(t,n,e)}var i=this,a=i.config;return"function"==typeof a.holidays?a.holidays({year:n[0],month:n[1],date:n[2]},e):"array"===layui.type(a.holidays)&&e(a.holidays),i},x.prototype.cellRender=function(t,e,n){var i=this.config;return"function"==typeof i.cellRender&&i.cellRender(e,function(e){"string"==typeof e?lay(t).html(e):"object"==typeof e&&lay(t).html("").append(lay(e)[0])},{originElem:t,type:n}),this},x.prototype.startOfYear=function(e){return(e=new Date(e)).setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e},x.prototype.endOfYear=function(e){var t=(e=new Date(e)).getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e},x.prototype.startOfMonth=function(e){return(e=new Date(e)).setDate(1),e.setHours(0,0,0,0),e},x.prototype.endOfMonth=function(e){var t=(e=new Date(e)).getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e},x.prototype.addDays=function(e,t){return e=new Date(e),t&&e.setDate(e.getDate()+t),e},x.prototype.isDisabledYearOrMonth=function(e,t,n){for(var i=this,a=i.config,o="year"===t?i.startOfYear(e):i.startOfMonth(e),t="year"===t?i.endOfYear(e):i.endOfMonth(e),r=Math.floor((t.getTime()-o.getTime())/864e5)+1,l=0,s=0;s(t.time?0:41)?a.endDate:e.dateTime;return lay.each({now:lay.extend({},n,t.date||{}),min:e.min,max:e.max},function(e,n){var i;o[e]=a.newDate(lay.extend({year:n.year,month:"year"===t.type?0:n.month,date:"year"===t.type||"month"===t.type?1:n.date},(i={},lay.each(t.time,function(e,t){i[t]=n[t]}),i))).getTime()}),n=o.nowh[1]&&(c.year=h[1],s.hint(d.invalidDate)),s.firstDate||(s.firstDate=lay.extend({},c)),i.setFullYear(c.year,c.month,1),o=(i.getDay()+(7-n.weekStart))%7,r=b.getEndDate(c.month||12,c.year),l=b.getEndDate(c.month+1,c.year),lay.each(f,function(e,t){var n,i=[c.year,c.month];(t=lay(t)).removeAttr("class"),e"+i[2]+""),s.mark(t,i).holidays(t,i).limit({elem:t,date:{year:i[0],month:i[1]-1,date:i[2]},index:e,rangeType:a,disabledType:"date"}),s.cellRender(t,{year:i[0],month:i[1],date:i[2]},"date")}),lay(p[0]).attr("lay-ym",c.year+"-"+(c.month+1)),lay(p[1]).attr("lay-ym",c.year+"-"+(c.month+1)),s.panelYM||(s.panelYM={}),s.panelYM[a]={year:c.year,month:c.month},"cn"===n.lang?(lay(p[0]).attr("lay-type","year").html(c.year+" 年"),lay(p[1]).attr("lay-type","month").html(c.month+1+" 月")):(lay(p[0]).attr("lay-type","month").html(d.month[c.month]),lay(p[1]).attr("lay-type","year").html(c.year)),u&&(n.range?!e&&"init"===t||(s.listYM=[[(s.startDate||n.dateTime).year,(s.startDate||n.dateTime).month+1],[s.endDate.year,s.endDate.month+1]],s.list(n.type,0).list(n.type,1),"time"===n.type?s.setBtnStatus("时间",lay.extend({},s.systemDate(),s.startTime),lay.extend({},s.systemDate(),s.endTime)):s.setBtnStatus(!0)):(s.listYM=[[c.year,c.month+1]],s.list(n.type,0))),n.range&&"init"===t&&(s.rangeLinked?(i=s.getAsYM(c.year,c.month,a?"sub":null),s.calendar(lay.extend({},c,{year:i[0],month:i[1]}),1-a)):s.calendar(null,1-a)),n.range||(f=["hours","minutes","seconds"],s.limit({elem:lay(s.footer).find(".laydate-btns-now"),date:s.systemDate(/^(datetime|time)$/.test(n.type)?new Date:null),index:0,time:f,disabledType:"datetime"}),s.limit({elem:lay(s.footer).find(S),index:0,time:f,disabledType:"datetime"})),s.setBtnStatus(),lay(s.shortcut).find("li."+T).removeClass(T),n.range&&!u&&"init"!==t&&s.stampRange(),s},x.prototype.list=function(i,a){var o,r,e,n,l,s,t,c=this,d=c.config,u=c.rangeLinked?d.dateTime:[d.dateTime,c.endDate][a],f=c.lang(),p=d.range&&"date"!==d.type&&"datetime"!==d.type,h=lay.elem("ul",{class:D+" "+{year:"laydate-year-list",month:"laydate-month-list",time:"laydate-time-list"}[i]}),y=c.elemHeader[a],m=lay(y[2]).find("span"),g=c.elemCont[a||0],v=lay(g).find("."+D)[0],x="cn"===d.lang,b=x?"年":"",w=c.listYM[a]||{},k=["hours","minutes","seconds"],C=["startTime","endTime"][a];return w[0]<1&&(w[0]=1),"year"===i?(e=o=w[0]-7,o<1&&(e=o=1),lay.each(new Array(15),function(e){var t=lay.elem("li",{"lay-ym":o}),n={year:o,month:0,date:1};o==w[0]&&lay(t).addClass(T),t.innerHTML=o+b,h.appendChild(t),c.limit({elem:lay(t),date:n,index:a,type:i,rangeType:a,disabledType:"date"}),c.cellRender(t,{year:o,month:1,date:1},"year"),o++}),lay(m[x?0:1]).attr("lay-ym",o-8+"-"+w[1]).html(e+b+" - "+(o-1)+b)):"month"===i?(lay.each(new Array(12),function(e){var t=lay.elem("li",{"lay-ym":e}),n={year:w[0],month:e,date:1};e+1==w[1]&&lay(t).addClass(T),t.innerHTML=f.month[e]+(x?"月":""),h.appendChild(t),c.limit({elem:lay(t),date:n,index:a,type:i,rangeType:a,disabledType:"date"}),c.cellRender(t,{year:w[0],month:e+1,date:1},"month")}),lay(m[x?0:1]).attr("lay-ym",w[0]+"-"+w[1]).html(w[0]+b)):"time"===i&&(r=function(){lay(h).find("ol").each(function(n,e){lay(e).find("li").each(function(e,t){c.limit({elem:lay(t),date:[{hours:e},{hours:c[C].hours,minutes:e},{hours:c[C].hours,minutes:c[C].minutes,seconds:e}][n],index:a,rangeType:a,disabledType:"time",time:[["hours"],["hours","minutes"],["hours","minutes","seconds"]][n]})})}),d.range||c.limit({elem:lay(c.footer).find(S),date:c[C],index:0,time:["hours","minutes","seconds"],disabledType:"datetime"})},d.range?c[C]||(c[C]="startTime"===C?u:c.endDate):c[C]=u,lay.each([24,60,60],function(t,e){var n=lay.elem("li"),i=["

    "+f.time[t]+"

      "];lay.each(new Array(e),function(e){i.push(""+lay.digit(e,2)+"")}),n.innerHTML=i.join("")+"
    ",h.appendChild(n)}),r(),e=-1!==d.format.indexOf("H"),m=-1!==d.format.indexOf("m"),t=-1!==d.format.indexOf("s"),n=h.children,l=0,lay.each([e,m,t],function(e,t){t||(n[e].className+=" layui-hide",l++)}),h.className+=" laydate-time-list-hide-"+l),v&&g.removeChild(v),g.appendChild(h),"year"===i||"month"===i?(lay(c.elemMain[a]).addClass("laydate-ym-show"),lay(h).find("li").on("click",function(){var e=0|lay(this).attr("lay-ym");lay(this).hasClass(E)||(c.rangeLinked?lay.extend(u,{year:"year"===i?e:w[0],month:"year"===i?w[1]-1:e}):u[i]=e,"year"===d.type||"month"===d.type?(lay(h).find("."+T).removeClass(T),lay(this).addClass(T),"month"===d.type&&"year"===i&&(c.listYM[a][0]=e,p&&((a?c.endDate:u).year=e),c.list("month",a))):(c.checkDate("limit").calendar(u,a,"init"),c.closeList()),c.setBtnStatus(),!d.range&&d.autoConfirm&&("month"===d.type&&"month"===i||"year"===d.type&&"year"===i)&&c.setValue(c.parse()).done().remove(),c.autoCalendarModel.auto&&!c.rangeLinked?c.choose(lay(g).find("td.layui-this"),a):c.endState&&c.done(null,"change"),lay(c.footer).find("."+L).removeClass(E))})):(m=lay.elem("span",{class:N}),s=function(){lay(h).find("ol").each(function(e){var n=this,t=lay(n).find("li");n.scrollTop=30*(c[C][k[e]]-2),n.scrollTop<=0&&t.each(function(e,t){if(!lay(this).hasClass(E))return n.scrollTop=30*(e-2),!0})})},t=lay(y[2]).find("."+N),s(),m.innerHTML=d.range?[f.startTime,f.endTime][a]:f.timeTips,lay(c.elemMain[a]).addClass("laydate-time-show"),t[0]&&t.remove(),y[2].appendChild(m),(v=lay(h).find("ol")).each(function(t){var n=this;lay(n).find("li").on("click",function(){var e=0|this.innerHTML;lay(this).hasClass(E)||(d.range?c[C][k[t]]=e:u[k[t]]=e,lay(n).find("."+T).removeClass(T),lay(this).addClass(T),r(),s(),!c.endDate&&"time"!==d.type&&"datetime"!==d.type||c.done(null,"change"),c.setBtnStatus())})}),layui.device().mobile&&v.css({overflowY:"auto",touchAction:"pan-y"})),c},x.prototype.listYM=[],x.prototype.closeList=function(){var n=this;n.config,lay.each(n.elemCont,function(e,t){lay(this).find("."+D).remove(),lay(n.elemMain[e]).removeClass("laydate-ym-show laydate-time-show")}),lay(n.elem).find("."+N).remove()},x.prototype.setBtnStatus=function(e,t,n){var i=this,a=i.config,o=i.lang(),r=lay(i.footer).find(S),l="datetime"===a.type||"time"===a.type?["hours","minutes","seconds"]:void 0;a.range&&(t=t||(i.rangeLinked?i.startDate:a.dateTime),n=n||i.endDate,a=!i.endState||i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit({date:t,disabledType:"datetime",time:l,rangeType:0})||i.limit({date:n,disabledType:"datetime",time:l,rangeType:1})?r.addClass(E):r[a?"addClass":"removeClass"](E),e)&&a&&i.hint("string"==typeof e?o.timeout.replace(/\u65e5\u671f/g,e):o.timeout)},x.prototype.parse=function(e,t){var n=this,i=n.config,a=n.rangeLinked?n.startDate:i.dateTime,t=t||("end"==e?lay.extend({},n.endDate,n.endTime):i.range?lay.extend({},a||i.dateTime,n.startTime):i.dateTime),a=b.parse(t,n.format,1);return i.range&&void 0===e?a+" "+n.rangeStr+" "+n.parse("end"):a},x.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},x.prototype.getDateTime=function(e){return this.newDate(e).getTime()},x.prototype.formatToDisplay=function(e,t){var n=this,i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");Object.defineProperty(e,"value",lay.extend({},i,{get:function(){return this.getAttribute("lay-date")},set:function(e){i.set.call(this,t.call(n,e)),this.setAttribute("lay-date",e)}}))},x.prototype.setValue=function(e){var t,n=this,i=n.config,a=i.elem[0];return"static"!==i.position&&(e=e||"",n.isInput(a)?lay(a).val(e):(t=n.rangeElem)?("array"!==layui.type(e)&&(e=e.split(" "+n.rangeStr+" ")),t[0].val(e[0]||""),t[1].val(e[1]||"")):(0===lay(a).find("*").length&&(t="function"==typeof i.formatToDisplay?i.formatToDisplay(e):e,lay(a).html(t)),lay(a).attr("lay-date",e))),n},x.prototype.preview=function(){var e,t=this,n=t.config;n.isPreview&&(e=lay(t.elem).find("."+k),n=!n.range||(t.rangeLinked?t.endState:t.endDate)?t.parse():"",e.html(n),e.html())&&(e.css({color:"#16b777"}),setTimeout(function(){e.css({color:"#777"})},300))},x.prototype.renderAdditional=function(){this.config.fullPanel&&this.list("time",0)},x.prototype.stampRange=function(){var i,a=this,o=a.config,r=a.rangeLinked?a.startDate:o.dateTime,e=lay(a.elem).find("td");o.range&&!a.endState&&lay(a.footer).find(S).addClass(E),r=r&&a.newDate({year:r.year,month:r.month,date:r.date}).getTime(),i=a.endState&&a.endDate&&a.newDate({year:a.endDate.year,month:a.endDate.month,date:a.endDate.date}).getTime(),lay.each(e,function(e,t){var n=lay(t).attr("lay-ymd").split("-"),n=a.newDate({year:n[0],month:n[1]-1,date:n[2]}).getTime();o.rangeLinked&&!a.startDate&&n===a.newDate(a.systemDate()).getTime()&&lay(t).addClass(lay(t).hasClass(d)||lay(t).hasClass(u)?"":"laydate-day-now"),lay(t).removeClass(l+" "+T),n!==r&&n!==i||(a.rangeLinked||!a.rangeLinked&&(e<42?n===r:n===i))&&lay(t).addClass(lay(t).hasClass(d)||lay(t).hasClass(u)?l:T),ri.getDateTime(a.max)&&(i[t]={hours:a.max.hours,minutes:a.max.minutes,seconds:a.max.seconds},lay.extend(o,i[t])))}),n||(i.startDate=lay.extend({},o)),i.endState&&!i.limit({date:i.rangeLinked?i.startDate:i.thisDateTime(1-n),disabledType:"date"})&&(((r=i.endState&&i.autoCalendarModel.auto?i.autoCalendarModel():r)||i.rangeLinked&&i.endState)&&i.newDate(i.startDate)>i.newDate(i.endDate)&&(i.startDate.year===i.endDate.year&&i.startDate.month===i.endDate.month&&i.startDate.date===i.endDate.date&&(l=i.startTime,i.startTime=i.endTime,i.endTime=l),l=i.startDate,i.startDate=lay.extend({},i.endDate,i.startTime),a.dateTime=lay.extend({},i.startDate),i.endDate=lay.extend({},l,i.endTime)),r)&&(a.dateTime=lay.extend({},i.startDate)),i.rangeLinked?(e=i.checkPanelDate(o,t),l=lay.extend({},o),s=r||e&&e.needFullRender?"init":null,e=e?e.index:t,i.calendar(l,e,s)):i.calendar(null,n,r?"init":null),i.endState&&i.done(null,"change")):"static"===a.position?i.calendar().done().done(null,"change"):"date"===a.type?a.autoConfirm?i.setValue(i.parse()).done().remove():i.calendar().done(null,"change"):"datetime"===a.type&&i.calendar().done(null,"change"))},x.prototype.tool=function(t,e){var n=this,i=n.config,a=n.lang(),o=i.dateTime,r="static"===i.position,l={datetime:function(){lay(t).hasClass(E)||(n.list("time",0),i.range&&n.list("time",1),lay(t).attr("lay-type","date").html(n.lang().dateTips))},date:function(){n.closeList(),lay(t).attr("lay-type","datetime").html(n.lang().timeTips)},clear:function(){r&&(lay.extend(o,n.firstDate),n.calendar()),i.range&&(delete i.dateTime,delete n.endDate,delete n.startTime,delete n.endTime),n.setValue(""),n.done(null,"onClear").done(["",{},{}]).remove()},now:function(){var e=new Date;if(lay(t).hasClass(E))return n.hint(a.tools.now+", "+a.invalidDate);lay.extend(o,n.systemDate(),{hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()}),n.setValue(n.parse()),r&&n.calendar(),n.done(null,"onNow").done().remove()},confirm:function(){if(i.range){if(lay(t).hasClass(E))return("time"===i.type?n.startTime&&n.endTime&&n.newDate(n.startTime)>n.newDate(n.endTime):n.startDate&&n.endDate&&n.newDate(lay.extend({},n.startDate,n.startTime||{}))>n.newDate(lay.extend({},n.endDate,n.endTime||{})))?n.hint("time"===i.type?a.timeout.replace(/\u65e5\u671f/g,"时间"):a.timeout):n.hint(a.invalidDate)}else if(lay(t).hasClass(E))return n.hint(a.invalidDate);n.setValue(n.parse()),n.done(null,"onConfirm").done().remove()}};l[e]&&l[e]()},x.prototype.change=function(i){function e(e){var t=lay(s).find(".laydate-year-list")[0],n=lay(s).find(".laydate-month-list")[0];return t&&(c[0]=e?c[0]-15:c[0]+15,a.list("year",i)),n&&(e?c[0]--:c[0]++,a.list("month",i)),(t||n)&&(lay.extend(r,{year:c[0]}),l&&(r.year=c[0]),o.range||a.done(null,"change"),o.range||a.limit({elem:lay(a.footer).find(S),date:{year:c[0]},disabledType:"datetime"})),a.setBtnStatus(),t||n}var a=this,o=a.config,r=a.thisDateTime(i),l=o.range&&("year"===o.type||"month"===o.type),s=a.elemCont[i||0],c=a.listYM[i];return{prevYear:function(){e("sub")||(a.rangeLinked?(o.dateTime.year--,a.checkDate("limit").calendar(null,null,"init")):(r.year--,a.checkDate("limit").calendar(null,i),a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change")))},prevMonth:function(){var e,t;a.rangeLinked?(t=a.panelYM[0],t=a.getAsYM(t.year,t.month,"sub"),e=lay.extend({},o.dateTime,a.panelYM[0],{year:t[0],month:t[1]}),a.checkDate("limit").calendar(e,null,"init")):(t=a.getAsYM(r.year,r.month,"sub"),lay.extend(r,{year:t[0],month:t[1]}),a.checkDate("limit").calendar(null,null,"init"),a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change"))},nextMonth:function(){var e,t;a.rangeLinked?(t=a.panelYM[0],t=a.getAsYM(t.year,t.month),e=lay.extend({},o.dateTime,a.panelYM[0],{year:t[0],month:t[1]}),a.checkDate("limit").calendar(e,null,"init")):(t=a.getAsYM(r.year,r.month),lay.extend(r,{year:t[0],month:t[1]}),a.checkDate("limit").calendar(null,null,"init"),a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change"))},nextYear:function(){e()||(a.rangeLinked?(o.dateTime.year++,a.checkDate("limit").calendar(null,0,"init")):(r.year++,a.checkDate("limit").calendar(null,i),a.autoCalendarModel.auto?a.choose(lay(s).find("td.layui-this"),i):a.done(null,"change")))}}},x.prototype.changeEvent=function(){var a=this;a.config,lay(a.elem).on("click",function(e){lay.stope(e)}).on("mousedown",function(e){lay.stope(e)}),lay.each(a.elemHeader,function(i,e){lay(e[0]).on("click",function(e){a.change(i).prevYear()}),lay(e[1]).on("click",function(e){a.change(i).prevMonth()}),lay(e[2]).find("span").on("click",function(e){var t=(n=lay(this)).attr("lay-ym"),n=n.attr("lay-type");t&&(t=t.split("-"),a.listYM[i]=[0|t[0],0|t[1]],a.list(n,i),lay(a.footer).find("."+L).addClass(E))}),lay(e[3]).on("click",function(e){a.change(i).nextMonth()}),lay(e[4]).on("click",function(e){a.change(i).nextYear()})}),lay.each(a.table,function(e,t){lay(t).find("td").on("click",function(){a.choose(lay(this),e)})}),lay(a.footer).find("span").on("click",function(){var e=lay(this).attr("lay-type");a.tool(this,e)})},x.prototype.isInput=function(e){return/input|textarea/.test(e.tagName.toLocaleLowerCase())||/INPUT|TEXTAREA/.test(e.tagName)},x.prototype.events=function(){var e,t=this,n=t.config;n.elem[0]&&!n.elem[0].eventHandler&&(n.elem.on(n.trigger,e=function(){b.thisId!==n.id&&t.render()}),n.elem[0].eventHandler=!0,n.eventElem.on(n.trigger,e),t.unbind=function(){t.remove(),n.elem.off(n.trigger,e),n.elem.removeAttr("lay-key"),n.elem.removeAttr(s),n.elem[0].eventHandler=!1,n.eventElem.off(n.trigger,e),n.eventElem.removeAttr("lay-key"),delete o.that[n.id]})},o.that={},o.getThis=function(e){var t=o.that[e];return!t&&i&&layui.hint().error(e?n+" instance with ID '"+e+"' not found":"ID argument required"),t},r.run=function(i){i(v).on("mousedown",function(e){var t,n;b.thisId&&(t=o.getThis(b.thisId))&&(n=t.config,e.target===n.elem[0]||e.target===n.eventElem[0]||e.target===i(n.closeStop)[0]||n.elem[0]&&n.elem[0].contains(e.target)||t.remove())}).on("keydown",function(e){var t;b.thisId&&(t=o.getThis(b.thisId))&&"static"!==t.config.position&&13===e.keyCode&&i("#"+t.elemID)[0]&&t.elemID===x.thisElemDate&&(e.preventDefault(),i(t.footer).find(S)[0].click())}),i(a).on("resize",function(){if(b.thisId){var e=o.getThis(b.thisId);if(e)return!(!e.elem||!i(".layui-laydate")[0])&&void e.position()}})},b.render=function(e){return e=new x(e),o.call(e)},b.reload=function(e,t){if(e=o.getThis(e))return e.reload(t)},b.getInst=function(e){if(e=o.getThis(e))return e.inst},b.hint=function(e,t){if(e=o.getThis(e))return e.hint(t)},b.unbind=function(e){if(e=o.getThis(e))return e.unbind()},b.close=function(e){if(e=o.getThis(e||b.thisId))return e.remove()},b.parse=function(n,i,a){return n=n||{},i=((i="string"==typeof i?o.formatArr(i):i)||[]).concat(),lay.each(i,function(e,t){/yyyy|y/.test(t)?i[e]=lay.digit(n.year,t.length):/MM|M/.test(t)?i[e]=lay.digit(n.month+(a||0),t.length):/dd|d/.test(t)?i[e]=lay.digit(n.date,t.length):/HH|H/.test(t)?i[e]=lay.digit(n.hours,t.length):/mm|m/.test(t)?i[e]=lay.digit(n.minutes,t.length):/ss|s/.test(t)&&(i[e]=lay.digit(n.seconds,t.length))}),i.join("")},b.getEndDate=function(e,t){var n=new Date;return n.setFullYear(t||n.getFullYear(),e||n.getMonth()+1,1),new Date(n.getTime()-864e5).getDate()},i?(b.ready(),layui.define("lay",function(e){b.path=layui.cache.dir,r.run(lay),e(n,b)})):"function"==typeof define&&define.amd?define(function(){return r.run(lay),b}):(b.ready(),r.run(a.lay),a.laydate=b)}(window,window.document),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e):function(e){if(e.document)return t(e);throw new Error("jQuery requires a window with a document")}:t(e)}("undefined"!=typeof window?window:this,function(w,O){function F(e,t){return t.toUpperCase()}var u=[],h=w.document,d=u.slice,R=u.concat,P=u.push,q=u.indexOf,z={},B=z.toString,y=z.hasOwnProperty,m={},e="1.12.4",k=function(e,t){return new k.fn.init(e,t)},W=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Y=/^-ms-/,$=/-([\da-z])/gi;function X(e){var t=!!e&&"length"in e&&e.length,n=k.type(e);return"function"!==n&&!k.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0>10|55296,1023&i|56320)}function F(){C()}var e,h,w,o,R,y,P,q,k,s,c,C,T,t,E,m,i,a,g,D="sizzle"+ +new Date,v=O.document,S=0,z=0,B=ce(),W=ce(),N=ce(),Y=function(e,t){return e===t&&(c=!0),0},$={}.hasOwnProperty,n=[],X=n.pop,V=n.push,L=n.push,U=n.slice,G="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",r="[\\x20\\t\\r\\n\\f]",l="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",K="\\["+r+"*("+l+")(?:"+r+"*([*^$|!~]?=)"+r+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+l+"))|)"+r+"*\\]",J=":("+l+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+K+")*)|.*)\\)|)",Z=new RegExp(r+"+","g"),A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),Q=new RegExp("^"+r+"*,"+r+"*"),ee=new RegExp("^"+r+"*([>+~]|"+r+")"+r+"*"),te=new RegExp("="+r+"*([^\\]'\"]*?)"+r+"*\\]","g"),ne=new RegExp(J),ie=new RegExp("^"+l+"$"),f={ID:new RegExp("^#("+l+")"),CLASS:new RegExp("^\\.("+l+")"),TAG:new RegExp("^("+l+"|[*])"),ATTR:new RegExp("^"+K),PSEUDO:new RegExp("^"+J),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+G+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},ae=/^(?:input|select|textarea|button)$/i,oe=/^h\d$/i,d=/^[^{]+\{\s*\[native \w/,re=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,le=/[+~]/,se=/'|\\/g,p=new RegExp("\\\\([\\da-f]{1,6}"+r+"?|("+r+")|.)","ig");try{L.apply(n=U.call(v.childNodes),v.childNodes),n[v.childNodes.length].nodeType}catch(e){L={apply:n.length?function(e,t){V.apply(e,U.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function I(e,t,n,i){var a,o,r,l,s,c,d,u,f=t&&t.ownerDocument,p=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==p&&9!==p&&11!==p)return n;if(!i&&((t?t.ownerDocument||t:v)!==T&&C(t),t=t||T,E)){if(11!==p&&(c=re.exec(e)))if(a=c[1]){if(9===p){if(!(r=t.getElementById(a)))return n;if(r.id===a)return n.push(r),n}else if(f&&(r=f.getElementById(a))&&g(t,r)&&r.id===a)return n.push(r),n}else{if(c[2])return L.apply(n,t.getElementsByTagName(e)),n;if((a=c[3])&&h.getElementsByClassName&&t.getElementsByClassName)return L.apply(n,t.getElementsByClassName(a)),n}if(h.qsa&&!N[e+" "]&&(!m||!m.test(e))){if(1!==p)f=t,u=e;else if("object"!==t.nodeName.toLowerCase()){for((l=t.getAttribute("id"))?l=l.replace(se,"\\$&"):t.setAttribute("id",l=D),o=(d=y(e)).length,s=ie.test(l)?"#"+l:"[id='"+l+"']";o--;)d[o]=s+" "+_(d[o]);u=d.join(","),f=le.test(e)&&fe(t.parentNode)||t}if(u)try{return L.apply(n,f.querySelectorAll(u)),n}catch(e){}finally{l===D&&t.removeAttribute("id")}}}return q(e.replace(A,"$1"),t,n,i)}function ce(){var n=[];function i(e,t){return n.push(e+" ")>w.cacheLength&&delete i[n.shift()],i[e+" "]=t}return i}function M(e){return e[D]=!0,e}function x(e){var t=T.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function de(e,t){for(var n=e.split("|"),i=n.length;i--;)w.attrHandle[n[i]]=t}function ue(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function j(r){return M(function(o){return o=+o,M(function(e,t){for(var n,i=r([],e.length,o),a=i.length;a--;)e[n=i[a]]&&(e[n]=!(t[n]=e[n]))})})}function fe(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in h=I.support={},R=I.isXML=function(e){return!!(e=e&&(e.ownerDocument||e).documentElement)&&"HTML"!==e.nodeName},C=I.setDocument=function(e){return(e=e?e.ownerDocument||e:v)!==T&&9===e.nodeType&&e.documentElement&&(t=(T=e).documentElement,E=!R(T),(e=T.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",F,!1):e.attachEvent&&e.attachEvent("onunload",F)),h.attributes=x(function(e){return e.className="i",!e.getAttribute("className")}),h.getElementsByTagName=x(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),h.getElementsByClassName=d.test(T.getElementsByClassName),h.getById=x(function(e){return t.appendChild(e).id=D,!T.getElementsByName||!T.getElementsByName(D).length}),h.getById?(w.find.ID=function(e,t){if(void 0!==t.getElementById&&E)return(e=t.getElementById(e))?[e]:[]},w.filter.ID=function(e){var t=e.replace(p,u);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(p,u);return function(e){return(e=void 0!==e.getAttributeNode&&e.getAttributeNode("id"))&&e.value===t}}),w.find.TAG=h.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):h.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],a=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[a++];)1===n.nodeType&&i.push(n);return i},w.find.CLASS=h.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},i=[],m=[],(h.qsa=d.test(T.querySelectorAll))&&(x(function(e){t.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+r+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+r+"*(?:value|"+G+")"),e.querySelectorAll("[id~="+D+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+D+"+*").length||m.push(".#.+[+~]")}),x(function(e){var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+r+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(h.matchesSelector=d.test(a=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.msMatchesSelector))&&x(function(e){h.disconnectedMatch=a.call(e,"div"),a.call(e,"[s!='']:x"),i.push("!=",J)}),m=m.length&&new RegExp(m.join("|")),i=i.length&&new RegExp(i.join("|")),e=d.test(t.compareDocumentPosition),g=e||d.test(t.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e;return e===(t=t&&t.parentNode)||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=e?function(e,t){var n;return e===t?(c=!0,0):!e.compareDocumentPosition-!t.compareDocumentPosition||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!h.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument===v&&g(v,e)?-1:t===T||t.ownerDocument===v&&g(v,t)?1:s?b(s,e)-b(s,t):0:4&n?-1:1)}:function(e,t){if(e===t)return c=!0,0;var n,i=0,a=e.parentNode,o=t.parentNode,r=[e],l=[t];if(!a||!o)return e===T?-1:t===T?1:a?-1:o?1:s?b(s,e)-b(s,t):0;if(a===o)return ue(e,t);for(n=e;n=n.parentNode;)r.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;r[i]===l[i];)i++;return i?ue(r[i],l[i]):r[i]===v?-1:l[i]===v?1:0}),T},I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if((e.ownerDocument||e)!==T&&C(e),t=t.replace(te,"='$1']"),h.matchesSelector&&E&&!N[t+" "]&&(!i||!i.test(t))&&(!m||!m.test(t)))try{var n=a.call(e,t);if(n||h.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(p,u),e[3]=(e[3]||e[4]||e[5]||"").replace(p,u),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return f.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ne.test(n)&&(t=(t=y(n,!0))&&n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(p,u).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+r+")"+e+"("+r+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(e){return null==(e=I.attr(e,t))?"!="===n:!n||(e+="","="===n?e===i:"!="===n?e!==i:"^="===n?i&&0===e.indexOf(i):"*="===n?i&&-1(?:<\/\1>|)$/,K=/^.[^:#\[\.,]*$/;function J(e,n,i){if(k.isFunction(n))return k.grep(e,function(e,t){return!!n.call(e,t,e)!==i});if(n.nodeType)return k.grep(e,function(e){return e===n!==i});if("string"==typeof n){if(K.test(n))return k.filter(n,e,i);n=k.filter(n,e)}return k.grep(e,function(e){return-1)[^>]*|#([\w-]*))$/,ee=((k.fn.init=function(e,t,n){if(e){if(n=n||Z,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):k.isFunction(e)?void 0!==n.ready?n.ready(e):e(k):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),k.makeArray(e,this));if(!(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:Q.exec(e))||!i[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(i[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:h,!0)),G.test(i[1])&&k.isPlainObject(t))for(var i in t)k.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i])}else{if((n=h.getElementById(i[2]))&&n.parentNode){if(n.id!==i[2])return Z.find(e);this.length=1,this[0]=n}this.context=h,this.selector=e}}return this}).prototype=k.fn,Z=k(h),/^(?:parents|prev(?:Until|All))/),te={children:!0,contents:!0,next:!0,prev:!0};function ne(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t,n=k(e,this),i=n.length;return this.filter(function(){for(t=0;t
    a",m.leadingWhitespace=3===S.firstChild.nodeType,m.tbody=!S.getElementsByTagName("tbody").length,m.htmlSerialize=!!S.getElementsByTagName("link").length,m.html5Clone="<:nav>"!==h.createElement("nav").cloneNode(!0).outerHTML,j.type="checkbox",j.checked=!0,D.appendChild(j),m.appendChecked=j.checked,S.innerHTML="",m.noCloneChecked=!!S.cloneNode(!0).lastChild.defaultValue,D.appendChild(S),(j=h.createElement("input")).setAttribute("type","radio"),j.setAttribute("checked","checked"),j.setAttribute("name","t"),S.appendChild(j),m.checkClone=S.cloneNode(!0).cloneNode(!0).lastChild.checked,m.noCloneEvent=!!S.addEventListener,S[k.expando]=1,m.attributes=!S.getAttribute(k.expando);var v={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:m.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};function x(e,t){var n,i,a=0,o=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[a]);a++)!t||k.nodeName(i,t)?o.push(i):k.merge(o,x(i,t));return void 0===t||t&&k.nodeName(e,t)?k.merge([e],o):o}function we(e,t){for(var n,i=0;null!=(n=e[i]);i++)k._data(n,"globalEval",!t||k._data(t[i],"globalEval"))}v.optgroup=v.option,v.tbody=v.tfoot=v.colgroup=v.caption=v.thead,v.th=v.td;var ke=/<|&#?\w+;/,Ce=/"!==u[1]||Ce.test(r)?0:s:s.firstChild)&&r.childNodes.length;o--;)k.nodeName(d=r.childNodes[o],"tbody")&&!d.childNodes.length&&r.removeChild(d);for(k.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else h.push(t.createTextNode(r));for(s&&p.removeChild(s),m.appendChecked||k.grep(x(h,"input"),Te),y=0;r=h[y++];)if(i&&-1]","i"),Pe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qe=/\s*$/g,Ye=be(h).appendChild(h.createElement("div"));function $e(e,t){return k.nodeName(e,"table")&&k.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Xe(e){return e.type=(null!==k.find.attr(e,"type"))+"/"+e.type,e}function Ve(e){var t=Be.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Ue(e,t){if(1===t.nodeType&&k.hasData(e)){var n,i,a,e=k._data(e),o=k._data(t,e),r=e.events;if(r)for(n in delete o.handle,o.events={},r)for(i=0,a=r[n].length;i")},clone:function(e,t,n){var i,a,o,r,l,s=k.contains(e.ownerDocument,e);if(m.html5Clone||k.isXMLDoc(e)||!Re.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Ye.innerHTML=e.outerHTML,Ye.removeChild(o=Ye.firstChild)),!(m.noCloneEvent&&m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(i=x(o),l=x(e),r=0;null!=(a=l[r]);++r)if(i[r]){d=p=void 0;var c,d,u,f=a,p=i[r];if(1===p.nodeType){if(c=p.nodeName.toLowerCase(),!m.noCloneEvent&&p[k.expando]){for(d in(u=k._data(p)).events)k.removeEvent(p,d,u.handle);p.removeAttribute(k.expando)}"script"===c&&p.text!==f.text?(Xe(p).text=f.text,Ve(p)):"object"===c?(p.parentNode&&(p.outerHTML=f.outerHTML),m.html5Clone&&f.innerHTML&&!k.trim(p.innerHTML)&&(p.innerHTML=f.innerHTML)):"input"===c&&ye.test(f.type)?(p.defaultChecked=p.checked=f.checked,p.value!==f.value&&(p.value=f.value)):"option"===c?p.defaultSelected=p.selected=f.defaultSelected:"input"!==c&&"textarea"!==c||(p.defaultValue=f.defaultValue)}}if(t)if(n)for(l=l||x(e),i=i||x(o),r=0;null!=(a=l[r]);r++)Ue(a,i[r]);else Ue(e,o);return 0<(i=x(o,"script")).length&&we(i,!s&&x(e,"script")),i=l=a=null,o},cleanData:function(e,t){for(var n,i,a,o,r=0,l=k.expando,s=k.cache,c=m.attributes,d=k.event.special;null!=(n=e[r]);r++)if((t||g(n))&&(o=(a=n[l])&&s[a])){if(o.events)for(i in o.events)d[i]?k.event.remove(n,i):k.removeEvent(n,i,o.handle);s[a]&&(delete s[a],c||void 0===n.removeAttribute?n[l]=void 0:n.removeAttribute(l),u.push(a))}}}),k.fn.extend({domManip:b,detach:function(e){return Ge(this,e,!0)},remove:function(e){return Ge(this,e)},text:function(e){return f(this,function(e){return void 0===e?k.text(this):this.empty().append((this[0]&&this[0].ownerDocument||h).createTextNode(e))},null,e,arguments.length)},append:function(){return b(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||$e(this,e).appendChild(e)})},prepend:function(){return b(this,arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=$e(this,e)).insertBefore(e,t.firstChild)})},before:function(){return b(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return b(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&k.cleanData(x(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&k.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return f(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Fe,""):void 0;if("string"==typeof e&&!qe.test(e)&&(m.htmlSerialize||!Re.test(e))&&(m.leadingWhitespace||!ve.test(e))&&!v[(me.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n")).appendTo(t.documentElement))[0].contentWindow||Ke[0].contentDocument).document).write(),t.close(),n=Ze(e,t),Ke.detach()),Je[e]=n),n}function et(e,t,n,i){var a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];for(a in i=n.apply(e,i||[]),t)e.style[a]=o[a];return i}var n,tt,nt,it,at,ot,rt,o,lt=/^margin/,st=new RegExp("^("+e+")(?!px)[a-z%]+$","i"),ct=h.documentElement;function r(){var e,t=h.documentElement;t.appendChild(rt),o.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",n=nt=ot=!1,tt=at=!0,w.getComputedStyle&&(e=w.getComputedStyle(o),n="1%"!==(e||{}).top,ot="2px"===(e||{}).marginLeft,nt="4px"===(e||{width:"4px"}).width,o.style.marginRight="50%",tt="4px"===(e||{marginRight:"4px"}).marginRight,(e=o.appendChild(h.createElement("div"))).style.cssText=o.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",e.style.marginRight=e.style.width="0",o.style.width="1px",at=!parseFloat((w.getComputedStyle(e)||{}).marginRight),o.removeChild(e)),o.style.display="none",(it=0===o.getClientRects().length)&&(o.style.display="",o.innerHTML="
    t
    ",o.childNodes[0].style.borderCollapse="separate",(e=o.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",it=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",it=0===e[0].offsetHeight),t.removeChild(rt)}rt=h.createElement("div"),(o=h.createElement("div")).style&&(o.style.cssText="float:left;opacity:.5",m.opacity="0.5"===o.style.opacity,m.cssFloat=!!o.style.cssFloat,o.style.backgroundClip="content-box",o.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===o.style.backgroundClip,(rt=h.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.innerHTML="",rt.appendChild(o),m.boxSizing=""===o.style.boxSizing||""===o.style.MozBoxSizing||""===o.style.WebkitBoxSizing,k.extend(m,{reliableHiddenOffsets:function(){return null==n&&r(),it},boxSizingReliable:function(){return null==n&&r(),nt},pixelMarginRight:function(){return null==n&&r(),tt},pixelPosition:function(){return null==n&&r(),n},reliableMarginRight:function(){return null==n&&r(),at},reliableMarginLeft:function(){return null==n&&r(),ot}}));var c,p,dt=/^(top|right|bottom|left)$/;function ut(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}w.getComputedStyle?(c=function(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:w).getComputedStyle(e)},p=function(e,t,n){var i,a,o=e.style;return""!==(a=(n=n||c(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==a||k.contains(e.ownerDocument,e)||(a=k.style(e,t)),n&&!m.pixelMarginRight()&&st.test(a)&<.test(t)&&(e=o.width,t=o.minWidth,i=o.maxWidth,o.minWidth=o.maxWidth=o.width=a,a=n.width,o.width=e,o.minWidth=t,o.maxWidth=i),void 0===a?a:a+""}):ct.currentStyle&&(c=function(e){return e.currentStyle},p=function(e,t,n){var i,a,o,r=e.style;return null==(n=(n=n||c(e))?n[t]:void 0)&&r&&r[t]&&(n=r[t]),st.test(n)&&!dt.test(t)&&(i=r.left,(o=(a=e.runtimeStyle)&&a.left)&&(a.left=e.currentStyle.left),r.left="fontSize"===t?"1em":n,n=r.pixelLeft+"px",r.left=i,o)&&(a.left=o),void 0===n?n:n+""||"auto"});var ft=/alpha\([^)]*\)/i,pt=/opacity\s*=\s*([^)]*)/i,ht=/^(none|table(?!-c[ea]).+)/,yt=new RegExp("^("+e+")(.*)$","i"),mt={position:"absolute",visibility:"hidden",display:"block"},gt={letterSpacing:"0",fontWeight:"400"},vt=["Webkit","O","Moz","ms"],xt=h.createElement("div").style;function bt(e){if(e in xt)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=vt.length;n--;)if((e=vt[n]+t)in xt)return e}function wt(e,t){for(var n,i,a,o=[],r=0,l=e.length;r
    a",H=j.getElementsByTagName("a")[0],D.setAttribute("type","checkbox"),j.appendChild(D),(H=j.getElementsByTagName("a")[0]).style.cssText="top:1px",m.getSetAttribute="t"!==j.className,m.style=/top/.test(H.getAttribute("style")),m.hrefNormalized="/a"===H.getAttribute("href"),m.checkOn=!!D.value,m.optSelected=e.selected,m.enctype=!!h.createElement("form").enctype,S.disabled=!0,m.optDisabled=!e.disabled,(D=h.createElement("input")).setAttribute("value",""),m.input=""===D.getAttribute("value"),D.value="t",D.setAttribute("type","radio"),m.radioValue="t"===D.value;var It=/\r/g,Mt=/[\x20\t\r\n\f]+/g;k.fn.extend({val:function(t){var n,e,i,a=this[0];return arguments.length?(i=k.isFunction(t),this.each(function(e){1!==this.nodeType||(null==(e=i?t.call(this,e,k(this).val()):t)?e="":"number"==typeof e?e+="":k.isArray(e)&&(e=k.map(e,function(e){return null==e?"":e+""})),(n=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,e,"value"))||(this.value=e)})):a?(n=k.valHooks[a.type]||k.valHooks[a.nodeName.toLowerCase()])&&"get"in n&&void 0!==(e=n.get(a,"value"))?e:"string"==typeof(e=a.value)?e.replace(It,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:k.trim(k.text(e)).replace(Mt," ")}},select:{get:function(e){for(var t,n=e.options,i=e.selectedIndex,a="select-one"===e.type||i<0,o=a?null:[],r=a?i+1:n.length,l=i<0?r:a?i:0;l").append(k.parseHTML(e)).find(i):e)}).always(n&&function(e,t){r.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this)},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.filters.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var i,a,o,r,l=k.css(e,"position"),s=k(e),c={};"static"===l&&(e.style.position="relative"),o=s.offset(),i=k.css(e,"top"),r=k.css(e,"left"),l=("absolute"===l||"fixed"===l)&&-1'+(r?a.title[0]:a.title)+"":"";return a.zIndex=o,t([a.shade?'
    ':"",'
    '+(e&&2!=a.type?"":r)+"'+(i=["layui-icon-tips","layui-icon-success","layui-icon-error","layui-icon-question","layui-icon-lock","layui-icon-face-cry","layui-icon-face-smile"],o="layui-anim layui-anim-rotate layui-anim-loop",0==a.type&&-1!==a.icon?'':3==a.type?(n=["layui-icon-loading","layui-icon-loading-1"],2==a.icon?'
    ':''):"")+((1!=a.type||!e)&&a.content||"")+'
    '+(i=[],l&&(i.push(''),i.push('')),a.closeBtn&&i.push(''),i.join(""))+"
    "+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t,n=0,i=a.btn.length;n'+a.btn[n]+"";return'
    '+e+"
    "}():"")+(a.resize?'':"")+""],r,m('
    ')),this},t.pt.creat=function(){function e(e){var t;r.shift&&(r.anim=r.shift),f.anim[r.anim]&&(t="layer-anim "+f.anim[r.anim],e.addClass(t).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){m(this).removeClass(t)}))}var t,n,i,a,o=this,r=o.config,l=o.index,s="object"==typeof(d=r.content),c=m("body");if(r.id&&m("."+f[0]).find("#"+r.id)[0])n=(t=m("#"+r.id).closest("."+f[0])).attr("times"),i=t.data("config"),a=m("#"+f.SHADE+n),"min"===(t.data("maxminStatus")||{})?v.restore(n):i.hideOnClose&&(a.show(),t.show(),e(t),setTimeout(function(){a.css({opacity:a.data(x)})},10));else{switch(r.removeFocus&&document.activeElement&&document.activeElement.blur(),"string"==typeof r.area&&(r.area="auto"===r.area?["",""]:[r.area,""]),6==v.ie&&(r.fixed=!1),r.type){case 0:r.btn="btn"in r?r.btn:u.btn[0],v.closeAll("dialog");break;case 2:var d=r.content=s?r.content:[r.content||"","auto"];r.content='';break;case 3:delete r.title,delete r.closeBtn,-1===r.icon&&r.icon,v.closeAll("loading");break;case 4:s||(r.content=[r.content,"body"]),r.follow=r.content[1],r.content=r.content[0]+'',delete r.title,r.tips="object"==typeof r.tips?r.tips:[r.tips,!0],r.tipsMore||v.closeAll("tips")}o.vessel(s,function(e,t,n){c.append(e[0]),s?2==r.type||4==r.type?m("body").append(e[1]):d.parents("."+f[0])[0]||(d.data("display",d.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),m("#"+f[0]+l).find("."+f[5]).before(t)):c.append(e[1]),m("#"+f.MOVE)[0]||c.append(u.moveElem=n),o.layero=m("#"+f[0]+l),o.shadeo=m("#"+f.SHADE+l),r.scrollbar||u.setScrollbar(l)}).auto(l),o.shadeo.css({"background-color":r.shade[1]||"#000",opacity:r.shade[0]||r.shade,transition:r.shade[2]||""}),o.shadeo.data(x,r.shade[0]||r.shade),2==r.type&&6==v.ie&&o.layero.find("iframe").attr("src",d[0]),4==r.type?o.tips():(o.offset(),parseInt(u.getStyle(document.getElementById(f.MOVE),"z-index"))||(o.layero.css("visibility","hidden"),v.ready(function(){o.offset(),o.layero.css("visibility","visible")}))),r.fixed&&!u.events.resize[o.index]&&(u.events.resize[o.index]=function(){o.resize()},g.on("resize",u.events.resize[o.index])),r.time<=0||setTimeout(function(){v.close(o.index)},r.time),o.move().callback(),e(o.layero),o.layero.data("config",r)}},t.pt.resize=function(){var e=this,t=e.config;e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(e.index),4==t.type&&e.tips()},t.pt.auto=function(e){var t=this.config,n=m("#"+f[0]+e),i=(""===t.area[0]&&0t.maxWidth)&&n.width(t.maxWidth),[n.innerWidth(),n.innerHeight()]),a=n.find(f[1]).outerHeight()||0,o=n.find("."+f[6]).outerHeight()||0,e=function(e){(e=n.find(e)).height(i[1]-a-o-2*(0|parseFloat(e.css("padding-top"))))};return 2===t.type?e("iframe"):""===t.area[1]?0t.maxHeight?(i[1]=t.maxHeight,e("."+f[5])):t.fixed&&i[1]>=g.height()&&(i[1]=g.height(),e("."+f[5])):e("."+f[5]),this},t.pt.offset=function(){var e=this,t=e.config,n=e.layero,i=[n.outerWidth(),n.outerHeight()],a="object"==typeof t.offset;e.offsetTop=(g.height()-i[1])/2,e.offsetLeft=(g.width()-i[0])/2,a?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=g.width()-i[0]:"b"===t.offset?e.offsetTop=g.height()-i[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=g.height()-i[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=g.width()-i[0]):"rb"===t.offset?(e.offsetTop=g.height()-i[1],e.offsetLeft=g.width()-i[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?g.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?g.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=g.scrollTop(),e.offsetLeft+=g.scrollLeft()),"min"===n.data("maxminStatus")&&(e.offsetTop=g.height()-(n.find(f[1]).outerHeight()||0),e.offsetLeft=n.css("left")),n.css({top:e.offsetTop,left:e.offsetLeft})},t.pt.tips=function(){var e=this.config,t=this.layero,n=[t.outerWidth(),t.outerHeight()],i={width:(o=(o=m(e.follow))[0]?o:m("body")).outerWidth(),height:o.outerHeight(),top:o.offset().top,left:o.offset().left},a=t.find(".layui-layer-TipsG"),o=e.tips[0];e.tips[1]||a.remove(),i.autoLeft=function(){0'):e.removeClass("layui-layer-btn-is-loading").removeAttr("disabled").find(".layui-layer-btn-loading-icon").remove()},t.pt.callback=function(){var i=this,a=i.layero,o=i.config;i.openLayer(),o.success&&(2==o.type?a.find("iframe").on("load",function(){o.success(a,i.index,i)}):o.success(a,i.index,i)),6==v.ie&&i.IE6(a),a.find("."+f[6]).children("a").on("click",function(){var e,t=m(this),n=t.index();t.attr("disabled")||(o.btnAsync?(e=0===n?o.yes||o.btn1:o["btn"+(n+1)],i.loading=function(e){i.btnLoading(t,e)},e?u.promiseLikeResolve(e.call(o,i.index,a,i)).then(function(e){!1!==e&&v.close(i.index)},function(e){e!==h&&p.console&&p.console.error("layer error hint: "+e)}):v.close(i.index)):0===n?o.yes?o.yes(i.index,a,i):o.btn1?o.btn1(i.index,a,i):v.close(i.index):!1!==(o["btn"+(n+1)]&&o["btn"+(n+1)](i.index,a,i))&&v.close(i.index))}),a.find("."+f[7]).on("click",function(){!1!==(o.cancel&&o.cancel(i.index,a,i))&&v.close(i.index)}),o.shadeClose&&i.shadeo.on("click",function(){v.close(i.index)}),a.find(".layui-layer-min").on("click",function(){!1!==(o.min&&o.min(a,i.index,i))&&v.min(i.index,o)}),a.find(".layui-layer-max").on("click",function(){m(this).hasClass("layui-layer-maxmin")?(v.restore(i.index),o.restore&&o.restore(a,i.index,i)):(v.full(i.index,o),setTimeout(function(){o.full&&o.full(a,i.index,i)},100))}),o.end&&(u.end[i.index]=o.end),o.beforeEnd&&(u.beforeEnd[i.index]=m.proxy(o.beforeEnd,o,a,i.index,i))},u.reselect=function(){m.each(m("select"),function(e,t){var n=m(this);n.parents("."+f[0])[0]||1==n.attr("layer")&&m("."+f[0]).length<1&&n.removeAttr("layer").show()})},t.pt.IE6=function(e){m("select").each(function(e,t){var n=m(this);n.parents("."+f[0])[0]||"none"!==n.css("display")&&n.attr({layer:"1"}).hide()})},t.pt.openLayer=function(){v.zIndex=this.config.zIndex,v.setTop=function(e){return v.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",function(){v.zIndex++,e.css("z-index",v.zIndex+1)}),v.zIndex}},u.record=function(e){if(!e[0])return p.console&&console.error("index error");var t=e.attr("type"),n=e.find(".layui-layer-content"),t=t===u.type[2]?n.children("iframe"):n,i=[e[0].style.width||u.getStyle(e[0],"width"),e[0].style.height||u.getStyle(e[0],"height"),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:i}),n.data(s,u.getStyle(t[0],"height"))},u.setScrollbar=function(e){f.html.css("overflow","hidden").attr("layer-full",e)},u.restScrollbar=function(e){f.html.attr("layer-full")==e&&(f.html[0].style[f.html[0].style.removeProperty?"removeProperty":"removeAttribute"]("overflow"),f.html.removeAttr("layer-full"))},u.promiseLikeResolve=function(e){var t=m.Deferred();return e&&"function"==typeof e.then?e.then(t.resolve,t.reject):t.resolve(e),t.promise()},(p.layer=v).getChildFrame=function(e,t){return t=t||m("."+f[4]).attr("times"),m("#"+f[0]+t).find("iframe").contents().find(e)},v.getFrameIndex=function(e){return m("#"+e).parents("."+f[4]).attr("times")},v.iframeAuto=function(e){var t,n,i;e&&(t=v.getChildFrame("html",e).outerHeight(),n=(e=m("#"+f[0]+e)).find(f[1]).outerHeight()||0,i=e.find("."+f[6]).outerHeight()||0,e.css({height:t+n+i}),e.find("iframe").css({height:t}))},v.iframeSrc=function(e,t){m("#"+f[0]+e).find("iframe").attr("src",t)},v.style=function(e,t,n){var i=(e=m("#"+f[0]+e)).find(".layui-layer-content"),a=e.attr("type"),o=e.find(f[1]).outerHeight()||0,r=e.find("."+f[6]).outerHeight()||0;e.attr("minLeft"),a!==u.type[3]&&a!==u.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-o-r<=64&&(t.height=64+o+r)),e.css(t),r=e.find("."+f[6]).outerHeight()||0,a===u.type[2]?e.find("iframe").css({height:("number"==typeof t.height?t.height:e.height())-o-r}):i.css({height:("number"==typeof t.height?t.height:e.height())-o-r-parseFloat(i.css("padding-top"))-parseFloat(i.css("padding-bottom"))}))},v.min=function(e,t){var n,i,a,o,r,l,s=m("#"+f[0]+e),c=s.data("maxminStatus");"min"!==c&&("max"===c&&v.restore(e),s.data("maxminStatus","min"),t=t||s.data("config")||{},c=m("#"+f.SHADE+e),n=s.find(".layui-layer-min"),i=s.find(f[1]).outerHeight()||0,o=(a="string"==typeof(o=s.attr("minLeft")))?o:181*u.minStackIndex+"px",r=s.css("position"),l={width:180,height:i,position:"fixed",overflow:"hidden"},u.record(s),0g.width()&&(o=g.width()-180-(u.minStackArr.edgeIndex=u.minStackArr.edgeIndex||0,u.minStackArr.edgeIndex+=3))<0&&(o=0),t.minStack&&(l.left=o,l.top=g.height()-i,a||u.minStackIndex++,s.attr("minLeft",o)),s.attr("position",r),v.style(e,l,!0),n.hide(),"page"===s.attr("type")&&s.find(f[4]).hide(),u.restScrollbar(e),c.hide())},v.restore=function(e){var t=m("#"+f[0]+e),n=m("#"+f.SHADE+e),i=t.find(".layui-layer-content"),a=t.attr("area").split(","),o=t.attr("type"),r=t.data("config")||{},l=i.data(s);t.removeData("maxminStatus"),v.style(e,{width:a[0],height:a[1],top:parseFloat(a[2]),left:parseFloat(a[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===o&&t.find(f[4]).show(),r.scrollbar?u.restScrollbar(e):u.setScrollbar(e),l!==h&&(i.removeData(s),(o===u.type[2]?i.children("iframe"):i).css({height:l})),n.show()},v.full=function(t){var n=m("#"+f[0]+t),e=n.data("maxminStatus");"max"!==e&&("min"===e&&v.restore(t),n.data("maxminStatus","max"),u.record(n),f.html.attr("layer-full")||u.setScrollbar(t),setTimeout(function(){var e="fixed"===n.css("position");v.style(t,{top:e?0:g.scrollTop(),left:e?0:g.scrollLeft(),width:"100%",height:"100%"},!0),n.find(".layui-layer-min").hide()},100))},v.title=function(e,t){m("#"+f[0]+(t||v.index)).find(f[1]).html(e)},v.close=function(o,r){var e,t,l=(e=m("."+f[0]).children("#"+o).closest("."+f[0]))[0]?(o=e.attr("times"),e):m("#"+f[0]+o),s=l.attr("type"),n=l.data("config")||{},c=n.id&&n.hideOnClose;l[0]&&(t=function(){function e(){var e="layui-layer-wrap";if(c)return l.removeClass("layer-anim "+a),l.hide();if(s===u.type[1]&&"object"===l.attr("conType")){l.children(":not(."+f[5]+")").remove();for(var t=l.find("."+e),n=0;n<2;n++)t.unwrap();t.css("display",t.data("display")).removeClass(e)}else{if(s===u.type[2])try{var i=m("#"+f[4]+o)[0];i.contentWindow.document.write(""),i.contentWindow.close(),l.find("."+f[5])[0].removeChild(i)}catch(e){}l[0].innerHTML="",l.remove()}"function"==typeof u.end[o]&&u.end[o](),delete u.end[o],"function"==typeof r&&r(),u.events.resize[o]&&(g.off("resize",u.events.resize[o]),delete u.events.resize[o])}var a={slideDown:"layer-anim-slide-down-out",slideLeft:"layer-anim-slide-left-out",slideUp:"layer-anim-slide-up-out",slideRight:"layer-anim-slide-right-out"}[n.anim]||"layer-anim-close",t=m("#"+f.SHADE+o);v.ie&&v.ie<10||!n.isOutAnim?t[c?"hide":"remove"]():(t.css({opacity:0}),setTimeout(function(){t[c?"hide":"remove"]()},350)),n.isOutAnim&&l.addClass("layer-anim "+a),6==v.ie&&u.reselect(),u.restScrollbar(o),"string"==typeof l.attr("minLeft")&&(u.minStackIndex--,u.minStackArr.push(l.attr("minLeft"))),v.ie&&v.ie<10||!n.isOutAnim?e():setTimeout(function(){e()},200)},c||"function"!=typeof u.beforeEnd[o]?(delete u.beforeEnd[o],t()):u.promiseLikeResolve(u.beforeEnd[o]()).then(function(e){!1!==e&&(delete u.beforeEnd[o],t())},function(e){e!==h&&p.console&&p.console.error("layer error hint: "+e)}))},v.closeAll=function(n,i){"function"==typeof n&&(i=n,n=null);var a=m("."+f[0]);m.each(a,function(e){var t=m(this);(n?t.attr("type")===n:1)&&v.close(t.attr("times"),e===a.length-1?i:null)}),0===a.length&&"function"==typeof i&&i()},v.closeLast=function(n,e){var t,i=[],a=m.isArray(n);m("string"==typeof n?".layui-layer-"+n:".layui-layer").each(function(e,t){if(t=m(t),a&&-1===n.indexOf(t.attr("type"))||"none"===t.css("display"))return!0;i.push(Number(t.attr("times")))}),0":'",r=n.success;return delete n.success,v.open(m.extend({type:1,btn:["确定","取消"],content:o,skin:"layui-layer-prompt"+y("prompt"),maxWidth:g.width(),success:function(e){(a=e.find(".layui-layer-input")).val(n.value||"").focus(),"function"==typeof r&&r(e)},resize:!1,yes:function(e){var t=a.val();t.length>(n.maxlength||500)?v.tips("最多输入"+(n.maxlength||500)+"个字符",a,{tips:1}):i&&i(t,e,a)}},n))},v.tab=function(i){var a=(i=i||{}).tab||{},o="layui-this",r=i.success;return delete i.success,v.open(m.extend({type:1,skin:"layui-layer-tab"+y("tab"),resize:!1,title:function(){var e=a.length,t=1,n="";if(0'+a[0].title+"";t"+a[t].title+"";return n}(),content:'
      '+function(){var e=a.length,t=1,n="";if(0'+(a[0].content||"no content")+"";t'+(a[t].content||"no content")+"";return n}()+"
    ",success:function(e){var t=e.find(".layui-layer-title").children(),n=e.find(".layui-layer-tabmain").children();t.on("mousedown",function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0;var t=(e=m(this)).index();e.addClass(o).siblings().removeClass(o),n.eq(t).show().siblings().hide(),"function"==typeof i.change&&i.change(t)}),"function"==typeof r&&r(e)}},i))},v.photos=function(i,e,a){var r={};if((i=m.extend(!0,{toolbar:!0,footer:!0},i)).photos){var t=(d=!("string"==typeof i.photos||i.photos instanceof m))?i.photos:{},o=t.data||[],l=t.start||0,s=i.success;if(r.imgIndex=1+(0|l),i.img=i.img||"img",delete i.success,d){if(0===o.length)return v.msg("没有图片")}else{var n=m(i.photos),c=function(){o=[],n.find(i.img).each(function(e){var t=m(this);t.attr("layer-index",e),o.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("lay-src")||t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(c(),0===o.length)return;if(e||n.on("click",i.img,function(){c();var e=m(this).attr("layer-index");v.photos(m.extend(i,{photos:{start:e,data:o,tab:i.tab},full:i.full}),!0)}),!e)return}r.imgprev=function(e){r.imgIndex--,r.imgIndex<1&&(r.imgIndex=o.length),r.tabimg(e)},r.imgnext=function(e,t){r.imgIndex++,r.imgIndex>o.length&&(r.imgIndex=1,t)||r.tabimg(e)},r.keyup=function(e){var t;r.end||(t=e.keyCode,e.preventDefault(),37===t?r.imgprev(!0):39===t?r.imgnext(!0):27===t&&v.close(r.index))},r.tabimg=function(e){if(!(o.length<=1))return t.start=r.imgIndex-1,v.close(r.index),v.photos(i,!0,e)},r.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},r.image={},r.getTransform=function(e){var t=[],n=e.rotate,i=e.scaleX,e=e.scale;return r.isNumber(n)&&0!==n&&t.push("rotate("+n+"deg)"),r.isNumber(i)&&1!==i&&t.push("scaleX("+i+")"),r.isNumber(e)&&t.push("scale("+e+")"),t.length?t.join(" "):"none"},r.event=function(e,n,i){var a,o;r.main.find(".layui-layer-photos-prev").on("click",function(e){e.preventDefault(),r.imgprev(!0)}),r.main.find(".layui-layer-photos-next").on("click",function(e){e.preventDefault(),r.imgnext(!0)}),m(document).on("keyup",r.keyup),e.off("click").on("click","*[toolbar-event]",function(){var e=m(this);switch(e.attr("toolbar-event")){case"rotate":r.image.rotate=((r.image.rotate||0)+Number(e.attr("data-option")))%360,r.imgElem.css({transform:r.getTransform(r.image)});break;case"scalex":r.image.scaleX=-1===r.image.scaleX?1:-1,r.imgElem.css({transform:r.getTransform(r.image)});break;case"zoom":var t=Number(e.attr("data-option"));r.image.scale=(r.image.scale||1)+t,t<0&&r.image.scale<0-t&&(r.image.scale=0-t),r.imgElem.css({transform:r.getTransform(r.image)});break;case"reset":r.image.scaleX=1,r.image.scale=1,r.image.rotate=0,r.imgElem.css({transform:"none"});break;case"close":v.close(n)}i.offset(),i.auto(n)}),r.main.on("mousewheel DOMMouseScroll",function(e){var t=e.originalEvent.wheelDelta||-e.originalEvent.detail,n=r.main.find('[toolbar-event="zoom"]');(0i)&&("left"===t.direction?r.imgnext(!0):"right"===t.direction&&r.imgprev(!0))},m.each([i.shadeo,r.main],function(e,t){a.touchSwipe(t,{onTouchEnd:o})}))},r.loadi=v.load(1,{shade:!("shade"in i)&&[.9,h,"unset"],scrollbar:!1});var d=o[l].src,u=function(e){v.close(r.loadi);var t,n=o[l].alt||"";a&&(i.anim=-1),r.index=v.open(m.extend({type:1,id:"layui-layer-photos",area:(e=[e.width,e.height],t=[m(p).width()-100,m(p).height()-100],!i.full&&(t[0]'+n+''+(t=['
    '],1','','',"
    "].join("")),i.toolbar&&t.push(['
    ','','','','','','',"
    "].join("")),i.footer&&t.push(['"].join("")),t.push(""),t.join(""))+"",success:function(e,t,n){r.main=e.find(".layer-layer-photos-main"),r.footer=e.find(".layui-layer-photos-footer"),r.imgElem=r.main.children("img"),r.event(e,t,n),i.tab&&i.tab(o[l],e),"function"==typeof s&&s(e)},end:function(){r.end=!0,m(document).off("keyup",r.keyup)}},i))},f=new Image;f.src=d,f.complete?u(f):(f.onload=function(){f.onload=null,u(f)},f.onerror=function(e){f.onerror=null,v.close(r.loadi),v.msg("当前图片地址异常,
    是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1").addClass(o));layui.each(i.bars,function(e,t){var n=d('
  • ');n.addClass(t.icon).attr({"lay-type":t.type,style:t.style||(i.bgcolor?"background-color: "+i.bgcolor:"")}).html(t.content),n.on("click",function(){var e=d(this).attr("lay-type");"top"===e&&("body"===i.target?d("html,body"):s).animate({scrollTop:0},i.duration),"function"==typeof i.click&&i.click.call(this,e)}),"object"===layui.type(i.on)&&layui.each(i.on,function(e,t){n.on(e,function(){var e=d(this).attr("lay-type");"function"==typeof t&&t.call(this,e)})}),"top"===t.type&&(n.addClass("layui-fixbar-top"),a=n),c.append(n)}),l.find("."+o).remove(),"object"==typeof i.css&&c.css(i.css),l.append(c),a&&(e=function e(){return s.scrollTop()>=i.margin?t||(a.show(),t=1):t&&(a.hide(),t=0),e}()),s.on("scroll",function(){e&&(clearTimeout(n),n=setTimeout(function(){e()},100))})},countdown:function(a){a=d.extend(!0,{date:new Date,now:new Date},a);var o=arguments,r=(1]|&(?=#[a-zA-Z0-9]+)/g.test(e+="")?e.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,"""):e},unescape:function(e){return null==e&&(e=""),(e+="").replace(/\&/g,"&").replace(/\</g,"<").replace(/\>/g,">").replace(/\'/g,"'").replace(/\"/g,'"')},openWin:function(e){var t=(e=e||{}).window||window.open(e.url||"",e.target,e.specs);e.url||(t.document.open("text/html","replace"),t.document.write(e.content||""),t.document.close())},toVisibleArea:function(e){var t,n,i,a,o,r,l,s;(e=d.extend({margin:160,duration:200,type:"y"},e)).scrollElem[0]&&e.thisElem[0]&&(t=e.scrollElem,l=e.thisElem,i=(o="y"===e.type)?"top":"left",a=t[n=o?"scrollTop":"scrollLeft"](),o=t[o?"height":"width"](),r=t.offset()[i],s={},(l=l.offset()[i]-r)>o-e.margin||l."+v;t.prototype.config={trigger:"click",content:"",className:"",style:"",show:!1,isAllowSpread:!0,isSpreadItem:!0,data:[],delay:[200,300],shade:0,accordion:!1},t.prototype.reload=function(e,t){this.config=u.extend({},this.config,e),this.init(!0,t)},t.prototype.init=function(e,t){var n,i=this,a=i.config,o=u(a.elem);return 1');return 0暂无数据
  • '),e}var o=this,s=o.config,c=s.customName,i=u("body"),d=function(l,e){return layui.each(e,function(e,t){var n,i=t[c.children]&&0",(n="href"in t?''+o+"":o,i?'
    '+n+("parent"===r?'':"group"===r&&s.isAllowSpread?'':"")+"
    ":'
    '+n+"
    "),""].join(""))).data("item",t),i&&(a=u('
    '),n=u("
      "),"parent"===r?(a.append(d(n,t[c.children])),o.append(a)):o.append(d(n,t[c.children]))),l.append(o))}),l},a=['
      ',"
      "].join("");!(e=!("contextmenu"!==s.trigger&&!lay.isTopElem(s.elem[0]))||e)&&s.elem.data(h+"_opened")||(o.elemView=u("."+g+"["+y+'="'+s.id+'"]'),"reloadData"===t&&o.elemView.length?o.elemView.html(s.content||n()):(o.elemView=u(a),o.elemView.append(s.content||n()),s.className&&o.elemView.addClass(s.className),s.style&&o.elemView.attr("style",s.style),m.thisId=s.id,o.remove(),i.append(o.elemView),s.elem.data(h+"_opened",!0),e=s.shade?'
      ':"",o.elemView.before(e),"mouseenter"===s.trigger&&o.elemView.on("mouseenter",function(){clearTimeout(r.timer)}).on("mouseleave",function(){o.delayRemove()})),o.position(),(r.prevElem=o.elemView).data("prevElem",s.elem),o.elemView.find(".layui-menu").on(l,function(e){layui.stope(e)}),o.elemView.find(".layui-menu li").on("click",function(e){var t=u(this),n=t.data("item")||{},i=n[c.children]&&0i.width()&&(n.addClass(T),(t=n[0].getBoundingClientRect()).left<0)&&n.removeClass(T),t.bottom>i.height())&&n.eq(0).css("margin-top",-(t.bottom-i.height()+5))}).on("mouseleave",a,function(e){var t=u(this).children("."+C);t.removeClass(T),t.css("margin-top",0)}),m.close=function(e){return(e=r.getThis(e))?(e.remove(),r.call(e)):this},m.open=function(e){return(e=r.getThis(e))?(e.render(),r.call(e)):this},m.reload=function(e,t,n){return(e=r.getThis(e))?(e.reload(t,n),r.call(e)):this},m.reloadData=function(){var n=u.extend([],arguments),i=(n[2]="reloadData",new RegExp("^("+["data","templet","content"].join("|")+")$"));return layui.each(n[1],function(e,t){i.test(e)||delete n[1][e]}),m.reload.apply(null,n)},m.render=function(e){return e=new t(e),r.call(e)},e(s,m)}),layui.define(["jquery","lay"],function(e){"use strict";function t(e){this.index=++h.index,this.config=x.extend({},this.config,h.config,e),this.render()}var x=layui.$,b=layui.lay,h={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){return this.config=x.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,n,e,t)}},n="slider",y="layui-disabled",w="layui-slider-bar",k="layui-slider-wrap",C="layui-slider-wrap-btn",T="layui-slider-tips",E="layui-slider-input-txt",D="layui-slider-hover";t.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,tipsAlways:!1,input:!1,range:!1,height:200,disabled:!1,theme:"#16baaa"},t.prototype.precision=function(){var e=this.config,e=x.map([e.min,e.max,e.step],function(e,t){return(e=String(e).split("."))[1]?e[1].length:0});return Math.max.apply(null,e)},t.prototype.render=function(){var i=this,a=i.config;if(1<(e=x(a.elem)).length)return layui.each(e,function(){h.render(x.extend({},a,{elem:this}))}),i;x.extend(a,b.options(e[0])),a.step<=0&&(a.step=1),a.maxa.max&&(a.value=a.max),o=(a.value-a.min)/(a.max-a.min)*100+"%");var t,e=a.disabled?"#c2c2c2":a.theme,n='
      '+(a.tips?'
      ":"")+'
      '+(a.range?'
      ':"")+"
      ",o=x(a.elem),r=o.next(".layui-slider");if(r[0]&&r.remove(),i.elemTemp=x(n),a.range?(i.elemTemp.find("."+k).eq(0).data("value",a.value[0]),i.elemTemp.find("."+k).eq(1).data("value",a.value[1])):i.elemTemp.find("."+k).data("value",a.value),o.html(i.elemTemp),"vertical"===a.type&&i.elemTemp.height(a.height+"px"),a.showstep){for(var l=(a.max-a.min)/a.step,s="",c=1;c<1+l;c++){var d=100*c/l;d<100&&(s+='
      ')}i.elemTemp.append(s)}function u(e){e=e.parent().data("value"),e=a.setTips?a.setTips(e):e,i.elemTemp.find("."+T).html(e)}function f(e){var t="vertical"===a.type?a.height:i.elemTemp[0].offsetWidth,n=i.elemTemp.find("."+k);return("vertical"===a.type?t-e.parent()[0].offsetTop-n.height():e.parent()[0].offsetLeft)/t*100}function p(e){"vertical"===a.type?i.elemTemp.find("."+T).css({bottom:e+"%","margin-bottom":"20px",display:"inline-block"}):i.elemTemp.find("."+T).css({left:e+"%",display:"inline-block"})}a.input&&!a.range&&(e=x('
      '),o.css("position","relative"),o.append(e),o.find("."+E).children("input").val(a.value),"vertical"===a.type?e.css({left:0,top:-48}):i.elemTemp.css("margin-right",e.outerWidth()+15)),a.disabled?(i.elemTemp.addClass(y),i.elemTemp.find("."+C).addClass(y)):i.slide(),a.tips&&(a.tipsAlways?(u(r=i.elemTemp.find("."+C)),p(f(r))):i.elemTemp.find("."+C).on("mouseover",function(){u(x(this));var e=f(x(this));clearTimeout(t),t=setTimeout(function(){p(e)},300)}).on("mouseout",function(){clearTimeout(t),a.tipsAlways||i.elemTemp.find("."+T).css("display","none")}))},t.prototype.slide=function(e,t,n){var c=this,d=c.config,u=c.elemTemp,f=function(){return"vertical"===d.type?d.height:u[0].offsetWidth},p=u.find("."+k),l=u.next(".layui-slider-input"),s=l.children("."+E).children("input").val(),h=100/((d.max-d.min)/d.step),y=c.precision(),m=function(e,t,n){e=(e=100<(e=100i[1]&&i.reverse(),c.value=d.range?i:o,d.change&&d.change(c.value),"done"===n&&d.done&&d.done(c.value)},g=function(e){var t=e/f()*100/h,n=Math.round(t)*h;return e==f()?Math.ceil(t)*h:n},v=x(['
      f()?f():t)/f()*100/h;m(t,l),s.addClass(D),u.find("."+T).show(),e.preventDefault()},i=function(e){s.removeClass(D),d.tipsAlways||setTimeout(function(){u.find("."+T).hide()},e)},a=function(){i(b.touchEventsSupported()?1e3:0),v.remove(),d.done&&d.done(c.value),b.touchEventsSupported()&&(t[0].removeEventListener("touchmove",n,!!b.passiveSupported&&{passive:!1}),t[0].removeEventListener("touchend",a),t[0].removeEventListener("touchcancel",a))},x("#LAY-slider-moving")[0]||x("body").append(v),v.on("mousemove",n),v.on("mouseup",a).on("mouseleave",a),b.touchEventsSupported()&&(t[0].addEventListener("touchmove",n,!!b.passiveSupported&&{passive:!1}),t[0].addEventListener("touchend",a),t[0].addEventListener("touchcancel",a))})}),u.on("click",function(e){var t=x("."+C),n=x(this);!t.is(event.target)&&0===t.has(event.target).length&&t.length&&(n=(t=(t=(t="vertical"===d.type?f()-e.clientY+n.offset().top-x(window).scrollTop():e.clientX-n.offset().left-x(window).scrollLeft())<0?0:t)>f()?f():t)/f()*100/h,t=d.range?"vertical"===d.type?Math.abs(t-parseInt(x(p[0]).css("bottom")))>Math.abs(t-parseInt(x(p[1]).css("bottom")))?1:0:Math.abs(t-p[0].offsetLeft)>Math.abs(t-p[1].offsetLeft)?1:0:0,m(n,t,"done"),e.preventDefault())}),l.children(".layui-slider-input-btn").children("i").each(function(t){x(this).on("click",function(){s=l.children("."+E).children("input").val();var e=((s=1==t?s-d.stepd.max?d.max:Number(s)+d.step)-d.min)/(d.max-d.min)*100/h;m(e,0,"done")})});function i(){var e=this.value,e=(e=(e=(e=isNaN(e)?0:e)d.max?d.max:e,((this.value=e)-d.min)/(d.max-d.min)*100/h);m(e,0,"done")}l.children("."+E).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),i.call(this))}).on("change",i)},t.prototype.events=function(){this.config},h.render=function(e){return e=new t(e),function(){var n=this,i=n.config;return{setValue:function(e,t){return e=(e=e>i.max?i.max:e)',"",'','',"","","
      "].join("")),i=t.elem=E(t.elem);t.size&&n.addClass("layui-colorpicker-"+t.size),i.addClass("layui-inline").html(e.elemColorBox=n),t.id="id"in t?t.id:i.attr("id")||e.index,e.color=e.elemColorBox.find("."+L)[0].style.background,e.events()},o.prototype.renderPicker=function(){var n,e=this,t=e.config,i=e.elemColorBox[0],a=e.elemPicker=E(['
      ','
      ','
      ','
      ','
      ','
      ',"
      ",'
      ','
      ',"
      ","
      ",'
      ','
      ','
      ',"
      ","
      ",t.predefine?(n=['
      '],layui.each(t.colors,function(e,t){n.push(['
      ','
      ',"
      "].join(""))}),n.push("
      "),n.join("")):"",'
      ','
      ','',"
      ",'
      ','','',"","
      "].join(""));e.elemColorBox.find("."+L)[0],E(s)[0]&&E(s).data("index")==e.index?e.removePicker(o.thisElemInd):(e.removePicker(o.thisElemInd),E("body").append(a)),r.thisId=t.id,o.thisElemInd=e.index,o.thisColor=i.style.background,e.position(),e.pickerEvents()},o.prototype.removePicker=function(e){var t=this.config;return(e=E("#layui-colorpicker"+(e||this.index)))[0]&&(e.remove(),delete r.thisId,"function"==typeof t.close)&&t.close(this.color),this},o.prototype.position=function(){var e=this,t=e.config;return D.position(e.bindElem||e.elemColorBox[0],e.elemPicker[0],{position:t.position,align:"center"}),e},o.prototype.val=function(){var e,t=this,n=(t.config,t.elemColorBox.find("."+L)),i=t.elemPicker.find("."+O),a=n[0].style.backgroundColor;a?(e=w(T(a)),n=n.attr("lay-type"),t.select(e.h,e.s,e.b),"torgb"===n?i.find("input").val(a):"rgba"===n?(n=T(a),3===(a.match(/[0-9]{1,3}/g)||[]).length?(i.find("input").val("rgba("+n.r+", "+n.g+", "+n.b+", 1)"),t.elemPicker.find("."+_).css("left",280)):(i.find("input").val(a),a=280*a.slice(a.lastIndexOf(",")+1,a.length-1),t.elemPicker.find("."+_).css("left",a)),t.elemPicker.find("."+j)[0].style.background="linear-gradient(to right, rgba("+n.r+", "+n.g+", "+n.b+", 0), rgb("+n.r+", "+n.g+", "+n.b+"))"):i.find("input").val("#"+C(e))):(t.select(0,100,100),i.find("input").val(""),t.elemPicker.find("."+j)[0].style.background="",t.elemPicker.find("."+_).css("left",280))},o.prototype.side=function(){function c(e,t,n,i){o.select(e,t,n);var a=k({h:e,s:t,b:n}),e=C({h:e,s:t,b:n}),t=o.elemPicker.find("."+O).find("input");v.addClass(S).removeClass(N),l[0].style.background="rgb("+a.r+", "+a.g+", "+a.b+")","torgb"===s?t.val("rgb("+a.r+", "+a.g+", "+a.b+")"):"rgba"===s?(p.css("left",280*i),t.val("rgba("+a.r+", "+a.g+", "+a.b+", "+i+")"),l[0].style.background="rgba("+a.r+", "+a.g+", "+a.b+", "+i+")",f[0].style.background="linear-gradient(to right, rgba("+a.r+", "+a.g+", "+a.b+", 0), rgb("+a.r+", "+a.g+", "+a.b+"))"):t.val("#"+e),r.change&&r.change(E.trim(o.elemPicker.find("."+O).find("input").val()))}function n(e){E("#LAY-colorpicker-moving")[0]||E("body").append(t),t.on("mousemove",e),t.on("mouseup",function(){t.remove()}).on("mouseleave",function(){t.remove()})}var o=this,r=o.config,l=o.elemColorBox.find("."+L),s=l.attr("lay-type"),d=o.elemPicker.find(".layui-colorpicker-side"),i=o.elemPicker.find("."+I),u=o.elemPicker.find("."+M),a=o.elemPicker.find("."+H),f=o.elemPicker.find("."+j),p=o.elemPicker.find("."+_),h=i[0].offsetTop/180*360,y=100-(a[0].offsetTop+3)/180*100,m=(a[0].offsetLeft+3)/260*100,g=Math.round(p[0].offsetLeft/280*100)/100,v=o.elemColorBox.find("."+A),e=o.elemPicker.find(".layui-colorpicker-pre").children("div"),t=E(['
      '].join("")),x=!0,b=!0;i.on("mousedown",function(e,t){var i=this.offsetTop,a=(void 0===e.clientY?t:e).clientY;b&&layui.stope(e),n(function(e){var t=i+(e.clientY-a),n=(t=(n=d[0].offsetHeight)<(t=t<0?0:t)?n:t)/180*360;c(h=n,m,y,g),e.preventDefault()}),e.preventDefault()}),d.on("mousedown",function(e){var t=((t=(t=e.clientY-E(this).offset().top+F.scrollTop())<0?0:t)>this.offsetHeight?this.offsetHeight:t)/180*360;c(h=t,m,y,g),e.preventDefault(),x&&i.trigger("mousedown",e)}),a.on("mousedown",function(e,t){var o=this.offsetTop,r=this.offsetLeft,l=(void 0===e.clientY?t:e).clientY,s=(void 0===e.clientX?t:e).clientX;b&&layui.stope(e),n(function(e){var t=o+(e.clientY-l),n=r+(e.clientX-s),i=u[0].offsetHeight,a=(n=(a=u[0].offsetWidth)<(n=n<0?0:n)?a:n)/260*100,n=100-(t=i<(t=t<0?0:t)?i:t)/180*100;c(h,m=a,y=n,g),e.preventDefault()}),e.preventDefault()}),u.on("mousedown",function(e){var t=e.clientY-E(this).offset().top+F.scrollTop(),n=e.clientX-E(this).offset().left+F.scrollLeft(),n=((t=t<0?0:t)>this.offsetHeight&&(t=this.offsetHeight),((n=n<0?0:n)>this.offsetWidth?this.offsetWidth:n)/260*100);c(h,m=n,y=t=100-t/180*100,g),layui.stope(e),e.preventDefault(),x&&a.trigger("mousedown",e)}),p.on("mousedown",function(e,t){var i=this.offsetLeft,a=(void 0===e.clientX?t:e).clientX;b&&layui.stope(e),n(function(e){var t=i+(e.clientX-a),n=((n=f[0].offsetWidth)<(t=t<0?0:t)&&(t=n),Math.round(t/280*100)/100);c(h,m,y,g=n),e.preventDefault()}),e.preventDefault()}),f.on("mousedown",function(e){(t=(t=e.clientX-E(this).offset().left)<0?0:t)>this.offsetWidth&&(t=this.offsetWidth);var t=Math.round(t/280*100)/100;c(h,m,y,g=t),e.preventDefault(),x&&p.trigger("mousedown",e)}),e.each(function(){E(this).on("click",function(){E(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e=this.style.backgroundColor,t=w(T(e)),n=e.slice(e.lastIndexOf(",")+1,e.length-1);h=t.h,m=t.s,y=t.b,3===(e.match(/[0-9]{1,3}/g)||[]).length&&(n=1),g=n,c(t.h,t.s,t.b,n)})}),D.touchEventsSupported()&&layui.each([{elem:d,eventType:"mousedown"},{elem:f,eventType:"mousedown"},{elem:u,eventType:"mousedown"}],function(e,i){D.touchSwipe(i.elem,{onTouchStart:function(){b=x=!1},onTouchMove:function(e){var t,n=i.eventType;e=e.touches[0],(t=document.createEvent("MouseEvent")).initMouseEvent(n,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)},onTouchEnd:function(){t.remove(),b=x=!0}})})},o.prototype.select=function(e,t,n,i){this.config;var a=C({h:e,s:100,b:100}),e=(C({h:e,s:t,b:n}),e/360*180),n=180-n/100*180,t=t/100*260,o=this.elemPicker.find("."+M)[0];this.elemPicker.find("."+I).css("top",e),o.style.background="#"+a,this.elemPicker.find("."+H).css({top:n/o.offsetHeight*100+"%",left:t/o.offsetWidth*100+"%"})},o.prototype.pickerEvents=function(){var l=this,s=l.config,c=l.elemColorBox.find("."+L),d=l.elemPicker.find("."+O+" input"),n={clear:function(e){c[0].style.background="",l.elemColorBox.find("."+A).removeClass(S).addClass(N),l.color="",s.done&&s.done(""),l.removePicker()},confirm:function(e,t){var n,i,a,o,r=E.trim(d.val());-1>16,g:(65280&a)>>8,b:255&a},i=w(o),c[0].style.background=n="#"+C(i),l.elemColorBox.find("."+A).removeClass(N).addClass(S)),"change"===t?(l.select(i.h,i.s,i.b,t),s.change&&s.change(n)):(l.color=r,s.done&&s.done(r),l.removePicker())}};l.elemPicker.on("click","*[colorpicker-events]",function(){var e=E(this),t=e.attr("colorpicker-events");n[t]&&n[t].call(this,e)}),d.on("keyup",function(e){var t=E(this);n.confirm.call(this,t,13===e.keyCode?null:"change")})},o.prototype.events=function(){var e=this;e.config,e.elemColorBox.on("click",function(){e.renderPicker(),E(s)[0]&&(e.val(),e.side())})},c.on(t,function(e){var t,n,i;r.thisId&&(t=a.getThis(r.thisId))&&(n=t.config,i=t.elemColorBox.find("."+L),E(e.target).hasClass(l)||E(e.target).parents("."+l)[0]||E(e.target).hasClass(s.replace(/\./g,""))||E(e.target).parents(s)[0]||t.elemPicker&&(t.color?(e=w(T(t.color)),t.select(e.h,e.s,e.b)):t.elemColorBox.find("."+A).removeClass(S).addClass(N),i[0].style.background=t.color||"","function"==typeof n.cancel&&n.cancel(t.color),t.removePicker()))}),F.on("resize",function(){if(r.thisId){var e=a.getThis(r.thisId);if(e)return!(!e.elemPicker||!E(s)[0])&&void e.position()}}),a.that={},a.getThis=function(e){var t=a.that[e];return t||n.error(e?i+" instance with ID '"+e+"' not found":"ID argument required"),t},r.render=function(e){return e=new o(e),a.call(e)},e(i,r)}),layui.define("jquery",function(e){"use strict";function t(){this.config={}}var d=layui.$,u=(layui.hint(),layui.device()),s="element",c="layui-this",f="layui-show",l=".layui-tab-title",p=(t.prototype.set=function(e){return d.extend(!0,this.config,e),this},t.prototype.on=function(e,t){return layui.onevent.call(this,s,e,t)},t.prototype.tabAdd=function(e,t){var n,i=(o=d(".layui-tab[lay-filter="+e+"]")).children(l),a=i.children(".layui-tab-bar"),o=o.children(".layui-tab-content"),r=""+(t.title||"unnaming")+"";return a[0]?a.before(r):i.append(r),o.append('
      "+(t.content||"")+"
      "),t.change&&this.tabChange(e,t.id),i.data("LAY_TAB_CHANGE",t.change),b.tabAuto(t.change?"change":null),this},t.prototype.tabDelete=function(e,t){return e=d(".layui-tab[lay-filter="+e+"]").children(l).find('>li[lay-id="'+t+'"]'),b.tabDelete(null,e),this},t.prototype.tabChange=function(e,t){return e=d(".layui-tab[lay-filter="+e+"]").children(l).find('>li[lay-id="'+t+'"]'),b.tabClick.call(e[0],{liElem:e}),this},t.prototype.tab=function(n){n=n||{},i.on("click",n.headerElem,function(e){var t=d(n.headerElem).index(d(this));b.tabClick.call(this,{index:t,options:n})})},t.prototype.progress=function(e,t){var n=(e=d("."+(n="layui-progress")+"[lay-filter="+e+"]").find("."+n+"-bar")).find("."+n+"-text");return e.css("width",function(){return/^.+\/.+$/.test(t)?100*new Function("return "+t)()+"%":t}).attr("lay-percent",t),n.text(t),this},".layui-nav"),h="layui-nav-item",y="layui-nav-bar",m="layui-nav-tree",g="layui-nav-child",v="layui-nav-more",x="layui-anim layui-anim-upbit",b={tabClick:function(e){var t=(e=e||{}).options||{},n=e.liElem||d(this),i=t.headerElem?n.parent():n.parents(".layui-tab").eq(0),t=t.bodyElem?d(t.bodyElem):i.children(".layui-tab-content").children(".layui-tab-item"),a="javascript:;"!==(a=n.find("a")).attr("href")&&"_blank"===a.attr("target"),o="string"==typeof n.attr("lay-unselect"),r=i.attr("lay-filter"),l=n.attr("lay-id"),e="index"in e?e.index:n.parent().children("li").index(n);a||o||(n.addClass(c).siblings().removeClass(c),(l?a=(a=t.filter('[lay-id="'+l+'"]')).length?a:t.eq(e):t.eq(e)).addClass(f).siblings().removeClass(f)),layui.event.call(this,s,"tab("+r+")",{elem:i,index:e,id:l})},tabDelete:function(e,t){var n=(t=t||d(this).parent()).parent().children("li").index(t),i=t.closest(".layui-tab"),a=i.children(".layui-tab-content").children(".layui-tab-item"),o=i.attr("lay-filter"),r=t.attr("lay-id");!1!==layui.event.call(t[0],s,"tabBeforeDelete("+o+")",{elem:i,index:n,id:r})&&(t.hasClass(c)&&(t.next()[0]&&t.next().is("li")?b.tabClick.call(t.next()[0],{index:n+1}):t.prev()[0]&&t.prev().is("li")&&b.tabClick.call(t.prev()[0],null,n-1)),t.remove(),(r?t=(t=a.filter('[lay-id="'+r+'"]')).length?t:a.eq(n):a.eq(n)).remove(),setTimeout(function(){b.tabAuto()},50),layui.event.call(this,s,"tabDelete("+o+")",{elem:i,index:n,id:r}))},tabAuto:function(a){var o="layui-tab-more",r="layui-tab-bar",l="layui-tab-close",s=this;d(".layui-tab").each(function(){var e=d(this),n=e.children(".layui-tab-title");e.children(".layui-tab-content").children(".layui-tab-item");var t=d(''),i=(s===window&&u.ie,e.attr("lay-allowclose"));i&&"false"!==i&&n.find("li").each(function(){var e,t=d(this);t.find("."+l)[0]||"false"===t.attr("lay-allowclose")||((e=d('')).on("click",b.tabDelete),t.append(e))}),"string"!=typeof e.attr("lay-unauto")&&(n.prop("scrollWidth")>n.outerWidth()+1||n.find("li").length&&n.height()>(i=n.find("li").eq(0).height())+i/2?("change"===a&&n.data("LAY_TAB_CHANGE")&&n.addClass(o),n.find("."+r)[0]||(n.append(t),e.attr("overflow",""),t.on("click",function(e){var t=n.hasClass(o);n[t?"removeClass":"addClass"](o)}))):(n.find("."+r).remove(),e.removeAttr("overflow")))})},hideTabMore:function(e){var t=d(".layui-tab-title");!0!==e&&"tabmore"===d(e.target).attr("lay-stope")||(t.removeClass("layui-tab-more"),t.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var e=d(this),t=e.closest(p),n=t.attr("lay-filter"),i=e.parent(),a=e.siblings("."+g),o="string"==typeof i.attr("lay-unselect");if("javascript:;"!==e.attr("href")&&"_blank"===e.attr("target")||o||a[0]||(t.find("."+c).removeClass(c),i.addClass(c)),t.hasClass(m)){var o=h+"ed",r=!i.hasClass(o),l=function(){d(this).css({display:""}),t.children("."+y).css({opacity:0})};if(a.is(":animated"))return;a.removeClass(x),a[0]&&(r?(a.slideDown(200,l),i.addClass(o)):(i.removeClass(o),a.show().slideUp(200,l)),"string"!=typeof t.attr("lay-accordion")&&"all"!==t.attr("lay-shrink")||((r=i.siblings("."+o)).removeClass(o),r.children("."+g).show().stop().slideUp(200,l)))}layui.event.call(this,s,"nav("+n+")",e)},collapse:function(){var e=d(this),t=e.find(".layui-colla-icon"),n=e.siblings(".layui-colla-content"),i=e.parents(".layui-collapse").eq(0),a=i.attr("lay-filter"),o="none"===n.css("display");"string"==typeof i.attr("lay-accordion")&&((i=i.children(".layui-colla-item").children("."+f)).siblings(".layui-colla-title").children(".layui-colla-icon").html(""),i.removeClass(f)),n[o?"addClass":"removeClass"](f),t.html(o?"":""),layui.event.call(this,s,"collapse("+a+")",{title:e,content:n,show:o})}},n=(t.prototype.render=t.prototype.init=function(e,t){var n=t?'[lay-filter="'+t+'"]':"";return(t={tab:function(){b.tabAuto.call({})},nav:function(){var r={},l={},s={},c="layui-nav-title";d(p+n).each(function(e){var t=d(this),n=d(''),i=t.find("."+h);t.find("."+y)[0]||(t.append(n),(t.hasClass(m)?i.find("dd,>."+c):i).on("mouseenter",function(){!function(e,t,n){var i,a=d(this),o=a.find("."+g);t.hasClass(m)?o[0]||(i=a.children("."+c),e.css({top:a.offset().top-t.offset().top,height:(i[0]?i:a).outerHeight(),opacity:1})):(o.addClass(x),o.hasClass("layui-nav-child-c")&&o.css({left:-(o.outerWidth()-a.width())/2}),o[0]?e.css({left:e.position().left+e.width()/2,width:0,opacity:0}):e.css({left:a.position().left+parseFloat(a.css("marginLeft")),top:a.position().top+a.height()-e.height()}),r[n]=setTimeout(function(){e.css({width:o[0]?0:a.width(),opacity:o[0]?0:1})},u.ie&&u.ie<10?0:200),clearTimeout(s[n]),"block"===o.css("display")&&clearTimeout(l[n]),l[n]=setTimeout(function(){o.addClass(f),a.find("."+v).addClass(v+"d")},300))}.call(this,n,t,e)}).on("mouseleave",function(){t.hasClass(m)?n.css({height:0,opacity:0}):(clearTimeout(l[e]),l[e]=setTimeout(function(){t.find("."+g).removeClass(f),t.find("."+v).removeClass(v+"d")},300))}),t.on("mouseleave",function(){clearTimeout(r[e]),s[e]=setTimeout(function(){t.hasClass(m)||n.css({width:0,left:n.position().left+n.width()/2,opacity:0})},200)})),i.find("a").each(function(){var e=d(this);e.parent(),e.siblings("."+g)[0]&&!e.children("."+v)[0]&&e.append(''),e.off("click",b.clickThis).on("click",b.clickThis)})})},breadcrumb:function(){d(".layui-breadcrumb"+n).each(function(){var e=d(this),t="lay-separator",n=e.attr(t)||"/",i=e.find("a");i.next("span["+t+"]")[0]||(i.each(function(e){e!==i.length-1&&d(this).after(""+n+"")}),e.css("visibility","visible"))})},progress:function(){var i="layui-progress";d("."+i+n).each(function(){var e=d(this),t=e.find(".layui-progress-bar"),n=t.attr("lay-percent");t.css("width",function(){return/^.+\/.+$/.test(n)?100*new Function("return "+n)()+"%":n}),e.attr("lay-showpercent")&&setTimeout(function(){t.html(''+n+"")},350)})},collapse:function(){d(".layui-collapse"+n).each(function(){d(this).find(".layui-colla-item").each(function(){var e=(t=d(this)).find(".layui-colla-title"),t="none"===t.find(".layui-colla-content").css("display");e.find(".layui-colla-icon").remove(),e.append(''+(t?"":"")+""),e.off("click",b.collapse).on("click",b.collapse)})})}})[e]?t[e]():layui.each(t,function(e,t){t()})},new t),i=d(document);d(function(){n.render()}),i.on("click",".layui-tab-title li",b.tabClick),d(window).on("resize",b.tabAuto),e(s,n)}),layui.define(["lay","layer"],function(e){"use strict";function i(){var t=this,e=t.config.id;return{upload:function(e){t.upload.call(t,e)},reload:function(e){t.reload.call(t,e)},config:(i.that[e]=t).config}}function w(e){this.index=++T.index,this.config=k.extend({},this.config,T.config,e),this.render()}var k=layui.$,a=layui.lay,t=layui.layer,C=layui.device(),n="upload",d="layui_upload_index",T={config:{},index:layui[n]?layui[n].index+1e4:0,set:function(e){return this.config=k.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,n,e,t)}},o="layui-upload-file",r="layui-upload-form",E="layui-upload-iframe",D="layui-upload-choose",S="UPLOADING";w.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",force:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1,text:{"cross-domain":"Cross-domain requests are not supported","data-format-error":"Please return JSON data format","check-error":"",error:"","limit-number":null,"limit-size":null}},w.prototype.reload=function(e){this.config=k.extend({},this.config,e),this.render(!0)},w.prototype.render=function(e){var t=this.config,n=k(t.elem);return 1"].join("")),n=e.elem.next();(n.hasClass(o)||n.hasClass(r))&&n.remove(),C.ie&&C.ie<10&&e.elem.wrap('
      '),this.isFile()?(this.elemFile=e.elem,e.field=e.elem[0].name):e.elem.after(t),C.ie&&C.ie<10&&this.initIE()},w.prototype.initIE=function(){var n,e=this.config,t=k(''),i=k(['
      ',"
      "].join(""));k("#"+E)[0]||k("body").append(t),e.elem.next().hasClass(r)||(this.elemFile.wrap(i),e.elem.next("."+r).append((n=[],layui.each(e.data,function(e,t){t="function"==typeof t?t():t,n.push('')}),n.join(""))))},w.prototype.msg=function(e){return t.msg(e,{icon:2,shift:6})},w.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},w.prototype.preview=function(i){window.FileReader&&layui.each(this.chooseFiles,function(e,t){var n=new FileReader;n.readAsDataURL(t),n.onload=function(){i&&i(e,t,this.result)}})},w.prototype.upload=function(e,t){var n,i,a,o,r,s=this,c=s.config,d=c.text||{},l=s.elemFile[0],u=function(){return e||s.files||s.chooseFiles||l.files},f=function(){function a(){c.multiple&&o+r===s.fileLength&&"function"==typeof c.allDone&&c.allDone({total:s.fileLength,successful:o,failed:r})}function n(n){function t(e){n.unified?layui.each(l,function(e,t){delete t[S]}):delete e[S]}var i=new FormData;if(layui.each(c.data,function(e,t){t="function"==typeof t?n.unified?t():t(n.index,n.file):t,i.append(e,t)}),n.unified)layui.each(l,function(e,t){t[S]||(t[S]=!0,i.append(c.field,t))});else{if(n.file[S])return;i.append(c.field,n.file),n.file[S]=!0}var e={url:c.url,type:"post",data:i,dataType:c.dataType||"json",contentType:!1,processData:!1,headers:c.headers||{},success:function(e){c.unified?o+=s.fileLength:o++,y(n.index,e),a(n.index),t(n.file)},error:function(e){c.unified?r+=s.fileLength:r++,s.msg(d.error||["Upload failed, please try again.","status: "+(e.status||"")+" - "+(e.statusText||"error")].join("
      ")),m(n.index,e.responseText),a(n.index),t(n.file)}};"function"==typeof c.progress&&(e.xhr=function(){var e=k.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){var t;e.lengthComputable&&(t=Math.floor(e.loaded/e.total*100),c.progress(t,(c.item||c.elem)[0],e,n.index))}),e}),k.ajax(e)}var o=0,r=0,l=u();c.unified?n({unified:!0,index:0}):layui.each(l,function(e,t){n({index:e,file:t})})},p=function(){var n=k("#"+E);s.elemFile.parent().submit(),clearInterval(w.timer),w.timer=setInterval(function(){var e,t=n.contents().find("body");try{e=t.text()}catch(e){s.msg(d["cross-domain"]),clearInterval(w.timer),m()}e&&(clearInterval(w.timer),t.html(""),y(0,e))},30)},h=function(e){if("json"===c.force&&"object"!=typeof e)try{return{status:"CONVERTED",data:JSON.parse(e)}}catch(e){return s.msg(d["data-format-error"]),{status:"FORMAT_ERROR",data:{}}}return{status:"DO_NOTHING",data:{}}},y=function(e,t){s.elemFile.next("."+D).remove(),l.value="";var n=h(t);switch(n.status){case"CONVERTED":t=n.data;break;case"FORMAT_ERROR":return}"function"==typeof c.done&&c.done(t,e||0,function(e){s.upload(e)})},m=function(e,t){c.auto&&(l.value="");var n=h(t);switch(n.status){case"CONVERTED":t=n.data;break;case"FORMAT_ERROR":return}"function"==typeof c.error&&c.error(e||0,function(e){s.upload(e)},t)},g=c.exts,v=(i=[],layui.each(e||s.chooseFiles,function(e,t){i.push(t.name)}),i),x={preview:function(e){s.preview(e)},upload:function(e,t){var n={};n[e]=t,s.upload(n)},pushFile:function(){return s.files=s.files||{},layui.each(s.chooseFiles,function(e,t){s.files[e]=t}),s.files},resetFile:function(e,t,n){t=new File([t],n),s.files=s.files||{},s.files[e]=t},getChooseFiles:function(){return s.chooseFiles}},b={file:"文件",images:"图片",video:"视频",audio:"音频"}[c.accept]||"文件";if(0!==(v=0===v.length?l.value.match(/[^\/\\]+\..+/g)||[]:v).length){switch(c.accept){case"file":layui.each(v,function(e,t){if(g&&!RegExp(".\\.("+g+")$","i").test(escape(t)))return n=!0});break;case"video":layui.each(v,function(e,t){if(!RegExp(".\\.("+(g||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(t)))return n=!0});break;case"audio":layui.each(v,function(e,t){if(!RegExp(".\\.("+(g||"mp3|wav|mid")+")$","i").test(escape(t)))return n=!0});break;default:layui.each(v,function(e,t){if(!RegExp(".\\.("+(g||"jpg|png|gif|bmp|jpeg|svg|webp")+")$","i").test(escape(t)))return n=!0})}return n?(s.msg(d["check-error"]||"选择的"+b+"中包含不支持的格式"),l.value=""):"choose"!==t&&!c.auto||(c.choose&&c.choose(x),"choose"!==t)?(s.fileLength=(a=0,b=u(),layui.each(b,function(){a++}),a),c.number&&s.fileLength>c.number?s.msg("function"==typeof d["limit-number"]?d["limit-number"](c,s.fileLength):"同时最多只能上传: "+c.number+" 个文件
      您当前已经选择了: "+s.fileLength+" 个文件"):01024*c.size&&(t=1<=(t=c.size/1024)?t.toFixed(2)+"MB":c.size+"KB",l.value="",o=t)}),o)?s.msg("function"==typeof d["limit-size"]?d["limit-size"](c,o):"文件大小不能超过 "+o):(r=function(){if(C.ie)return(9'+e+"")}function o(e){var n;return(e=e||[]).length?r.files?(n=[],layui.each(e,function(e,t){s(t)&&n.push(c(t))}),n):c(e):[]}var r=this,l=r.config,s=function(n){var i=!0;return layui.each(r.files,function(e,t){if(!(i=!(t.name===n.name)))return!0}),i},c=function(e){function n(e){e.ext=e.name.substr(e.name.lastIndexOf(".")+1).toLowerCase(),e.sizes=T.util.parseSize(e.size)}return e instanceof FileList?layui.each(e,function(e,t){n(t)}):n(e),e};l.elem.off("upload.start").on("upload.start",function(){var e=k(this);r.config.item=e,r.elemFile[0].click()}),C.ie&&C.ie<10||l.elem.off("upload.over").on("upload.over",function(){k(this).attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){k(this).removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(e,t){var n=k(this),t=o(t.originalEvent.dataTransfer.files);n.removeAttr("lay-over"),i(t),l.auto?r.upload():a(t)}),r.elemFile.on("change",function(){var e=o(this.files);0!==e.length&&(i(e),l.auto?r.upload():a(e))}),l.bindAction.off("upload.action").on("upload.action",function(){r.upload()}),l.elem.data(d)||(l.elem.on("click",function(){r.isFile()||k(this).trigger("upload.start")}),l.drag&&l.elem.on("dragover",function(e){e.preventDefault(),k(this).trigger("upload.over")}).on("dragleave",function(e){k(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),k(this).trigger("upload.drop",e)}),l.bindAction.on("click",function(){k(this).trigger("upload.action")}),l.elem.data(d,l.id))},T.util={parseSize:function(e,t){var n,i;return t=t||2,null!=e&&e?(n="string"==typeof e?parseFloat(e):e,i=Math.floor(Math.log(n)/Math.log(1024)),(e=(e=n/Math.pow(1024,i))%1==0?e:parseFloat(e.toFixed(t)))+["Bytes","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"][i]):"0"},promiseLikeResolve:function(e){var t=k.Deferred();return e&&"function"==typeof e.then?e.then(t.resolve,t.reject):t.resolve(e),t.promise()}},i.that={},i.getThis=function(e){var t=i.that[e];return t||hint.error(e?n+" instance with ID '"+e+"' not found":"ID argument required"),t},T.render=function(e){return e=new w(e),i.call(e)},e(n,T)}),layui.define(["lay","layer","util"],function(e){"use strict";var E=layui.$,p=layui.layer,D=layui.util,o=layui.hint(),S=(layui.device(),"form"),u=".layui-form",N="layui-this",L="layui-hide",A="layui-disabled",t=((n=function(){this.config={verify:{required:function(e){if(!/[\S]+/.test(e))return"必填项不能为空"},phone:function(e){if(e&&!/^1\d{10}$/.test(e))return"手机号格式不正确"},email:function(e){if(e&&!/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e))return"邮箱格式不正确"},url:function(e){if(e&&!/^(#|(http(s?)):\/\/|\/\/)[^\s]+\.[^\s]+$/.test(e))return"链接格式不正确"},number:function(e){if(e&&isNaN(e))return"只能填写数字"},date:function(e){if(e&&!/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(e))return"日期格式不正确"},identity:function(e){if(e&&!/(^\d{15}$)|(^\d{17}(x|X|\d)$)/.test(e))return"身份证号格式不正确"}},autocomplete:null}}).prototype.set=function(e){return E.extend(!0,this.config,e),this},n.prototype.verify=function(e){return E.extend(!0,this.config.verify,e),this},n.prototype.getFormElem=function(e){return E(u+(e?'[lay-filter="'+e+'"]':""))},n.prototype.on=function(e,t){return layui.onevent.call(this,S,e,t)},n.prototype.val=function(e,n){return this.getFormElem(e).each(function(e,t){var i=E(this);layui.each(n,function(e,t){var n;(e=i.find('[name="'+e+'"]'))[0]&&("checkbox"===(n=e[0].type)?e[0].checked=t:"radio"===n?e.each(function(){this.checked=this.value==t+""}):e.val(t))})}),r.render(null,e),this.getValue(e)},n.prototype.getValue=function(e,t){t=t||this.getFormElem(e);var i={},a={},e=t.find("input,select,textarea");return layui.each(e,function(e,t){var n;E(this),t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name&&(/^.*\[\]$/.test(t.name)&&(n=t.name.match(/^(.*)\[\]$/g)[0],i[n]=0|i[n],n=t.name.replace(/^(.*)\[\]$/,"$1["+i[n]+++"]")),/^(checkbox|radio)$/.test(t.type)&&!t.checked||(a[n||t.name]=t.value))}),a},n.prototype.render=function(e,t){var d=this,n=d.config,i=E(u+(t?'[lay-filter="'+t+'"]':"")),a={input:function(e){function t(e,t){var n=e.val(),i=Number(n),a=Number(e.attr("step"))||1,o=Number(e.attr("min")),r=Number(e.attr("max")),l=Number(e.attr("lay-precision")),s="click"!==t&&""===n,c="init"===t;isNaN(i)||("click"===t&&(i=E(this).index()?i-a:i+a),t=function(e){return((e.toString().match(/\.(\d+$)/)||[])[1]||"").length},l=0<=l?l:Math.max(t(a),t(n)),s||(c||r<=(i=i<=o?o:i)&&(i=r),0===l?i=parseInt(i):0'),e=layui.isArray(n.value)?n.value:[n.value],e=E((i=[],layui.each(e,function(e,t){i.push('')}),i.join(""))),a=(t.append(e),n.split&&t.addClass("layui-input-split"),n.className&&t.addClass(n.className),r.next("."+d)),o=(a[0]&&a.remove(),r.parent().hasClass(s)||r.wrap('
      '),r.next("."+c));o[0]?((a=o.find("."+d))[0]&&a.remove(),o.prepend(t),r.css("padding-right",function(){return(r.closest(".layui-input-group")[0]?0:o.outerWidth())+t.outerWidth()})):(t.addClass(c),r.after(t)),"auto"===n.show&&u(t,r.val()),"function"==typeof n.init&&n.init.call(this,r,n),r.on("input propertychange",function(){var e=this.value;"auto"===n.show&&u(t,e)}),r.on("blur",function(){"function"==typeof n.blur&&n.blur.call(this,r,n)}),e.on("click",function(){var e=r.attr("lay-filter");E(this).hasClass(A)||("function"==typeof n.click&&n.click.call(this,r,n),layui.event.call(this,S,"input-affix("+e+")",{elem:r[0],affix:l,options:n}))})}var r=E(this),l=r.attr("lay-affix"),s="layui-input-wrap",c="layui-input-suffix",d="layui-input-affix",e=r.is("[disabled]")||r.is("[readonly]"),u=function(e,t){(e=E(e))[0]&&e[E.trim(t)?"removeClass":"addClass"](L)},f={eye:{value:"eye-invisible",click:function(e,t){var n="LAY_FORM_INPUT_AFFIX_SHOW",i=e.data(n);e.attr("type",i?"password":"text").data(n,!i),a({value:i?"eye-invisible":"eye"})}},clear:{value:"clear",click:function(e){e.val("").focus(),u(E(this).parent(),null)},show:"auto",disabled:e},number:{value:["up","down"],split:!0,className:"layui-input-number",disabled:r.is("[disabled]"),init:function(e){t.call(this,e,"init")},click:function(e){t.call(this,e,"click")},blur:function(e){t.call(this,e,"blur")}}};a()})},select:function(e){function p(a,e,t,n,c,i){var o,d,r,l,s,u,f,p,h,y=E(this),m=e,g=m.find("input"),v=a.find("dl"),x=(v.children("dd"),v.children("dt")),b=this.selectedIndex,w="";t||(d=y.attr("lay-search"),r=y.attr("lay-append-to")||"body",l=y.attr("lay-append-position"),s=!(!lay.ie||"10"!==lay.ie&&"11"!==lay.ie||!g.attr("placeholder")),u=function(){i&&(a.appendTo(r).css({width:m.width()+"px"}),(e=function(){lay.position(m[0],a[0],{position:l,allowBottomOut:!0,offset:[0,5]})})(),E(window).on("resize.lay_select_resize",e));var e=a.offset().top+a.outerHeight()+5-I.scrollTop(),t=v.outerHeight(),n=v.children("dd");b=y[0].selectedIndex,m.parent().addClass(k+"ed"),n.removeClass(L),x.removeClass(L),n.removeClass(N),0<=b&&n.eq(b).addClass(N),e+t>I.height()&&t<=e&&a.addClass(k+"up"),p(),s&&v.off("mousedown.lay_select_ieph").on("mousedown.lay_select_ieph",function(){g[0].__ieph=!0,setTimeout(function(){g[0].__ieph=!1},60)}),o=lay.onClickOutside((i?a:v)[0],function(){f(),w&&g.val(w)},{ignore:m})},f=function(e){m.parent().removeClass(k+"ed "+k+"up"),g.blur(),c&&v.children("."+T).remove(),o&&o(),i&&(a.detach(),E(window).off("resize.lay_select_resize")),e||h(g.val(),function(e){var t=y[0].selectedIndex;e&&(w=E(y[0].options[t]).html(),0===t&&w===g.attr("placeholder")&&(w=""),g.val(w||""))})},p=function(){var e,t,n=v.children("dd."+N);n[0]&&(e=n.position().top,t=v.height(),n=n.height(),t").addClass(T).attr("lay-value",a).html(D.escape(a)),i=(n=v.children().eq(0)).hasClass("layui-select-tips"),n[i?"after":"before"](t)):e?v.find("."+C)[0]||v.append('

      无匹配项

      '):v.find("."+C).remove()},"keyup"),""===a&&(y.val(""),v.find("."+N).removeClass(N),(y[0].options[0]||{}).value||v.children("dd:eq(0)").addClass(N),v.find("."+C).remove(),c)&&v.children("."+T).remove(),void p()))},50)).on("blur",function(e){var t=y[0].selectedIndex;w=E(y[0].options[t]).text(),0===t&&w===g.attr("placeholder")&&(w=""),setTimeout(function(){h(g.val(),function(e){w||g.val("")},"blur")},200)}),v.on("click","dd",function(){var e,t=E(this),n=t.attr("lay-value"),i=y.attr("lay-filter");return t.hasClass(A)||(t.hasClass("layui-select-tips")?g.val(""):(g.val(t.text()),t.addClass(N)),c&&t.hasClass(T)&&(v.append(t.removeClass(T)),e=E("
      "].join("")),n.after(o),function(n,i){var a=E(this),o="switch"===(e=a.attr("lay-skin")||"primary"),e="primary"===e;n.on("click",function(){var e=a.attr("lay-filter");a[0].disabled||(a[0].indeterminate&&(a[0].indeterminate=!1),a[0].checked=!a[0].checked,layui.event.call(a[0],S,i[2]+"("+e+")",{elem:a[0],value:a[0].value,othis:n}))}),d.syncAppearanceOnPropChanged(this,"checked",function(e){var t;o&&(t=(n.next("*[lay-checkbox]")[0]?n.next().html():a.attr("title")||"").split("|"),n.children("div").html(!e&&t[1]||t[0])),n.toggleClass(i[1],e)}),e&&d.syncAppearanceOnPropChanged(this,"indeterminate",function(e){e?n.children(".layui-icon-ok").removeClass("layui-icon-ok").addClass(c.SUBTRA):n.children("."+c.SUBTRA).removeClass(c.SUBTRA).addClass("layui-icon-ok")})}.call(this,o,r)})},radio:function(e){var s="layui-form-radio",c=["layui-icon-radio","layui-icon-circle"];(e=e||i.find("input[type=radio]")).each(function(e,t){var n=E(this),i=n.next("."+s),a=this.disabled,o=n.attr("lay-skin");if("string"==typeof n.attr("lay-ignore"))return n.show();i[0]&&i.remove();var i=D.escape(t.title||""),r=[],l=(n.next("[lay-radio]")[0]&&(i=(l=n.next()).html()||"",1",'',"
      "+i+"
      ","
      "].join("")));n.after(l),function(i){var a=E(this),t="layui-anim-scaleSpring";i.on("click",function(){var e=a[0].name,t=a.parents(u),n=a.attr("lay-filter"),e=t.find("input[name="+e.replace(/(\.|#|\[|\])/g,"\\$1")+"]");a[0].disabled||(layui.each(e,function(){this.checked=!1}),a[0].checked=!0,layui.event.call(a[0],S,"radio("+n+")",{elem:a[0],value:a[0].value,othis:i}))}),d.syncAppearanceOnPropChanged(this,"checked",function(e){e?(i.addClass(s+"ed"),i.children(".layui-icon").addClass(t+" "+c[0])):(i.removeClass(s+"ed"),i.children(".layui-icon").removeClass(t+" "+c[0]).addClass(c[1]))})}.call(this,l)})}},t=function(){layui.each(a,function(e,t){t()})};return"object"===layui.type(e)?E(e).is(u)?(i=E(e),t()):e.each(function(e,t){var n=E(t);n.closest(u).length&&("SELECT"===t.tagName?a.select(n):"INPUT"===t.tagName&&("checkbox"===(t=t.type)||"radio"===t?a[t](n):a.input(n)))}):e?a[e]?a[e]():o.error('不支持的 "'+e+'" 表单渲染'):t(),d},n.prototype.syncAppearanceOnPropChanged=function(e,n,i){var a=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,n);Object.defineProperty(e,n,lay.extend({},a,{get:function(){return a.get.call(this)},set:function(e){var t=this[n];a.set.call(this,e),t!==e&&i(e,t)}}))},n.prototype.validate=function(e){var d,u=this.config.verify,f="layui-form-danger";return!(e=E(e))[0]||(void 0!==e.attr("lay-verify")||!1!==this.validate(e.find("*[lay-verify]")))&&(layui.each(e,function(e,r){var l=E(this),t=(l.attr("lay-verify")||"").split("|"),s=l.attr("lay-vertype"),c=E.trim(l.val());if(l.removeClass(f),layui.each(t,function(e,t){var n="",i=u[t];if(i){var a="function"==typeof i?n=i(c,r):!i[0].test(c),o="select"===r.tagName.toLowerCase()||/^(checkbox|radio)$/.test(r.type),n=n||i[1];if("required"===t&&(n=l.attr("lay-reqtext")||n),a)return"tips"===s?p.tips(n,"string"!=typeof l.attr("lay-ignore")&&o?l.next():l,{tips:1}):"alert"===s?p.alert(n,{title:"提示",shadeClose:!0}):/\b(string|number)\b/.test(typeof n)&&p.msg(n,{icon:5,shift:6}),setTimeout(function(){(o?l.next().find("input"):r).focus()},7),l.addClass(f),d=!0}}),d)return d}),!d)},n.prototype.submit=function(e,t){var n,i=E(this),e="string"==typeof e?e:i.attr("lay-filter"),a=this.getFormElem?this.getFormElem(e):i.parents(u).eq(0),o=a.find("*[lay-verify]");return!!r.validate(o)&&(n=r.getValue(null,a),o={elem:this.getFormElem?window.event&&window.event.target:this,form:(this.getFormElem?a:i.parents("form"))[0],field:n},"function"==typeof t&&t(o),layui.event.call(this,S,"submit("+e+")",o))}),r=new n,n=E(document),I=E(window);E(function(){r.render()}),n.on("reset",u,function(){var e=E(this).attr("lay-filter");setTimeout(function(){r.render(null,e)},50)}),n.on("submit",u,t).on("click","*[lay-submit]",t),e(S,r)}),layui.define(["lay","laytpl","laypage","form","util"],function(d){"use strict";function h(){var n=this,e=n.config,i=e.id||e.index;return{config:e,reload:function(e,t){n.reload.call(n,e,t)},reloadData:function(e,t){k.reloadData(i,e,t)},setColsWidth:function(){n.setColsWidth.call(n)},resize:function(){n.resize.call(n)}}}function y(e){var t=h.that[e];return t||f.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null}function a(e){var t=h.config[e];return t||f.error(e?"The table instance with ID '"+e+"' not found":"ID argument required"),t||null}function m(e){var t=this.config||{},n=(e=e||{}).item3,i=e.content;return"numbers"===n.type&&(i=e.tplData[k.config.numbersName]),("escape"in n?n:t).escape&&(i=b.escape(i)),(t=e.text&&n.exportTemplet||n.templet||n.toolbar)&&(i="function"==typeof t?t.call(n,e.tplData,e.obj):v(function(t){try{return s(t).html()}catch(e){return t}}(t)||String(i)).render(g.extend({LAY_COL:n},e.tplData))),e.text?g("
      "+i+"
      ").text():i}function e(e){return['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',(e=e||{}).fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':"","{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
      ','
      ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{-item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
      ","
      "].join("")}function t(e){this.index=++k.index,this.config=g.extend({},this.config,k.config,e),this.render()}var g=layui.$,s=layui.lay,v=layui.laytpl,R=layui.laypage,x=layui.layer,i=layui.form,b=layui.util,f=layui.hint(),w=layui.device(),k={config:{checkName:"LAY_CHECKED",indexName:"LAY_INDEX",numbersName:"LAY_NUM",disabledName:"LAY_DISABLED"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){return this.config=g.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,C,e,t)}},C="table",T="lay-"+C+"-id",n=".layui-table",E="layui-hide",p="layui-hide-v",D="layui-none",S="layui-table-view",r=".layui-table-header",N=".layui-table-body",P=".layui-table-fixed-r",q=".layui-table-pageview",L=".layui-table-sort",A="layui-table-checked",I="layui-table-edit",M="layui-table-hover",u="laytable-cell-group",j="layui-table-col-special",_="layui-table-tool-panel",H="layui-table-expanded",z="layui-table-disabled-transition",O="LAY_TABLE_MOVE_DICT",o=['',"","
      "].join(""),B=[,"{{# if(d.data.toolbar){ }}",'
      ','
      ','
      ',"
      ","{{# } }}",'
      ',"{{# if(d.data.loading){ }}",'
      ','
      ','{{# if(typeof d.data.loading === "string"){ }}',"{{- d.data.loading}}","{{# } else{ }}",'',"{{# } }}","
      ","
      ","{{# } }}","{{# var left, right; }}",'
      ',e(),"
      ",'
      ',o,"
      ","{{# if(left){ }}",'
      ','
      ',e({fixed:!0}),"
      ",'
      ',o,"
      ","
      ","{{# }; }}","{{# if(right){ }}",'
      ','
      ',e({fixed:"right"}),'
      ',"
      ",'
      ',o,"
      ","
      ","{{# }; }}","
      ","{{# if(d.data.totalRow){ }}",'
      ','','',"
      ","
      ","{{# } }}",'
      ','
      ',"
      "].join(""),l=g(window),F=g(document),c=(t.prototype.config={limit:10,loading:!0,escape:!0,cellMinWidth:60,cellMaxWidth:Number.MAX_VALUE,editTrigger:"click",defaultToolbar:["filter","exports","print"],defaultContextmenu:!0,autoSort:!0,text:{none:"无数据"},cols:[]},t.prototype.render=function(e){var t=this,n=t.config,i=(n.elem=g(n.elem),n.where=n.where||{},n.id="id"in n?n.id:n.elem.attr("id")||t.index);if(h.that[i]=t,(h.config[i]=n).request=g.extend({pageName:"page",limitName:"limit"},n.request),n.response=g.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},n.response),null!==n.page&&"object"==typeof n.page&&(n.limit=n.page.limit||n.limit,n.limits=n.page.limits||n.limits,t.page=n.page.curr=n.page.curr||1,delete n.page.elem,delete n.page.jump),!n.elem[0])return t;if(n.elem.attr("lay-filter")||n.elem.attr("lay-filter",n.id),"reloadData"===e)return t.pullData(t.page,{type:"reloadData"});n.index=t.index,t.key=n.id||n.index,t.setInit(),n.height&&/^full-.+$/.test(n.height)?(t.fullHeightGap=n.height.split("-")[1],n.height=l.height()-(parseFloat(t.fullHeightGap)||0)):n.height&&/^#\w+\S*-.+$/.test(n.height)?(i=n.height.split("-"),t.parentHeightGap=i.pop(),t.parentDiv=i.join("-"),n.height=g(t.parentDiv).height()-(parseFloat(t.parentHeightGap)||0)):"function"==typeof n.height&&(t.customHeightFunc=n.height,n.height=t.customHeightFunc());var a,i=(e=n.elem).next("."+S),o=t.elem=g("
      ");o.addClass((a=[S,S+"-"+t.index,"layui-form","layui-border-box"],n.className&&a.push(n.className),a.join(" "))).attr(((a={"lay-filter":"LAY-TABLE-FORM-DF-"+t.index,style:(a=[],n.width&&a.push("width:"+n.width+"px;"),a.join(""))})[T]=n.id,a)).html(v(B,{open:"{{",close:"}}"}).render({data:n,index:t.index})),t.renderStyle(),i[0]&&(t.resizeObserver&&t.resizeObserver.unobserve(t.elem[0]),i.remove()),e.after(o),t.layTool=o.find(".layui-table-tool"),t.layBox=o.find(".layui-table-box"),t.layHeader=o.find(r),t.layMain=o.find(".layui-table-main"),t.layBody=o.find(N),t.layFixed=o.find(".layui-table-fixed"),t.layFixLeft=o.find(".layui-table-fixed-l"),t.layFixRight=o.find(P),t.layTotal=o.find(".layui-table-total"),t.layPage=o.find(".layui-table-page"),t.renderToolbar(),t.renderPagebar(),t.fullSize(),t.pullData(t.page),t.events()},t.prototype.initOpts=function(e){this.config,e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||{checkbox:50,radio:50,space:30,numbers:60}[e.type])},t.prototype.setInit=function(e){var i,n,l=this,s=l.config;if(s.clientWidth=s.width||(i=function(e){var t,n=(e=e||s.elem.parent()).width();try{t="none"===e.css("display")}catch(e){}return!e[0]||n&&!t?n:i(e.parent())})(),"width"===e)return s.clientWidth;s.height=s.maxHeight||s.height,s.css&&-1===s.css.indexOf(S)&&(n=s.css.split("}"),layui.each(n,function(e,t){t&&(n[e]="."+S+"-"+l.index+" "+t)}),s.css=n.join("}"));var c=function(n,e,i,a){var o,r;a?(a.key=[s.index,n,i].join("-"),a.colspan=a.colspan||0,a.rowspan=a.rowspan||0,l.initOpts(a),(o=n+(parseInt(a.rowspan)||1)) td:hover > .layui-table-cell{overflow: auto;}"].concat(w.ie?[".layui-table-edit{height: "+i+";}","td[data-edit]:hover:after{height: "+i+";}"]:[]),function(e,t){t&&r.push(n+" "+t)})),a.css&&r.push(a.css),s.style({target:this.elem[0],text:r.join(""),id:"DF-table-"+o})},t.prototype.renderToolbar=function(){var a,r=this,e=r.config,l=e.elem.attr("lay-filter"),t=['
      ','
      ','
      '].join(""),n=r.layTool.find(".layui-table-tool-temp"),o=("default"===e.toolbar?n.html(t):"string"==typeof e.toolbar&&(t=g(e.toolbar).html()||"")&&n.html(v(t).render(e)),{filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols",onClick:function(e){var n,o=e.config;(0,e.openPanel)({list:(n=[],r.eachCols(function(e,t){t.field&&"normal"==t.type&&n.push('
    • "+(t.fieldTitle||t.title||t.field)+"").text())+'" lay-filter="LAY_TABLE_TOOL_COLS">
    • ')}),n.join("")),done:function(){i.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var e=g(e.elem),t=this.checked,n=e.data("key"),i=r.col(n),a=i.hide,e=e.data("parentkey");i.key&&(i.hide=!t,r.elem.find('*[data-key="'+n+'"]')[t?"removeClass":"addClass"](E),a!=i.hide&&r.setParentCol(!t,e),r.resize(),layui.event.call(this,C,"colToggled("+l+")",{col:i,config:o}))})}})}},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export",onClick:function(e){var t=e.data,n=e.config,e=e.openPanel;if(!t.length)return x.tips("当前表格无数据",this,{tips:3});w.ie?x.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):e({list:['
    • 导出 CSV 文件
    • '].join(""),done:function(e,t){t.on("click",function(){var e=g(this).data("type");k.exportFile.call(r,n.id,null,e)})}})}},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print",onClick:function(e){var t=e.data;if(e.config,!t.length)return x.tips("当前表格无数据",this,{tips:3});var e=window.open("about:blank","_blank"),t=[""].join(""),n=g(r.layHeader.html());n.append(r.layMain.find("table").html()),n.append(r.layTotal.find("table").html()),n.find("th.layui-table-patch").remove(),n.find("thead>tr>th."+j).filter(function(e,t){return!g(t).children("."+u).length}).remove(),n.find("tbody>tr>td."+j).remove(),e.document.write(t+n.prop("outerHTML")),e.document.close(),layui.device("edg").edg?(e.onafterprint=e.close,e.print()):(e.print(),e.close())}}});"object"==typeof e.defaultToolbar&&(a=[],e.defaultToolbar=g.map(e.defaultToolbar,function(e,t){var n="string"==typeof e,i=n?o[e]:e;return i&&(!(i=i.name&&o[i.name]?g.extend({},o[i.name],i):i).name&&n&&(i.name=e),a.push('
      ')),i}),r.layTool.find(".layui-table-tool-self").html(a.join("")))},t.prototype.renderPagebar=function(){var e,t=this.config,n=this.layPagebar=g('
      ');t.pagebar&&((e=g(t.pagebar).html()||"")&&n.append(v(e).render(t)),this.layPage.append(n))},t.prototype.setParentCol=function(e,t){var n=this.config,i=this.layHeader.find('th[data-key="'+t+'"]'),a=parseInt(i.attr("colspan"))||0;i[0]&&(t=t.split("-"),t=n.cols[t[1]][t[2]],e?a--:a++,i.attr("colspan",a),i[a?"removeClass":"addClass"](E),t.colspan2=a,t.hide=a<1,n=i.data("parentkey"))&&this.setParentCol(e,n)},t.prototype.setColsPatch=function(){var n=this,e=n.config;layui.each(e.cols,function(e,t){layui.each(t,function(e,t){t.hide&&n.setParentCol(t.hide,t.parentKey)})})},t.prototype.setGroupWidth=function(i){var e,a=this;a.config.cols.length<=1||((e=a.layHeader.find((i?"th[data-key="+i.data("parentkey")+"]>":"")+"."+u)).css("width",0),layui.each(e.get().reverse(),function(){var e=g(this),t=e.parent().data("key"),n=0;a.layHeader.eq(0).find("th[data-parentkey="+t+"]").width(function(e,t){g(this).hasClass(E)||0 tr:first-child > th:last-child")).data("field")&&e.prev()[0]?t(e.prev()):e})()).data("key"),o.cssRules(e,function(e){var t=e.style.width||n.outerWidth();e.style.width=parseFloat(t)+a+"px",0'+(e||"Error")+"");n[0]&&(t.layNone.remove(),n.remove()),t.layFixed.addClass(E),t.layMain.find("tbody").html(""),t.layMain.append(t.layNone=e),t.layTotal.addClass(p),t.layPage.find(q).addClass(p),k.cache[t.key]=[],t.syncCheckAll(),t.renderForm(),t.setColsWidth(),t.loading(!1)},t.prototype.page=1,t.prototype.pullData=function(n,t){function i(){"object"==typeof l.initSort&&r.sort({field:l.initSort.field,type:l.initSort.type,reloadType:t.type})}function a(e,t){r.setColsWidth(),r.loading(!1),"function"==typeof l.done&&l.done(e,n,e[c.countName],t)}var e,o,r=this,l=r.config,s=(l.HAS_SET_COLS_PATCH||r.setColsPatch(),l.HAS_SET_COLS_PATCH=!0,l.request),c=l.response;t=t||{},"function"==typeof l.before&&l.before(l),r.startTime=(new Date).getTime(),t.renderData?((e={})[c.dataName]=k.cache[r.key],e[c.countName]=l.url?"object"===layui.type(l.page)?l.page.count:e[c.dataName].length:l.data.length,"object"==typeof l.totalRow&&(e[c.totalRowName]=g.extend({},r.totalRow)),r.renderData({res:e,curr:n,count:e[c.countName],type:t.type,sort:!0}),a(e,"renderData")):l.url?(o={},l.page&&(o[s.pageName]=n,o[s.limitName]=l.limit),s=g.extend(o,l.where),l.contentType&&0==l.contentType.indexOf("application/json")&&(s=JSON.stringify(s)),r.loading(!0),g.ajax({type:l.method||"get",url:l.url,contentType:l.contentType,data:s,dataType:l.dataType||"json",jsonpCallback:l.jsonpCallback,headers:l.headers||{},complete:"function"==typeof l.complete?l.complete:void 0,success:function(e){(e="function"==typeof l.parseData&&l.parseData(e)||e)[c.statusName]!=c.statusCode?r.errorView(e[c.msgName]||'返回的数据不符合规范,正确的成功状态码应为:"'+c.statusName+'": '+c.statusCode):(r.totalRow=e[c.totalRowName],r.renderData({res:e,curr:n,count:e[c.countName],type:t.type}),i(),l.time=(new Date).getTime()-r.startTime+" ms"),a(e,t.type)},error:function(e,t){r.errorView("请求异常,错误提示:"+t),"function"==typeof l.error&&l.error(e,t)}})):"array"===layui.type(l.data)&&(e={},o=n*l.limit-l.limit,s=l.data.concat(),e[c.dataName]=l.page?s.splice(o,l.limit):s,e[c.countName]=l.data.length,"object"==typeof l.totalRow&&(e[c.totalRowName]=g.extend({},l.totalRow)),r.totalRow=e[c.totalRowName],r.renderData({res:e,curr:n,count:e[c.countName],type:t.type}),i(),a(e,t.type))},t.prototype.eachCols=function(e){return k.eachCols(null,e,this.config.cols),this},t.prototype.col=function(e){try{return e=e.split("-"),this.config.cols[e[1]][e[2]]||{}}catch(e){return f.error(e),{}}},t.prototype.getTrHtml=function(t,n,a,e){var d=this,u=d.config,o=e&&e.trs||[],f=e&&e.trs_fixed||[],p=e&&e.trs_fixed_r||[];return a=a||1,layui.each(t,function(e,r){var i=[],l=[],s=[],c=e+u.limit*(a-1)+1;if("object"!=typeof r){t[e]=r={LAY_KEY:r};try{k.cache[d.key][e]=r}catch(e){}}"array"===layui.type(r)&&0===r.length||(r[k.config.numbersName]=c,n||(r[k.config.indexName]=e),d.eachCols(function(e,a){var t,e=a.field||e,n=a.key,o=r[e];null==o&&(o=""),a.colGroup||(e=['','
      "+function(){var e,t=g.extend(!0,{LAY_COL:a},r),n=k.config.checkName,i=k.config.disabledName;switch(a.type){case"checkbox":return'';case"radio":return'';case"numbers":return c}return a.toolbar?v(g(a.toolbar).html()||"").render(t):m.call(d,{item3:a,content:o,tplData:t})}(),"
      "].join(""),i.push(e),a.fixed&&"right"!==a.fixed&&l.push(e),"right"===a.fixed&&s.push(e))}),e=['data-index="'+e+'"'],r[k.config.checkName]&&e.push('class="'+A+'"'),e=e.join(" "),o.push(""+i.join("")+""),f.push(""+l.join("")+""),p.push(""+s.join("")+""))}),{trs:o,trs_fixed:f,trs_fixed_r:p}},k.getTrHtml=function(e,t){return(e=y(e)).getTrHtml(t,null,e.page)},t.prototype.renderData=function(e){function t(){if(!l&&n.sortKey)return n.sort({field:n.sortKey.field,type:n.sortKey.sort,pull:!0,reloadType:e.type});n.getTrHtml(s,l,o,{trs:c,trs_fixed:d,trs_fixed_r:u}),"fixed"===i.scrollPos&&"reloadData"===e.type||n.layBody.scrollTop(0),"reset"===i.scrollPos&&n.layBody.scrollLeft(0),n.layMain.find("."+D).remove(),n.layMain.find("tbody").html(c.join("")),n.layFixLeft.find("tbody").html(d.join("")),n.layFixRight.find("tbody").html(u.join("")),n.syncCheckAll(),n.renderForm(),n.fullSize(),n.haveInit?n.scrollPatch():setTimeout(function(){n.scrollPatch()},50),n.haveInit=!0,x.close(n.tipsIndex)}var n=this,i=n.config,a=e.res,o=e.curr,r=n.count=e.count,l=e.sort,s=a[i.response.dataName]||[],a=a[i.response.totalRowName],c=[],d=[],u=[];return k.cache[n.key]=s,n.layTotal[0==s.length?"addClass":"removeClass"](p),n.layPage[i.page||i.pagebar?"removeClass":"addClass"](E),n.layPage.find(q)[!i.page||0==r||0===s.length&&1==o?"addClass":"removeClass"](p),0===s.length?n.errorView(i.text.none):(n.layFixLeft.removeClass(E),l?t():(t(),n.renderTotal(s,a),n.layTotal&&n.layTotal.removeClass(E),void(i.page&&(i.page=g.extend({elem:"layui-table-page"+i.index,count:r,limit:i.limit,limits:i.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(n.page=e.curr,i.limit=e.limit,n.pullData(e.curr))}},i.page),i.page.count=r,R.render(i.page)))))},k.renderData=function(e){(e=y(e))&&e.pullData(e.page,{renderData:!0,type:"reloadData"})},t.prototype.renderTotal=function(e,r){var l,s=this,c=s.config,d={};c.totalRow&&(layui.each(e,function(e,i){"array"===layui.type(i)&&0===i.length||s.eachCols(function(e,t){var e=t.field||e,n=i[e];t.totalRow&&(d[e]=(d[e]||0)+(parseFloat(n)||0))})}),s.dataTotal=[],l=[],s.eachCols(function(e,t){var n,e=t.field||e,i=r&&r[t.field],a="totalRowDecimals"in t?t.totalRowDecimals:2,a=d[e]?parseFloat(d[e]||0).toFixed(a):"",a=(n=t.totalRowText||"",(o={LAY_COL:t})[e]=a,o=t.totalRow&&m.call(s,{item3:t,content:a,tplData:o})||n,i||o),o=(t.field&&s.dataTotal.push({field:t.field,total:g("
      "+a+"
      ").text()}),['','
      "+("string"==typeof(n=t.totalRow||c.totalRow)?v(n).render(g.extend({TOTAL_NUMS:i||d[e],TOTAL_ROW:r||{},LAY_COL:t},t)):a),"
      "].join(""));l.push(o)}),e=s.layTotal.find(".layui-table-patch"),s.layTotal.find("tbody").html(""+l.join("")+(e.length?e.get(0).outerHTML:"")+""))},t.prototype.getColElem=function(e,t){return e.eq(0).find(".laytable-cell-"+t+":eq(0)")},t.prototype.renderForm=function(e){this.config;var t=this.elem.attr("lay-filter");i.render(e,t)},t.prototype.renderFormByElem=function(n){layui.each(["input","select"],function(e,t){i.render(n.find(t))})},t.prototype.syncCheckAll=function(){var n,i=this.config,e=this.layHeader.find('input[name="layTableCheckbox"]'),t=k.checkStatus(this.key);e[0]&&(n=t.isAll,this.eachCols(function(e,t){"checkbox"===t.type&&(t[i.checkName]=n)}),e.prop({checked:t.isAll,indeterminate:!t.isAll&&t.data.length}))},t.prototype.setRowActive=function(e,t,n){if(this.config,e=this.layBody.find('tr[data-index="'+e+'"]'),t=t||"layui-table-click",n)return e.removeClass(t);e.addClass(t),e.siblings("tr").removeClass(t)},t.prototype.setRowChecked=function(i){function a(e){return"radio"===i.type||(u?i.checked:!e)}var n,e=this,o=e.config,r="all"===i.index,l="array"===layui.type(i.index),t=r||l,s=(t&&e.layBox.addClass(z),l&&(n={},layui.each(i.index,function(e,t){n[t]=!0}),i.index=n),r||l?"tr":'tr[data-index="'+i.index+'"]'),c=(s=e.layBody.find(s),r?s:s.filter(l?function(){var e=g(this).data("index");return i.index[e]}:'[data-index="'+i.index+'"]')),d=(i=g.extend({type:"checkbox"},i),k.cache[e.key]),u="checked"in i,f={};layui.each(d,function(e,t){var n;"array"===layui.type(t)||t[o.disabledName]?f[e]=!0:r||(l?i.index[e]:Number(i.index)===e)?(n=t[o.checkName]=a(t[o.checkName]),r||l||((e=c.filter('[data-index="'+e+'"]'))[n?"addClass":"removeClass"](A),"radio"===i.type&&e.siblings().removeClass(A))):"radio"===i.type&&delete t[o.checkName]}),r?c.each(function(e){var t=this.getAttribute("data-index");f[t]||g(this).toggleClass(A,a(d[t][o.checkName]))}):l&&c.each(function(e){var t=this.getAttribute("data-index");i.index[t]&&!f[t]&&g(this).toggleClass(A,a(d[t][o.checkName]))});var p=(s=c.find('input[lay-type="'+({radio:"layTableRadio",checkbox:"layTableCheckbox"}[i.type]||"checkbox")+'"]:not(:disabled)')).last(),h=p.closest(P);("radio"===i.type&&h.hasClass(E)?s.first():s).prop("checked",a(p.prop("checked"))),e.syncCheckAll(),t&&setTimeout(function(){e.layBox.removeClass(z)},100)},t.prototype.sort=function(a){var e,t=this,n={},i=t.config,o=i.elem.attr("lay-filter"),r=k.cache[t.key];"string"==typeof(a=a||{}).field&&(l=a.field,t.layHeader.find("th").each(function(e,t){var n=g(this),i=n.data("field");if(i===a.field)return a.field=n,l=i,!1}));try{var l=l||a.field.data("field"),s=a.field.data("key");if(t.sortKey&&!a.pull&&l===t.sortKey.field&&a.type===t.sortKey.sort)return;var c=t.layHeader.find("th .laytable-cell-"+s).find(L);t.layHeader.find("th").find(L).removeAttr("lay-sort"),c.attr("lay-sort",a.type||null),t.layFixed.find("th")}catch(e){f.error("Table modules: sort field '"+l+"' not matched")}t.sortKey={field:l,sort:a.type},i.autoSort&&("asc"===a.type?e=layui.sort(r,l,null,!0):"desc"===a.type?e=layui.sort(r,l,!0,!0):(e=layui.sort(r,k.config.indexName,null,!0),delete t.sortKey,delete i.initSort)),n[i.response.dataName]=e||r,t.renderData({res:n,curr:t.page,count:t.count,sort:!0,type:a.reloadType}),a.fromEvent&&(i.initSort={field:l,type:a.type},layui.event.call(a.field,C,"sort("+o+")",g.extend({config:i},i.initSort)))},t.prototype.loading=function(e){this.config.loading&&this.layBox.find(".layui-table-init").toggleClass(p,!e)},t.prototype.cssRules=function(t,n){var e=this.elem.children("style")[0];s.getStyleRules(e,function(e){if(e.selectorText===".laytable-cell-"+t)return n(e),!0})},t.prototype.fullSize=function(){var e,n,i=this,t=i.config,a=t.height;i.fullHeightGap?(a=l.height()-i.fullHeightGap)<135&&(a=135):i.parentDiv&&i.parentHeightGap?(a=g(i.parentDiv).height()-i.parentHeightGap)<135&&(a=135):i.customHeightFunc&&(a=i.customHeightFunc())<135&&(a=135),1
      ')).find("div").css({width:n}),e.find("tr").append(t)):e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal),o=e.layMain.height()-i,e.layFixed.find(N).css("height",t.height()>=o?o:"auto").scrollTop(e.layMain.scrollTop()),e.layFixRight[k.cache[e.key]&&k.cache[e.key].length&&0':''))[0].value=null==(a=e.data("content")||n[a])?"":a,e.find("."+I)[0]||e.append(i),i.focus(),t)&&layui.stope(t))}function t(e,t){var n=g(this),i=n.parent(),a=i.data("key"),o=c.col(a),r=i.parent().data("index"),l=i.children(u),s=g('');"tips"===(t=t||o.expandedMode||d.cellExpandedMode)?c.tipsIndex=x.tips(['
      ',l.html(),"
      ",''].join(""),l[0],{tips:[3,""],time:-1,anim:-1,maxWidth:w.ios||w.android?300:c.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){x.close(t)})}}):(c.elem.find("."+i).trigger("click"),c.cssRules(a,function(e){var t=e.style.width,n=o.expandedWidth||d.cellExpandedWidth;n');n.html(t),d.height&&n.css("max-height",d.height-(c.layTool.outerHeight()||50)),i.find("."+_)[0]||i.append(n),c.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,t)}var i=g(this),a=i.attr("lay-event"),o=k.cache[d.id];layui.stope(e),F.trigger("table.tool.panel.remove"),x.close(c.tipsIndex),layui.each(d.defaultToolbar,function(e,t){if(t.layEvent===a)return"function"==typeof t.onClick&&t.onClick({data:o,config:d,openPanel:n}),!0}),layui.event.call(this,C,"toolbar("+r+")",g.extend({event:a,config:d},{}))}),c.layHeader.on("click","*[lay-event]",function(e){var t=(n=g(this)).attr("lay-event"),n=n.closest("th").data("key"),n=c.col(n);layui.event.call(this,C,"colTool("+r+")",g.extend({event:t,config:d,col:n},{}))}),c.layPagebar.on("click","*[lay-event]",function(e){var t=g(this).attr("lay-event");layui.event.call(this,C,"pagebar("+r+")",g.extend({event:t,config:d},{}))}),e.on("mousemove",function(e){var t=g(this),n=t.offset().left,e=e.clientX-n;t.data("unresize")||h.eventMoveElem||(s.allowResize=t.width()-e<=10,l.css("cursor",s.allowResize?"col-resize":""))}).on("mouseleave",function(){g(this),h.eventMoveElem||(s.allowResize=!1,l.css("cursor",""))}).on("mousedown",function(e){var t,n=g(this);s.allowResize&&(t=n.data("key"),e.preventDefault(),s.offset=[e.clientX,e.clientY],c.cssRules(t,function(e){var t=e.style.width||n.outerWidth();s.rule=e,s.ruleWidth=parseFloat(t),s.minWidth=n.data("minwidth")||d.cellMinWidth,s.maxWidth=n.data("maxwidth")||d.cellMaxWidth}),n.data(O,s),h.eventMoveElem=n)}),h.docEvent||F.on("mousemove",function(e){var t,n;h.eventMoveElem&&(t=h.eventMoveElem.data(O)||{},h.eventMoveElem.data("resizing",1),e.preventDefault(),t.rule)&&(e=t.ruleWidth+e.clientX-t.offset[0],n=h.eventMoveElem.closest("."+S).attr(T),n=y(n))&&((e=et.maxWidth&&(e=t.maxWidth),t.rule.style.width=e+"px",n.setGroupWidth(h.eventMoveElem),x.close(c.tipsIndex))}).on("mouseup",function(e){var t,n,i,a,o;h.eventMoveElem&&(i=(t=h.eventMoveElem).closest("."+S).attr(T),n=y(i))&&(i=t.data("key"),a=n.col(i),o=n.config.elem.attr("lay-filter"),s={},l.css("cursor",""),n.scrollPatch(),t.removeData(O),delete h.eventMoveElem,n.cssRules(i,function(e){a.width=parseFloat(e.style.width),layui.event.call(t[0],C,"colResized("+o+")",{col:a,config:n.config})}))}),h.docEvent=!0,e.on("click",function(e){var t=g(this),n=t.find(L),i=n.attr("lay-sort");if(!n[0]||1===t.data("resizing"))return t.removeData("resizing");c.sort({field:t,type:"asc"===i?"desc":"desc"===i?null:"asc",fromEvent:!0})}).find(L+" .layui-edge ").on("click",function(e){var t=(n=g(this)).index(),n=n.parents("th").eq(0).data("field");layui.stope(e),0===t?c.sort({field:n,type:"asc",fromEvent:!0}):c.sort({field:n,type:"desc",fromEvent:!0})}),c.commonMember=function(e){var n=g(this).parents("tr").eq(0).data("index"),t=c.layBody.find('tr[data-index="'+n+'"]'),i=(k.cache[c.key]||[])[n]||{},a={tr:t,config:d,data:k.clearCacheKey(i),dataCache:i,index:n,del:function(){k.cache[c.key][n]=[],t.remove(),c.scrollPatch()},update:function(e,t){c.updateRow({index:n,data:e=e||{},related:t},function(e,t){a.data[e]=t})},setRowChecked:function(e){c.setRowChecked(g.extend({index:n},e))}};return g.extend(a,e)}),i=(c.elem.on("click",'input[name="layTableCheckbox"]+',function(e){var t=(n=g(this)).closest("td"),n=n.prev(),i=(c.layBody.find('input[name="layTableCheckbox"]'),n.parents("tr").eq(0).data("index")),a=n[0].checked,o="layTableAllChoose"===n.attr("lay-filter");n[0].disabled||(o?c.setRowChecked({index:"all",checked:a}):(c.setRowChecked({index:i,checked:a}),layui.stope(e)),layui.event.call(n[0],C,"checkbox("+r+")",f.call(n[0],{checked:a,type:o?"all":"one",getCol:function(){return c.col(t.data("key"))}})))}),c.elem.on("click",'input[lay-type="layTableRadio"]+',function(e){var t=g(this),n=t.closest("td"),i=(t=t.prev())[0].checked,a=t.parents("tr").eq(0).data("index");if(layui.stope(e),t[0].disabled)return!1;c.setRowChecked({type:"radio",index:a}),layui.event.call(t[0],C,"radio("+r+")",f.call(t[0],{checked:i,getCol:function(){return c.col(n.data("key"))}}))}),c.layBody.on("mouseenter","tr",function(){var e=g(this),t=e.index();e.data("off")||c.layBody.find("tr:eq("+t+")").addClass(M)}).on("mouseleave","tr",function(){var e=g(this),t=e.index();e.data("off")||c.layBody.find("tr:eq("+t+")").removeClass(M)}).on("click","tr",function(e){var t=[".layui-form-checkbox",".layui-form-switch",".layui-form-radio","[lay-unrow]"].join(",");g(e.target).is(t)||g(e.target).closest(t)[0]||i.call(this,"row")}).on("dblclick","tr",function(){i.call(this,"rowDouble")}).on("contextmenu","tr",function(e){d.defaultContextmenu||e.preventDefault(),i.call(this,"rowContextmenu")}),function(e){var t=g(this);t.data("off")||layui.event.call(this,C,e+"("+r+")",f.call(t.children("td")[0]))}),a=(c.layBody.on("change","."+I,function(){var e=(i=g(this)).parent(),t=this.value,n=i.parent().data("field"),i=i.closest("tr").data("index"),i=k.cache[c.key][i],a=f.call(e[0],{value:t,field:n,oldValue:i[n],td:e,reedit:function(){setTimeout(function(){o(a.td);var e={};e[n]=a.oldValue,a.update(e)})},getCol:function(){return c.col(e.data("key"))}});(i={})[n]=t,a.update(i),layui.event.call(e[0],C,"edit("+r+")",a)}).on("blur","."+I,function(){g(this).remove()}),c.layBody.on(d.editTrigger,"td",function(e){o(this,e)}).on("mouseenter","td",function(){p.call(this)}).on("mouseleave","td",function(){p.call(this,"hide")}),c.layTotal.on("mouseenter","td",function(){p.call(this)}).on("mouseleave","td",function(){p.call(this,"hide")}),"layui-table-grid-down"),p=function(e){var t=g(this),n=t.children(u);t.data("off")||t.parent().hasClass(H)||(e?t.find(".layui-table-grid-down").remove():!(n.prop("scrollWidth")>n.prop("clientWidth")||0'))};c.layBody.on("click","."+a,function(e){t.call(this,e)}),c.layTotal.on("click","."+a,function(e){t.call(this,e,"tips")});c.layBody.on("click","*[lay-event]",function(e){n.call(this),layui.stope(e)}).on("dblclick","*[lay-event]",function(e){n.call(this,"toolDouble"),layui.stope(e)}),c.layMain.on("scroll",function(){var e=(t=g(this)).scrollLeft(),t=t.scrollTop();c.layHeader.scrollLeft(e),c.layTotal.scrollLeft(e),c.layFixed.find(N).scrollTop(t),x.close(c.tipsIndex)}),c.layFixed.find(N).on("mousewheel DOMMouseScroll",function(e){var t=e.originalEvent.wheelDelta||-e.originalEvent.detail,n=c.layMain.scrollTop();e.preventDefault(),c.layMain.scrollTop(n+(0tr").each(function(i){o.cols[i]=[],g(this).children().each(function(e){var t=(n=g(this)).attr("lay-data"),t=s.options(this,{attr:t?"lay-data":null,errorText:l+(t||n.attr("lay-options"))}),n=g.extend({title:n.text(),colspan:parseInt(n.attr("colspan"))||1,rowspan:parseInt(n.attr("rowspan"))||1},t);o.cols[i].push(n)})}),e.find("tbody>tr")),t=k.render(o);!n.length||r.data||t.config.url||(a=0,k.eachCols(t.config.id,function(e,i){n.each(function(e){o.data[e]=o.data[e]||{};var t=g(this),n=i.field;o.data[e][n]=t.children("td").eq(a).html()}),a++}),t.reloadData({data:o.data}))}),this},h.that={},h.config={},function(n,i,e,a){var o,r;a.colGroup&&(o=0,n++,a.CHILD_COLS=[],r=e+(parseInt(a.rowspan)||1),layui.each(i[r],function(e,t){t.parentKey?t.parentKey===a.key&&(t.PARENT_COL_INDEX=n,a.CHILD_COLS.push(t),c(n,i,r,t)):t.PARENT_COL_INDEX||1<=o&&o==(a.colspan||1)||(t.PARENT_COL_INDEX=n,a.CHILD_COLS.push(t),o+=parseInt(1td').filter('[data-field="'+e+'"]')}}})).replace(/"/g,'""'),o.push(n='"'+n+'"')):t.field&&"normal"!==t.type&&0==i&&(s[t.field]=!0)}),l.push(o.join(","))}),c&&layui.each(c.dataTotal,function(e,t){s[t.field]||i.push('"'+(t.total||"")+'"')}),r.join(",")+"\r\n"+l.join("\r\n")+"\r\n"+i.join(","))),u.download=(n.title||o.title||"table_"+(o.index||""))+"."+a,document.body.appendChild(u),u.click(),document.body.removeChild(u)},k.getOptions=a,k.hideCol=function(e,a){var o=y(e);o&&("boolean"===layui.type(a)?o.eachCols(function(e,t){var n=t.key,i=o.col(n),t=t.parentKey;i.hide!=a&&(i=i.hide=a,o.elem.find('*[data-key="'+n+'"]')[i?"addClass":"removeClass"](E),o.setParentCol(i,t))}):(a=layui.isArray(a)?a:[a],layui.each(a,function(e,a){o.eachCols(function(e,t){var n,i;a.field===t.field&&(n=t.key,i=o.col(n),t=t.parentKey,"hide"in a)&&i.hide!=a.hide&&(i=i.hide=!!a.hide,o.elem.find('*[data-key="'+n+'"]')[i?"addClass":"removeClass"](E),o.setParentCol(i,t))})})),g("."+_).remove(),o.resize())},k.reload=function(e,t,n,i){if(a(e))return(e=y(e)).reload(t,n,i),h.call(e)},k.reloadData=function(){var n=g.extend([],arguments),i=(n[3]="reloadData",new RegExp("^("+["elem","id","cols","width","height","maxHeight","toolbar","defaultToolbar","className","css","pagebar"].join("|")+")$"));return layui.each(n[1],function(e,t){i.test(e)&&delete n[1][e]}),k.reload.apply(null,n)},k.render=function(e){return e=new t(e),h.call(e)},k.clearCacheKey=function(e){return delete(e=g.extend({},e))[k.config.checkName],delete e[k.config.indexName],delete e[k.config.numbersName],delete e[k.config.disabledName],e},g(function(){k.init()}),d(C,k)}),layui.define(["table"],function(e){"use strict";function M(e){var t=r.that[e];return t||p.error(e?"The treeTable instance with ID '"+e+"' not found":"ID argument required"),t||null}function t(e){this.index=++F.index,this.config=H.extend(!0,{},this.config,F.config,e),this.init(),this.render()}function a(r,n,e){var l=M(r),s=("reloadData"!==e&&(l.status={expand:{}}),H.extend(!0,{},l.getOptions(),n)),i=s.tree,c=i.customName.children,a=i.customName.id,o=(delete n.hasNumberCol,delete n.hasChecboxCol,delete n.hasRadioCol,O.eachCols(null,function(e,t){"numbers"===t.type?n.hasNumberCol=!0:"checkbox"===t.type?n.hasChecboxCol=!0:"radio"===t.type&&(n.hasRadioCol=!0)},s.cols),n.parseData),d=n.done;"reloadData"===e&&"fixed"===s.scrollPos&&(l.scrollTopCache=l.config.elem.next().find(u).scrollTop()),s.url?e&&(!o||o.mod)||(n.parseData=function(){var e=(t=arguments)[0],t=("function"===layui.type(o)&&(e=o.apply(this,t)||t[0]),this.response.dataName);return i.data.isSimpleData&&!i.async.enable&&(e[t]=l.flatToTree(e[t])),w(e[t],function(e){e[Y]=Y in e?e[Y]:void 0!==e[a]&&l.status.expand[e[a]]},c),this.autoSort&&this.initSort&&this.initSort.type&&layui.sort(e[t],this.initSort.field,"desc"===this.initSort.type,!0),l.initData(e[t]),e},n.parseData.mod=!0):void 0!==n.data&&(n.data=n.data||[],i.data.isSimpleData&&(n.data=l.flatToTree(n.data)),l.initData(n.data)),e&&(!d||d.mod)||(n.done=function(){var e,t=arguments,n=t[3],i="renderData"===n,a=(i||delete l.isExpandAll,this.elem.next()),o=(l.updateStatus(null,{LAY_HAS_EXPANDED:!1}),x(r,c),a.find('[name="layTableCheckbox"][lay-filter="layTableAllChoose"]'));if(o.length&&(e=F.checkStatus(r),o.prop({checked:e.isAll&&e.data.length,indeterminate:!e.isAll&&e.data.length})),!i&&s.autoSort&&s.initSort&&s.initSort.type&&F.sort(r),l.renderTreeTable(a),"reloadData"===n&&"fixed"===this.scrollPos&&a.find(u).scrollTop(l.scrollTopCache),"function"===layui.type(d))return d.apply(this,t)},n.done.mod=!0),n&&n.tree&&n.tree.view&&layui.each(f,function(e,t){void 0!==n.tree.view[t]&&(n.tree.view[t]=l.normalizedIcon(n.tree.view[t]))})}function j(e,t,n){return o[e]||(o[e]=layui.debounce(t,n)),o[e]}function _(t,n,i,a,o){var e=t.trElem,r=t.tableViewElem||e.closest(".layui-table-view"),l=t.tableId||r.attr(R),s=t.options||O.getOptions(l),e=t.dataIndex||e.attr("lay-data-index"),c=M(l),d=s.tree||{},u=d.customName||{},f=u.isParent,p=c.getNodeDataByIndex(e),h="boolean"!==layui.type(n),y=h?!p[Y]:n,m=p[f]?y:null;if(o&&y!=p[Y]&&(!p[X]||"local"===p[X])){var g=d.callback.beforeExpand;if("function"===layui.type(g)&&!1===g(l,p,n))return m}var g=p[$],v=(I=r.find('tr[lay-data-index="'+e+'"]')).find(".layui-table-tree-flexIcon"),x=(c.updateNodeIcon({scopeEl:I,isExpand:y,isParent:p[f]}),p[Y]=y,p[u.id]);if(void 0!==x&&(c.status.expand[x]=y),null!==m){if(x=p[u.children]||[],y)if(g){if(!x.length)return;I.nextAll(x.map(function(e,t,n){return'tr[lay-data-index="'+e[W]+'"]'}).join(",")).removeClass(P),layui.each(x,function(e,t){t[f]&&(!i||h||t[Y]?t[Y]&&_({dataIndex:t[W],trElem:r.find('tr[lay-data-index="'+t[W]+'"]').first(),tableViewElem:r,tableId:l,options:s},!0):_({dataIndex:t[W],trElem:r.find('tr[lay-data-index="'+t[W]+'"]').first(),tableViewElem:r,tableId:l,options:s},n,i,a,o))})}else{var b,w,k,C,T,E,D,S,N,L,A,I=(g=d.async||{}).url||s.url;if(g.enable&&p[f]&&!p[X])return p[X]="loading",v.html(''),b=function(e){p[X]="success",p[u.children]=e,c.initData(p[u.children],p[W]),_(t,!0,!h&&i,a,o)},k=g.format,"function"===layui.type(k)?k(p,s,b):(w=H.extend({},g.where||s.where),k=g.autoParam,layui.each(k,function(e,t){t=t.split("="),w[t[0].trim()]=p[(t[1]||t[0]).trim()]}),(k=g.contentType||s.contentType)&&0==k.indexOf("application/json")&&(w=JSON.stringify(w)),N=g.method||s.method,C=g.dataType||s.dataType,T=g.jsonpCallback||s.jsonpCallback,E=g.headers||s.headers,D=g.parseData||s.parseData,S=g.response||s.response,H.ajax({type:N||"get",url:I,contentType:k,data:w,dataType:C||"json",jsonpCallback:T,headers:E||{},success:function(e){(e="function"==typeof D&&D.call(s,e)||e)[S.statusName]!=S.statusCode?(p[X]="error",v.html('')):b(e[S.dataName])},error:function(e,t){p[X]="error","function"==typeof s.error&&s.error(e,t)}})),m;p[$]=!0,x.length&&(!s.initSort||s.url&&!s.autoSort||((g=s.initSort).type?layui.sort(x,g.field,"desc"===g.type,!0):layui.sort(x,O.config.indexName,null,!0)),c.initData(p[u.children],p[W]),N=O.getTrHtml(l,x,null,null,e),L={trs:H(N.trs.join("")),trs_fixed:H(N.trs_fixed.join("")),trs_fixed_r:H(N.trs_fixed_r.join(""))},A=(e.split("-").length-1||0)+1,layui.each(x,function(e,t){L.trs.eq(e).attr({"data-index":t[W],"lay-data-index":t[W],"data-level":A}).data("index",t[W]),L.trs_fixed.eq(e).attr({"data-index":t[W],"lay-data-index":t[W],"data-level":A}).data("index",t[W]),L.trs_fixed_r.eq(e).attr({"data-index":t[W],"lay-data-index":t[W],"data-level":A}).data("index",t[W])}),r.find(q).find('tbody tr[lay-data-index="'+e+'"]').after(L.trs),r.find(z).find('tbody tr[lay-data-index="'+e+'"]').after(L.trs_fixed),r.find(B).find('tbody tr[lay-data-index="'+e+'"]').after(L.trs_fixed_r),c.renderTreeTable(L.trs,A),i)&&!h&&layui.each(x,function(e,t){_({dataIndex:t[W],trElem:r.find('tr[lay-data-index="'+t[W]+'"]').first(),tableViewElem:r,tableId:l,options:s},n,i,a,o)})}else c.isExpandAll=!1,(i&&!h?(layui.each(x,function(e,t){_({dataIndex:t[W],trElem:r.find('tr[lay-data-index="'+t[W]+'"]').first(),tableViewElem:r,tableId:l,options:s},n,i,a,o)}),r.find(x.map(function(e,t,n){return'tr[lay-data-index="'+e[W]+'"]'}).join(","))):(I=c.treeToFlat(x,p[u.id],e),r.find(I.map(function(e,t,n){return'tr[lay-data-index="'+e[W]+'"]'}).join(",")))).addClass(P);j("resize-"+l,function(){F.resize(l)},0)(),o&&"loading"!==p[X]&&(k=d.callback.onExpand,"function"===layui.type(k))&&k(l,p,y)}return m}function i(i){var t=i.config.id,a=M(t),n=i.data=F.getNodeDataByIndex(t,i.index),o=n[W],r=(i.dataIndex=o,i.update);i.update=function(){var e=arguments,t=(H.extend(a.getNodeDataByIndex(o),e[0]),r.apply(this,e)),n=i.config.tree.customName.name;return n in e[0]&&i.tr.find('td[data-field="'+n+'"]').children("div.layui-table-cell").removeClass("layui-table-tree-item"),a.renderTreeTable(i.tr,i.tr.attr("data-level"),!1),t},i.del=function(){F.removeNode(t,n)},i.setRowChecked=function(e){F.setRowChecked(t,{index:n,checked:e})}}var o,H=layui.$,y=layui.form,O=layui.table,p=layui.hint(),F={config:{},on:O.on,eachCols:O.eachCols,index:O.index,set:function(e){return this.config=H.extend({},this.config,e),this},resize:O.resize,getOptions:O.getOptions,hideCol:O.hideCol,renderData:O.renderData},r=function(){var n=this,e=n.config,i=e.id||e.index;return{config:e,reload:function(e,t){n.reload.call(n,e,t)},reloadData:function(e,t){F.reloadData(i,e,t)}}},R="lay-table-id",P="layui-hide",u=".layui-table-body",q=".layui-table-main",z=".layui-table-fixed-l",B=".layui-table-fixed-r",l="layui-table-checked",m="layui-table-tree",W="LAY_DATA_INDEX",g="LAY_DATA_INDEX_HISTORY",h="LAY_PARENT_INDEX",v="LAY_CHECKBOX_HALF",Y="LAY_EXPAND",$="LAY_HAS_EXPANDED",X="LAY_ASYNC_STATUS",s=["all","parent","children","none"],n=/<[^>]+?>/,f=["flexIconClose","flexIconOpen","iconClose","iconOpen","iconLeaf","icon"],x=function(i,a,e){var o=O.cache[i];layui.each(e||o,function(e,t){var n=t[W]||"";-1!==n.indexOf("-")&&(o[n]=t),t[a]&&x(i,a,t[a])})},o=(t.prototype.init=function(){var e=this.config,t=e.tree.data.cascade;-1===s.indexOf(t)&&(e.tree.data.cascade="all");var n=(t=O.render(H.extend({},e,{data:[],url:"",done:null}))).config.id;(r.that[n]=this).tableIns=t,a(n,e)},t.prototype.config={tree:{customName:{children:"children",isParent:"isParent",name:"name",id:"id",pid:"parentId",icon:"icon"},view:{indent:14,flexIconClose:'',flexIconOpen:'',showIcon:!0,icon:"",iconClose:'',iconOpen:'',iconLeaf:'',showFlexIconIfNotParent:!1,dblClickExpand:!0,expandAllDefault:!1},data:{isSimpleData:!1,rootPid:null,cascade:"all"},async:{enable:!1,url:"",type:null,contentType:null,headers:null,where:null,autoParam:[]},callback:{beforeExpand:null,onExpand:null}}},t.prototype.normalizedIcon=function(e){return e?n.test(e)?e:'':""},t.prototype.getOptions=function(){return this.tableIns?O.getOptions(this.tableIns.config.id):this.config},t.prototype.flatToTree=function(e){var i,a,o,r,l,s,c,d,t=(u=this.getOptions()).tree,n=t.customName,u=u.id;return u=e=e||O.cache[u],i=n.id,a=n.pid,o=n.children,r=t.data.rootPid,i=i||"id",a=a||"parentId",o=o||"children",c={},d=[],layui.each(u,function(e,t){l=i+t[i],s=i+t[a],c[l]||(c[l]={},c[l][o]=[]);var n={};n[o]=c[l][o],c[l]=H.extend({},t,n),((r?c[l][a]!==r:c[l][a])?(c[s]||(c[s]={},c[s][o]=[]),c[s][o]):d).push(c[l])}),d},t.prototype.treeToFlat=function(e,i,a){var o=this,r=o.getOptions().tree.customName,l=r.children,s=r.pid,c=[];return layui.each(e,function(e,t){var e=(a?a+"-":"")+e,n=H.extend({},t);n[s]=t[s]||i,c.push(n),c=c.concat(o.treeToFlat(t[l],t[r.id],e))}),c},t.prototype.getTreeNode=function(e){var t,n,i=this;return e?(n=(t=i.getOptions()).tree,t.id,n.customName,{data:e,dataIndex:e[W],getParentNode:function(){return i.getNodeByIndex(e[h])}}):p.error("找不到节点数据")},t.prototype.getNodeByIndex=function(t){var n,e,i=this,a=i.getNodeDataByIndex(t);return a?((e=i.getOptions()).tree.customName.parent,n=e.id,(e={data:a,dataIndex:a[W],getParentNode:function(){return i.getNodeByIndex(a[h])},update:function(e){return F.updateNode(n,t,e)},remove:function(){return F.removeNode(n,t)},expand:function(e){return F.expandNode(n,H.extend({},e,{index:t}))},setChecked:function(e){return F.setRowChecked(n,H.extend({},e,{index:t}))}}).dataIndex=t,e):p.error("找不到节点数据")},t.prototype.getNodeById=function(n){var i=(e=this.getOptions()).tree.customName.id,a="",e=F.getData(e.id,!0);if(layui.each(e,function(e,t){if(t[i]===n)return a=t[W],!0}),a)return this.getNodeByIndex(a)},t.prototype.getNodeDataByIndex=function(e,t,n){var i=(a=this.getOptions()).tree,a=a.id,o=(a=O.cache[a])[e];if("delete"!==n&&o)return H.extend(o,n),t?H.extend({},o):o;for(var r=a,l=String(e).split("-"),s=0,c=i.customName.children;sdiv.layui-table-cell')).addClass("layui-table-tree-item"),t.html(['
      ',n[Y]?s.flexIconOpen:s.flexIconClose,"
      ",s.showIcon?'
      '+(o.normalizedIcon(n[c.icon])||s.icon||(n[d]?n[Y]?s.iconOpen:s.iconClose:s.iconLeaf)||"")+"
      ":"",i].join("")).find(".layui-table-tree-flexIcon").on("click",function(e){layui.stope(e),_({trElem:a},null,null,null,!0)}))}),!t&&l.view.expandAllDefault&&void 0===o.isExpandAll)return F.expandAll(a,!0);(!1!==n&&f?(layui.each(f,function(e,t){(e=r.find('tr[lay-data-index="'+e+'"]')).find(".layui-table-tree-flexIcon").html(s.flexIconOpen),_({trElem:e.first()},!0)}),j("renderTreeTable2-"+a,function(){y.render(H(".layui-table-tree["+R+'="'+a+'"]'))},0)):j("renderTreeTable-"+a,function(){i.hasNumberCol&&b(o),y.render(H(".layui-table-tree["+R+'="'+a+'"]'))},0))()},function(n){var e=n.getOptions(),t=e.elem.next(),i=0,a=t.find(".layui-table-main tbody tr"),o=t.find(".layui-table-fixed-l tbody tr"),r=t.find(".layui-table-fixed-r tbody tr");layui.each(n.treeToFlat(O.cache[e.id]),function(e,t){t.LAY_HIDE||(n.getNodeDataByIndex(t[W]).LAY_NUM=++i,a.eq(e).find(".laytable-cell-numbers").html(i),o.eq(e).find(".laytable-cell-numbers").html(i),r.eq(e).find(".laytable-cell-numbers").html(i))})}),w=(t.prototype.render=function(e){this.tableIns=O["reloadData"===e?"reloadData":"reload"](this.tableIns.config.id,H.extend(!0,{},this.config)),this.config=this.tableIns.config},t.prototype.reload=function(e,t,n){var i=this;e=e||{},delete i.haveInit,layui.each(e,function(e,t){"array"===layui.type(t)&&delete i.config[e]}),a(i.getOptions().id,e,n||!0),i.config=H.extend(t,{},i.config,e),i.render(n)},F.reloadData=function(){var e=H.extend(!0,[],arguments);return e[3]="reloadData",F.reload.apply(null,e)},function(e,n,i,a){var o=[];return layui.each(e,function(e,t){"function"===layui.type(n)?n(t):H.extend(t,n),o.push(H.extend({},t)),a||(o=o.concat(w(t[i],n,i,a)))}),o}),d=(t.prototype.updateStatus=function(e,t,n){var i=this.getOptions(),a=i.tree;return e=e||O.cache[i.id],w(e,t,a.customName.children,n)},t.prototype.getTableData=function(){var e=this.getOptions();return O.cache[e.id]},F.updateStatus=function(e,t,n){var i=(e=M(e)).getOptions();return n=n||(i.url?O.cache[i.id]:i.data),e.updateStatus(n,t)},F.sort=function(e){var t,n,a,o,i,r=M(e);r&&(i=(t=r.getOptions()).tree,n=F.getData(e),a=i.customName.children,o=function(e,n,i){layui.sort(e,n,i,!0),layui.each(e,function(e,t){o(t[a]||[],n,i)})},t.autoSort)&&((i=t.initSort).type?o(n,i.field,"desc"===i.type):o(n,O.config.indexName,null),O.cache[e]=n,r.initData(n),F.renderData(e))},F.updateNode=function(e,n,t){var i,a,o,r,l,s=M(e);s&&((r=s.getOptions()).tree,r=(i=r.elem.next()).find('tr[lay-data-index="'+n+'"]'),a=r.attr("data-index"),o=r.attr("data-level"),t)&&(r=s.getNodeDataByIndex(n,!1,t),l=O.getTrHtml(e,[r]),layui.each(["main","fixed-l","fixed-r"],function(e,t){i.find(".layui-table-"+t+' tbody tr[lay-data-index="'+n+'"]').replaceWith(H(l[["trs","trs_fixed","trs_fixed_r"][e]].join("")).attr({"data-index":a,"lay-data-index":n,"data-level":o}).data("index",a))}),s.renderTreeTable(i.find('tr[lay-data-index="'+n+'"]'),o))},F.removeNode=function(e,t,n){var i=M(e);if(i){var a,o=i.getOptions(),r=(f=o.tree).customName.isParent,l=f.customName.children,s=o.elem.next(),c=[],d=O.cache[e],t=i.getNodeDataByIndex("string"===layui.type(t)?t:t[W],!1,"delete"),u=i.getNodeDataByIndex(t[h]),f=(i.updateCheckStatus(u),i.treeToFlat([t],t[f.customName.pid],t[h])),t=(layui.each(f,function(e,t){t=t[W],c.push('tr[lay-data-index="'+t+'"]'),-1!==t.indexOf("-")&&delete d[t]}),s.find(c.join(",")).remove(),i.initData());for(a in d)-1!==a.indexOf("-")&&a!==d[a][W]&&delete d[a];layui.each(i.treeToFlat(t),function(e,t){t[g]&&t[g]!==t[W]&&s.find('tr[lay-data-index="'+t[g]+'"]').attr({"data-index":t[W],"lay-data-index":t[W]}).data("index",t[W])}),layui.each(d,function(e,t){s.find('tr[data-level="0"][lay-data-index="'+t[W]+'"]').attr("data-index",e).data("index",e)}),o.hasNumberCol&&b(i),u&&(f=s.find('tr[lay-data-index="'+u[W]+'"]'),n||(u[r]=!(!u[l]||!u[l].length)),i.updateNodeIcon({scopeEl:f,isExpand:u[Y],isParent:u[r]})),F.resize(e)}},F.addNodes=function(e,t){var n=M(e);if(n){var i=(m=n.getOptions()).tree,a=m.elem.next(),o=O.config.checkName,r=(t=t||{}).parentIndex,l=t.index,s=t.data,t=t.focus,c=(r="number"===layui.type(r)?r.toString():r)?n.getNodeDataByIndex(r):null,l="number"===layui.type(l)?l:-1,s=H.extend(!0,[],layui.isArray(s)?s:[s]);if(layui.each(s,function(e,t){o in t||!c||(t[o]=c[o])}),n.getTableData(),c){var d=i.customName.isParent,u=i.customName.children,f=(c[d]=!0,(f=c[u])?(p=f.splice(-1===l?f.length:l),c[u]=f.concat(s,p)):c[u]=s),u=(n.updateStatus(f,function(e){(e[d]||i.view.showFlexIconIfNotParent)&&(e[$]=!1)}),n.treeToFlat(f));a.find(u.map(function(e){return'tr[lay-data-index="'+e[W]+'"]'}).join(",")).remove(),n.initData(),c[$]=!1,c[X]="local",_({trElem:a.find('tr[lay-data-index="'+r+'"]')},!0)}else{var p=O.cache[e].splice(-1===l?O.cache[e].length:l);if(O.cache[e]=O.cache[e].concat(s,p),m.url||(m.page?(f=m.page,m.data.splice.apply(m.data,[f.limit*(f.curr-1),f.limit].concat(O.cache[e]))):m.data=O.cache[e]),n.initData(),a.find(".layui-none").length)return O.renderData(e),s;var h,u=O.getTrHtml(e,s),y={trs:H(u.trs.join("")),trs_fixed:H(u.trs_fixed.join("")),trs_fixed_r:H(u.trs_fixed_r.join(""))},r=(layui.each(s,function(e,t){h={"data-index":t[W],"lay-data-index":t[W],"data-level":"0"},y.trs.eq(e).attr(h).data("index",t[W]),y.trs_fixed.eq(e).attr(h).data("index",t[W]),y.trs_fixed_r.eq(e).attr(h).data("index",t[W])}),parseInt(s[0][W])-1),f=a.find(q),m=a.find(z),u=a.find(B);-1==r?f.find('tr[data-level="0"][data-index="0"]')[0]?(f.find('tr[data-level="0"][data-index="0"]').before(y.trs),m.find('tr[data-level="0"][data-index="0"]').before(y.trs_fixed),u.find('tr[data-level="0"][data-index="0"]').before(y.trs_fixed_r)):(f.find("tbody").prepend(y.trs),m.find("tbody").prepend(y.trs_fixed),u.find("tbody").prepend(y.trs_fixed_r)):-1===l?(f.find("tbody").append(y.trs),m.find("tbody").append(y.trs_fixed),u.find("tbody").append(y.trs_fixed_r)):(r=p[0][g],f.find('tr[data-level="0"][data-index="'+r+'"]').before(y.trs),m.find('tr[data-level="0"][data-index="'+r+'"]').before(y.trs_fixed),u.find('tr[data-level="0"][data-index="'+r+'"]').before(y.trs_fixed_r)),layui.each(O.cache[e],function(e,t){a.find('tr[data-level="0"][lay-data-index="'+t[W]+'"]').attr("data-index",e).data("index",e)}),n.renderTreeTable(a.find(s.map(function(e,t,n){return'tr[lay-data-index="'+e[W]+'"]'}).join(",")))}return n.updateCheckStatus(c),c&&(l=a.find('tr[lay-data-index="'+c[W]+'"]'),n.updateNodeIcon({scopeEl:l,isExpand:c[Y],isParent:c[d]})),F.resize(e),t&&a.find(q).find('tr[lay-data-index="'+s[0][W]+'"]').get(0).scrollIntoViewIfNeeded(),s}},F.checkStatus=function(e,i){var a,t,n,o=M(e);if(o)return o=o.getOptions().tree,a=O.config.checkName,t=F.getData(e,!0).filter(function(e,t,n){return e[a]||i&&e[v]}),n=!0,layui.each("all"===o.data.cascade?O.cache[e]:F.getData(e,!0),function(e,t){if(!t[a])return!(n=!1)}),{data:t,isAll:n}},F.on("sort",function(e){var t=(e=e.config).elem.next(),e=e.id;t.hasClass(m)&&F.sort(e)}),F.on("row",function(e){e.config.elem.next().hasClass(m)&&i(e)}),F.on("rowDouble",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&(i(e),(t.tree||{}).view.dblClickExpand)&&_({trElem:e.tr.first()},null,null,null,!0)}),F.on("rowContextmenu",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&i(e)}),F.on("tool",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&i(e)}),F.on("edit",function(e){var t=e.config,n=t.elem.next();t.id,n.hasClass(m)&&(i(e),e.field===t.tree.customName.name)&&((n={})[e.field]=e.value,e.update(n))}),F.on("radio",function(e){var t=(n=e.config).elem.next(),n=n.id;t.hasClass(m)&&(t=M(n),i(e),d.call(t,e.tr,e.checked))}),t.prototype.setRowCheckedClass=function(e,t){var n=this.getOptions(),i=(e.data("index"),n.elem.next());e[t?"addClass":"removeClass"](l),e.each(function(){var e=H(this).data("index");i.find('.layui-table-fixed-r tbody tr[data-index="'+e+'"]')[t?"addClass":"removeClass"](l)})},t.prototype.updateCheckStatus=function(e,t){var n,i,a,o,r,l,s,c=this,d=c.getOptions();return!!d.hasChecboxCol&&(n=d.tree,i=d.id,a=d.elem.next(),o=O.config.checkName,"all"!==(r=n.data.cascade)&&"parent"!==r||!e||(r=c.updateParentCheckStatus(e,"boolean"===layui.type(t)?t:null),layui.each(r,function(e,t){var n=a.find('tr[lay-data-index="'+t[W]+'"] input[name="layTableCheckbox"]:not(:disabled)'),i=t[o];c.setRowCheckedClass(n.closest("tr"),i),y.render(n.prop({checked:i,indeterminate:t[v]}))})),s=!(l=!0),0<(e=(e="all"===n.data.cascade?O.cache[i]:F.getData(i,!0)).filter(function(e){return!e[d.disabledName]})).length?layui.each(e,function(e,t){if((t[o]||t[v])&&(s=!0),t[o]||(l=!1),s&&!l)return!0}):l=!1,s=s&&!l,y.render(a.find('input[name="layTableCheckbox"][lay-filter="layTableAllChoose"]').prop({checked:l,indeterminate:s})),l)},t.prototype.updateParentCheckStatus=function(n,i){var a,e=(t=this.getOptions()).tree,t=t.id,o=O.config.checkName,e=e.customName.children,r=[];return!(n[v]=!1)===i?n[e].length?layui.each(n[e],function(e,t){if(!t[o])return i=!1,n[v]=!0}):i=!1:!1===i?layui.each(n[e],function(e,t){if(t[o]||t[v])return n[v]=!0}):(i=!1,a=0,layui.each(n[e],function(e,t){t[o]&&a++}),i=n[e].length?n[e].length===a:n[o],n[v]=!i&&0')),i=(e.tree(n),t.elem=p(t.elem));if(i[0]){if(e.key=t.id||e.index,e.elem=n,e.elemNone=p('
      '+t.text.none+"
      "),i.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);t.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=p(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(D),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(D)}),e.events()}},t.prototype.renderForm=function(e){n.render(e,"LAY-tree-"+this.index)},t.prototype.tree=function(l,e){var s=this,c=s.config,d=c.customName,e=e||c.data;layui.each(e,function(e,t){var n,i,a=t[d.children]&&0"),r=p(['
      ','
      ','
      ',c.showLine?a?'':'':'',c.showCheckbox?'':"",c.isJump&&t.href?''+(t[d.title]||t.label||c.text.defaultNodeName)+"":''+(t[d.title]||t.label||c.text.defaultNodeName)+"","
      ",c.edit?(n={add:'',update:'',del:''},i=['
      '],!0===c.edit&&(c.edit=["update","del"]),"object"==typeof c.edit?(layui.each(c.edit,function(e,t){i.push(n[t]||"")}),i.join("")+"
      "):void 0):"","
      "].join(""));a&&(r.append(o),s.tree(o,t[d.children])),l.append(r),r.prev("."+g)[0]&&r.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),a||r.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),s.spread(r,t),c.showCheckbox&&(t.checked&&s.checkids.push(t[d.id]),s.checkClick(r,t)),c.edit&&s.operate(r,t)})},t.prototype.spread=function(i,a){var o=this,r=o.config,e=(l=i.children("."+w)).children("."+k),t=e.find('input[same="layuiTreeCheck"]'),n=l.find("."+v),l=l.find("."+C),s=r.onlyIconControl?n:e,c="";s.on("click",function(e){var t=i.children("."+T),n=(s.children(".layui-icon")[0]?s:s.find(".layui-tree-icon")).children(".layui-icon");t[0]?i.hasClass(E)?(i.removeClass(E),t.slideUp(200),n.removeClass(b).addClass(x),o.updateFieldValue(a,"spread",!1)):(i.addClass(E),t.slideDown(200),n.addClass(b).removeClass(x),o.updateFieldValue(a,"spread",!0),r.accordion&&((t=i.siblings("."+g)).removeClass(E),t.children("."+T).slideUp(200),t.find(".layui-tree-icon").children(".layui-icon").removeClass(b).addClass(x))):c="normal"}),l.on("click",function(){p(this).hasClass(u)||(c=i.hasClass(E)?r.onlyIconControl?"open":"close":r.onlyIconControl?"close":"open",t[0]&&o.updateFieldValue(a,"checked",t.prop("checked")),r.click&&r.click({elem:i,state:c,data:a}))})},t.prototype.updateFieldValue=function(e,t,n){t in e&&(e[t]=n)},t.prototype.setCheckbox=function(e,t,n){var a,i=this,o=i.config.customName,r=n.prop("checked");n.prop("disabled")||("object"!=typeof t[o.children]&&!e.find("."+T)[0]||e.find("."+T).find('input[same="layuiTreeCheck"]').each(function(e){this.disabled||((e=t[o.children][e])&&i.updateFieldValue(e,"checked",r),i.updateFieldValue(this,"checked",r))}),(a=function(e){var t,n,i;e.parents("."+g)[0]&&(n=(e=e.parent("."+T)).parent(),i=e.prev().find('input[same="layuiTreeCheck"]'),r?i.prop("checked",r):(e.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(t=!0)}),t||i.prop("checked",!1)),a(n))})(e),i.renderForm("checkbox"))},t.prototype.checkClick=function(n,i){var a=this,o=a.config;n.children("."+w).children("."+k).on("click",'input[same="layuiTreeCheck"]+',function(e){layui.stope(e);var t=(e=p(this).prev()).prop("checked");e.prop("disabled")||(a.setCheckbox(n,i,e),a.updateFieldValue(i,"checked",t),o.oncheck&&o.oncheck({elem:n,checked:t,data:i}))})},t.prototype.operate=function(s,o){var c=this,d=c.config,u=d.customName,e=s.children("."+w),f=e.children("."+k);e.children(".layui-tree-btnGroup").on("click",".layui-icon",function(e){layui.stope(e);var t,n,i,a,e=p(this).data("type"),r=s.children("."+T),l={data:o,type:e,elem:s};"add"==e?(r[0]||(d.showLine?(f.find("."+v).addClass("layui-tree-icon"),f.find("."+v).children(".layui-icon").addClass(x).removeClass("layui-icon-file")):f.find(".layui-tree-iconArrow").removeClass(m),s.append('
      ')),i=d.operate&&d.operate(l),(a={})[u.title]=d.text.defaultNodeName,a[u.id]=i,c.tree(s.children("."+T),[a]),d.showLine&&(r[0]?(r.hasClass(N)||r.addClass(N),s.find("."+T).each(function(){p(this).children("."+g).last().addClass(D)}),(r.children("."+g).last().prev().hasClass(D)?r.children("."+g).last().prev():r.children("."+g).last()).removeClass(D),!s.parent("."+T)[0]&&s.next()[0]&&r.children("."+g).last().removeClass(D)):(i=s.siblings("."+g),n=1,a=s.parent("."+T),layui.each(i,function(e,t){p(t).children("."+T)[0]||(n=0)}),(1==n?(i.children("."+T).addClass(S),i.children("."+T).children("."+g).removeClass(D),s.children("."+T).addClass(S),a.removeClass(N),a.children("."+g).last().children("."+T).children("."+g).last()):s.children("."+T).children("."+g)).addClass(D))),d.showCheckbox&&(f.find('input[same="layuiTreeCheck"]')[0].checked&&(s.children("."+T).children("."+g).last().find('input[same="layuiTreeCheck"]')[0].checked=!0),c.renderForm("checkbox"))):"update"==e?(i=f.children("."+C).html(),f.children("."+C).html(""),f.append(''),f.children(".layui-tree-editInput").val(y.unescape(i)).focus(),t=function(e){var t=y.escape(e.val().trim())||d.text.defaultNodeName;e.remove(),f.children("."+C).html(t),l.data[u.title]=t,d.operate&&d.operate(l)},f.children(".layui-tree-editInput").blur(function(){t(p(this))}),f.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),t(p(this)))})):h.confirm('确认删除该节点 "'+(o[u.title]||"")+'" 吗?',function(e){var o,n,t;d.operate&&d.operate(l),l.status="remove",h.close(e),s.prev("."+g)[0]||s.next("."+g)[0]||s.parent("."+T)[0]?(s.siblings("."+g).children("."+w)[0]?(d.showCheckbox&&(o=function(e){var t,n,i,a;e.parents("."+g)[0]&&(t=e.siblings("."+g).children("."+w),n=(e=e.parent("."+T).prev()).find('input[same="layuiTreeCheck"]')[0],i=1,(a=0)==n.checked)&&(t.each(function(e,t){0!=(t=p(t).find('input[same="layuiTreeCheck"]')[0]).checked||t.disabled||(i=0),t.disabled||(a=1)}),1==i)&&1==a&&(n.checked=!0,c.renderForm("checkbox"),o(e.parent("."+g)))})(s),d.showLine&&(e=s.siblings("."+g),n=1,t=s.parent("."+T),layui.each(e,function(e,t){p(t).children("."+T)[0]||(n=0)}),1==n?(r[0]||(t.removeClass(N),e.children("."+T).addClass(S),e.children("."+T).children("."+g).removeClass(D)),(s.next()[0]?t.children("."+g).last():s.prev()).children("."+T).children("."+g).last().addClass(D),s.next()[0]||s.parents("."+g)[1]||s.parents("."+g).eq(0).next()[0]||s.prev("."+g).addClass(D)):!s.next()[0]&&s.hasClass(D)&&s.prev().addClass(D))):(e=s.parent("."+T).prev(),d.showLine?(e.find("."+v).removeClass("layui-tree-icon"),e.find("."+v).children(".layui-icon").removeClass(b).addClass("layui-icon-file"),(t=e.parents("."+T).eq(0)).addClass(N),t.children("."+g).each(function(){p(this).children("."+T).children("."+g).last().addClass(D)})):e.find(".layui-tree-iconArrow").addClass(m),s.parents("."+g).eq(0).removeClass(E),s.parent("."+T).remove()),s.remove()):(s.remove(),c.elem.append(c.elemNone))})})},t.prototype.events=function(){var t=this,a=t.config;t.elem.find(".layui-tree-checkedFirst"),t.setChecked(t.checkids),t.elem.find(".layui-tree-search").on("keyup",function(){var n=(e=p(this)).val(),e=e.nextAll(),i=[];e.find("."+C).each(function(){var t,e=p(this).parents("."+w);-1!=p(this).html().indexOf(n)&&(i.push(p(this).parent()),(t=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+T)[0]&&t(e.parent("."+T).parent("."+g))})(e.parent("."+g)))}),e.find("."+w).each(function(){var e=p(this).parent("."+g);e.hasClass("layui-tree-searchShow")||e.addClass(m)}),0==e.find(".layui-tree-searchShow").length&&t.elem.append(t.elemNone),a.onsearch&&a.onsearch({elem:i})}),t.elem.find(".layui-tree-search").on("keydown",function(){p(this).nextAll().find("."+w).each(function(){p(this).parent("."+g).removeClass("layui-tree-searchShow "+m)}),p(".layui-tree-emptyText")[0]&&p(".layui-tree-emptyText").remove()})},t.prototype.getChecked=function(){var a=this,e=a.config,o=e.customName,t=[],n=[],r=(a.elem.find(".layui-form-checked").each(function(){t.push(p(this).prev()[0].value)}),function(e,i){layui.each(e,function(e,n){layui.each(t,function(e,t){if(n[o.id]==t)return a.updateFieldValue(n,"checked",!0),delete(t=p.extend({},n))[o.children],i.push(t),n[o.children]&&(t[o.children]=[],r(n[o.children],t[o.children])),!0})})});return r(p.extend({},e.data),n),n},t.prototype.setChecked=function(o){this.config,this.elem.find("."+g).each(function(e,t){var n=p(this).data("id"),i=p(t).children("."+w).find('input[same="layuiTreeCheck"]'),a=i.next();if("number"==typeof o){if(n.toString()==o.toString())return i[0].checked||a.click(),!1}else"object"==typeof o&&layui.each(o,function(e,t){if(t.toString()==n.toString()&&!i[0].checked)return a.click(),!0})})},i.that={},i.config={},o.reload=function(e,t){return(e=i.that[e]).reload(t),i.call(e)},o.getChecked=function(e){return i.that[e].getChecked()},o.setChecked=function(e,t){return i.that[e].setChecked(t)},o.render=function(e){return e=new t(e),i.call(e)},e(a,o)}),layui.define(["laytpl","form"],function(e){"use strict";function i(){var t=this,e=t.config,n=e.id||t.index;return i.that[n]=t,{config:i.config[n]=e,reload:function(e){t.reload.call(t,e)},getData:function(){return t.getData.call(t)}}}function t(e){return['
      ','
      ','","
      ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
        ',"
        "].join("")}function n(e){this.index=++l.index,this.config=c.extend({},this.config,l.config,e),this.render()}var c=layui.$,a=layui.laytpl,o=layui.form,r="transfer",l={config:{},index:layui[r]?layui[r].index+1e4:0,set:function(e){return this.config=c.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,r,e,t)}},d="layui-hide",u="layui-btn-disabled",s="layui-none",f="layui-transfer-box",p="layui-transfer-header",h="layui-transfer-search",y="layui-transfer-data",m=['
        ',t({index:0,checkAllName:"layTransferLeftCheckAll"}),'
        ','",'","
        ",t({index:1,checkAllName:"layTransferRightCheckAll"}),"
        "].join("");n.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},n.prototype.reload=function(e){this.config=c.extend({},this.config,e),this.render()},n.prototype.render=function(){var e=this,t=e.config,n=e.elem=c(a(m,{open:"{{",close:"}}"}).render({data:t,index:e.index})),i=t.elem=c(t.elem);i[0]&&(t.data=t.data||[],t.value=t.value||[],t.id="id"in t?t.id:elem.attr("id")||e.index,e.key=t.id,i.html(e.elem),e.layBox=e.elem.find("."+f),e.layHeader=e.elem.find("."+p),e.laySearch=e.elem.find("."+h),e.layData=n.find("."+y),e.layBtn=n.find(".layui-transfer-active .layui-btn"),e.layBox.css({width:t.width,height:t.height}),e.layData.css({height:(i=t.height-e.layHeader.outerHeight(),t.showSearch&&(i-=e.laySearch.outerHeight()),i-2)}),e.renderData(),e.events())},n.prototype.renderData=function(){var e=this.config,o=[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}];this.parseData(function(n){var i=n.selected?1:0,a=["
      • ",'',"
      • "].join("");i?layui.each(e.value,function(e,t){t==n.value&&n.selected&&(o[i].views[e]=a)}):o[i].views.push(a),delete n.selected}),this.layData.eq(0).html(o[0].views.join("")),this.layData.eq(1).html(o[1].views.join("")),this.renderCheckBtn()},n.prototype.renderForm=function(e){o.render(e,"LAY-transfer-"+this.index)},n.prototype.renderCheckBtn=function(r){var l=this,s=l.config;r=r||{},l.layBox.each(function(e){var t=(n=c(this)).find("."+y),n=n.find("."+p).find('input[type="checkbox"]'),i=t.find('input[type="checkbox"]'),a=0,o=!1;i.each(function(){var e=c(this).data("hide");(this.checked||this.disabled||e)&&a++,this.checked&&!e&&(o=!0)}),n.prop("checked",o&&a===i.length),l.layBtn.eq(e)[o?"removeClass":"addClass"](u),r.stopNone||(i=t.children("li:not(."+d+")").length,l.noneView(t,i?"":s.text.none))}),l.renderForm("checkbox")},n.prototype.noneView=function(e,t){var n=c('

        '+(t||"")+"

        ");e.find("."+s)[0]&&e.find("."+s).remove(),t.replace(/\s/g,"")&&e.append(n)},n.prototype.setValue=function(){var e=this.config,t=[];return this.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){c(this).data("hide")||t.push(this.value)}),e.value=t,this},n.prototype.parseData=function(t){var i=this.config,a=[];return layui.each(i.data,function(e,n){n=("function"==typeof i.parseData?i.parseData(n):n)||n,a.push(n=c.extend({},n)),layui.each(i.value,function(e,t){t==n.value&&(n.selected=!0)}),t&&t(n)}),i.data=a,this},n.prototype.getData=function(e){var t=this.config,i=[];return this.setValue(),layui.each(e||t.value,function(e,n){layui.each(t.data,function(e,t){delete t.selected,n==t.value&&i.push(t)})}),i},n.prototype.transfer=function(e,t){var n,i=this,a=i.config,o=i.layBox.eq(e),r=[];t?((n=t.find('input[type="checkbox"]'))[0].checked=!1,o.siblings("."+f).find("."+y).append(t.clone()),t.remove(),r.push(n[0].value),i.setValue()):o.each(function(e){c(this).find("."+y).children("li").each(function(){var e=c(this),t=e.find('input[type="checkbox"]'),n=t.data("hide");t[0].checked&&!n&&(t[0].checked=!1,o.siblings("."+f).find("."+y).append(e.clone()),e.remove(),r.push(t[0].value)),i.setValue()})}),i.renderCheckBtn(),""!==(t=o.siblings("."+f).find("."+h+" input")).val()&&t.trigger("keyup"),a.onchange&&a.onchange(i.getData(r),e)},n.prototype.events=function(){var a=this,o=a.config;a.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var e=c(this).prev(),t=e[0].checked,n=e.parents("."+f).eq(0).find("."+y);e[0].disabled||("all"===e.attr("lay-type")&&n.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=t)}),setTimeout(function(){a.renderCheckBtn({stopNone:!0})},0))}),a.elem.on("dblclick","."+y+">li",function(e){var t=c(this),n=t.children('input[type="checkbox"]'),i=t.parent().parent().data("index");n[0].disabled||!1!==("function"==typeof o.dblclick?o.dblclick({elem:t,data:a.getData([n[0].value])[0],index:i}):null)&&a.transfer(i,t)}),a.layBtn.on("click",function(){var e=c(this),t=e.data("index");e.hasClass(u)||a.transfer(t)}),a.laySearch.find("input").on("keyup",function(){var i=this.value,e=c(this).parents("."+h).eq(0).siblings("."+y),t=((t=e.children("li")).each(function(){var e=c(this),t=e.find('input[type="checkbox"]'),n=t[0].title;"cs"!==o.showSearch&&(n=n.toLowerCase(),i=i.toLowerCase()),e[(n=-1!==n.indexOf(i))?"removeClass":"addClass"](d),t.data("hide",!n)}),a.renderCheckBtn(),t.length===e.children("li."+d).length);a.noneView(e,t?o.text.searchNone:"")})},i.that={},i.config={},l.reload=function(e,t){return(e=i.that[e]).reload(t),i.call(e)},l.getData=function(e){return i.that[e].getData()},l.render=function(e){return e=new n(e),i.call(e)},e(r,l)}),layui.define(["jquery","lay"],function(e){"use strict";function t(e){this.config=a.extend({},this.config,i.config,e),this.render()}var a=layui.$,r=layui.lay,i=(layui.hint(),layui.device(),{config:{},set:function(e){return this.config=a.extend({},this.config,e),this},on:function(e,t){return layui.onevent.call(this,l,e,t)}}),l="carousel",s="layui-this",c="layui-carousel-left",d="layui-carousel-right",u="layui-carousel-prev",f="layui-carousel-next",o="layui-carousel-arrow",p="layui-carousel-ind";t.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},t.prototype.render=function(){var e=this,t=e.config,n=a(t.elem);if(1*[carousel-item]>*"),t.index<0&&(t.index=0),t.index>=e.elemItem.length&&(t.index=e.elemItem.length-1),t.interval<800&&(t.interval=800),t.full?t.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):t.elem.css({width:t.width,height:t.height}),t.elem.attr("lay-anim",t.anim),e.elemItem.eq(t.index).addClass(s),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},t.prototype.reload=function(e){clearInterval(this.timer),this.config=a.extend({},this.config,e),this.render()},t.prototype.prevIndex=function(){var e=this.config.index-1;return e<0?this.elemItem.length-1:e},t.prototype.nextIndex=function(){var e=this.config.index+1;return e>=this.elemItem.length?0:e},t.prototype.addIndex=function(e){var t=this.config;t.index=t.index+(e=e||1),t.index>=this.elemItem.length&&(t.index=0)},t.prototype.subIndex=function(e){var t=this.config;t.index=t.index-(e=e||1),t.index<0&&(t.index=this.elemItem.length-1)},t.prototype.autoplay=function(){var e=this,t=e.config;t.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},t.interval))},t.prototype.arrow=function(){var t=this,e=t.config,n=a(['",'"].join(""));e.elem.attr("lay-arrow",e.arrow),e.elem.find("."+o)[0]&&e.elem.find("."+o).remove(),e.elem.append(n),n.on("click",function(){var e=a(this).attr("lay-type");t.slide(e)})},t.prototype.goto=function(e){var t=this.config;e>t.index?this.slide("add",e-t.index):e
          ',(t=[],layui.each(e.elemItem,function(e){t.push("")}),t.join("")),"
        "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+p)[0]&&n.elem.find("."+p).remove(),n.elem.append(i),"updown"===n.anim&&i.css("margin-top",-i.height()/2),i.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){e.goto(a(this).index())})},t.prototype.slide=function(e,t){var n=this,i=n.elemItem,a=n.config,o=a.index,r=a.elem.attr("lay-filter");n.haveSlide||("sub"===e?(n.subIndex(t),i.eq(a.index).addClass(u),setTimeout(function(){i.eq(o).addClass(d),i.eq(a.index).addClass(d)},50)):(n.addIndex(t),i.eq(a.index).addClass(f),setTimeout(function(){i.eq(o).addClass(c),i.eq(a.index).addClass(c)},50)),setTimeout(function(){i.removeClass(s+" "+u+" "+f+" "+c+" "+d),i.eq(a.index).addClass(s),n.haveSlide=!1},350),n.elemInd.find("li").eq(a.index).addClass(s).siblings().removeClass(s),n.haveSlide=!0,e={index:a.index,prevIndex:o,item:i.eq(a.index)},"function"==typeof a.change&&a.change(e),layui.event.call(this,l,"change("+r+")",e))},t.prototype.events=function(){var i,a,o=this,e=o.config;e.elem.data("haveEvents")||(e.elem.on("mouseenter touchstart",function(){"always"!==o.config.autoplay&&clearInterval(o.timer)}).on("mouseleave touchend",function(){"always"!==o.config.autoplay&&o.autoplay()}),i=e.elem,a="updown"===e.anim,r.touchSwipe(i,{onTouchEnd:function(e,t){var n=Date.now()-t.timeStart,t=a?t.distanceY:t.distanceX;(.25i[a?"height":"width"]()/3)&&o.slide(0e.length&&(e.value=e.length),parseInt(e.value)===e.value||e.half||(e.value=Math.ceil(e.value)-e.value<.5?Math.ceil(e.value):Math.floor(e.value)),'
          "),a=1;a<=e.length;a++){var o='
        • ";e.half&&parseInt(e.value)!==e.value&&a==Math.ceil(e.value)?i=i+'
        • ":i+=o}i+="
        "+(e.text?''+e.value+"星":"")+"";var r=(t=e.elem).next(".layui-rate");r[0]&&r.remove(),this.elemTemp=l(i),e.span=this.elemTemp.next("span"),e.setText&&e.setText(e.value),t.html(this.elemTemp),t.addClass("layui-inline"),e.readonly||this.action()},t.prototype.setvalue=function(e){this.config.value=e,this.render()},t.prototype.action=function(){var o=this.config,i=this.elemTemp,a=i.find("i").width(),n=i.children("li");n.each(function(e){var t=e+1,n=l(this);n.on("click",function(e){o.value=t,o.half&&e.pageX-l(this).offset().left<=a/2&&(o.value=o.value-.5),o.text&&i.next("span").text(o.value+"星"),o.choose&&o.choose(o.value),o.setText&&o.setText(o.value)}),n.on("mousemove",function(e){i.find("i").each(function(){l(this).addClass(d).removeClass(f)}),i.find("i:lt("+t+")").each(function(){l(this).addClass(u).removeClass(p)}),o.half&&e.pageX-l(this).offset().left<=a/2&&n.children("i").addClass(r).removeClass(u)}),n.on("mouseleave",function(){i.find("i").each(function(){l(this).addClass(d).removeClass(f)}),i.find("i:lt("+Math.floor(o.value)+")").each(function(){l(this).addClass(u).removeClass(p)}),o.half&&parseInt(o.value)!==o.value&&i.children("li:eq("+Math.floor(o.value)+")").children("i").addClass(r).removeClass("layui-icon-rate-solid layui-icon-rate")})}),s.touchSwipe(i,{onTouchMove:function(e,t){var a;Date.now()-t.timeStart<=200||(t=e.touches[0].pageX,e=i.width()/o.length,t=(t-i.offset().left)/e,(a=(a=(e=t%1)<=.5&&o.half?t-e+.5:Math.ceil(t))>o.length?o.length:a)<0&&(a=0),n.each(function(e){var t=l(this).children("i"),n=Math.ceil(a)-e==1,i=Math.ceil(a)>e,e=a-e==.5;i?(t.addClass(u).removeClass(p),o.half&&e&&t.addClass(r).removeClass(u)):t.addClass(d).removeClass(f),t.toggleClass("layui-rate-hover",n)}),o.value=a,o.text&&i.next("span").text(o.value+"星"),o.setText&&o.setText(o.value))},onTouchEnd:function(e,t){Date.now()-t.timeStart<=200||(i.find("i").removeClass("layui-rate-hover"),o.choose&&o.choose(o.value),o.setText&&o.setText(o.value))}})},t.prototype.events=function(){},c.render=function(e){return e=new t(e),function(){var t=this;return{setvalue:function(e){t.setvalue.call(t,e)},config:t.config}}.call(e)},e(n,c)}),layui.define("jquery",function(e){"use strict";function t(e){}var v=layui.$;t.prototype.load=function(e){var a,o,r,t,l,s,n,i,c,d,u,f,p,h,y,m=0,g=v((e=e||{}).elem);if(g[0])return l=v(e.scrollElem||document),s="mb"in e?e.mb:50,n=!("isAuto"in e)||e.isAuto,i=e.moreText||"加载更多",c=e.end||"没有更多了",d="top"===(e.direction||"bottom"),this._cleanup(g,l),u=e.scrollElem&&e.scrollElem!==document,p=v('"),g.find(".layui-flow-more")[0]||g[d?"prepend":"append"](p),h=function(e,t){var n=u?l.prop("scrollHeight"):document.documentElement.scrollHeight,i=l.scrollTop();e=v(e),p[d?"after":"before"](e),(t=0==t||null)?p.html(c):p.find("a").html(f),o=t,a=null,r&&r(),d&&(e=u?l.prop("scrollHeight"):document.documentElement.scrollHeight,1===m?l.scrollTop(e):1
        '),"function"==typeof e.done&&e.done(++m,h)})(),p.find("a").on("click.flow",function(){v(this),o||a||y()}),e.isLazyimg&&(r=this.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem,direction:e.direction})),n&&l.on("scroll.flow",function(){var n=v(this),i=n.scrollTop();t&&clearTimeout(t),!o&&g.width()&&(t=setTimeout(function(){var e=(u?n:v(window)).height(),t=u?n.prop("scrollHeight"):document.documentElement.scrollHeight;(d?i<=s:t-i-e<=s)&&!a&&y()},100))}),this},t.prototype.lazyimg=function(e){var t,s=this,c=0,d=v((e=e||{}).scrollElem||document),u=e.elem||"img",o="top"===(e.direction||"bottom"),f=e.scrollElem&&e.scrollElem!==document,p=function(t,e){var n,i=d.scrollTop(),e=i+e,a=f?t.offset().top-d.offset().top+i:t.offset().top;(o?a+t.height():a)>=i&&a<=e&&t.attr("lay-src")&&(n=t.attr("lay-src"),layui.img(n,function(){var e=s.lazyimg.elem.eq(c);t.attr("src",n).removeAttr("lay-src"),e[0]&&r(e),c++},function(){s.lazyimg.elem.eq(c),t.removeAttr("lay-src")}))},r=function(e,t){var n=(f?t||d:v(window)).height(),i=d.scrollTop(),a=i+n;if(s.lazyimg.elem=v(u),e)p(e,n);else for(var o=0;o"),preview:"Preview"},wordWrap:!0,lang:"text",highlighter:!1,langMarker:!1},O=layui.code?layui.code.index+1e4:0;e("code",function(i,e){var a,o,t,n,r,l,s,c,d,u,f,p,h,y,m,g,v,x,b,w,k,C,T,E,D={config:i=L.extend(!0,{},H,i),reload:function(e){layui.code(this.updateOptions(e))},updateOptions:function(e){return delete(e=e||{}).elem,L.extend(!0,i,e)},reloadCode:function(e){layui.code(this.updateOptions(e),"reloadCode")}},S=L(i.elem);return 1',i.ln?['
        ',A.digit(t+1)+".","
        "].join(""):"",'
        ',e||" ","
        ",""].join("")})}},n=i.code,r=function(e){return"function"==typeof i.codeParse?i.codeParse(e,i):e},"reloadCode"===e?a.children(".layui-code-wrap").html(S(r(n)).html):(l=layui.code.index=++O,a.attr("lay-code-index",l),(w=_.CDDE_DATA_CLASS in a.data())&&a.attr("class",a.data(_.CDDE_DATA_CLASS)||""),w||a.data(_.CDDE_DATA_CLASS,a.attr("class")),s={copy:{className:"file-b",title:["复制代码"],event:function(e){var t=A.unescape(r(i.code));lay.clipboard.writeText({text:t,done:function(){j.msg("已复制",{icon:1})},error:function(){j.msg("复制失败",{icon:2})}}),"function"==typeof i.onCopy&&i.onCopy(t)}}},C=a.parent("."+_.ELEM_PREVIEW),T=C.children("."+_.ELEM_TAB),E=C.children("."+_.ELEM_ITEM+"-preview"),T.remove(),E.remove(),C[0]&&a.unwrap(),i.preview&&(w="LAY-CODE-DF-"+l,y=i.layout||["code","preview"],c="iframe"===i.preview,h=L('
        '),k=L('
        '),d=L('
        '),b=L('
        '),u=L('
        '),i.id&&h.attr("id",i.id),h.addClass(i.className),k.attr("lay-filter",w),layui.each(y,function(e,t){var n=L('
      • ');0===e&&n.addClass("layui-this"),n.html(i.text[t]),d.append(n)}),L.extend(s,{full:{className:"screen-full",title:["最大化显示","还原显示"],event:function(e){var t=(e=e.elem).closest("."+_.ELEM_PREVIEW),n="layui-icon-"+this.className,i="layui-icon-screen-restore",a=this.title,o=L("html,body"),r="layui-scrollbar-hide";e.hasClass(n)?(t.addClass(_.ELEM_FULL),e.removeClass(n).addClass(i),e.attr("title",a[1]),o.addClass(r)):(t.removeClass(_.ELEM_FULL),e.removeClass(i).addClass(n),e.attr("title",a[0]),o.removeClass(r))}},window:{className:"release",title:["在新窗口预览"],event:function(e){A.openWin({content:r(i.code)})}}}),i.copy&&("array"===layui.type(i.tools)?-1===i.tools.indexOf("copy")&&i.tools.unshift("copy"):i.tools=["copy"]),u.on("click",">i",function(){var e=(t=L(this)).data("type"),t={elem:t,type:e,options:i,rawCode:i.code,finalCode:A.unescape(r(i.code))};s[e]&&"function"==typeof s[e].event&&s[e].event(t),"function"==typeof i.toolsEvent&&i.toolsEvent(t)}),i.addTools&&i.tools&&(i.tools=[].concat(i.tools,i.addTools)),layui.each(i.tools,function(e,t){var n="object"==typeof t,i=n?t:s[t]||{className:t,title:[t]},a=i.className||i.type,o=i.title||[""];(n=n?i.type||a:t)&&(s[n]||((t={})[n]=i,L.extend(s,t)),u.append(''))}),a.addClass(_.ELEM_ITEM).wrap(h),k.append(d),i.tools&&k.append(u),a.before(k),c&&b.html(''),f=function(e){var t=e.children("iframe")[0];c&&t?t.srcdoc=r(i.code):e.html(i.code),setTimeout(function(){"function"==typeof i.done&&i.done({container:e,options:i,render:function(){M.render(e.find(".layui-form")),I.render()}})},3)},"preview"===y[0]?(b.addClass(_.ELEM_SHOW),a.before(b),f(b)):a.addClass(_.ELEM_SHOW).after(b),i.previewStyle=[i.style,i.previewStyle].join(""),b.attr("style",i.previewStyle),I.on("tab("+w+")",function(e){var t=L(this),n=L(e.elem).closest("."+_.ELEM_PREVIEW).find("."+_.ELEM_ITEM),e=n.eq(e.index);n.removeClass(_.ELEM_SHOW),e.addClass(_.ELEM_SHOW),"preview"===t.attr("lay-id")&&f(e),x()})),p=L(''),a.addClass((h=["layui-code-view layui-border-box"],i.wordWrap||h.push("layui-code-nowrap"),h.join(" "))),(k=i.theme||i.skin)&&(a.removeClass("layui-code-theme-dark layui-code-theme-light"),a.addClass("layui-code-theme-"+k)),i.highlighter&&a.addClass([i.highlighter,"language-"+i.lang,"layui-code-hl"].join(" ")),y=S(i.encode?A.escape(r(n)):n),m=y.lines,a.html(p.html(y.html)),i.ln&&a.append('
        '),i.height&&p.css("max-height",i.height),i.codeStyle=[i.style,i.codeStyle].join(""),i.codeStyle&&p.attr("style",function(e,t){return(t||"")+i.codeStyle}),g=[{selector:">.layui-code-wrap>.layui-code-line{}",setValue:function(e,t){e.style["padding-left"]=t+"px"}},{selector:">.layui-code-wrap>.layui-code-line>.layui-code-line-number{}",setValue:function(e,t){e.style.width=t+"px"}},{selector:">.layui-code-ln-side{}",setValue:function(e,t){e.style.width=t+"px"}}],v=lay.style({target:a[0],id:"DF-code-"+l,text:L.map(L.map(g,function(e){return e.selector}),function(e,t){return['.layui-code-view[lay-code-index="'+l+'"]',e].join(" ")}).join("")}),x=function e(){var t,n;return i.ln&&(t=Math.floor(m.length/100),n=p.children("."+_.ELEM_LINE).last().children("."+_.ELEM_LINE_NUM).outerWidth(),a.addClass(_.ELEM_LN_MODE),t)&&_.LINE_RAW_WIDTH
      • ')).html(i.title||i.text.code),a.prepend(b)),w=L('
        '),i.copy&&!i.preview&&((k=L(['','',""].join(""))).on("click",function(){s.copy.event()}),w.append(k)),i.langMarker&&w.append(''+i.lang+""),i.about&&w.append(i.about),a.append(w),i.preview||setTimeout(function(){"function"==typeof i.done&&i.done({})},3),i.elem.length===1+l&&"function"==typeof i.allDone&&i.allDone())),D})}),layui["layui.all"]||layui.addcss("modules/code.css?v=6","skincodecss");