!function(h){function t(e){var t=this;t.index=++g.index,t.config=m.extend({},t.config,d.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)}var m,f,e,i,n=h.layui&&layui.define,d={getPath:(i=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;0'+(s?a.title[0]:a.title)+"":"";return a.zIndex=o,t([a.shade?'
':"",'
'+(e&&2!=a.type?"":l)+'
'+(0==a.type&&-1!==a.icon?'':"")+((1!=a.type||!e)&&a.content||"")+'
'+(i=r?'':"",a.closeBtn&&(i+=''),i)+""+(a.btn?function(){var e="";"string"==typeof a.btn&&(a.btn=[a.btn]);for(var t=0,i=a.btn.length;t'+a.btn[t]+"";return'
'+e+"
"}():"")+(a.resize?'':"")+"
"],l,m('
')),this},t.pt.creat=function(){var e,n=this,a=n.config,o=n.index,s="object"==typeof(l=a.content),r=m("body");if(!a.id||!m("#"+a.id)[0]){switch("string"==typeof a.area&&(a.area="auto"===a.area?["",""]:[a.area,""]),a.shift&&(a.anim=a.shift),6==g.ie&&(a.fixed=!1),a.type){case 0:a.btn="btn"in a?a.btn:d.btn[0],g.closeAll("dialog");break;case 2:var l=a.content=s?a.content:[a.content||"http://layer.layui.com","auto"];a.content='';break;case 3:delete a.title,delete a.closeBtn,-1===a.icon&&a.icon,g.closeAll("loading");break;case 4:s||(a.content=[a.content,"body"]),a.follow=a.content[1],a.content=a.content[0]+'',delete a.title,a.tips="object"==typeof a.tips?a.tips:[a.tips,!0],a.tipsMore||g.closeAll("tips")}n.vessel(s,function(e,t,i){r.append(e[0]),s?2==a.type||4==a.type?m("body").append(e[1]):l.parents("."+c[0])[0]||(l.data("display",l.css("display")).show().addClass("layui-layer-wrap").wrap(e[1]),m("#"+c[0]+o).find("."+c[5]).before(t)):r.append(e[1]),m(".layui-layer-move")[0]||r.append(d.moveElem=i),n.layero=m("#"+c[0]+o),a.scrollbar||c.html.css("overflow","hidden").attr("layer-full",o)}).auto(o),m("#layui-layer-shade"+n.index).css({"background-color":a.shade[1]||"#000",opacity:a.shade[0]||a.shade}),2==a.type&&6==g.ie&&n.layero.find("iframe").attr("src",l[0]),4==a.type?n.tips():n.offset(),a.fixed&&f.on("resize",function(){n.offset(),(/^\d+%$/.test(a.area[0])||/^\d+%$/.test(a.area[1]))&&n.auto(o),4==a.type&&n.tips()}),a.time<=0||setTimeout(function(){g.close(n.index)},a.time),n.move().callback(),c.anim[a.anim]&&(e="layer-anim "+c.anim[a.anim],n.layero.addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){m(this).removeClass(e)})),a.isOutAnim&&n.layero.data("isOutAnim",!0)}},t.pt.auto=function(e){var t=this.config,i=m("#"+c[0]+e);""===t.area[0]&&0t.maxWidth&&i.width(t.maxWidth));function n(e){(e=i.find(e)).height(a[1]-o-s-2*(0|parseFloat(e.css("padding-top"))))}var a=[i.innerWidth(),i.innerHeight()],o=i.find(c[1]).outerHeight()||0,s=i.find("."+c[6]).outerHeight()||0;switch(t.type){case 2:n("iframe");break;default:""===t.area[1]?0t.maxHeight?(a[1]=t.maxHeight,n("."+c[5])):t.fixed&&a[1]>=f.height()&&(a[1]=f.height(),n("."+c[5])):n("."+c[5])}return this},t.pt.offset=function(){var e=this,t=e.config,i=e.layero,n=[i.outerWidth(),i.outerHeight()],a="object"==typeof t.offset;e.offsetTop=(f.height()-n[1])/2,e.offsetLeft=(f.width()-n[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=f.width()-n[0]:"b"===t.offset?e.offsetTop=f.height()-n[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=f.height()-n[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=f.width()-n[0]):"rb"===t.offset?(e.offsetTop=f.height()-n[1],e.offsetLeft=f.width()-n[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?f.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?f.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=f.scrollTop(),e.offsetLeft+=f.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=f.height()-(i.find(c[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},t.pt.tips=function(){var e=this.config,t=this.layero,i=[t.outerWidth(),t.outerHeight()],n=m(e.follow);n[0]||(n=m("body"));var a={width:n.outerWidth(),height:n.outerHeight(),top:n.offset().top,left:n.offset().left},o=t.find(".layui-layer-TipsG"),s=e.tips[0];e.tips[1]||o.remove(),a.autoLeft=function(){0"+(i.value||"")+"":'',s=i.success;return delete i.success,g.open(m.extend({type:1,btn:["确定","取消"],content:o,skin:"layui-layer-prompt"+x("prompt"),maxWidth:f.width(),success:function(e){(a=e.find(".layui-layer-input")).focus(),"function"==typeof s&&s(e)},resize:!1,yes:function(e){var t=a.val();""===t?a.focus():t.length>(i.maxlength||500)?g.tips("最多输入"+(i.maxlength||500)+"个字数",a,{tips:1}):n&&n(t,e,a)}},i))},g.tab=function(a){var n=(a=a||{}).tab||{},o="layui-this",i=a.success;return delete a.success,g.open(m.extend({type:1,skin:"layui-layer-tab"+x("tab"),resize:!1,title:function(){var e=n.length,t=1,i="";if(0'+n[0].title+"";t"+n[t].title+"";return i}(),content:'
    '+function(){var e=n.length,t=1,i="";if(0'+(n[0].content||"no content")+"";t'+(n[t].content||"no content")+"";return i}()+"
",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=m(this),i=t.index();t.addClass(o).siblings().removeClass(o),n.eq(i).show().siblings().hide(),"function"==typeof a.change&&a.change(i)}),"function"==typeof i&&i(e)}},a))},g.photos=function(a,e,o){var t,i,n,s,r={};if((a=a||{}).photos){var l=a.photos.constructor===Object,c=l?a.photos:{},f=c.data||[],d=c.start||0;r.imgIndex=1+(0|d),a.img=a.img||"img";var u=a.success;if(delete a.success,l){if(0===f.length)return g.msg("没有图片")}else{var y=m(a.photos),p=function(){f=[],y.find(a.img).each(function(e){var t=m(this);t.attr("layer-index",e),f.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(p(),0===f.length)return;if(e||y.on("click",a.img,function(){var e=m(this).attr("layer-index");g.photos(m.extend(a,{photos:{start:e,data:f,tab:a.tab},full:a.full}),!0),p()}),!e)return}r.imgprev=function(e){r.imgIndex--,r.imgIndex<1&&(r.imgIndex=f.length),r.tabimg(e)},r.imgnext=function(e,t){r.imgIndex++,r.imgIndex>f.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&&g.close(r.index))},r.tabimg=function(e){if(!(f.length<=1))return c.start=r.imgIndex-1,g.close(r.index),g.photos(a,!0,e)},r.event=function(){r.bigimg.hover(function(){r.imgsee.show()},function(){r.imgsee.hide()}),r.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),r.imgprev()}),r.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),r.imgnext()}),m(document).on("keyup",r.keyup)},r.loadi=g.load(1,{shade:!("shade"in a)&&.9,scrollbar:!1}),t=f[d].src,i=function(e){var t,i,n;g.close(r.loadi),r.index=g.open(m.extend({type:1,id:"layui-layer-photos",area:(i=[e.width,e.height],n=[m(h).width()-100,m(h).height()-100],!a.full&&(i[0]>n[0]||i[1]>n[1])&&((t=[i[0]/n[0],i[1]/n[1]])[1]'+(f[d].alt||
'+(1':"")+'
'+(f[d].alt||"")+""+r.imgIndex+"/"+f.length+"
",success:function(e,t){r.bigimg=e.find(".layui-layer-phimg"),r.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),r.event(e),a.tab&&a.tab(f[d],e),"function"==typeof u&&u(e)},end:function(){r.end=!0,m(document).off("keyup",r.keyup)}},a))},n=function(){g.close(r.loadi),g.msg("当前图片地址异常
是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){1