lu2
Version:
Simple and flexible UI component library based on native HTML and JavaScript
1 lines • 145 kB
JavaScript
"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self&&self,function(){var t=document,e=window;if(e.isKeyEventBind||!t.addEventListener)return{};var i=navigator.userAgent,a="windows";/Mac\sOS\sX/i.test(i)&&(a="mac");var n="chrome";void 0!==t.mozFullScreen?n="moz":void 0===t.msHidden&&void 0!==t.hidden||(n="ie");var r={windows:"moz"==n?{ctrlKey:!1,altKey:!0,shiftKey:!0}:{ctrlKey:!1,altKey:!0,shiftKey:!1},mac:{ctrlKey:!0,altKey:!0,shiftKey:!1}}[a],s=function(t,e){if(!t)return"";e=e||"x";for(var i,a="",n=0;n<t.length;n+=1)t.charCodeAt(n)>=55296&&t.charCodeAt(n)<=56319?(i=(65536+1024*(Number(t.charCodeAt(n))-55296)+Number(t.charCodeAt(n+1))-56320).toString(16),n+=1):i=t.charCodeAt(n).toString(16),a+=e+i;return a.substr(e.length)},o=null,l=function(e){if(!t.hasTipsShow){var i=t.documentElement.scrollTop||t.body.scrollTop,a=t.documentElement.scrollLeft||t.body.scrollLeft;e.forEach((function(e){if(e.clientHeight*e.clientWidth!=0){var n=e.getAttribute("accesskey"),s=[];for(var o in r)r[o]&&s.push(o);s.push(n);var l=e.getBoundingClientRect(),d=t.createElement("div");d.className="ui-kbd-tips AK_Tips",d.setAttribute("style","top:"+(l.top+i)+"px;left:"+(l.left+a)+"px;"),d.innerHTML=s.map((function(t){return"<kbd>"+t.replace("Key","")+"</kbd>"})).join("+"),t.body.appendChild(d),d.fromTarget=e}})),t.hasTipsShow=!0,o=setTimeout((function(){d()}),3e3)}},d=function(){clearTimeout(o);var e=t.querySelectorAll(".AK_Tips");[].slice.call(e).forEach((function(e){e.fromTarget&&(e.fromTarget.hasTipsShow=null),t.body.removeChild(e)})),t.hasTipsShow=null};t.addEventListener("keydown",(function(e){var i=!1,a=e.target||t.activeElement,r=a.tagName.toLowerCase();("textarea"==r||"input"==r&&0==/checkbox|radio|select|file|button|image|hidden/i.test(a.type))&&(i=!0);var o=t.querySelectorAll("a[accesskey],area[accesskey],button[accesskey],input[accesskey],label[accesskey],legend[accesskey],textarea[accesskey]");if(0!=o.length){var c=[].slice.call(o),u=c.map((function(t){return t.getAttribute("accesskey")})),h=-1;if(u.forEach((function(t,i){if(e.key&&e.key==t||e.keyIdentifier&&parseInt(e.keyIdentifier.toLowerCase().replace("u+",""),16)==parseInt(s(t),16))return h=i,!1})),0==e.altKey&&0==e.shiftKey&&0==e.ctrlKey){if(i)return;c[h]&&(setTimeout((function(){c[h].focus()}),1),e.preventDefault())}else 0==e.altKey&&1==e.shiftKey&&0==e.ctrlKey?191!=e.keyCode||i||(t.hasTipsShow?d():l(c)):!c[h]||i||"ie"!=n&&"moz"!=n||!e.altKey||e.shiftKey||e.ctrlKey||c[h].click()}})),t.addEventListener("mousedown",(function(){d()}));var c={37:"left",38:"up",39:"right",40:"down",13:"enter",9:"tab",27:"esc"},u="ui-outline",h={add:function(t){t.className=t.className+" "+u},remove:function(t){t.className&&t.className.split&&(t.className=t.className.split(/\s+/).filter((function(t){if(t!=u)return t})).join(" "))},removeAll:function(){[].slice.call(t.querySelectorAll("."+u)).forEach((function(t){h.remove(t)}))},has:function(t){return!(!t.className||!t.className.split)&&t.className.split(/\s+/).filter((function(t){if(t==u)return t})).length>0}};e.isKeyEvent=!1,t.addEventListener("keydown",(function(i){e.isKeyEvent=!0,setTimeout((function(){e.isKeyEvent=!1}),100);var a=c[i.keyCode];if(a){var n=t.activeElement;if(n&&!/body/i.test(n.tagName)){if(/^radio|checkbox$/i.test(n.type)&&"enter"==a)return n.click(),void i.preventDefault();var r=null,s=t.querySelectorAll(".ESC");"esc"==a&&s.length&&[].slice.call(s).forEach((function(e){var i=e.id;(r=i&&t.querySelector('a[data-target="'+i+'"],input[data-target="'+i+'"],button[data-target="'+i+'"]'))&&"none"!==e.style.display&&e.clientHeight>0?r.click():e==document.activeElement&&e.click&&e.click()}));var o=n.getAttribute("data-focus"),l=n.getAttribute("data-target"),d=null;if((o||l)&&(o?d=t.getElementById(o):l&&(d=t.getElementById(l)),d&&(0!=d.clientWidth||0!=d.clientHeight))){if("tab"==a){h.removeAll();var p=d;return d.getAttribute("tabindex")||(p=d.querySelector("a[href], button:not(:disabled), input:not(:disabled)")),void(p&&p.focus())}if("enter"==a){var f=d.querySelector("."+u);if(f&&o)return i.preventDefault(),void f.click();if(l)return}if("esc"==a)return r=t.querySelector('a[data-target="'+l+'"],input[data-target="'+l+'"]'),void(o?n.blur():r&&0==/ESC/.test(r.className)&&r.click());var m=[].slice.call(d.querySelectorAll("a[href], button:not(:disabled), input:not(:disabled)")),v=-1;0!=m.length&&(m.forEach((function(t,e){o?h.has(t)&&(v=e):n==t&&(v=e),h.remove(t)})),i.preventDefault(),"left"==a||"up"==a?--v<0&&(v=-1):"right"!=a&&"down"!=a||++v>m.length-1&&(v=m.length),m[v]&&(o?h.add(m[v]):m[v].focus()))}}}})),t.addEventListener("mousedown",(function(t){var e=t.target;e&&!h.has(e)&&h.removeAll()})),t.addEventListener("click",(function(i){var a=i.target,n=t.activeElement,r=a.getAttribute("tabindex")||"-1";a&&a==n&&(/^radio|checkbox$/i.test(n.type)||r>=0)&&0==e.isKeyEvent&&n.blur()})),t.addEventListener("focusin",(function(t){var i=t.target;i&&(/^javascript/.test(i.href)&&!i.getAttribute("role")&&i.setAttribute("role","button"),e.isKeyEvent&&"none"==window.getComputedStyle(i).outlineStyle&&h.add(i))})),t.addEventListener("focusout",(function(t){var e=t.target;e&&h.remove(e)})),e.isKeyEventBind=!0}(),function(t,e){var i;t.Follow=((i=function(t,e,i){var a={offsets:{x:0,y:0},safeArea:[0,0,0,0],position:"4-1",edgeAdjust:!0};for(var n in e&&"[object Object]"===Object.prototype.toString.call(e)&&(i=e,e=null),i||(i={}))void 0===i[n]&&delete i[n];var r=Object.assign({},a,i);if(!e){var s=t.getAttribute("is-follow")||t.dataset.target;if(!s)return;if(!(e=document.getElementById(s)||document.querySelector("."+s)||document.querySelector(s)))return}var o=["4-1","1-4","5-7","2-3","2-1","6-8","3-4","4-3","8-6","1-2","7-5","3-2"],l=t.dataset.offsets,d=[];r.offsets.map&&r.offsets.length?d=r.offsets:"string"==typeof r.offsets&&(d=r.offsets.trim().split(/,\s*|\s+/)),l&&!i.offsets&&(d=l.trim().split(/,\s*|\s+/)),d.length&&(r.offsets={},r.offsets.x=d[0],r.offsets.y=d[1]||d[0]);var c=t.dataset.offsetX,u=t.dataset.offsetY;c&&(r.offsets.x=c),u&&(r.offsets.y=u),r.offsets.x*=1,r.offsets.y*=1;var h=t.dataset.position,p=t.dataset.align,f=o.some((function(t){return t===p}));!h&&p&&f&&(h=p),!h||i&&i.position||(r.position=h);var m=t.dataset.edgeAdjust||r.edgeAdjust,v=!("0"===m||"none"===m||"false"===m||!1===m);"string"==typeof m&&"boolean"!=typeof r.edgeAdjust&&(r.edgeAdjust=v);var g=e.style.position;"absolute"!=g&&(e.style.position="absolute");var y=t.getBoundingClientRect(),b=e.getBoundingClientRect();if(b.width*b.height==0)return e.style.position=g||"",void window.console.warn((e.id?"id为"+e.id+"的":"")+"目前元素尺寸为0,无法定位");var w=window.pageYOffset,E=window.pageXOffset,A=window.innerWidth,S=window.innerHeight;(y.left<0&&y.right<0||y.top<0&&y.bottom<0||y.left>A&&y.right>A||y.top>S&&y.bottom>S)&&(r.edgeAdjust=v=!1);var L=e.offsetParent,x=L.getBoundingClientRect(),T={follow:e,target:e,trigger:t};this.element=this.element?Object.assign(this.element,T):T,this.params=this.params?Object.assign(this.params,r):r;var M=r.offsets,j=x.top+w,k=x.left+E;L===document.body&&"static"===window.getComputedStyle(L).position&&(j=0,k=0);var C,D,q=r.position;if("string"!=typeof q&&2===q.length){var O=q;return C=O[0]+M.x,D=O[1]+M.y,!0===r.edgeAdjust&&(C+b.width>A+E&&(C=A+E-b.width-M.x),D+b.height>S+w&&(D=S+w-b.height-M.y)),e.style.left=C+"px",e.style.top=D+"px",e.setAttribute("data-align","3-1"),void this.zIndex()}!1===o.some((function(t){return t===q}))&&(q=a.position);var N=t.dataset.safeArea||r.safeArea;"string"==typeof N&&(N=N.trim().split(/(?:,\s*|\s+)/)),1==(N=N.map((function(t){return parseFloat(t)||0}))).length?N=N.concat(N[0],N[0],N[0]):2==N.length?(N.push(N[0]),N.push(N[1])):3==N.length&&N.push(N[1]);var H={"left-right":b.width+M.x+N[3]>y.left,"top-bottom":y.top-(b.height+M.y+N[0])<0,"right-left":y.right+b.width+M.x+N[1]>A,"bottom-top":y.bottom+b.height+M.y+N[2]>S,"right-right":b.width+M.x+N[3]>y.right,"left-left":y.left+b.width+M.x+N[1]>A,"bottom-bottom":b.height+M.y+N[0]>y.bottom,"top-top":y.top+b.height+M.y+N[2]>S},I="bottom",V=function(){switch(q){case"1-4":case"5-7":case"2-3":D=y.top-b.height,C="1-4"===q?y.left:"5-7"===q?y.left-(b.width-y.width)/2:y.left-(b.width-y.width),I="top",v&&H["top-bottom"]&&(H["bottom-top"]?H["left-right"]&&H["right-left"]||(q={"1-4":"2-1","5-7":"6-8","2-3":"3-4"}[q],V()):(q={"1-4":"4-1","5-7":"7-5","2-3":"3-2"}[q],V()));break;case"2-1":case"6-8":case"3-4":C=y.right,D="2-1"===q?y.top:"6-8"===q?y.top-(b.height-y.height)/2:y.top-(b.height-y.height),I="right",v&&H["right-left"]&&(H["left-right"]?H["top-bottom"]&&H["bottom-top"]||(q={"2-1":"1-4","6-8":"5-7","3-4":"2-3"}[q],V()):(q={"2-1":"1-2","6-8":"8-6","3-4":"4-3"}[q],V()));break;case"4-1":case"7-5":case"3-2":D=y.bottom,C="4-1"===q?y.left:"7-5"===q?y.left-(b.width-y.width)/2:y.left-(b.width-y.width),I="bottom",v&&H["bottom-top"]&&(H["top-bottom"]?H["left-right"]&&H["right-left"]||(q={"4-1":"2-1","7-5":"6-8","3-2":"3-4"}[q],V()):(q={"4-1":"1-4","7-5":"5-7","3-2":"2-3"}[q],V()));break;case"1-2":case"8-6":case"4-3":C=y.left-b.width,D="1-2"===q?y.top:"8-6"===q?y.top-(b.height-y.height)/2:y.top-(b.height-y.height),I="left",v&&H["left-right"]&&(H["right-left"]?H["top-bottom"]&&H["bottom-top"]||(q={"1-2":"1-4","8-6":"5-7","4-3":"2-3"}[q],V()):(q={"1-2":"2-1","8-6":"6-8","4-3":"3-4"}[q],V()))}};V(),C=C+M.x-k,D=D+M.y-j,v&&("top"==I?D-=N[2]:"bottom"==I?D+=N[0]:"left"==I?C-=N[1]:C+=N[3]),D+=w,C+=E,e.style.left=Math.round(C)+"px",e.style.top=Math.round(D)+"px",b=e.getBoundingClientRect(),v&&("top"==I||"bottom"==I?b.left<N[3]?C+=N[3]-b.left:b.right+N[1]>A&&(C-=b.right+N[1]-A):b.top<N[0]?D+=N[0]-b.top:b.bottom+N[2]>S&&(D-=b.bottom+N[2]-S),e.style.left=Math.round(C)+"px",e.style.top=Math.round(D)+"px"),e.setAttribute("data-align",q),e.setAttribute("data-direction",I),this.zIndex()}).prototype.zIndex=function(){var t=this.element.target,e=window.getComputedStyle(t).zIndex,i=19;document.body.childNodes.forEach((function(e){if(1==e.nodeType){var a=window.getComputedStyle(e),n=1*a.zIndex;n&&t!=e&&"none"!=a.display&&(i=Math.max(n+1,i))}})),i!=e&&(t.style.zIndex=i)},i)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){var i,a,n;t.Tab=(i="active",a={add:function(){return["ui-tab"].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-tab"}},(n=function(t,e){var a=t;if(a){"string"==typeof t&&(a=document.querySelectorAll(t)),"function"==typeof(e=e||{})&&(e={onSwitch:e});var n={eventType:"click",index:"auto",history:!0,slide:!1,autoplay:0,onSwitch:function(){}},r=Object.assign({},n,e),s=r.index,o=[];a.forEach(function(t,e){"number"!=typeof s&&t.classList.contains(i)&&(s=e),t.setAttribute("data-index",e),t.setAttribute("role","tab"),t.setAttribute("aria-selected","false");var a=this.getPanel(t);o.push(a),a&&a.setAttribute("role","tabpanel")}.bind(this)),"number"!=typeof s&&(s=0),this.element={tabs:a,tab:a[s],panels:o,panel:o[s]},r.index=s,this.params=r,this.callback={switch:r.onSwitch},this.events(),window.addEventListener("DOMContentLoaded",function(){a[s].dispatchEvent(new CustomEvent(r.eventType)),r.onSwitch.call(this,a[s],o[s],null,null)}.bind(this)),a.length>1&&a[0].parentElement==a[1].parentElement&&a[0].parentElement.setAttribute("role","tablist")}}).prototype.getPanel=function(t){t||(t=this.element.tab);var e=t.getAttribute("data-rel")||t.getAttribute("href");return e?/^#/.test(e)?document.querySelector(e):document.querySelector("#"+e)||document.querySelector("."+e):null},n.prototype.show=function(t){var e=this.index,n=this.element.tabs,r=this.params;if(t=t||this.element.tab){var s=this.getPanel(t),o=t.parentElement;this.element.tab=t,this.element.panel=s;var l=t.getAttribute("href");if(!t.classList.contains(i)){e=o.querySelector("."+i).getAttribute("data-index"),t.classList.add(i);var d,c=n[e],u=this.getPanel(c);if(c.classList.remove(i),s.classList.add(i),u.classList.remove(i),e=t.getAttribute("data-index"),this.params.index=1*e,1==r.slide&&history.pushState&&((d=o.querySelector("."+a.add("line")))||((d=document.createElement("i")).className=a.add("line"),o.insertBefore(d,n[0])),d.style.display="block",d.style.width=t.clientWidth+"px",d.style.left=t.offsetLeft+"px"),this.callback.switch.call(this,t,c,s,u),/^(:?javas|#)/.test(l)){var h=(t.getAttribute("data-rel")||l||"").replace(/^#/,"");if(1==r.history){var p=new URLSearchParams(location.search);p.set("tab",h);var f=location.hash;l==f&&(location.hash=f=""),history.replaceState?history.replaceState(null,document.title,location.href.split("?")[0]+"?"+p.toString()+f):location.replace("#tab="+h)}}}}},n.prototype.events=function(){var t=this.element.tabs,e=this.params;t.forEach(function(t){t.addEventListener(e.eventType,function(t){/^(:?javas|#)/.test(t.target.getAttribute("href"))&&t.preventDefault(),this.show(t.target)}.bind(this),!1)}.bind(this)),e.autoplay&&e.autoplay>0&&(this.timerSlide=setInterval(function(){this.show(t[this.params.index+1]||t[0])}.bind(this),e.autoplay),t.forEach(function(i){[i,this.getPanel(i)].forEach(function(i){i&&(i.addEventListener("mouseenter",function(){clearInterval(this.timerSlide)}.bind(this),!1),i.addEventListener("mouseleave",function(){this.timerSlide=setInterval(function(){this.show(t[this.params.index+1]||t[0])}.bind(this),e.autoplay)}.bind(this),!1))}.bind(this))}.bind(this)))},n)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){t.Select=function(){var t="select",e="selected",i="disabled",a="active",n="reverse",r="multiple",s={add:function(){return["ui",t].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-"+t}},o=function(t){if(!t)return this;var e=t;if(!e.data||!e.data.select){var a=e.style.width||e.getAttribute("width");a||(a=e.offsetWidth),this.offsetWidth=a;var n=e.id;n=n?"lulu_"+n:("lulu_"+Math.random()).replace("0.",""),this.id=n;var o="string"==typeof e.getAttribute(r);this.multiple=o;var l=document.createElement("div"),d=document.createElement("a");e[i]||d.setAttribute("href","javascript:"),d.setAttribute("data-target",n),d.setAttribute("role","button"),d.setAttribute("aria-expanded","false"),d.setAttribute("aria-owns",n),d.classList.add(s.add("button"));var c=document.createElement("ui-select-list");c.id=n,c.setAttribute("role","listbox"),c.setAttribute("aria-expanded","true"),c.classList.add(s.add("datalist")),0==o?(l.appendChild(d),e.style.display="none",e.insertAdjacentElement("afterend",l)):(l.appendChild(c),e.style.position="absolute",e.style.zIndex=1,e.insertAdjacentElement("afterend",l),c.setAttribute("aria-hidden","true")),this.element={select:e,combobox:l,button:d,datalist:c},this.refresh(),this.events(),e.data?e.data.select=this:e.data={select:this}}};o.prototype.events=function(){var r=this.element,o=r.select,l=r.combobox,d=r.button,c=r.datalist;if(0==this.multiple){document.isSelectMouseEvent||(document.addEventListener("click",function(t){var u=t.target;if(u&&u.closest&&((l=u.closest("."+s))||(c=u.closest("ui-select-list"))&&c.id&&(d=document.querySelector('a[data-target="'+c.id+'"]'))&&(l=d.closest("."+s)),(o=l&&l.previousElementSibling)&&o.data&&o.data.select))if(r=o.data.select.element,d=r.button,c=r.datalist,d.contains(u)){if(o[i])return!1;if(l.classList.toggle(a),l.classList.contains(a)){document.body.contains(c)||document.body.appendChild(c);var h=d.getBoundingClientRect();c.classList.add(a),c.style.left=h.left+window.pageXOffset+"px",c.style.top=h.bottom+window.pageYOffset-1+"px",c.style.width=h.width+"px",this.zIndex();var p=c.getBoundingClientRect(),f=p.bottom+window.pageYOffset>Math.max(document.body.clientHeight,window.innerHeight);l.classList[f?"add":"remove"](n),f&&(c.style.top=h.top+window.pageYOffset-p.height+1+"px"),d.setAttribute("aria-expanded","true");var m=l.dataScrollTop,v=c.querySelector("."+e);m&&v&&m[1]==v.getAttribute("data-index")&&m[2]==v.innerText&&(c.scrollTop=m[0],delete l.dataScrollTop)}else l.classList.remove(n),d.setAttribute("aria-expanded","false"),c.remove()}else if(c.contains(u)){var g=u,y=null,b=g.classList.contains(i),w=g.getAttribute("data-index"),E=c.scrollTop;l.dataScrollTop=[E,w,g.innerText],0==b&&(y=o[w])&&(y[e]=!0),l.classList.remove(a),d.setAttribute("aria-expanded","false"),c.remove(),d.focus(),d.blur(),0==b&&(o.refresh(),o.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}}.bind(this)),document.addEventListener("mouseup",(function(e){var i=e.target;i&&(l=document.querySelector(t+"+."+s+"."+a))&&(d=l.querySelector("."+s.add("button")),(c=document.getElementById(d.getAttribute("data-target")))&&0==l.contains(i)&&0==c.contains(i)&&(l.classList.remove(a),l.classList.remove(n),c.remove(),d&&d.setAttribute("aria-expanded","false")))})),document.isSelectMouseEvent=!0);var u=function(){o[i]?d.removeAttribute("href"):d.href="javascript:"};if(window.MutationObserver)new MutationObserver((function(t){t.forEach((function(t){"attributes"==t.type&&u()}))})).observe(o,{attributes:!0,attributeFilter:[i]});else o.addEventListener("DOMAttrModified",(function(t){t.attrName==i&&u()}))}else o.addEventListener("change",function(){this.refresh()}.bind(this)),o.addEventListener("scroll",(function(){c.scrollTop=o.scrollTop})),o.addEventListener("mousedown",(function(){o.setAttribute("data-active","true")})),o.addEventListener("mousemove",function(t){if(o.getAttribute("data-active"))this.refresh();else for(var a=t.clientY,n=c.querySelectorAll("a"),r=0;r<n.length;r++){var s=n[r];s.removeAttribute("href");var l=s.getBoundingClientRect().top,d=l+s.clientHeight;if(a>=l&&a<=d){0==s.classList.contains(e)&&0==s.classList.contains(i)&&(s.href="javascript:");break}}}.bind(this)),o.addEventListener("mouseout",(function(){c.querySelectorAll("a[href]").forEach((function(t){t.removeAttribute("href")}))})),document.addEventListener("mouseup",(function(){o.removeAttribute("data-active")}))},o.prototype.getData=function(){var t=this.element.select,e=t.querySelectorAll("option");if(0==e.length)return[{html:""}];var i=t.querySelectorAll("optgroup"),a=!!t.querySelector("optgroup[label]");if(i.length){var n=[];return i.forEach((function(t){n.push({html:t.label,disabled:t.disabled,className:t.className,hr:!a}),t.querySelectorAll("option").forEach((function(e){n.push({html:e.label||e.innerHTML,value:e.value,selected:e.selected,disabled:t.disabled||e.disabled,className:e.className,intent:a})}))})),n}return[].slice.call(e).map((function(t){return{html:t.label||t.innerHTML,value:t.value,selected:t.selected,disabled:t.disabled,className:t.className}}))},o.prototype.refresh=function(t){var a=this.id,n=this.multiple,r=this.element,o=r.select,l=r.combobox,d=r.button,c=r.datalist;t=t||this.getData(),l.className=(o.className+" "+s).trim();var u,h=this.offsetWidth;/\D$/.test(h)?l.style.width=h:l.style.width=h+"px",n?l.style.height=o.style.height||o.offsetHeight+"px":d.innerHTML='<span class="'+s.add("text")+'">'+(u="",t.forEach((function(t){t.selected&&(u=t.html)})),(u||t[0].html)+'</span><i class="')+s.add("icon")+'" aria-hidden="true"></i>';var p=-1;return c.innerHTML=t.map((function(t){var r=[s.add("datalist","li")];return t.className&&r.push(t.className),t[e]&&r.push(e),t[i]&&r.push(i),void 0!==t.hr?t.hr?'<div class="'+(r=[s.add("datalist","hr"),t.className]).join(" ")+'"></div>':'<div class="'+r.join(" ")+'" role="heading">'+t.html+"</div>":(p++,t.intent&&r.push(s.add("intent")),t.html?n?'<a class="'+r.join(" ")+'" data-index='+p+">"+t.html+"</a>":"<a "+(t[i]?"":'href="javascript:" ')+'class="'+r.join(" ")+'" data-index='+p+' data-target="'+a+'" role="option" aria-selected="'+t[e]+'">'+t.html+"</a>":(r.push(i),'<span class="'+r.join(" ")+'"></span>'))})).join(""),this},o.prototype.zIndex=function(){var t=document.querySelector("body > ui-select-list.active"),e=window.getComputedStyle(t).zIndex,i=19;document.body.childNodes.forEach((function(e){if(1==e.nodeType){var a=window.getComputedStyle(e),n=1*a.zIndex;n&&t!=e&&"none"!=a.display&&(i=Math.max(n+1,i))}})),i!=e&&(t.style.zIndex=i)},o.prototype.remove=function(){var t=this.element.combobox;t&&t.remove()},Object.defineProperty(HTMLSelectElement.prototype,"value",{configurable:!0,enumerable:!0,writeable:!0,get:function(){var t=[];return this.querySelectorAll("option").forEach((function(i){1==i[e]&&t.push(i.value)})),t.join()},set:function(t){var i=!1,a="string"==typeof this.getAttribute("multiple");t=a?t.split(","):[t.toString()],this.querySelectorAll("option").forEach((function(n){0==a&&1==i||(-1!=t.indexOf(n.value)?n[e]=i=!0:a&&(n[e]=!1))})),1==i&&this.refresh()}}),HTMLSelectElement.prototype.refresh=function(){this.data&&this.data.select?this.data.select.refresh():new o(this)};var l=function(){if(!1!==window.autoInit&&(document.querySelectorAll("select").forEach((function(t){"1"!=window.getComputedStyle(t).opacity&&t.refresh()})),!1!==window.watching)){var t=function(e,i){if(1==e.nodeType)if("SELECT"==e.tagName)"remove"==i?e.data&&e.data.select?e.data.select[i]():e.parentNode.removeChild(e):e[i]();else if("OPTION"==e.tagName){var a=e.parentElement;a?a.data&&a.data.select&&setTimeout((function(){a.refresh()}),16):this.target&&"SELECT"==this.target.tagName&&this.target.refresh()}else"refresh"==i&&(l.flag=!1,e.querySelectorAll("select").forEach((function(e){t(e,i)})),l.flag=!0)};if(window.MutationObserver){new MutationObserver((function(e){!1!==l.flag&&!1!==window.watching&&e.forEach((function(e){var i=e.addedNodes,a=e.removedNodes;i.length&&i.forEach((function(i){t.call(e,i,"refresh")})),a.length&&a.forEach((function(i){t.call(e,i,"remove")}))}))})).observe(document.body,{childList:!0,subtree:!0})}else{var e=[],i=null,a=function(a,n,r){!1!==l.flag&&!1!==window.watching&&1==a.nodeType&&(clearTimeout(i),"SELECT"==a.tagName?e.push({action:n,node:a}):"OPTION"!=a.tagName||0!=e.length&&0!=e[e.length-1].node.contains(a)||e.push({action:"refresh",node:r.relatedNode||a}),i=setTimeout((function(){l.flag=!1,e.forEach((function(e){t(e.node,e.action)})),l.flag=!0,e=[]}),16))};document.body.addEventListener("DOMNodeInserted",(function(t){a(t.target,"refresh",t)})),document.body.addEventListener("DOMNodeRemoved",(function(t){a(t.target,"remove",t)}))}}};"loading"!=document.readyState?l():window.addEventListener("DOMContentLoaded",l);return o}()}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){t.Drop=function(){var t=(this||self).Follow,e=function(t,e,i){return this.init(t,e,i),this};e.prototype.init=function(t,e,i){"string"==typeof t&&(t=document.getElementById(t)||document.querySelector(t)),"string"==typeof e&&(e=document.getElementById(e)||document.querySelector(e)),e&&"object"==typeof e&&"number"!=typeof e.nodeType&&(i=e,e=null);var a={eventType:"null",offsets:{x:0,y:0},position:"7-5",selector:"",edgeAdjust:!0,onShow:function(){},onHide:function(){}};for(var n in i=i||{},a)if(void 0===i[n]&&t){var r=t.getAttribute("data-"+n.toLowerCase());if(null!==r)if("edgeAdjust"==n&&"false"==r)i[n]=!1;else if("offsets"==n){var s=r.split(/,|\s+/),o={x:Number(s[0].trim())||0,y:Number(s[1].trim())||0};i[n]=o}else i[n]=r}var l=Object.assign({},a,i||{});return this.element={trigger:t,target:e},this.callback={show:l.onShow,hide:l.onHide},this.params={eventType:l.eventType,offsets:l.offsets,position:l.position,selector:l.selector,edgeAdjust:l.edgeAdjust},this.display=!1,e&&t?(this.events(),t.data||(t.data={}),t.data.drop=this,this):this},e.prototype.events=function(){var t=this.element.trigger,e=this.element.target,i=this.params,a=function(e){if(!i.selector)return null;var a=e.closest(i.selector);return 0==t.contains(a)?null:a};switch(i.eventType){case"null":this.show();break;case"hover":var n,r;t.addEventListener("mouseover",function(t){if(t.relatedTarget!==t.target){var e=a(t.target);e&&(this.element.trigger=e),i.selector&&!e||(n=setTimeout(function(){this.show()}.bind(this),150),clearTimeout(r))}}.bind(this)),t.addEventListener("mouseleave",function(){clearTimeout(n),r=setTimeout(function(){this.hide()}.bind(this),200)}.bind(this)),e.isBindDropHover||(e.addEventListener("mouseenter",(function(){clearTimeout(r)})),e.addEventListener("mouseleave",function(){r=setTimeout(function(){this.hide()}.bind(this),100)}.bind(this)),e.isBindDropHover=!0),t.addEventListener("click",function(t){if(window.isKeyEvent){t.preventDefault();var e=a(t.target);e&&(this.element.trigger=e),i.selector&&!e||(0==this.display?this.show():this.hide())}}.bind(this));break;case"click":case"contextmenu":t.addEventListener(i.eventType,function(t){t.preventDefault();var e=a(t.target);if(e&&(this.element.trigger=e),!i.selector||e){if("contextmenu"==i.eventType)return i.position=[t.pageX,t.pageY],void this.show();0==this.display?this.show():this.hide()}}.bind(this))}document.addEventListener("mouseup",function(t){var e=t&&t.target;if(e&&1==this.display){var i=this.element.trigger,a=this.element.target;a&&i&&0==i.contains(e)&&0==a.contains(e)&&this.hide()}}.bind(this)),window.addEventListener("resize",function(){this.follow()}.bind(this))},e.prototype.follow=function(){var e=this.element.trigger,i=this.element.target;return 1==this.display&&"none"!=window.getComputedStyle(e).display&&new t(e,i,{offsets:this.params.offsets,position:this.params.position,edgeAdjust:this.params.edgeAdjust}),this},e.prototype.show=function(){var t=this.element.trigger,e=this.element.target;e&&0==document.body.contains(e)&&document.body.appendChild(e),this.display=!0,e.style.position="absolute",e.style.display="inline",e.classList.add("ESC");var i=e.id;return i||(i=("lulu_"+Math.random()).replace("0.",""),e.id=i),t.setAttribute("data-target",i),t.setAttribute("aria-expanded","true"),this.follow(),"function"==typeof this.callback.show&&this.callback.show.call(this,t,e),this},e.prototype.hide=function(){var t=this.element.trigger,e=this.element.target;return e.style.display="none",e.classList.remove("ESC"),t.setAttribute("aria-expanded","false"),window.isKeyEvent&&t.focus(),this.display=!1,"function"==typeof this.callback.hide&&this.callback.hide.call(this,t,e),this},e.prototype.list=function(t,e,i){if([].slice.call(arguments).forEach((function(a){var n=typeof a;"string"==n?t=document.querySelector(a):"function"==n?e=a:"object"==n&&("number"==typeof a.nodeType?t=a:a.map?e=a:i=a)})),t&&"number"!=typeof t.nodeType&&(t=null),!(t=t||this.element.trigger)||!e)return this;if(t.data&&t.data.drop)return t.data.drop;var a={eventType:"click",offsets:{x:0,y:0},position:"4-1",selector:"",width:"",onShow:function(){},onHide:function(){},onSelect:function(){}},n=Object.assign({},a,i||{}),r="selected",s="disabled",o={add:function(){return["ui-droplist"].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-droplist"}},l="innerHTML";t.matches("input")&&(l="value"),this.data=e;var d=e;"function"==typeof e&&(d=e());var c="-1",u=!1,h=document.createElement("div");h.setAttribute("role","listbox"),h.setAttribute("tabindex","-1"),/^\d+$/.test(n.width)?h.style.width=n.width+"px":h.style.width=n.width,h.className=o.add("x");var p=function(e,i){e&&e.length&&e.forEach((function(e,a){var n=i.concat(a);e&&e.data?p(e.data,n):(e&&e[r]&&!e[s]&&e.value&&(t[l]=e.value,c=n.join("-")),e&&e[r]&&(u=!0))}))};p(d,[]);var f=(t[l]||"").trim();0==u&&f&&(p=function(t,e){t&&t.length&&t.forEach((function(t,i){var a=e.concat(i);t&&t.data?p(t.data,a):"string"==typeof t.value&&t.value.trim()==f&&(c=a.join("-"),t[r]=!0)}))})(d,[]);var m=function(t,e){"function"==typeof e&&(e=e()),e&&0!=e.length||(e=[{value:"没有数据",disabled:!0}]);var i,a,n=e.some((function(t){return t&&t[r]}));t.innerHTML=(i="",i+=(a=function(t,e){var i="";return t.forEach((function(t,l){if("-"!=t&&null!==t&&"{}"!=JSON.stringify(t)){var d=e.concat(l),u=t.href||"javascript:",h="";t.target&&(h=' target="'+t.target+'"');var p=o.add("li");t[r]&&(p=p+" "+r);var f="";t.data&&(f=" data-sublist");var m="";t.label&&(m=' aria-label="'+t.label+'"'),0==n&&c==d.join("-")&&(t[r]=!0),1!=t[s]?(i+='<a href="'+u+'"'+h+m+' class="'+p+'" data-index="'+d.join("-")+'" role="option" aria-selected="'+(t[r]||"false")+'" '+f+">"+t.value+"</a>",t.data&&(i+='<div class="'+o.add("xx")+'"><div class="'+o.add("x")+'" role="listbox">'+a(t.data,d)+"</div></div>")):i+='<span class="'+p+'"'+m+">"+t.value+"</span>"}else i+='<hr class="'+o.add("hr")+'">'})),i})(e,[])),t.listData=e};return this.init(t,h,{eventType:n.eventType,offsets:n.offsets,selector:n.selector,position:n.position,onShow:function(){m.call(this,h,this.data),n.onShow.apply(this,arguments)},onHide:n.onHide}),h.addEventListener("click",function(e){if(1==e.target.nodeType&&e.target.closest){var i=e.target.closest("a");if(i){var a=h.listData,s=i.getAttribute("data-index");if(s){var d=null;if(s.split("-").forEach((function(t){d=null===d?a[t]:d.data?d.data[t]:d[t]})),d){if("string"==typeof i.getAttribute("data-sublist")){i.classList.add(r);var u=i.nextElementSibling.querySelector("."+o.add("x"));if(!u)return;var p=u.getBoundingClientRect();p.right>window.innerWidth?u.classList.add("reverse"):u.classList.remove("reverse");var f=0;return p.bottom>window.innerHeight&&(f=window.innerHeight-p.bottom),u.style.msTransform="translateY("+f+"px)",void(u.style.transform="translateY("+f+"px)")}if(s!=c){var m=null;"-1"!=c&&(c.split("-").forEach((function(t){m=null===m?a[t]:m.data?m.data[t]:m[t]})),m&&delete m[r]),d[r]=!0,c=s}n.onSelect.call(this,d,i),"contextmenu"==n.eventType||""!=n.selector||d.href||(t[l]=d.value),this.hide()}}}}}.bind(this)),h.addEventListener("mouseover",(function(t){if(1==t.target.nodeType&&t.target.closest){var e=t.target.closest("a");if(e){var i=e.parentElement.querySelector("."+r+"[data-sublist]");i&&i!=e&&i.classList.remove(r),0==e.classList.contains(r)&&"string"==typeof e.getAttribute("data-sublist")&&e.click()}}})),this},e.prototype.panel=function(t,e){if(2===arguments.length?(t=arguments[0],e=arguments[1]):1===arguments.length&&(e=arguments[0],t=null),"string"==typeof t&&(t=document.querySelector(t)),!(t=t||this.element.trigger))return this;if(t.data&&t.data.drop)return t.data.drop;var i={title:"",content:"",buttons:[{},{}],width:"auto",eventType:"click",selector:"",offsets:{x:0,y:0},position:"4-1",onShow:function(){},onHide:function(){}},a=Object.assign({},i,e||{}),n='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M116.152,99.999l36.482-36.486c2.881-2.881,2.881-7.54,0-10.42 l-5.215-5.215c-2.871-2.881-7.539-2.881-10.42,0l-36.484,36.484L64.031,47.877c-2.881-2.881-7.549-2.881-10.43,0l-5.205,5.215 c-2.881,2.881-2.881,7.54,0,10.42l36.482,36.486l-36.482,36.482c-2.881,2.881-2.881,7.549,0,10.43l5.205,5.215 c2.881,2.871,7.549,2.871,10.43,0l36.484-36.488L137,152.126c2.881,2.871,7.549,2.871,10.42,0l5.215-5.215 c2.881-2.881,2.881-7.549,0-10.43L116.152,99.999z"/></svg>',r={add:function(){return["ui-dropanel"].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-dropanel"}},s=document.createElement("div");s.className=r.add("x"),/^\d+$/.test(a.width)?s.style.width=a.width+"px":/^\d+\D+$/.test(a.width)&&(s.style.width=a.width);var o=document.createElement("h5");o.className=r.add("title"),o.innerHTML=a.title;var l=document.createElement("button");l.setAttribute("aria-label","关闭"),l.innerHTML=n,l.className=r.add("close");var d=document.createElement("content");d.className=r.add("content"),d.innerHTML=a.content;var c=document.createElement("div");return c.className=r.add("footer"),s.appendChild(o),s.appendChild(l),s.appendChild(d),s.appendChild(c),this.init(t,s,{eventType:a.eventType,offsets:a.offsets,selector:a.selector,position:a.position,onShow:a.onShow,onHide:a.onHide}),Object.assign(this.element,{panel:s,title:o,close:l,content:d,footer:c}),l.addEventListener("click",function(){this.hide()}.bind(this),!1),a.buttons.forEach(function(t,e){var i=(t=t||{}).type||"";i||0!=e||(i="danger");var a=t.value;a||(a=["确定","取消"][e]);var n=t.events||{click:function(){this.hide()}.bind(this)};"function"==typeof n&&(n={click:n});var s=null;for(var o in t.for?((s=document.createElement("label")).setAttribute("for",t.for),s.setAttribute("role","button")):(s=document.createElement("button"),this.element["button"+e]=s),s.innerHTML=a,s.className=String(r).replace("dropanel","button")+" "+r.add("button")+" "+(t.className||""),i&&s.setAttribute("data-type",i),this.element["button"+e]=s,n)s.addEventListener(o,function(t){t.drop=this,n[o](t)}.bind(this),!1);this.element.footer.appendChild(s)}.bind(this)),this};var i=function(){var t="[is-drop]",i=function(t){t&&t.forEach&&t.forEach((function(t){if(1===t.nodeType){var i=t.getAttribute("is-drop"),a={eventType:t.getAttribute("data-eventtype")||"click"},n=null;n=i?new e(t,i,a):new e(t,a),t.dispatchEvent(new CustomEvent("connected",{detail:{drop:n}}))}}))};(i(document.querySelectorAll(t)),!1!==window.watching)&&(window.MutationObserver?new MutationObserver((function(e){e.forEach((function(e){"childList"==e.type&&e.addedNodes.forEach((function(e){e.matches&&e.matches(t)?i([e]):e.querySelector&&i(e.querySelectorAll(t))}))}))})).observe(document.body,{childList:!0,subtree:!0}):document.body.addEventListener("DOMNodeInserted",(function(t){i([t.target])})))};"loading"!=document.readyState?i():window.addEventListener("DOMContentLoaded",i);return e}()}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){t.Tips=function(){var t=(this||self).Follow,e={add:function(){return["ui-tips"].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-tips"}},i="reverse",a=function(t,e){if(!t)return this;var i={eventType:"hover",align:"auto",content:"",onShow:function(){},onHide:function(){}},n=t;if("string"==typeof t&&0==(n=document.querySelectorAll(t)).length)return this;if(n.data&&n.data.tips)return n.data.tips;if(n.length&&n.forEach)return n.forEach((function(t){new a(t,e)})),n[0].data.tips;var r=Object.assign({},i,e||{});return this.element={trigger:n},this.callback={show:r.onShow,hide:r.onHide},this.params={eventType:r.eventType,align:r.align},r.content&&(this.content=r.content),this.events(),n.data||(n.data={}),n.data.tips=this,this};Object.defineProperty(a.prototype,"content",{configurable:!0,enumerable:!0,writeable:!0,get:function(){var t=this.element&&this.element.trigger;if(!t)return"";var e=t.getAttribute("title")||t.getAttribute("data-title")||"";return t.setAttribute("data-title",e),t.setAttribute("aria-label",e),t.removeAttribute("title"),e},set:function(t){var e=this.element&&this.element.trigger;e&&(e.setAttribute("data-title",t),e.setAttribute("aria-label",t))}}),a.prototype.events=function(){var t=this.element.trigger;if(0==/^a|input|button|area$/i.test(t.tagName)&&(t.setAttribute("tabindex","0"),t.setAttribute("role","tooltip")),t.classList.contains(e))return this.content,void t.addEventListener("click",(function(){window.isKeyEvent||this.blur()}),!1);var i,a=this.params,n=100;getComputedStyle(document.documentElement).getPropertyValue("--hoverNone")&&"hover"==a.eventType&&(a.eventType="click"),"hover"==a.eventType?(t.addEventListener("mouseenter",function(){i=setTimeout(function(){this.show()}.bind(this),n)}.bind(this)),t.addEventListener("mouseleave",function(){clearTimeout(i),this.hide()}.bind(this)),t.addEventListener("focus",function(){window.isKeyEvent&&this.show()}.bind(this)),t.addEventListener("blur",function(){this.hide()}.bind(this))):"click"==a.eventType?(t.addEventListener("click",function(){this.show()}.bind(this)),document.addEventListener("mouseup",function(e){var i=e.target;1==this.display&&0==t.contains(i)&&0==this.element.tips.contains(i)&&this.hide()}.bind(this))):this.show()},a.prototype.show=function(){var a=this.content;if(!a)return this;var n,r,s=this.element.trigger,o=this.element.tips;if(o)o.style.display="block",n=o.querySelector("span"),(r=o.querySelector("i")).style.left="",n.innerHTML=a;else{if((o=document.createElement("div")).classList.add(e.add("x")),(n=document.createElement("span")).classList.add(e.add("content")),n.innerHTML=a,(r=document.createElement("i")).classList.add(e.add("arrow")),!s.getAttribute("aria-label")){var l="lulu_"+(Math.random()+"").replace("0.","");n.id=l,s.setAttribute("aria-labelledby",l)}o.appendChild(n),o.appendChild(r),document.body.appendChild(o)}var d="5-7",c=this.params.align;"auto"==c&&(c=s.getAttribute("data-align")||s.getAttribute("data-position")||"center"),"center"==c?(d="5-7",(s.classList.contains(i)||s.hasAttribute(i))&&(d="7-5")):"left"==c?(d="1-4",(s.classList.contains(i)||s.hasAttribute(i))&&(d="4-1")):"right"==c?(d="2-3",(s.classList.contains(i)||s.hasAttribute(i))&&(d="3-2")):/^\d-\d$/.test(c)&&(d=c),new t(s,o,{position:d,edgeAdjust:!1});var u=o.getAttribute("data-align");if(u&&5==u.split("-").reduce((function(t,e){return 1*t+1*e}))){var h=s.getBoundingClientRect().width/2-r.getBoundingClientRect().width/2;r.style.left="1-4"==u||"4-1"==u?h+"px":"calc(100% - "+(r.getBoundingClientRect().width+h)+"px)"}return this.callback.show.call(this,s,o),this.element.tips=o,this.display=!0,this},a.prototype.hide=function(){var t=this.element.tips;return t&&(t.style.display="none",this.callback.hide.call(this,this.element.trigger,t)),this.display=!1,this};var n="."+e+", .jsTips,[is-tips]";return window.addEventListener("DOMContentLoaded",(function(){new a(n)})),document.addEventListener("mouseover",(function(t){var e=t.target;if(e&&e.closest&&(e=e.closest(n))&&(!e.data||!e.data.tips)){new a(e);var i=e.data.tips;i&&(e.classList.contains("jsTips")||e.hasAttribute("is-tips"))&&i.show()}})),a}()}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){var i,a;t.LightTip=(i={add:function(){return["ui-lightip"].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-lightip"}},(a=function(t,e){var a={status:"normal",duration:3e3};"object"==typeof t&&(e=t,t=void 0),this.params=Object.assign({},a,e||{}),this.params.type&&(this.params.status=this.params.type);var n=document.createElement("a");n.href="javascript:",n.setAttribute("role","tooltip"),n.className=i+" ESC";var r=document.createElement("div");r.className=i.add("text"),n.appendChild(r),document.body.appendChild(n),this.element={container:n,content:r},this.timerRemove=null,this.events(),this.content=t,this.show()}).prototype.events=function(){this.element.container.addEventListener("click",function(){this.remove()}.bind(this))},a.prototype.tabIndex=function(){var t=this.element.container,e=this.lastActiveElement;if(1==this.display){var i=document.activeElement;t!==i&&(this.lastActiveElement=i),t.focus()}else e&&!e.matches("body")&&(e.focus({preventScroll:!0}),window.isKeyEvent||e.blur(),this.lastActiveElement=null);return this},a.prototype.position=function(){var t=[].slice.call(document.querySelectorAll("."+i+"[open]")).sort((function(t,e){return(t.tid||0)-(e.tid||0)})),e={},a=10;return t.forEach((function(t){var i=t.textContent;void 0===e[i]&&(e[i]=a,a=a+t.offsetHeight+10),t.style.top=e[i]+"px"})),this},a.prototype.show=function(){var t=this.element,e=t.container,i=t.content,a=this.params,n=this.content;if(n)return clearTimeout(this.timerRemove),e.setAttribute("data-status",a.status),a.type&&e.setAttribute("data-type",a.type),i.innerHTML=n,e.setAttribute("open","open"),this.display=!0,this.tabIndex(),this.zIndex(),this.timerRemove=setTimeout(function(){this.remove(),this.position()}.bind(this),a.duration),e.tid=this.timerRemove,this.position(),this},a.prototype.remove=function(){var t=this.element.container;t&&t.remove&&(clearTimeout(this.timerRemove),t.remove()),this.display=!1,this.tabIndex()},a.prototype.hide=function(){var t=this.element.container;t&&(clearTimeout(this.timerRemove),t.removeAttribute("open")),this.display=!1,this.tabIndex()},a.prototype.success=function(t,e){return"function"==typeof t&&(t=t()),"string"==typeof t?this.content=t:"number"==typeof t&&(e=t),this.params.status="success",e&&(this.params.duration=e),this.element.container&&this.element.container.setAttribute("aria-label","操作成功"),this.show(),this},a.prototype.error=function(t,e){return"function"==typeof t&&(t=t()),"string"==typeof t?this.content=t:"number"==typeof t&&(e=t),this.params.status="error",e&&(this.params.duration=e),this.element.container&&this.element.container.setAttribute("aria-label","操作失败"),this.show(),this},a.prototype.zIndex=function(){var t=this.element.container,e=window.getComputedStyle(t).zIndex,i=19;document.body.childNodes.forEach((function(e){if(1==e.nodeType){var a=window.getComputedStyle(e),n=1*a.zIndex;n&&t!=e&&"none"!=a.display&&(i=Math.max(n+1,i))}})),i!=e&&(t.style.zIndex=i)},a)}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){t.ErrorTip=function(){var t=(this||self).Follow,e={add:function(){return["ui-tips"].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-tips"}},i=function(t,i,a){var n={unique:!0,onShow:function(){},onHide:function(){}},r=Object.assign({},n,a||{}),s=i;if("function"==typeof s&&(s=s()),"string"!=typeof s)return this;var o,l,d,c=t,u=window.uniqueErrorTip;return 1==r.unique&&u?o=u.element.tips:0==r.unique&&c.data&&c.data.errorTip?o=c.data.errorTip.element.tips:((o=document.createElement("div")).className=e.add("x")+" "+e.add("error"),(l=document.createElement("span")).className=e.add("content"),(d=document.createElement("i")).className=e.add("arrow"),o.appendChild(l),o.appendChild(d),document.body.appendChild(o),document.addEventListener("keydown",function(t){16!=t.keyCode&&17!=t.keyCode&&(window.uniqueErrorTip||this).hide()}.bind(this)),document.addEventListener("mousedown",function(t){var e=document.activeElement,i=o.trigger,a=t.target;e&&i&&e==a&&e==i&&!i.getAttribute("data-focus")||(window.uniqueErrorTip||this).hide()}.bind(this)),window.addEventListener("resize",function(){(window.uniqueErrorTip||this).hide()}.bind(this))),1==r.unique&&(window.uniqueErrorTip=this),o.trigger=c,this.element={trigger:c,tips:o,content:l||o.querySelector("span"),arrow:d||o.querySelector("i")},this.callback={show:r.onShow,hide:r.onHide},this.params={unique:r.unique},this.content=s,c.data||(c.data={}),c.data.errorTip=this,this.show(),this};return i.prototype.show=function(){var e=this.element,i=e.tips,a=e.trigger,n=e.content;return n.innerHTML=this.content,i.style.display="",new t(a,i,{position:"5-7",edgeAdjust:!1}),a.setAttribute("aria-label","错误提示:"+n.textContent||n.innerText),a.classList.add("error"),a.classList.add("valided"),this.display=!0,this.callback&&this.callback.show&&this.callback.show.call(this,a,i),this},i.prototype.hide=function(){var t=this.element.tips,e=this.element.trigger;return e.removeAttribute("aria-label"),"none"!=window.getComputedStyle(t).display&&(t.style.display="none",e.classList.remove("error"),this.callback&&this.callback.hide&&this.callback.hide.call(this,e,t),this.display=!1),this},i}()}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){t.Loading=function(){var t="loading",e={add:function(){return["ui",t].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-"+t}};if(Object.defineProperty(HTMLElement.prototype,"loading",{configurable:!0,enumerable:!0,writeable:!0,get:function(){return!!(this.classList.contains(e)||this.classList.contains(t)||this.matches(e))},set:function(a){var n="remove";if(a&&(n="add",this.loading))return a;this.classList.contains(e.toString().replace(t,"button"))?this.classList[n](t):(this.classList[n](e),"function"==typeof i&&i(this)),this.setAttribute("aria-busy",!!a),a&&""==this.innerHTML.trim()?this.setAttribute("aria-label","正在加载中"):this.removeAttribute("aria-label")}}),void 0===window.getComputedStyle(document.head).transition){var i=function(t){var i;if(t)if(1==t.loading){if(!t.getAttribute("spin")){(i=document.createElement("i")).className=e.add("before"),t.insertAdjacentElement("afterbegin",i),t.setAttribute("spin",""),clearInterval(t.timerLoading);var a=16;t.timerLoading=setInterval((function(){var e=t.rotate||0;(e+=360/a)>360&&(e-=360),t.rotate=e,i.style.msTransform="rotate("+e+"deg)"}),1e3/a)}}else!1===t.loading&&(t.removeAttribute("spin"),(i=t.querySelector("."+e.add("before")))&&i.remove(),clearInterval(t.timerLoading))};window.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(e).forEach(i)})),document.body.addEventListener("DOMNodeInserted",(function(t){t.target&&1==t.target.nodeType&&t.target.matches(e)&&i(t.target)}))}var a=function(t,e){var i={observer:"childList",size:2};if("string"==typeof t&&(t=document.querySelector(t)),!t)return this;var a=t,n=Object.assign({},i,e||{});this.params=n,this.element={target:t},a.data||(a.data={}),a.data.loading=this,this.show()};return a.prototype.show=function(){var t=this.params,i=this.element.target;if("attributes"==t.observer)i.loading=!0,i.setAttribute("size",t.size),this.loading=!0,this.display=!0;else if("childList"==t.observer){"static"==window.getComputedStyle(i).position?(i.style&&i.style.position?this.position="static-inline":this.position="static-computed",i.style.position="relative"):this.position="",i.initHTML=i.innerHTML,i.innerHTML="<"+e+' size="'+t.size+' align="center"></'+e+">",this.loading=!0,this.display=!0}},a.prototype.hide=function(){var t=this.params,i=this.element.target;if("attributes"==t.observer)i.loading=!1,this.loading=!1,this.display=!1;else if("childList"==t.observer){var a=this.position;"static-inline"==a?i.style.position="static":"static-computed"==a&&(i.style.position=""),"string"==typeof i.initHTML?i.innerHTML=i.initHTML:i.querySelector(e)&&i.querySelector(e).remove(),this.loading=!1,this.display=!1}},a}()}("undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this),function(t,e){t.Range=function(){var t=(this||self).Tips,e="reverse",i="active",a="disabled",n={add:function(){return["ui","range"].concat([].slice.call(arguments)).join("-")},toString:function(){return"ui-range"}},r={start:"mousedown",move:"mousemove",end:"mouseup"};"ontouchstart"in document&&(r={start:"touchstart",move:"touchmove",end:"touchend"});var s=function(t,i){var r={reverse:!1,tips:function(t){return t}};i=i||{};var s=Object.assign({},r,i),o=t;if("string"==typeof t&&(o=document.querySelector(t)),!o)return this;if("hidden"===window.getComputedStyle(o).visibility){if(o.data&&o.data.range)return o.data.range;var l=o.getAttribute("min")||0,d=o.getAttribute("max")||100,c=o.getAttribute("step")||1,u=document.createElement("div"),h=o.className;u.setAttribute("class",h),u.classList.add(n);var p=document.createElement("div");p.classList.add(n.add("track"));var f=document.createElement("a");f.setAttribute("href","javascript:"),f.setAttribute("aria-valuenow",o.value),f.setAttribute("aria-valuemax",d),f.setAttribute("aria-valuemin",l),f.setAttribute("role","slider"),f.setAttribute("draggable","false"),f.classList.add(n.add("thumb")),(s.reverse||o.classList.contains(e)||o.hasAttribute(e))&&(s.reverse=!0,f.classList.add(e));var m=o.getAttribute("data-tips");return m&&!i.tips&&(s.tips="null"==m?null:function(t){return m.replace("${value}",t)}),o.insertAdjacentElement("afterend",u),"100%"!=o.getAttribute("width")&&0==o.parentElement.classList.contains(n.add("input"))?u.style.width=window.getComputedStyle(o).width:u.style.display="block",u.style.height=window.getComputedStyle(o).height,o.style.display="none",p.appendChild(f),u.appendChild(p),this.number={min:+l,max:+d,step:+c},this.element={input:o,container:u,track:p,thumb:f},this.params=s,this.value(),this.event(),1==o[a]&&(this.disabled=!0),o.data||(o.data={}),o.data.range=this,this}};s.prototype.event=function(){var e=this.element,n=this.number,s=e.input,o=e.container,l=e.thumb,d=n.min,c=n.max,u=n.step;o.addEventListener("click",function(t){var e=t&&t.target;if(e&&e!==l&&!s.disabled){var i=t.clientX-s.offsetLeft-l.offsetLeft-parseInt(window.getComputedStyle(l).width)/2,a=1*s.value+(c-d)*i/parseInt(o.style.width||o.clientWidth);this.value(a)}}.bind(this));var h={},p=function(){if(this.params.tips){var e=this.params.tips.call(l,s.value);this.tips?(this.tips.content=e,this.tips.show()):this.tips=new t(l,{eventType:"null",content:e})}};(l.addEventListener(r.start,function(t){s.disabled||(t.preventDefault(),t.touches&&t.touches.length&&(t=t.touches[0]),h.x=t.clientX,h.value=1*s.value,p.call(this),l.classList.add(i))}.bind(this)),"mousedown"==r.start&&(l.addEventListener("mouseenter",function(){0==l.classList.contains(i)&&p.call(this)}.bind(this)),l.addEventListener("mouseout",function(){0==l.classList.contains(i)&&this.tips&&this.tips.hide()}.bind(this))),document.addEventListener(r.move,function(t){if("number"==typeof h.x&&l.classList.contains(i)){t.preventDefault(),t.touches&&t.touches.length&&(t=t.touches[0]);var e=t.clientX-h.x,a=h.value+(c-d)*e/parseInt(o.style.width||o.clientWidth);this.value(a),this.tips&&(this.tips.content=this.params.tips.call(l,s.value),this.tips.show())}}.bind(this)),document.addEventListener(r.end,function(){l.classList.contains(i)&&(h.x=null,h.value=null,this.tips&&this.tips.hide(),l.classList.remove(i))}.bind(this)),l.addEventListener("keydown",function(t){if(!s.disabled){var e=1*s.value;37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),37==t.keyCode?e=Math.max(d,e-u):39==t.keyCode&&(e=Math.min(c,e+1*u)),this.value(e))}}.bind(this)),"block"==o.style.display&&window.addEventListener("resize",function(){this.position()}.bind(this)),window.MutationObserver)?new MutationObserver(function(t){t.forEach(function(t){"attributes"==t.type&&(this[a]=s[a])}.bind(this))}.bind(this)).observe(s,{attributes:!0,attributeFilter:[a]}):s.addEventListener("DOMAttrModified",function(t){t.attrName==a&&(this[a]=s[a])}.bind(this))},s.prototype.value=function(t){var e=this.element.input,i=e.value,a=this.number,n=a.max,r=a.min,s=a.step;return t||0===t||(i=t,t=e.value||Math.floor(r/2+n/2)),t=t>n||n-t<s/2?n:""===t||t<r||t-r<s/2?r:r+Math.round((t-r)/s)*s,e.value=t,this.position(),t!==i&&e.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this},s.prototype.po