filesbox/web/dist/design/designstatic/home/js/layer/layui/layui.all.js

7 lines
258 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(function(oe){"use strict";var x=document,_={modules:{},status:{},timeout:10,event:{}},O=function(){this.v="2.4.1"},ie=function(){var v=x.currentScript?x.currentScript.src:function(){for(var L,F=x.scripts,y=F.length-1,u=y;u>0;u--)if(F[u].readyState==="interactive"){L=F[u].src;break}return L||F[y].src}();return v.substring(0,v.lastIndexOf("/")+1)}(),G=function(v){oe.console&&console.error&&console.error("Layui hint: "+v)},A=typeof opera!="undefined"&&opera.toString()==="[object Opera]",$={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};O.prototype.cache=_,O.prototype.define=function(v,L){var F=this,y=typeof v=="function",u=function(){var h=function(c,m){layui[c]=m,_.status[c]=!0};return typeof L=="function"&&L(function(c,m){h(c,m),_.callback[c]=function(){L(h)}}),this};return y&&(L=v,v=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?u.call(F):(F.use(v,u),F)},O.prototype.use=function(v,L,F){function y(M,E){var ee=navigator.platform==="PLaySTATION 3"?/^complete$/:/^(complete|loaded)$/;(M.type==="load"||ee.test((M.currentTarget||M.srcElement).readyState))&&(_.modules[D]=E,m.removeChild(q),function s(){return++k>1e3*_.timeout/4?G(D+" is not a valid module"):void(_.status[D]?u():setTimeout(s,4))}())}function u(){F.push(layui[D]),v.length>1?h.use(v.slice(1),L,F):typeof L=="function"&&L.apply(layui,F)}var h=this,c=_.dir=_.dir?_.dir:ie,m=x.getElementsByTagName("head")[0];v=typeof v=="string"?[v]:v,window.jQuery&&jQuery.fn.on&&(h.each(v,function(M,E){E==="jquery"&&v.splice(M,1)}),layui.jquery=layui.$=jQuery);var D=v[0],k=0;if(F=F||[],_.host=_.host||(c.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],v.length===0||layui["layui.all"]&&$[D]||!layui["layui.all"]&&layui["layui.mobile"]&&$[D])return u(),h;if(_.modules[D])(function M(){return++k>1e3*_.timeout/4?G(D+" is not a valid module"):void(typeof _.modules[D]=="string"&&_.status[D]?u():setTimeout(M,4))})();else{var q=x.createElement("script"),z=($[D]?c+"lay/":/^\{\/\}/.test(h.modules[D])?"":_.base||"")+(h.modules[D]||D)+".js";z=z.replace(/^\{\/\}/,""),q.async=!0,q.charset="utf-8",q.src=z+function(){var M=_.version===!0?_.v||new Date().getTime():_.version||"";return M?"?v="+M:""}(),m.appendChild(q),!q.attachEvent||q.attachEvent.toString&&q.attachEvent.toString().indexOf("[native code")<0||A?q.addEventListener("load",function(M){y(M,z)},!1):q.attachEvent("onreadystatechange",function(M){y(M,z)}),_.modules[D]=z}return h},O.prototype.getStyle=function(v,L){var F=v.currentStyle?v.currentStyle:oe.getComputedStyle(v,null);return F[F.getPropertyValue?"getPropertyValue":"getAttribute"](L)},O.prototype.link=function(v,L,F){var y=this,u=x.createElement("link"),h=x.getElementsByTagName("head")[0];typeof L=="string"&&(F=L);var c=(F||v).replace(/\.|\//g,""),m=u.id="layuicss-"+c,D=0;return u.rel="stylesheet",u.href=v+(_.debug?"?v="+new Date().getTime():""),u.media="all",x.getElementById(m)||h.appendChild(u),typeof L!="function"||function k(){return++D>1e3*_.timeout/100?G(v+" timeout"):void(parseInt(y.getStyle(x.getElementById(m),"width"))===1989?function(){L()}():setTimeout(k,100))}(),y},_.callback={},O.prototype.factory=function(v){if(layui[v])return typeof _.callback[v]=="function"?_.callback[v]:null},O.prototype.addcss=function(v,L,F){return layui.link(_.dir+"css/"+v,L,F)},O.prototype.img=function(v,L,F){var y=new Image;return y.src=v,y.complete?L(y):(y.onload=function(){y.onload=null,typeof L=="function"&&L(y)},void(y.onerror=function(u){y.onerror=null,typeof F=="function"&&F(u)}))},O.prototype.config=function(v){v=v||{};for(var L in v)_[L]=v[L];return this},O.prototype.modules=function(){var v={};for(var L in $)v[L]=$[L];
`+($||"")),v+A}},O=_.exp,ie=function(A){this.tpl=A};ie.pt=ie.prototype,window.errors=0,ie.pt.parse=function(A,$){var v=this,L=A,F=O("^"+x.open+"#",""),y=O(x.close+"$","");A=A.replace(/\s+|\r|\t|\n/g," ").replace(O(x.open+"#"),x.open+"# ").replace(O(x.close+"}"),"} "+x.close).replace(/\\/g,"\\\\").replace(O(x.open+"!(.+?)!"+x.close),function(u){return u=u.replace(O("^"+x.open+"!"),"").replace(O("!"+x.close),"").replace(O(x.open+"|"+x.close),function(h){return h.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(_.query(),function(u){return u=u.replace(F,"").replace(y,""),'";'+u.replace(/\\/g,"")+';view+="'}).replace(_.query(1),function(u){var h='"+(';return u.replace(/\s/g,"")===x.open+x.close?"":(u=u.replace(O(x.open+"|"+x.close),""),/^=/.test(u)&&(u=u.replace(/^=/,""),h='"+_escape_('),h+u.replace(/\\/g,"")+')+"')}),A='"use strict";var view = "'+A+'";return view;';try{return v.cache=A=new Function("d, _escape_",A),A($,_.escape)}catch(u){return delete v.cache,_.error(u,L)}},ie.pt.render=function(A,$){var v,L=this;return A?(v=L.cache?L.cache(A,_.escape):L.parse(L.tpl,A),$?void $(v):v):_.error("no data")};var G=function(A){return typeof A!="string"?_.error("Template not found"):new ie(A)};G.config=function(A){A=A||{};for(var $ in A)x[$]=A[$]},G.v="1.2.0",oe("laytpl",G)}),layui.define(function(oe){"use strict";var x=document,_="getElementById",O="getElementsByTagName",ie="laypage",G="layui-disabled",A=function(v){var L=this;L.config=v||{},L.config.index=++$.index,L.render(!0)};A.prototype.type=function(){var v=this.config;if(typeof v.elem=="object")return v.elem.length===void 0?2:3},A.prototype.view=function(){var v=this,L=v.config,F=L.groups="groups"in L?0|L.groups:5;L.layout=typeof L.layout=="object"?L.layout:["prev","page","next"],L.count=0|L.count,L.curr=0|L.curr||1,L.limits=typeof L.limits=="object"?L.limits:[10,20,30,40,50],L.limit=0|L.limit||10,L.pages=Math.ceil(L.count/L.limit)||1,L.curr>L.pages&&(L.curr=L.pages),F<0?F=1:F>L.pages&&(F=L.pages),L.prev="prev"in L?L.prev:"&#x4E0A;&#x4E00;&#x9875;",L.next="next"in L?L.next:"&#x4E0B;&#x4E00;&#x9875;";var y=L.pages>F?Math.ceil((L.curr+(F>1?1:0))/(F>0?F:1)):1,u={prev:function(){return L.prev?'<a href="javascript:;" class="layui-laypage-prev'+(L.curr==1?" "+G:"")+'" data-page="'+(L.curr-1)+'">'+L.prev+"</a>":""}(),page:function(){var h=[];if(L.count<1)return"";y>1&&L.first!==!1&&F!==0&&h.push('<a href="javascript:;" class="layui-laypage-first" data-page="1" title="&#x9996;&#x9875;">'+(L.first||1)+"</a>");var c=Math.floor((F-1)/2),m=y>1?L.curr-c:1,D=y>1?function(){var k=L.curr+(F-c-1);return k>L.pages?L.pages:k}():F;for(D-m<F-1&&(m=D-F+1),L.first!==!1&&m>2&&h.push('<span class="layui-laypage-spr">&#x2026;</span>');m<=D;m++)m===L.curr?h.push('<span class="layui-laypage-curr"><em class="layui-laypage-em" '+(/^#/.test(L.theme)?'style="background-color:'+L.theme+';"':"")+"></em><em>"+m+"</em></span>"):h.push('<a href="javascript:;" data-page="'+m+'">'+m+"</a>");return L.pages>F&&L.pages>D&&L.last!==!1&&(D+1<L.pages&&h.push('<span class="layui-laypage-spr">&#x2026;</span>'),F!==0&&h.push('<a href="javascript:;" class="layui-laypage-last" title="&#x5C3E;&#x9875;" data-page="'+L.pages+'">'+(L.last||L.pages)+"</a>")),h.join("")}(),next:function(){return L.next?'<a href="javascript:;" class="layui-laypage-next'+(L.curr==L.pages?" "+G:"")+'" data-page="'+(L.curr+1)+'">'+L.next+"</a>":""}(),count:'<span class="layui-laypage-count">\u5171 '+L.count+" \u6761</span>",limit:function(){var h=['<span class="layui-laypage-limits"><select lay-ignore>'];return layui.each(L.limits,function(c,m){h.push('<option value="'+m+'"'+(m===L.limit?"selected":"")+">"+m+" \u6761/\u9875</option>")}),h.join("")+"</select></span>"}(),refresh:['<a href="javascript:;" data-page="'+L.curr+'" class="layui-laypage-refresh">','<i class="layui-icon layui-icon-refresh"></i>',"</a>"].join(""),skip:function(){return['<span class="layui-laypage-skip">&#x5230;&#x7B2C;','<input type="text" min="1" value="'+L.curr+'" class="layui-input">','&#x9875;<button type="button" class="layui-laypage-btn">&#x786e;&#x5b9a;</
`)}}):{name:t.name,value:n.replace(Yn,`\r
`)}}).get()}}),i.ajaxSettings.xhr=oe.ActiveXObject!==void 0?function(){return this.isLocal?Ee():we.documentMode>8?Me():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Me()||Ee()}:Me;var Yi=0,Jt={},Bt=i.ajaxSettings.xhr();oe.attachEvent&&oe.attachEvent("onunload",function(){for(var e in Jt)Jt[e](void 0,!0)}),ge.cors=!!Bt&&"withCredentials"in Bt,Bt=ge.ajax=!!Bt,Bt&&i.ajaxTransport(function(e){if(!e.crossDomain||ge.cors){var t;return{send:function(n,a){var r,l=e.xhr(),p=++Yi;if(l.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)l[r]=e.xhrFields[r];e.mimeType&&l.overrideMimeType&&l.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)n[r]!==void 0&&l.setRequestHeader(r,n[r]+"");l.send(e.hasContent&&e.data||null),t=function(j,B){var R,de,U;if(t&&(B||l.readyState===4))if(delete Jt[p],t=void 0,l.onreadystatechange=i.noop,B)l.readyState!==4&&l.abort();else{U={},R=l.status,typeof l.responseText=="string"&&(U.text=l.responseText);try{de=l.statusText}catch(me){de=""}R||!e.isLocal||e.crossDomain?R===1223&&(R=204):R=U.text?200:404}U&&a(R,de,U,l.getAllResponseHeaders())},e.async?l.readyState===4?oe.setTimeout(t):l.onreadystatechange=Jt[p]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return i.globalEval(e),e}}}),i.ajaxPrefilter("script",function(e){e.cache===void 0&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),i.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=we.head||i("head")[0]||we.documentElement;return{send:function(a,r){t=we.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(l,p){(p||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,p||r(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var Xn=[],mn=/(=)\?(?=&|$)|\?\?/;i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||i.expando+"_"+fn++;return this[e]=!0,e}}),i.ajaxPrefilter("json jsonp",function(e,t,n){var a,r,l,p=e.jsonp!==!1&&(mn.test(e.url)?"url":typeof e.data=="string"&&(e.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&mn.test(e.data)&&"data");if(p||e.dataTypes[0]==="jsonp")return a=e.jsonpCallback=i.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,p?e[p]=e[p].replace(mn,"$1"+a):e.jsonp!==!1&&(e.url+=(pn.test(e.url)?"&":"?")+e.jsonp+"="+a),e.converters["script json"]=function(){return l||i.error(a+" was not called"),l[0]},e.dataTypes[0]="json",r=oe[a],oe[a]=function(){l=arguments},n.always(function(){r===void 0?i(oe).removeProp(a):oe[a]=r,e[a]&&(e.jsonpCallback=t.jsonpCallback,Xn.push(a)),l&&i.isFunction(r)&&r(l[0]),l=r=void 0}),"script"}),i.parseHTML=function(e,t,n){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t,t=!1),t=t||we;var a=En.exec(e),r=!n&&[];return a?[t.createElement(a[1])]:(a=k([e],t,r),r&&r.length&&i(r).remove(),i.merge([],a.childNodes))};var Vn=i.fn.load;return i.fn.load=function(e,t,n){if(typeof e!="string"&&Vn)return Vn.apply(this,arguments);var a,r,l,p=this,j=e.indexOf(" ");return j>-1&&(a=i.trim(e.slice(j,e.length)),e=e.slice(0,j)),i.isFunction(t)?(n=t,t=void 0):t&&typeof t=="object"&&(r="POST"),p.length>0&&i.ajax({url:e,type:r||"GET",dataType:"html",data:t}).done(function(B){l=arguments,p.html(a?i("<div>").append(i.parseHTML(B)).find(a):B)}).always(n&&function(B,R){p.each(function(){n.apply(this,l||[B.responseText,R,B])})}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.filters.animated=function(e){return i.grep(i.timers,function(t){return e===t.elem}).length},i.offset={setOffset:function(e,t,n){var a,r,l,p,j,B,R,de=i.css(e,"position"),U=i(e
`+xe.join(`\r
`)}()),ae.download=(te.title||"table_"+(te.index||""))+"."+P,document.body.appendChild(ae),ae.click(),void document.body.removeChild(ae))},v.reload=function(C,b){var P=L.config[C];return b=b||{},P?(b.data&&b.data.constructor===Array&&delete P.data,v.render(x.extend(!0,{},P,b))):A.error("The ID option was not found in the table instance")},v.render=function(C){var b=new J(C);return L.call(b)},v.clearCacheKey=function(C){return C=x.extend({},C),delete C[v.config.checkName],delete C[v.config.indexName],C},v.init(),oe(F,v)}),layui.define("jquery",function(oe){"use strict";var x=layui.$,_=(layui.hint(),layui.device(),{config:{},set:function(h){var c=this;return c.config=x.extend({},c.config,h),c},on:function(h,c){return layui.onevent.call(this,O,h,c)}}),O="carousel",ie="layui-this",G=">*[carousel-item]>*",A="layui-carousel-left",$="layui-carousel-right",v="layui-carousel-prev",L="layui-carousel-next",F="layui-carousel-arrow",y="layui-carousel-ind",u=function(h){var c=this;c.config=x.extend({},c.config,_.config,h),c.render()};u.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},u.prototype.render=function(){var h=this,c=h.config;c.elem=x(c.elem),c.elem[0]&&(h.elemItem=c.elem.find(G),c.index<0&&(c.index=0),c.index>=h.elemItem.length&&(c.index=h.elemItem.length-1),c.interval<800&&(c.interval=800),c.full?c.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):c.elem.css({width:c.width,height:c.height}),c.elem.attr("lay-anim",c.anim),h.elemItem.eq(c.index).addClass(ie),h.elemItem.length<=1||(h.indicator(),h.arrow(),h.autoplay(),h.events()))},u.prototype.reload=function(h){var c=this;clearInterval(c.timer),c.config=x.extend({},c.config,h),c.render()},u.prototype.prevIndex=function(){var h=this,c=h.config,m=c.index-1;return m<0&&(m=h.elemItem.length-1),m},u.prototype.nextIndex=function(){var h=this,c=h.config,m=c.index+1;return m>=h.elemItem.length&&(m=0),m},u.prototype.addIndex=function(h){var c=this,m=c.config;h=h||1,m.index=m.index+h,m.index>=c.elemItem.length&&(m.index=0)},u.prototype.subIndex=function(h){var c=this,m=c.config;h=h||1,m.index=m.index-h,m.index<0&&(m.index=c.elemItem.length-1)},u.prototype.autoplay=function(){var h=this,c=h.config;c.autoplay&&(h.timer=setInterval(function(){h.slide()},c.interval))},u.prototype.arrow=function(){var h=this,c=h.config,m=x(['<button class="layui-icon '+F+'" lay-type="sub">'+(c.anim==="updown"?"&#xe619;":"&#xe603;")+"</button>",'<button class="layui-icon '+F+'" lay-type="add">'+(c.anim==="updown"?"&#xe61a;":"&#xe602;")+"</button>"].join(""));c.elem.attr("lay-arrow",c.arrow),c.elem.find("."+F)[0]&&c.elem.find("."+F).remove(),c.elem.append(m),m.on("click",function(){var D=x(this),k=D.attr("lay-type");h.slide(k)})},u.prototype.indicator=function(){var h=this,c=h.config,m=h.elemInd=x(['<div class="'+y+'"><ul>',function(){var D=[];return layui.each(h.elemItem,function(k){D.push("<li"+(c.index===k?' class="layui-this"':"")+"></li>")}),D.join("")}(),"</ul></div>"].join(""));c.elem.attr("lay-indicator",c.indicator),c.elem.find("."+y)[0]&&c.elem.find("."+y).remove(),c.elem.append(m),c.anim==="updown"&&m.css("margin-top",-(m.height()/2)),m.find("li").on(c.trigger==="hover"?"mouseover":c.trigger,function(){var D=x(this),k=D.index();k>c.index?h.slide("add",k-c.index):k<c.index&&h.slide("sub",c.index-k)})},u.prototype.slide=function(h,c){var m=this,D=m.elemItem,k=m.config,q=k.index,z=k.elem.attr("lay-filter");m.haveSlide||(h==="sub"?(m.subIndex(c),D.eq(k.index).addClass(v),setTimeout(function(){D.eq(q).addClass($),D.eq(k.index).addClass($)},50)):(m.addIndex(c),D.eq(k.index).addClass(L),setTimeout(function(){D.eq(q).addClass(A),D.eq(k.index).addClass(A)},50)),setTimeout(function(){D.removeClass(ie+" "+v+" "+L+" "+A+" "+$),D.eq(k.index).addClass(ie),m.haveSlide=!1},300),m.elemInd.find("li").eq(k.index).addClass(ie).siblings().removeClass(ie),m.haveSlide=!0,layui.event.call(this,O,"change("+z+")",{index:k.index,prevIndex:q,item:D.eq(k.index)}))},u.prototype.events=function(){var h=this,c=h.con