4 lines
49 KiB
JavaScript
4 lines
49 KiB
JavaScript
/* layer 3.5.1 && Zepto v1.2.0 && $.iframeWindow - MIT Licensed, Source: https://gitee.com/thinkgem/jeesite5/tree/master/common/src/main/resources/static/layer */ !function(t,e){"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t)}(this,function(t){var e=function(){function $(t){return null==t?String(t):S[C.call(t)]||"object"}function F(t){return"function"==$(t)}function k(t){return null!=t&&t==t.window}function M(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function R(t){return"object"==$(t)}function Z(t){return R(t)&&!k(t)&&Object.getPrototypeOf(t)==Object.prototype}function z(t){var e=!!t&&"length"in t&&t.length,n=r.type(t);return"function"!=n&&!k(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function q(t){return a.call(t,function(t){return null!=t})}function H(t){return t.length>0?r.fn.concat.apply([],t):t}function I(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function V(t){return t in l?l[t]:l[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function _(t,e){return"number"!=typeof e||h[I(t)]?e:e+"px"}function B(t){var e,n;return c[t]||(e=f.createElement(t),f.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),c[t]=n),c[t]}function U(t){return"children"in t?u.call(t.children):r.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function X(t,e){var n,r=t?t.length:0;for(n=0;r>n;n++)this[n]=t[n];this.length=r,this.selector=e||""}function J(t,r,i){for(n in r)i&&(Z(r[n])||L(r[n]))?(Z(r[n])&&!Z(t[n])&&(t[n]={}),L(r[n])&&!L(t[n])&&(t[n]=[]),J(t[n],r[n],i)):r[n]!==e&&(t[n]=r[n])}function W(t,e){return null==e?r(t):r(t).filter(e)}function Y(t,e,n,r){return F(e)?e.call(t,n,r):e}function G(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function K(t,n){var r=t.className||"",i=r&&r.baseVal!==e;return n===e?i?r.baseVal:r:void(i?r.baseVal=n:t.className=n)}function Q(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?r.parseJSON(t):t):t}catch(e){return t}}function tt(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)tt(t.childNodes[n],e)}var e,n,r,i,O,P,o=[],s=o.concat,a=o.filter,u=o.slice,f=t.document,c={},l={},h={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},p=/^\s*<(\w+|!)[^>]*>/,d=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,v=/([A-Z])/g,y=["val","css","html","text","data","width","height","offset"],x=["after","prepend","before","append"],b=f.createElement("table"),E=f.createElement("tr"),j={tr:f.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:E,th:E,"*":f.createElement("div")},w=/complete|loaded|interactive/,T=/^[\w-]*$/,S={},C=S.toString,N={},A=f.createElement("div"),D={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},L=Array.isArray||function(t){return t instanceof Array};return N.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=A).appendChild(t),r=~N.qsa(i,e).indexOf(t),o&&A.removeChild(t),r},O=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return a.call(t,function(e,n){return t.indexOf(e)==n})},N.fragment=function(t,n,i){var o,s,a;return d.test(t)&&(o=r(f.createElement(RegExp.$1))),o||(t.replace&&(t=t.replace(m,"<$1></$2>")),n===e&&(n=p.test(t)&&RegExp.$1),n in j||(n="*"),a=j[n],a.innerHTML=""+t,o=r.each(u.call(a.childNodes),function(){a.removeChild(this)})),Z(i)&&(s=r(o),r.each(i,function(t,e){y.indexOf(t)>-1?s[t](e):s.attr(t,e)})),o},N.Z=function(t,e){return new X(t,e)},N.isZ=function(t){return t instanceof N.Z},N.init=function(t,n){var i;if(!t)return N.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&p.test(t))i=N.fragment(t,RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}else{if(F(t))return r(f).ready(t);if(N.isZ(t))return t;if(L(t))i=q(t);else if(R(t))i=[t],t=null;else if(p.test(t))i=N.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==e)return r(n).find(t);i=N.qsa(f,t)}}return N.Z(i,t)},r=function(t,e){return N.init(t,e)},r.extend=function(t){var e,n=u.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){J(t,n,e)}),t},N.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=T.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:u.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},r.contains=f.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},r.type=$,r.isFunction=F,r.isWindow=k,r.isArray=L,r.isPlainObject=Z,r.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},r.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},r.inArray=function(t,e,n){return o.indexOf.call(e,t,n)},r.camelCase=O,r.trim=function(t){return null==t?"":String.prototype.trim.call(t)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(t,e){var n,i,o,r=[];if(z(t))for(i=0;i<t.length;i++)n=e(t[i],i),null!=n&&r.push(n);else for(o in t)n=e(t[o],o),null!=n&&r.push(n);return H(r)},r.each=function(t,e){var n,r;if(z(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},r.grep=function(t,e){return a.call(t,e)},t.JSON&&(r.parseJSON=JSON.parse),r.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){S["[object "+e+"]"]=e.toLowerCase()}),r.fn={constructor:N.Z,length:0,forEach:o.forEach,reduce:o.reduce,push:o.push,sort:o.sort,splice:o.splice,indexOf:o.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=N.isZ(e)?e.toArray():e;return s.apply(N.isZ(this)?this.toArray():this,n)},map:function(t){return r(r.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return r(u.apply(this,arguments))},ready:function(t){return w.test(f.readyState)&&f.body?t(r):f.addEventListener("DOMContentLoaded",function(){t(r)},!1),this},get:function(t){return t===e?u.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return o.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return F(t)?this.not(this.not(t)):r(a.call(this,function(e){return N.matches(e,t)}))},add:function(t,e){return r(P(this.concat(r(t,e))))},is:function(t){return this.length>0&&N.matches(this[0],t)},not:function(t){var n=[];if(F(t)&&t.call!==e)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):z(t)&&F(t.item)?u.call(t):r(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return r(n)},has:function(t){return this.filter(function(){return R(t)?r.contains(this,t):r(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!R(t)?t:r(t)},last:function(){var t=this[this.length-1];return t&&!R(t)?t:r(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?r(t).filter(function(){var t=this;return o.some.call(n,function(e){return r.contains(e,t)})}):1==this.length?r(N.qsa(this[0],t)):this.map(function(){return N.qsa(this,t)}):r()},closest:function(t,e){var n=[],i="object"==typeof t&&r(t);return this.each(function(r,o){for(;o&&!(i?i.indexOf(o)>=0:N.matches(o,t));)o=o!==e&&!M(o)&&o.parentNode;o&&n.indexOf(o)<0&&n.push(o)}),r(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=r.map(n,function(t){return(t=t.parentNode)&&!M(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return W(e,t)},parent:function(t){return W(P(this.pluck("parentNode")),t)},children:function(t){return W(this.map(function(){return U(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||u.call(this.childNodes)})},siblings:function(t){return W(this.map(function(t,e){return a.call(U(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return r.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=B(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=F(t);if(this[0]&&!e)var n=r(t).get(0),i=n.parentNode||this.length>1;return this.each(function(o){r(this).wrapAll(e?t.call(this,o):i?n.cloneNode(!0):n)})},wrapAll:function(t){if(this[0]){r(this[0]).before(t=r(t));for(var e;(e=t.children()).length;)t=e.first();r(t).append(this)}return this},wrapInner:function(t){var e=F(t);return this.each(function(n){var i=r(this),o=i.contents(),s=e?t.call(this,n):t;o.length?o.wrapAll(s):i.append(s)})},unwrap:function(){return this.parent().each(function(){r(this).replaceWith(r(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var n=r(this);(t===e?"none"==n.css("display"):t)?n.show():n.hide()})},prev:function(t){return r(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return r(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;r(this).empty().append(Y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=Y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,r){var i;return"string"!=typeof t||1 in arguments?this.each(function(e){if(1===this.nodeType)if(R(t))for(n in t)G(this,n,t[n]);else G(this,t,Y(this,r,e,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:e},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){G(this,t)},this)})},prop:function(t,e){return t=D[t]||t,1 in arguments?this.each(function(n){this[t]=Y(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=D[t]||t,this.each(function(){delete this[t]})},data:function(t,n){var r="data-"+t.replace(v,"-$1").toLowerCase(),i=1 in arguments?this.attr(r,n):this.attr(r);return null!==i?Q(i):e},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=Y(this,t,e,this.value)})):this[0]&&(this[0].multiple?r(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=r(this),i=Y(this,e,t,n.offset()),o=n.offsetParent().offset(),s={top:i.top-o.top,left:i.left-o.left};"static"==n.css("position")&&(s.position="relative"),n.css(s)});if(!this.length)return null;if(f.documentElement!==this[0]&&!r.contains(f.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,e){if(arguments.length<2){var i=this[0];if("string"==typeof t){if(!i)return;return i.style[O(t)]||getComputedStyle(i,"").getPropertyValue(t)}if(L(t)){if(!i)return;var o={},s=getComputedStyle(i,"");return r.each(t,function(t,e){o[e]=i.style[O(e)]||s.getPropertyValue(e)}),o}}var a="";if("string"==$(t))e||0===e?a=I(t)+":"+_(t,e):this.each(function(){this.style.removeProperty(I(t))});else for(n in t)t[n]||0===t[n]?a+=I(n)+":"+_(n,t[n])+";":this.each(function(){this.style.removeProperty(I(n))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(r(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?o.some.call(this,function(t){return this.test(K(t))},V(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){i=[];var n=K(this),o=Y(this,t,e,n);o.split(/\s+/g).forEach(function(t){r(this).hasClass(t)||i.push(t)},this),i.length&&K(this,n+(n?" ":"")+i.join(" "))}}):this},removeClass:function(t){return this.each(function(n){if("className"in this){if(t===e)return K(this,"");i=K(this),Y(this,t,n,i).split(/\s+/g).forEach(function(t){i=i.replace(V(t)," ")}),K(this,i.trim())}})},toggleClass:function(t,n){return t?this.each(function(i){var o=r(this),s=Y(this,t,i,K(this));s.split(/\s+/g).forEach(function(t){(n===e?!o.hasClass(t):n)?o.addClass(t):o.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=g.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(r(t).css("margin-top"))||0,n.left-=parseFloat(r(t).css("margin-left"))||0,i.top+=parseFloat(r(e[0]).css("border-top-width"))||0,i.left+=parseFloat(r(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||f.body;t&&!g.test(t.nodeName)&&"static"==r(t).css("position");)t=t.offsetParent;return t})}},r.fn.detach=r.fn.remove,["width","height"].forEach(function(t){var n=t.replace(/./,function(t){return t[0].toUpperCase()});r.fn[t]=function(i){var o,s=this[0];return i===e?k(s)?s["inner"+n]:M(s)?s.documentElement["scroll"+n]:(o=this.offset())&&o[t]:this.each(function(e){s=r(this),s.css(t,Y(this,i,e,s[t]()))})}}),x.forEach(function(n,i){var o=i%2;r.fn[n]=function(){var n,a,s=r.map(arguments,function(t){var i=[];return n=$(t),"array"==n?(t.forEach(function(t){return t.nodeType!==e?i.push(t):r.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(N.fragment(t)))}),i):"object"==n||null==t?t:N.fragment(t)}),u=this.length>1;return s.length<1?this:this.each(function(e,n){a=o?n:n.parentNode,n=0==i?n.nextSibling:1==i?n.firstChild:2==i?n:null;var c=r.contains(f.documentElement,a);s.forEach(function(e){if(u)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,n),c&&tt(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},r.fn[o?n+"To":"insert"+(i?"Before":"After")]=function(t){return r(t)[n](this),this}}),N.Z.prototype=X.prototype=r.fn,N.uniq=P,N.deserializeValue=Q,r.zepto=N,r}();return t.Zepto=e,void 0===t.$&&(t.$=e),function(e){function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,r){if(e=d(e),e.ns)var i=m(e.ns);return(a[h(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||i.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!r||t.sel==r)})}function d(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function g(t,e){return t.del&&!f&&t.e in c||!!e}function v(t){return l[t]||f&&c[t]||t}function y(t,n,i,o,s,u,f){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(i);var a=d(n);a.fn=i,a.sel=s,a.e in l&&(i=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?a.fn.apply(this,arguments):void 0}),a.del=u;var c=u||i;a.proxy=function(e){if(e=T(e),!e.isImmediatePropagationStopped()){e.data=o;var n=c.apply(t,e._args==r?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(v(a.e),a.proxy,g(a,f))})}function x(t,e,n,r,i){var o=h(t);(e||"").split(/\s/).forEach(function(e){p(t,e,n,r).forEach(function(e){delete a[o][e.i],"removeEventListener"in t&&t.removeEventListener(v(e.e),e.proxy,g(e,i))})})}function T(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(w,function(e,r){var i=n[e];t[e]=function(){return this[r]=b,i&&i.apply(n,arguments)},t[r]=E}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==r?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=b)),t}function S(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===r||(n[e]=t[e]);return T(n,t)}var r,n=1,i=Array.prototype.slice,o=e.isFunction,s=function(t){return"string"==typeof t},a={},u={},f="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",e.event={add:y,remove:x},e.proxy=function(t,n){var r=2 in arguments&&i.call(arguments,2);if(o(t)){var a=function(){return t.apply(n,r?r.concat(i.call(arguments)):arguments)};return a._zid=h(t),a}if(s(n))return r?(r.unshift(t[n],t),e.proxy.apply(null,r)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var b=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,w={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,u,f){var c,l,h=this;return t&&!s(t)?(e.each(t,function(t,e){h.on(t,n,a,e,f)}),h):(s(n)||o(u)||u===!1||(u=a,a=n,n=r),(u===r||a===!1)&&(u=a,a=r),u===!1&&(u=E),h.each(function(r,o){f&&(c=function(t){return x(o,t.type,u),u.apply(this,arguments)}),n&&(l=function(t){var r,s=e(t.target).closest(n,o).get(0);return s&&s!==o?(r=e.extend(S(t),{currentTarget:s,liveFired:o}),(c||u).apply(s,[r].concat(i.call(arguments,1)))):void 0}),y(o,t,u,a,n,l||c)}))},e.fn.off=function(t,n,i){var a=this;return t&&!s(t)?(e.each(t,function(t,e){a.off(t,n,e)}),a):(s(n)||o(i)||i===!1||(i=n,n=r),i===!1&&(i=E),a.each(function(){x(this,t,i,n)}))},e.fn.trigger=function(t,n){return t=s(t)||e.isPlainObject(t)?e.Event(t):T(t),t._args=n,this.each(function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var r,i;return this.each(function(o,a){r=S(s(t)?e.Event(t):t),r._args=n,r.target=a,e.each(p(a,t.type||t),function(t,e){return i=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),i},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){s(t)||(e=t,t=e.type);var n=document.createEvent(u[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),T(n)}}(e),function(e){function p(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function d(t,e,n,i){return t.global?p(e||r,n,i):void 0}function m(t){t.global&&0===e.active++&&d(t,null,"ajaxStart")}function g(t){t.global&&!--e.active&&d(t,null,"ajaxStop")}function v(t,e){var n=e.context;return e.beforeSend.call(n,t,e)===!1||d(e,n,"ajaxBeforeSend",[t,e])===!1?!1:void d(e,n,"ajaxSend",[t,e])}function y(t,e,n,r){var i=n.context,o="success";n.success.call(i,t,o,e),r&&r.resolveWith(i,[t,o,e]),d(n,i,"ajaxSuccess",[e,n,t]),b(o,e,n)}function x(t,e,n,r,i){var o=r.context;r.error.call(o,n,e,t),i&&i.rejectWith(o,[n,e,t]),d(r,o,"ajaxError",[n,r,t||e]),b(e,n,r)}function b(t,e,n){var r=n.context;n.complete.call(r,e,t),d(n,r,"ajaxComplete",[e,n]),g(n)}function E(t,e,n){if(n.dataFilter==j)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function j(){}function w(t){return t&&(t=t.split(";",2)[0]),t&&(t==c?"html":t==f?"json":a.test(t)?"script":u.test(t)&&"xml")||"text"}function T(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function S(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=T(t.url,t.data),t.data=void 0)}function C(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function O(t,n,r,i){var o,s=e.isArray(n),a=e.isPlainObject(n);e.each(n,function(n,u){o=e.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?t.add(u.name,u.value):"array"==o||!r&&"object"==o?O(t,u,r,n):t.add(n,u)})}var i,o,n=+new Date,r=t.document,s=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,a=/^(?:text|application)\/javascript/i,u=/^(?:text|application)\/xml/i,f="application/json",c="text/html",l=/^\s*$/,h=r.createElement("a");h.href=t.location.href,e.active=0,e.ajaxJSONP=function(i,o){if(!("type"in i))return e.ajax(i);var c,p,s=i.jsonpCallback,a=(e.isFunction(s)?s():s)||"Zepto"+n++,u=r.createElement("script"),f=t[a],l=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:l};return o&&o.promise(h),e(u).on("load error",function(n,r){clearTimeout(p),e(u).off().remove(),"error"!=n.type&&c?y(c[0],h,i,o):x(null,r||"error",h,i,o),t[a]=f,c&&e.isFunction(f)&&f(c[0]),f=c=void 0}),v(h,i)===!1?(l("abort"),h):(t[a]=function(){c=arguments},u.src=i.url.replace(/\?(.+)=\?/,"?$1="+a),r.head.appendChild(u),i.timeout>0&&(p=setTimeout(function(){l("timeout")},i.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:j,success:j,error:j,complete:j,context:null,global:!0,xhr:function(){return new t.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:f,xml:"application/xml, text/xml",html:c,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:j},e.ajax=function(n){var u,f,s=e.extend({},n||{}),a=e.Deferred&&e.Deferred();for(i in e.ajaxSettings)void 0===s[i]&&(s[i]=e.ajaxSettings[i]);m(s),s.crossDomain||(u=r.createElement("a"),u.href=s.url,u.href=u.href,s.crossDomain=h.protocol+"//"+h.host!=u.protocol+"//"+u.host),s.url||(s.url=t.location.toString()),(f=s.url.indexOf("#"))>-1&&(s.url=s.url.slice(0,f)),S(s);var c=s.dataType,p=/\?.+=\?/.test(s.url);if(p&&(c="jsonp"),s.cache!==!1&&(n&&n.cache===!0||"script"!=c&&"jsonp"!=c)||(s.url=T(s.url,"_="+Date.now())),"jsonp"==c)return p||(s.url=T(s.url,s.jsonp?s.jsonp+"=?":s.jsonp===!1?"":"callback=?")),e.ajaxJSONP(s,a);var P,d=s.accepts[c],g={},b=function(t,e){g[t.toLowerCase()]=[t,e]},C=/^([\w-]+:)\/\//.test(s.url)?RegExp.$1:t.location.protocol,N=s.xhr(),O=N.setRequestHeader;if(a&&a.promise(N),s.crossDomain||b("X-Requested-With","XMLHttpRequest"),b("Accept",d||"*/*"),(d=s.mimeType||d)&&(d.indexOf(",")>-1&&(d=d.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(d)),(s.contentType||s.contentType!==!1&&s.data&&"GET"!=s.type.toUpperCase())&&b("Content-Type",s.contentType||"application/x-www-form-urlencoded"),s.headers)for(o in s.headers)b(o,s.headers[o]);if(N.setRequestHeader=b,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=j,clearTimeout(P);var t,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==C){if(c=c||w(s.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)t=N.response;else{t=N.responseText;try{t=E(t,c,s),"script"==c?(1,eval)(t):"xml"==c?t=N.responseXML:"json"==c&&(t=l.test(t)?null:e.parseJSON(t))}catch(r){n=r}if(n)return x(n,"parsererror",N,s,a)}y(t,N,s,a)}else x(N.statusText||null,N.status?"error":"abort",N,s,a)}},v(N,s)===!1)return N.abort(),x(null,"abort",N,s,a),N;var A="async"in s?s.async:!0;if(N.open(s.type,s.url,A,s.username,s.password),s.xhrFields)for(o in s.xhrFields)N[o]=s.xhrFields[o];for(o in g)O.apply(N,g[o]);return s.timeout>0&&(P=setTimeout(function(){N.onreadystatechange=j,N.abort(),x(null,"timeout",N,s,a)},s.timeout)),N.send(s.data?s.data:null),N},e.get=function(){return e.ajax(C.apply(null,arguments))},e.post=function(){var t=C.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=C.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var a,i=this,o=t.split(/\s/),u=C(t,n,r),f=u.success;return o.length>1&&(u.url=o[0],a=o[1]),u.success=function(t){i.html(a?e("<div>").html(t.replace(s,"")).find(a):t),f&&f.apply(i,arguments)},e.ajax(u),this};var N=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(t)+"="+N(n))},O(r,t,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;t.getComputedStyle=function(t,e){try{return n(t,e)}catch(r){return null}}}}(),e});
|
|
!function(g,q){var n=g.layui&&layui.define,h,m,l={getPath:function(){if(document.currentScript)var a=document.currentScript.src;else{a=document.scripts;for(var b=a.length-1,e,c=b;0<c;c--)if("interactive"===a[c].readyState){e=a[c].src;break}a=e||a[b].src}return(g.LAYUI_GLOBAL||{}).layer_dir||a.substring(0,a.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],type:["dialog","page","iframe","loading","tips"],getStyle:function(a,b){a=a.currentStyle?a.currentStyle:g.getComputedStyle(a,null);return a[a.getPropertyValue?"getPropertyValue":"getAttribute"](b)},link:function(a,b,e){if(d.path){var c=document.getElementsByTagName("head")[0],p=document.createElement("link");"string"===typeof b&&(e=b);var f=(e||a).replace(/\.|\//g,""),k="layuicss-"+f,h=0;p.rel="stylesheet";p.href=d.path+a;p.id=k;document.getElementById(k)||c.appendChild(p);"function"===typeof b&&function w(a){var c=document.getElementById(k);if(100<++h)return g.console&&console.error(f+".css: Invalid");1989===parseInt(l.getStyle(c,"width"))?("creating"===a&&c.removeAttribute("lay-status"),"creating"===c.getAttribute("lay-status")?setTimeout(w,100):b()):(c.setAttribute("lay-status","creating"),setTimeout(function(){w("creating")},100))}()}}},d={v:"3.5.1",i18n:{btnOk:"\u786e\u5b9a",btnCancel:"\u53d6\u6d88",title:"\u4fe1\u606f",promptTipA:"\u6700\u591a\u8f93\u5165",promptTipB:"\u4e2a\u5b57\u7b26",noPicture:"\u6ca1\u6709\u56fe\u7247",photoError:"\u5f53\u524d\u56fe\u7247\u5730\u5740\u5f02\u5e38<br>\u662f\u5426\u7ee7\u7eed\u67e5\u770b\u4e0b\u4e00\u5f20\uff1f",photoNextPage:"\u4e0b\u4e00\u5f20",photoClose:"\u4e0d\u770b\u4e86"},ie:function(){var a=navigator.userAgent.toLowerCase();return g.ActiveXObject||"ActiveXObject"in g?(a.match(/msie\s(\d+)/)||[])[1]||"11":!1}(),index:g.layer&&g.layer.v?1E5:0,path:l.getPath,config:function(a,b){a=a||{};d.cache=l.config=h.extend({},l.config,a);d.path=l.config.path||d.path;"string"===typeof a.extend&&(a.extend=[a.extend]);l.config.path&&d.ready();if(!a.extend)return this;n?layui.addcss("modules/layer/"+a.extend):l.link("theme/"+a.extend);return this},ready:function(a){var b=(n?"modules/layer/":"theme/")+"default/layer.css?v="+d.v;n?layui.addcss(b,a,"layer"):l.link(b,a,"layer");return this},alert:function(a,b,e){var c="function"===typeof b;c&&(e=b);return d.open(h.extend({content:a,yes:e},c?{}:b))},confirm:function(a,b,e,c){var p="function"===typeof b;p&&(c=e,e=b);return d.open(h.extend({content:a,btn:[d.i18n.btnOk,d.i18n.btnCancel],yes:e,btn2:c},p?{}:b))},msg:function(a,b,e){var c="function"===typeof b,p=l.config.skin,t=(p?p+" "+p+"-msg":"")||"layui-layer-msg";p=f.anim.length-1;c&&(e=b);return d.open(h.extend({content:a,time:3E3,shade:!1,skin:t,title:!1,closeBtn:b.time&&5E3<=b.time||!1,btn:!1,resize:!1,end:e},c&&!l.config.skin?{skin:t+" layui-layer-hui",anim:p}:function(){b=b||{};if(-1===b.icon||b.icon===q&&!l.config.skin)b.skin=t+" "+(b.skin||"layui-layer-hui");return b}()))},load:function(a,b){return d.open(h.extend({type:3,icon:a||0,resize:!1,shade:.01},b))},tips:function(a,b,e){return d.open(h.extend({type:4,content:[a,b],closeBtn:!1,time:3E3,shade:!1,resize:!1,fixed:!1,maxWidth:260},e))}},r=function(a){var b=this;b.index=++d.index;b.config.maxWidth=h(m).width()-30;b.config=h.extend({},b.config,l.config,a);document.body?b.creat():setTimeout(function(){b.creat()},30)};r.pt=r.prototype;var f="layui-layer .layui-layer-title .layui-layer-main .layui-layer-dialog layui-layer-iframe layui-layer-content layui-layer-btn layui-layer-close".split(" ");f.anim="layer-anim-00 layer-anim-01 layer-anim-02 layer-anim-03 layer-anim-04 layer-anim-05 layer-anim-06".split(" ");f.SHADE="layui-layer-shade";f.MOVE="layui-layer-move";r.pt.config={type:0,shade:.3,fixed:!0,move:f[1],title:function(){return d.i18n.title},offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,minStack:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2};r.pt.vessel=function(a,b){var e=this.index,c=this.config,p=c.zIndex+e,d="object"===typeof c.title,k=c.maxmin&&(1===c.type||2===c.type);d=c.title?'<div class="layui-layer-title" style="'+(d?c.title[1]:"")+'">'+(d?c.title[0]:"function"===typeof c.title?c.title():c.title)+"</div>":"";c.zIndex=p;b([c.shade?'<div class="'+f.SHADE+'" id="'+f.SHADE+e+'" times="'+e+'" style="z-index:'+(p-1+'; "></div>'):"",'<div class="'+f[0]+(" layui-layer-"+l.type[c.type])+(0!=c.type&&2!=c.type||c.shade?"":" layui-layer-border")+" "+(c.skin||"")+'" id="'+f[0]+e+'" type="'+l.type[c.type]+'" times="'+e+'" showtime="'+c.time+'" conType="'+(a?"object":"string")+'" style="z-index: '+p+"; width:"+c.area[0]+";height:"+c.area[1]+";position:"+(c.fixed?"fixed;":"absolute;")+'">'+(a&&2!=c.type?"":d)+'<div id="'+(c.id||"")+'" class="layui-layer-content'+(0==c.type&&-1!==c.icon?" layui-layer-padding":"")+(3==c.type?" layui-layer-loading"+c.icon:"")+'">'+(0==c.type&&-1!==c.icon?'<i class="layui-layer-ico layui-layer-ico'+c.icon+'"></i>':"")+(1==c.type&&a?"":c.content||"")+'</div><span class="layui-layer-setwin">'+function(){var a=k&&c.title?'<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>':"";c.closeBtn&&(a+='<a class="layui-layer-ico '+f[7]+" "+f[7]+(c.title?c.closeBtn:4==c.type?"1":"2")+'" href="javascript:;"></a>');return a}()+"</span>"+(c.btn?function(){var a="";"string"===typeof c.btn&&(c.btn=[c.btn]);for(var b=0,e=c.btn.length;b<e;b++)a+='<a class="'+f[6]+b+'">'+c.btn[b]+"</a>";return'<div class="'+f[6]+(c.btnAlign?" layui-layer-btn-"+(c.btnAlign||""):"")+'">'+a+"</div>"}():"")+(c.resize?'<span class="layui-layer-resize"></span>':"")+"</div>"],d,h('<div class="'+f.MOVE+'" id="'+f.MOVE+'"></div>'));return this};r.pt.creat=function(){var a=this,b=a.config,e=a.index,c=b.content,p="object"===typeof c,t=h("body");if(!b.id||!h("#"+b.id)[0]){"string"===typeof b.area&&(b.area="auto"===b.area?["",""]:[b.area,""]);b.shift&&(b.anim=b.shift);6==d.ie&&(b.fixed=!1);switch(b.type){case 0:b.btn="btn"in b?b.btn:d.i18n.btnOk;d.closeAll("dialog");break;case 2:c=b.content=p?b.content:[b.content||"","auto"];b.content='<iframe scrolling="'+(b.content[1]||"auto")+'" allowtransparency="true" id="'+f[4]+e+'" name="'+f[4]+e+'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0"></iframe><form id="'+f[4]+"-form"+e+'" action="'+b.content[0]+'" method="post" target="'+f[4]+e+'"></form>';break;case 3:delete b.title;delete b.closeBtn;-1===b.icon&&0===b.icon;d.closeAll("loading");break;case 4:p||(b.content=[b.content,"body"]),b.follow=b.content[1],b.content=b.content[0]+'<i class="layui-layer-TipsG"></i>',delete b.title,b.tips="object"===typeof b.tips?b.tips:[b.tips,!0],b.tipsMore||d.closeAll("tips")}a.vessel(p,function(d,k,g){t.append(d[0]);p?2==b.type||4==b.type?h("body").append(d[1]):c.parents("."+f[0])[0]||(c.data("display",c.css("display")).show().addClass("layui-layer-wrap").wrap(d[1]),h("#"+f[0]+e).find("."+f[5]).before(k)):t.append(d[1]);h("#"+f.MOVE)[0]||t.append(l.moveElem=g);a.layero=h("#"+f[0]+e);a.shadeo=h("#"+f.SHADE+e);b.scrollbar||f.html.css("overflow","hidden").attr("layer-full",e)}).auto(e);a.shadeo.css({"background-color":b.shade[1]||"#000",opacity:b.shade[0]||b.shade});if(2==b.type)if("GET"==b.method||"get"==b.method){var k=c[0]||"",g=b.contentFormData,n;for(n in g||{})k+=-1==k.indexOf("?")?"?":"&",k+=n+"="+g[n];a.layero.find("#"+f[4]+e).attr("src",k)}else{k=a.layero.find("#"+f[4]+"-form"+e);g=b.contentFormData;for(n in g||{})k.append('<input type="hidden" name="'+n+'" value="'+g[n]+'"/>');k.submit()}4==b.type?a.tips():function(){a.offset();parseInt(l.getStyle(document.getElementById(f.MOVE),"z-index"))||function(){a.layero.css("visibility","hidden");d.ready(function(){a.offset();a.layero.css("visibility","visible")})}()}();if(b.fixed)m.on("resize",function(){a.offset();(/^\d+%$/.test(b.area[0])||/^\d+%$/.test(b.area[1]))&&a.auto(e);4==b.type&&a.tips()});0>=b.time||setTimeout(function(){d.close(a.index)},b.time);a.move().callback();if(f.anim[b.anim]){var q="layer-anim "+f.anim[b.anim];a.layero.addClass(q).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){h(this).removeClass(q)})}b.isOutAnim&&a.layero.data("isOutAnim",!0)}};r.pt.auto=function(a){var b=this.config,e=h("#"+f[0]+a);""===b.area[0]&&0<b.maxWidth&&(d.ie&&8>d.ie&&b.btn&&e.width(e.width()),e.width()>b.maxWidth&&e.width(b.maxWidth));var c=[e.width(),e.height()],p=e.find(f[1]).height()||0,g=e.find("."+f[6]).height()||0;a=function(a){a=e.find(a);a.height(c[1]-p-g-2*(parseFloat(a.css("padding-top"))|0))};switch(b.type){case 2:a("iframe");break;default:""===b.area[1]?0<b.maxHeight&&e.height()>b.maxHeight?(c[1]=b.maxHeight,a("."+f[5])):b.fixed&&c[1]>=m.height()&&(c[1]=m.height(),a("."+f[5])):a("."+f[5])}return this};r.pt.offset=function(){var a=this.config,b=this.layero,e=[b.width(),b.height()],c="object"===typeof a.offset;this.offsetTop=(m.height()-e[1])/2;this.offsetLeft=(m.width()-e[0])/2;c?(this.offsetTop=a.offset[0],this.offsetLeft=a.offset[1]||this.offsetLeft):"auto"!==a.offset&&("t"===a.offset?this.offsetTop=0:"r"===a.offset?this.offsetLeft=m.width()-e[0]:"b"===a.offset?this.offsetTop=m.height()-e[1]:"l"===a.offset?this.offsetLeft=0:"lt"===a.offset?this.offsetLeft=this.offsetTop=0:"lb"===a.offset?(this.offsetTop=m.height()-e[1],this.offsetLeft=0):"rt"===a.offset?(this.offsetTop=0,this.offsetLeft=m.width()-e[0]):"rb"===a.offset?(this.offsetTop=m.height()-e[1],this.offsetLeft=m.width()-e[0]):this.offsetTop=a.offset);a.fixed||(this.offsetTop=/%$/.test(this.offsetTop)?m.height()*parseFloat(this.offsetTop)/100:parseFloat(this.offsetTop),this.offsetLeft=/%$/.test(this.offsetLeft)?m.width()*parseFloat(this.offsetLeft)/100:parseFloat(this.offsetLeft),this.offsetTop+=m.scrollTop(),this.offsetLeft+=m.scrollLeft());b.attr("minLeft")&&(this.offsetTop=m.height()-(b.find(f[1]).height()||0),this.offsetLeft=b.css("left"));this.offsetTop=0<this.offsetTop?this.offsetTop:0;b.css({top:this.offsetTop,left:this.offsetLeft})};r.pt.tips=function(){var a=this.config,b=this.layero,e=[b.width(),b.height()],c=h(a.follow);c[0]||(c=h("body"));var d={width:c.width(),height:c.height(),top:c.offset().top,left:c.offset().left},g=b.find(".layui-layer-TipsG");c=a.tips[0];a.tips[1]||g.remove();d.autoLeft=function(){0<d.left+e[0]-m.width()?(d.tipLeft=d.left+d.width-e[0],g.css({right:12,left:"auto"})):d.tipLeft=d.left};d.where=[function(){d.autoLeft();d.tipTop=d.top-e[1]-10;g.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",a.tips[1])},function(){d.tipLeft=d.left+d.width+10;d.tipTop=d.top;g.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",a.tips[1])},function(){d.autoLeft();d.tipTop=d.top+d.height+10;g.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",a.tips[1])},function(){d.tipLeft=d.left-e[0]-10;d.tipTop=d.top;g.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",a.tips[1])}];d.where[c-1]();1===c?0>d.top-(m.scrollTop()+e[1]+16)&&d.where[2]():2===c?0<m.width()-(d.left+d.width+e[0]+16)||d.where[3]():3===c?0<d.top-m.scrollTop()+d.height+e[1]+16-m.height()&&d.where[0]():4===c&&0<e[0]+16-d.left&&d.where[1]();b.find("."+f[5]).css({"background-color":a.tips[1],"padding-right":a.closeBtn?"30px":""});b.css({left:d.tipLeft-(a.fixed?m.scrollLeft():0),top:d.tipTop-(a.fixed?m.scrollTop():0)})};r.pt.move=function(){var a=this,b=a.config,e=h(document),c=a.layero,f=c.find(b.move),g=c.find(".layui-layer-resize"),k={};b.move&&f.css("cursor","move");f.on("mousedown",function(a){a.preventDefault();b.move&&(k.moveStart=!0,k.offset=[a.clientX-parseFloat(c.css("left")),a.clientY-parseFloat(c.css("top"))],l.moveElem.css("cursor","move").show())});g.on("mousedown",function(a){a.preventDefault();k.resizeStart=!0;k.offset=[a.clientX,a.clientY];k.area=[c.width(),c.height()];l.moveElem.css("cursor","se-resize").show()});e.on("mousemove",function(e){if(k.moveStart){var f=e.clientX-k.offset[0],h=e.clientY-k.offset[1],g="fixed"===c.css("position");e.preventDefault();k.stX=g?0:m.scrollLeft();k.stY=g?0:m.scrollTop();if(!b.moveOut){g=m.width()-c.width()+k.stX;var p=m.height()-c.height()+k.stY;f<k.stX&&(f=k.stX);f>g&&(f=g);h<k.stY&&(h=k.stY);h>p&&(h=p)}c.css({left:f,top:h})}b.resize&&k.resizeStart&&(f=e.clientX-k.offset[0],h=e.clientY-k.offset[1],e.preventDefault(),d.style(a.index,{width:k.area[0]+f,height:k.area[1]+h}),k.isResize=!0,b.resizing&&b.resizing(c))}).on("mouseup",function(a){k.moveStart&&(delete k.moveStart,l.moveElem.hide(),b.moveEnd&&b.moveEnd(c));k.resizeStart&&(delete k.resizeStart,l.moveElem.hide())});return a};r.pt.callback=function(){var a=this,b=a.layero,e=a.config;a.openLayer();if(e.success)if(2==e.type)b.find("iframe").on("load",function(){e.success(b,a.index)});else e.success(b,a.index);6==d.ie&&a.IE6(b);b.find("."+f[6]).children("a").on("click",function(){var c=h(this).index();0===c?e.yes?(c=e.yes(a.index,b),!1===c||d.close(a.index)):e.btn1?(c=e.btn1(a.index,b),!1===c||d.close(a.index)):d.close(a.index):(c=e["btn"+(c+1)]&&e["btn"+(c+1)](a.index,b),!1===c||d.close(a.index))});b.find("."+f[7]).on("click",function(){!1===(e.cancel&&e.cancel(a.index,b))||d.close(a.index)});if(e.shadeClose)a.shadeo.on("click",function(){d.close(a.index)});b.find(".layui-layer-min").on("click",function(){!1===(e.min&&e.min(b,a.index))||d.min(a.index,e)});b.find(".layui-layer-max").on("click",function(){h(this).hasClass("layui-layer-maxmin")?(d.restore(a.index),e.restore&&e.restore(b,a.index)):(d.full(a.index,e),setTimeout(function(){e.full&&e.full(b,a.index)},100))});e.end&&(l.end[a.index]=e.end)};l.reselect=function(){h.each(h("select"),function(a,b){a=h(this);a.parents("."+f[0])[0]||1==a.attr("layer")&&1>h("."+f[0]).length&&a.removeAttr("layer").show()})};r.pt.IE6=function(a){h("select").each(function(a,e){a=h(this);a.parents("."+f[0])[0]||"none"===a.css("display")||a.attr({layer:"1"}).hide()})};r.pt.openLayer=function(){d.zIndex=this.config.zIndex;d.setTop=function(a){d.zIndex=parseInt(a[0].style.zIndex);a.on("mousedown",function(){d.zIndex++;a.css("z-index",d.zIndex+1)});return d.zIndex}};l.record=function(a){var b=[a.width(),a.height(),a.position().top,a.position().left+parseFloat(a.css("margin-left"))];a.find(".layui-layer-max").addClass("layui-layer-maxmin");a.attr({area:b})};l.rescollbar=function(a){f.html.attr("layer-full")==a&&(f.html[0].style.removeProperty?f.html[0].style.removeProperty("overflow"):f.html[0].style.removeAttribute("overflow"),f.html.removeAttr("layer-full"))};g.layer=d;d.$=d.Zepto=Zepto;d.window=g;d.getChildFrame=function(a,b){b=b||h("."+f[4]).attr("times");return h("#"+f[0]+b).find("iframe").contents().find(a)};d.getFrameIndex=function(a){return h("#"+a).parents("."+f[4]).attr("times")};d.iframeAuto=function(a,b){if(a){var e=document.getElementById(f[4]+a);if(e&&(e=e.contentWindow||e.contentDocument.parentWindow,e.document.body)){a=h("#"+f[0]+a);var c=a.find(f[1]).height()||0,d=a.find("."+f[6]).height()||0;e=e.document.body.scrollHeight;c=e+c+d;d=(h(g).height()-c)/2;if(0<d){var l=a.find("iframe");Math.abs(l.height()-e)<(b||9E3)&&(a.css({height:c,top:d}),l.css({height:e}))}}}};d.iframeSrc=function(a,b){h("#"+f[0]+a).find("iframe").attr("src",b)};d.iframeWindow=function(a){a=h("#"+f[0]+a).find("iframe");return 0<a.length?a[0].contentWindow:null};d.style=function(a,b,e){a=h("#"+f[0]+a);var c=a.find(".layui-layer-content"),d=a.attr("type"),g=a.find(f[1]).height()||0,k=a.find("."+f[6]).height()||0;a.attr("minLeft");d!==l.type[3]&&d!==l.type[4]&&(e||(260>=parseFloat(b.width)&&(b.width=260),64>=parseFloat(b.height)-g-k&&(b.height=64+g+k)),a.css(b),k=a.find("."+f[6]).height()||0,d===l.type[2]?a.find("iframe").css({height:parseFloat(b.height)-g-k}):c.css({height:parseFloat(b.height)-g-k-parseFloat(c.css("padding-top"))-parseFloat(c.css("padding-bottom"))}))};d.min=function(a,b){b=b||{};var e=h("#"+f[0]+a),c=h("#"+f.SHADE+a),g=e.find(f[1]).height()||0,t=e.attr("minLeft")||181*l.minIndex+"px",k=e.css("position"),n={width:180,height:g,position:"fixed",overflow:"hidden"};l.record(e);l.minLeft[0]&&(t=l.minLeft[0],l.minLeft.shift());b.minStack&&(n.left=t,n.top=m.height()-g,e.attr("minLeft")||l.minIndex++,e.attr("minLeft",t));e.attr("position",k);d.style(a,n,!0);e.find(".layui-layer-min").hide();"page"===e.attr("type")&&e.find(f[4]).hide();l.rescollbar(a);c.hide()};d.restore=function(a){var b=h("#"+f[0]+a),e=h("#"+f.SHADE+a),c=b.attr("area").split(",");b.attr("type");d.style(a,{width:parseFloat(c[0]),height:parseFloat(c[1]),top:parseFloat(c[2]),left:parseFloat(c[3]),position:b.attr("position"),overflow:"visible"},!0);b.find(".layui-layer-max").removeClass("layui-layer-maxmin");b.find(".layui-layer-min").show();"page"===b.attr("type")&&b.find(f[4]).show();l.rescollbar(a);e.show()};d.full=function(a){var b=h("#"+f[0]+a);l.record(b);f.html.attr("layer-full")||f.html.css("overflow","hidden").attr("layer-full",a);clearTimeout(e);var e=setTimeout(function(){var c="fixed"===b.css("position");d.style(a,{top:c?0:m.scrollTop(),left:c?0:m.scrollLeft(),width:m.width(),height:m.height()},!0);b.find(".layui-layer-min").hide()},100)};d.title=function(a,b){h("#"+f[0]+(b||d.index)).find(f[1]).html(a)};d.close=function(a,b){var e=h("#"+f[0]+a),c=e.attr("type");if(e[0]){var g=function(){if(c===l.type[1]&&"object"===e.attr("conType")){e.children(":not(."+f[5]+")").remove();for(var d=e.find(".layui-layer-wrap"),g=0;2>g;g++)d.unwrap();d.css("display",d.data("display")).removeClass("layui-layer-wrap")}else{if(c===l.type[2])try{d=h("#"+f[4]+a)[0],d.contentWindow.document.write(""),d.contentWindow.close(),e.find("."+f[5])[0].removeChild(d)}catch(x){}e[0].innerHTML="";e.remove()}"function"===typeof l.end[a]&&l.end[a]();delete l.end[a];"function"===typeof b&&b()};e.data("isOutAnim")&&e.addClass("layer-anim layer-anim-close");h("#layui-layer-moves, #"+f.SHADE+a).remove();6==d.ie&&l.reselect();l.rescollbar(a);e.attr("minLeft")&&(l.minIndex--,l.minLeft.push(e.attr("minLeft")));d.ie&&10>d.ie||!e.data("isOutAnim")?g():setTimeout(function(){g()},200)}};d.closeAll=function(a,b){"function"===typeof a&&(b=a,a=null);var e=h("."+f[0]);h.each(e,function(c){var f=h(this);(a?f.attr("type")===a:1)&&d.close(f.attr("times"),c===e.length-1?b:null)});0===e.length&&"function"===typeof b&&b()};var u=d.cache||{},v=function(a){return u.skin?" "+u.skin+" "+u.skin+"-"+a:""};d.prompt=function(a,b){var e="";a=a||{};"function"===typeof a&&(b=a);a.area&&(e=a.area,e='style="width: '+e[0]+"; height: "+e[1]+';"',delete a.area);var c;e=2==a.formType?'<textarea class="layui-layer-input"'+e+"></textarea>":'<input type="'+(1==a.formType?"password":"text")+'" class="layui-layer-input">';var f=a.success;delete a.success;return d.open(h.extend({type:1,btn:[d.i18n.btnOk,d.i18n.btnCancel],content:e,skin:"layui-layer-prompt"+v("prompt"),maxWidth:m.width(),success:function(b){c=b.find(".layui-layer-input");c.val(a.value||"").focus();"function"===typeof f&&f(b)},resize:!1,yes:function(e){var f=c.val();""===f?c.focus():f.length>(a.maxlength||500)?d.tips(d.i18n.promptTipA+(a.maxlength||500)+d.i18n.promptTipB,c,{tips:1}):b&&b(f,e,c)}},a))};d.tab=function(a){a=a||{};var b=a.tab||{},e=a.success;delete a.success;return d.open(h.extend({type:1,skin:"layui-layer-tab"+v("tab"),resize:!1,title:function(){var a=b.length,d=1,e="";if(0<a)for(e='<span class="layui-this">'+b[0].title+"</span>";d<a;d++)e+="<span>"+b[d].title+"</span>";return e}(),content:'<ul class="layui-layer-tabmain">'+function(){var a=b.length,d=1,e="";if(0<a)for(e='<li class="layui-layer-tabli layui-this">'+(b[0].content||"no content")+"</li>";d<a;d++)e+='<li class="layui-layer-tabli">'+(b[d].content||"no content")+"</li>";return e}()+"</ul>",success:function(b){var c=b.find(".layui-layer-title").children(),d=b.find(".layui-layer-tabmain").children();c.on("mousedown",function(b){b.stopPropagation?b.stopPropagation():b.cancelBubble=!0;b=h(this);var c=b.index();b.addClass("layui-this").siblings().removeClass("layui-this");d.eq(c).show().siblings().hide();"function"===typeof a.change&&a.change(c)});"function"===typeof e&&e(b)}},a))};d.photos=function(a,b,e){var c={};a=a||{};if(a.photos){var f=!("string"===typeof a.photos||a.photos instanceof h),l=f?a.photos:{},k=l.data||[],m=l.start||0;c.imgIndex=(m|0)+1;a.img=a.img||"img";var n=a.success;delete a.success;if(!f){var q=h(a.photos),r=function(){k=[];q.find(a.img).each(function(a){var b=h(this);b.attr("layer-index",a);k.push({alt:b.attr("alt"),pid:b.attr("layer-pid"),src:b.attr("layer-src")||b.attr("src"),thumb:b.attr("src")})})};r();if(0===k.length)return;b||q.on("click",a.img,function(){r();var b=h(this).attr("layer-index");d.photos(h.extend(a,{photos:{start:b,data:k,tab:a.tab},full:a.full}),!0)});if(!b)return}else if(0===k.length)return d.msg(d.i18n.noPicture);c.imgprev=function(a){c.imgIndex--;1>c.imgIndex&&(c.imgIndex=k.length);c.tabimg(a)};c.imgnext=function(a,b){c.imgIndex++;if(c.imgIndex>k.length&&(c.imgIndex=1,b))return;c.tabimg(a)};c.keyup=function(a){if(!c.end){var b=a.keyCode;a.preventDefault();37===b?c.imgprev(!0):39===b?c.imgnext(!0):27===b&&d.close(c.index)}};c.tabimg=function(b){if(!(1>=k.length))return l.start=c.imgIndex-1,d.close(c.index),d.photos(a,!0,b)};c.event=function(){c.bigimg.find(".layui-layer-imgprev").on("click",function(a){a.preventDefault();c.imgprev(!0)});c.bigimg.find(".layui-layer-imgnext").on("click",function(a){a.preventDefault();c.imgnext(!0)});h(document).on("keyup",c.keyup)};c.loadi=d.load(1,{shade:"shade"in a?!1:.9,scrollbar:!1});(function(a,b,c){var d=new Image;d.src=a;if(d.complete)return b(d);d.onload=function(){d.onload=null;b(d)};d.onerror=function(a){d.onerror=null;c(a)}})(k[m].src,function(b){d.close(c.loadi);e&&(a.anim=-1);c.index=d.open(h.extend({type:1,id:"layui-layer-photos",area:function(){var c=[b.width,b.height],d=[h(g).width()-100,h(g).height()-100];!a.full&&(c[0]>d[0]||c[1]>d[1])&&(d=[c[0]/d[0],c[1]/d[1]],d[0]>d[1]?(c[0]/=d[0],c[1]/=d[0]):d[0]<d[1]&&(c[0]/=d[1],c[1]/=d[1]));return[c[0]+"px",c[1]+"px"]}(),title:!1,shade:.9,shadeClose:!0,closeBtn:!1,move:".layui-layer-phimg img",moveType:1,scrollbar:!1,moveOut:!0,anim:5,isOutAnim:!1,skin:"layui-layer-photos"+v("photos"),content:'<div class="layui-layer-phimg"><img src="'+k[m].src+'" alt="'+(k[m].alt||"")+'" layer-pid="'+k[m].pid+'">'+(1<k.length?'<div class="layui-layer-imgsee"><span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span><div class="layui-layer-imgbar" style="display:'+(e?"block":"")+'"><span class="layui-layer-imgtit"><a href="javascript:;">'+(k[m].alt||"")+"</a><em>"+c.imgIndex+" / "+k.length+"</em></span></div></div>":"")+"</div>",success:function(b,d){c.bigimg=b.find(".layui-layer-phimg");c.imgsee=b.find(".layui-layer-imgbar");c.event(b);a.tab&&a.tab(k[m],b);"function"===typeof n&&n(b)},end:function(){c.end=!0;h(document).off("keyup",c.keyup)}},a))},function(){d.close(c.loadi);d.msg(d.i18n.photoError,{time:3E4,btn:[d.i18n.photoNextPage,d.i18n.photoClose],yes:function(){1<k.length&&c.imgnext(!0,!0)}})})}};l.run=function(a){h=a;m=h(g);f.html=h("html");d.open=function(a){return(new r(a)).index}};g.layui&&layui.define?(d.ready(),layui.define("Zepto",function(a){d.path=layui.cache.dir;l.run(layui.$);g.layer=d;a("layer",d)})):"function"===typeof define&&define.amd?define(["Zepto"],function(){l.run(g.Zepto);return d}):(d.ready(),l.run(g.Zepto))}(window);window.jeesite={};
|
|
!function(a){a.fn.iframeWindow=function(){var b=a(this).find("iframe");return b.length>0?b[0].contentWindow:null}}(Zepto);
|